Fermat’s Last Theorem, checked line by line
A 350-year story meets an 11-day formalization campaign.
Anthropic · Tianyi Peng · Kevin Buzzard · Lean community
Where this stands
A formalization of a known theorem. It does not replace Wiles’s discovery or erase the community work on which it builds.
Start with the question
The problem
Can three positive whole numbers satisfy when is greater than two? For there are infinitely many solutions, such as . Fermat claimed there are none for larger exponents. Wiles, with Taylor’s contribution, established the theorem in the 1990s. The new challenge was to make the proof checkable by a small logical kernel.
Before the news
Understand the mathematics
The established mathematics behind the story, step by step. What is new, and who claims it, follows below with sources.
It is enough to handle primes and 4
If , a solution with exponent gives one with exponent , because is the same equation as
Every is divisible by or by an odd prime, so it suffices to rule out and for odd primes . Fermat himself settled by infinite descent: from a solution of in positive integers he built a smaller one, which is impossible because positive integers cannot decrease forever. Euler handled .
An elliptic curve from a solution that should not exist
Suppose for a prime , with , , positive and without common factors. Frey and Hellegouarch attached to it the elliptic curve
Its discriminant, computed from the differences of the three roots , and , is
a perfect -th power up to the factor . That makes the curve strange: it has bad reduction only at primes dividing , and in a way that the arithmetic of its points modulo barely notices.
Two theorems that cannot both hold
Serre predicted, and Ribet proved in 1986, that if were modular, its points modulo would be governed by a modular form of weight and level . There is no such form: the space of these cusp forms is zero, .
Wiles, with Taylor, proved that every semistable elliptic curve over is modular, and the Frey curve is semistable. So is modular and cannot be modular at the same time. The only way out is that the solution , , never existed.
What a formal proof has to contain
The final Lean statement is elementary, but every link above rests on a large theory: Galois representations, modular forms and Hecke algebras, and the Taylor–Wiles method for proving modularity. A formal proof must build all of it from the definitions, and a small kernel then checks each inference. That is why formalizing a proof whose conclusion fits on one line takes millions of lines.
01
The theorem was already proved
Kevin Buzzard’s community project pursues a modern route to FLT. Anthropic instead followed the Darmon–Diamond–Taylor exposition of the Wiles–Taylor–Wiles argument. Buzzard welcomed the achievement while explaining why useful, maintainable mathematical libraries remain a separate goal. [3]
02
Coordination unlocked the formalization
Anthropic reports that Claude agents completed the campaign in 11 days using Prove2Me. A shared graph tracked which theorems depended on which others, helping agents reuse work and choose the next missing step. The released artifact contains roughly 13 million lines of Lean. This is an automation milestone built on human proofs, Mathlib, and earlier formalization projects. [1]
03
Follow the proof all the way down
The repository documents a clean build, an axiom audit, a comparison with Mathlib’s statement, and a second-kernel check using a patched version of nanoda. Its proof-path guide connects the mathematical landmarks to the corresponding Lean declarations. These are the authors’ verification reports; we have not rebuilt this large artifact here. [2]
Inspect the evidence
The Lean formalization
Released Lean 4 formalization
The final declaration uses positive natural numbers and exponents at least three. FinalCheck.lean audits its axioms and derives Mathlib’s FLT statement. The excerpt below is the published theorem signature, with its proof body intentionally omitted.
1theorem fermat_last_theorem2 (n : ℕ) (hn : 3 ≤ n)3 (a b c : ℕ)4 (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) :5 a ^ n + b ^ n ≠ c ^ n6-- Signature excerpt; open the repository for the proof body.Sources & further reading
Reviewed 9 Sept 2026. X permalinks were recovered from indexed posts and linked discussions; direct X pages were not consistently accessible. They document the conversation, not proof correctness.
- 1.Anthropic: Formalizing Fermat’s Last Theorem ↗Announcement
- 2.
- 3.
- 4.Anthropic’s FLT announcement on X ↗X post
Announcement, 4 September 2026. Direct post access was unavailable during review; the permalink is also recorded by Claude Pulse and Daily Intel.
- 5.Kevin Buzzard’s original community-project announcement ↗X post
Historical context from October 2023, not a response to the 2026 release.
Work through it together
Discussion
Loading discussions…