Anthropic's Claude produces first complete formal proof of Fermat's Last Theorem in 11 days
Claude, Anthropic's AI, formalized Fermat's Last Theorem in 11 days, yielding a 13-million-line Lean-checkable proof.
Claude did not discover a new proof of the theorem, which states that for any integer n > 2 there are no positive integers a, b and c with a^n + b^n = c^n. Instead, it converted the human-readable proof, first announced by Andrew Wiles in 1993 and completed in 1994 with Richard Taylor after a gap was found, into machine-checkable form, with no implicit “obvious” steps acceptable to the Lean proof assistant.
Formalizing Wiles's proof had been considered a multi-year engineering problem. In 2024, Kevin Buzzard of Imperial College London and others started a community project for the formalization in Lean, and the first-phase blueprint alone ran to 86 pages. Claude reached the finish line in 11 days.
The project used multiple agents in parallel: some filled in mathematical definitions, some attacked intermediate lemmas, some pushed results toward higher theorems and others reassembled the proof structure. The final proof uses about 29,500 of more than 30,000 intermediate theorems, and the codebase is more than five times the size of Mathlib, Lean's core mathematical library. Anthropic said the proof relies on only three standard axioms of Lean, and a comparison program confirmed that the theorem statement matches the Fermat's Last Theorem statement already in Mathlib.
The 11-day run did not go smoothly at first. The code left by failed early attempts accounts for only about 7 percent of the final non-template code. A turning point came when Peng and collaborators at Columbia University introduced Prove2Me, a platform that organizes the proof as a directed acyclic graph of theorem nodes. It tracks which lemmas are proved, identifies missing dependencies, separates statements from proofs, accelerates Lean compilation and retains natural-language descriptions so agents can search for and reuse results. Anthropic's final setup combined Prove2Me with a multi-agent harness built on Claude Code.
The entire effort consumed about 6 billion output tokens, using Anthropic's internal general research model, whose capability is roughly comparable to Claude Fable 5.1. Human mathematical guidance was quite limited; Peng occasionally gave high-level hints, such as giving one direction priority or asking for a particular theorem to be advanced.
Buzzard, who reviewed the result, called it an extraordinary achievement of automatic formalization. The result indicates that large-scale formalization of mathematics, which has relied on slow manual work, may now be able to move much faster. If a mathematical proof of this scale and complexity can be transferred into a formal system by AI, the formalization of mathematical literature could become substantially less labor-intensive.