26 November 2026 · RS9 Systems Research Explainer
Machine-Checked Spectral Gaps and the Haldane Phase in Lean 4
No calculus required. How a snowballing doubling trick — verified step by step inside a strict computer proof referee called Lean 4 — proves that an arbitrarily long ring of tiny magnets keeps a permanent energy cliff above its lowest state.
Using exponentials, logarithms, matrix eigenvalues, and coupled doubling inequalities — formalized in Lean 4 — we verify uniform spectral gaps for infinite families of quantum spin rings, including the anisotropic spin-1 Haldane chain at $D = 1/4$ and an unconditional 2D coupling-rectangle Ising theorem.
A Lean 4 formalization of the finite-temperature purity bootstrap across 25 modules and 1,509 theorem constants: an unconditional 2D coupling-rectangle multiplet theorem for the interacting transverse-field Ising ring (even $\ell \ge 64$), together with a finite-$M$ no-collision equivariant transfer limit eliminating all abstract transfer-operator and signed-sector-moment hypotheses for both $D = 1/4$ ($L \ge 896$) and $D = 0$ ($L \ge 2304$) spin-1 rings.
Published by RS9 Systems (rs9.com.au, [email protected]). Formalizes and extends the finite-temperature purity bootstrap introduced in OpenAI's September 24, 2026 periodic spin-1 Haldane gap preprint and Tarun Grover (arXiv:2611.07400). Built in Lean v4.36.0 / Mathlib v4.36.0.
The spin-1 ring Hamiltonian
A spin-1 ring is a circular bracelet of tiny atomic magnets. Each magnet has 3 basic settings: pointing Up (+1), lying Sideways (0), or pointing Down (−1).
Two local rules determine the bracelet's energy score:
- Neighbor rule (antiferromagnetic coupling): Adjacent magnets prefer pointing in opposite directions. Matching neighbors add +1 energy; opposite neighbors subtract −1 energy.
- Tilt rule (single-ion anisotropy $D = 0.25$): Standing straight Up or Down costs a small +0.25 penalty per magnet; lying Sideways costs 0.
In quantum mechanics, the ring can also exist in combinations (superpositions) of these arrangements, which allows neighboring magnets to share entangled pairs and reach an even lower energy than any single classical snapshot.
A spin-1 antiferromagnetic ring of length $L$ consists of $L$ three-level quantum systems arranged on a circle with periodic boundary conditions. Each site carries three $3 \times 3$ spin operators $(S_j^x, S_j^y, S_j^z)$, where $S_j^z$ has eigenvalues $+1, 0, -1$.
Here $H_L(D)$ is a $3^L \times 3^L$ Hermitian matrix whose eigenvalues $E_0(L) \le E_1(L) \le \dots \le E_{3^L-1}(L)$ are the allowed energy levels of the ring. The interactive bracelet below displays the diagonal $S^z$ contribution so you can inspect the trade-off between antiferromagnetic neighbor bonds and the single-ion tilt term $D(S_j^z)^2$.
In Spin1Hamiltonian.lean, we construct the concrete $3^n \times 3^n$ real symmetric twisted ring Hamiltonian directly in the Cartesian basis $\mathbb{R}^3$ using skew-symmetric generators $(G_\alpha)_{ij} = \varepsilon_{\alpha ij}$ and $\mathrm{SzSq\_mat} = \operatorname{diag}(1,1,0)$. We prove explicitly in Lean 4 that the $3 \times 3$ unitary $U_{\mathrm{cart}\to sz}$ satisfies $U(-i G_\alpha)U^\dagger = S^\alpha$ and $U\,\mathrm{SzSq\_mat}\,U^\dagger = (S^z)^2$ in the weight basis $(+1, 0, -1)$; tensoring across $n$ sites yields exact many-body unitary equivalence.
Working in the real Cartesian basis avoids complex arithmetic in the finite-$M$ transfer matrix and allows exact $O(2)/SO(3)$ equivariance (including the real orthogonal conjugacy $R_z(\pi/4)$ pairing the $D_4$ sectors $B_1 \cong B_2$).
12-Site Energy & Seam Readout
Spin1Hamiltonian.lean, the wrap-around bond $(n-1, 0)$ rotates site $0$ by $g \in \{I, R_z(\pi), R_x(\pi), R_z(\pi/2)\}$. At $D = 1/4$, our 160-bit Arb verification of the $\chi = 32$ periodic MPS witness encloses the $L = 112$ trial energy per site in $[-1.242820131121, -1.242820131120] < -1.242818$.Uniform spectral gaps above the ground state
Picture every allowed energy of the magnet ring as a horizontal ledge inside a deep canyon. When the ring is cooled close to absolute zero, it settles onto the very bottom ledge (the ground state).
The vertical distance from that bottom ledge to the second-lowest ledge is the spectral gap. In 1983, Duncan Haldane predicted a striking difference between half-integer and integer spin rings: for isotropic antiferromagnetic spin-1/2 Heisenberg rings, making the ring longer shrinks that cliff toward zero (gapless), whereas for spin-1 rings the cliff stays strictly above a fixed floor no matter how large you make the ring (gapped).
Let $E_0(L) \le E_1(L) \le \dots \le E_{3^L-1}(L)$ denote the sorted eigenvalues of $H_L(D)$. The finite-size spectral gap is $\gamma_L = E_1(L) - E_0(L)$. A model has a uniform spectral gap if there exists a strictly positive constant $\gamma > 0$, independent of $L$, such that
At $D = 1/4$ (Candidate A), our Lean 4 proof establishes uniqueness of $E_0(L)$ and $\gamma_L > \ln(20)/368 \approx 0.00814058$ for every finite even $L \ge 896$. At $D = 0$ (OpenAI Source 1), it proves $\gamma_L > \ln(20)/784$ for every finite even $L \ge 2304$.
We state both spin-1 gap theorems directly on the characteristic polynomial root multiset of the concrete $3^L \times 3^L$ real symmetric matrix $H_{\mathrm{spin1}}(L, D, I)$ via charpoly_roots_eq_eigenvalues. Specifically, for every finite even $L \ge 896$ ($D = 1/4$), candidate_a_physical_spin1_charpoly_gap_896 constructs $E_0 \in \mathbb{R}$ and a multiset $\mathrm{rest}$ satisfying:
Protected for every finite even ring L ≥ 896
Why direct diagonalization fails past ~20 sites
Every time you add one magnet with 3 settings, the number of basis configurations multiplies by 3. At 14 magnets there are 4.78 million configurations — fast on a single GPU. By 168 magnets there are already more configurations than atoms in the observable universe ($\approx 10^{80}$). At $L = 896$, where our proof starts, there are $3^{896} \approx 10^{427}$ configurations.
The Hilbert space of an $L$-site spin-1 ring is $(\mathbb{C}^3)^{\otimes L}$ with dimension $3^L$. Exact Lanczos or Chebyshev traces at $L = 14$ operate on vectors of length $3^{14} = 4,782,969$, which fit comfortably in GPU memory. Because $3^L$ grows exponentially with $L$, direct enumeration becomes infeasible long before $L = 30$, let alone for the infinite family of all even $L \ge 896$.
Our Candidate A thermal trace engine computes exact 128-bit integer Chebyshev recurrences (with 256-bit accumulation and zero truncated states) up to $n = 14$ ($\dim = 3^{14} = 4,782,969$, partitioned by $U(1)$ magnetization sectors for seams $I, R_z, R_4$ and $R_x$-paired blocks). Beyond $n \approx 18$, dense state-vector storage exceeds workstation RAM; bridging from $n \le 14$ to all finite even $L \ge 896$ requires the finite-temperature purity bootstrap.
The finite-temperature purity bootstrap
Instead of finding every energy ledge, the purity bootstrap (introduced by OpenAI and extended by Grover) tracks a single clone-match score called purity: draw two independent random snapshots from a cold ring — what is the chance both snapshots land on the exact same energy ledge?
- If two ledges tie at the bottom, two random draws match at most 50% of the time.
- If purity clears 99% (less than
1/100mismatch) for both our spatial-doubling check and our coldness-doubling check at the same scale, a short algebraic theorem forces a unique bottom ledge AND locks in a permanent gap for every larger even ring.
Starting from 88 exact measurements on tiny rings ($L = 4$ to $14$) plus one trial guess at $L = 112$, four alternating doubling rounds snowball purity past 99% at $L = 896$.
Let $Z(L, b) = \operatorname{Tr}(e^{-b(H_L + a L I)}) = \sum_k e^{-b(E_k + a L)}$ be the shifted Gibbs partition function at inverse temperature $b > 0$. Define the spatial purity and thermal purity ratios:
Because both spatial and thermal transfer sums obey quadratic contraction under doubling ($1 - P_{\text{new}} \le \text{purityUpdate}(1 - P_{\text{old}})$), once both seeds $S(n_0, b_0) \ge 1 - u_0$ and $T(2n_0, b_0) \ge 1 - u_0$ satisfy the bootstrap threshold (for Candidate A: $n_0 = 896$, $b_0 = 368$, $u_0 = 1/100$, $C = 5$), coupled doubling propagates to all dyadic scales and interpolates to every finite even ring $L \ge n_0$, yielding $\gamma_L > \ln(1/(C u_0))/b_0 = \ln(20)/368$.
In OneD.lean and CandidateA/Certificate.lean, the gap deduction requires two coupled seeds $1 - S(n_0, b_0) \le u_0$ and $1 - T(2n_0, b_0) \le u_0$ with coefficient $C$ satisfying $G(u_0) \le C$ and $C u_0 < 1/2$. For Candidate A, sixteen kernel-checked degree-14 nonnegative polynomial filters (decide +kernel) plus capped-mass bounds on the four $D_4$ sectors $(A_1, B_1 \oplus B_2, A_2, E_+ \oplus E_-)$, the exact $46/31$ temperature-transfer lemma ($31/2 \to 23$), and the $L = 112$ Rayleigh witness seed four upward-rounded coupled rounds $(56, 23) \to (896, 368)$:
Spin1Transfer.lean, all abstract transfer-operator and signed-sector-moment assumptions are eliminated via a finite-$M$ no-collision $4^M \times 4^M$ real symmetric $O(2)/SO(3)$-equivariant transfer matrix $K_M$, uniform Hilbert–Schmidt bound $\operatorname{Tr}(K_M^2) \le 9 e^{2b(|D|+|a|+3)}$, and $\ell^2$ subsequential signed-moment convergence for all $n \ge 3$.Round 0 · Seeded Scale (56, 23)
PurityBootstrap/CandidateA/Data.lean (caP0..caP4, caQ0..caQ4): both $1 - S(896, 368) \le 0.53546\%$ and $1 - T(1792, 368) \le 0.09312\%$ clear $u_0 = 1/100$.ca_four_rounds_to_896_exact: $(p_3, q_3) = (3.92260\%, 1.82716\%) \mapsto (p_4, q_4) = (0.53546\%, 0.09312\%) < (1\%, 1\%)$. With $C = 5$, uniform_gap_from_purities locks $\gamma_L > \ln(20)/368 \approx 0.00814058$ for every finite even $L \ge 896$.What Lean 4 proves — and what stays external
Every logical step of our proof was checked by Lean 4, a computer proof verifier that rejects any missing justification. For our simpler 2-state magnet ring (Candidate E), Lean proves the entire theorem with zero outside numbers. For the two 3-state spin-1 Haldane rings (Candidate A and Source 1), Lean now proves the entire mathematical bridge from the concrete $3^L \times 3^L$ Hamiltonian itself — taking only the tiny-ring measurements ($L \le 14$ or $L \le 12$) and one finite guess vector as external inputs.
Across 25 Lean 4 modules (1,509 audited theorem constants, zero sorry, zero native_decide, zero custom axioms), we prove three flagship theorems. Candidate E is completely self-contained in Lean 4. For Candidate A ($D = 1/4$) and Source 1 ($D = 0$), every abstract operator and symmetry-sector hypothesis has been proved inside Lean 4; the only remaining hypotheses are finite physical partition-function enclosures and one finite variational Rayleigh inequality.
The fail-closed audit script scripts/check_axioms.lean verifies all 25 imported project modules, zero .axiomInfo declarations, and strictly standard axioms [propext, Classical.choice, Quot.sound] across all 1,509 theorem constants (1,288 under PurityBootstrap.*). External verification for Candidate A uses three standalone scripts: (i) certify_open7_shift.py (floating-point Cholesky proposal of $A - 2I$ rounded and certified via exact overflow-guarded int64 residuals across $M = 0..7$, worst $\|R\|_\infty = 1{,}216{,}644{,}908 < 2^{40}$); (ii) verify_candidate_a_all88.py (stdlib-only exact rational enclosures from archived 256-bit totals, worst endpoint distance $1.245 \times 10^{-6} < 10^{-5}$, 87.55% safety margin); and (iii) check_trial.py (160-bit Arb enclosure of the $L = 112$, $\chi = 32$ periodic MPS Rayleigh quotient in $[-1.242820131121, -1.242820131120] < -1.242818$).
1. 2D Coupling-Box Ising Ring (Candidate E)
Zero external inputs. Across $(g, h) \in [\frac{15}{128}, \frac{16}{128}] \times [\frac{47}{128}, \frac{48}{128}]$, Lean proves for every finite even $\ell \ge 64$ an exponentially narrow parity doublet $0 \le E_1 - E_0 \le \frac{1}{20}e^{-(\ln 20)\ell/128}$ and uniform gap $E_i - E_1 > \ln(8)/48 \approx 0.0433$ for $i \ge 2$.
2. Anisotropic Haldane Ring (Candidate A)
Takes only 88 finite physical trace enclosures on $Z_{\mathrm{spin1}}$ ($n = 4..14$, $b \in \{31/2, 23\}$, 4 seams) and one $L = 112$ real Rayleigh witness. Proves ground-state simplicity and $\gamma_L > \ln(20)/368 \approx 0.00814058$ for every finite even $L \ge 896$.
3. Isotropic Heisenberg Ring (Source 1)
Applies the same concrete transfer and $D_2 \rtimes C_3$ projection bridge inside Lean 4. Takes only 18 physical trace enclosures ($n = 4..12$, $b = 49/4$, seams $\{I, R_x\}$) and one $L = 72$ witness, proving $\gamma_L > \ln(20)/784$ for every finite even $L \ge 2304$.
| n | b | Seam | Lean Center (Data.lean) | Interval Radius | |Endpoint − Center| | % of 10−5 Budget | Audit |
|---|
scripts/verify_candidate_a_all88.py (stdlib-only exact rational arithmetic over archived 256-bit integer Chebyshev totals, SHA-256 b117cdb2...e6f23362e) matched against PurityBootstrap/CandidateA/Data.lean. Worst endpoint distance is 1.245 × 10^-6 (12.45% of 10^-5 budget; 87.55% safety margin unused); at $n = 14$, worst distance is 3.211 × 10^-8 (0.32% of budget).
scripts/check_axioms.lean + leanchecker on Lean v4.36.0 / Mathlib v4.36.0. Rejects any .axiomInfo declaration (even unused) across all 25 modules in the PurityBootstrap closure.
Five rounds of adversarial cross-examination (Codex gpt-6.2-astra, high reasoning):
int64 residuals certifying $A \succ I$, and hardened check_axioms.lean to reject unused axioms.rotF seam orientation ($\le 4.5 \times 10^{-15}$ discrepancy vs. $2$ if reversed), regenerated 40/88 Candidate A and 14/18 Source 1 totals, replayed both trials, and ran leanchecker on all 4 new modules.check_trial.py), and reading-level accuracy.Glossary of key terms
Select any term below for a plain-English definition alongside its formal role in the Lean 4 proof: