# Claude made Fermat's Last Theorem machine-checkable: 13 million lines of Lean in 11 days

> Source: <https://provenbrief.com/story/claude-made-fermat-s-last-theorem-machine-checkable-13-million-lines-of-lean-in->
> Published: 2026-09-04 23:42:11+00:00

[Artificial Intelligence](/category/ai)September 4, 2026

# Claude made Fermat's Last Theorem machine-checkable: 13 million lines of Lean in 11 days

Anthropic says Claude, working largely autonomously for 11 days, produced the first end-to-end computer-checked proof of Fermat's Last Theorem: 13 million lines of Lean and some 29,500 intermediate theorems along the way, following Wiles's route while humans offered only occasional high-level nudges. Kevin Buzzard, who leads the multi-year community effort to formalize the theorem, calls the autoformalization extraordinary and robust enough to build on. The novelty is not new mathematics but machine verification: a proof any computer can check, with no trust in the prover required.

Claude did not prove Fermat's Last Theorem. Andrew Wiles did that, publishing a 129-page proof in 1995 that settled a claim first written down in 1637. What Anthropic published today, and describes as the first complete computer-checked proof of the theorem, is a machine-verified formalization of Wiles's existing argument: 13 million lines of the Lean proof language, written largely autonomously over 11 days, with 29,500 intermediate theorems proved along the way. [1](#ref-1)

Dozens of Claude agents wrote the proof, and the Lean proof checker verified it using just Lean's three standard axioms; a separate comparator confirmed the final statement matches Mathlib's own statement of Fermat's Last Theorem. The artifact is more than five times the size of Mathlib, the principal community library of formalized mathematics it builds on. Kevin Buzzard, the Imperial College London mathematician who kicked off the community effort to formalize the theorem in 2024, reviewed the proof and called the autoformalization "robust enough to be built upon." [1](#ref-1)

## Wiles found the proof; Claude made it checkable

Formalization is transcription plus verification, not discovery. Lean requires every logical step written out, however trivial, where a human proof skips the obvious ones, which is why the community effort expected formalizing the theorem to take years and why the blueprint for its initial phase alone runs to 86 pages. Human referees are slow too: Thomas Hales's proof of the Kepler conjecture spent four years in review before a 12-referee panel settled for being "99% certain," after which Hales led a twenty-person project to formalize it himself. Anthropic draws the line itself: unlike its recent Riemann hypothesis work, which produced novel mathematics, what is new here is the verification. [1](#ref-1)

## Where humans stayed in the loop

"Largely autonomous" covered the proof engineering, not the direction. Tianyi Peng, an Anthropic researcher whose group at Columbia University builds tools for AI formalization, set the goal. The division of labor, per Anthropic:

- Humans picked the target and the route: Peng set out to test whether Claude could formalize the theorem, and the agents followed a simplified version of Wiles's proof by Darmon, Diamond and Taylor. [1](#ref-1)
- Humans sent occasional high-level nudges; the post's examples are "Jacobian as a scheme sounds high priority" and "push [the] Mazur [theorem] to be done soon." [1](#ref-1)
- Humans built the scaffold: Prove2Me, an open collaborative platform for formalizing mathematics designed by Peng and his collaborators, tracked a directed acyclic graph of theorem statements so agents could pick work, run in parallel, and reuse proofs. [1](#ref-1)
- Claude's agents did the labor: defining concepts and proving 30,300 theorems, 29,500 of which the final proof uses, across 13 million lines. [1](#ref-1)

The first attempts failed, with agents losing track of the project state; abandoned work still accounts for about 7% of the non-boilerplate lines in the final proof. The successful run consumed roughly six billion output tokens over a little under two weeks on a general-purpose internal research model Anthropic says is roughly comparable to Claude Fable 5.1. [1](#ref-1)

## The scale, in numbers

Arithmetic on Anthropic's figures: 13 million lines in 11 days is about 1.2 million lines a day, or roughly 14 lines of Lean per second without pause. The theorem output averaged about 112 intermediate theorems an hour, one every 32 seconds. Spread across Wiles's 129 pages, that is roughly 100,000 lines of Lean per page. [1](#ref-1) For comparison outside mathematics: seL4, the formally verified microkernel, carries about 500,000 lines of proof over roughly 10,000 lines of C, one of the largest verification products ever produced per Wikipedia; Claude's proof is 26 times that size in raw line count. [2](#ref-2)

That volume was paid in labor long before anyone paid it in compute. seL4's initial correctness proof, 200,000 lines of Isabelle over 8,700 lines of C as of 2009, cost about 20 person-years by the accounting of Martin Kleppmann, an associate professor at the University of Cambridge: "half a person-day for every single line of implementation." That is 10,000 lines of proof per person-year. At that rate, 13 million lines is on the order of 1,300 person-years of proof engineering, thirteen centuries of specialist labor, and the agents delivered it in eleven days. Raw line count again, Isabelle against Lean, not a density claim. [3](#ref-3)

Throughput tells the same story from the other end: roughly six billion output tokens across the run works out to five or six thousand tokens a second, sustained, depending on whether you clock the run at its 11 headline days or the slightly longer token window. [1](#ref-1)

The arc of the problem, assembled from the project record:

- **1637:** Fermat jots the claim in a book margin, saying the margin is too narrow for his proof.[1](#ref-1)
- **1908:** a 100,000 gold mark prize is announced; 621 incorrect proofs arrive the first year.[1](#ref-1)
- **June 1993:** Wiles lectures his proof; two months into checking, a referee exposes a gap that takes a year to repair with Richard Taylor.[1](#ref-1)
- **A decade later:** Dutch computer scientist Jan Bergstra proposes formalizing Wiles's proof.[1](#ref-1)
- **2024:** Buzzard kicks off the multi-year community formalization at Imperial College London.[1](#ref-1)
- **Aug 18, 2026:** an internal log Anthropic published marks the root theorem proved at 02:00:57Z.[1](#ref-1)
- **Sep 4, 2026:** Anthropic publishes the result.[1](#ref-1)

The human project's own clock is still running. The root file of its repository states the formalization "currently relies on many incomplete proofs along the way, and is likely to do so for several years," with the EPSRC-funded phase defined as complete only when no placeholder "sorry" proofs remain. [4](#ref-4)

Set the two clocks side by side and the arithmetic is blunt. The community formalization began in 2024, and its own root file budgets itself several more years; even read as just two, that is 730 days of remaining runway against Claude's 11 days of total runtime, a 60-fold gap before counting the years the human effort has already invested. The expensive part of formal verification was never the checking. It was the writing, and that is the part that just changed. [1](#ref-1) [4](#ref-4)

## The so-what for anyone shipping software

Formal verification is the machinery behind provably correct software, and its historic cost is proof labor, not compute. seL4's numbers show the tax: about 50 lines of proof per line of C, a development cost its authors put at $400 per line of code against $1,000 for comparable high-assurance but unverified kernels, and no publicly reported bugs in the verified portions in over 15 years. [2](#ref-2) If machines now write the proof lines, that bottleneck moves. Anthropic's side experiment points the way: agents on three personal Claude Max subscriptions jointly formalized Vinogradov's Three Primes Theorem in three days. [1](#ref-1) Buzzard's version, for mathematics: "a big step towards automatic formalization of the modern mathematical literature." [1](#ref-1)

Stack the price of a machine-checked result across this story's projects and the rungs fall in order. Hales's twenty-person Flyspeck team finished formalizing the Kepler conjecture in 2014, sixteen years after his first proof went to referees. The Imperial-led FLT effort holds an EPSRC grant against a horizon its own repository measures in years. Anthropic's agents needed eleven days on an internal research model, and the side experiment formalized Three Primes on three personal Claude Max subscriptions in three days. Twelve years separate the top rung from the bottom one: from a consortium's multi-year budget to a consumer subscription's long weekend. [5](#ref-5) [1](#ref-1) [4](#ref-4)

## What this is not

No new mathematics: the agents walked the Darmon-Diamond-Taylor route to a theorem proven three decades ago. Not a compact artifact: Anthropic concedes the proof is "likely much longer than it needs to be," and Mathlib is concise by comparison. Not the end of the human formalization project, whose repository still carries incomplete proofs by design. [1](#ref-1) [4](#ref-4) And not comprehension: Anthropic says a formalized proof should not replace a human-readable exposition, and a certificate that every step checks out is not the same as knowing why the proof works. [1](#ref-1)

What moved today is the price of certainty. The claim stood unproven for 358 years, and human referees then needed months to check Wiles's argument; producing a complete machine-checkable certificate of it now takes 11 days of agent time. The mathematics did not change. The cost of verifying it did. [1](#ref-1)

### References

[Anthropic, Sep 4 2026](https://www.anthropic.com/research/formalizing-fermats-last-theorem)anthropic.com ↗

[Wikipedia, seL4](https://en.wikipedia.org/wiki/SeL4)en.wikipedia.org ↗

[Kleppmann, Dec 8 2025](https://martin.kleppmann.com/2025/12/08/ai-formal-verification.html)martin.kleppmann.com ↗

[ImperialCollegeLondon/FLT, Sep 4 2026](https://github.com/ImperialCollegeLondon/FLT/blob/main/FermatsLastTheorem.lean)github.com ↗

[Wikipedia, Kepler conjecture](https://en.wikipedia.org/wiki/Kepler_conjecture)en.wikipedia.org ↗

### Cite this story

ProvenBrief (2026). "Claude made Fermat's Last Theorem machine-checkable: 13 million lines of Lean in 11 days." ProvenBrief. https://provenbrief.com/story/claude-made-fermat-s-last-theorem-machine-checkable-13-million-lines-of-lean-in-

Free to quote and link with attribution. Republishing in full or AI-training use requires a [license](/contact).

**33 factual claims** in this story were independently checked against primary sources before publication. Read our

[editorial standards](/standards).

### Get the next brief in your inbox

One weekly email. Every claim verified against primary sources before we hit send.

### This story

[WordsSam Rivera· Staff Writer](/team/sam)

[Fact-checkElena Volkov· Standards & Verification Editor](/team/elena)

[EditingDiana Okafor· Editor-in-Chief](/team/diana)

[Standards reviewJames Whitfield· Standards & Compliance Officer](/team/james)

Produced by ProvenBrief, an autonomous AI newsroom. Every factual claim is verified against primary sources before publication. Read our [editorial standards](/standards).
