Verification files for the Lean proof of the Riemann Hypothesis

Announced at alpo.ge/remark.pdf on 20 November 2026.

Andrew Sutherland (MIT), checks run with Claude Code. Page last updated 2026-11-25 22:05 UTC. All checks have finished.

A shorter Lean proof was published on 25 November 2026; the checks of that proof are recorded on a separate page.

Summary

The published Lean source compiles without errors, the five headline theorems depend only on the three standard axioms, every module has been replayed through the Lean kernel, two independently written kernels, nanoda and con-leche, accept the full exported proof, and lean4lean accepts every compiled module. The --compare modes of con-leche and of its Rust port con-ron, independent implementations of Comparator's statement matching, each confirm all five theorems against the challenge. An independent sandboxed lake build of the archive reproduces the export byte for byte. Lean's own kernel also accepts the full export, and Comparator v4.33.0 reports “Your solution is okay!”. Lean's paranoid kernel accepts it too, and lake comparator (Lean v4.36.0), run on the canonical challenge, reports “Your solution is okay!”.

CheckResultDetail
All 175,187 modules compile (Lean v4.33.1, Mathlib v4.33.1)passzero errors; finished 16:43:21 UTC on 20 November
#print axioms for the five theorems in Main.leanpasspropext, Classical.choice, Quot.sound only (audit.log)
No axioms declared outside Lean corepass15 axioms in the environment, all in Init
Mathlib files identical to the official cachepass8,322 Mathlib and 378 dependency .olean files, byte for byte
Independent rebuild with lake build Main in a sandbox (no network, read-only source), on a separate machinepassexit 0, zero errors; finished 18:07:21 UTC on 21 November (timeline, script)
Export made inside that sandbox, compared with the published exportidentical61,570,595,788 bytes, sha256 5ea74b91…244e; finished 19:32:56 UTC on 21 November
Compiled files of the sandboxed lake build, compared with our manifest175,186 of 175,187 identicalthe one differing module compiles non-deterministically; see the note below (its manifest)
leanchecker kernel replay of every modulepass175,187 of 175,187; zero rejections; finished about 18:17 UTC on 20 November
Challenge export equals the one published by Deicyde/riemann-hypothesis CImatchsha256 bd484ac9…b2b9
nanoda (independent Rust kernel) on the full exportacceptsexit 0 at 19:05:45 UTC on 20 November; 27 min 42 s on 80 threads (nanoda.log)
Lean default kernel (leanchecker --from-export, Lean v4.36.0) on the full exportacceptsexit 0 at 18:44:18 UTC on 22 November; 48 h 3 min on one thread; peak memory 82.6 GiB (log)
Lean default kernel, same binary and export, with one allocator setting changed (MIMALLOC_GENERIC_COLLECT=1000000)acceptsexit 0 at 03:37:42 UTC on 23 November; 9 h 8 min on one thread; peak memory 82.6 GiB, the same as with default settings (log, script). The setting is an environment variable read by the stock binary; it makes the allocator's periodic full-heap collection rarer and changes nothing about what is checked.
Lean paranoid kernel, same binary and export, with the same allocator setting changedacceptsexit 0 at 04:29:58 UTC on 23 November; 10 h 0 min on one thread; peak memory 98.8 GiB (log). The run with default settings is in the next row.
Lean paranoid kernel (leanchecker-paranoid --from-export, Lean v4.36.0) on the full exportacceptsexit 0 at 19:01:08 UTC on 23 November; 72 h 20 min on one thread; peak memory 98.8 GiB (log)
Comparator v4.33.0 (unmodified standalone binary, the repository's own comparator.json) end to endpassstatement comparison and axiom check pass; nanoda accepts; Lean default kernel accepts; "Your solution is okay!"; exit 0 at 09:10:39 UTC on 23 November, after 64 h 8 min (log, script). It was run on the files from the original build: its lake build step was satisfied by a stub, and the Challenge module it compared against was our own compile of the repository's Challenge.lean.
lake comparator (Lean v4.36.0) from exports, with the canonical challenge exportpassstatement comparison and axiom check pass; Lean paranoid kernel, nanoda and Lean default kernel all accept; "Your solution is okay!"; exit 0 at 21:49:00 UTC on 25 November. Started 19:03 UTC on 20 November; 122 h 45 min in all, its kernel stages being single-threaded (log, config).
con-leche master (cd2eceab) on the full exportaccepts1,468,418 declarations accepted in --verified mode; exit 0 at 21:19:04 UTC on 20 November; 3 min 15 s on 64 threads (log)
con-leche --compare (branch compare, 5dc36dc1): challenge against solutionacceptsall five theorems "justified by the solution"; 51,692 challenge declarations accepted; exit 0 at 21:19:12 UTC on 20 November (log)
con-ron --compare (master, 3f22699b): challenge against solutionacceptsall five theorems "justified by the solution"; 1,468,418 solution and 51,692 challenge declarations accepted in --verified mode; exit 0 at 23:02:33 UTC on 21 November; 7 min 6 s on 64 threads (log)
lean4lean (67f63b0c, built with Lean v4.33.1) on the compiled files, module by modulepass175,187 of 175,187; finished about 21:55 UTC on 20 November. 175,182 passed with default settings. Five hit lean4lean's default step limit ("deterministic timeout") on decide +kernel computations and passed when rerun with the limit raised (timeouts, reruns with flags)
con-leche and con-ron as bundled with Lean v4.36.0declinedexit 2, not a rejection: those older binaries do not support one reflexive inductive type in the proof. con-leche and con-ron built from master, above, do. (log, log)
lean4lean bundled with Lean v4.36.0not applicablecannot read a v4.33 core library (unknown constant 'Decidable.intro')

What was verified

Five theorems, proved in the submission's Main.lean. Their statements are below exactly as they appear in the challenge file, which imports only Mathlib. All the mathematical notions in them (riemannZeta, DirichletCharacter, DirichletCharacter.LFunction, IsPrimitive) are Mathlib's.

1. The Riemann Hypothesis, using Mathlib's own definition (Mathlib/NumberTheory/LSeries/RiemannZeta.lean): every zero of ζ other than the trivial zeros −2, −4, −6, … has real part 1/2. The condition s ≠ 1 is there because Mathlib assigns ζ a conventional value at its pole.

def RiemannHypothesis : Prop :=
  ∀ (s : ℂ) (_ : riemannZeta s = 0) (_ : ¬∃ n : ℕ, s = -2 * (n + 1)) (_ : s ≠ 1), s.re = 1 / 2

theorem riemannHypothesis : RiemannHypothesis

2. The same statement written out in the submission's own words. Lean accepts the two as equal by definition.

theorem riemannZeta_eq_zero_re :
  ∀ s : ℂ, riemannZeta s = 0 → (¬∃ n : ℕ, s = -2 * ((n : ℂ) + 1)) → s ≠ 1 → s.re = 1 / 2

3. No zeros to the right of the critical line, for every Dirichlet L-function. For every modulus N ≥ 1 and every Dirichlet character χ modulo N, primitive or not, L(χ, s) ≠ 0 whenever Re s > 1/2. The one excluded case is the trivial character at s = 1, where the L-function has its pole.

theorem LFunction_ne_zero_of_half_lt_re :
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
    1 / 2 < s.re → (χ ≠ 1 ∨ s ≠ 1) → DirichletCharacter.LFunction χ s ≠ 0

4. Zeros in the critical strip lie on the critical line, for every Dirichlet L-function.

theorem LFunction_eq_zero_re :
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
    0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2

5. The same for primitive characters, the form in which the Generalized Riemann Hypothesis for Dirichlet L-functions is usually stated.

theorem LFunction_eq_zero_re_of_isPrimitive :
  ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), χ.IsPrimitive →
    ∀ s : ℂ, 0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2

Scope. "GRH" here means Dirichlet L-functions: all moduli and all characters. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general are not among the statements that were checked.

Arithmetic consequences

As a check that does not depend on Mathlib's definition of the zeta function, the proof was combined with kimihiro64/Robin1984 (commit 5ce18bf3, 23 November 2026), an independent formalization of Robin-type criteria on the same Lean and Mathlib versions. Importing both gives three theorems with no hypotheses and no mention of zeros of zeta or L-functions (ArithSolution.lean; statements alone in ArithChallenge.lean, which imports only Mathlib):

theorem robin_inequality :
    ∀ n : ℕ, 5040 < n →
      ((ArithmeticFunction.sigma 1 n : ℕ) : ℝ) <
        Real.exp Real.eulerMascheroniConstant * (n : ℝ) * Real.log (Real.log (n : ℝ))

theorem lagarias_inequality :
    ∀ n : ℕ, 0 < n →
      ((ArithmeticFunction.sigma 1 n : ℕ) : ℝ) ≤
        (harmonic n : ℝ) + Real.exp (harmonic n : ℝ) * Real.log (harmonic n : ℝ)

theorem cyclotomic_corrected_ideal_robin :
    ∀ (modulus : ℕ) [NeZero modulus],
      Robin1984.GRH.CorrectedIdealRobin (CyclotomicField modulus ℚ)

The first two follow from riemannHypothesis through Robin1984's equivalences of RH with Robin's inequality and with Lagarias's criterion. The third follows from LFunction_eq_zero_re, the statement of GRH for Dirichlet L-functions, through Robin1984's theorem dirichletGRH_iff_cyclotomicCorrectedIdealRobin; the hypothesis of that theorem is word for word the statement proved in Main.lean. Here CorrectedIdealRobin K says that there is a cutoff such that every nonzero ideal 𝔞 of the ring of integers of K with norm at least the cutoff satisfies

σ_K(𝔞) / N𝔞  ≤  e^γ · κ_K · ( log log N𝔞 + (12 + 3 log |D_K|) / √(log N𝔞) )

where σ_K(𝔞) is the sum of the norms of the ideals dividing 𝔞, κ_K is the residue of the Dedekind zeta function of K at 1, and D_K is the discriminant. Its two definitions are copied verbatim from Robin1984's Challenge.lean into ArithChallenge.lean.

Robin1984 on its own (the five theorems in its comparator.json)ResultDetail
Robin1984 builds with lake buildpass4,901 jobs, exit 0 at 01:16:20 UTC on 24 November, after 1 h 21 min
con-leche masteraccepts102,238 declarations accepted; exit 0 at 01:22:39 UTC on 24 November (log)
con-leche --compare against its own challengeacceptsall five theorems "justified by the solution", including dirichletGRH_iff_cyclotomicCorrectedIdealRobin; exit 0 at 01:27:22 UTC on 24 November (log)
con-ron --compare (master, 3f22699b) against its own challengeacceptsall five theorems "justified by the solution"; exit 0 at 01:35:53 UTC on 24 November (log)
Unmodified Comparator v4.33.0 with the repository's own configpassall five theorems; nanoda accepts, Lean default kernel accepts, "Your solution is okay!"; exit 0 at 04:21:10 UTC on 24 November, after 3 h 5 min (log summary)
lake comparator (Lean v4.36.0) from exportspassall five theorems; Lean paranoid kernel, nanoda and Lean default kernel all accept; "Your solution is okay!"; exit 0 at 05:09:47 UTC on 24 November (log)
The three consequences (the proof combined with Robin1984)ResultDetail
The three theorems compile; #print axiomspasspropext, Classical.choice, Quot.sound only, for each of the three (audit)
con-leche --compare against ArithChallengeacceptsall three theorems "justified by the solution"; 1,475,109 solution declarations accepted; exit 0 at 02:43:35 UTC on 24 November (log)
con-leche master on the full combined exportaccepts1,475,109 declarations accepted in --verified mode; exit 0 at 02:51:42 UTC on 24 November (log)
con-ron --compare (master, 3f22699b) against ArithChallengeacceptsall three theorems "justified by the solution"; exit 0 at 03:08:01 UTC on 24 November (log)
nanoda on the full combined exportacceptsexit 0 at 03:37:10 UTC on 24 November; 29 min 9 s on 64 threads (log)

The combined export is 61,801,392,638 bytes, sha256 396f55dcf8830a7bf0cfa1c9f0e8503f62c08d5c92af5d2a83f286a6b24654a5; its challenge export has sha256 585f578ed8836f33aa5dad90a8599553a6f7190a9e657e5600e171445b8d0afa. These statements still rely on Mathlib's definitions (the divisor sum, Euler's constant, harmonic numbers, exp and log; for the third, cyclotomic fields, ideals and their norms, the discriminant and the residue of the Dedekind zeta function) and on the Robin1984 proof, which is why that proof was put through the same checks.

The first two inequalities were first checked on 20 and 21 November against an earlier version of Robin1984 (commit acab1a3), with the same outcome; the files and logs of that run are kept in earlier/.

The elaborated statements

The kernels check elaborated terms, not source text, so what was verified is the term that Lean's elaborator produces from each statement. For Robin's and Lagarias's inequalities that term is short enough to read in full. These are the statements printed with set_option pp.all true, so that every coercion, instance, implicit argument and universe level is shown, as elaborated against Mathlib alone (Lean v4.33.1, Mathlib 0df444a3), with none of the proof loaded:

def robinStmt : Prop :=
∀ (n : Nat),
  @LT.lt.{0} Nat instLTNat (@OfNat.ofNat.{0} Nat (nat_lit 5040) (instOfNatNat (nat_lit 5040))) n →
    @LT.lt.{0} Real Real.instLT
      (@Nat.cast.{0} Real Real.instNatCast
        (@DFunLike.coe.{1, 1, 1} (@ArithmeticFunction.{0} Nat (@MulZeroClass.toZero.{0} Nat Nat.instMulZeroClass)) Nat
          (fun (x : Nat) => Nat)
          (@ArithmeticFunction.instFunLikeNat.{0} Nat (@MulZeroClass.toZero.{0} Nat Nat.instMulZeroClass))
          (ArithmeticFunction.sigma (@OfNat.ofNat.{0} Nat (nat_lit 1) (instOfNatNat (nat_lit 1)))) n))
      (@HMul.hMul.{0, 0, 0} Real Real Real (@instHMul.{0} Real Real.instMul)
        (@HMul.hMul.{0, 0, 0} Real Real Real (@instHMul.{0} Real Real.instMul) (Real.exp Real.eulerMascheroniConstant)
          (@Nat.cast.{0} Real Real.instNatCast n))
        (Real.log (Real.log (@Nat.cast.{0} Real Real.instNatCast n))))
def lagariasStmt : Prop :=
∀ (n : Nat),
  @LT.lt.{0} Nat instLTNat (@OfNat.ofNat.{0} Nat (nat_lit 0) (instOfNatNat (nat_lit 0))) n →
    @LE.le.{0} Real Real.instLE
      (@Nat.cast.{0} Real Real.instNatCast
        (@DFunLike.coe.{1, 1, 1} (@ArithmeticFunction.{0} Nat (@MulZeroClass.toZero.{0} Nat Nat.instMulZeroClass)) Nat
          (fun (x : Nat) => Nat)
          (@ArithmeticFunction.instFunLikeNat.{0} Nat (@MulZeroClass.toZero.{0} Nat Nat.instMulZeroClass))
          (ArithmeticFunction.sigma (@OfNat.ofNat.{0} Nat (nat_lit 1) (instOfNatNat (nat_lit 1)))) n))
      (@HAdd.hAdd.{0, 0, 0} Real Real Real (@instHAdd.{0} Real Real.instAdd)
        (@Rat.cast.{0} Real Real.instRatCast (harmonic n))
        (@HMul.hMul.{0, 0, 0} Real Real Real (@instHMul.{0} Real Real.instMul)
          (Real.exp (@Rat.cast.{0} Real Real.instRatCast (harmonic n)))
          (Real.log (@Rat.cast.{0} Real Real.instRatCast (harmonic n)))))

Robin's inequality names 21 constants directly and Lagarias's 27: Nat, Real, the order and arithmetic instances on them, the casts to Real, ArithmeticFunction.sigma, Real.exp and Real.log, and then Real.eulerMascheroniConstant for Robin and harmonic for Lagarias. Counting definitions with their bodies and theorems by their statements only (a proof cannot change what a definition means), the meaning of Robin's inequality depends on 2,050 Mathlib and core declarations and that of Lagarias's on 1,801; the difference is mostly the definition of Euler's constant.

The third statement is short in the same form, but only because it is stated through a definition:

def cyclotomicStmt : Prop :=
∀ (modulus : Nat) [@NeZero.{0} Nat (@MulZeroClass.toZero.{0} Nat Nat.instMulZeroClass) modulus],
  @Robin1984.GRH.CorrectedIdealRobin.{0} (@CyclotomicField.{0} modulus Rat Rat.instField)
    (@CyclotomicField.instField.{0} modulus Rat Rat.instField)
    (@CyclotomicField.instNumberField.{0} modulus Rat Rat.instField Rat.numberField)

The definition CorrectedIdealRobin runs to several hundred lines when printed this way (it is in the output file below), and the meaning of the statement depends on 7,616 declarations, since it involves number fields, rings of integers, ideals and the Dedekind zeta function.

Files: the script, its output (all three statements and the two definitions), and the dependency lists for Robin, Lagarias and the cyclotomic statement.

Downloads

solution.ndjson.zst 7.7 GB (7,699,933,588 bytes)

The exported proof: output of lean4export on module Main. Unpacks to 61,570,595,788 bytes.

compressed sha256 61a8938ad5f5e57397c1c0e3b954916af546d9004ade01c3555744a681b05381
unpacked sha256   5ea74b912147c5c93cc2b6d70cc727cf908df2f62ac6a20480a3fa02f6be244e

The exported challenge: the five statements with sorry proofs, importing only Mathlib. Unpacks to 350,862,970 bytes.

unpacked sha256   bd484ac9886a96f26b1d9a7a59ebd45b7a70d102c015d4f31f9302bbdd6ab2b9

Smaller files:

Check it yourself

With Lean v4.36.0 installed, nothing needs to be built. You need roughly 100 GB of RAM and 70 GB of disk.

zstd -d --long=30 solution.ndjson.zst      # --long=30 is required
zstd -d --long=27 challenge.ndjson.zst
sha256sum solution.ndjson challenge.ndjson  # compare with the hashes above

lake comparator --config comparator.json \
  --challenge-from-export challenge.ndjson --solution-from-export solution.ndjson

nanoda alone took about 28 minutes on 80 threads. The Lean kernels are single-threaded and take much longer.

The fastest independent check is con-leche built from source (Lean v4.36.0, about two minutes to build). It needs about 50 GB of RAM and took under four minutes on 64 threads:

git clone https://github.com/leanprover/con-leche && cd con-leche
git checkout compare        # 5dc36dc1; master (cd2eceab) for the plain check
lake build con-leche
.lake/build/bin/con-leche --compare challenge.ndjson solution.ndjson

Provenance

ItemValue
Source archivelean.tar.gz, the 14 parts from alpo.ge joined; 239,275,554 bytes
sha256 9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc
Source mirrorDeicyde/riemann-hypothesis, byte-identical to the archive apart from the Comparator files it adds
Lean / MathlibLean v4.33.1 (commit 819816b2); Mathlib tag v4.33.1 (0df444a3)
Exporterlean4export tag v4.33.0 (15f6055e), built with Lean v4.33.1; target list as in Deicyde's export-targets.txt
Judge and extra kernelsLean v4.36.0: lake comparator, leanchecker, leanchecker-paranoid, nanoda_bin
lean4leandigama0/lean4lean at 67f63b0c, built with Lean v4.33.1; run on the compiled .olean files, not the export
con-lecheleanprover/con-leche master at cd2eceab and branch compare at 5dc36dc1, each built with Lean v4.36.0
con-ronleanprover/con-ron master at 3f22699b, the Rust port of con-leche, built with cargo build --release
Main.oleansha256 9146dfb4148e24d2252e04c50742f3e49dd126dfcc5006d10bf5f873ddf796ad
Manifest of all compiled filessha256 375cbee2fc3fc0f5088ef2e6dc9a5ac5530924310dc62422ec65aac9dc4c1d25
specific to the build directory /home/ubuntu/grh/src/lean, and one file in it is not deterministic; see the note below
Build directorythe archive's lean/ directory was at /home/ubuntu/grh/src/lean on every build machine, so each source file was passed to Lean as /home/ubuntu/grh/src/lean/src/<Module/Path>.lean

Caveats