Claude Formalizes Fermat's Last Theorem: the 13-Million-Line Proof

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-09-09 | By: Carlos Montiel | Reading time: ~5 minutes

Anthropic revealed that Claude produced — working mostly autonomously over 11 days — the first end-to-end, computer-verified proof of Fermat's Last Theorem in the formal language Lean. It's a mathematical milestone, but it's also a concrete case study in how much sustained intellectual work can now be delegated to an agent without constant supervision.

One theorem, 30,300 verified steps

Fermat's Last Theorem — which states that no three positive integers can satisfy a^n + b^n = c^n for n greater than 2 — was proven by Andrew Wiles in 1994, but it had never been fully formalized in a proof assistant like Lean, where every logical step is mechanically verified without anything taken for granted. According to Anthropic, Claude generated 13 million lines of Lean code and produced 30,300 intermediate theorems, of which 29,500 ended up being part of the final proof. Mathematician Kevin Buzzard, an authority on formalization, confirmed that the result "proves Fermat's Last Theorem with no assumptions beyond the axioms of mathematics."

The key piece: coordination, not just capability

The achievement didn't come from a single monolithic attempt. Anthropic notes that the real breakthrough came from adopting Prove2Me, an open collaborative platform built by researcher Tianyi Peng together with collaborators from Columbia University, which maintains a dependency graph between theorem statements so that multiple Claude agents can work in parallel without stepping on each other's work, reusing results already proven by other agents through natural-language descriptions.

Project figures (Anthropic / Claude): - Duration: 11 days, mostly autonomous work - Lean code generated: 13,000,000 lines - Theorems proven: 30,300 (29,500 used in the final proof) - Output tokens consumed: ~6,000 million - Final size: ~5x the community Mathlib library

Not everything worked on the first try

Anthropic is transparent about the limitations: Claude's proof is "probably much longer than necessary," and failed attempts accounted for roughly 7% of the non-repetitive lines generated during the process. This confirms a pattern already familiar from long-running autonomous agents: the path to the correct result is almost never linear, and it includes discarded branches that consume real compute.

What this means for businesses already using Claude or other LLMs

The enterprise value of this announcement isn't in the algebra — it's in the combination of two elements that are replicable in corporate contexts: (1) sustained autonomy over days, not minutes, on a complex task broken into verifiable subtasks, and (2) a formal verification language or system — Lean in this case — that mathematically confirms the result is correct, instead of trusting that it "sounds right." For use cases like code auditing, contract validation, or regulatory report generation, the lesson is the same: autonomous agents scale better when there's an objective verifier at the end of the process, not just an occasional human reviewer.
Carlos Montiel
Enterprise AI Solutions Architect
LLM, Agent, and Orchestration Specialist
guatemalia.com/en/#contacto · info@guatemalia.com

Need to implement AI at your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies in Guatemala and Latin America. Contact him for a consultation.

Contact Carlos Montiel

info@guatemalia.com