This week the headline everyone is repeating is "AI proved the Riemann Hypothesis." The more useful story, the one with something in it for people who build software with AI every day, is about the tool that decided whether to believe it: Lean.
Lean is an open-source proof assistant and functional programming language. Mathlib is its shared library of formalised mathematics — the agreed-upon definitions and theorems that everything else is built on. Lean is usually in the news for a release. This week it is in the news for what it was used to check: a claimed proof of the Riemann Hypothesis, co-written with an AI model, delivered as Lean code instead of a paper, and then machine-verified by the Lean community and by independent re-checkers.
What happened
On 2026-11-20, Levent Alpöge released a proof of the Riemann Hypothesis as a
Lean library — 17 million lines of code, depending directly only on Mathlib.
Nobody sat down and read 17 million lines. The next day, 2026-11-21, the Lean
FRO and the Mathlib Initiative published a joint statement certifying "that both
the statement and the proof of the Riemann Hypothesis are correct." Their
verdict rested on four checks: that the statement being proved is exactly
Mathlib's own RiemannHypothesis, that the library compiles, that the code
actually proves that statement, and that the exported proof passes several
independent checkers — Lean's own kernel and third-party ones such as
con-leche and con-ron.
Then came a smaller, more legible version. A rewrite called
grh-lean, produced in collaboration with
colleagues at Anthropic and with Claude, re-proved the same five theorems — the
Riemann Hypothesis plus the Generalized Riemann Hypothesis for Dirichlet
L-functions — in far fewer lines. Its readable edition is around 300,000 lines;
a compact edition proves the same five theorems in roughly 76,000. The whole
thing rests on just 3 standard axioms: propext, Classical.choice and
Quot.sound. On 12 cores and 24 GB of memory it builds in 1 to 2 hours.
How it actually works
The part worth understanding is why anyone trusts a 17-million-line artifact that no human has read. The trick is that trust never lands on the author — not on Alpöge, and certainly not on the AI that helped write it. It lands on the kernel.
A proof assistant like Lean has a small, fixed core that knows only a handful of inference rules. Every single step of a proof, no matter how it was generated, has to be re-derived in terms of those rules before the kernel accepts it. You hand the kernel an inert export — a static file, not a running program — and it either reconstructs the proof from first principles or it rejects it. The Lean FRO described the exported proof as being checked "out of reach of hypothetical malicious code." It does not matter how clever or how adversarial the thing that produced the proof was; the checker has no conversation with it. It just recomputes.
That is the whole shape of the event: generate with a model, verify with a machine the model cannot talk its way past. The AI produced the artifact. The kernel decided whether it was real.
Why this matters if you build with AI
Swap "17-million-line proof" for "the pull request Claude just opened" and the lesson is identical.
When a model writes your code, the generation is cheap and fallible. It will be confidently wrong some of the time, and it is very good at explaining why its wrong answer is right. So you do not put your trust in the model's explanation. You put a checker between the model and production that the model cannot argue with — a type system that rejects the call that does not typecheck, a test suite that goes red, a schema that refuses the malformed payload. TypeScript, a failing test, a zod schema: these are the kernel for the rest of us. They are small, fixed, and deaf to persuasion.
The Riemann story is just the extreme version of this discipline. The output was so large no person could audit it, and it was accepted anyway — not on faith in the author, but because an independent verifier said yes and could be re-run by anyone. If your AI workflow has no equivalent of that kernel, you are trusting the explanation. If it does, you can let the model write things you would never have the patience to read, and still ship them safely.
What is not known yet
No mathematician has read the proof through. grh-lean says so plainly: "No mathematician has read it through, and no paper comes with it." The confidence here is a machine-checking-and-reproducibility kind of confidence, not the human-peer-review kind. Whether the proof's new ideas survive being explained to the mathematical community is still open — the Lean FRO itself said it looks forward to "all the activity in the mathematical community that will help explain the new ideas in this proof." Machine-verified and understood are not the same thing, and only the first has happened.
My take
I don't have an opinion on the Riemann Hypothesis. I have a very strong opinion on the workflow, because it is the one I run all day.
When I let Claude write code for me, the question I care about is never "is the model right?" It is "what catches it when it isn't?" That is why I lean on TypeScript and tests instead of vibes — not because the AI is bad, but because the only version of AI-assisted development that scales is the one where a checker the model can't sweet-talk sits between its output and anything that matters. The Lean verification is the most dramatic proof of that idea I have seen: a mountain of generated code, unread by any human, accepted purely because a dumb, incorruptible kernel re-did the work and agreed.
If you take one thing from this week's noise, don't take "AI proved Riemann." Take: build your kernel. Then you can stop reviewing the model's confidence and start reviewing its output — or let a machine do even that.