Lab report · September 4, 2026
Formalizing Fermat's Last Theorem
Anthropic
Anthropic reports that Claude agents wrote a complete formal proof of Fermat’s Last Theorem in Lean in 11 days, a task the community project expected to take years. Kevin Buzzard, who leads that project, compiled the code and confirms that it checks. Buzzard adds that the proof was never in doubt and that the result shows how much can now be formalized automatically.
Anthropic reports that Claude wrote a complete proof of Fermat’s Last Theorem in the Lean proof assistant: “We are sharing the first complete computer-checked proof of Fermat’s Last Theorem.” A community project to formalize the theorem, begun in 2024 under Kevin Buzzard of Imperial College London, was expected to take years.
The proof runs to 13 million lines of Lean and uses 29,500 intermediate theorems. It follows the 1995 exposition of Wiles’s argument by Darmon, Diamond and Taylor, and adapts parts of Buzzard’s project and of an earlier formalization for regular primes. The report says that dozens of Claude agents worked for 11 days and consumed “about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1”. “Mathematical input from humans was limited to occasional high-level instructions” from Tianyi Peng, an Anthropic researcher. The first attempts failed, because the agents “quickly lost track of the project’s state and stopped collaborating effectively”. The effort succeeded on Prove2Me, a platform from Peng’s group at Columbia University that keeps a graph of theorem statements for the agents to work from.
The report says the finished proof “uses just Lean’s three standard axioms, and a comparator confirmed that the theorem’s statement matches Mathlib’s own statement of FLT”. Buzzard checked this independently and wrote on the day of the announcement: “I’ve compiled the code base and run comparator on it — it checks out.” Compiling took a machine with 96 cores and 500 gigabytes of memory, which Anthropic lent, and nearly 20 times as long as compiling Lean’s mathematics library. Buzzard also “manually inspected every line of the code base which (according to Claude) was not a mathematical definition or proof of a theorem, and verified that none of it was doing anything malicious.” Four days later OpenAI released a Lean proof for its Navier–Stokes claim, and the dispute there turned on whether the code matched the written argument (B2). Here the statement proved is the library’s own.
Buzzard writes: “Note that mathematically this work of anthropic tells us essentially nothing”, since the proof was not in doubt and “the formalization just faithfully follows the early literature on the proof and adds nothing”. Buzzard takes it as evidence of what automatic formalization can now do: “If thousands of pages of the literature can be formalized end-to-end by some kind of AI swarm in an 11 day period now, then in the future we will start to see formalization of modern research being done on the fly.” Buzzard’s own project continues. It aims at the modern proof, at contributions to Lean’s library, and at a document in which people can explore the argument.
Anthropic notes that “our proof is likely much longer than it needs to be”, and the report gives no cost. Buzzard writes: “I was given £1M to run my project over 5 years; Anthropic took only 11 days but I do wonder if they spent more money…” How much the people involved contributed rests on Anthropic’s account, with excerpts of the model’s reasoning as the published record.
Conflicts. The work is Anthropic’s, and Anthropic makes the model that drafted this assessment. Anthropic lent Kevin Buzzard the machine used to compile the code.
Main claims
The repository contains a complete proof of Fermat’s Last Theorem that Lean accepts, using only Lean’s three standard axioms and proving Mathlib’s own statement of the theorem.
Supported Kevin Buzzard compiled the code, ran the comparator on it and inspected by hand the parts that are neither definitions nor proofs.
This is the first complete computer-checked proof of the theorem.
Supported Buzzard, who leads the community project to formalize the theorem, confirms it. The proof adapts parts of that project and of an earlier formalization for regular primes.
Claude agents wrote the proof in 11 days, working largely autonomously, with human mathematical input limited to occasional high-level instructions.
Self-reported Anthropic publishes excerpts of the model’s reasoning and two examples of the instructions. It reports that earlier attempts on a different setup failed.
The work consumed about six billion output tokens from an internal research model and produced 13 million lines of Lean.
Self-reported Buzzard counts over 13.4 million lines. The report gives no cost.
Responses and critiques
- Kevin Buzzard: what the formalization is and what it is not ↗September 4, 2026
- Kevin Buzzard: compiling the code, in a post on what a Lean check establishes ↗November 12, 2026