Free guide
How Lean Checked the Claude-Assisted Riemann Hypothesis Proof
An Anthropic mathematician says he proved the Riemann Hypothesis working with Claude, and wrote the whole proof in Lean. Here's how a computer checks a proof like that, and how to try Lean yourself today.

The short version
- Alpöge's proof is a Lean library of 175,187 files (about 17 million lines). Which Claude model he used hasn't been stated.
- Lean's kernel replayed all 175,187 files with zero rejections, and independent checkers like nanoda (written in Rust) and con-leche accepted the exported proof.
- Computers check that the proof follows. Humans checked that the statement at the top really is the Riemann Hypothesis: it's Mathlib's own RiemannHypothesis definition.
How it actually works
A proof as a staircase
In Lean, a proof is written as tiny logic steps, and every step has to rest on steps that came before it, like a staircase where each stair sits on the ones below. Alpöge's staircase is 175,187 files tall, so no person can read every step. That's why the checking is done by machines.
The kernel tests every stair
Lean's reference manual says the core of Lean is "a minimal kernel that does nothing other than check proof terms." Tactics, automation and AI can help write a proof, but everything they produce gets turned into terms the kernel checks, so a bug in a tactic can't sneak a bad step through. If one step doesn't follow, the kernel rejects it. For this proof, a replay of all 175,187 modules through Lean's kernel finished with zero rejections (Michael Rubinstein at Waterloo and Andrew Sutherland at MIT both ran it).
Who checks the checker?
The kernel is kept simple enough that other people can write their own versions. nanoda is one: Lean's manual describes it as "developed independently and implemented in Rust." It accepted the full proof export (27 min 42 s on 80 threads in Sutherland's run). Other checkers, con-leche, con-ron and lean4lean, accepted it too. An axiom audit found only Lean's three standard axioms (propext, Classical.choice, Quot.sound), and a scan of all 175,187 files found no sorry or admit gaps.
The part a machine can't check
Lean's manual says it plainly: Lean "can establish that a statement has been proven, but not whether it is the intended statement." So the Lean and Mathlib communities compared the top theorem against Mathlib's own RiemannHypothesis definition, vetted by experts in Lean and number theory, using two independent tools. Their joint statement says they have "full confidence" the proof is correct. Understanding why it works is the next job: MIT's Andrew Sutherland told Scientific American "there is much work to be done to understand the mathematical details of the proof."
How to set it up
1.Learn how Lean proofs work in your browser
Lean's own learn page recommends the Natural Number Game for beginners: you prove facts about numbers one step at a time, and Lean checks every step. Open it at adam.math.hhu.de/#/g/leanprover-community/NNG4. There's also a web playground at live.lean-lang.org.
2.Install Lean
The recommended way is VS Code plus the Lean 4 extension. Install VS Code, add the extension, and it walks you through the rest of the setup (lean-lang.org/install).
3.Check that a proof has no hidden gaps
Under any theorem, ask Lean which axioms it depends on. A finished proof should list only propext, Classical.choice and Quot.sound. If you see sorryAx, the proof (or something it uses) has a gap.
#print axioms myTheorem4.Replay it through the kernel
Lean's Validating Proofs page: build the project, then run lean4checker on the module that holds the theorem and check that no error is reported. This is the same kind of kernel replay used on the Riemann proof.
lake build lean4checker --fresh MyProject.MyModule5.Read the statement yourself
The theorem the proof ends on is Mathlib's RiemannHypothesis, in Mathlib.NumberTheory.LSeries.RiemannZeta. Its doc line says constructing a term of this type is worth a million dollars. Reading the statement is the one step that's on you, not the machine.
6.Have Claude Code write a small proof and let Lean judge it
Open a Lean project in Claude Code, ask it to prove a small lemma, then run lake build and #print axioms. Lean's manual counts un-reviewed AI-generated proofs as untrusted input, so the checker, not the AI, gets the final word.
The fine print
- The proof is days old. The Lean and Mathlib statement is a same-day community statement, not a peer-reviewed paper, and mathematicians are still working through the math itself.
- The proof covers the Riemann Hypothesis and GRH for Dirichlet L-functions, not GRH for every kind of L-function.
- Which Claude model was used, and how, hasn't been published.
- A full rebuild is heavy: about 17 million lines, and the unpacked proof export is over 60 GB. You don't need it to learn Lean.
- A kernel check assumes the Lean kernel is sound and that Mathlib's definitions mean what they should. That's why several separate checkers were run.
FAQ
Did Claude prove the Riemann Hypothesis?
Levent Alpöge, a mathematician at Anthropic, says he found the proof working with Claude. Which model was used and how much Claude did hasn't been published. The proof is in Lean, and computer checkers accepted it.
What is Lean's kernel?
The small core of the Lean proof assistant. Lean's reference manual describes it as a minimal kernel that does nothing other than check proof terms. Every step of a proof ends up checked by it.
What is nanoda?
An independent checker for Lean proofs, written in Rust by different people from Lean's own kernel. It accepted the exported Riemann proof, so a single bug in one checker would not be enough to let a bad proof through.
Can a computer check prove the right theorem was proved?
No. Lean's manual says it can establish that a statement was proven, not whether it is the intended statement. People compared the final theorem with Mathlib's RiemannHypothesis definition to close that gap.
Is the Riemann Hypothesis officially solved?
The Lean and Mathlib communities say they have full confidence the proof is correct. Mathematicians still have to understand the argument, and formal recognition by bodies like the Clay Institute takes time.
Sources
- Lean and Mathlib communities: Lean verification of the Riemann Hypothesis
- Michael Rubinstein (Waterloo): checks of the Alpöge/Claude proof
- Rubinstein: why the Lean statements say what RH and GRH say
- Andrew Sutherland (MIT): verification files
- Scientific American: Anthropic mathematician claims Riemann Hypothesis proof
- Lean reference: Validating Proofs
- Install Lean
- Natural Number Game
2026-11-22 00:30 PT against the Lean and Mathlib joint statement (Nov 21), Rubinstein's Waterloo check page and statement page, Sutherland's MIT verification page, Scientific American (Nov 20, updated Nov 21), and Lean's reference manual (Validating Proofs, Axioms) and install page.
Want help building with tools like this?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week and weekly-updated courses.
Join Shipping SkoolMore free guides
ffmpeg-skill: Give Claude Code a Video Editor That Measures Its Work
A free, open-source skill that gives your coding agent 42 small FFmpeg tools and a rule to measure every file before and after it edits. What it does, how it works, how to set it up, and the fine print.
Grok Bot + QuickBooks: Ask Who Owes You, Approve the Invoices
Grok Bot now connects to Intuit QuickBooks in the US. Ask about cash flow or who still owes you, let it draft the invoices for you to approve, and set one rule so sends stop for your OK.
Chrome DevTools MCP: Let Your Coding Agent See the Page It Builds
Google's free, open-source way to give your coding agent a real Chrome window and the DevTools you already use. What it does, how it works, how to set it up, and the fine print.