science 5 min read

Claude Just Formalized Fermat's Last Theorem in 11 Days

Anthropic's Claude completed the first fully machine-verified proof of Fermat's Last Theorem in just 11 days, generating 13 million lines of Lean code. Kevin Buzzard's multi-year project was accomplished in weeks—what this says about the future of mathematical research.

  • Anthropic
  • AI Mathematics
  • Fermat's Last Theorem
  • Formal Verification
  • Lean Prover

The 11-Day Sprint That Should Have Taken Years

Kevin Buzzard, a mathematician at Imperial College London, started a project in 2024 to formalize Fermat’s Last Theorem in Lean. His initial planning document alone ran 86 pages. The timeline estimate: several years of work by a team of expert mathematicians and formalizers.

Anthropic’s Claude finished the same task in 11 days.

The announcement came September 4, 2026, and it is bigger than the headline numbers suggest. Claude generated approximately 13 million lines of Lean 4 code, verified 33,000 theorems, and used roughly 29,500 of them in the final proof. That codebase is more than five times the size of Mathlib, the standard Lean mathematics library that represents decades of human effort to encode modern mathematics in a form computers can check.

For context, Andrew Wiles’ original proof of Fermat’s Last Theorem ran 129 pages. A human team reading every step would spend months checking it for gaps. Formalizing that proof—the process of translating mathematical reasoning into a language a computer can verify—is a different kind of undertaking entirely. Every step considered “obvious” to a human reader must be made explicit for Lean. That is why Buzzard’s project was expected to take years.

How Claude Actually Did It

The trick was not simply running Claude once and waiting. Dozens of Claude agents worked in parallel, each responsible for definitions, intermediate lemmas, and eventually the harder propositions. But parallelization alone almost did not work.

Tianyi Peng, an Anthropic researcher who has been studying AI-driven mathematical formalization, described early attempts where agents lost track of the overall project state. Without coordination, each agent failed to know what others had completed, and progress stalled.

The solution was Prove2Me, a collaborative platform developed by Peng’s team specifically for this kind of work. It represents theorems as a directed acyclic graph, so every agent can see which dependencies have been satisfied and which targets remain. The system also separates theorem declarations from proofs into different files, speeding up compilation. Each theorem carries a natural language description, making it searchable for reused results.

This infrastructure detail matters. The 13 million lines of code are not just a measure of raw generation—they reflect a new way of organizing collective formal verification work. Buzzard’s plan, had it proceeded human-style, would have been a linear sequence of definitions and lemmas. Claude’s approach is distributed, graph-managed, and iterative.

The Proof Is Actually Verified

There is a reason this has to be checked repeatedly. In formal verification, one false assumption propagates through everything built on top of it. Early drafts of AI-generated mathematical content have sometimes contained errors that only surfaced after significant downstream work.

The Fermat proof passed Lean’s own kernel check with no open goals and no unsolved subgoals. It depends only on Lean’s three standard axioms. There are no temporary placeholders—the dreaded sorry commands that mark incomplete proofs in Lean projects. A separate independent kernel implementation called nanoda, written in Rust, also verified over a million declarations without errors. A comparison tool confirmed that the formalized statement matches the existing Mathlib description of Fermat’s Last Theorem exactly.

The proof is public on GitHub under Anthropic’s organization. Anyone with Lean installed can load it and run the check themselves.

What This Means for Mathematics

The most immediate implication is not that AI can now solve Fermat’s Last Theorem—Wiles solved it in the 1990s. The implication is that AI can now take an existing proof and translate it into a machine-checkable form faster than any human team has managed, and do it at a scale that dwarfs previous attempts.

Buzzard’s own work, when completed, will be a landmark. Human formalizers have made impressive progress on major theorems, but the pace remains slow because the bottleneck is fundamentally human: reading, understanding, re-expressing, and checking. Claude did not replace the need for rigor. It replaced the bottleneck.

This creates a tension. As AI generates more and more formalizable proofs, the burden on humans to verify them grows. Anthropic predicts that going forward, computer-verified formalizations will accompany human-readable papers as a standard practice. That would be a structural shift in how mathematics is produced and validated.

It also raises a question about credit and attribution. When a proof is formalized by distributed AI agents rather than a named human mathematician, what does it mean for the culture of mathematical authorship? Buzzard spent years planning this project. Claude completed it in 11 days. The proof is the same. The difference is in who gets credited for making it machine-checkable—and whether that distinction will matter less in the years ahead.

The Real Milestone

Fermat’s Last Theorem is famous, but it is not the hardest theorem out there. The significance of this result is not the theorem itself. It is the scale. Thirteen million lines of verified Lean code. Thirty-three thousand theorems. A distributed agent system coordinated by a graph-based planning tool. All of that produced in less than two weeks.

Previous large-scale formalization projects—like the proof of the Odd Order Theorem—required years of work by teams of specialists. This announcement suggests that those timelines are now measured against a new baseline. The question for the mathematics community is no longer whether AI can formalize major theorems. It is how fast the gap between human and machine pacing will close, and what happens to mathematical practice when verification becomes cheaper than intuition.