Claude Agents Formalize Fermat Last Theorem in Lean
Anthropic says Claude agents produced the first complete machine-checked Lean formalization of Fermat's Last Theorem in 11 days, writing roughly 13 million lines of Lean and proving 29,500
PromptCrates Editorial
Staff Writer

Anthropic says Claude agents produced the first complete machine-checked Lean formalization of Fermat's Last Theorem in 11 days, writing roughly 13 million lines of Lean and proving 29,500 of 30,300 intermediate theorems. The run used about 6 billion output tokens from a Fable-5.1-class research model and built on Kevin Buzzard's FLT blueprint, Mathlib, and Prove2Me. Buzzard independently verified the artifact and called it extraordinary autoformalization while stressing that it changes nothing mathematically—this is verification of Wiles's 1995 proof, not a new discovery.
What the agents actually formalized
Fermat's Last Theorem states that no positive integers a, b, and c satisfy a^n + b^n = c^n for any integer n greater than 2. Andrew Wiles proved it in 1995 after a public gap in an earlier attempt; specialist review took months. What Anthropic describes is not a fresh proof of an open problem. It is a complete Lean formalization that turns an existing human argument—following later exposition by Darmon, Diamond, and Taylor—into a form a computer can check with no unstated gaps.
According to AIstify's report, dozens of Claude agents worked largely autonomously across the 11-day effort. They produced about 13 million lines of Lean code and succeeded on 29,500 of 30,300 attempted intermediate theorems, consuming roughly 6 billion output tokens from an internal research model Anthropic compares to Claude Fable 5.1. Early multi-agent attempts failed when agents lost project state and duplicated work; Anthropic says about 7% of the final proof's non-boilerplate lines came from those failed starts until Prove2Me's shared dependency graph let agents track completed lemmas and work in parallel.
The stack matters as much as the model. The project sat on Buzzard's community FLT blueprint, Mathlib's formalized mathematics library, and Prove2Me, an open collaborative platform built by Anthropic researcher Tianyi Peng's Columbia collaborators to coordinate large formalization jobs. Anthropic did not invent that scaffolding from scratch. The news is that a general-purpose agent swarm, given that scaffolding, finished a landmark formalization on a timeline measured in days rather than the multi-year human plan Buzzard's EPSRC-funded effort had mapped since 2024.
Buzzard compiled Anthropic's code himself and ran Lean's checker over it. He praised the result as proving Fermat's Last Theorem with no assumptions beyond the axioms of mathematics and as a signal that autoformalizing much of modern literature is becoming realistic. His fuller reaction, including a blog titled around being beaten to the finish, was careful: on the underlying mathematics, the result changes nothing because the theorem was already proved and accepted.
Verification speed versus discovery hype
The practical stakes sit in verification throughput, not in rewriting the history of number theory. Checking complex human proofs for hidden errors traditionally consumes specialist months or years—the same ordeal Wiles faced when a critical gap appeared in 1993 and took about a year to repair. A reliable formalization pipeline could compress that burden for future human-authored and AI-generated arguments alike, functioning less like a discovery engine and more like a thorough calculator run over an already-completed case.
Buzzard also flagged a subtler risk: Lean has had soundness bugs in the past, so a capable or misdirected system could in principle poke at the checker itself. He says he tested for that by having an agent flag every repository line that touched Lean's core logic. That caution belongs in any serious reading of the announcement. Machine-checked does not mean metaphysically certain; it means checked by today's trusted kernel under stated axioms.
As models emit candidate theorems faster than human referees can read, tools that accelerate mechanized checking may matter more for near-term integrity than any single famous formalization. The FLT project is a prestige stress test: if agents can finish a blueprint this deep, weaker papers and routine lemmas become plausible targets for automated assistance. Journals, arXiv moderators, and grant panels will eventually need policies for when a Lean artifact accompanies a submission and who is responsible if the formalization later fails under a kernel update.
Researchers comparing agent systems can also look at open harnesses such as our morning note on ECC's GitHub-trending agent harness and afternoon coverage of DeerFlow's SuperAgent harness once published—different domains, same pressure to coordinate long-horizon tool use without agents trampling each other.
What remains open after eleven days
Several questions stay unanswered for outsiders. Anthropic has not, in the secondary reporting cited here, released a full public dump comparable to a community Mathlib contribution process, so independent labs will want clearer reproducibility details: which Fable-class checkpoint, which Prove2Me configuration, and how much human steering remained after the early failures. Buzzard's parallel five-year project continues; community formalization still matters for library hygiene, naming conventions, and reusable lemmas that a one-shot swarm may not optimize for long-term maintainability.
Mathematicians should also resist collapsing formalization into discovery in public communication. Headlines that say AI proved Fermat's Last Theorem mislead readers who do not know Wiles already did. Precise language—first complete machine-checked Lean formalization of an existing proof—preserves credit for both the 1995 human breakthrough and the 2026 autoformalization milestone.
For AI labs, the dependency-graph lesson may travel further than number theory. Multi-agent runs that lack a shared map of what is done waste tokens and produce conflicting artifacts. Prove2Me-style coordination looks like infrastructure, not a prompt trick. Expect similar graphs in software engineering agents, scientific workflows, and safety evaluations that span thousands of subclaims.
The durable story on 9 September 2026 is therefore bounded and still impressive. Claude agents, on a Fable-5.1-class model, formalized Wiles's theorem into Lean in 11 days with tens of millions of lines and tens of thousands of intermediate theorems, after early swarm failures until a shared dependency graph stabilized the work. Kevin Buzzard verified it, praised it, and reminded everyone that mathematics already knew the result. Formalization scaled; discovery did not move.


