Levent Alpöge releases a Lean 4 proof of the Riemann Hypothesis, written with Claude
Treemap of the Riemann Hypothesis Lean Proof
On 20 November 2026, Levent Alpöge published a Lean 4 formalization—written with Claude—that states and proves the Riemann Hypothesis and its generalization to Dirichlet L-functions. The source spans 175,187 modules and 17.4 million lines, with the entire claim resting on two files: Statements.lean defines four propositions, and Main.lean proves them by citing theorems from the other 175,185 modules. An interactive treemap lets you explore every module, its imports, and the proof's structure.
In the import graph no module is unreferenced: every module except Main.lean is imported by at least one other module.
- nl
This is great, because it graphically makes the point that the headline "17 million lines" is huge mostly because it contains formalizations of many long-proven theorems.
It's not really fair to say "its rubbish because it is so big" when 13% of the modules are algebra alone.
- jrflo
Grant Sanderson of 3b1b said in an interview that he thinks Math will become a data-rich field. I wonder if something like this is the beginnings of that.
(Sidenote, I love how you can take the Zeta function of the entire map via that slider, very fun)
- wscottc
Excellent! I made something in the same spirit, working with Claude: navigable SVG posters of the proof's dependency graph from the reading blueprint, e.g. Main.lean theorem by theorem, chapter by chapter, the longest chains of reductions, new vs. published results, and every statement by depth from the main theorems.
All pinned to sources.
https://scottcochran.github.io/riemann-diagrams/
Credit to Levent Alpöge, the riemann-blueprint authors and the leanprover-community mirror. Everything drawn is theirs.
- qwertyforce
I think we should have some sort of a competition, shortest RH proof in lean. Maybe shorter proofs are simpler
- pengowray
Wanted to get a feel for the size and scope of the 17 million line machine-verifiable solution to the Riemann Hypothesis. Something which was once the holy grail of mathematics, and now seen as a threat, an attack, or dismissed as missing the point. I don't expect to understand it, as it is now, any more than I expect to understand a rainforest.