Anthropic said early Saturday that an internal Claude model spent 11 days in August autonomously writing out a complete, machine-checked proof of Fermat's Last Theorem, generating 13 million lines of code in the formal proof language Lean and proving 30,300 individual theorems along the way. It's the first time anyone, human or machine, has formalized the full proof end to end, and it's the kind of result mathematicians have been predicting is coming for years without quite expecting it this soon.

The work was led by Tianyi Peng, a researcher at Anthropic who previously worked on formal methods at Columbia University, and the resulting proof was reviewed by Kevin Buzzard, a mathematician at Imperial College London who has spent much of the last decade pushing the field toward machine-verified proofs. Buzzard's endorsement matters here: he's one of the people best positioned to spot a formalization that technically compiles but doesn't actually capture the mathematics, and he didn't flag that problem.

RelatedOpenAI's Astra Solves Ten Open Math Problems for $2,000

  • Claude ran largely unsupervised for 11 days in August 2026, producing 13 million lines of Lean, more than five times the size of Mathlib, the community's main formal math library.
  • It proved 30,300 theorems in the process, of which 29,500 ended up load-bearing in the final proof.
  • The run consumed roughly six billion output tokens, coordinated through a multi-agent Claude Code harness managing dozens of collaborating agents at once.
  • Kevin Buzzard, an outside mathematician with no stake in Anthropic's result, reviewed and endorsed the formalization.

Why was formalizing this proof so hard in the first place?

Andrew Wiles announced a proof of Fermat's Last Theorem in 1993, found a gap almost immediately, and published a corrected 129-page version with Richard Taylor in 1995. That proof reads like a tour through several of the deepest areas of 20th-century number theory: elliptic curves, modular forms, Galois representations, and the modularity theorem that connects them. It is not a proof anyone summarizes on a napkin, and it was never designed to be checked by a computer.

Formalizing a proof means rewriting every single logical step in a language a proof assistant like Lean can verify mechanically, with no gaps papered over by "it is easy to see that" or a diagram that a human just trusts. Mathlib, the shared library Lean users have spent over a decade building, already contains a huge amount of the machinery Wiles used. But nobody had assembled a complete chain from Mathlib's building blocks all the way to Fermat's Last Theorem itself, partly because doing so by hand was expected to take a team of specialists years.

What did Claude actually do differently here?

Peng's team built the run on top of Prove2Me, a collaborative formalization platform his group at Columbia had designed for exactly this kind of large, decomposable proof project. Rather than one model working through the proof linearly, a multi-agent Claude Code harness split the target into a huge tree of sub-lemmas, assigned pieces to dozens of agent instances working in parallel, and stitched the results back together, resubmitting anything Lean's kernel rejected until the whole chain type-checked.

That's a meaningfully different approach from how most AI math systems have made headlines recently. Google DeepMind's AlphaProof, which reached silver-medal-equivalent performance at the 2024 International Mathematical Olympiad, is a reinforcement-learning system trained specifically on formalized competition problems, closer in spirit to AlphaZero than to a general-purpose coding agent. Claude's FLT run instead leaned on the same kind of agentic software-engineering loop Anthropic sells for writing production code, pointed at a math problem instead of a codebase.

How Claude assembled the Fermat's Last Theorem proof A pipeline diagram showing a multi-agent Claude Code harness decomposing the proof into sub-lemmas, checking them against Lean and Mathlib on the Prove2Me platform, and producing 30,300 verified theorems. THE 11-DAY RUN Claude Code multi-agent harness dozens of agents Lean 4 + Mathlib library kernel-checked Prove2Me Peng's platform splits into sub-lemmas Full proof 30,300 theorems 13M lines of Lean Rejected steps loop back through the kernel until every branch type-checks. Reviewed afterward by Kevin Buzzard, Imperial College London. genztech.blog
Fig 1 A multi-agent Claude Code harness split Fermat's Last Theorem into a tree of sub-lemmas, checked each one against Lean and Mathlib on Prove2Me, and rebuilt the full chain over 11 days.

What does an outside mathematician's review actually confirm?

A Lean proof that type-checks is not automatically a proof anyone should trust. It's possible to formalize the wrong statement, smuggle in an unintended assumption, or lean on a Mathlib lemma that itself has a subtle error. That's why Buzzard's involvement is the detail worth taking seriously rather than skimming past. He's spent years building and reviewing large-scale Lean formalizations, including his own long-running effort to formalize Fermat's Last Theorem by hand with a community of contributors, so he has a genuine basis for judging whether Claude's version actually proves what it claims to prove, not just whether it compiles.

RelatedMeta's Muse Spark 1.1 Chases Anthropic and OpenAI

Who does this actually affect, and what happens next?

Working mathematicians are the most immediate audience. Peer review for a landmark result can take years partly because so few people are qualified to check every step by hand. A trustworthy machine-checked version doesn't replace that judgment, but it gives reviewers a second, mechanically verifiable path to lean on, which is exactly the argument formal-methods researchers have been making for why Lean and Mathlib matter beyond being a hobby for a small community.

For Anthropic, this is also a capability demonstration aimed past its usual coding-benchmark audience. The company competes with OpenAI and Google DeepMind partly on the argument that agentic, tool-using models generalize past narrow benchmarks. A model that can carry a proof through 30,300 intermediate theorems without a human checking each branch is a much harder thing to fake than a leaderboard score, and it's the kind of result that tends to get cited by people building AI-for-science tools who need evidence a model can sustain a long, structured argument without drifting.

SystemTaskResultVerification
AlphaProof + AlphaGeometry 2Google DeepMind, 20244 of 6 problems at IMO 2024Individual Lean proofs, silver-medal-equivalent score
Mathlib community formalizationsOngoing, volunteer-ledLarge theorems ported into Mathlib over yearsHuman-directed, machine-checked
Claude (Anthropic)August 2026Full Fermat's Last Theorem, end to end13M lines of Lean, reviewed by Kevin Buzzard
  1. 1637Pierre de Fermat writes the conjecture in a book margin claims a proof that never surfaces
  2. 1994-95Andrew Wiles, with Richard Taylor, publishes the first proof 129 pages, Annals of Mathematics
  3. 1995Henri Darmon, Fred Diamond and Richard Taylor publish a simplified exposition reworks Wiles's argument for a wider audience
  4. Aug 2026Claude formalizes the complete proof in Lean over 11 days Tianyi Peng's team, on the Prove2Me platform
  5. Sept 2026Anthropic publishes the result reviewed by Kevin Buzzard, Imperial College London
What to watch · next 12 months
  • Independent replication. Watch whether other Lean specialists outside Anthropic pull the proof apart line by line, the way any landmark result eventually gets stress-tested.
  • Whether the technique generalizes. Fermat's Last Theorem is a single, famous target. The real test is whether the same multi-agent harness can formalize a proof nobody has finished by hand yet.
  • Competitive response. Expect Google DeepMind and OpenAI to publish their own large-scale formalization results if this holds up, since none of the major labs wants to cede the "AI does real math" narrative.

Our take

The headline number, 13 million lines of Lean, is easy to read as an AI story about scale, and it partly is one. But the more interesting claim is durability: a proof assistant's kernel doesn't grade on effort, and 30,300 theorems either chain together correctly or they don't. Buzzard putting his name on it is doing a lot of the work here, more than the raw token count. If the formalization holds up under scrutiny from people with no reason to be generous to Anthropic, this becomes a genuine data point for agentic AI handling long, structured reasoning tasks that resist shortcuts, not just another benchmark headline.

Primary sources

Original analysis by GenZTech, based on Anthropic's research publication and independent verification of the cited sources.