Research

Lean and Mathlib communities certify the Riemann hypothesis proof

Lean FRO and the Mathlib Initiative backed a Nov 21 statement: dozens rebuilt the same proof export with zero errors, and two tools matched it to Mathlib's.

Reading glasses resting on a stack of printed pages, the type blurred out of focus

On November 21 at 13:55 UTC, the Lean and Mathlib communities published a joint statement on the Lean community blog, endorsed by the Lean FRO and the Mathlib Initiative, certifying that the Riemann hypothesis proof Levent Alpöge released the day before is correct in both statement and proof. The basis is a set of actions anyone can repeat: dozens of people built the same code and produced the same raw proof export, and a separate file importing only Mathlib let two independent tools compare the theorem with Mathlib’s own definition.

Key points

  • The certification rests on four questions, not one sentence. The statement borrows the four tests the Xena Project blog at Imperial College set out on November 12: is the statement right, does the code compile, does it prove that statement, and is the proof valid. It says all four are satisfied, and states: “We have full confidence that Alpöge’s proof of the Riemann Hypothesis is correct.”
  • “Dozens reproduced it” means an export file, not a like. The statement says dozens of people reported correct compilation while reproducing the same raw proof export. A verification page at MIT documents one independent rebuild: lake build on a separate machine, zero errors, an export of 61,570,595,788 bytes that matches the published one byte for byte.
  • Two comparison tools agreed. Comparator and the --compare mode of con-leche lined up the statements in a challenge file against the theorems in the submission; all five theorems came back “justified by the solution”, with the challenge importing only Mathlib.

Background

On November 20, Levent Alpöge published 175,187 Lean files, about 17 million lines, with no paper: a four-page note and 14 archives. We covered that release; at the time no independent team had posted a full build, and the public record stopped at “the code is out”.

That entry listed three checks that were still missing: printing the axioms, replaying the build with lean4checker, and reading the local statements line by line. The Xena Project post on November 12 turned those into four questions and applied them to OpenAI’s October dump of 722 math manuscripts, where the Lean-carrying subset had not been systematically tested. Nine days later the same questions were asked of the Riemann proof, and this time each answer came with a log.

The gap is worth noting: the claim and the certification are one day apart, while the stretch between certification and the field digesting the argument has no timetable at all.

How it was reproduced

The community’s first move was to turn “it compiles” into numbers. The MIT verification page, maintained by Andrew Sutherland and last updated on November 22 at 04:35 UTC, records 175,187 modules compiled against Lean v4.33.1 and Mathlib v4.33.1 with zero errors, finishing at 16:43:21 UTC. #print axioms on the five theorems in Main.lean returns only propext, Classical.choice and Quot.sound; the environment holds 15 axioms, all in Init, with none declared outside Lean’s core.

The second move was to rule out a poisoned local cache. The rebuild ran on a different machine inside a bubblewrap sandbox: no network, read-only source tree, only .lake writable, the archive downloaded fresh from the author’s site, and Mathlib’s 8,322 .olean files plus 378 dependencies checked byte for byte against the official cache first.

CheckResultDetail
Full buildpass175,187 modules, zero errors
Axiom auditpassonly the 3 standard axioms
Sandboxed rebuildpassseparate machine, no network, done 18:07:21 UTC
Export comparisonidentical61,570,595,788 bytes
leanchecker kernel replaypass175,187 modules, zero rejections
lean4leanpass175,187 modules, 5 needed a raised step limit
nanoda (Rust kernel)accepts27 min 42 s on 80 threads
con-lecheaccepts1,468,418 declarations, 3 min 15 s on 64 threads

One module of the 175,187 compiles non-deterministically, which is why 175,186 files match the manifest; the page states that rather than rounding it away.

Matching the statement

“It compiles” and “it compiles the Riemann hypothesis” are different claims, and that gap is where the tools do the work. The community added a challenge file that imports only Mathlib, states the five theorems with sorry for proofs, and names the checkers that can process them. Comparator and con-leche’s --compare each compared it against the submission; con-ron, a Rust port of con-leche, reached the same verdict on all five.

The first theorem uses Mathlib’s RiemannHypothesis definition directly, and the fifth is the generalized form for Dirichlet L-functions. The scope is explicit: GRH here covers Dirichlet L-functions only, all moduli and all characters. Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general are not among the statements checked. That limit matters more than the headline “GRH too”.

There is also a cross-check that does not depend on Mathlib’s definition of zeta. Combining the proof with a separate formalization of the Robin and Lagarias criteria (kimihiro64/Robin1984) yields two inequalities about divisor sums that never mention zeta, with no hypotheses; those passed the same axiom audit and the same checkers. The verification page counts 1,801 Mathlib and core declarations behind the Lagarias inequality and 2,050 behind Robin’s.

What others say

The Hacker News thread on the statement reached 933 points and 794 comments, and the recurring objection was not “the code has a bug” but “where does this verification stop”. One highly rated comment argued that the community verified only the Lean proof, and that a human-readable argument is still what proves a theorem. Another recalled a fake refutation of Collatz that got past one of these checkers in the past, so “independent checkers” are less independent than advertised. A reply pushed back: faking this one would mean fooling several kernels at once, written in different languages, two of them carrying consistency proofs.

Chinese coverage followed the statement closely. IT Home’s report on November 22 at 10:31 translated all four criteria and the full text; ifanr added the scale from the MIT record, 175,187 modules with zero errors, and relayed the author’s account of Claude’s role. A Huxiu reprint put the timing next to another event: the statement landed during a conference marking Riemann’s 200th birthday, where 丘成桐 and 徐文强 held a press conference in Shenzhen. Oxford’s Maynard put his own confidence at 98 to 99 percent, then added that nobody understands the proof yet, so in a sense nothing has changed.

Terence Tao collected the reactions on November 21: the German Mathematical Society’s presidium statement on AI and mathematics, an Oxford Mathematics conversation on AI, and a run of commentary pieces. The collection is itself a signal. The profession’s question has moved from “is it true” to “what now”.

What is still open

The certification is not closure. The verification page marks, as of 04:35 UTC on November 22, that the Lean default kernel and the paranoid kernel are still replaying the full export, and that the end-to-end lake comparator run is still going. What has finished is the per-module leanchecker replay, nanoda, con-leche, con-ron and lean4lean. The statement’s phrase “Lean’s official kernel” therefore rests, in the record, on a module-by-module replay rather than a single verdict on the whole export.

The Clay Mathematics Institute’s path has not moved: the $1 million still requires publication in a qualifying journal, a two-year wait and general acceptance by the field. There is no paper, only a four-page note, a codebase and a pile of checker logs.

Then there is the human part. Nobody has read 175,187 files and 17 million lines. The author says he will spend time understanding and simplifying the argument, with no timetable. Maynard splits “understanding” into two steps: use AI to compress the proof to a readable length, then have people extract the overall idea. What the statement certifies is a formal statement and a formal proof; the natural-language argument above that layer is still missing.

Our take

For teams working on AI for mathematics, what carries over is a verification procedure, not a verdict. The order matters: pin the statement in a file that imports only trusted code, reproduce the export in a sandbox and compare it byte for byte, replay it through several kernels, and only then talk about what was proved. Drop any step and the remaining claim needs a discount.

The cost also has numbers now. The page puts reproduction at roughly 100 GB of RAM and 70 GB of disk; nanoda takes about 28 minutes on 80 threads, con-leche under four minutes on 64, and the Lean kernel replays are single-threaded and take hours. In other words, a lab can now independently audit a proof of this size without first trusting its author.

The honest limits are three. What was certified is that the formal statement matches Mathlib’s definition, not that the Riemann hypothesis has been accepted by the mathematical community. GRH coverage stops at Dirichlet L-functions. And how long comprehension takes is still a guess. The order for judging an AI science claim has not changed either: look at what shipped, then at who is checking it, then at whether the checkers wrote down their boundaries. This time they did, more clearly than in most announcements, and that is the part worth copying.