Fermat’s Last Theorem Explained: Wiles to Lean

Quick answer: Fermat’s Last Theorem says that a^n + b^n = c^n has no solutions in positive integers when n is an integer greater than 2. Pierre de Fermat claimed a proof in a book margin around 1637. Andrew Wiles, with Richard Taylor, proved it in 1994 by proving a case of the modularity theorem. In September 2026, Anthropic reported a complete computer-checked proof in the Lean proof assistant.

Around 1637, Pierre de Fermat scribbled in the margin of his copy of Diophantus’s Arithmetica that he had a truly marvelous proof that the margin was too small to contain. It took 358 years for anyone to find a proof, and it needed mathematics Fermat could not have known.

The Statement

\[ a^n + b^n = c^n \]

has no solutions in positive integers \(a, b, c\) when \(n \ge 3\). For \(n = 2\) there are infinitely many, the Pythagorean triples:

TripleCheck
3, 4, 5\(9 + 16 = 25\)
5, 12, 13\(25 + 144 = 169\)
8, 15, 17\(64 + 225 = 289\)

For cubes, near misses exist, like \(9^3 + 10^3 = 1729 = 12^3 + 1\), but never an exact hit.

Early Progress

ExponentProved by
\(n = 4\)Fermat himself, by infinite descent
\(n = 3\)Euler (1770; his argument had a gap, later filled)
\(n = 5\)Dirichlet and Legendre (1825)
Regular primes (a special class of primes, not all of them)Ernst Kummer (1847)

Proving \(n = 4\) and every odd prime exponent is enough, because any \(n \ge 3\) is divisible by 4 or by an odd prime.

How Wiles Proved It

  1. The bridge. Gerhard Frey suggested in the 1980s that a solution to Fermat’s equation would produce a strange elliptic curve. Jean-Pierre Serre sharpened the idea, and Ken Ribet proved in 1986 that this curve could not be modular.
  2. Modularity. So it was enough to prove that semistable elliptic curves are modular, a case of the Taniyama–Shimura conjecture, part of the Langlands program.
  3. Wiles. Working in secret for seven years, Andrew Wiles announced a proof in June 1993. A gap was found; with his former student Richard Taylor he fixed it in September 1994. The papers appeared in 1995.

Put together: if a solution existed for a prime exponent \(p \ge 5\), it would give a semistable Frey curve that Ribet’s theorem says is not modular, while Wiles’s theorem says every semistable elliptic curve over the rationals is modular. That contradiction rules out the solution; exponents 3 and 4 were handled earlier. Wiles proved the semistable case, which is enough for Fermat; the full modularity theorem was completed by others in 2001. Wiles received the Abel Prize in 2016.

The 2026 Computer-Checked Proof

In 2024, Kevin Buzzard began a funded project to formalize the proof in the Lean proof assistant. On September 4, 2026, Anthropic reported that Claude agents had produced a complete Lean proof, about 13 million lines long, largely autonomously in 11 days, following the Darmon–Diamond–Taylor account of Wiles’s argument. Buzzard independently compiled the code and checked that it proves the intended statement, noting that it faithfully follows the existing literature. Read more in our Lean explainer.

Common Misconceptions

“Fermat had a proof.” Almost certainly not a correct general one; the tools Wiles used did not exist.

“Computers proved Fermat.” Wiles and Taylor proved it in 1994. The 2026 work is a machine-checked formalization of that proof.

Watch: Fermat’s Last Theorem in Video

If you learn better by watching, these videos are worth your time.

Fermat’s Last Theorem (Numberphile). Simon Singh tells the story in a short video.
What is Fermat’s Last Theorem? (University of Oxford). Andrew Wiles’s home university introduces the problem.
Elliptic Curves and Modular Forms: The Proof of Fermat’s Last Theorem (Aleph 0). A visual walk through the ideas in Wiles’s proof.

Check Your Understanding

Five quick questions to see how much of this has stuck. Pick an answer and press Submit; you will see a short explanation either way.

Answer each question and press Submit to see your result right away.

1. For which exponents does a^n + b^n = c^n have positive integer solutions?
Found a bug? Let us know!
2. Who proved the case n = 3?
Found a bug? Let us know!
3. What did Wiles prove to settle Fermat’s Last Theorem?
Found a bug? Let us know!
4. Why does every exponent above 2 reduce to 4 or an odd prime?
Found a bug? Let us know!
5. What happened in September 2026?
Found a bug? Let us know!

Frequently Asked Questions

What is Fermat’s Last Theorem?

It states that a^n + b^n = c^n has no solutions in positive integers when n is an integer greater than 2.

Who proved Fermat’s Last Theorem?

Andrew Wiles, with a key step completed together with Richard Taylor, in 1994. The papers were published in 1995.

Did Fermat really have a proof?

Fermat claimed a marvelous proof in a margin note around 1637, but no proof was found and historians believe he did not have a correct general proof.

Has Fermat’s Last Theorem been checked by computer?

Yes. In September 2026, Anthropic reported a complete Lean formalization of the proof, about 13 million lines, which Kevin Buzzard compiled and checked.

Keep Exploring

Sources and Further Reading

Related to This Article

What people say about "Fermat’s Last Theorem Explained: Wiles to Lean - Effortless Math"?

No one replied yet.

Leave a Reply