Anthropic said Thursday that its Claude models have produced the first complete, computer-checked proof of Fermat's Last Theorem written in the Lean programming language — a 13-million-line formalization that took a team of Claude agents just 11 days to generate, working with only high-level guidance from a single human researcher.
The achievement, detailed in a research post published by Anthropic, is being described by outside mathematicians as the largest Lean proof ever written and a marker of how far AI-assisted "autoformalization" — translating human mathematical reasoning into a form a computer can mechanically verify — has advanced in a single year.
Eleven days, 13 million lines
Fermat's Last Theorem, the 17th-century claim that no three positive integers can satisfy the equation a^n + b^n = c^n for any whole number n greater than two, was left unproved in the margin of a book by Pierre de Fermat and not resolved until Andrew Wiles published his proof in 1995 after seven years of work. Formalizing that proof — rewriting every logical step so a proof assistant like Lean can check it line by line — was expected by mathematicians to take a dedicated community years more.
Anthropic's team, led by researcher Tianyi Peng, instead set dozens of Claude agents loose on the problem using an internal research model roughly equivalent to Claude's Fable 5.1 line. Over 11 days the agents proved 30,300 individual theorems, of which 29,500 were ultimately used in the finished proof, and produced roughly 6 billion tokens of output. The resulting Lean file runs to 13 million lines of code, about five times the size of Mathlib, the largest existing library of formalized mathematics.
Anthropic said its first attempt to formalize Wiles's proof directly failed. The breakthrough came only after researchers gave Claude access to Prove2Me, an open-source coordination tool that maintains a directed graph of theorem statements so that multiple agents can search for, reuse and build on each other's completed proofs rather than duplicating work.
Mathematicians call it a milestone, with caveats
Kevin Buzzard, the Imperial College London mathematician who has led a multi-year community project to formalize the same theorem in Lean, reviewed Anthropic's artifact and largely endorsed it. "This extraordinary autoformalization achievement, which Anthropic researchers say only took 11 days, proves Fermat's Last Theorem with no assumptions other than the axioms of mathematics," he wrote, adding that the proof spans "autoformalization of algebra, harmonic analysis, geometry and number theory" and that AI-generated formalizations are "now robust enough to be built upon."
If automatic formalization of FLT is possible now, then we have taken a big step towards automatic formalization of the modern mathematical literature.
Kevin Buzzard, Imperial College London
Buzzard was careful to note the limits of the result on his own funded formalization project, writing that "a naive reaction to the news above is that I no longer have any work to do. This is not the case," since his effort aims to produce a more thoroughly documented, teachable version of the proof rather than simply a machine-checkable one. Other mathematicians who reviewed the release, cited by SiliconANGLE, noted the work builds on Anthropic's earlier autoformalization experiments involving the Riemann zeta function, and comes weeks after OpenAI said it had used its Astra model to make progress on a set of long-standing Erdős problems.
Anthropic has published the full proof and the Prove2Me tooling on GitHub, and the company said it plans to apply the same agent pipeline to other landmark theorems in the coming months. For a field where a single flawed step can invalidate years of work, the appeal of a proof that a computer can verify line by line — rather than one that relies on human referees — is likely to keep pressure on both Anthropic and OpenAI to publish further mathematical results as evidence of their models' reasoning abilities.
The result lands in the middle of a broader race among AI labs to demonstrate progress on frontier mathematics and science problems, a contest that has taken on added significance as both Anthropic and OpenAI court investors ahead of expected public offerings and continue to justify enormous compute spending with claims of scientific, not just commercial, payoff.