Tree-like walk counts and matching power sums #
Godsil's moment theorem states that the power sums p_k = ∑ᵢ θᵢᵏ of the roots of the matching
polynomial count the closed tree-like walks of length k. This file defines both sides and the
gap tr(Aᵏ) - #(closed tree-like walks), and proves that below the girth every closed walk is
tree-like, so the gap vanishes there.
Main definitions #
SimpleGraph.treeLikeWalkCount G k: the number of closed tree-like walks of lengthk.SimpleGraph.matchingPowerSum G k:∑ θᵏover the complex rootsθofμ(G).SimpleGraph.treeLikeGap G k:tr(Aᵏ) - treeLikeWalkCount G k.
Main results #
SimpleGraph.Walk.isTreeLike_of_length_lt_egirth: closed walks shorter than the girth are tree-like.SimpleGraph.treeLikeWalkCount_eq_trace_of_lt_egirth,SimpleGraph.treeLikeGap_eq_zero_of_lt_egirth.SimpleGraph.treeLikeGap_eq_card_not_treeLike: the gap counts the closed walks that are not tree-like.
References #
- C. D. Godsil, Matchings and walks in graphs, J. Graph Theory 5 (1981) 285–297.
The tree-like predicate Walk.IsTreeLike (path-tree-faithful: a closed walk lifts to a
closed walk at the root of Godsil's path tree T(G,v)) is defined in PathTreeLift, with
its Decidable instance, nil_isTreeLike, and isTreeLike_of_acyclic (acyclic edge-support ⇒
tree-like). Below the girth that hypothesis always holds (acyclic_of_length_lt_egirth, below), so
the two notions coincide there; the path-tree definition is the one matching the matching power sums
p_k for all k (e.g. K4, k = 6 → 324, where the bare acyclic-support count gives 276).
The edges of a walk in the coerced support w.toSubgraph.coe, pushed into G, all lie among
the edges of w itself: the mapped walk's support is contained in w.toSubgraph.
Girth threshold (acyclic form). A closed walk strictly shorter than the (extended) girth has
acyclic edge-support: any cycle in its support lifts to a cycle of G no longer than the walk,
contradicting the girth bound. (For an acyclic G, egirth = ⊤, so this holds for every closed
walk.)
Girth threshold. A closed walk strictly shorter than the (extended) girth is tree-like:
below the girth the edge-support is acyclic (acyclic_of_length_lt_egirth), and an acyclic support
lifts to the path tree (isTreeLike_of_acyclic, PathTreeLift).
Below the girth: tree-like walks are all closed walks (tr(Aᵏ) counts them) #
Below the (extended) girth, every closed walk of length k is tree-like, so filtering the
closed walks of length k by IsTreeLike keeps all of them.
Below the girth, tr(Aᵏ) counts closed tree-like walks. Combining piece 1 of the trace
formula (trace_adjMatrix_pow, tr(Aᵏ) = #closed walks) with the girth threshold: for k < girth, every closed walk is tree-like, so tr(Aᵏ) = Σ_v #{closed tree-like walks of length k at v}. This is the gap_k = 0 half of the matching↔Ihara main (tr(Aᵏ) = p_k below girth, once
Godsil's p_k = #tree-like walks lands).
The matching side: Godsil's tree-like walk count #
Godsil's moment theorem (proved in MomentAssembly) reads
p_k = Σᵢ θᵢᵏ = treeLikeWalkCount G k,
where θᵢ are the roots of matchingPoly G and treeLikeWalkCount is defined below.
Godsil's tree-like walk count Σ_v #{closed tree-like walks of length k at v} — the
matching side of the trace-formula bridge.
Equations
- SimpleGraph.treeLikeWalkCount k = ∑ v : V, {w ∈ G.finsetWalkLength k v v | w.IsTreeLike}.card
Instances For
Trace link (below girth). For k < girth, treeLikeWalkCount G k = tr(Aᵏ), since below
the girth every closed walk is tree-like. The proved half of the bridge: combined with Godsil's
(open) p_k = treeLikeWalkCount, it yields p_k = tr(Aᵏ) below the girth.
k = 0 moment anchor: treeLikeWalkCount G 0 = n. The only closed walk of length 0 at
each vertex is nil (tree-like), so the count is 1 per vertex. This is the matching-side mirror
of the trivial power sum p_0 = Σᵢ θᵢ⁰ = n (μ has n roots).
The matching-side power sums p_k (the other half of the bridge) #
Matching-side power sum p_k = Σᵢ θᵢᵏ over the (complex) roots of the matching polynomial.
Godsil's moment theorem is the (open) bridge matchingPowerSum G k = treeLikeWalkCount G k.
Equations
- SimpleGraph.matchingPowerSum k = (Multiset.map (fun (x : ℂ) => x ^ k) (Polynomial.map (algebraMap ℝ ℂ) G.matchingPoly).roots).sum
Instances For
k = 0 anchor: matchingPowerSum G 0 = n. The matching polynomial is monic of degree
n = card V, so over the algebraically closed ℂ it splits into exactly n linear factors, i.e.
its multiset of roots has cardinality n; each root contributes θ⁰ = 1 to the power sum. Together
with treeLikeWalkCount_zero this confirms Godsil's bridge matchingPowerSum = treeLikeWalkCount at
k = 0 on both sides.
The trace-formula gap #
treeLikeGap G k := tr(Aᵏ) − treeLikeWalkCount G k counts the closed walks of length k that are
not tree-like — those whose edge-support encloses a cycle. It vanishes below the girth
(treeLikeGap_eq_zero_of_lt_egirth, proved here). At k = girth it takes the value
treeLikeGap G g = 2·g·c_g, c_g = number of cycles of length g = girth,
since the only closed walks of length g enclosing a cycle are the single traversals of a
shortest cycle (2g per cycle: g starting points × 2 orientations).
Trace-formula gap tr(Aᵏ) − treeLikeWalkCount G k: the count of closed length-k walks
that are not tree-like (they enclose a cycle).
Equations
- SimpleGraph.treeLikeGap k = ↑(SimpleGraph.adjMatrix ℕ G ^ k).trace - ↑(SimpleGraph.treeLikeWalkCount k)
Instances For
The gap vanishes below the girth. Every closed walk shorter than the girth is tree-like,
so tr(Aᵏ) = treeLikeWalkCount G k there. The first nonzero gap appears exactly at k = girth
(value 2·girth·c_g, classical, not yet formalized).
The gap counts the non-tree-like closed walks (bijection, piece 1): treeLikeGap G k = Σ_v #{closed length-k walks at v that are not tree-like}. Immediate from tr(Aᵏ) = Σ_v #(all)
and treeLikeWalkCount = Σ_v #(tree-like), since all = tree-like ⊔ not-tree-like.