grh-lean: how to check the 76,000-line Riemann proof
2026-11-28 · 4 min read
grh-lean is a Lean 4 repository, published November 25 by Anthropic's Luke Sernau, that proves the same five Riemann Hypothesis theorems as Levent Alpöge's Claude-assisted proof in about 76,000 lines of code instead of 17.4 million. Two mathematicians have already rebuilt and checked it on their own hardware, and you can run the same checks on one machine in a few hours.
If you missed round one, our post on the original Claude Riemann Hypothesis proof covers Alpöge's November 20 note and the Lean community's certification. The problem then was size: 175,187 files that nobody could read.
The posts that spread it
Most people saw the news from @kimmonismus, who posted late on November 25 that Anthropic researchers had used Claude to cut the formalization by about 99.56%: "17.4 million lines of Lean down to 76,000." By Saturday the post had passed 750,000 views.
Two days later @dummerspast39 reported that MIT and Waterloo had both checked it: "Six kernels accept it, 794 of 794 modules, 0 rejected." Both posts line up with the checkers' own logs, linked below.
What changed
The repository says Sernau made the shorter version with colleagues at Anthropic, and Claude. It doesn't name a Claude model. There are two editions, and both state the same theorems:
| Version | Files | Lines of code | Lean |
|---|---|---|---|
| Alpöge original (Nov 20) | 175,187 | about 15.5 million (17.4 million with comments) | v4.33.1 |
grh-lean readable, grh/ |
803 | about 300,000 | v4.35.0 |
grh-lean compact, grh-compact/ |
794 | about 76,000 | v4.35.0 |
The counts come from Andrew Sutherland's check page at MIT. OfficeChai, citing Sernau's public comments, describes how it got so small: he unrolled every definition into one flat proof, found simplifications across modules, then folded it back into a normal project. It also reports that he dropped material related to the Vandiver conjecture and that the final argument uses about 6.6% of the original. Treat that as secondhand, since the README itself covers only the editions, requirements and checks.
How it was checked
Michael Rubinstein at the University of Waterloo had Claude Code run his checks within hours of the release. His check page shows all 794 compact modules compiling in about 28 minutes, Lean's kernel replay accepting all 794, and the five main theorems relying only on Lean's three standard axioms. He also ran lake comparator --paranoid, which confirms the proof matches statement files that import nothing but Mathlib. It took about five hours, and six separate kernels accepted the result. His cluster blocks the comparator's sandbox, though, so that run was unsandboxed.
Sutherland's MIT page fills that gap. His sandboxed runs passed on a 16-core AMD machine and on a 192-core AWS server, and the exports were byte-identical. The page also links a Lean proof, built on the compact edition, of Schoenfeld's bound, an explicit prime-counting error bound that follows from the Riemann Hypothesis.
How to check it yourself
Sutherland's instructions assume Linux with elan (the Lean installer) and bubblewrap for the sandbox. The README estimates one to two hours on 12 cores with 24 GB of memory, plus about 85 minutes if the Mathlib cache has to be built.
- Clone
https://github.com/lsernau/grh-leanandcd grh-compact. - Run
lake exe cache getto download prebuilt Mathlib. - Run
lake buildto compile all 794 modules. - Run
lake env lean scripts/PrintAxioms.lean. You should see onlypropext,Classical.choiceandQuot.sound. - For the full audit, follow Sutherland's page. It pins commit
72fead10and gives thelake comparator --paranoidcommand, plus aPATHfix you need or the nanoda kernel won't be found.
Start with the compact edition. On the readable one, Sutherland reports a kernel that needed 332 GB of memory, against 7 GB for the compact.
What is still open
The README is plain about it: "The proof has passed machine checks only." No mathematician has read it through, and no paper comes with it. Rubinstein hosts a 45-page outline of the shortened argument, marked as a work in progress and written with Claude, Codex and Gemini. Sutherland points out that the old and new versions use different Mathlib releases, which nobody has formally shown to be equivalent, although the statements match word for word. The Clay prize needs publication and then two years of acceptance, so that clock hasn't started.
Still, a person can sit down and start reading 76,000 lines, which was never true of the 17-million-line version.
What this means for a business
Round one showed that people trusted the work because something other than the AI checked it. Round two shows a second pass can shrink the output enough for a person to review it, and the checks still pass. Anthropic's formal verification tools and the Axiom CFSG Lean proof rest on the same idea.
Business AI work runs into this at a smaller scale. An agent hands back a 40-page report, or an automation that works but sprawls so much nobody wants to audit it. Ask for the short version and keep the checks. New Face Design's free process audit can help you work out where those checks belong in your business.