Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4, counting part — [A0] ∂Dtr⁡(AL)[A^0]\,\partial^D\operatorname{tr}(A^L)[A0]∂Dtr(AL) equals the number of Euler tours of DDD

Proved
HararySachs.Hyper.coeff_eq_numTours

by milia · Nov 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

differential-operatoreuleriantrace

This is the counting identity at the heart of Lemma 4 of Clark and Cooper: extracting the constant term of a monomial differential operator applied to a matrix trace counts Euler tours.

Let A=(Auv)u,v∈[n]A=(A_{uv})_{u,v\in[n]}A=(Auv​)u,v∈[n]​ be a matrix of independent variables over Q\mathbb QQ, and let DDD be a directed multigraph on [n][n][n] with m(u,v)m(u,v)m(u,v) distinguishable arcs from uuu to vvv (loops allowed) and L=∑u,vm(u,v)>0L=\sum_{u,v}m(u,v)>0L=∑u,v​m(u,v)>0 arcs in total. Put

∂D=∏u,v∈[n]∂ m(u,v)∂Auv m(u,v).\partial^{D}=\prod_{u,v\in[n]}\frac{\partial^{\,m(u,v)}}{\partial A_{uv}^{\,m(u,v)}}.∂D=u,v∈[n]∏​∂Auvm(u,v)​∂m(u,v)​.

Then the constant term of ∂Dtr⁡(AL)\partial^D\operatorname{tr}(A^L)∂Dtr(AL) equals the number of Euler tours of DDD:

[A0]  ∂Dtr⁡(AL)  =  #{Euler tours of D}.[A^0]\;\partial^{D}\operatorname{tr}\bigl(A^{L}\bigr)\;=\;\#\{\text{Euler tours of }D\}.[A0]∂Dtr(AL)=#{Euler tours of D}.

An Euler tour is a closed trail that traverses every arc exactly once and has a distinguished first position. No Eulerian hypothesis is needed: when DDD is not Eulerian, both sides vanish.

Together with Euler's criterion for the existence of a tour, this gives Lemma 4. Through the BEST theorem it also gives Corollary 6, the closed form of each summand of the differential trace Tr⁡d\operatorname{Tr}_dTrd​.

Formalization Note The operator is the mission's diffMonomial m, and tr⁡(AL)\operatorname{tr}(A^L)tr(AL) is trPow n L. Euler tours are counted by numTours m hL: bijections from positions Fin L onto the labeled arcs Arcs m in which each arc's head is the next arc's tail, cyclically. The tour count ∣E(D)∣ ∣E(D)∣|E(D)|\,|\mathfrak E(D)|∣E(D)∣∣E(D)∣ in the paper's Equation (3) is this number.

Preamble
import Mathlib
import Definitions.Def_HararySachs_Hyper_Operators
Formal statement
namespace HararySachs.Hyper

theorem coeff_eq_numTours {n L : ℕ} (hL : 0 < L) (m : ArcMult n)
    (hm : (∑ u : Fin n, ∑ v : Fin n, m u v) = L) :
    MvPolynomial.coeff 0 (diffMonomial m (trPow n L)) = (numTours m hL : ℚ) := by sorry

end HararySachs.Hyper
Source
Clark and Cooper, A Harary-Sachs theorem for hypergraphs, arXiv:1812.00468v2, p. 6, proof of Lemma 4 (f̂A^α = ∏ m(i,j)!, α describes ∏ m(i,j)! Euler tours, every Euler tour described by exactly one α) and Equation (3)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me