Published June 5, 2026 | Version v1

Unfolding a Graph into a Tree: A Machine-Checked Proof of the Heilmann-Lieb Theorem in Lean 4 (Part II)

Authors/Creators

  • 1. Independent researcher

Description

A machine-checked formalization, in Lean 4 / Mathlib, of the Heilmann-Lieb theorem: the matching polynomial mu_G of every finite graph is real-rooted, and for maximum degree Delta >= 2 all its roots lie in the Ramanujan band [-2 sqrt(Delta-1), 2 sqrt(Delta-1)]. The proof follows Godsil's path tree: unfold G into the tree T(G,u) of its paths (where the matching polynomial equals a characteristic polynomial) and transport back along the divisibility mu_G | mu_{T(G,u)}; the root bound is proved from scratch by a weighted Gershgorin / Collatz-Wielandt argument reduced to two facts about distances in a tree. All headline theorems are sorry-free (axioms: propext, Classical.choice, Quot.sound). It formalizes classical mathematics and claims no new theorem; the novelty is the formalization, supported by a search of the Lean/Mathlib, Isabelle/AFP and Coq/mathcomp ecosystems.  Lean sources: github.com/karlesmarin/godsil-gutman-lean. English and Spanish editions are included, with the full Lean 4 sources.

Notes

This is Part II, and a direct continuation of Part I -- 'Random Signs into Matchings: A Godsil-Gutman Identity, Formalized in Lean 4' (doi 10.5281/zenodo.20517350). Part I formalized the matching polynomial and the Godsil-Gutman identity, and proposed, as its explicit 'next stone', proving the Heilmann-Lieb theorem through Godsil's path tree rather than through interlacing-family machinery. Part II carries out exactly that proposal: it builds the path tree, proves the divisibility mu_G | mu_{T(G,u)} and the forest identity, and proves the Ramanujan bound -- completing the path-tree route that Part I had mapped but not formalized. Part II thus continues and completes Part I.

Files

heilmann-lieb-lean.pdf

Files (4.0 MB)

Name Size Download all
md5:ff4245ac7a5aaac4d5def823c91661eb
550.6 kB Preview Download
md5:19fd439f8ca21a3b2baddda978e9af10
2.9 MB Preview Download
md5:b8a56f65dd35141404f37bb8dbe6016f
522.8 kB Preview Download

Additional details

Related works

Continues
10.5281/zenodo.20517350 (DOI)
Is continued by
10.5281/zenodo.20600326 (DOI)