← Back to all posts
News

Lean and Mathlib Communities Certify Alpöge's Claude-Assisted Riemann Hypothesis Proof

November 23, 2026 · 00:24 UTC · News
On this page 8 sections
Lean and Mathlib Communities Certify Alpöge's Claude-Assisted Riemann Hypothesis Proof

TL;DR

The Lean and Mathlib communities published a joint statement on November 21 that answers the question our post on the claim left open. "We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct." The object is the 17.4 million-line Lean library that Levent Alpöge, a mathematician at Anthropic, built with Claude and released on November 20. Dozens of people compiled it and got the same exported proof, two independently written kernels accepted that export, and a sandboxed rebuild on a separate machine reproduced it byte for byte. Lean's default and paranoid kernels were still replaying the export at the last page update, and the statement itself treats explaining the new ideas as work still to come.


At a glance
What the certificate rests on
175,187
modules compiled, zero errors
61.6 GB
exported proof, rebuilt byte for byte
4
checkers that accept the proof
3:15
minutes for con-leche on 64 threads
3
standard axioms, nothing else
2
Lean kernel replays still running

What the certificate says

The statement is one screen long. It comes from the two groups that own the tooling, the Lean and Mathlib communities, with the Lean FRO and the Mathlib Initiative listed as endorsers, and it does not hedge: "We have full confidence that Alpöge's proof of the Riemann Hypothesis is correct, and we congratulate him on this achievement."

It then works through the four tests Kevin Buzzard published on the Xena blog on November 12 for judging AI-generated Lean code, and says all four are met.

The four tests
Each one closes a different loophole
Test 1
Right statement
Mathlib's own RiemannHypothesis, vetted by experts
Test 2
Compiles
dozens of people, same raw proof export
Test 3
Proves that statement
comparator and con-leche compare agree: exact match
Test 4
Proof is valid
several checkers accept an inert export
con-leche and con-ron carry a formal proof, relative to set theory, that they cannot accept a false proof. Source: joint statement, November 21, 2026.

Test 3 is the one that catches a proof of the wrong theorem, which is why the headline statement is Mathlib's own RiemannHypothesis definition rather than a lookalike from the proof's files. The community added a file that states the hypothesis and imports only Mathlib, then compared it against the theorem Alpöge's library proves with two independent tools, comparator and con-leche in compare mode. Think of it as an exam question printed on a sheet the student never handled. The compare step confirms that the answer on the desk answers that exact question, not one the student reworded.

Test 4 is why the checks ran on an export. Lean tactics and macros are code, and Buzzard's standing advice is to sandbox Lean of unknown origin before you run it. The export is the compiled binary of the proof, an inert file of terms that nothing executes. Checking it is auditing the binary instead of rerunning the build scripts, so a malicious macro has nowhere to run. con-leche and con-ron go further and carry a formal proof, relative to set theory, that they cannot accept a false proof.

The logs behind "dozens of people"

The statement links to one page for receipts, Andrew Sutherland's verification files at MIT, last updated 16:20 UTC on November 22, with a note that the checks were run with Claude Code. Most rows link a log, and the logs say what the summary says.

verification timeline, utc nov 2016:43 sutherland compile done, 175,187 modules 19:05 nanoda accepts the export at mit 21:19 con-leche accepts 1,468,418 declarations nov 2101:47 waterloo compile done, 3 h 18 min 10:06 waterloo: nanoda accepts 1,484,729 decls 13:55 lean and mathlib joint statement 19:32 sandbox export matches byte for byte 23:02 con-ron compare mode accepts nov 2216:20 page update: two lean kernel replays running source: sutherland logs and timeline, rubinstein log, lean blog
  • All 175,187 modules compile under Lean v4.33.1 and Mathlib v4.33.1 with zero errors. The 8,322 Mathlib and 378 dependency files in the build are byte-identical to the official cache.
  • The five theorems in Main.lean rest on three axioms and nothing else: propext, Classical.choice and Quot.sound. The audit finds 15 axioms in the environment, all from Lean's core.
  • A second build ran on a separate machine inside a bubblewrap sandbox with no network and a read-only source tree, on a 192-core AMD EPYC. It started at 10:09 UTC on November 21 and exited clean at 18:07. The export made inside that sandbox is byte-identical to the published one: 61,570,595,788 bytes.
  • leanchecker replayed all 175,187 modules through Lean's kernel with zero rejections, and lean4lean accepted every compiled module, five of them after its step limit was raised.
  • On the export itself, nanoda accepted the full file, con-leche accepted 1,468,418 declarations in verified mode, and the compare modes of con-leche and con-ron reported all five theorems "justified by the solution".

The sandboxed rebuild took a 192-core machine most of a day. Checking its export took con-leche 3 minutes 15 seconds, which is the whole point of a certificate.

Export checks
Minutes to accept the exported proof
nanodacon-leche, con-ron
con-leche
3:15 fastest
con-leche cmp
3:23
con-ron
7:06
nanoda mit
27:42
nanoda uw
48:25
Wall-clock time per run. con-leche and con-ron used 64 threads, nanoda 80 at MIT and 128 at Waterloo, so read this as minutes against hours, not a race. Source: Sutherland's logs and Rubinstein's page.

Michael Rubinstein's page at Waterloo records a separate pass: a distributed compile that finished in 3 hours 18 minutes, a kernel replay of all 175,187 modules, the same three axioms, and a nanoda run over 1,484,729 declarations that ended at 10:06 UTC on November 21 with no typechecker errors. The community keeps its own Comparator setup, with CI, for anyone repeating the run.

One footnote in the MIT page deserves a smile. In the sandboxed build, 175,186 of 175,187 compiled files matched the first build byte for byte. The exception differed in 38 bytes: the name of one bound variable in a lemma Lean generates on its own, a race between two theorems elaborating in parallel. Lean fixed that race in v4.36.0, and the lemma itself is absent from the export.

A second route that skips zeta

Everything above leans on Mathlib's definition of the zeta function. Sutherland added a check that skips it. He combined the proof with Robin1984, an independent formalization of Robin's and Lagarias's criteria, which are equivalent to RH, and out came two theorems about the divisor sum σ(n) with no hypotheses and no zeta in sight. Robin's inequality holds for every n above 5040, Lagarias's for every positive n. Both passed con-leche, con-ron and nanoda on a 61.75 GB combined export, where the Comparator run was still in progress.

What the certificate does not say

  • "GRH" in these files means Dirichlet L-functions, every modulus and every character. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general are not among the checked statements.
  • Two rows were still open at the last update. Lean's default kernel and its paranoid kernel were replaying the main export single-threaded, since 18:41 UTC on November 20, and the end-to-end lake comparator run was in the same state. Lean's kernel has already accepted every module in compiled form; these runs repeat the check on the export.
  • The con-leche and con-ron binaries bundled with Lean v4.36.0 exited with code 2 on the export. The page calls that a limitation, not a rejection: those older builds lack support for one reflexive inductive type in the proof.
  • A pass shows that the formal statements follow from the three axioms according to the kernels used. It relies on those kernels and on Mathlib's definitions meaning what they are supposed to mean. "Honestly the chance that anything is fishy here is approximately zero," Sutherland told Scientific American.
  • The ideas have no explanation yet. The statement ends by looking forward to "all the activity in the mathematical community that will help explain the new ideas in this proof". Rubinstein has a start, a 164-page working draft that explains the argument for the zeta function, written with Claude, Codex and Gemini, and it takes one inequality, the one between weighted sums over primes, from the Lean development instead of proving it.
  • The Clay Institute's million dollars for the Riemann Hypothesis runs on a different clock. Its published rules require publication in a qualifying outlet, two years after that publication, and general acceptance in the mathematics community, and the institute does not accept direct submissions.

Check it yourself

Sutherland's recipe needs roughly 100 GB of RAM and 70 GB of disk, which fits on a well-built workstation. With Lean v4.36.0 installed there is nothing to build:

zstd -d --long=30 solution.ndjson.zst
zstd -d --long=27 challenge.ndjson.zst
sha256sum solution.ndjson challenge.ndjson

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

That path waits on Lean's single-threaded kernel, so it takes much longer. The fast independent check is con-leche built from source: about two minutes to build, about 50 GB of RAM, and under four minutes on 64 threads for the 1,468,418-declaration export. nanoda alone took about 28 minutes on 80 threads.

What to steal for agent output

Our post on the claim covered the author's side. This is the auditor's side, and it is short enough to copy.

  • State the claim in a file the agent cannot touch, importing only a trusted library. The challenge here imports nothing but Mathlib.
  • Check an exported artifact outside the sandbox. Build inside it, export, then verify the export where no macro can run.
  • Use more than one checker. Lean now ships with verified kernels, so the paranoid route is one flag away: lake comparator --paranoid.
  • Publish the hash and the logs. "Dozens of people" means something only because they all got the same 61,570,595,788 bytes.

Key Takeaways

  • On November 21 the Lean and Mathlib communities, endorsed by the Lean FRO and the Mathlib Initiative, certified Alpöge's Claude-assisted Lean proof of the Riemann Hypothesis correct in both statement and proof, meeting all four tests Buzzard set for AI-generated Lean code.
  • Dozens of people compiled the 175,187-module library and reproduced the same exported proof. A sandboxed rebuild on a separate 192-core machine matched the published 61.6 GB export byte for byte.
  • The five theorems depend on propext, Classical.choice and Quot.sound and nothing else. nanoda, con-leche, con-ron and lean4lean all accepted; con-leche's verified run over 1,468,418 declarations took 3 minutes 15 seconds on 64 threads.
  • The checks cover RH and GRH for Dirichlet L-functions, not Dedekind zeta or automorphic L-functions. Lean's default and paranoid kernel replays and the end-to-end lake comparator run were still going at the last update on November 22.
  • Certification settles correctness; explaining the ideas is the next job, and the Clay prize needs a qualifying publication, two years and general acceptance.
  • For anyone shipping agent output: state the claim where the agent cannot edit it, check an inert export with more than one kernel, and publish the hash.

Sources: Lean community blog, "Lean verification of the Riemann Hypothesis" (Nov 21, 2026), Andrew Sutherland (MIT), "RH Lean proof: verification files", Michael Rubinstein (Waterloo), "An independent check of the Lean proof of RH and GRH", Xena (Kevin Buzzard), "...and the proof is checked in Lean" (Nov 12, 2026), Lean reference, "Validating a Lean Proof", con-leche, con-ron, nanoda, lean4lean, Robin1984, leanprover-community/riemann-hypothesis, Scientific American, Clay Mathematics Institute, rules for the Millennium Prize Problems, Alpöge's announcement note

AIAnthropicClaudeRiemann HypothesisLeanMathlibFormal VerificationMathematics
CONSOLE
$