Artificial intelligence company Anthropic announced on September 4 that its AI model Claude, operating in a largely autonomous state, completed the first end-to-end computer-verifiable proof of Fermat’s Last Theorem in just 11 days. The achievement was led by a research team headed by Peng Tianyi, a Tsinghua Yao Class alumnus and assistant professor at Columbia Business School, compressing what was originally expected to take years of mathematical formalization engineering into less than two weeks.

Claude did not rediscover a proof of Fermat’s Last Theorem. Rather, it converted the classic proof published in 1995 by British mathematician Andrew Wiles into a formalized language that the Lean proof assistant can verify step by step. Throughout the process, Claude generated approximately 13 million lines of Lean code, constructing roughly 30,300 theorems, of which about 29,500 intermediate theorems were incorporated into the final proof. This scale exceeds Mathlib—the world’s largest mathematical theorem library—by more than fivefold, consuming approximately 6 billion output tokens in total.

From margin note to machine verification

In 1637, French mathematician Pierre de Fermat left a conjecture in the margin of a mathematical text that would baffle generations for centuries: when integer n is greater than 2, the equation xⁿ+yⁿ=zⁿ has no positive integer solutions. Beside it, he wrote: “I have discovered a truly remarkable proof, but this margin is too small to contain it.”

For over three hundred years thereafter, countless mathematicians attempted to crack the problem. In 1908, the Göttingen Academy of Sciences in Germany even established a substantial prize for it, receiving 621 incorrect proofs in the first year alone. It was not until 1995 that Wiles formally published a complete proof accepted by the mathematical community—a paper exceeding 100 pages, spanning modern number theory, algebraic geometry, and multiple other mathematical fields.

Wiles’s path to proof was itself fraught with setbacks. After first announcing his proof in 1993, the review team discovered a critical flaw during verification, and he spent an additional year correcting it before completing the final version. This episode exposed a long-standing dilemma in modern mathematics: proving a theorem is hard, but verifying a complex proof is equally difficult.

Human mathematical papers are typically written for peer readers, and many steps deemed “obvious” are not expanded step by step. But computers take nothing for granted—every logical relationship must be explicitly expressed. Formal proof emerged precisely to address this problem: through proof assistants like Lean, mathematicians can convert mathematical reasoning into computer language, allowing machines to automatically check every link in the proof.

A Tsinghua Yao Class alumnus’s obsession

The core driver of this work, Peng Tianyi, has a notable academic pedigree. He studied at Tsinghua University’s Yao Class as an undergraduate (2013–2017), during which he won the Best Thesis Award and was selected for China’s national training team for the Informatics Olympiad. He then completed his PhD in operations research at MIT, graduating with a perfect 5.0 GPA. He currently serves as both an assistant professor at Columbia Business School and a researcher at Anthropic, with research interests long focused on AI agents, reinforcement learning, and mathematical formalization.

Peng’s obsession with mathematical formalization traces back to an experience during his undergraduate years. At the time, his advisor wanted to incorporate his research results into a Nature paper, but when asked, “Are you certain this proof is completely correct?” his answer was: “I’m 99% confident, but with a proof this long, it’s hard to be 100% certain.” Ultimately, that 1% uncertainty cost him the publication opportunity. Years later, his choice to pursue mathematical formalization was, in some sense, a response to that question he could not answer with full confidence back then.

Multi-agent collaboration and the Prove2Me platform

Getting Claude to complete such a massive formalization project in 11 days was not simply a matter of entering instructions and waiting for output. Anthropic employed a multi-agent collaboration architecture, with dozens of Claude agents respectively responsible for defining mathematical concepts, proving intermediate theorems, and leveraging completed results to advance subsequent proofs.

The project did not go smoothly at first. According to Anthropic, dozens of Claude agents collaborating early on soon descended into chaos—they could not keep pace with one another, and cooperation efficiency was extremely low. Code contributed from early failed attempts ultimately accounted for only 7% of total output. The “amnesia” and “hallucinations” of large language models are especially fatal in rigorous mathematical proofs—a single erroneous line could render millions of subsequent lines of code useless.

The turning point came with the Prove2Me platform developed by Peng’s team. The platform essentially equips AI agents with a “super project manager,” with core features including: a theorem DAG (directed acyclic graph) task tree that provides each AI with a clear task map, identifying the next intermediate nodes to prove; a statement-proof separation mechanism that accelerates compilation and saves computational resources; and a natural language indexing system that enables AI to efficiently retrieve and reuse existing results. Combined with Claude Code’s multi-agent framework, the research team ultimately completed the entire formal proof pipeline in under two weeks.

The final result passed the Lean compiler’s complete verification, relying on only three of the most fundamental mathematical axioms, with no additional assumptions introduced. When the program finished running and the console displayed “PROVED,” Claude’s internal log read: “Fermat’s Last Theorem root node reads as PROVED… this is the goal of this campaign… a historic moment.”

A paradigm shift in mathematical verification

The significance of Claude completing the formal verification of Fermat’s Last Theorem extends far beyond speed. It points to a profound transformation in how mathematical research is verified.

Historically, the correctness of mathematical research has depended on peer review. But as mathematical results grow increasingly complex, human verification is approaching its limits. In 1998, Thomas Hales proved the Kepler conjecture, and the review team spent years examining it, ultimately only able to render a verdict of “highly credible.” In 2002, Grigori Perelman proposed a proof of the Poincaré conjecture, and the mathematical community likewise spent years organizing and confirming it.

As AI begins to participate in mathematical research, this problem may intensify further. AI may be able to rapidly generate vast numbers of mathematical proofs, but human researchers can hardly read and verify them one by one. Formal proof offers a new possibility: AI generates the proofs, humans understand the ideas, and systems like Lean verify logical correctness.

Kevin Buzzard, a mathematician at Imperial College London, gave high praise to the achievement, calling it “a major step toward the automatic formalization of modern mathematical literature.” Buzzard himself was the initiator of the Fermat’s Last Theorem formalization project launched in 2024, at which time he estimated the work might take years.

Notably, Anthropic also conducted a supplementary experiment: using three ordinary accounts on the Prove2Me platform, they completed the formalization of Vinogradov’s three-prime theorem in number theory in just three days. This indicates that as tools mature, the barrier to formal verification is rapidly lowering.

The research team also emphasized that Claude’s work builds upon centuries of accumulated mathematical theory and Wiles’s existing proof, and does not re-prove Fermat’s Last Theorem in a fundamentally new way. Human-readable mathematical papers should not be replaced by computer proofs either. Future mathematical papers may simultaneously contain explanations for human readers and formal proofs for computer verification—complementary rather than substitutive.