Worked solution: Wiles's modularity proof via the Taylor–Wiles method (1994)
For squares, has infinitely many whole-number solutions, which are the familiar Pythagorean triples. Fermat claimed in 1637 that the moment the exponent rises to or higher, not a single whole-number solution exists.
Instead of checking infinitely many exponents one by one, a simple algebraic regrouping shows that any counterexample for a composite exponent automatically creates one for or for an odd prime . Because Fermat himself handled and Leonhard Euler handled , the entire 350-year problem boils down to odd primes .
Fermat's Last Theorem (FLT) states that for every integer , there are no nonzero integers satisfying . As recorded in Wiles's introduction (Wiles 1995, p. 443) and reviewed in Qiu et al. (2025, Section 3.1.1, Theorem 3.1), it suffices to prove the theorem when the exponent is or an odd prime , and when the three integers are pairwise coprime.
Why does this reduction hold? Every integer is either a power of (so divides , say ) or divisible by at least one odd prime (say ). If , then in the first case is a solution for exponent , and in the second case is a solution for the odd prime . Fermat proved the case around 1667 by his method of infinite descent, and Euler proved between 1753 and 1770 (with a gap later filled by Legendre; see Qiu et al. 2025, Section 2.1). Moreover, if any two of shared a prime factor , then would divide the third as well, so we may divide out until are pairwise coprime.
This reduction sets the stage for the modern proof: we assume for contradiction that there exists a prime and nonzero pairwise coprime integers with , and we use this hypothetical triple to build a geometric object in the next step.
- Pairwise coprime integers
- Integers are pairwise coprime if no two of them share any prime factor (). In , any prime factor shared by two terms automatically divides the third, so dividing out common factors always leaves a pairwise coprime triple.
- Infinite descent
- A proof technique invented by Fermat in which a hypothetical positive integer solution is used to construct a strictly smaller positive integer solution. Because positive integers cannot decrease forever, no solution can exist in the first place.