Lean 4: Proofs a Machine Can Check, Chapter 15, 10 min read, updated 2026-12-06
What was checked in the Riemann Hypothesis proof
On this page
- 15.1 What happened, in four sourced points
- 15.2 The statement that was proved, read line by line
- 15.3 The four reasons given for the certification
- 15.4 What the certification does not say
- 15.5 A shorter proof, presented the honest way
- 15.6 The same checks, at a size you can run today
- 15.7 Why it matters anyway

At a glance
- You'll read the exact Lean statement that was proved, see the checks that were run on the proof, and learn to run the same kinds of check on a small example.
- Why it matters: in November 2026 a Lean proof of the Riemann Hypothesis was released, and the Lean FRO and the Mathlib Initiative certified the Lean statement and proof. This chapter says exactly what that means and what it does not mean.
- Time: about 10 minutes to read. You can read this chapter on its own; it points back to the chapters where each tool is taught.
15.1 What happened, in four sourced points
The short version, with every part sourced at the end of the chapter:
- On 20 November 2026 Levent Alpöge, a mathematician who works at Anthropic, released a proof of the Riemann Hypothesis as a Lean 4 library of about 17 million lines. He says he found it working with Claude, Anthropic's AI model. He wrote that he "decided to only present Lean": there is no human-readable paper yet, and he says he intends to write one. Sourced
- On 21 November 2026 the Lean FRO and the Mathlib Initiative published a joint statement. The Lean FRO and the Mathlib Initiative certified the Lean statement and proof (Mathlib's
RiemannHypothesis, standard axioms only). In their words: "We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct." Sourced - The proof also covers the Generalized Riemann Hypothesis for Dirichlet L-functions (checked independently, e.g. by Sutherland at MIT). Other L-functions are not among the checked statements. Sourced
- There is no peer-reviewed, human-readable paper yet. The Clay Mathematics Institute still lists the problem as "Active", and the prize status is unchanged. Sourced
Notice what the certification is about: a Lean statement and a Lean proof. The rest of this chapter is about why that distinction is the whole story, and why it is still a very big deal.
In plain words: Two questions are easy to mix up. First: is this Lean proof correct for this Lean statement? The machine checks answered that. Second: has the mathematical community read, understood and accepted the result? That human process is still going on.
15.2 The statement that was proved, read line by line
Everything depends on what RiemannHypothesis means in Mathlib, Lean's community library of mathematics. A Lean statement is only as good as its definition, so start there. Here it is, printed from the Mathlib version this book is pinned to:
#print RiemannHypothesisdef RiemannHypothesis : Prop :=
∀ (s : ℂ), riemannZeta s = 0 → (¬∃ n, s = -2 * (↑n + 1)) → s ≠ 1 → s.re = 1 / 2Read it as: for every complex number s, if ζ(s) = 0, and s is not one of −2, −4, −6, … (the "trivial zeros"), and s ≠ 1, then the real part of s is 1/2.
A reviewer would check three things (Chapter 14, section 14.6):
The trivial zeros are excluded correctly.
-2 * (↑n + 1)forn = 0, 1, 2, …is −2, −4, −6, …. Mathlib proves that these really are zeros:#check riemannZeta_neg_two_mul_nat_add_oneriemannZeta_neg_two_mul_nat_add_one (n : ℕ) : riemannZeta (-2 * (↑n + 1)) = 0Why
s ≠ 1? Mathematically ζ has a pole at 1, so ζ(1) is undefined. Lean functions must return a value everywhere, so Mathlib'sriemannZetaassigns some value at 1; the source file says "Our construction assigns some values at these points". The hypothesiss ≠ 1makes sure that the arbitrary value cannot matter. This is the same "junk value" issue as division by zero (Chapter 13).Is
riemannZetathe real zeta function? It is defined in Mathlib (by David Loeffler and others) through Hurwitz zeta functions, and Mathlib proves the facts you would expect, for example:#check riemannZeta_tworiemannZeta_two : riemannZeta 2 = ↑Real.pi ^ 2 / 6Mathlib also proves the functional equation and that ζ(s) is the series ∑ 1/nˢ for Re(s) > 1. The joint statement says the Mathlib statement had been "carefully vetted by experts in Lean and number theory".
In plain words: Checking a formal statement is like checking the address on a parcel before you sign for it. A perfect delivery to the wrong address is still the wrong delivery. These three checks confirm that
RiemannHypothesisin Mathlib says what mathematicians mean by the Riemann Hypothesis.
You can use the statement as a hypothesis without proving it. The next example compiles because it only assumes RH and then applies it:
example (h : RiemannHypothesis) (s : ℂ) (hs : riemannZeta s = 0)
(htriv : ¬∃ n : ℕ, s = -2 * (n + 1)) (hone : s ≠ 1) : s.re = 1 / 2 :=
h s hs htriv honeThe Mathlib source carries a comment above the definition: "constructing a term of this type is worth a million dollars". (A term of this type is a proof of the statement.) The released library constructs such a term. Whether the Clay prize follows is a separate, human process, and nothing about it has changed (section 15.1).
15.3 The four reasons given for the certification
The joint statement gives four grounds. Sourced The table pairs each ground with the mistake it rules out, so read the middle column first:
| # | Ground | What it rules out | Where this book teaches it |
|---|---|---|---|
| 1 | The statement is Mathlib's RiemannHypothesis, vetted by experts |
A correct proof of a wrong statement | 13.1, 14.6 |
| 2 | Dozens of people compiled the library and reproduced the same raw proof export | A build that only works on one machine, or a tampered build | 10, 14.4 |
| 3 | comparator and con-leche --compare confirm the proved theorem matches Mathlib's statement |
A proof of a look-alike statement slipped in under the same name | 14.4 |
| 4 | The exported proof was accepted by Lean's kernel, con-leche, con-ron and independent checkers written in other languages |
A bug in one checker, or malicious code fooling the build | 14.3 |
The checks ran on an inert export of the proof, a plain data file, not on the source code. That guards against source code written to trick the build (Lean code can run programs while it compiles). Sourced
In plain words: The kernel is the strict referee from Chapter 1. Here the same game was replayed in front of several independent referees, each built separately, and they reached the same verdict. They watched a recording (the export), not the live players, so nobody could trick them during the match.
Andrew Sutherland at MIT published an overview of the checks. It records: Sourced
- Five theorems in
Main.leanwere checked:riemannHypothesis : RiemannHypothesis, plus GRH for Dirichlet L-functions. "Dedekind zeta, Hecke and automorphic L-functions are not among the checked statements." - The axioms are
propext,Classical.choiceandQuot.soundonly, the three standard axioms from Chapter 1. - Size: 175,187 files and 17,374,215 lines, of which 15,531,759 are non-blank. The source has no comments.
- Caveats, stated openly:
- The first build was unsandboxed (a later sandboxed rebuild reproduced the export byte for byte).
con-lecheandcon-ronas bundled with Lean v4.36.0 declined the proof, while their development (master) builds accept it.lean4leantimed out on five modules at its default limits and passed when the limits were raised.- A pass means "according to the kernels used", and the result relies on Mathlib's definitions meaning what they are intended to mean.
Those caveats are not reasons to doubt the result. They are what a careful verification report looks like. You should expect the same honesty from any claim of a formal proof, including your own.
15.4 What the certification does not say
Headlines compress. The table sorts common phrasings into accurate and not accurate; the right-hand column says why.
| Claim you may read | Accurate? | Why |
|---|---|---|
| "The Lean statement and proof were certified by the Lean FRO and the Mathlib Initiative" | Yes | That is what the joint statement says |
| "Lean verified a Lean proof of RH" | Yes | Lean's kernel (and others) accepted the proof term |
| "The Riemann Hypothesis is officially solved" | No | No peer-reviewed paper; Clay lists the problem as active |
| "The proof is peer-reviewed" | No | It has passed machine checks; the human reading is ongoing |
| "Mathematicians understand the proof" | Not yet | Sutherland: understanding the details "is going to take some time" Reported |
| "It proves GRH in general" | No | Only GRH for Dirichlet L-functions was checked |
Pitfall: "checked" is not "understood". A machine check tells you the steps are valid. It does not tell you why the proof works, and it does not replace peer review. Keep the two apart when you explain the news to someone else.
The debate since the release has been about readability and understanding, not about errors. No technical flaw in the Lean check has been reported. Scott Armstrong criticised the quality of the write-up, and Alpöge accepted that the criticism was fair. Reported The announcement came one day after Anthropic's IPO; Alpöge addressed the timing directly ("There is an obvious cynical view, to do with the timing, but it is false"). Sourced
15.5 A shorter proof, presented the honest way
On 25 November 2026 Luke Sernau and colleagues at Anthropic released lsernau/grh-lean, a shorter Lean proof of the same five theorems, under the Apache-2.0 licence. Sourced Its README says:
- It has a readable edition of about 300,000 lines and a compact edition of about 76,000 lines.
- It "uses only the axioms
propext,Classical.choiceandQuot.sound". - It is built on Lean v4.35.0 and a pinned Mathlib commit, and "A build takes one to two hours on 12 cores with 24 GB of memory".
- "The proof has passed machine checks only … No mathematician has read it through, and no paper comes with it."
- The compact edition's README says: "The Lean text and the documents in this project were written by Claude (AI)."
This is the healthiest possible way to present such a result: the statement file to read, the axioms, the build command, and a plain statement of what has not been done.
Replicating it yourself. The book's labs/replicate-grh/run.sh builds the compact edition inside a throwaway Linux container and prints its axioms. We wrote it, but we have not run it: it needs one to two hours of a 12-core machine, and running a large untrusted build was left as a decision for the reader (see the script's header). If you run it, the README says the first line of the axiom report should be 'riemannHypothesis' depends on axioms: [propext, Classical.choice, Quot.sound].
15.6 The same checks, at a size you can run today
You cannot rebuild 17 million lines on a laptop in an afternoon. You can run the same kinds of check on a small project, and that is the skill that transfers. Here are the four steps:
- Read the statement. You did that in 15.2. For your own work, this is section 14.6's checklist.
- Check the axioms. Run
#print axiomson the final theorem (Chapter 1, 14.2). Anything beyondpropext,Classical.choiceandQuot.soundneeds an explanation. - Re-check in the kernel, from an export.
lake checkbuilds, exports and replays a project through the kernel, and--paranoidadds the extra checkers that ship with Lean (14.3). - Compare against a trusted statement.
lake comparatortakes a challenge file you trust and a solution you do not, and checks that the solution proves the same statement with permitted axioms only (14.4).
Tip: Chapter 14's trust lab runs steps 2–4 on a small theorem with one honest solution and three dishonest ones, and shows which check catches each. It is the quickest way to make these steps your own.
15.7 Why it matters anyway
Set the caveats aside for a moment. A proof of a famous open problem, too long for any person to read, was checked by software in about a day, by many independent people, using tools anyone can download. The debate is now about understanding and exposition, not about whether a step is wrong. That shift is what this book is about: Part IV shows how AI produces proofs, and Part V shows how to check what it produced.
Key takeaways
- The Lean FRO and the Mathlib Initiative certified the Lean statement and proof (Mathlib's
RiemannHypothesis, standard axioms only). That covers RH and GRH for Dirichlet L-functions, not other L-functions.- The Riemann Hypothesis is not "officially solved": there is no peer-reviewed, human-readable paper yet, and Clay still lists the problem as active.
- The checks covered the statement, reproducible builds, comparison against Mathlib's statement, and several independent checkers, all run on an inert export.
- You can run the same kinds of check on your own work: read the statement,
#print axioms,lake check,lake comparator.
Sources (read 2026-12-06; details and quotes in research/00-facts.md §1)
- Alpöge, announcement: https://alpo.ge/remark.pdf
- Lean FRO and Mathlib Initiative, joint statement (2026-11-21): https://leanprover-community.github.io/blog/posts/riemann-hypothesis/
- Sutherland (MIT), verification overview (updated 2026-11-27): https://math.mit.edu/~drew/grh/
- Rubinstein (Waterloo): https://www.math.uwaterloo.ca/~mrubinst/alpoge_claude_grh/
- Clay Mathematics Institute, problem page: https://www.claymath.org/millennium/riemann-hypothesis/
- Sernau et al.,
grh-leanREADME andgrh-compact/README.md: https://github.com/lsernau/grh-lean - Mathlib source,
Mathlib/NumberTheory/LSeries/RiemannZeta.leanat tag v4.36.0 - Secondary: TechCrunch (2026-11-20), OfficeChai, Scientific American (2026-11-20, updated 11-21), as listed in
research/00-facts.md