Claude Formalized Fermat's Last Theorem in Lean in 11 Days, Anthropic Says
Anthropic published a computer-checked proof of Fermat's Last Theorem on September 4, 2026: 13 million lines of Lean and 29,500 intermediate theorems. How dozens of agents first failed, how Prove2Me's dependency graph fixed it, and what has actually been verified.
Anthropic published a computer-checked proof of Fermat’s Last Theorem (FLT) on September 4, 20261. By the company’s account, Claude worked largely autonomously for 11 days to write the proof in Lean, producing 13 million lines of Lean code and 29,500 intermediate theorems along the way.
No new mathematics came out of this. The proof itself is Andrew Wiles’s, from 1995; what was built here is a form of that proof a computer can check. Anthropic is explicit on this point, noting that recent AI-driven work on the Riemann hypothesis produced novel mathematics, whereas what is new here is the verification.
A 129-Page Proof, and the Gap Found Two Months Later
Why verification takes so much effort is well illustrated by the theorem’s own history. Wiles’s proof ran to 129 pages and required months of painstaking work to verify1. When he presented it in June 1993 across a three-day series of lectures, several mathematicians spent two months checking it before a reviewer’s question exposed a critical gap. Wiles spent a year on the fix, first alone and then with his former student Richard Taylor. The correct proof was published in May 1995.
Feed a proof to a proof assistant and that class of oversight cannot occur in principle. But proofs written for humans skip enormous numbers of “obvious” steps and lean on centuries of published work. Formalization means rebuilding all of it from the small fraction of mathematics that has already been formalized. FLT’s formalization was expected to take years; the blueprint the community has been using to describe just the project’s initial phase runs to 86 pages.
Dozens of Agents, and They Stumbled First
The part of this work closest to most readers here is not the mathematics but the orchestration.
According to Anthropic, dozens of Claude agents collaborated to define concepts, prove intermediate theorems, and use those to prove harder statements1. It did not work from the start. Early attempts failed: the agents had some early success but quickly lost track of the project’s state and stopped collaborating effectively, the company writes. Those failed efforts still left traces in roughly 7% of the non-boilerplate lines of the final proof.
The turning point was switching to Prove2Me, an open collaborative platform for formalizing mathematics designed by Anthropic researcher Tianyi Peng and his collaborators at Columbia University. Anthropic credits it with three things. It maintained theorem statements as a directed acyclic graph (DAG) that agents used to decide what to attempt next — which, the company says, mitigated memory degradation and let multiple agents work in parallel. It separated theorem statements from proofs into different files, keeping the links between them managed independently, which sped up Lean compilation and cut resource consumption. And it kept a natural-language description of each theorem statement, enabling search and reuse.
In other words, putting a shared-state structure outside the agents themselves is what made long-running parallel work hold together. That agents do not get work done simply by being run in parallel applies just as directly when you fold AI agents into your own operations.
With that plus a Claude Code-based multi-agent harness, the proof was finished in a little under two weeks. It consumed about six billion output tokens from a general-purpose internal research model described as roughly comparable to Claude Fable 5.1. It is worth holding onto the fact that this is not the shipped product model itself.
Mathematical input from humans was limited to occasional high-level instructions from Tianyi. The examples Anthropic gives are short: that treating the Jacobian as a scheme sounded high priority, and that the Mazur theorem should be pushed to finish soon.
What Is Verified, and What Is Self-Reported
Given how large the numbers are, it pays to separate what third parties have checked from what has not been checked.
The machine-verification part is concrete. The finished proof was checked by Lean and uses only Lean’s three standard axioms1. A comparator further confirmed that the statement of the proved theorem matches Mathlib’s own statement of FLT. What was formalized is not Wiles’s proof directly but the simplified version of it from Darmon, Diamond and Taylor.
For outside eyes, Kevin Buzzard of Imperial College London reviewed the completed proof. Buzzard is the person who kicked off the multi-year community effort in 2024 to formalize FLT in Lean, and Anthropic’s proof adapts pieces from his project and from the flt-regular project. Buzzard notes that the formalization spans algebra, harmonic analysis, geometry and number theory, and that AI autoformalization artefacts are now robust enough to be built upon.
That said, Buzzard’s own wording is secondhand on the timeline: he says the achievement is one “which Anthropic researchers say only took 11 days”1. The duration and the degree of autonomy are, for now, the company’s own account rather than something independently verified.
The size figures need care too. Thirteen million lines is over 5x Mathlib, but Anthropic itself notes in a footnote that this is partly because Mathlib is concise and well-reviewed while its own proof is likely much longer than it needs to be. The line count is less a measure of the achievement than an indicator of how verbose autoformalization currently is.
Read It as Making Verification Cheaper
The implications reach past mathematics.
Buzzard says autoformalization techniques will root out errors in the current mathematical corpus and lighten the load on referees, and will also make it possible to rigorously check LLM-generated mathematics1 — currently, in his words, an extremely costly human-led process. Anthropic likewise expects it to become common to produce a formalized proof alongside any write-up intended for a human reader, while adding the caveat that it does not think a formal proof should replace a human-understandable exposition.
Whether AI output can be trusted without a human reading all of it is also the central question when putting a model prone to hallucination into real work. Formalizing mathematics is the extreme case, and it shows how far the territory where machines can take over verification might extend. In the same spirit, OpenAI in August 2026 published results on ten open problems in mathematics and theoretical computer science on GitHub with Lean 4 certificates. Putting the material for verification next to the claim points in the same direction as this announcement.
There is a note on accessibility, too. Anthropic researchers used just three personal Claude Max plans, collaborating solely through Prove2Me, to complete a formalization of Vinogradov’s Three Primes Theorem in three days. The company writes that it thinks “with the right scaffold, collaborative formalization of major results with consumer AI subscriptions is achievable.”
Anthropic also mentions that it and other labs have expanded support for external researchers, including mathematicians working on pure math and formalization. Its own recent move on that front was the release of 10,000 Claude seats for researchers and the broadening of AI for Science on August 27. This announcement amounts to the company demonstrating, with its own hands, one example of the kind of research that support is meant for.
The proof itself is said to be available on GitHub along with a written walk-through. There is currently no way to confirm the 11-day figure, but the Lean code that came out of it is something anyone can hand to Lean.
Sources
- Formalizing Fermat’s Last Theorem - Anthropic official announcement (September 4, 2026)
Was this article helpful?
Thank you!
Received. Thank you!