The new version is more than 200 times smaller, builds in an hour or two on a 12-core machine, and could be the first one humans can actually read.
Less than a week after a 17.4-million-line Lean proof of the Riemann Hypothesis appeared online, Anthropic researchers have used Claude to cut it down to about 76,000 lines.
The original release, which Anthropic mathematician Levent Alpöge put out on November 20, had 17,374,215 lines of Lean across 175,187 files. The new grh-lean repository proves the same five theorems in about 76,000 lines. That is a 99.56% cut, and the new proof is roughly 228 times smaller.

Who did it
The repository belongs to Luke Sernau, an Anthropic researcher. Its README calls it “a Lean 4 proof of the Riemann Hypothesis and of the Generalized Riemann Hypothesis for Dirichlet L-functions, built on Mathlib.” It says the proof is based on Alpöge’s, made with Claude, and that this shorter version was “produced in collaboration with my colleagues at Anthropic, and Claude.”
People in AI may know Sernau’s name from something else. In 2023 he was identified as the author of the leaked Google memo “We Have No Moat, And Neither Does OpenAI,” which argued that open-source models would catch up with the big labs. He worked at Meta and Google and then became a staff researcher at Google DeepMind. He joined Anthropic in 2025.
Two editions
The repository has two versions of the proof:
grh/: a readable edition of about 300,000 lines, with a guide atgrh/GUIDE.mdfor anyone trying to follow the argument.grh-compact/: the same five theorems in about 76,000 lines, written to be as short as possible.
The proof uses only Lean’s three standard axioms, propext, Classical.choice and Quot.sound. It needs Lean v4.35.0 and a pinned Mathlib commit. The README says a full build takes one to two hours on a machine with 12 cores and 24 GB of memory, plus about 85 minutes if the Mathlib cache has to be built first. Reports put the original’s compile time at around 21 hours on a high-end cloud machine.
How the proof was cut down
Sernau described the method in public comments. First he “unrolled” every definition in the original into one very long, flat proof. That let him find simplifications that cross module boundaries, which file-by-file cleanup can’t reach. Then he folded the result back into a normal structured project. Some parts needed new mathematical arguments. Others were dropped entirely. For example, he removed material related to the Vandiver conjecture that the main argument turned out not to need. According to one detailed breakdown, the final argument draws on only about 6.6% of the original proof.
Earlier community efforts did much worse. An automated dead-code removal project reportedly got the size down by about 8% at most, and that trimmed version never compiled. In the Lean community’s own verification repository, one commenter noted that more than 200 contributors had sent over 5,000 pull requests and still had not got the proof below 13 million lines.
Sernau’s own framing is a little more modest. He has described the cut as roughly two orders of magnitude, from about 15 million lines. The difference comes from which baseline you count: Alpöge’s raw 17.4-million-line archive, or a version that has already been partly cleaned up. Either way, the drop is enormous.
Why the size matters
The 17.4-million-line original was already certified as correct by the Lean FRO and the Mathlib Initiative, about a day after it appeared. They confirmed that the formal statement matched Mathlib’s definition of the Riemann Hypothesis and that several independent proof checkers accepted the proof. So the machines had already done their part.
People are the problem. Estimates suggested the original would come to roughly 250,000 pages if written out as human-readable mathematics. Alpöge himself has said he doesn’t fully understand parts of it. Since the result appeared, mathematicians have been split between amazement and unease over a proof that is certified correct but that no one can explain.
A 76,000-line proof changes that. By the same ratio, the compact edition comes to under 1,300 pages of written argument. That is still long, but it is in the range of a serious monograph. A team of number theorists could realistically work through it. The 300,000-line readable edition, with its guide, seems designed for exactly that.
The repository is also open about what has not been done yet. “The proof has passed machine checks only,” the README says, and it adds that no mathematician has read it through and no paper comes with it. The Clay Mathematics Institute still lists the problem as open. Its $1 million prize requires publication and two years of general acceptance by mathematicians.
A remarkable run for AI in mathematics
The compression caps an extraordinary few months for Anthropic in mathematics. In July, Alpöge used Claude Fable 5 to find a counterexample to the Jacobian conjecture, a problem open since 1939. In September, Claude worked autonomously for 11 days to formalize Fermat’s Last Theorem in 13 million lines of Lean. Then, according to Alpöge’s timeline, the Riemann Hypothesis itself fell in a 41-day push. Only a month before that, Terence Tao had suggested AI might not solve the problem until around 2050.
Until now, the pattern has been that AI finds a result first and humans understand it later. The 76,000-line edition is the first serious attempt to close that gap. It also shows a skill that matters outside mathematics. The same AI systems that can produce millions of lines of correct code can also boil that code down to its essentials, much faster than large human teams. Any company now dealing with a growing pile of AI-generated code should take note: the tools that create the bloat may also be the ones that clean it up.
Now mathematicians have to read the proof.