Skip to content
Shipworthy

Riemann Hypothesis in Lean: how 17M lines were checked

A 17-million-line Lean proof of the Riemann Hypothesis, built with Claude, has passed every check finished so far. What was checked, how, and what was not.

By · · Updated · 22 min read


On Friday 20 November 2026, Levent Alpöge, a mathematician at Anthropic, published what he says is a proof of the Riemann Hypothesis, found while working with Claude. There is no paper. The proof is a Lean library of 175,187 files and about 17.4 million lines. A day later the Lean FRO and the Mathlib Initiative put out a joint statement: "We have full confidence that Alpöge's proof of the Riemann Hypothesis is correct."

Nobody has read those 17 million lines, and nobody plans to. The confidence comes from a chain of machine checks, each aimed at one specific way a formal proof can be wrong. This post walks through that chain: what was checked, with which tools, what was still running when I looked, and what the checks cannot tell you. The statement is the top story on Hacker News this weekend, with about 950 points and 800 comments.

What was released

Alpöge's announcement is a four-page note. "I believe I have, working with Claude, discovered a proof of the Riemann Hypothesis," it says. He describes steering the work towards the right setting and then being overtaken: "Claude far outpaced me near the finish line." The note includes a timeline, which he says Claude compiled, running from 6 October to 16 November 2026. It does not name the Claude model.

He is open about the odd position this leaves him in. He writes that he is "presenting the world with a complete argument before having mastered a massive neighbourhood around its mathematics". A written version exists in some form. A footnote says it came to more than 250,000 pages, and he chose not to post it: "I decided to only present Lean." He expects the argument to be "massively simplified, likely immediately", and says he intends to write it up properly.

The numbers, from the community's notes on the archive:

  • Download: 14 archive parts that join into one 239 MB file.
  • Source: 175,187 .lean files, 17,374,215 lines, about 1 GB of text. There are no comments.
  • Contents: 818,755 theorems and lemmas.
  • Dependencies: Mathlib, the community's mathematics library, at tag v4.33.1, on Lean v4.33.1.

What it claims to prove

Five theorems, all stated with Mathlib's own definitions. Sutherland's page lists them:

  1. The Riemann Hypothesis, in Mathlib's wording: every zero of the zeta function other than the trivial zeros has real part 1/2.
  2. The same statement written out in the submission's own words. Lean accepts the two as equal by definition.
  3. No Dirichlet L-function has a zero with real part greater than 1/2, for every modulus and every character.
  4. Every zero of a Dirichlet L-function inside the critical strip lies on the critical line.
  5. The same for primitive characters, which is the usual form of the Generalized Riemann Hypothesis for Dirichlet L-functions.

The page is careful about scope. "GRH" here means Dirichlet L-functions. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general "are not among the statements that were checked". Alpöge's note says he expects the Extended Riemann Hypothesis to follow "with more time", which is a prediction and not part of the release.

Why "it compiles" is not enough

Lean is a programming language and a proof assistant. A theorem statement is a type, a proof is a program of that type, and a small trusted component called the kernel does the type checking. If the kernel accepts the program, the statement follows from the axioms.

That leaves several ways to be fooled, and the Xena Project blog set them out on 12 November, eight days before this proof appeared. It lists four questions to ask of any Lean repository, "particularly if it is AI-generated":

  1. Does the Lean statement match the informal statement?
  2. Does the code compile?
  3. Does the code prove the theorem as stated?
  4. Does the code exploit a bug in Lean's official kernel?

The joint statement says all four criteria are satisfied. Lean's own reference manual takes the same hard line on trust. It files "un-reviewed AI-generated proofs and programs" under proofs that may be malicious, and recommends its Comparator tool for those.

1. The statement is two lines, and humans read it

This is the only part that depends on people. The statement of the Riemann Hypothesis is already in Mathlib, where the joint statement says it "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 / 2

In words: if zeta is zero at s, and s is not one of the trivial zeros −2, −4, −6 and so on, and s is not 1, then the real part of s is 1/2. The s ≠ 1 condition is there because Mathlib gives zeta a placeholder value at its pole.

The Xena post shows why this step matters. It gives a two-line Lean definition that looks like Fermat's Last Theorem and is trivially false, because Lean's natural numbers include zero. A wrong statement compiles just as happily as a right one. Here the statement comes from Mathlib and not from the submission, so the proof had no say in it.

2. The code compiles

Sutherland reports that all 175,187 modules compile with zero errors. The joint statement says dozens of people have reported the same result and produced the same export file. The community repository's static scan found no sorry, no added axiom and no native_decide in the source. Its notes add the right caution: "A text search is not a proof."

The notes also explain why a clean build alone is weak evidence here. The project is pinned to Lean v4.33.1 from August, which lacks some later fixes to Lean's runtime. In their words, a pass by that kernel alone "counts as limited evidence". The checks that carry the weight were run with Lean v4.36.0 and with independent checkers.

3. The code proves that statement and nothing else

Seventeen million lines leave a lot of room to cheat. A proof file could quietly redefine a symbol, or add a new axiom that says the theorem is true.

The defence is a second, tiny file. The community wrote Challenge.lean, which imports only Mathlib and states the five theorems with their proofs left empty. A tool then compares the theorems in that trusted file against the theorems the submission proves, and checks which axioms the proofs rely on. Lean's tool for this is Comparator. Sutherland's page reports:

  • The five theorems depend only on Lean's three standard axioms: propext, Classical.choice and Quot.sound.
  • Two independent implementations of the statement matching, in the checkers con-leche and con-ron, each confirm all five theorems against the challenge file.
  • Comparator's own statement comparison and axiom check passed. A full end-to-end run with the standalone Comparator v4.33.0 finished on 23 November and passed. The lake comparator run that ships with Lean v4.36.0 was still going. See below.

4. Independent kernels accept it

The last question is whether the proof exploits a bug in the checker. This is a real risk with a track record. Leonardo de Moura's post-mortem from 1 August describes an AI-assisted "disproof" of the Collatz conjecture that passed Lean's kernel through a bug in how it handled one kind of type. It also passed a week-old copy of nanoda, the main external checker, through a second, unrelated bug.

Lean's answer was more kernels. Since October it ships with four extra ones, written in Lean and Rust. Two of them, con-leche (written in Lean) and con-ron (its Rust port), come with a formal proof that any set of declarations they accept has a model in set theory. The names stand for "consistent Lean checker", and "con-leche in Rust".

Results on this proof, from Sutherland's page as of 03:30 UTC on 24 November:

CheckerWhat it isResult
Lean kernel, module by moduleThe official kernel, replaying each compiled filePass, 175,187 of 175,187
nanodaIndependent kernel in RustAccepts the full export, 27 min 42 s on 80 threads
con-lecheKernel in Lean with a consistency proofAccepts 1,468,418 declarations, 3 min 15 s on 64 threads
con-ronRust port of con-lecheAccepts, and confirms all five theorems
lean4leanKernel in Lean that follows the official C++ one closelyPass on all 175,187 modules. Five needed a higher step limit
Lean default kernel on the exportThe official kernel, single-threadedAccepts. Finished at 18:44 UTC on 22 November after 48 h 3 min, with peak memory of 82.6 GiB
Lean paranoid kernel on the exportThe official kernel in its paranoid mode, single-threadedAccepts. Finished at 19:01 UTC on 23 November after 72 h 20 min, with peak memory of 98.8 GiB. A second run with one allocator setting changed also accepts, after 10 h
Comparator v4.33.0, end to endThe standalone judge binaryPass, "Your solution is okay!". Finished at 09:10 UTC on 23 November after 64 h 8 min
lake comparator (Lean v4.36.0), end to endLean's official judge, as shipped with LeanStill running. Statement and axiom checks passed. Its paranoid kernel and nanoda stages accepted on the evening of 23 November, and the last stage, Lean's default kernel, is under way

Two notes on those rows. The allocator setting is an environment variable read by the unmodified binary, and Sutherland's page says it "changes nothing about what is checked". The same change cut the default kernel's time from 48 hours to about 9. And the Comparator v4.33.0 run is not quite the run this post was waiting for: the page says it was run on the files from the original build, and that "its lake build step was satisfied by a stub". The lake comparator run is the one that does everything from scratch, and its remaining stage is Lean's kernel on the export.

One detail from that page is worth knowing. The con-leche and con-ron binaries bundled with Lean v4.36.0 declined the proof, because they did not support one kind of inductive type it uses. That is a refusal to judge and not a rejection. The versions built from current source accept it.

The checks ran on an export

Building a Lean project can run arbitrary code, the same as npm install can. I wrote yesterday about an npm package that used its install script to plant a backdoor. A hostile proof could try the same trick against the machine that checks it.

So the checkers never touch the source. The proof is first exported to a plain data file that holds only the declarations the five theorems depend on, in the kernel's own simple format. For this proof that file is 61.6 GB, or 7.7 GB compressed. The joint statement calls it "an inert export of the proof, out of reach of hypothetical malicious code in the Lean proof sources".

Sutherland then rebuilt everything on a separate machine inside a sandbox with no network and a read-only source tree. The export from that build is byte-for-byte identical to the published one, so every check on the published file applies to an export that was produced under controlled conditions.

The rebuild turned up one mismatch among the compiled files. One module out of 175,187 produced a different hash. It was traced to a race in Lean v4.33.1, where two theorems elaborated in parallel compete to name a bound variable in an auto-generated lemma. The two outputs differ in 38 bytes, the difference has no logical effect, and the lemma is not in the export. That race is fixed in Lean v4.36.0. It says something about the care involved that a 38-byte difference in one file got a root cause.

What the checks do not tell you

  • Why it is true. The checks say a proof exists. They do not explain it. The joint statement ends by looking forward to work "that will help explain the new ideas in this proof".
  • Anything outside Lean and Mathlib. Sutherland's caveat is the precise version: a passing check shows the formal statements "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 intended to be".
  • That the checkers are perfect. De Moura wrote in October that con-leche "is not bulletproof, because there might be bugs in the compiler and runtime used to build it". Its consistency proof is itself checked by the official Lean kernel, and assumes the set theory in the model is consistent.
  • That humans did the checking. Con-leche was "implemented and proven consistent by Claude", under supervision by Joachim Breitner of the Lean FRO. Sutherland's page says his checks were "run with Claude Code". So Claude helped write the proof, one of the checkers and some of the verification runs. The counterweight is nanoda, which a person wrote in Rust, and the fact that every result on the page can be reproduced from published files and hashes.
  • That the prize is settled. The Clay Mathematics Institute has announced nothing. Its page for the Riemann Hypothesis listed the problem as "Unsolved" when I first read it. On 23 November the label changed to "Active", and its list of Millennium problems now puts the Riemann Hypothesis under "Active problems" next to Navier-Stokes. I found no explanation of the label on Clay's site and no news item about the proof. Its rules say a solution must be published in a qualifying outlet, two years must pass, and the solution must have "general acceptance in the global mathematics community".

The reaction from mathematicians quoted so far is strong. Sutherland told Scientific American, after compiling the proof himself, "This is indeed an historic moment." Two other mathematicians quoted in the same article speak in conditionals. One begins "If the proof is correct and understood", the other "If true".

What transfers to ordinary software

This section is my own reading. Most of us will never check a proof of anything, and most of us are now reviewing code that a model wrote. Four habits from this weekend carry over.

Review the specification, and let machines check the rest. Humans read a two-line definition and five theorem statements. Machines checked 17 million lines against them. The split works because the spec is small, written by people who did not write the implementation, and kept in a file the implementation cannot change.

Treat generated code as hostile while you build it. The independent rebuild ran in a sandbox with no network and a read-only source tree, and the Xena post tells readers to sandbox AI-generated Lean before compiling it. That is a sensible default for any large body of machine-written code.

Check the artefact. The kernels judged an exported data file, which cannot run anything. The software equivalent is verifying the built output, such as the container image or the bundle, and not trusting a build log.

Use independent implementations and compare bytes. Five kernels in three languages, plus a rebuild on a second machine with matching hashes. One bug is plausible. The same bug in all of them is much harder to believe.

There is a limit, and it is a big one. All of this depends on having a complete formal specification, and almost no production software has one. A test suite is not a kernel. A passing test run says the code did the right thing on those inputs, and nothing about the rest.

Check it yourself

If you have a very large machine, Sutherland's page gives the commands. He says you need Lean v4.36.0, roughly 100 GB of RAM and 70 GB of disk. I have not run these.

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 on the page

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

The page says 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. The files and their hashes are on the verification page, and the source with the challenge file is in the community repository.

What is still unknown

  • One run is still going. Of the two this post was waiting for, one is done: Lean's default kernel accepted the full export on Sutherland's machine at 18:44 UTC on 22 November. The paranoid kernel with default settings, which was still running at 14:35 UTC on 23 November, has finished too. The page as updated at 03:30 UTC on 24 November reports that it accepted at 19:01 UTC on 23 November, after 72 h 20 min on one thread. The other run this post was waiting for, the end-to-end lake comparator run with Lean v4.36.0, has been going since 20 November and was still running at that update. It has moved, though. The page says its paranoid kernel stage accepted at about 19:53 UTC on 23 November and its nanoda stage at about 21:31 UTC. The last stage, Lean's default kernel, started then. The page notes that this stage is single-threaded and took 48 hours when run on its own.
  • The outside run now has company. A GitHub user posting as twinheterodox published a machine-readable receipt dated 01:56 UTC on 23 November, recording Lean's kernel accepting the same export. On its own that was a single self-reported run by a pseudonymous account. Sutherland's default-kernel result is for the same file hashes, so I now count the official kernel's pass over the export as done.
  • A proof people can read. Alpöge says he will write one. The community has started trimming the code. On 22 November its repository notes said 10,724 files that the main theorem did not need had been removed. The notes have since dropped the count because it changes with each merge.
  • Which Claude model did the work, and how. The note does not say. I did not find a statement from Anthropic.
  • The wider GRH. The checked statements cover Dirichlet L-functions only.

I will update this post again when the lake comparator run finishes.

The short version

  • What happened: a Lean proof of the Riemann Hypothesis, and of GRH for Dirichlet L-functions, was published on 20 November 2026 by Levent Alpöge of Anthropic, who says he found it working with Claude.
  • How big: 175,187 files and 17.4 million lines, with a 61.6 GB exported proof.
  • Who vouches for it: the Lean FRO and the Mathlib Initiative, in a joint statement. Its byline first credited the Lean and Mathlib communities as a whole and was narrowed on 23 November.
  • What was checked: the statement is Mathlib's own, the code compiles, the proof matches the statement and uses only the three standard axioms, and independent kernels including nanoda, con-leche, con-ron and lean4lean accept it. Lean's own default and paranoid kernels accept the full export, and a complete Comparator v4.33.0 run passed on 23 November.
  • What was still running: the lake comparator run with Lean v4.36.0, on Sutherland's machines. At 03:30 UTC on 24 November it was on its last stage.
  • What is missing: a human-readable proof, and any understanding of why the argument works.
  • For developers: a small trusted spec, sandboxed builds, inert artefacts and independent checkers are how you verify code nobody can read.

Frequently asked questions

Has the Riemann Hypothesis been proved?

A formal proof was published on 20 November 2026 as Lean code, and a joint statement by the Lean FRO and the Mathlib Initiative says they have full confidence it is correct. Independent proof checkers and Lean's own kernel accept it. No human-readable proof exists yet, the Clay Mathematics Institute has announced no award, and its prize rules require publication and a two-year wait.

Who proved it, and what did Claude do?

Levent Alpöge, a mathematician at Anthropic, published the proof and says he found it working with Claude. In his note he says he steered the work to the right setting and that Claude far outpaced him near the finish line. The note does not say which Claude model was used.

How can anyone trust 17 million lines of code nobody has read?

Nobody needs to read the proof. People read the statement, which is a two-line definition in Mathlib. Programs then check that the 17 million lines prove exactly that statement from the three standard axioms. Several independent checkers written in different languages accept the same exported proof.

Could a bug in Lean make a false proof pass?

It has happened. In July 2026 an AI-assisted fake disproof of the Collatz conjecture got past Lean's kernel and an old version of one external checker. Since then Lean ships with extra kernels, and two of them come with a formal consistency proof. A false proof would now need to fool all of them at once.

Does this break encryption or change anything for developers today?

No. Scientific American's report says the result has no immediate real-world applications and will not upend global banking. The part that transfers to software work is the method used to check a huge body of machine-written code without reading it.

Get The Shipping Forecast

One email on Thursdays: what I tested and wrote that week, plus one tool worth your time.

You'll get a confirmation email first. Unsubscribe in one click. Privacy policy.