Anthropic says Claude agents formalized Fermat's Last Theorem in Lean in 11 days
Anthropic said on 4 September 2026 that Claude agents produced a complete Lean proof of Fermat's Last Theorem in 11 days: 13 million lines checked by Lean.
By Emre AlemdarPublished
Tech AI LatestAnthropic reported on 4 September 2026 that dozens of Claude agents produced the first complete, computer-checked proof of Fermat's Last Theorem in the Lean proof assistant in 11 days, largely autonomously. The proof runs to 13 million lines of Lean, more than five times the size of Mathlib, and uses only Lean's standard axioms. Kevin Buzzard of Imperial College London, who leads the community formalization project, reviewed it.
Key facts
- Announced: 4 September 2026 (Anthropic research)
- Time: 11 days, largely autonomous, with occasional high-level instructions from researcher Tianyi Peng
- Size: 13 million lines of Lean, over 5x Mathlib; 30,300 theorems proved, 29,500 used in the final proof
- Compute: about six billion output tokens from an internal research model, roughly comparable to Claude Fable 5.1, Anthropic says
- Checks: Lean with its three standard axioms; statement matches Mathlib's; reviewed by Kevin Buzzard
- Proof follows a simplified version of Wiles's proof, from the Darmon, Diamond and Taylor exposition
What Anthropic reported
Anthropic's science team reported on 4 September 2026 that Claude agents had produced a complete, computer-checked proof of Fermat's Last Theorem in the Lean proof assistant, which it describes as the first end-to-end proof of this kind. The proof follows a simplified version of Andrew Wiles's proof from the Darmon, Diamond and Taylor exposition and builds on Mathlib, Lean's main community library.
The work took 11 days and was largely autonomous. Dozens of Claude agents worked together through a multi-agent harness based on Claude Code, with occasional high-level instructions from Tianyi Peng, an Anthropic researcher whose Columbia University group builds formalisation tools. The final proof is 13 million lines of Lean, more than five times the size of Mathlib. Along the way the agents proved 30,300 theorems, of which 29,500 are used. The model was an internal general-purpose research model that Anthropic says is roughly comparable to Claude Fable 5.1, and it used about six billion output tokens.
How it was checked
Lean checks the proof using only its three standard axioms, and a comparator tool confirmed that the theorem statement matches Mathlib's statement of Fermat's Last Theorem. Kevin Buzzard of Imperial College London, who has led a multi-year community project to formalise the theorem since 2024, reviewed it. He is quoted saying the proof uses "no assumptions other than the axioms of mathematics".
Progress stalled until the team moved to Prove2Me, an open collaborative platform designed by Peng and collaborators at Columbia. It keeps a graph of theorem statements that agents use to pick their next step, separates statements from proofs to speed up compilation, and stores plain-language descriptions for search. Early failed attempts still contributed about 7% of the non-boilerplate lines in the final proof.
Why it matters
Formalising a major modern theorem has been a long human project; the human blueprint for just the first phase runs to 86 pages. Doing it in 11 days shows that agents can now formalise a proof of this size, not only individual lemmas. The limits are stated by Anthropic itself: the proof is probably far longer than needed, it does not replace a human-readable explanation, the run was token-hungry, and it relies on Mathlib, the Imperial College project and the flt-regular project. Microsoft researchers later reported AI-assisted progress on the KLS conjecture.
What to watch next
Buzzard suggests such techniques could help find errors in published mathematics and lighten the load on referees. Watch for a shorter version of the proof and for Prove2Me being used on other theorems; Anthropic says researchers also formalised Vinogradov's Three Primes Theorem in three days. More research coverage is under AI Research.
What changed
| Before | A community project led by Kevin Buzzard was formalising Fermat's Last Theorem in Lean, with no complete machine-checked proof |
|---|---|
| After | Anthropic reports a complete Lean proof, 13 million lines long, produced by Claude agents in 11 days and reviewed by Buzzard |
| Who it affects | Mathematicians working on formal proofs, the Lean and Mathlib community, and researchers building AI agents for maths |
Questions people ask
- Did Claude prove Fermat's Last Theorem?
- Claude agents formalised an existing proof, a simplified version of Wiles's proof, into Lean so that a computer can check it. Anthropic says it took 11 days and was largely autonomous.
- How long is the Lean proof of Fermat's Last Theorem?
- 13 million lines of Lean, more than five times the size of Mathlib, with 29,500 theorems used in the final proof.
- Has anyone checked the proof?
- Lean verifies it using only its three standard axioms, and Kevin Buzzard of Imperial College London reviewed it, according to Anthropic.
Sources
- Formalizing Fermat's Last Theorem (Anthropic, 4 Sep 2026)
Reference pages
- Anthropic company
- Claude Code tool
Spotted an error? See the corrections policy and tell the editor. Facts in this story come from the sources listed above; vendor claims are attributed.
Comments
Loading comments.





