MathLabs

Worked solution: Wiles's modularity proof via the Taylor–Wiles method (1994)

Step 1 of 11: What FLT says and reduction to prime exponents p≥5p \ge 5
In plain words

For squares, 32+42=523^2 + 4^2 = 5^2 has infinitely many whole-number solutions, which are the familiar Pythagorean triples. Fermat claimed in 1637 that the moment the exponent rises to 3,4,53, 4, 5 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 n=4n = 4 or for an odd prime pp. Because Fermat himself handled n=4n = 4 and Leonhard Euler handled p=3p = 3, the entire 350-year problem boils down to odd primes p≥5p \ge 5.

xn+yn=zn  (n≥3)  ⟺  ap+bp=cp  (p≥5 prime, gcd⁡(a,b,c)=1)x^n + y^n = z^n \; (n \ge 3) \iff a^p + b^p = c^p \; (p \ge 5 \text{ prime},\, \gcd(a,b,c)=1)
Detailed analysis

Fermat's Last Theorem (FLT) states that for every integer n>2n > 2, there are no nonzero integers x,y,zx, y, z satisfying xn+yn=znx^n + y^n = z^n. 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 n=4n = 4 or an odd prime p≥5p \ge 5, and when the three integers are pairwise coprime.

Why does this reduction hold? Every integer n>2n > 2 is either a power of 22 (so 44 divides nn, say n=4mn = 4m) or divisible by at least one odd prime pp (say n=pmn = pm). If xn+yn=znx^n + y^n = z^n, then in the first case (xm)4+(ym)4=(zm)4(x^m)^4 + (y^m)^4 = (z^m)^4 is a solution for exponent 44, and in the second case (xm)p+(ym)p=(zm)p(x^m)^p + (y^m)^p = (z^m)^p is a solution for the odd prime pp. Fermat proved the case n=4n = 4 around 1667 by his method of infinite descent, and Euler proved p=3p = 3 between 1753 and 1770 (with a gap later filled by Legendre; see Qiu et al. 2025, Section 2.1). Moreover, if any two of a,b,ca, b, c shared a prime factor qq, then qpq^p would divide the third as well, so we may divide out gcd⁡(a,b,c)p\gcd(a, b, c)^p until a,b,ca, b, c are pairwise coprime.

This reduction sets the stage for the modern proof: we assume for contradiction that there exists a prime p≥5p \ge 5 and nonzero pairwise coprime integers a,b,ca, b, c with ap+bp=cpa^p + b^p = c^p, and we use this hypothetical triple to build a geometric object in the next step.

Terms in this step
Pairwise coprime integers
Integers a,b,ca, b, c are pairwise coprime if no two of them share any prime factor (gcd⁡(a,b)=gcd⁡(b,c)=gcd⁡(a,c)=1\gcd(a,b) = \gcd(b,c) = \gcd(a,c) = 1). In ap+bp=cpa^p + b^p = c^p, 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.
Knowledge used in this step