Claude helps complete first formalized proof of Fermat’s Last Theorem

3 hours ago 24

Pierre de Fermat scribbled a note in the margin of a math textbook in 1637, claiming he had a proof that was too large to fit in the space. It took 358 years for a human to actually prove him right. Now an AI has done something arguably harder: translating that proof into language a computer can verify, line by line, with zero ambiguity.

Anthropic’s Claude has produced the first complete machine-checked formalization of Fermat’s Last Theorem using Lean 4, a proof assistant that functions like a brutally honest math teacher who refuses to let you skip any steps. The formalization covers over 29,511 theorems and 1,450 definitions, all verified through Lean’s kernel without relying on axioms outside the standard Mathlib foundations.

What formalization actually means

Andrew Wiles proved Fermat’s Last Theorem in 1995, and the mathematical community accepted it. But “accepted” in math still leaves room for human error. A formalized proof is different. Every logical step gets encoded in a programming language designed for mathematical reasoning, and a computer checks each one independently.

Claude’s formalization follows the Frey-curve and modularity-lifting approach, which is the modern route pioneered by Wiles and Taylor. This is distinct from Kummer’s classical method, which only handles so-called “regular primes” and doesn’t cover the full theorem. The work is documented in Anthropic’s public GitHub repository, anthropics/fermats-last-theorem, where anyone can inspect the full proof chain.

Years of human groundwork made this possible

Crediting this entirely to Claude would be like crediting a GPS for discovering America. The formalization builds on years of effort by the interactive theorem-proving community, most notably Kevin Buzzard’s ongoing project at Imperial College London.

Buzzard, a professor of pure mathematics, has been working on formalizing major mathematical results in Lean for years. His FLT formalization project is expected to continue until at least 2029, reflecting just how enormous the undertaking is even with human mathematicians driving the process.

A separate academic paper, expected in 2024 or 2025, will present the first complete Lean formalization of the regular-prime case of FLT. That effort runs in parallel, tackling a different slice of the same theorem using Kummer’s older approach.

Claude’s contribution sits at the intersection of this community’s foundational work and Anthropic’s push to make AI useful for rigorous reasoning tasks. The AI generated and verified complex Lean proofs with minimal human oversight, but it did so on scaffolding that mathematicians spent years constructing.

Why this matters beyond mathematics

Fermat’s Last Theorem states that no three positive integers a, b, and c can satisfy the equation a^n + b^n = c^n for any integer value of n greater than 2. Wiles’ original proof ran over 100 pages and drew on virtually every major branch of modern number theory.

Compressing that into machine-verifiable logic, over 29,500 individual theorems, is a stress test for AI reasoning that goes far beyond typical benchmarks. Most AI evaluations involve multiple-choice questions or short-form problem solving. This required sustained, structured logical reasoning across thousands of interdependent steps.

For the mathematical community, this accelerates a long-term vision: a world where every major theorem has a machine-checked proof that anyone can audit. Buzzard has been vocal about this goal for years, arguing that informal proofs, no matter how widely accepted, carry a nonzero risk of containing subtle errors.

The gap between what Claude achieved and full autonomous mathematical discovery remains significant. Formalizing an existing proof, even one this complex, is fundamentally different from discovering a new one. What’s harder to argue with is the output: a proof that Lean’s kernel accepts, covering every logical step of one of the most celebrated results in the history of mathematics.

Disclosure: This article was edited by Editorial Team. For more information on how we create and review content, see our Editorial Policy.

Read Entire Article