Skip to main content
AI RADARModels
406•09/05/2026, 09:15•3 min read

Claude Formalizes the Proof of Fermat's Last Theorem

Executive TL;DR30s read

Claude, an AI system from Anthropic, successfully formalized the proof of Fermat's Last Theorem in 11 days, writing 13 million lines of code. This is a significant achievement in the automation of mathematical proofs.

Claude Formalizes the Proof of Fermat's Last Theorem

Around 1637, Pierre de Fermat wrote in the margins of a book that natural numbers a, b, c cannot satisfy the equation aⁿ + bⁿ = cⁿ for any n > 2. Fermat claimed he had found a proof, but there was not enough space in the margins to write it down.

After that, mathematicians searched for this proof for 350 years. It was first found in 1995 by mathematician Andrew Wiles. It took 129 pages. In fact, he discovered it back in 1993, but during the verification process, a gap was found that took a couple more years to resolve.

Verifying such complex proofs by humans can take years. There is a way to check algorithmically, but for that, the proof needs to be formalized, meaning it must be translated into a programming language (most often Lean). However, this is also very difficult: every step, even trivial ones, must be explicitly stated, and all nested lemmas must be formalized as well. Mathematicians rarely do this in their proofs, referring to "obviousness" and centuries of unformalized assertions.

The formalization of Fermat's Last Theorem has already been attempted. Kevin Buzzard started this process as a multi-year community project. It was expected that formalization would take years and the effort of many specialists.

Yesterday, Anthropic announced that Claude fully formalized the theorem in 11 days. Autonomously. To do this, he wrote (attention) 13 million lines of code in Lean. For comparison, this is 5 times larger than the entire Mathlib library. In the process, agents also proved 29,500 intermediate lemmas.

The very same Kevin Buzzard, upon reviewing the proof, called it an extraordinary achievement of auto-formalization and confirmed that the theorem is proven without any assumptions other than the axioms of mathematics.

By the way, it took the agents a total of 6 billion output tokens for everything.

Why it matters

Analysis

This achievement demonstrates the potential of AI in formalizing complex mathematical proofs, which can significantly accelerate scientific research. The automation of such processes opens new opportunities for the development of mathematics and other sciences.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills