BlockEdge

Technology and digital life

Anthropic team cuts claimed Riemann hypothesis proof to 76,000 lines of Lean code

Anthropic researcher Luke Sernau and colleagues used Claude to rewrite a claimed formal proof of the Riemann hypothesis and its generalization. Their compact version contains about 76,000 lines of Lean code and, the team says, passed checks by several proof checkers. As of November 26, 2026, Sernau said no mathematician had read the proof in full, and there was no accompanying mathematical paper.

The rewrite makes the argument easier to check on ordinary hardware. The original formalization, released by mathematician Levent Alpöge in collaboration with Claude, spanned a reported 17.4 million lines across 175,188 files and took 21 hours to compile on a high-end AWS machine. The team reports that the compact rewrite builds in one to two hours on a 12-core machine with 24 GB of memory, provided Lean’s Mathlib library is already cached.

Why deleting unused code wasn’t enough

An earlier community project, rh-trim, tried removing code that the final theorem did not reference. That cut at most about 8%, and the trimmed version did not compile successfully. Much of the original code established mathematical results that the final argument relied on indirectly.

Sernau described a different approach: expand definitions until steps hidden in separate modules can be examined together, simplify the resulting argument, then package it back into definitions. Some reductions required new mathematics rather than shorter code. In one case, Sernau said, a different argument eliminated a section involving the Vandiver conjecture.

Two editions, for different readers

The grh-lean project released both editions under the Apache 2.0 license. Its README credits Claude with writing all the Lean code and documentation, with human researchers providing direction and suggestions.

  • Compact edition (grh-compact/): About 76,000 lines of code across 792 files. The count rises to about 95,000 nonblank lines when comments are included, or 113,000 lines overall.
  • Documented edition (grh/): About 300,000 lines of code across 801 files, or 477,000 lines overall. It includes navigation guides for readers who want to follow the argument rather than just run the checks.

The team reports that the rewrite contains no sorry placeholders for unfinished proofs and relies only on three standard Lean axioms: propext, Classical.choice and Quot.sound. It says it replayed every module with Lean’s kernel and cross-checked the result with Comparator v4.35.0 and independent checkers including nanoda, con-leche and con-ron. Those checks address whether the encoded argument establishes its formal statements under the stated axioms. They are distinct from a mathematician’s review of what those statements and their proof establish about the hypotheses.