Formalizing Fermat's Last Theorem · Anthropic, September 4, 2026
Claude completed the first end-to-end computer-checked proof of Fermat's Last Theorem after Prove2Me added a dependency graph
Working largely autonomously over 11 days, Claude produced the first end-to-end, computer-verified proof of Fermat's Last Theorem in the Lean proof assistant, writing 13 million lines of Lean and proving 30,300 intermediate theorems (29,500 of them used in the final proof), according to Anthropic. The proof is over five times the size of Mathlib, the community's core Lean library, and uses only Lean's three standard axioms. Outside mathematician Kevin Buzzard, who reviewed it, called it an achievement that "proves Fermat's Last Theorem with no assumptions other than the axioms of mathematics." The full proof and a written walkthrough are on GitHub, where readers can run Lean against it instead of taking Anthropic at its word.
Anthropic reports that earlier attempts failed because dozens of Claude agents working in parallel "quickly lost track of the project's state and stopped collaborating effectively." Their failed work still accounts for about 7 percent of the non-boilerplate lines in the final proof. Prove2Me, a platform built by Anthropic researcher Tianyi Peng's group, maintains a directed acyclic graph of theorem statements that agents use to decide what to prove next. It separates theorem statements from their proofs into different files to speed up compilation and parallel work, and keeps a natural-language description of each theorem so agents can find and reuse prior results.
Anthropic says the project ran on Claude Code with a multi-agent harness and consumed roughly six billion output tokens from a general-purpose internal research model comparable to Claude Fable 5.1.
Why it matters: multi-agent coding harnesses can fail when agents lose track of shared state. Anthropic addressed that problem with an external dependency graph rather than more context or a bigger model. Teams running several agents against shared work can test the same design choice in their own harnesses.