Documentation

Linglib.Core.Algebra.RootedTree.GrossmanLarsonAssoc

Basis-level substrate for the Grossman-Larson product #

[OG08] [foissy-typed-decorated-rooted-trees-2018]

Combinatorial substrate connecting the Grossman-Larson product on ConnesKreimer R (Nonplanar α) to Nonplanar.insertionMultiset (NIM): host distributivity, single-guest associativity, representative invariance, and the powerset sum forms consumed by the associativity proof in GrossmanLarsonMonoid.lean (which derives mul_assoc from the abstract Oudom-Guin -associativity via the ckIsoSymmetricAlgebra bridge).

Main results #

The deprecated direct combinatorial route to associativity (the A3.3 campaign: insertionMultiset_assoc, insertion_assoc_shuffled, the Lemma-2.10 chain) was deleted on 2026-06-12 when the bridge route closed; see GrossmanLarsonMonoid.lean.

[UPSTREAM] candidate (jointly with the OudomGuinCirc layer).

§1: Prop 2.7.iii — distributes over disjoint union via shuffle Δ #

The shuffle coproduct decomposition on each forest argument C is realized explicitly as the sum over C.powerset of the partition (C₁, C - C₁).

The proof of Prop 2.7.iii at the GL/CK level reduces to a combinatorial identity on Nonplanar.insertionMultiset (= NIM), which we state separately and prove by descent from the RoseTree-level insertionForest.

theorem RootedTree.Nonplanar.insertionMultiset_add_host {α : Type u_2} (A B C : Forest (Nonplanar α)) :
insertionMultiset (A + B) C = (Multiset.powerset C).bind fun (C₁ : Multiset (Nonplanar α)) => Multiset.map (fun (p : Multiset (Nonplanar α) × Multiset (Nonplanar α)) => p.1 + p.2) (insertionMultiset A C₁ ×ˢ insertionMultiset B (C - C₁))

Deep substrate: multi-graft into a disjoint union of host forests decomposes as a Multiset.bind over guest partitions. This is the combinatorial heart of Prop 2.7.iii at the basis level.

NIM(A + B, C) = Σ_{C₁ ⊆ C} {X_A + X_B : X_A ∈ NIM(A, C₁), X_B ∈ NIM(B, C-C₁)}

Proved via descent through RoseTree.Pathed.hostBucketSum and the powerset bridge RoseTree.Pathed.listChoices_bridge_powerset_paired, plus insertionForest_msform_invariance_guests to bridge RoseTree-level guests with canonical Quotient.out representatives.

theorem RootedTree.Nonplanar.insertionMultiset_eq_of_reps {α : Type u_2} (F G : Forest (Nonplanar α)) (hosts guests : List (RoseTree α)) (h_hosts : (List.map mk hosts) = F) (h_guests : (List.map mk guests) = G) :
insertionMultiset F G = Multiset.map (fun (L : List (RoseTree α)) => (List.map mk L)) (RoseTree.Pathed.insertionForest hosts guests)

Representative invariance for NIM: Nonplanar.insertionMultiset F G can be computed on ANY RoseTree-level representative lists hosts, guests whose mk-image multisets are F and G respectively — not just the canonical toList.map Quotient.out reps.

This is the workhorse for descents that need to swap canonical reps for a convenient RoseTree-level list (e.g. Q.out v :: B.toList.map Q.out standing in for (B + {v}).toList.map Q.out).

theorem RootedTree.Nonplanar.insertionMultiset_singleton_assoc {α : Type u_2} (A B : Forest (Nonplanar α)) (v : Nonplanar α) :
((insertionMultiset A B).bind fun (X : Multiset (Nonplanar α)) => insertionMultiset X {v}) = insertionMultiset A (B + {v}) + (insertionMultiset B {v}).bind fun (X' : Multiset (Nonplanar α)) => insertionMultiset A X'

Deep substrate: NIM-level singleton-guest associativity.

(NIM A B).bind (X ↦ NIM X {v}) = NIM A (B + {v}) + (NIM B {v}).bind (X' ↦ NIM A X')

Proved by descent from the raw RoseTree-level identity RoseTree.Pathed.insertionForest_bind_singleton. The descent uses the representative-invariance lemma Nonplanar.insertionMultiset_eq_of_reps per-output to swap NIM applied to a RoseTree-level output msform L for the RoseTree-level engine applied to L.

theorem RootedTree.GrossmanLarson.insertion_mul_distrib {R : Type u_1} [CommSemiring R] {α : Type u_2} (A B C : Forest (Nonplanar α)) :
(insertion (of' (A + B))) (of' C) = (Multiset.map (fun (C₁ : Forest (Nonplanar α)) => op (((insertion (of' A)) (of' C₁)).unop * ((insertion (of' B)) (of' (C - C₁))).unop)) (Multiset.powerset C)).sum

Prop 2.7.iii (Oudom-Guin 2004): for basis forests A, B, C, the multi-graft of (A · B) (disjoint-union product) into C distributes as a sum over partitions of C, with each part inserted into A vs B independently.

(A · B) ∘ C = Σ_{C₁ ⊆ C} (A ∘ C₁) · (B ∘ (C - C₁))

Proved from insertionMultiset_add_host + bilinearity of CK's disjoint-union product ·.

§3: Cocommutativity of the shuffle sum #

The sum-over-powerset is symmetric under the partition swap (C₁, C - C₁) ↔ (C - C₁, C₁), since Multiset.powerset is closed under complement. This is the "cocommutativity of Δ" component of Lemma 2.10.

theorem RootedTree.GrossmanLarson.powerset_partition_swap {α : Type u_2} {β : Type u_3} [AddCommMonoid β] (C : Forest (Nonplanar α)) (f : Forest (Nonplanar α)Forest (Nonplanar α)β) :
(Multiset.map (fun (C₁ : Forest (Nonplanar α)) => f C₁ (C - C₁)) (Multiset.powerset C)).sum = (Multiset.map (fun (C₁ : Forest (Nonplanar α)) => f (C - C₁) C₁) (Multiset.powerset C)).sum

Cocommutativity of shuffle Δ: a sum over C.powerset is invariant under the partition swap.

Specifically: Σ_{C₁ ⊆ C} f(C₁, C - C₁) = Σ_{C₁ ⊆ C} f(C - C₁, C₁) where the implicit complementation is a bijection on C.powerset.

Used in Lemma 2.10's chain to reindex one of the three triple-partition sums for B_(2) ∘ C matching.

§4: Closing mul_assoc_basis via Oudom-Guin Lemma 2.10's chain #

The 6-line algebraic chain:

(A * B) * C = (((A ∘ B_(1)) B_(2)) ∘ C_(1)) C_(2)         — def of *
            = ((A ∘ B_(1)) ∘ C_(1))(B_(2) ∘ C_(2)) C_(3)   — insertion_mul_distrib
            = (A ∘ ((B_(1) ∘ C_(1)) C_(2)))(B_(2) ∘ C_(3)) C_(4)  — insertion_assoc_shuffled
            = (A ∘ ((B_(1) ∘ C_(1)) C_(3)))(B_(2) ∘ C_(2)) C_(4)  — powerset_partition_swap (on C-trio)
            = A * ((B ∘ C_(1)) C_(2))                              — def of *
            = A * (B * C)

The trio re-indexing on C uses powerset_partition_swap to swap the "goes into B_(1)" piece of C with the "goes into B_(2)" piece, which re-pairs the four-way C-partition into the right form for the RHS.

§4a: Generalized building blocks #

The chain manipulates GL elements that are themselves sums of basis vectors (the output of insertion, a sum-over-partition, ...). To keep the chain's rewrites compositional, we lift two basis-form identities to LinearMap-general form via standard linearity arguments.

The lifts are routine ConnesKreimer.induction_linear (zero / additive / scalar-of-basis) reductions to the basis form.

theorem RootedTree.GrossmanLarson.product_of'_sum_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (X : GrossmanLarson R α) (G : Forest (Nonplanar α)) :
(product X) (of' G) = (Multiset.map (fun (G₁ : Forest (Nonplanar α)) => op (((insertion X) (of' G₁)).unop * (of' (G - G₁)).unop)) (Multiset.powerset G)).sum

Push X * of' G to the explicit powerset sum form for ANY X. Generalization of of'_mul_of' + productForest unfolding to non-basis LEFT factor.

Stated via product (the bilinear underlying map of *) to avoid Finsupp/GrossmanLarson type-alias mismatches in the induction.

theorem RootedTree.GrossmanLarson.mul_of'_sum_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (X : GrossmanLarson R α) (G : Forest (Nonplanar α)) :
X * of' G = (Multiset.map (fun (G₁ : Forest (Nonplanar α)) => op (((insertion X) (of' G₁)).unop * (of' (G - G₁)).unop)) (Multiset.powerset G)).sum

Corollary: mul_of'_sum_form (the * form, given by mul_def).

theorem RootedTree.GrossmanLarson.of'_mul_sum_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (A : Forest (Nonplanar α)) (s : Multiset (GrossmanLarson R α)) :
of' A * s.sum = (Multiset.map (fun (X : GrossmanLarson R α) => of' A * X) s).sum

LEFT-form distributivity of * over Multiset.sum: (of' A) * (Σ s) = Σ ((of' A) * s_i). The Grossman-Larson product * is bilinear (via product : GL →ₗ[R] GL →ₗ[R] GL), so pushing through Multiset.sum is straightforward — the Mul instance rewires * as product, and product (of' A) is a LinearMap.

Mirror of insertion_sum_right but for the GL product. Used in Lemma 2.10's chain to expand (of' A) * (B * C) after substituting B * C as a sum-form.

theorem RootedTree.GrossmanLarson.insertion_sum_left {R : Type u_1} [CommSemiring R] {α : Type u_2} (s : Multiset (GrossmanLarson R α)) (G : GrossmanLarson R α) :
(insertion s.sum) G = (Multiset.map (fun (X : GrossmanLarson R α) => (insertion X) G) s).sum

insertion distributes over a Multiset.sum in its first argument (since the LinearMap on the first arg pushes through Multiset.sum).

theorem RootedTree.GrossmanLarson.insertion_sum_right {R : Type u_1} [CommSemiring R] {α : Type u_2} (F : GrossmanLarson R α) (s : Multiset (GrossmanLarson R α)) :
(insertion F) s.sum = (Multiset.map (fun (Y : GrossmanLarson R α) => (insertion F) Y) s).sum

insertion distributes over a Multiset.sum in its second argument.

theorem RootedTree.GrossmanLarson.insertion_mul_distrib_gen {R : Type u_1} [CommSemiring R] {α : Type u_2} (X : GrossmanLarson R α) (Y C : Forest (Nonplanar α)) :
(insertion (op (X.unop * (of' Y).unop))) (of' C) = (Multiset.map (fun (C₁ : Forest (Nonplanar α)) => op (((insertion X) (of' C₁)).unop * ((insertion (of' Y)) (of' (C - C₁))).unop)) (Multiset.powerset C)).sum

Generalized insertion_mul_distrib: the bracketed LEFT factor of μ(X, of' Y) may be any GL element. Reduces by linearity in X to the basis case insertion_mul_distrib.

§4b: Lemma 2.10's chain — mul_assoc_basis proved #

The chain expands (of'A * of'B) * of'C step-by-step:

  1. (of'A * of'B) * of'C = productForest (of'A * of'B) C (by mul_of')
  2. of'A * of'B = productForest (of'A) B (by of'_mul_of'); expand both levels of productForest to nested sums.
  3. Apply insertion_mul_distrib_gen to split each insertion(μ(...), of'C₁) along a sub-partition C₂ ⊆ C₁.
  4. Apply insertion_assoc_shuffled (basis form is enough — the LEFT factor at this point is insertion (of' A) (of' B₁), which only becomes a sum after the assoc-rewrite of insertion_assoc_shuffled_gen, but here we're at fixed B₁ so the basis form applies).
  5. After all these rewrites, the LHS has a four-way C-partition: C₂, C₁ - C₂, C - C₁ plus another implicit B-derived split.
  6. Re-index the C-partition via powerset_partition_swap.
  7. Similarly expand the RHS, observe that after powerset_partition_swap the two expressions are syntactically the same multiset sum.

Helpers for the chain proof #

Each helper expresses one stage of the LHS or RHS expansion.

theorem RootedTree.GrossmanLarson.of'_mul_of'_nim_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (F₁ F₂ : Forest (Nonplanar α)) :
of' F₁ * of' F₂ = ((Multiset.powerset F₂).bind fun (B₁ : Multiset (Nonplanar α)) => Multiset.map (fun (X : Forest (Nonplanar α)) => of' (X + (F₂ - B₁))) (Nonplanar.insertionMultiset F₁ B₁)).sum

Basis-form rewrite: (of' F₁) * (of' F₂) as a sum of basis vectors of' (X + (F₂ - B₁)) indexed by B₁ ⊆ F₂ and X ∈ NIM F₁ B₁. Uses mul_of'_sum_form then insertion_of'_of' and of'_add to collapse to a forest sum.

theorem RootedTree.GrossmanLarson.lhs_quadruple_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (F₁ F₂ F₃ : Forest (Nonplanar α)) :
of' F₁ * of' F₂ * of' F₃ = ((Multiset.powerset F₂).bind fun (B₁ : Multiset (Nonplanar α)) => (Nonplanar.insertionMultiset F₁ B₁).bind fun (X : Multiset (Nonplanar α)) => (Multiset.powerset F₃).bind fun (C₁ : Multiset (Nonplanar α)) => C₁.powerset.bind fun (D : Multiset (Nonplanar α)) => Multiset.map (fun (p : Multiset (Nonplanar α) × Multiset (Nonplanar α)) => of' (p.1 + p.2 + (F₃ - C₁))) (Nonplanar.insertionMultiset X D ×ˢ Nonplanar.insertionMultiset (F₂ - B₁) (C₁ - D))).sum

Basis-form rewrite of LHS ((of' F₁) * of' F₂) * of' F₃ as a quadruple-bind sum. The outer two binds come from the Foissy-form expansion; the inner two come from insertionMultiset_add_host applied to NIM (X + (F₂-B₁)) C₁. Public: consumed by GrossmanLarsonMonoid.lean to identify the associativity LHS / RHS at the multiset-indexing level (R-generic).

theorem RootedTree.GrossmanLarson.rhs_quintuple_form {R : Type u_1} [CommSemiring R] {α : Type u_2} (F₁ F₂ F₃ : Forest (Nonplanar α)) :
of' F₁ * (of' F₂ * of' F₃) = ((Multiset.powerset F₃).bind fun (C₁' : Multiset (Nonplanar α)) => (Nonplanar.insertionMultiset F₂ C₁').bind fun (Z : Multiset (Nonplanar α)) => Z.powerset.bind fun (P_Z : Multiset (Nonplanar α)) => (Multiset.powerset (F₃ - C₁')).bind fun (P_F : Multiset (Nonplanar α)) => Multiset.map (fun (W : Forest (Nonplanar α)) => of' (W + (Z - P_Z + (F₃ - C₁' - P_F)))) (Nonplanar.insertionMultiset F₁ (P_Z + P_F))).sum

Basis-form rewrite of RHS (of' F₁) * ((of' F₂) * of' F₃) as a quintuple-bind sum (after applying Multiset.powerset_add to (Z + (F₃-C₁')).powerset):

Σ_{C₁' ⊆ F₃, Z ∈ NIM F₂ C₁', P_Z ⊆ Z, P_F ⊆ F₃-C₁', W ∈ NIM F₁ (P_Z+P_F)} of' (W + (Z - P_Z) + ((F₃-C₁') - P_F))

Public: consumed by GrossmanLarsonMonoid.lean, paired with lhs_quadruple_form to derive R-generic associativity.