On 20 November 2026, Levent Alpöge released a proof of the Riemann Hypothesis as a Lean library of about 17 million lines, a proof he says he found…
// the short version
On 20 November 2026, Levent Alpöge released a proof of the Riemann Hypothesis as a Lean library of about 17 million lines, a proof he says he found "working with Claude". Nobody can read that much, and Lean code that compiles can still state the wrong theorem. So how did the Lean FRO and the Mathlib Initiative certify it as correct within days?
// what to take away
- On 20 November 2026, Levent Alpöge released a proof of the Riemann Hypothesis written entirely in Lean, a proof assistant whose compiler checks that every step of a proof follows from the previous ones. The Lean FRO and the Mathlib Initiative describe it as a library of 17 million lines. Alpöge writes that he found it "working with Claude", and says he is still working to understand the argument and write it up properly.
- Lean code that compiles is not enough on its own: a statement can compile and still say the wrong thing, and a large proof could in principle redefine a symbol or add an axiom. So the statement was checked separately. It is Mathlib's own RiemannHypothesis definition, which the Lean FRO says experts in Lean and number theory have carefully vetted; two independent tools, comparator and con-leche --compare, confirmed the theorem proved is exactly that statement, and #print axioms shows only Lean's three standard axioms.
- The proof was exported to one inert plain-data file of 61,570,595,788 bytes, and checkers read that instead of running the project's code. As of 24 November 2026, Lean's default kernel had accepted it in 48 h 3 min on one thread, nanoda (Rust) in 27 min 42 s on 80 threads, and con-leche, which comes with a formal proof relative to set theory that it cannot accept a false proof, in 3 min 15 s. None had rejected it, the lake comparator run was still running, and a sandboxed rebuild on a separate machine produced a byte-identical export.
What was proved, and how much of it
On 20 November 2026, Levent Alpöge released a proof of the Riemann Hypothesis written entirely in Lean, a proof assistant: a programming language whose compiler checks that every step of a proof follows from the previous ones. The Lean FRO and the Mathlib Initiative describe it as a library of 17 million lines that depends directly only on Mathlib, Lean's community mathematics library. In his announcement, Alpöge writes that he believes he has, "working with Claude", discovered a proof, and that he and Claude formalized the arguments. He chose to publish only the Lean code rather than a written paper.
The check covered five theorems from the submission's Main.lean, according to Sutherland's page:
- the Riemann Hypothesis, using Mathlib's own definition: every zero of the zeta function other than the trivial zeros −2, −4, −6, … has real part 1/2
- the same statement written out in the submission's own words (Lean accepts the two as equal by definition)
- no zeros to the right of the critical line for any Dirichlet L-function
- zeros in the critical strip lie on the critical line, for every Dirichlet L-function
- the same for primitive characters, the usual form of the Generalized Riemann Hypothesis for Dirichlet L-functions
"GRH" here means Dirichlet L-functions only. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general were not among the statements checked.
Why "it compiles" is not enough
Kevin Buzzard's Xena post from 12 November lists four questions to ask before trusting a claim that a theorem "is checked in Lean", especially when the code is AI-generated:
1. Does the Lean statement match the theorem you mean? His example: a definition of Fermat's Last Theorem over Lean's natural numbers compiles, but it is false, because Lean's natural numbers include 0, and a = b = c = 0 with n = 3 is a counterexample. A wrong statement compiles fine; it just can't be proved. 2. Does the code compile? For a huge library that takes a big machine. Buzzard also advises building untrusted code in a sandbox. 3. Does the code prove the theorem as stated? Millions of lines of proof could, in principle, hide a redefinition that changes what a symbol means, or a new axiom that simply asserts the result. 4. Does it exploit a bug in Lean's kernel? Lean has had a kernel soundness bug before. The answer is to run more than one kernel.
The Lean FRO statement says all four criteria are satisfied for this proof.
Checking the statement separately from the proof
The statement is the short part humans can review. RiemannHypothesis is already a definition in Mathlib (Mathlib/NumberTheory/LSeries/RiemannZeta.lean), which the Lean FRO says has been carefully vetted by experts in Lean and number theory:
def RiemannHypothesis : Prop :=
∀ (s : ℂ) (_ : riemannZeta s = 0) (_ : ¬∃ n : ℕ, s = -2 * (n + 1)) (_ : s ≠ 1),
s.re = 1 / 2The condition s ≠ 1 is there because Mathlib assigns the zeta function a conventional value at its pole.
The community then added a challenge file that states the theorems and imports only Mathlib, so nothing from the 17 million lines can change what the statement means. Two independent tools, comparator and con-leche --compare, confirmed that the theorem proved in Alpöge's library is exactly Mathlib's statement. #print axioms on the five theorems shows only Lean's three standard axioms: propext, Classical.choice and Quot.sound. Sutherland also found no axioms declared outside Lean's core.
The inert export, and the checkers that read it
Instead of trusting the build, the proof was exported with lean4export to one plain-data file, solution.ndjson: 61,570,595,788 bytes uncompressed (7.7 GB compressed). The Lean FRO notes the checks ran on this inert export, out of reach of any hypothetical malicious code in the proof's source. Results as of 2026-11-24 05:25 UTC:
- Lean's default kernel (
leanchecker --from-export, Lean v4.36.0) accepted the full export in 48 h 3 min on one thread, peak memory 82.6 GiB. With one allocator setting changed (an environment variable that only makes garbage collection rarer), the same binary accepted it in 9 h 8 min. - Lean's paranoid kernel accepted it in 72 h 20 min on one thread, peak memory 98.8 GiB.
- nanoda, an independent kernel written in Rust, accepted it in 27 min 42 s on 80 threads.
- con-leche accepted all 1,468,418 declarations in 3 min 15 s on 64 threads. Its Rust port con-ron also accepted the proof and confirmed the statement match. The Lean FRO says both come with a formal proof, relative to set theory, that they cannot accept a false proof.
- lean4lean accepted all 175,187 compiled modules; five needed its step limit raised to finish.
- Comparator v4.33.0 reported "Your solution is okay!" after 64 h 8 min. The
lake comparatorrun (Lean v4.36.0) was still running its final stage when the page was last updated.
Older builds of con-leche and con-ron bundled with Lean v4.36.0 declined to run (exit code 2) because they don't support one kind of inductive type the proof uses. Sutherland records that as a decline, not a rejection, and the current builds accept it.
Rebuilding it from scratch
The original build ran on cloud machines without a sandbox. So it was repeated on a separate machine with lake build Main inside a bubblewrap sandbox: no network, the source tree read-only, the archive downloaded fresh from the author's site, and Mathlib's files checked against the official cache first. The export made inside that sandbox is byte-identical to the published one (sha256 5ea74b91…244e), so every check on the published export applies to it.
Of the 175,187 compiled .olean files, 175,186 matched. The odd one out compiles non-deterministically: two theorems elaborated in parallel both trigger the same auto-generated lemma, and the lemma takes a bound variable's name from whichever gets there first. The two outputs differ in 38 bytes, bound-variable names play no part in kernel checking, and that lemma is not in the export. Sutherland traced it to a race fixed in Lean v4.36.0.
What the checks do not tell you
Sutherland's page states the limit plainly: a passing check shows that the formal statements, as written against Mathlib's definitions, follow from the three standard axioms according to the kernels used, and it relies on those kernels and on Mathlib's definitions being what they are meant to be.
It also does not mean anyone understands the proof. Alpöge writes that he is presenting a complete argument before having mastered the mathematics around it, and that he intends to understand it, explain it and write it up properly. The Lean FRO says it looks forward to the mathematical community helping explain the proof's new ideas.
The same trick in software
This part is Breakpoint's reading, not the source's. The method generalizes: don't review the giant artifact, review a short statement of what it must do, mechanically prove the artifact matches that statement, freeze the artifact into inert data, and verify it with several independently written checkers, ideally one small enough to be verified itself. Then rebuild from source in a sandbox and compare bytes. That is the logic behind reproducible builds and independent verifiers.
Check it yourself
Sutherland's page publishes the export and challenge files with their hashes. With Lean v4.36.0 installed, lake comparator runs the full check from the exports and needs roughly 100 GB of RAM and 70 GB of disk. The fastest independent check is con-leche built from source, which needs about 50 GB of RAM and took under four minutes on 64 threads.
Terms
- Lean
- A proof assistant: a programming language where definitions, theorem statements and proofs are code, and the compiler checks every step.
- Mathlib
- Lean's community mathematics library, reviewed by human experts. The Riemann Hypothesis statement checked here is Mathlib's own.
- Kernel
- The small core of Lean that accepts or rejects each step of a proof. Everything else in Lean can be wrong without making a false proof pass, as long as the kernel is right.
- Export
- A plain-data dump (ndjson) of every declaration a proof depends on, made by
lean4export. Checkers read the export instead of running the project's code. - Comparator
- A tool that checks a solution's theorem is exactly the challenge file's statement and that only allowed axioms were used.
- con-leche
- A Lean kernel that comes with a formal proof, relative to set theory, that it cannot accept a false proof. con-ron is its Rust port.
- nanoda
- An independent Lean kernel written in Rust.
- Axiom
- A statement assumed without proof. This proof uses only Lean's three standard axioms:
propext,Classical.choiceandQuot.sound. - Reproducible build
- A build that produces byte-identical output from the same source, so anyone can rebuild an artifact and check it is the one published.
Questions
Did AI prove the Riemann Hypothesis?
Levent Alpöge, who released the proof, says he found it "working with Claude" and that they formalized it together in Lean. The Lean FRO and the Mathlib Initiative certified the Lean proof as correct. The checks settle that the Lean proof is valid; Alpöge says he is still working to understand the argument and write it up properly.
Has the Riemann Hypothesis proof been verified?
Yes, in Lean. As of 24 November 2026, Lean's own kernel, its paranoid kernel, nanoda, con-leche, con-ron and lean4lean had all accepted it, and none had rejected it. The lake comparator run was still finishing.
How long is the Lean proof of the Riemann Hypothesis?
About 17 million lines of Lean, according to the Lean FRO, in 175,187 compiled modules. Its export is 61,570,595,788 bytes.
Why can't Lean code that compiles be trusted on its own?
Because a statement can compile and still say the wrong thing (Buzzard's Fermat example over the natural numbers), and a large proof could in principle redefine a symbol or add an axiom. That's why the statement is checked separately and the proof is compared against it.
Does this prove the Generalized Riemann Hypothesis?
It covers GRH for Dirichlet L-functions, for all moduli and characters. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general were not among the statements checked.
// further reading
- Lean verification of the Riemann Hypothesis ↗: the Lean FRO and Mathlib Initiative joint statement
- Verification files for the Lean proof of the Riemann Hypothesis ↗: Andrew Sutherland's full check log, files and hashes
- Levent Alpöge's announcement ↗: the proof's release note
- ...and the proof is checked in Lean ↗: Kevin Buzzard's four questions for trusting a Lean proof
// transcript
No human has read all of this proof of the Riemann Hypothesis. It's seventeen million lines of Lean, a language where the computer checks every step, and within days, the teams behind Lean certified it correct anyway. The Riemann Hypothesis is a hundred and sixty-seven year old question about how primes are spread out, and on November twentieth, a mathematician released a proof he says he found working with Claude. Normally experts read a proof and agree, but nobody reads seventeen million lines, and Lean code that compiles can still say the wrong thing. Write Fermat's Last Theorem over Lean's natural numbers and it compiles, but it's false, because they include zero, and zero cubed plus zero cubed is zero cubed. And code that size could, in principle, hide a line that redefines a symbol or adds an axiom. So they split the claim from the proof. The statement is one short definition already in Mathlib, Lean's shared math library, vetted by experts, and two separate tools confirmed the theorem those millions of lines prove is exactly that statement, using only the three standard axioms. The proof itself was exported to one inert file, 61.6 GB of plain data that no code in the source can touch, and that file went to separately written checkers. Lean's own kernel, the small core that accepts or rejects each step, took 48 hours on a single thread. Nanoda, an independent checker written in Rust, took under 28 minutes on 80 threads. And con-leche, which has a formal proof, down to set theory, that it can't accept a false proof, accepted all 1.47 million declarations in about three minutes. Not one checker has rejected it, and a separate machine, rebuilding from source in a sandbox with no network, produced the same file, byte for byte. It's the same trick reproducible builds use in software. Don't trust the giant thing, trust a short statement you can read, a checker small enough to check, and more than one of them. What none of it gives anyone yet is understanding, and he says he's still working on that himself, so the checkers have settled that it's true, and why it's true is still waiting for a human who can explain it.
// source
This explainer is based on Lean verification of the Riemann Hypothesis by Lean FRO and the Mathlib Initiative ↗. The original reporting and technical work belong to its publisher.