Anthropic researcher Luke Sernau and colleagues used Claude to rewrite a claimed Lean proof of the Riemann hypothesis and the generalized Riemann hypothesis. Their grh-lean project offers two versions: a compact one with about 76,000 lines of code, and a longer one with documentation to help mathematicians follow the argument. Sernau said the rewrite passed machine checks, but as of November 26, 2026, no mathematician had read it in full and there was no accompanying mathematics paper.
Why removing unused code wasn’t enough
Mathematician Levent Alpöge and Claude’s original formalization was reported at 17.4 million lines across 175,188 files. A community project called rh-trim found that the final argument accounted for only 6.6% of the proof. That did not make the rest disposable: much of it established mathematical results the argument relied on. Removing declarations the final theorem did not reference cut the line count by at most about 8%, and the trimmed version never compiled, according to rh-trim.
Sernau described a different approach: expand definitions until steps hidden in separate modules are visible side by side, simplify the resulting chain of reasoning, then package the shorter argument back into definitions. Some reductions required new mathematics rather than code cleanup. In one case, Sernau said, a different argument eliminated the portion dealing with Vandiver’s conjecture.
Two versions for different tasks
grh/, intended for readers, contains about 300,000 lines of code across 801 files, or 477,000 lines in total. It includes documentation and navigation guides.grh-compact/, intended to minimize code size, contains about 76,000 lines of code across 792 files. That rises to about 95,000 nonblank lines when comments are included, or 113,000 lines in total.
The reported build times give a practical sense of the change, though they are not a controlled benchmark. The original took 21 hours to compile on a high-end AWS machine. The rewrite reportedly builds in one to two hours on a 12-core machine with 24 GB of memory, provided that Mathlib, Lean’s mathematics library, is already cached.
What the checkers verified
The team reported that 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. All accepted the formal proof, according to the team. It reported no uses of sorry, Lean’s placeholder for an unfinished proof, and listed only three axioms: propext, Classical.choice and Quot.sound.
Those checks concern the statements as encoded in Lean. They do not substitute for mathematicians examining the definitions and theorem statements to confirm that they express the intended conjectures. The documented version gives reviewers a starting point for that work. The project README credits Claude with writing all the Lean code and documentation under human direction. Unlike the original release, which did not specify a license, grh-lean is available under Apache 2.0.