Research
Claude Produces the First Complete Computer-Checked Proof of Fermat’s Last Theorem
Anthropic says Claude completed a 13-million-line Lean formalization of Fermat’s Last Theorem in 11 days, turning a celebrated mathematical proof into a machine-checkable artifact and raising new questions about scientific verification.
By Michael G ·

Claude has produced what Anthropic describes as the first complete computer-checked proof of Fermat’s Last Theorem, working largely autonomously for 11 days and generating about 13 million lines of Lean code. The result does not replace Andrew Wiles’s historic mathematical proof. It translates the chain of reasoning into a formal language that a proof assistant can verify line by line, with no room for the intuitive steps that human mathematicians routinely leave unstated.
That distinction is essential. Claude did not discover Fermat’s Last Theorem or produce a simpler proof. The achievement lies in verification at a scale that researchers expected to require years of coordinated work. Anthropic says dozens of agents proved 30,300 intermediate theorems, of which roughly 29,500 appear in the final construction, using only Lean’s standard mathematical axioms.
Why Formalization Is So Hard
A conventional proof is written for expert readers who share a large body of knowledge. Authors omit steps that colleagues can reconstruct, rely on established results and move between notations fluidly. Lean accepts none of that social context. Definitions must be precise, dependencies explicit and every logical transition accepted by the checker. The work is less like asking a chatbot for an answer and more like building an enormous verified software system.
The community-led Fermat formalization project at Imperial College London began in 2024 with an 86-page blueprint for only the initial phase. Claude’s result follows a streamlined exposition of Wiles’s proof by Henri Darmon, Fred Diamond and Richard Taylor, while adapting components from that project and the broader Mathlib ecosystem. This lineage matters because the system built on years of human formalization rather than starting from an empty library.

Anthropic’s agents initially failed. They lost track of the project, duplicated work and stopped coordinating effectively. The successful attempt used Prove2Me, a collaborative platform developed by Tianyi Peng and colleagues at Columbia University. It represented the proof as a graph of smaller obligations, kept statements separate from implementations and helped agents search for reusable results.
That orchestration is part of the scientific result. A powerful model alone did not finish the work. The agents needed a shared state, a decomposition strategy, fast compilation and a system that made progress visible. The lesson resembles large engineering projects: intelligence is useful, but organization determines whether thousands of individually plausible contributions become one coherent artifact.
A New Verification Pipeline
The strongest claim is not that AI has made mathematicians unnecessary. It is that machine-assisted formalization may become fast enough to accompany major research. Peer review of difficult proofs can take years, and reviewers can still miss gaps. A Lean artifact offers a different kind of confidence: the conclusion follows from the encoded assumptions under the rules of the proof assistant.
That confidence has boundaries. Lean verifies the statement it is given, not whether that statement captures the intended theorem. Anthropic says a comparator confirmed that its root statement matches Mathlib’s formulation of Fermat’s Last Theorem. Independent experts still need to inspect definitions, imported axioms, build reproducibility and the way human mathematical concepts were represented.

The scale also creates a new review problem. Thirteen million lines are not meant to be read like Wiles’s papers. Researchers will rely on modular structure, automated checks and selected human-readable explanations. Formalization can reduce uncertainty about logical validity while making exposition more important, because a correct machine artifact does not automatically teach people why the argument works.
The project consumed roughly six billion output tokens from an internal research model comparable to Claude Fable 5.1, according to Anthropic. That makes the experiment expensive, although it is the largest Lean proof yet constructed. Costs should fall as models, proof search and compilation improve, but access could remain uneven if only well-funded labs can run verification campaigns at this scale.
What Changes for Research
Universities will have to decide how to credit machine labor. A formalization may contain millions of agent-generated proof steps, high-level direction from a small human team and foundations contributed by hundreds of Mathlib developers. Traditional authorship conventions do not capture that production process cleanly. Repositories and papers will need detailed contribution records so readers can distinguish mathematical choices, software infrastructure and automated execution.
Education may change as well. Students can use formal tools to test their reasoning, but they still need to learn how to construct an argument and recognize a useful abstraction. If a system fills every missing Lean step, instructors may assess the design of definitions and proof strategy rather than syntax. The danger is confusing a checked artifact with understanding; the opportunity is giving learners immediate feedback on where logic actually fails.
Formal proof assistants are already used in mathematics and high-assurance software, but their steep labor cost has limited adoption. If AI can reliably translate ordinary mathematical writing into Lean, journals could request formal artifacts for results whose verification would otherwise overwhelm referees. Researchers could also test conjectures against a growing checked library before investing years in an argument built on a hidden error.
The same tools may help evaluate AI-generated mathematics. Language models can produce fluent proofs that contain subtle gaps, creating more claims than human reviewers can assess. A formalization pipeline forces those claims through an unforgiving interface. Anthropic argues that this may be the only scalable way to preserve trust as automated systems generate more research.
There are risks in allowing one platform or model family to shape the formal record. Libraries encode choices about definitions and abstractions, and automated systems may favor proofs that are easy to formalize over arguments that are conceptually illuminating. The community should preserve open repositories, reproducible builds and room for competing tools rather than treating a proprietary agent as the authority.
For now, the achievement is both narrower and more consequential than the claim that Claude solved a centuries-old mystery. Fermat’s Last Theorem was already proved. What changed is the feasibility of converting a monumental human argument into a fully checked computational object. If the result reproduces under independent scrutiny, the bottleneck in formal mathematics may have moved from writing every line by hand to designing the systems that decide which lines need to be written.
Topics: Anthropic, Claude, Fermat's Last Theorem, Lean, mathematics