FormalizedNumber theory3 min read

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 an+bn=cna^n + b^n = c^n when nn is greater than two? For n=2n = 2 there are infinitely many solutions, such as 32+42=523^2 + 4^2 = 5^2. 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.

an+bn≠cnfor all positive integers a,b,c and n≥3\begin{gathered} a^n + b^n \neq c^n \\ \text{for all positive integers } a, b, c \text{ and } n \ge 3 \end{gathered}

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 n=mkn = mk, a solution with exponent nn gives one with exponent kk, because an+bn=cna^n + b^n = c^n is the same equation as

(am)k+(bm)k=(cm)k.(a^m)^k + (b^m)^k = (c^m)^k.

Every n≥3n \ge 3 is divisible by 44 or by an odd prime, so it suffices to rule out n=4n = 4 and n=pn = p for odd primes pp. Fermat himself settled n=4n = 4 by infinite descent: from a solution of x4+y4=z2x^4 + y^4 = z^2 in positive integers he built a smaller one, which is impossible because positive integers cannot decrease forever. Euler handled p=3p = 3.

An elliptic curve from a solution that should not exist

Suppose ap+bp=cpa^p + b^p = c^p for a prime p≥5p \ge 5, with aa, bb, cc positive and without common factors. Frey and Hellegouarch attached to it the elliptic curve

E:  y2=x (x−ap) (x+bp).E:\; y^2 = x\,(x - a^p)\,(x + b^p).

Its discriminant, computed from the differences of the three roots 00, apa^p and −bp-b^p, is

Δ=16 (ap)2(bp)2(ap+bp)2=16 (abc)2p,\Delta = 16\,(a^p)^2 (b^p)^2 (a^p + b^p)^2 = 16\,(abc)^{2p},

a perfect pp-th power up to the factor 1616. That makes the curve strange: it has bad reduction only at primes dividing abcabc, and in a way that the arithmetic of its points modulo pp barely notices.

Two theorems that cannot both hold

Serre predicted, and Ribet proved in 1986, that if EE were modular, its points modulo pp would be governed by a modular form of weight 22 and level 22. There is no such form: the space of these cusp forms is zero, dim⁡S2(Γ0(2))=0\dim S_2(\Gamma_0(2)) = 0.

Wiles, with Taylor, proved that every semistable elliptic curve over Q\mathbb{Q} is modular, and the Frey curve is semistable. So EE is modular and cannot be modular at the same time. The only way out is that the solution aa, bb, cc 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.

lean|Theorems/Thm_fermat_last_theorem.lean · signature excerpt
1theorem fermat_last_theorem
2 (n : ℕ) (hn : 3 ≤ n)
3 (a b c : ℕ)
4 (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) :
5 a ^ n + b ^ n ≠ c ^ n
6-- 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. 1.
  2. 2.
  3. 3.
  4. 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. 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…