← In the News

The Lean proof of the Riemann Hypothesis, rewritten by Claude in about 76,000 lines

grh-lean: GRH for Dirichlet L-functions, in Lean 4 · GitHub account lsernau, copyright Anthropic, PBC · GitHub, November 25, 2026

Machine-readable Download Markdown

On November 20, Levent Alpöge released his proof as a Lean library of 17 million lines of code, according to the Lean FRO and Mathlib Initiative statement that certified it. The new repository, created on November 25, holds two rewrites of that proof. Its top-level README says it was "produced in collaboration with my colleagues at Anthropic, and Claude", and each edition's README states: "The Lean text and the documents in this project were written by Claude (AI)." It is published from a personal account, not an Anthropic one, and the license names Anthropic, PBC as copyright holder.

The rewrite follows Alpöge's method, but the READMEs say "many steps are proved by other arguments," and that parts, mostly background material, were ported from Alpöge's proof and then rewritten. The compact edition is about 76,000 lines of code, and its README is blunt: "The proofs are written to be short, not to be easy to read." The readable edition is about 300,000 lines. It separates 495 files of background results, which the README classes as known in the literature, from 306 files that carry the new argument, and adds a reading guide, an index of results and a reference list that says which citations were compared with their sources.

Both editions come with machine checks. Each proves the same five theorems, the first with Mathlib's existing RiemannHypothesis type, using only the axioms propext, Classical.choice and Quot.sound. Each ships a challenge file that states the theorems with the proofs left out, and the authors report that the Comparator tool checked both editions against it and accepted them. The readable edition's export was also accepted by three independent checkers, nanoda, con-leche and con-ron; for the compact edition the README reports a replay through Lean's own kernel. The repository is equally plain about the limits: "No mathematician has read it through, and no paper comes with it." It does not say how the rewrite was produced, which Claude model was used, or at what cost. A build takes one to two hours on 12 cores with 24 GB of memory.

On Hacker News the submission had 199 points and 88 comments about two hours and sixteen minutes after it was posted. One commenter questioned the "from Anthropic" framing in the submission's title, since the repository is not on an Anthropic account.

Why it matters: The original proof was accepted, with no human-readable paper, because it could be checked by machine against a theorem statement written apart from it. The same fixed statement is what makes this rewrite acceptable: a model rewrote the proof, and the checks were run again to show it still proves the theorems as stated. Agent-written code gets the same option only when its acceptance tests are fixed and written apart from the code; with those in place, a team can hand an agent a large cleanup or restructuring later and check the result instead of reading it. How this rewrite was done is not disclosed, so its cost is not something to plan around.