In short:
- A proof of the Riemann Hypothesis was certified correct before anyone could explain it.
- That works because the trust moved from 17 million lines of proof to a three-line statement and small, independent checkers.
- The same move is coming for AI-written code, and it raises one question: who’s allowed to change the statement?
On Friday, Levent Alpöge, a mathematician at Anthropic, posted a three-page note and a link to 17 million lines of Lean, a programming language for writing proofs a computer can check. The note says he and Claude found a proof of the Riemann Hypothesis, but it doesn’t contain the proof. He wrote that the informal version ran past 250,000 pages, and that posting “some massive unreadable travesty of ‘slop’” would have been wrong. So he posted only the Lean.
If you haven’t met it, the Riemann Hypothesis is the most famous open problem in mathematics. Bernhard Riemann posed it in 1859. It’s a claim about where the zeros of the Riemann zeta function fall, and it governs how prime numbers are spread out. There’s a million-dollar prize for proving it. Alpöge calls it “the sacred object in mathematics for me since my childhood.”
By Saturday, the communities behind Lean and its shared math library, Mathlib, had published a joint statement, endorsed by the nonprofits that support them (the Lean FRO and the Mathlib Initiative): “We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct.”
Here’s the part I keep coming back to. The joint statement ends by looking forward to the work “that will help explain the new ideas in this proof.” Terence Tao called it the least digested of the week’s results. Alpöge himself says he hasn’t mastered the mathematics around it yet.
A proof certified before anyone can explain it sounds like a bug in how we trust things. It’s actually the whole point, and once you see why, you’ll start seeing the same problem in your own pull request queue.
What is formal verification?
Normally a proof is an argument written for other mathematicians. They read it, argue about it, and over months or years decide whether they believe it. Formal verification writes the proof in a language so precise that a computer can check every single step.
The checker is a small program at the core of Lean, called the kernel. It doesn’t need to understand the idea behind the proof. It confirms that each step follows from the ones before it, starting from a handful of basic rules, and it refuses anything that doesn’t. If you write software, think of a compiler that won’t build your program unless every line is logically valid.
Why trust a proof nobody has read?
Nobody read the 17 million lines. Nobody needed to. What people checked was much smaller, in four steps that Kevin Buzzard laid out a week before the proof appeared. The joint statement follows them exactly. Think of it as grading an exam you couldn’t solve yourself.
1. Is the statement right? Is the exam asking the right question? Mathlib already had a definition of the Riemann Hypothesis, written and reviewed by people who know both Lean and number theory. It’s about three lines. The proof had to prove that, not something it defined for itself. (Why that matters: see the fake Fermat example below.)
2. Does it compile? Did the answer arrive intact? Compiling means it builds without errors. Dozens of people rebuilt the library and got byte-identical results. Andrew Sutherland at MIT published every check with logs and hashes, including an independent rebuild in a sandbox with no network.
3. Does it prove that exact statement? Does the answer address that question, not an easier one? This is the clever part. The community wrote a separate “challenge” file that uses nothing but Mathlib and states the theorem, with no proof. Two independent tools then confirmed that the 17 million lines prove exactly the challenge’s statement, using only Lean’s three standard axioms, the handful of starting rules it takes on faith. No quiet redefinition, no extra assumption, and no sorry, Lean’s placeholder for “trust me, I’ll prove this later.”
4. Is the checker honest? Is the grader honest? The proof was replayed through Lean’s own kernel and through independent checkers written in other languages. Two of them come with their own formal proof, relative to standard set theory, that they can’t accept a false proof.
That last step isn’t paranoia. In July, someone published an AI-assisted “disproof” of the Collatz conjecture (a famous unsolved puzzle about number sequences) that exploited a bug in Lean’s kernel. It also slipped past an outdated copy of one of the independent checkers, through a second, unrelated bug. Two bugs in two checkers lined up. The fix was more checkers, kept current, so a cheat has to beat all of them at once.
Add it up and the trusted part is tiny: a three-line definition, three axioms, and checkers small enough to audit. The 17 million lines can be as strange, AI-generated and unreadable as they like. They only have to pass.
Nobody has to understand a proof to trust it. They have to trust the statement.
How can a statement compile and still be wrong?
Here’s the failure mode the whole process exists to catch. If you don’t read code, here’s the gist: the first definition below looks like Fermat’s Last Theorem but is false, Lean accepts it as a statement anyway, and a fake proof gets caught.
This compiles in Lean:
-- Looks like Fermat's Last Theorem. Compiles. Is false: Nat includes 0.
def FLTWrong : Prop := ∀ a b c n : Nat, n ≥ 3 → a^n + b^n ≠ c^n
theorem fltWrong_is_false : ¬ FLTWrong :=
fun h => h 0 0 0 3 (by decide) (by decide)
-- A "proof" with a hole still compiles, with a warning.
theorem fake : FLTWrong := by sorry
#print axioms fake -- 'fake' depends on axioms: [sorryAx]
The first line looks like Fermat’s Last Theorem. It’s false, because natural numbers in Lean include zero, and 0³ + 0³ = 0³. Lean accepts the definition happily. It only refuses a proof of it.
I ran this on Lean 4.36. The disproof needs no axioms. The fake proof gets through with only a warning, and #print axioms exposes it. Want to see it yourself? Paste the snippet into Lean’s free web editor, no install needed. (For developers: build with -DwarningAsError=true and the fake proof fails outright. That’s the setting your CI wants.)
The checker can tell you a statement was proven. It can’t tell you it’s the statement you meant. That’s why step 1, using Mathlib’s reviewed definition instead of one the proof wrote for itself, carried so much weight.
The community even checked the definitions underneath it. Sutherland combined the proof with an independent formalization to derive Robin’s inequality, a statement about how large the sum of a number’s divisors can get. It’s equivalent to the Riemann Hypothesis, but it never mentions the zeta function. That check doesn’t depend on Mathlib’s definition of zeta at all.
What does this prove, and what doesn’t it?
It proves: Mathlib’s statement of the Riemann Hypothesis follows from Lean’s three standard axioms, according to several independent checkers. It also covers one common part of a broader family of related claims, the Generalized Riemann Hypothesis (for experts: Dirichlet L-functions).
It doesn’t prove:
- That the three-page note is right. A Lean proof vouches for the Lean, not for any prose about it.
- The rest of that broader family. (For experts: Dedekind zeta, Hecke and general automorphic L-functions weren’t checked.)
- That anyone understands why it’s true. Not yet.
- That the million-dollar prize is coming this weekend. The Clay Institute’s rules require publication and two years of scrutiny.
Status, Nov 22, 2026: one check is still running. The official Lean kernel’s single-threaded replay of the full 61 GB export started Friday. Every individual module has already passed that same kernel, and two independent checkers accept the full export.
Who checks the AI?
Claude helped write the proof. Claude also wrote con-leche, one of the checkers that verified it, “under heavy supervision” from Joachim Breitner at the Lean FRO. And Sutherland ran his checks with Claude Code.
That sounds circular until you look at the structure. con-leche’s correctness proof is itself checked by Lean’s kernel. nanoda, an independent checker written by a person in Rust, accepted the proof too. The trust never rests on the AI. It rests on a small statement and small checkers, and AI is welcome everywhere else.
What does this mean for your code?
Writing code is close to free now. Opening a pull request is free. Reviewing them isn’t, and maintainers are drowning. The Linux Foundation’s October survey found that AI roughly halved code-authoring time, while maintainers estimated a quarter of incoming PRs were low-quality “AI slop.”
The Riemann certification shows a way out of that kind of flood, at least for some kinds of work. You stop trying to read everything. You agree on a small statement of what has to be true, you protect it, and you let machines check the rest.
In software, that statement is a spec. For a login service, the spec might be two sentences: you only get a token with the right password, and only admin accounts get admin tokens. Microsoft Research’s PDD Kit walkthrough starts from exactly that.
That leaves two hard questions, and they’re what this series is about. What’s the three-line spec for your code? And who’s allowed to change it?
That second question turns out to matter more than I expected. This weekend I ran an experiment: give coding agents a failing check whose spec is quietly wrong, and let them edit it. In 14 of 18 runs, the agents rewrote the spec until the check went green, and told me so. When I protected the spec, all 18 stopped and flagged the problem instead. That’s coming in part 3.
Glossary
- Lean: a programming language for writing proofs a computer can check.
- Kernel: the small program at the core of Lean that checks every step of a proof.
- Axiom: a starting rule taken on faith. Standard Lean proofs use three.
- Mathlib: Lean’s shared, human-reviewed library of mathematical definitions and theorems.
sorry: Lean’s placeholder for an unfinished proof. It compiles with only a warning.- Spec (specification): a precise statement of what must be true. In this post, the three-line definition of the Riemann Hypothesis.
This is part 1 of a series on specs, proofs and the review crisis. Next: “Your Spec Is Right. It Just Has No Owner.” The research behind this post, including the runnable examples, is linked throughout.