Riemann Hypothesis proof: the confirmed Claude proof is now 76K lines
The Riemann Hypothesis proof was confirmed by the Lean and Mathlib communities, and it now has a version over 200 times shorter. I look at what it tells us.
This article in other languages:Polski
In this article
The formal Riemann Hypothesis proof that Levent Alpöge, a mathematician who works at Anthropic, published on November 20, 2026 now has a shorter version: the grh-lean repository, which reached the front page of Hacker News on November 25. The original ran to 17 million lines of Lean code, and on November 21 the Lean and Mathlib communities declared it correct in a joint statement. Alpöge wrote in a four-page note that he found the proof together with Claude.
How many lines is the Riemann Hypothesis proof now?
The repository’s author, a user called lsernau, writes in the README that he prepared it with colleagues at Anthropic and with Claude, and the license (Apache 2.0) names Anthropic, PBC as the copyright holder. Inside are two editions of the same result:
| Edition | Lines of code | Lines including comments and blanks | Files in Lib / New |
|---|---|---|---|
grh/ (for reading) |
about 300,000 | 477,000 | 495 / 306 |
grh-compact/ |
about 76,000 | 113,000 | 573 / 219 |
So the compact edition is more than 200 times shorter than the original, and the reading edition more than 50 times. Both prove the same five theorems as Alpöge’s formalization: the Riemann Hypothesis in Mathlib’s RiemannHypothesis formulation and in a second form, plus three variants of GRH (the Generalized Riemann Hypothesis) for Dirichlet L-functions, for all moduli and characters. They depend only on the three standard Lean axioms.
According to the READMEs of both editions, the project follows Alpöge’s method, but many steps have different proofs, and some of the material (mostly background) was carried over from the original and written anew. Claude wrote the Lean code and all the documentation: “The Lean text and the documents in this project were written by Claude (AI)”. The repository does not say which version of the model was used.
That Claude can write formal proofs at scale we already saw in October, with the verification of 123 open source libraries. Here the job was the reverse: the README of the compact edition says the proofs were written to be short, not easy to read.
What can we learn from the reading edition?
Until now we had only Alpöge’s note and an archive of code in 14 parts. Now there is a GUIDE.md file with a reading order, a glossary and a table of sizes, so for the first time we can see how the argument is built.
The code splits into two parts. Lib holds results classified as known from the literature but missing from Mathlib, among them pieces of class field theory, p-adic Hodge theory and the theory of Shimura varieties, often in a weaker form that is enough here. New is the argument proper. The authors note that the split is a working one and that the name New claims nothing about novelty.
The proof itself, according to the guide, rests on three theorems, labelled A, B and C, tied together by a single inequality (star_inequality).
Who checked the proof?
Lean is a programming language that checks every step of a proof, so the checkers do not have to read the whole argument line by line. What they do have to make sure of are the three things Kit Yates listed on November 20 on his Substack: whether the theorem proved in Lean really is the Riemann Hypothesis, whether the definitions in the code faithfully match the standard mathematical objects, and whether no extra assumption slipped in along the way.
The original passed that check in about a day. The November 21 statement is endorsed by the Lean FRO and the Mathlib Initiative, and its authors write: “We have full confidence that Alpöge’s proof of the Riemann Hypothesis is correct”. The theorem is Mathlib’s RiemannHypothesis, a formulation that, according to the statement, experts in Lean and in number theory have checked. The community added a separate file containing just the theorem and importing only Mathlib, and two independent tools (comparator, and con-leche in --compare mode) confirmed that the library proves exactly that theorem.
The exported proof went through the official Lean kernel and several independent checkers written in different languages. Two of them, con-leche and con-ron, come with a formal proof (relative to set theory) that they will not accept a false proof, which is meant to settle the worry that the error sits in Lean’s own logic. The summary kept by Andrew Sutherland of MIT has the numbers: 175,187 modules compiled without an error and 1,468,418 declarations accepted by con-leche (as of November 21, 12:55 UTC; two tests on his list were still running then). Interestingly, he ran his tests with Claude Code.
The shorter version has only machine tests behind it. All files compile without errors and without sorry, the export of the reading edition was accepted by the independent checkers nanoda, con-leche and con-ron, and both editions passed Comparator, a tool that compares the proved theorems against a separate file containing only the statements. The README adds, however, that no mathematician has read the proof in full and that no paper accompanies it: “No mathematician has read it through, and no paper comes with it”.
The checked theorems have their limits too: Dedekind zeta functions, Hecke L-functions and automorphic functions are not covered by them. A Lean formalization as the main evidence is, for that matter, something we already saw in October, when an OpenAI model was said to have disproved the exponential time hypothesis, also with an independent group checking it.
What did Alpöge write about the proof?
The Riemann Hypothesis was stated in 1859. It says that all the “non-obvious” zeros of the zeta function have real part equal to 1/2. That is how the Clay Mathematics Institute describes it, and Clay put it on its list of Millennium Prize Problems. In practice it is about how precisely the distribution of prime numbers can be predicted.
The note opens carefully, with the author saying he “believes” he has discovered a proof: “I believe I have, working with Claude, discovered a proof of the Riemann Hypothesis”. Then it goes further than the title promises. According to Alpöge, the same method also settles GRH, and “with more time” it should cover the Extended version too.
A proof in the usual sense, a paper you can read, still does not exist. Alpöge writes that the argument is “incredibly long”, and that the fully detailed document he generated for fun ran past 250,000 pages. He decided that posting that kind of “slop” would be inappropriate, so he released only the Lean. He also admits that he presented a complete argument before having mastered the mathematics around it, he expects the proof can be greatly simplified, and he promises a proper write-up and talks. The authors of the statement do not describe the idea of the proof either, and are waiting for mathematicians’ work that will help explain the new ideas.
The author is not a random person. On his website Alpöge lists himself as an Anthropic employee and a junior fellow at the Harvard Society of Fellows, and his most recent listed paper resolves Hilbert’s tenth problem for all number fields (with Manjul Bhargava, Wei Ho and Ari Shnidman).
What was Claude’s part in it?
A large one, according to the note, and in the part of the argument the author has not yet mastered himself. Alpöge describes steering the work to the point where two different ideas from a simplified “toy setting” had to be combined, and then the model got ahead of him: “Claude far outpaced me near the finish line”.
He gives one example which, in his view, is enough to make mathematicians “fall out of their chairs”. The argument descends from Stepanov’s method for function fields, where multiplicity is the key ingredient, and multiplicity is hard to find over the integers. The way around it is supposed to be a chain of so-called “theta lifts”, and Claude suggested that for a von Mangoldt sum of length X the chain should have length √X. That detail is now visible in grh-lean: in the guide’s table of sizes, the number of lifts m lies between √x and 2√x.
The note also contains a 20-item timeline that Claude put together. The first entries are dated October 6, 2026, most of the final steps November 15, and the last one, titled just “GRH”, November 16. Alpöge warns that where Claude was the expert, he is paraphrasing a summary that “might make zero sense”, and he points readers to the Lean code. The note does not say which version of the model was used.
We saw a similar story on a smaller scale a few days earlier, when Claude solved two open problems in black hole physics.
Why now?
The author calls the timing “horrible”. He writes that everything came together late on a Sunday night, that he asked “Dario” whether he could announce the result, and that “there was a constraint to respect”. He does not say what it was.
For context, Anthropic priced its public offering on November 18 and closed it on November 20. Some people commenting on Hacker News connect those dates. Alpöge answers that in advance: the “cynical view” of the timing is false, he writes, and he could not wait any longer.
There is no post on anthropic.com/news about either the proof or its shorter version (as of November 25, 23:00 UTC). The grh-lean repository sits on a user account, not in the Anthropic organization, which commenters on Hacker News are asking about, and it has the status of a “research artifact”, meaning it is not being developed and does not accept contributions.
How do you build grh-lean yourself?
You need Lean v4.35.0 and Mathlib at a specific commit, both pinned in the project files. In the grh/ or grh-compact/ folder we run:
lake exe cache get
lake build
lake env lean scripts/PrintAxioms.lean
According to the README, the build takes one to two hours on 12 cores and needs 24 GB of memory (without the Mathlib cache, add about 85 minutes). The last command prints the axioms each of the five theorems depends on. Checking with Comparator is heavier: the authors advise setting aside 64 GB of memory and several hours.