AGNT Labs

A Proof of Graffiti 295:
Positive Distance Eigenvalues and Mean Gravity

Nathan Wilbanks and Annie
AGNT Labs
Research Report ·
Abstract

We prove Graffiti 295: for every connected simple graph \(G\) of order \(n\) and girth at least five, the number \(n_+(D)\) of positive eigenvalues of the distance matrix, counted with multiplicity, satisfies \[ n_+(D)\;\le\;\frac{n}{\overline{\operatorname{Gr}}}, \] where \(\overline{\operatorname{Gr}}\) is the mean of the gravity matrix. The source does not define the mean of a matrix; the result holds for the mean over all \(n^2\) entries and for the mean over the \(n(n-1)\) off-diagonal entries. The proof is short: for girth at least five both means are at most \(1\), so \(n/\overline{\operatorname{Gr}}\ge n\), and an \(n\times n\) matrix has at most \(n\) eigenvalues. It is machine-checked in Lean 4 with Mathlib, using only Lean's standard axioms, and an exact battery finds no violation on 346 graphs. Novelty is stated provisionally.

Status. The proof is complete and machine-checked in Lean 4 (§4), under the gravity matrix of Written on the Wall (p. 52). The conjecture was listed open by Roucairol–Cazenave (arXiv:2409.18626, September 2024). It has not yet received external peer review. A formal proof shows that the argument is correct for the stated definitions; it does not settle the intended reading of the original statement or priority. Historical priority is not claimed; see §6.

1. The conjecture

Let \(G\) be a connected simple graph on \(n\) vertices with \(m\) edges. Its distance matrix \(D\) has entry \(d(u,v)\), the graph distance. Its gravity matrix (Written on the Wall, p. 52) is

$$\operatorname{Gr}_{uv}=\begin{cases}0,&u=v,\\[3pt]\dfrac{d(u)\,d(v)}{(n-1)\,d(u,v)},&u\ne v,\end{cases}$$

where \(d(u)\) is degree. Graffiti 295 (page 80 of Fajtlowicz's Written on the Wall) reads: "If girth is ≥ 5 then the number of positive eigenvalues of the distance matrix ≤ n / meangravity." Conjectures that involve distance are for connected graphs (p. 2). We write \(n_+(D)\) for the number of positive eigenvalues of \(D\), counted with multiplicity. As of September 2024 the conjecture was listed open in Table 1 of Roucairol–Cazenave, after their search algorithms found no counterexample.

2. The proof

Lemma 1 (mean gravity). If \(G\) has \(n\ge2\) vertices and girth at least five, then \[ \sum_{u,v}\operatorname{Gr}_{uv}\le\frac{(2m)^2}{n},\qquad \overline{\operatorname{Gr}}_{n^2}\le\frac{n-1}{n},\qquad \overline{\operatorname{Gr}}_{n(n-1)}\le 1. \]

Proof. This is §2.5 of the Graffiti 290 paper. Girth at least five gives \(\sum_v d(v)^2\le n(n-1)\), so \((2m)^2\le n\sum_v d(v)^2\le n^2(n-1)\) by Cauchy–Schwarz. Since \(d(u,v)\ge1\) off the diagonal, \(\sum\operatorname{Gr}\le\bigl((2m)^2-\sum_v d(v)^2\bigr)/(n-1)\le(2m)^2/n\). Divide by \(n^2\) or by \(n(n-1)\). ∎

Theorem. Graffiti 295 is true, for both readings of the mean.

Proof. The characteristic polynomial of \(D\) has degree \(n\), so \(D\) has at most \(n\) eigenvalues and \(n_+(D)\le n\). If \(G\) has an edge, then \(n\ge2\) and the mean gravity is positive, and by Lemma 1 it is at most \(1\). So \(n\le n/\overline{\operatorname{Gr}}\) and \(n_+(D)\le n/\overline{\operatorname{Gr}}\). If \(G\) has no edge, then every distance is \(0\) in Mathlib's convention for vertices that no path joins, so \(D=0\) and \(n_+(D)=0\). This case does not arise for a connected graph with \(n\ge2\); it is covered only because the proof does not use connectivity. ∎

Remark (a margin of more than 2). For connected \(G\) with \(n\ge2\), \(D\) is a nonzero symmetric matrix with trace \(0\), so it has a negative eigenvalue and \(n_+(D)\le n-1\). With \(\overline{\operatorname{Gr}}_{n^2}\le(n-1)/n\) this gives \(n/\overline{\operatorname{Gr}}-n_+(D)\ge n^2/(n-1)-(n-1)=(2n-1)/(n-1)>2\). This remark is not part of the Lean development.

Attribution. The bound \(\overline{\operatorname{Gr}}\le1\) for girth at least five rests on the counting argument that the Graffiti 292 paper credits to Spanky McDoob, extended in the Graffiti 290 paper to the off-diagonal mean. Graffiti 295 is a direct consequence.

3. Why an earlier attack stalled

Our first attack on 295 (July 23, 2026; output) bounded the right side with Reiman's edge cap, which gives only \(n/\overline{\operatorname{Gr}}\gtrsim n-O(\sqrt n)\). It bounded the left side by \(n_+(D)\le n-\operatorname{diam}(G)\), using a geodesic path, the Graham–Pollak spectrum of a path's distance matrix, and Cauchy interlacing. The two bounds met only for large diameter and for diameter \(2\), and left a gap at intermediate diameter. Subtracting the diagonal in Lemma 1 raises the right side to at least \(n^2/(n-1)>n\), so no bound on the left side beyond \(n_+(D)\le n\) is needed.

4. A machine-checked proof in Lean 4

We formalized the theorem in Lean 4 with Mathlib. Lean's kernel checks every inference. The source is on GitHub at agnt-gg/graffiti-lean (commit daf0f85) and in the archive.

Degree, distance and girth are Mathlib's SimpleGraph.degree, SimpleGraph.dist and SimpleGraph.egirth. The gravity matrix is defined as in the Graffiti 290 paper. As in SimpleGraph.cvetkovic of formal-conjectures, positive eigenvalues are counted with multiplicity as positive roots of the characteristic polynomial. The main statement reads:

noncomputable def distanceMatrix (G : SimpleGraph α) : Matrix α α ℝ :=
  Matrix.of fun u v => (G.dist u v : ℝ)

theorem graffiti_295 {α : Type*} [Fintype α] [DecidableEq α] (G : SimpleGraph α)
    [DecidableRel G.Adj] (hconn : G.Connected) (hgirth : 5 ≤ G.egirth) :
    (G.distanceMatrix.charpoly.roots.countP (fun x => 0 < x) : ℝ) ≤
      Fintype.card α / G.meanGravity
Table 1. Theorems proved in Lean.
TheoremStatement
graffiti_295Graffiti 295, with the mean over all \(n^2\) entries of the gravity matrix.
graffiti_295.variants.off_diagonal_meanGraffiti 295, with the mean over the \(n(n-1)\) off-diagonal entries.

Fidelity to the source.

What was checked.

As with any Mathlib proof, this check trusts the Lean kernel and the Mathlib definitions above. Mathlib's prebuilt library files were loaded, not rebuilt from source.

5. Verification

Battery 1 (battery_295.py) computes the gravity sums in exact rational arithmetic and the distance spectra numerically, on 346 connected graphs of girth at least five: 12 named graphs, all 34 with \(n\le7\), and 300 random ones. It finds no violation for either reading of the mean. Battery 2 is the Lean kernel (§4). The positive-eigenvalue counts in Table 2 agree with those of the July attack.

Table 2. Positive distance eigenvalues against \(n/\overline{\operatorname{Gr}}\) for named graphs.
Graphn\(n_+(D)\)\(n/\overline{\operatorname{Gr}}_{n^2}\)\(n/\overline{\operatorname{Gr}}_{n(n-1)}\)
C₅518.3336.667
Petersen10116.66715.000
Heawood14738.60635.848
Hoffman-Singleton502289.28687.500
McGee249140.190134.349
Tutte-Coxeter3012241.667233.611
Pappus18572.00068.000
Desargues20194.35189.634
Dodecahedral20194.35189.634
P₁₀10168.22961.406
K₁,₈9137.38533.231
K₂214.0002.000

6. Novelty status — stated provisionally

Priority. On October 7, 2026 we found no resolution of Graffiti 295 in Google DeepMind's formal-conjectures repository (issues and pull requests), in a GitHub search, or in a web search; the only public record is the source itself and the 2024 open-status table. The proof is short and rests on the mean-gravity bound developed for Graffiti 290 and 292. We report a complete, machine-checked proof that appears to be the first publicly documented one under the Written on the Wall gravity matrix; we do not claim historical priority. Expert review of statement fidelity, the convention for the mean, and prior art is invited.

7. Reproduction protocol

python -m pip install networkx numpy
python battery_295.py                 # 346 graphs, exact rational gravity

# Lean (§4): in the lean/ folder of the archive, or a clone of agnt-gg/graffiti-lean
lake exe cache get                    # prebuilt Mathlib
lake build                            # checks the proofs and prints their axioms

Dependencies: Python 3.13, NetworkX 3.5, NumPy 2.3; Lean v4.33.1 and Mathlib v4.33.1, both pinned in the Lean files.

8. Artifact ledger

ArtifactPurpose
agnt-gg/graffiti-lean · archived copyLean 4 proof, with the shared definitions and lemmas
battery_295.py · outputExact battery on 346 graphs
claim-ledger.jsonClaim-by-claim evidence map
wow-p80-top.pngPrimary source scan of page 80 (conjectures 292 and 295)
SHA256SUMS.txtIntegrity ledger

Principal hash: lean/Graffiti/Graffiti295.lean 6cebb609bb57b7ded54e18adc96eea8651837267e5ef881a4138914951ac149e.

References

  1. S. Fajtlowicz, "Written on the Wall," July 2004, p. 80 (conjecture 295); p. 52 (gravity matrix definition); p. 2 (connected graphs).
  2. M. Roucairol and T. Cazenave, "Refutation of Spectral Graph Theory Conjectures with Search Algorithms," arXiv:2409.18626, 2024 (Table 1, open status; §5.2, the gravity matrix of Written on the Wall).
  3. T. L. Brewster, M. J. Dinneen, and V. Faber, "A computational attack on the conjectures of Graffiti: new counterexamples and proofs," Discrete Mathematics 147 (1995), 35–55.
  4. R. L. Graham and H. O. Pollak, "On the addressing problem for loop switching," Bell System Technical Journal 50 (1971), 2495–2519.
  5. AGNT Labs, "A Proof of Graffiti 290" and "A Proof of Graffiti 292," 2026, 290, 292.
  6. N. Wilbanks and Annie, "graffiti-lean: Lean 4 proofs of Graffiti conjectures 290, 292 and 295," GitHub, 2026, agnt-gg/graffiti-lean, commit daf0f85.
  7. L. de Moura and S. Ullrich, "The Lean 4 Theorem Prover and Programming Language," Automated Deduction – CADE 28, LNCS 12699 (2021), 625–635.
  8. The mathlib Community, "The Lean Mathematical Library," Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2020), 367–381.
Bottom line. Graffiti 295 is proved for every connected simple graph of girth at least five, for both readings of the mean gravity. The proof is two lines once the mean gravity is known to be at most \(1\), and it is machine-checked in Lean 4 with Lean's standard axioms only. An exact battery on 346 graphs finds no violation. Novelty is reported provisionally; priority is not claimed.

This is what the product is for

AGNT Labs publishes its working out. The same discipline runs through the product: every agent run produces a receipt showing what it did, what it read, and why — so a result can be checked rather than trusted. AGNT runs on your own machine and is free to use.

The AGNT briefing

Stay in the loop.

New agents, workflows and field notes. Sign up for AGNT updates.

By subscribing, you agree to receive AGNT updates. Unsubscribe any time. Privacy policy.