RS9 Systems Pty Ltd, Sydney
Haldane Gap · Lean 4
Reading level

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.

6 chapters · 6 interactive figures 25 Lean 4 modules · 1,509 verified theorems · 0 custom axioms By Dale Richards-Smith · RS9 Systems

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.

Machine-Checked Summary · Zero Abstract Transfer Hypotheses PASS · 0 sorry · 0 custom axioms

All 25 modules and 1,509 project theorem constants (1,288 under PurityBootstrap.*) compile strictly within standard axioms [propext, Classical.choice, Quot.sound]: proving an unconditional 2D coupling-rectangle multiplet theorem for Candidate E (even $L \ge 64$), and proving concrete $3^L \times 3^L$ physical spin-1 Hamiltonian gap theorems with zero abstract transfer hypotheses for Candidate A ($D = 1/4$, every finite even $L \ge 896$) and OpenAI Source 1 ($D = 0$, every finite even $L \ge 2304$).

  • All Finite Even Rings Covered $D = 1/4$: even $L \ge 896$ ($\gamma_L > \ln(20)/368 \approx 0.00814$); $D = 0$: even $L \ge 2304$ ($\gamma_L > \ln(20)/784$)
  • Exact External Inputs ($D = 1/4$) 88 tiny-ring traces ($L = 4..14$) certified from archived 256-bit totals in exact rational arithmetic (87.55% safety margin) + 160-bit Arb $L = 112$ MPS witness
  • Adversarial Referee 5 independent Codex (gpt-6.2-astra) audit rounds + leanchecker + standalone matrix-entry and total replays
01 · The physical model

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$.

$$H_L(D) \;=\; \sum_{j=0}^{L-1} \left(S_j^x S_{j+1}^x + S_j^y S_{j+1}^y + S_j^z S_{j+1}^z\right) \;+\; D \sum_{j=0}^{L-1} (S_j^z)^2$$
Indices wrap modulo $L$; Candidate A studies $D = 1/4$, while OpenAI Source 1 studies the isotropic limit $D = 0$.

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.

$$H_{\mathrm{spin1}}(n, D, g) \;=\; -\sum_{j=0}^{n-2} \sum_{\alpha} (G_\alpha)_j \otimes (G_\alpha)_{j+1} \;-\; \sum_{\alpha} (G_\alpha)_{n-1} \otimes (g G_\alpha g^\mathsf{T})_0 \;+\; D \sum_{j=0}^{n-1} (\mathrm{SzSq\_mat})_j$$
Because $(-i)^2 = -1$, $-\sum_\alpha G_\alpha \otimes G_\alpha$ maps unitarily to $+\sum_\alpha S^\alpha \otimes S^\alpha$. Only site $0$ of the wrap-around bond $(n-1,0)$ is rotated by $g$.

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$).

Figure 01 Interactive 12-Site 3D Spin-1 Ring ($D_4$ Symmetry Twists · $D = 1/4$)
3D WEBGL · DRAG TO ORBIT · CLICK SITE TO FLIP
State
Seam (11,0)
+1 Up 0 Planar −1 Down Seam (11,0)
Drag to orbit Click site to flip +1 / 0 / −1

12-Site Energy & Seam Readout

Diagonal $S^z$ Score ($D = 0.25$) -9.00

Bulk bonds (0..10):-11.00
Seam bond (11,0):-1.00
Anisotropy $0.25 \sum (S_j^z)^2$:+3.00
Magnetization $\sum S_j^z$:0
The true quantum ground state blends many snapshots together and reaches an energy around −1.2428 per magnet — lower than any single classical pattern. In the AKLT preview, gold arches illustrate how neighboring spin-1 sites share valence-bond singlets around the closed ring.
Off-diagonal transverse terms $S_j^x S_{j+1}^x + S_j^y S_{j+1}^y$ lower the true quantum ground energy to roughly $-1.24282 L$ at $D = 1/4$ (versus $-0.75 L$ for the classical Néel state). Twisting the wrap-around bond $(L-1, 0)$ by $g \in D_4$ projects the spatial transfer matrix into distinct symmetry sectors.
In 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$.
02 · The Haldane conjecture

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

$$E_1(L) - E_0(L) \;>\; \gamma \qquad \text{for every finite even ring } L \ge L_0.$$
Crucially, $\gamma$ does not decay as $1/L$ or $1/L^2$: the ground state remains uniquely isolated for arbitrarily long rings.

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:

$$(H_{\mathrm{spin1}}(L, \tfrac{1}{4}, I)).\mathrm{charpoly.roots} = E_0 ::_m \mathrm{rest}, \qquad |\mathrm{rest}| + 1 = 3^L, \qquad \forall E \in \mathrm{rest},\; E - E_0 > \frac{\ln 20}{368}.$$
Removing one occurrence of $E_0$ and separating every remaining root strictly proves both ground-state simplicity (multiplicity 1) and the uniform gap.
Figure 02 Spectral Scaling Across Finite Even Rings ($L = 896$ to $1,000,000$)
EVEN L = 896

Protected for every finite even ring L ≥ 896

03 · The exponential barrier

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.

Figure 03 Hilbert-Space Basis Configurations ($3^L$) vs. Ring Length
RING LENGTH: 14 SITES
Basis Configurations ($3^L$)
4,782,969
04 · The core mechanism

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/100 mismatch) 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:

$$S(L, b) \;=\; \frac{Z(2L, b)}{Z(L, b)^2}, \qquad T(L, b) \;=\; \frac{Z(L, 2b)}{Z(L, b)^2} \;=\; \sum_k p_k^2 \;\in\; (0, 1], \qquad p_k = \frac{e^{-b(E_k + a L)}}{Z(L, b)}.$$
$T(L, b) = \sum_k p_k^2$ is the probability that two independent draws from the thermal Gibbs distribution occupy the same eigenstate.

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)$:

$$S(896, 368) \ge \frac{99}{100}, \qquad T(1792, 368) \ge \frac{99}{100} \quad (u_0 = \tfrac{1}{100},\; C = 5) \;\Longrightarrow\; \gamma_L > \frac{\ln(1/(C u_0))}{368} = \frac{\ln 20}{368} \quad (\forall\,\text{even } L \ge 896).$$
In 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$.
Figure 04 Interactive Space-Time Purity Duality & Coupled Doubling Stepper (Candidate A · $D = 1/4$)
Slicing
Spatial transfer slicing: S(L, b) = Z(2L, b) / Z(L, b)^2 = Tr(K_b^{2L}) / Tr(K_b^L)^2 ROUND 0 · (L, b) = (56, 23)

Round 0 · Seeded Scale (56, 23)

Spatial defect $1 - S(56, 23)$ 12.1530%
u_0 = 1%
Lean bound: caP0 = 1,215,302 / 10^7 (S ≥ 87.8470%)
Temporal defect $1 - T(112, 23)$ 12.0321%
u_0 = 1%
Lean bound: caQ0 = 1,203,214 / 10^7 (T ≥ 87.9679%)
Spatial Scale (L)
56
Inverse Temp (β)
23
Spatial / Temporal Defects
12.1530% / 12.0321%
Bootstrap Status
Seeded from 88 boxes
Cutting the spacetime torus vertically glues two rings end-to-end ($L \to 2L$); cutting horizontally stacks two cold snapshots ($\beta \to 2\beta$). Four alternating doublings push both mismatch scores under 1%.
Exact upward-rounded rational bounds from 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$.
Verified via 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$.
05 · Machine verification & scope

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$).

100% Unconditional in Lean 4

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$.

candidate_e_unconditional_full_hamiltonian_theorem
Zero Abstract Transfer · D = 1/4

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$.

candidate_a_physical_spin1_charpoly_gap_896
Zero Abstract Transfer · D = 0

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$.

source1_physical_spin1_charpoly_gap_2304
Figure 05 Live Lean-Verified Certificate Explorer (88 Candidate A Enclosures & 25-Module Proof DAG)
88/88 EXACT RATIONAL PASS · 1,509 CONSTANTS · 0 CUSTOM AXIOMS
Temp
Seam
n b Seam Lean Center (Data.lean) Interval Radius |Endpoint − Center| % of 10−5 Budget Audit
Source: 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).
Highlight Path
Click any module node to inspect dependencies & exported theorems
Audited Modules
25 / 25
Theorem Constants
1,509 (1,288 public)
Custom Axioms / sorry
0 / 0
Permitted Kernel Axioms
[propext, Classical.choice, Quot.sound]
Audited by 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):

Round 1
Pre-flight parameter stress-test: Validated the $D = 1/4$ Candidate A parameters, $D_4$ symmetry twists, and rational bootstrap strategy before running GPU contractions.
Round 2
Early batch & Lean certificates: Audited the Lean degree-14 polynomial filters and bootstrap rounds alongside the initial trace batch, flagging the remaining 80 boxes to finish before claiming closure.
Round 3
Full 88-box closure & hardening (4 fixes applied): Completed all 88 pure-integer Chebyshev totals (Vast.ai GPUs + 64/88 CPU replays), built the standalone stdlib-only rational verifier, upgraded the 7-site open-chain check to exact int64 residuals certifying $A \succ I$, and hardened check_axioms.lean to reject unused axioms.
Round 4
Zero-abstract-transfer audit (0 blocking bugs): Mathematical construction accepted; Codex compiled the CPU builders to verify exact 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.
Round 5
Preprint, CI & explainer audit: Verified every theorem identifier, numerical bound, primary-record arXiv citation title, two-seed purity rule, CI trial check (check_trial.py), and reading-level accuracy.
06 · Reference

Glossary of key terms

Select any term below for a plain-English definition alongside its formal role in the Lean 4 proof:

Figure 06 Interactive Glossary
8 TERMS