Support forests and edge-word reflection
Abstract
Support counts and sound reflection of edge-word character moments.
Definition 1.1 (Endpoint set).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointSet (✓ std3).
Source. Repository-derived.
Commentary.
The union of the endpoint sets of the unordered edges. Loops, if supplied as raw symmetric pairs, contribute their one endpoint.
Definition 1.2 (Graph on the endpoints).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointGraph (✓ std3).
Source. Repository-derived.
Commentary.
The graph from the supplied edge set is induced on exactly its endpoints. This induction changes the vertex carrier; it does not impose ambient inducedness.
Definition 1.3 (Support-subgraph count).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.N_H (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6.1, page 5: “For a finite simple graph H without isolated vertices, let N_H(G) denote the number of edge subsets S ⊆ E(G) for which the graph with edge set S and vertex set formed by the endpoints of S is isomorphic to H. No inducedness condition is imposed on the ambient graph G.” Vertices are Fin n and Fin h; each edge subset is counted once, independently of how many isomorphisms it admits.
Definition 1.4 (Fixed points).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.c1 (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6, page 4: “If σ ∈ Sₙ, let c₁(σ) be the number of fixed points of σ and let c₂(σ) be the number of two-cycles in its cycle decomposition.” The encoding names these counts c1 and c2. The finite filter tests equality of the permutation value and its input.
Definition 1.5 (Two-cycles).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.c2 (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6, page 4: “If σ ∈ Sₙ, let c₁(σ) be the number of fixed points of σ and let c₂(σ) be the number of two-cycles in its cycle decomposition.” Mathlib’s cycleType omits fixed points and retains the other cycle lengths with multiplicity.
Definition 1.6 (The character).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.chi (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6, page 4, (6.1): chi^(n−2,2)(σ) = binom(c1(σ),2) + c2(σ) − c1(σ). Each natural count is cast to the integers; the subtraction is integer subtraction.
Definition 1.7 (Edge transposition).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.edgeSwap (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6, page 4: “Let τ_e = (ij) denote the transposition corresponding to an edge e = ij.” Sym2.lift uses Equiv.swap_comm, so the transposition is independent of endpoint order.
Definition 1.8 (Edge-word moment).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.M_r2 (✓ std3).
Citation. Boris Shapiro (2026). The (n−2,2)-Spectrum of a Graph. URL: https://arxiv.org/abs/2605.17501v2.
Commentary.
Section 6, page 4, (6.2): M_r^(2)(G) is the sum over all edge words (e₁,…,e_r) of chi(τ_e₁⋯τ_e_r). List.ofFn lists indices in increasing order and List.prod preserves the displayed multiplication order. The definition uses this right side, as the source identifies it with the trace. The extension r = 0 is included in the evaluator; the inversion statement only uses r = 2, 3, 4.
Definition 1.9 (No isolated vertices).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.noIsolated (✓ std3).
Source. Repository-derived.
Commentary.
Every vertex has an adjacent vertex; the empty vertex carrier satisfies this condition.
Definition 1.10 (Points in two-cycles).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.twoPoints (✓ std3).
Source. Repository-derived.
Commentary.
A point lies in the support of the permutation but not in the support of its square precisely when its orbit has length two.
Theorem 1.11 (Counting points in two-cycles).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.twoPoints_card (✓ std3). ∎
Source. Repository-derived.
Commentary.
Cycle induction separates a cycle of length two from every other nontrivial cycle. Disjoint products give disjoint unions of these point sets and additive cycle multiplicities.
Theorem 1.12 (Enumerating support counts).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.N_H_of_enumeration (✓ std3). ∎
Source. Repository-derived.
Commentary.
An injective enumeration of all r-edge subsets rewrites the support count as a sum of isomorphism indicators, provided H has r edges.
Theorem 1.13 (Matched support enumerations).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.counts_eq_of_iso_enumerations (✓ std3). ∎
Source. Repository-derived.
Commentary.
Two injective exhaustive enumerations paired by endpoint-graph isomorphisms give equal counts for every r-edge model H.
Definition 1.14 (Radix digit).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.digit (✓ std3).
Source. Repository-derived.
Commentary.
Nat.div is integer quotient and Nat.mod is the remainder, including Lean’s total conventions at base zero.
Definition 1.15 (Packing radix digits).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.pack (✓ std3).
Source. Repository-derived.
Commentary.
Nat.ofDigits reads the finite digit list in little-endian order.
Theorem 1.16 (Decoding a bounded digit).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.digit_pack (✓ std3). ∎
Source. Repository-derived.
Commentary.
For positive base and digits below the base, integer quotient and remainder recover each digit at an index below the packed length.
Definition 1.17 (Endpoint isomorphism from relabelling).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointIso_image (✓ std3).
Source. Repository-derived.
Commentary.
The image hypothesis transports endpoint membership. The isomorphism sends each endpoint vertex v to q(v), using q.subtypeEquiv; its adjacency proof is the membership transport for unordered pairs.
Definition 1.18 (Counting a Boolean predicate).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.countNat (✓ std3).
Source. Repository-derived.
Commentary.
Filter the natural numbers below n, then take the list length.
Definition 1.19 (Character on a natural-number action).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.natChi (✓ std3).
Source. Repository-derived.
Commentary.
The displayed expression is the literal body of natChi. The two local counts test fixed points and nonfixed points fixed by the square. Dividing the latter by two uses Nat.div; both counts and the quotient are cast to integers.
Definition 1.20 (Word action on natural numbers).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.natProd (✓ std3).
Source. Repository-derived.
Commentary.
The list head acts after the tail, matching multiplication of permutations.
Definition 1.21 (Recursive edge-word evaluator).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment (✓ std3).
Source. Repository-derived.
Commentary.
At depth zero evaluate the accumulated word. At positive depth append each edge once and sum the recursive values. Repeated edges and all edge orders are included.
Theorem 1.22 (Sum over a function by its first value).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.sum_fin_cons (✓ std3). ∎
Source. Repository-derived.
Commentary.
The equivalence Fin.consEquiv decomposes a function on Fin(m + 1) into its first value and its restriction to the remaining m coordinates. Summation over this product gives the two nested sums.
Theorem 1.23 (Soundness of the evaluator).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment_sound (✓ std3). ∎
Source. Repository-derived.
Commentary.
Induction on the remaining word length identifies the recursive sum with the sum over functions Fin r → Fin m. Natural-number actions agree with the corresponding permutations on Fin n, including repeated or equal endpoints.
Theorem 1.24 (Two-prefix decomposition).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment_two_fin (✓ std3). ∎
Source. Repository-derived.
Commentary.
Two applications of the evaluator recursion expose the first two edge choices as finite sums, leaving the remaining r choices recursive.
Definition 1.25 (Moment indexed by an edge enumeration).
Formalization. D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.wordMoment (✓ std3).
Source. Repository-derived.
Commentary.
The index function chooses unordered edges; the list of their transpositions has length r and is multiplied in increasing index order.
Theorem 1.26 (Reindexing graph edge words).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.moment_reindex (✓ std3). ∎
Source. Repository-derived.
Commentary.
An injective exhaustive edge enumeration supplies an equivalence with the graph’s edge subtype. The induced equivalence on word functions reindexes the finite sum.
References
- Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.M_r2 - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.N_H - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.N_H_of_enumeration - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.c1 - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.c2 - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.chi - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.countNat - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.counts_eq_of_iso_enumerations - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.digit - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.digit_pack - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.edgeSwap - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointGraph - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointIso_image - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.endpointSet - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment_sound - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.evalMoment_two_fin - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.moment_reindex - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.natChi - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.natProd - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.noIsolated - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.pack - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.sum_fin_cons - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.twoPoints - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.twoPoints_card - Truth anchor:
D5/S3/Combinatorics/Graph/SupportForestMoments/SupportAndEdgeWordReflection.wordMoment