Anthropic’s Claude Formalized Fermat’s Last Theorem: The Longest Computer-Checked Proof Ever Created
Table of Contents
You might want to know
• How did an AI complete a fully computer-verified formal proof of Fermat’s Last Theorem so quickly?
• What does a 13-million-line machine-checkable proof mean for the practice of mathematics?
Main Topic
In September 2026, Anthropic reported that its Claude AI produced a fully formalized, computer-checked proof of Fermat’s Last Theorem in roughly 11 days. The result is extraordinary primarily because the output is a complete, machine-verifiable translation of Andrew Wiles’s celebrated 1995 proof into a formal proof language that proof assistants can check line by line. Instead of relying on human peer review alone, every inference in the finished artifact can be mechanically validated against the axioms and rules of logic used by the system.
Fermat’s Last Theorem, articulated in 1637, asserts that no three positive integers a, b, c satisfy a^n + b^n = c^n for any integer exponent n greater than 2. Pierre de Fermat famously claimed to have a proof but left no usable manuscript, and the theorem remained unresolved until Andrew Wiles published a correct, 129-page proof in 1995 after revising an initial attempt with Richard Taylor. Wiles’s argument relies on modern tools that did not exist in Fermat’s era, which is why most researchers doubt Fermat’s own claim of a simple demonstration.
Translating a human-written proof into a formal system like Lean requires a painstaking re-expression of every definition, lemma, and inference in a machine-checkable syntax. A conventional mathematical exposition often omits routine steps, appeals to standard results, or uses compact higher-level reasoning that is clear to humans but ambiguous or incomplete for a proof assistant. Formalization eliminates that ambiguity by demanding explicit, verifiable steps for each logical transition.
Claude’s project produced about 13 million lines of formal proof code, reportedly covering more than 30,000 supporting theorems and generating a body of work many times larger than established shared libraries used by mathematicians. Anthropic described a multi-agent workflow in which many Claude agents worked in parallel to create definitions, prove intermediate lemmas, and assemble those pieces into larger structures. A coordination tool called Prove2Me supplied a synchronized to-do list and organized files so agents would not duplicate effort or lose track of prior results.
Early iterations of the agent workflow encountered frequent failures: agents duplicated work, lost context, or produced inconsistent artifacts. About 7% of the final lines reportedly reflect those false starts. The coordination layer and systematic plain-English annotations of intermediate results enabled reuse and reduced redundant proof attempts, allowing the system to scale the formalization effort efficiently.
Claude’s finished output is not a new mathematical discovery. Rather, it is a full, deterministic, machine-checkable encoding of Wiles’s earlier result. Kevin Buzzard, a mathematician leading a human-run Lean formalization of Wiles’s proof at Imperial College London, reviewed Claude’s output and confirmed that it establishes the theorem using the accepted axioms of mathematics. Buzzard’s ongoing human project began in 2024 and remains active with funding through 2029; Claude’s automated effort reached a completed formalization far faster.
The difference between producing a proof and verifying it is important. Mathematical correctness rests on every logical step; human-written proofs can hide subtle gaps that later reviewers must scrutinize. Formalization creates a record that proof assistants can certify as correct according to the chosen foundational axioms. For large, complex theorems, formalization can provide a stronger level of assurance than human checking alone, avoiding overlooked inferences or implicit assumptions.
Historic examples show how slow and contentious verification can be without formalization. Computer-assisted proofs such as the Kepler conjecture and intricate human arguments like Perelman’s proof of the Poincaré conjecture took years for the community to reach confidence in their correctness. Machine-checkable proofs reduce the burden on human reviewers by making every step explicit and mechanically verifiable, though a formal proof still requires careful scrutiny of the formalization choices (definitions, libraries, and encodings) that underlie the output.
Anthropic published the 13-million-line formalization publicly (for example, on GitHub), so any mathematician can inspect the work in detail. The artifact’s size—equivalent to hundreds of conventional books of tightly packed logical argument—underscores both the granularity demanded by formal systems and the practical challenges of human review. Researchers and practitioners can now examine the full formal trace, reproduce checks locally, and explore the organization and dependencies of the formalized development.
Practically speaking, Claude’s accomplishment demonstrates that modern AI systems, combined with careful engineering of coordination tools and proof-assistant ecosystems, can perform lengthy formalization tasks at scale. For the mathematical community, this suggests new workflows for verifying large-scale results, accelerating library development for proof assistants, and enabling reproducible, machine-checked mathematics. For AI research, the episode highlights the combination of parallel agentization, tooling, and human oversight that makes large formalization efforts tractable.
Key Insights Table
| Aspect | Description |
|---|---|
| Key Fact 1 | Claude produced a fully formalized, machine-checked proof of Fermat’s Last Theorem in about 11 days. |
| Key Fact 2 | The formalization spans roughly 13 million lines and over 30,000 supporting theorems, exceeding many existing libraries in scale. |
| Key Fact 3 | A coordinated multi-agent workflow and tooling (Prove2Me) helped manage parallel work and reduce duplication. |
| Key Fact 4 | Kevin Buzzard and others have validated that the formalization follows accepted axioms; the output is publicly available for inspection. |
Afterwards...
The immediate takeaway is that automated formalization is now practical at scales once thought out of reach. Going forward, the mathematical and broader scientific communities should explore several directions: improving proof-assistant libraries to reduce formalization overhead; developing robust coordination frameworks for mixed human–AI teamwork; and establishing best practices for publishing and reviewing machine-checked proofs.
Further technical advances could focus on reducing the verbosity of formal encodings, enhancing interoperability among proof assistants, and creating higher-level abstractions that allow mathematicians to express arguments more concisely while retaining machine verifiability. From a social and institutional perspective, journals, funding agencies, and research groups may need to adapt norms and infrastructure to handle machine-checked artifacts—both in terms of credit and long-term maintenance of formal libraries.
Ultimately, the value of formal proofs lies in their reproducibility and clarity: they make assumptions explicit, enable automated verification, and create artifacts that can be rechecked indefinitely. As tools and practices improve, formalization may become a routine complement to traditional mathematical exposition, improving the reliability of complex results and widening access to reproducible, verifiable mathematics.