WorksMathematics
Lemmas and Conjectures in Spectral Graph Theory
Abstract
The corpus of Elie Duhamel and Tristan Cazenave~\cite{dc} contains automatically generated conjectures relating spectral and metric invariants of connected graphs. A pipeline generated with Claude Code (numerical refutation, proof by the SMT solver \textsf{z3} from a library of lemmas, discovery of new lemmas, formalisation in \lean~4/Mathlib) refuted conjectures and proved without any unproved hypothesis, of which are verified end to end in \lean{} for every connected graph. This document collects, with proofs written for mathematicians, the most interesting lemmas that were discovered and proved, the ten most useful lemmas, the ten hardest theorems, simpler proofs of known results (Bollobás–Erdős, Yang–Lu), and the unrefuted conjectures that we find most interesting. All the proofs are gathered in an archive
Setting and notation
All graphs are simple, undirected and connected, with vertices and edges. We write for the degree of , and for the maximum and minimum degrees, for adjacency, for the distance, , for the radius and for the diameter.
is the adjacency matrix, with eigenvalues (counted with multiplicity) and rank .
is the Laplacian, with eigenvalues .
is the Randić index.
We shall freely use the following classical facts.
(F1) Rayleigh: . Courant–Fischer: for a symmetric matrix with eigenvalues , we have .
(F2) Perron–Frobenius: since is connected, is simple and has an eigenvector with all coordinates strictly positive.
(F3) Traces: , and .
(F4) Quadratic form: .
(F5) and , with equality if and only if is a tree.
(F6) Smith [8]: if is complete, then , , and ; otherwise contains an induced and, by interlacing, .
Status of the results. The label (verified in Lean) means that the statement is a Lean 4 theorem proved for every connected graph SimpleGraph (Fin n). This theorem depends only on the standard axioms (propext, Classical.choice, Quot.sound) and contains no sorry. The proofs below are mathematical transcriptions of the formal proofs.
Discovered and proved lemmas
The lemmas of this section were discovered automatically. On a database of 281,672 graphs (all connected graphs with at most 9 vertices, plus extremal families), we searched for linear inequalities between two invariants that ruled out the abstract countermodels returned by z3. They were then proved.
Laplacian and adjacency:
Theorem 1 ((verified in Lean)). For every connected graph, . Equality holds for instance for stars (, ).
Proof. If , then , and . Assume .
Case . It suffices to show . Since is connected with , it has a vertex with two neighbours . Let be the spanning graph with edges . The spectrum of is . Since and the second term is positive semidefinite, Courant–Fischer gives .
Case . Let be the Perron vector (F2) and an eigenvector of orthogonal to . Since with and , the vector takes both strictly positive and strictly negative values.
Let be a vertex where is maximal (), and . Then
Likewise, if attains the minimum of (), and , we get , hence . In particular .
The sets (where ) and (where ) are disjoint. Set
These vectors have disjoint supports, so they span a plane . For , we keep in (F4) only the edges () and (). These two families of edges are disjoint, because and . On the edge we have , hence
The Rayleigh quotient is therefore at least on . Courant–Fischer then gives . □
Remark. The proof actually establishes the stronger inequality , where are the “signed degrees” at the extremities of an eigenvector of . A quick literature search did not find the inequality . A more thorough check is needed before claiming that it is new.
Randić index and spectral radius
The following two classical results serve as tools. They were formalised, which made the corollaries almost immediate.
Theorem 2 (Favaron–Mahéo–Saclé, (verified in Lean)). .
Proof. With , we have and . Rayleigh gives . By Cauchy–Schwarz,
Theorem 3 (Hong, verified in Lean). .
Proof. Let be a unit eigenvector of and . By Cauchy–Schwarz, . Since is not its own neighbour, . Since , we get . Summing over , with :
Corollary 4 (verified in Lean). .
Proof. By Hong and : . By Theorem 2, . Divide by .
Corollary 5 (Bollobás–Erdős and upper bound, verified in Lean). .
Proof. Upper bound. By the AM–GM inequality, . Summing over the edges, each vertex appears times, so .
Lower bound. Set . Theorems 2 and 3 give . Moreover, . Hence , and we divide by .
Theorem 6 (verified in Lean). .
Proof. Write , and . By Theorem 2, it suffices to prove
because then , and we divide by .
Case 1: is not a tree. Then and . Set . By (F3), and . Cauchy–Schwarz on the eigenvalues gives
One then checks the polynomial identity
where , with and . The first two terms are nonnegative by (2) and because . It remains to see that . With , we have
The discriminant of is , so . Hence , then , which proves (1).
Case 2: is a tree, so . A tree is bipartite. Let according to the class of . If , then the vector is an eigenvector for : the spectrum is symmetric.
If , then , and are four distinct eigenvalues. By (F3), , so and . We conclude with the identity
all of whose terms are nonnegative.
If and , then and .
If and , then and are two eigenvalues, so . Thus , since .
Remark. The certificate identities were found by a sum-of-squares search and checked symbolically; they are also checked by Lean.
Distances and rank of the adjacency matrix
Lemma 7. If is an induced path of , then . If moreover , then .
Proof. Consider the submatrix of with rows and columns . Its entry is .
It equals 1 if .
It is zero if , because and are not adjacent ( and the path is induced).
The submatrix is therefore lower triangular with unit diagonal, of determinant 1, and . If , the vertices induce , whose adjacency matrix has determinant 1. An invertible principal submatrix of order 4 gives .
Corollary 8 ((verified in Lean)). , and as soon as .
Proof. A geodesic between two vertices at distance is an induced path with vertices. Apply Lemma 7.
Theorem 9 ((verified in Lean)). .
Proof. If , this is immediate since . Otherwise, we use the induced path theorem of Erdős, Saks and Sós (in F. Chung’s proof, which is also formalised): a connected graph of radius contains an induced path with at least vertices. Lemma 7 then gives .
Remark. This theorem relates a metric quantity, the radius, to a purely algebraic quantity, the rank. It is attained (zero margin) on the graph database.
The ten most useful lemmas
A proof found by the prover is a minimal (for inclusion) set of library lemmas from which the conjecture follows by nonlinear real arithmetic. We measure the usefulness of a lemma by the number of these proofs that use it, among the 117,390 conjectures proved without any unproved hypothesis. The hypothesis of the setting, which appears in 7,670 proofs, is not counted as a lemma.
| Name | Statement | Proofs | Lean | |
| 1 | rad_dia_pos | , | 40,630 | ✓ |
| 2 | rank_range | 40,451 | ✓ | |
| 3 | rad_dia | 40,124 | ✓ | |
| 4 | rank_dia | , and if | 28,147 | ✓ |
| 5 | randic_n | 24,731 | ✓ | |
| 6 | R_pos | 20,614 | ✓ | |
| 7 | yang_lu | 12,949 | ✓ | |
| 8 | rad_n | 9,545 | ||
| 9 | dia_n | 8,374 | ✓ | |
| 10 | m_bounds | 6,524 | ✓ |
Table 2.
The most used lemmas are elementary. They mostly serve to rule out degenerate cases (small graphs, zero values, signs) in inequalities whose core lies elsewhere. Among the deep lemmas, the theorem of Yang and Lu clearly dominates: it occurs in 12,949 proofs, and in the proof of 2,301 of the 2,906 theorems that require a research-level result (§ 5). Next come (Corollary 4, 550 proofs), (Theorem 6, 544), (Theorem 9, 478) and (Theorem 1, 105).
Lemma 10 (rad_dia_pos, verified in Lean). and .
Proof. Since , every vertex has another vertex , and . Hence for every .
Lemma 11 (rank_range, verified in Lean). .
Proof. The upper bound is obvious. Since is connected with , it has an edge . The principal submatrix of on is , of determinant . Hence .
Lemma 12 (rad_dia, verified in Lean). .
Proof. is a minimum and a maximum of the same eccentricities. If attains the radius, the triangle inequality gives for all .
Lemma 13 (rank_dia, verified in Lean). , and if .
Proof. This is Corollary 8.
Lemma 14 (randic_n, verified in Lean). .
Proof. This is Corollary 5. The lower bound is due to Bollobás and Erdős [4]; the shorter proof given here is discussed in § 6.
Lemma 15 (R_pos, verified in Lean). .
Proof. has at least one edge and every edge contributes .
Lemma 16 (yang_lu, Yang–Lu [6], verified in Lean). .
Proof. See § 6, which describes the formalised proof and how it differs from the one in the paper.
Lemma 17 (rad_n). .
Proof. Let be a spanning tree of ; distances in bound those of from above. Let be a longest path of and with . Let be a vertex, the first vertex of met by the path of from to , and .
If , the path has length , so and .
If , the path has length , so .
Thus .
Lemma 18 (dia_n, verified in Lean). .
Proof. A geodesic of length goes through distinct vertices.
Lemma 19 (m_bounds, verified in Lean). .
Proof. A connected graph contains a spanning tree, which has edges. A simple graph has at most edges.
Proved conjectures of the corpus
Here is a selection of conjectures of the corpus, identified by their number, that follow from the previous results.
Proposition 20. For every connected graph:
(a) #20832: , attained (verified in Lean);
(b) #20821: , attained for ;
(c) #18099: , and #764799: (verified in Lean);
(d) #127304: ;
(e) #759987: , and #760654: (verified in Lean);
(f) #1362170: , attained for and (verified in Lean).
Proof. (a) This is Theorem 1.
(b) If , Theorem 6 gives . If , the graph is complete (Smith), so and .
(c) Use Theorem 2 and .
(d) We have , so .
(e) Yang and Lu proved , which gives . With , we get . The theorem of Yang and Lu is itself formalised in Lean (Spectral.L_yang_lu, about 3,500 lines, without sorry). The formal proof keeps the minimal counterexample strategy of the paper, but replaces its second half with a different argument. A strong induction on the number of edges first shows that a non-essential vertex of a minimal counterexample has degree at least 9. It then shows that degrees grow exponentially with the distance to the set of essential vertices. Finally, a diametral geodesic is cut into pieces, each of weight at least thanks to a local version of Lemma 1 of the paper. The formalisation uncovered several gaps in the paper: a false equivalence about essential vertices (counterexample: plus a pendant vertex), an unproved diameter inequality in Corollary 4, hypotheses of Lemma 6 that are never checked, an incomplete block structure, and index errors in Claims A and B.
(f) First : if and maximises , then . Next, let be a vertex of degree , any vertex, and a geodesic. The vertices are pairwise distinct, distinct from and not adjacent to (since ). The sets , and are therefore disjoint, so . Thus , and .
Remark. (f) remained “open” for the solver only because its library did not contain the lemma . (c) and (d) were proved only after the theorem of Favaron–Mahéo–Saclé was added. This illustrates how enriching the library brings down entire families of conjectures.
The ten hardest theorems
Criterion. The internal measures of the prover (number of lemmas, computing time) mostly reflect case distinctions on small graphs. The statements that maximise these measures are nested powers such as , which often have a three-line human proof. We therefore used two more meaningful criteria.
(i) Depth: the theorem does not follow from the elementary and classical lemmas of the library alone (levels 0 to 2). We checked this by rerunning z3 without the research-level lemmas: it then finds a genuine countermodel. Among the 6,651 research-level theorems verified in Lean, 3,679 can in fact be proved without any deep result. There remain 2,906 that require one of Theorems 1, 6, 9 or the theorem of Yang and Lu.
(ii) Optimality: the inequality is attained (with equality) on at least one graph. Among the theorems that satisfy (i) and (ii), we chose the following ten, avoiding variants of the same statement. The first three are verified in Lean in abstract form: the implication from the lemmas is formal, but Smith’s fact (F6) that they use is not yet formalised. The other seven are verified end to end.
| Statement | Deep result | Equality |
| #118503 | Th. 6 | |
| #709846 | Th. 6 | |
| #2630815 | Th. 6 | |
| #721942 | Th. 1 | |
| #1935857 | Yang–Lu | |
| #1935639 | Yang–Lu | |
| #869836 | Th. 9 | |
| #1396267 | Th. 9 | |
| #1356167 | Th. 9 | |
| #1454913 | Th. 9 |
Table 1 (PDF p. 7).
In the proofs below, we write , , and .
Theorem 21 (#118503). , with equality for .
Proof. If , Theorem 6 gives . Otherwise is complete (F6), and . For : and .
Theorem 22 (#709846). , with equality for .
Proof. If (F6): equals $2-2\sqrt{2}>-1$ for and is positive for ; it is therefore at least . Otherwise , and Theorem 6 gives . With : . For : , , $t=0.
Theorem 23 (#2630815). , with equality for .
Proof. If is complete, , and . Otherwise , and , hence .
Theorem 24 (#721942, verified in Lean). , with equality for .
Proof. By Theorem 1 and : . For : and .
Theorem 25 (#1935857, (verified in Lean)). , with equality for .
Proof. By Corollary 5, ; since , we have . This settles the case . If , Yang–Lu gives . Now vanishes at and for , so .
Theorem 26 (#1935639, (verified in Lean)). , with equality for .
Proof. We have . If , Yang–Lu gives , and this quantity is if and only if . If , then , so (lemma rad_dia). Consequently , and by Yang–Lu, hence . For : , , .
Theorem 27 (#869836, (verified in Lean)). , with equality for .
Proof. If , then and . If , Theorem 9 gives , and . Hence . For : .
Theorem 28 (#1396267, (verified in Lean)). , with equality for .
Proof. Since (lemma rank_dia), we have by Theorem 9. Hence for every integer . For : .
Theorem 29 (#1356167, (verified in Lean)). , with equality for .
Proof. This reads . If , use . If , Theorem 9 gives .
Theorem 30 (#1454913, (verified in Lean)). , with equality for .
Proof. If , . If , , and it suffices that . The function is increasing on and equals at .
Remark. Once the deep results are available, these proofs are short. The difficulty lies in those results themselves: the formal proof of Yang–Lu has about 3,500 lines, and needs a two-dimensional Courant–Fischer argument. This is also why enriching the library brings down entire families of conjectures.
Simpler proofs of known results
The formalisation led us to replace some proofs from the literature with arguments that are shorter, or easier to make rigorous. We do not know whether these arguments already appear in the literature.
The lower bound of Bollobás and Erdős
Bollobás and Erdős [4] proved that for every connected graph, with equality for stars. Their proof determines the minimum by an extremal analysis. The proof of Corollary 5 uses only two classical spectral inequalities and fits in three lines.
Short proof. Set . Favaron–Mahéo–Saclé (Theorem 2) and Hong (Theorem 3) give . On the other hand, . Hence .
The equality case can be read off the proof: it requires (a tree) and , which characterises the star. This proof was not written by a human. The agent in charge of formalising the lemma reused the two theorems the library already contained, instead of following the original proof. Lemmas formalised earlier thus make later ones almost free.
The theorem of Yang and Lu
Yang and Lu [6] prove by considering a minimal counterexample. The first half of their proof (vertex deletions, “essential” vertices) is kept. The second half, which relies on Lemmas 4, 6 and 7, a block structure read off figures, and Claims A and B, is replaced with a shorter argument that needs no analysis of figures. Here are its steps; we write and .
Weak deletion (replaces Lemma 2 and its orientations). Let be a vertex, and the degrees in . If, for every neighbour of of degree ,
then . The proof is a simple term-by-term comparison, using the numerical inequality . This condition is automatically satisfied if .
Minimal counterexample. We choose a counterexample with as few edges as possible, on a fixed vertex set (a deleted vertex stays isolated, which changes neither nor ). All reductions are then spanning subgraphs, and a single induction on the number of edges suffices. We show that the essential vertices lie on a diametral geodesic , that the edges between essential vertices are bridges, that has only two components for an inner essential edge , and that the inner essential vertices have degree at least 3.
Degree of the non-essential vertices of (replaces the five cases of Lemma 3). Every non-essential vertex has degree at least 9. Indeed, a vertex of minimum degree would satisfy the weak deletion condition, thanks to three inequalities that are affine in and checked at their smallest value.
Exponential growth (replaces Claim A and its layers). By strong induction on the distance to the set of essential vertices, a vertex at distance has degree , where , and , so that .
Cutting into pieces (replaces the block structure and Claim B). The inner essential vertices cut into segments of lengths , with . To each segment we associate the set of non-essential vertices joined to it without going through an essential vertex. These sets are disjoint, and two consecutive segments are never both empty. A local version of Lemma 1 of the paper,
and step 4 give each nonempty piece a weight of at least . An elementary count concludes: , which contradicts . The formalisation also uncovered several gaps in the paper.
The equivalence claimed for essential vertices is false (counterexample: plus a pendant vertex). Only the true implication is used.
Corollary 4 assumes without justification. We use instead , which directly contradicts minimality.
The hypotheses of Lemma 6 are never checked.
The “pendant” components of are ignored by the block structure. They are handled by an additional deletion lemma.
The indices in Claims A and B are wrong, and the final inequality, “easy to check by computation”, is not proved.
The complete plan, with all the numerical inequalities, is included in the archive, in the file documents/yang_lu_plan_de_preuve.md.
The most interesting unrefuted conjectures
All the conjectures below were tested:
on all connected graphs with at most 9 vertices;
on structured families up to (complete -ary trees, hypercubes, random regular graphs, grids, spiders, dumbbells…);
on closed-form families (paths, cycles, stars, , ) up to .
Conjecture 1 and Conjecture 7 were also tested on the 11.7 million connected graphs with 10 vertices.
These tests are not superfluous. Among the 16,630 conjectures that the prover left open, 2,480 turned out to be false on large graphs. For example, (#799714) is false for the complete binary tree with 255 vertices ( whereas ).
Conjecture 1 (#643). .
For two cliques joined by an edge, (0.012 for ). The conjecture would therefore be tight. Theorems 2 and 6 are not enough: the relaxation “traces + Hong + ” has numerical countermodels (, for ). On the other hand, the conjecture holds for all bipartite graphs, in particular for trees (Theorem 31): it remains open for non-bipartite graphs. We propose two strengthenings, with no counterexample up to :
The second implication follows from Theorem 2.
Theorem 31 (verified in Lean). If is connected and bipartite (in particular if is a tree), then .
Proof. Write and .
If , Corollary 5 gives .
If , we argue as in Case 2 of Theorem 6. The spectrum of a bipartite graph is symmetric. If and are orthogonal unit eigenvectors associated with and , and is the signature of the two classes, then and are eigenvectors for and . The four vectors are orthonormal: eigenvectors of eigenvalues of opposite signs are orthogonal, and multiplication by preserves the inner product. Hence , so . Bessel’s inequality with (F3) gives . We conclude with the identity
all of whose terms are nonnegative. Hence , then by Theorem 2, and we divide by .
Conjecture 2 (#20829). .
It is asymptotically tight on paths (, ). Theorem 1 only gives .
Conjecture 3 (#501193). .
Equality holds for all complete bipartite graphs (, ). It is an elegant statement relating rank, spectral radius and Randić index. Note that is false in general (paths), so the rank is indispensable.
Conjecture 4 (#112951). .
It mixes three spectra: adjacency, Laplacian and Randić. Equality holds for .
Conjecture 5 (#239534). .
Equality holds for , and . For a tree, is twice the size of a maximum matching, and the conjecture reads .
Conjecture 6 (unproved mined lemmas). (i) . It improves Bollobás–Erdős () for dense graphs.
(ii) , with equality for stars.
(iii) , asymptotically tight on paths.
(iv) and , with equality for .
Conjecture 7 (Caporossi–Hansen form). .
Equality holds for paths of even order. Caporossi and Hansen proved it for trees. It follows from their conjecture (except for even paths) and implies Fajtlowicz’s conjecture . It was rediscovered automatically by lemma mining. It is the most important from the point of view of the literature, but also the hardest. On its own, it would unlock more than 3,000 conditional proofs of the corpus.
Archive of the proofs
All the proofs are collected in the archive: https://www.lamsade.dauphine.fr/~cazenave/papers/preuves_spectrales.zip, which contains:
index_conjectures.csv: one line per conjecture of the corpus (305,755), with its status, its statement, the lemmas of its proof, the counterexample if any and, for the 79,505 verified proofs, the corresponding Lean file and theorem;lemmes.csv: the library of lemmas, with statement, reference, Lean theorem and number of proofs that use each lemma;lean/: the complete Lean 4 project (the SpectralLean library, including the proof of Yang–Lu) and the 3,650 proof files, with a script that recompiles them all;documents/: this report and the detailed plan of the proof of Yang–Lu;prouveur/: the code of the pipeline (refutation, proof by z3, lemma mining, Lean export).
The file names and column headers of the archive are in French (LISEZMOI.md is the README). For each verified conjecture #i, the theorem gi states the inequality for every connected simple graph on Fin n. To trust it, it suffices to read the definitions of the invariants (SpectralLean/Invariants.lean) and its statement.
Summary in figures
| Conjectures in the corpus | 305,755 |
| Refuted | 162,964 |
| Proved without any unproved hypothesis | 117,390 |
| of which verified end to end in Lean | 79,505 |
| Proved under an empirical lemma or an open conjecture | 3,798 |
| Undefined on some graphs | 7,453 |
| Open and unrefuted (after tests on large graphs) | 14,150 |
Table 3.
References
- [4]B. Bollobás, P. Erdős, Graphs of extremal weights, Ars Combin. 50 (1998).
- [6]Y. Yang, L. Lu, The Randić index and the diameter of graphs, Discrete Math. 311 (2011), arXiv:1104.0426.DOI
- [8]J. H. Smith, Some properties of the spectrum of a graph, in Combinatorial Structures and their Applications, Gordon and Breach (1970).