Contents / Number Theory / Diophantine Equations
Chapter 5
Diophantine Equations
Linear equations solvable exactly when the gcd divides the constant, with the full solution set; primitive Pythagorean triples parametrised in both directions, and again through the Gaussian integers; Pell's equation, its fundamental solution and the group structure of all solutions; the Hasse-Minkowski local-global principle and Selmer's cubic counterexample; and Fermat's Last Theorem for n=4 proved completely by infinite descent.
Introduction
A Diophantine equation is a polynomial equation with integer coefficients, asked over the integers. The restriction to integer unknowns is the whole difficulty: is trivial over and unsolvable over , and no continuity argument, no intermediate value theorem, no derivative is available to help. What replaces them is arithmetic — divisibility, congruences, factorisation in a larger ring, and the pigeonhole principle.
The subject has no single method because it has no single answer. For there is a complete theory: a one-line solvability criterion, a formula for every solution, an algorithm. For a quadratic in two variables the theory is still complete but much deeper, and Pell's equation turns out to be a statement about a unit group. For quadratic forms in any number of variables the Hasse–Minkowski theorem reduces solvability over to a finite list of congruence conditions. Past degree two everything changes: Thue proved that a homogeneous equation of degree at least three in two variables has only finitely many solutions, Faltings proved a vast generalisation, Wiles proved Fermat's Last Theorem, and Matiyasevich proved that no algorithm can decide the general case at all.
This chapter runs that arc. Three things are proved here in full because they are completely within reach and because they are the ones worth carrying away: the classification of solutions of , the parametrisation of primitive Pythagorean triples (twice — once by elementary parity analysis, once by unique factorisation in ), and Fermat's Last Theorem for by infinite descent. Results whose proofs need machinery far beyond this chapter — MRDP, Hasse–Minkowski, Thue, Faltings, modularity — are stated precisely and then given a proof sketch that says exactly what it is assuming. Nothing is asserted silently.
Throughout, is taken non-negative, "solution" means integer solution unless stated otherwise, and familiarity with congruences and the Euclidean algorithm, as in Divisibility and the Euclidean Algorithm, is assumed.
5.1The shape of the problem
Definition 5.1 (Diophantine equation). Let . The Diophantine equation attached to is the problem of determining
The equation is solvable if this set is non-empty. Its degree is and its dimension is the number of unknowns .
Three questions can be asked, in increasing order of ambition: is there a solution at all; are there finitely or infinitely many; and can they all be written down. Pell's equation answers all three affirmatively; for a general , even the first has no algorithmic answer.
The cheapest tool is reduction modulo . A solution in is in particular a solution in , and the latter is checked by finitely many substitutions.
Proposition 5.2 (Congruence obstruction). Let and let . If the congruence
has no solution in , then has no solution in .
Proof. Reduction modulo is a ring homomorphism , and a ring homomorphism commutes with the polynomial operations that build out of its variables and coefficients. Hence for any ,
where is with its coefficients reduced. If in then the left side is , so solves the congruence. Contrapositively, no solution of the congruence means no integer solution.∎
The proposition is one-directional, and the gap is the entire subject: a congruence may be solvable for every with the equation still having no integer solution, as the theorem Selmer's counterexample to the local–global principle shows. What congruences give cheaply is the negative answer, and the art is the choice of modulus — in practice or for squares, for cubes, and a prime for anything governed by .
Example 5.3 (A sum of two squares that is never modulo ). Show that has no integer solutions.
Solution.
- Every square is or modulo : if then , and if then .
- So lies in , and never equals .
- But .
- By the proposition Congruence obstruction there is no solution. Note how little was used: nothing about except its residue.
5.2Hilbert's tenth problem
In 1900 Hilbert asked, as the tenth of his twenty-three problems, for "a process according to which it can be determined by a finite number of operations whether the equation is solvable in rational integers". The answer, completed by Matiyasevich in 1970 on the basis of work of Davis, Putnam and Robinson, is that no such process exists. The mechanism is that Diophantine equations are expressive enough to encode computation itself.
Definition 5.4 (Diophantine set). A set is Diophantine if there is a polynomial such that
The variables are parameters and the are unknowns.
Many familiar sets are Diophantine, by elementary encodings. Non-negativity is Diophantine inside by Lagrange's four-square theorem, ; divisibility is, since ; coprimality is, by Bézout; compositeness is, since . Logical operations come free: is the single equation , and is . What is not obvious — and is the content of the theorem — is that exponentiation, and through it the step relation of a Turing machine, is captured this way.
Theorem 5.5 (MRDP: Diophantine equals recursively enumerable, and Hilbert's tenth problem is unsolvable). A set is Diophantine if and only if it is recursively enumerable. Consequently there is no algorithm which, given , decides whether has a solution in integers.
Proof. Proof sketch — assumes the theory of computability and Matiyasevich's theorem on the exponential; the hard direction is not proved here.
() Easy and complete. Given a Diophantine definition of , enumerate all tuples in some computable order, evaluate , and output whenever . This enumerates exactly , so is recursively enumerable.
() The deep direction. Davis, Putnam and Robinson showed that every recursively enumerable set has an exponential Diophantine definition, one allowing terms with a variable, by encoding a machine's computation history as one large number and extracting its digits by the Chinese remainder theorem. What remained was Robinson's hypothesis, that is itself Diophantine; Matiyasevich proved it using the Pell-type equation , whose solutions grow exponentially and can be pinned down by congruences.
The consequence. Let be the halting set, recursively enumerable but not recursive. By the equivalence there is with iff is solvable in non-negative integers. An algorithm deciding solvability of arbitrary Diophantine equations, applied to for each fixed , would decide membership in — contradiction. Passing from non-negative to arbitrary integer unknowns costs only the substitution .∎
Remark. The undecidability is not an artefact of allowing many variables or huge degree: nine unknowns suffice over , and degree suffices at the cost of more variables. It does depend on the ring: the analogous question over is open, and over or it is decidable by Tarski's quantifier elimination.
5.3Finiteness: how many solutions can there be
Before asking for solutions it is worth asking how many to expect, and the answer is governed by geometry. A plane curve has a genus, an integer measuring how far it is from being parametrisable by rational functions. Lines and conics have genus ; a smooth plane cubic has genus ; a smooth plane curve of degree has genus . The number of integer or rational points is controlled by with remarkable precision.
Theorem 5.6 (Siegel and Faltings). Let be an irreducible curve over of genus .
- (Siegel, 1929.) If , then has only finitely many integer points. The same holds for if the curve has at least three points at infinity.
- (Faltings, 1983; Mordell's conjecture.) If , then has only finitely many rational points.
Proof. Proof sketch — assumes Diophantine approximation on abelian varieties (Siegel) and the theory of heights on moduli spaces (Faltings); neither argument is reproduced here.
For (1): Siegel embeds the curve in its Jacobian. An infinite sequence of integer points must escape to infinity, and pulling back along multiplication-by- on the Jacobian produces from it algebraic numbers approximated by rationals far better than the theorem Thue's approximation theorem, and Thue–Siegel–Roth permits.
For (2): Faltings deduced Mordell's conjecture from the Shafarevich conjecture on abelian varieties with good reduction outside a finite set of primes, itself obtained from the Tate conjecture by a height-descent argument on a moduli space. Vojta later reproved it directly in the language of Diophantine approximation.
Both results are ineffective: they bound the number of solutions but give no computable bound on their size, so neither can certify that a list of found solutions is complete.∎
Genus is where infinitude is the rule: a conic with one rational point has infinitely many, cut out by the pencil of rational lines through it, which is exactly the mechanism behind the theorem Parametrisation of primitive Pythagorean triples. Genus is the delicate middle — infinitely many rational points are possible while integer points are always finite. Genus is rigid, and has genus for , so Faltings already gives finiteness for Fermat's equation at each fixed — which nevertheless falls short of the theorem Fermat's Last Theorem, because "finitely many" is not "none".
5.4Linear equations: when is solvable
The linear case is the one place where the theory is complete, algorithmic, and short. Everything rests on a single structural fact about : the set of integer combinations of and is not merely closed under addition, it is the set of multiples of one number.
Theorem 5.7 (Bézout's identity). Let , not both zero, and put . Then
and in particular there exist with .
Proof. Let . It is closed under addition and under multiplication by any integer, and it contains a positive element (one of is positive since not both are zero). Let be the least positive element of , say .
Every element of is a multiple of . Take and divide: with . Then
If this contradicts minimality of , so and . Since we get and , so is a common divisor and .
Conversely . As and , divides , hence because .
Therefore , and . The element furnishes the identity.∎
The proof never factors and never mentions primes. It uses only that a non-empty set of positive integers has a least element and that division with remainder exists — which is why the same argument gives Bézout identities in and , as developed in Polynomial Rings and Unique Factorization.
Theorem 5.8 (Solvability criterion for ). Let with not both zero, and . The equation
has an integer solution if and only if .
Proof. () If then, since and , divides .
() Suppose . By the theorem Bézout's identity choose with . Multiplying by ,
so is a solution.
Equivalently and more briefly: the set of representable is exactly by the theorem Bézout's identity, and says .∎
Example 5.10 (Two nearly identical equations). Decide whether and are solvable, and solve the one that is.
Solution.
- .
- , so by the theorem Solvability criterion for the first equation has no integer solution. (Directly: the left side is always a multiple of .)
- , so the second is solvable. Bézout for : .
- Multiply by : , so .
- Check: . ✓
5.5The complete solution set
Because the equation is linear its solution set is a coset: one particular solution plus every solution of the homogeneous equation, and the homogeneous equation is easy to solve outright.
Theorem 5.11 (All solutions of a linear Diophantine equation). Let with , suppose , and let be any one solution of . Then the complete solution set is
and distinct give distinct solutions.
Proof. These are solutions. For any ,
Note and are integers, so these are integer points.
Every solution has this form. Let be any solution. Subtracting from gives
Write , with — this is where the gcd is divided out, and it is the only step that needs an idea. Cancelling ,
Thus , and since , Euclid's lemma gives . Write for some . Substituting, , and cancels to . Hence
as claimed.
Distinctness. If gave the same point then , impossible since .∎
Geometrically, the integer points on form a one-dimensional lattice with step vector — the primitive integer direction of the line — which is what the figure The integer points of … draws. The step is not : dividing out is exactly what makes the vector primitive, and a non-primitive step skips solutions.
Method 5.12 (Solving completely).
- Compute by the Euclidean algorithm, keeping the quotients.
- If , stop: there is no solution.
- Back-substitute through the algorithm to get with .
- Scale: is a particular solution.
- Write the general solution , .
- If a constraint such as is imposed, translate it into an inequality on and count the integers in the resulting interval.
Example 5.13 (Every solution, and the ones in a box). Find all integer solutions of , and then all with .
Solution.
- (consecutive Fibonacci numbers), so it is solvable.
- The extended algorithm gives , so .
- General solution: , , .
- means , i.e. , i.e. , so .
- Those give — four solutions. ✓
Example 5.14 (Counting non-negative solutions). How many solutions of have and ?
Solution.
- , so solutions exist. Bézout: , so .
- General solution: , .
- gives , so .
- gives , so .
- The count is .
- Sanity check at the endpoints: gives and ✓; gives and ✓.
Remark. In general the number of non-negative solutions of with is or , since the admissible range of has length exactly . Above, and the count was .
5.6Frobenius: what cannot be represented
If are coprime positive integers then is solvable in integers for every . Restricting to — buying nuggets in boxes of and — changes the answer completely, and the failures stop after a computable point.
Theorem 5.15 (Frobenius number of two coprime denominations). Let be coprime integers. Call representable if for some integers . Then:
- is not representable;
- every integer is representable;
- exactly non-negative integers are not representable.
Proof. Since , every has integer solutions, and by the theorem All solutions of a linear Diophantine equation they are , . Exactly one of them has ; call it . Then
If we have a non-negative representation; conversely any representation with has , since and is least non-negative, so and forces .
(1) Suppose with . Reduce mod : , so , and gives . Since , , so , i.e. . Symmetrically . But then
since . Contradiction.
(2) Let and take the representative with . Then
so , and being an integer, . By , is representable.
(3) Let . By (2) every non-representable lies in , a set of integers, an even count since are not both even. We show the involution of swaps representable with non-representable; exactly half the range is then non-representable, giving .
If both and were representable, adding the two representations would represent , contradicting (1). So at most one of is representable.
Conversely suppose is not representable, , with representative , ; by , . Then
and both coefficients are . So is representable. The involution therefore swaps the two classes exactly, completing the count.∎
Intuition. Picture the non-negative multiples of arranged in columns according to their residue mod . Each residue class mod first becomes reachable at some multiple of , and after that it is reachable forever, since one may keep adding . The Frobenius number is the largest of those thresholds, minus — the last gap before all columns have switched on.
Example 5.16 (Chicken nuggets in boxes of and ). With coprime box sizes and , what is the largest unattainable order, and how many orders are unattainable?
Solution.
- , so the theorem Frobenius number of two coprime denominations applies.
- Largest unattainable: .
- Count unattainable: .
- Check directly: for is , none divisible by . ✓ And ✓, ? no — try ✓.
5.7Pythagorean triples: the objects
Definition 5.17 (Pythagorean triple). A Pythagorean triple is a triple of positive integers with
It is primitive if .
Every triple is a multiple of a primitive one: if then dividing the equation by shows is a primitive triple, and conversely times a primitive triple is a triple. So the classification problem is exactly the primitive one.
Lemma 5.18 (Coprimality and parity in a primitive triple). Let be a primitive Pythagorean triple. Then are pairwise coprime, exactly one of is even, and is odd.
Proof. Pairwise coprime. Suppose a prime divides two of them. If and then , so , contradicting primitivity. If and then , so , again a contradiction. The case is symmetric.
Not both odd. By pairwise coprimality are not both even. Suppose both are odd. Every odd square is , since . Then . But a square is or mod , never . Contradiction.
Hence exactly one of is even, and then is odd even odd, so is odd.∎
Notation. Having shown exactly one leg is even, we fix the convention throughout: in a primitive triple the entry is odd and is even. Every primitive triple can be written this way after swapping the legs, and the swap is the only ambiguity.
Example 5.19 (Sorting triples with hypotenuse ). Find all Pythagorean triples with and say which are primitive.
Solution.
- Need with . Testing : ✓. : ✓. repeat these with legs swapped.
- So the triples are and , up to order.
- : primitive. : not primitive — it is .
- Consistency with the lemma Coprimality and parity in a primitive triple: in one leg is odd, one even, odd ✓. In the entries are not pairwise coprime, as the lemma predicts for a non-primitive triple.
5.8The parametrisation theorem
Generating triples is easy; proving that a formula catches all of them is the real content. The engine is a divisibility principle about squares, used again below for Fermat.
Lemma 5.20 (Coprime factors of a square are squares). Let be positive integers with and . Then and are each perfect squares.
Proof. Let be a prime and let be the exponents of in . Unique factorisation gives . Coprimality gives , so one of is and the other equals , which is even. Hence every prime occurs to an even power in , and likewise in ; a positive integer all of whose prime exponents are even is a square, namely squared.∎
Theorem 5.21 (Parametrisation of primitive Pythagorean triples). The primitive Pythagorean triples with odd and even are exactly
where are integers with and . Moreover distinct such pairs give distinct triples.
Proof. Every such gives a primitive triple. First,
so the triple satisfies the equation, and makes all three entries positive. Since have opposite parity, and are odd and is even, so the parity convention holds. For primitivity, suppose an odd prime divides and . Then divides their sum and difference , and being odd gives and , so and , contradicting . The prime cannot divide , which is odd. So and a fortiori .
Every primitive triple arises this way. This is the substantial half. Let be primitive with odd, even, as allowed by the lemma Coprimality and parity in a primitive triple; then is odd. Rewrite the equation as
Both and are even, being differences and sums of two odd numbers, so write , with positive integers ( because ). Also with a positive integer. Substituting and dividing by ,
Claim: . A common divisor of and divides and . But by the lemma, so .
By the lemma Coprime factors of a square are squares applied to , there are positive integers with
Now unwind:
taking positive square roots. Finally because and ; because a common prime divisor of and would divide and ; and because is odd, which forces exactly one of to be odd.
Distinctness. From the triple one recovers and , so is determined by among positive pairs. Hence the correspondence is a bijection.∎
The proof is a template: rearrange into "a square equals a product of coprime factors", apply the lemma Coprime factors of a square are squares to conclude each factor is a square, substitute. The same three steps, applied twice in succession, drive the descent in the theorem No solutions to .
Example 5.23 (Generating a triple from ). Compute the primitive triple attached to , , and check the hypotheses.
Solution.
- ✓, odd and even so opposite parity ✓, ✓.
- , , .
- Check: ✓.
- Primitive: since and . ✓
5.9The same theorem from
The parity juggling above looks like a trick. It is not: it is the shadow of a factorisation. Over the form is irreducible, but over the Gaussian integers it splits as , and has unique factorisation. The equation then reads "a product of two coprime Gaussian integers is a square".
Recall from Polynomial Rings and Unique Factorization that is Euclidean for the norm , hence a UFD; that is multiplicative; and that is a unit iff , so .
Theorem 5.24 (Gaussian derivation of the Pythagorean parametrisation). Let be a primitive Pythagorean triple with odd and even. Then in there are coprime integers of opposite parity and a unit with
and expanding this identity reproduces , , .
Proof. Set and . Then
Step 1: and are coprime in . Let be a common divisor. Then divides and , hence divides ; since in by the lemma Coprimality and parity in a primitive triple, and is a unit, . Now , so the only Gaussian primes dividing are associates of , of norm . If then divides , forcing even — but is odd. So is a unit.
Step 2: a square splits into squares. In the UFD , write and compare factorisations. Every Gaussian prime occurs in to an even exponent. Because and share no prime, all of that exponent sits in one of the two factors. Hence every prime occurs to an even exponent in , and therefore
(The unit appears because a UFD determines factorisations only up to units.)
Step 3: absorb the unit. The squares of units are , since and ; so modulo squares of units only need be considered, the cases and being absorbed into by replacing with . Write . If then
has even real part, contradicting odd. Hence , and replacing by if necessary we may take .
Step 4: expand.
so and , whence and as . Finally (a common factor would divide and contradict Step 1 via ), since and , and since is odd.∎
Remark. Compare the two proofs. The elementary one factored over , with the parity analysis doing all the work of proving the factors coprime. The Gaussian one factored over , needed the same coprimality statement, and then got the parametrisation for free as . The lesson generalises — and so does its limit: Kummer's discovery that can fail to be a UFD is exactly why the naive factorisation proof of Fermat's Last Theorem collapses.
Example 5.25 (Factoring a Gaussian integer to read off a triple). Factor in and identify the Pythagorean triple.
Solution.
- , so the factors have norms multiplying to .
- with , and these are non-associate Gaussian primes.
- Try ✓. So exactly, with , , .
- The theorem then reads off , , : the triple .
5.10Pell's equation
Definition 5.26 (Pell's equation). Let be a positive integer. Pell's equation for is
The solutions are trivial; any other is nontrivial. A nontrivial solution with and minimal is called the fundamental solution.
The name is a historical accident — Euler attributed to Pell an equation solved by Brouncker and studied centuries earlier by Brahmagupta — but the equation is central: it is the multiplicative structure hiding in a quadratic form, it powers Matiyasevich's proof of the theorem MRDP, and it computes the unit group of a real quadratic order.
Proposition 5.27 (Square collapses the equation). If is a perfect square, then has only the trivial solutions.
Proof. The equation factors over :
Two integers multiplying to are both or both . In the first case gives ; in the second, and again . Since we have , so and .∎
So the interesting case is not a perfect square, which is assumed from here on. Then is irrational and does not factor over — it factors over , and that is the whole point. The following identity, due to Brahmagupta in the seventh century and usually called Brahmagupta's composition law, is the statement that the solution set is closed under a multiplication.
Proposition 5.28 (Brahmagupta composition). If and , then
Equivalently, is again a solution.
Proof. Expand both sides. Writing and ,
The cross terms cancel, leaving
The factorisation in the last step is just regrouped; it is the multiplicativity of the norm on , which is the conceptual reason the identity exists at all.∎
5.11Existence: continued fractions and the pigeonhole
Composition manufactures infinitely many solutions from one, but only if one exists. That is the hard part, and it is genuinely a theorem: for the fundamental solution is , , so no search that stops early will find it. The proof below is complete and rests on nothing beyond the pigeonhole principle.
Lemma 5.29 (Dirichlet's approximation theorem). Let be irrational. Then there are infinitely many pairs of integers with and
Proof. Fix . Consider the numbers for , where is the fractional part, all lying in . Partition into the intervals , . By the pigeonhole principle two of the numbers lie in the same interval, say and with . Put and . Then
Dividing by gives .
For infinitude: since is irrational, for each such pair, so we may choose and repeat, obtaining a pair with , hence a genuinely new pair. Iterating produces infinitely many.∎
Theorem 5.30 (Pell's equation always has a nontrivial solution). Let be a non-square integer. Then has a solution with .
Proof. Step 1: many pairs with small. Apply the lemma Dirichlet's approximation theorem to , which is irrational because is not a square. It gives infinitely many , , with . For each,
using . Multiplying the two bounds,
So infinitely many pairs satisfy , a bound independent of .
Step 2: pigeonhole on the value. The integer is nonzero (else would be a square) and lies in a finite set, so some fixed occurs for infinitely many pairs.
Step 3: pigeonhole on residues. Among those pairs, takes at most values, so two distinct pairs agree in both residues:
We may also assume , since infinitely many pairs are available and each class is finite.
Step 4: divide. Work in with norm . Compute
Its norm is , so
Now the congruences: , and . Hence and for integers , and dividing by gives
Step 5: nontriviality. If then and , so , using . That contradicts . Hence .∎
Theorem 5.31 (Continued fractions locate the fundamental solution). Let be a non-square, and let be its (purely periodic after the first term) continued fraction expansion, with convergents . Then the fundamental solution of is
and every solution of in positive integers arises as a convergent of .
Proof. Proof sketch — assumes the standard theory of continued fractions (best-approximation property, periodicity of quadratic irrationals); only the shape of the argument is given.
Two classical facts do the work. First, Lagrange's theorem: the expansion of is periodic of the palindromic shape . Second, best approximation: if with then , and by Legendre's theorem every such rational is a convergent — so for a solution of can only be a convergent. Running the convergent recursion with the periodicity gives for the auxiliary quantities of the expansion, with exactly when ; the sign selects the stated index.∎
Example 5.32 (Fundamental solutions for small ). Find the fundamental solutions for .
Solution.
- For small one can simply increase until is a square.
- : , so .
- : , so .
- : give ; gives , so .
- : , so .
- : , so .
- : the search runs to , giving ; check and ✓. The jump from to is the phenomenon the theorem Continued fractions locate the fundamental solution explains: the period of is , odd, so one must go to index .
5.12Pell solutions as a group of units
The composition law of the proposition Brahmagupta composition is not an identity that happens to hold; it is multiplication in a ring, and once that is said, the structure of the solution set is forced.
Notation. For a non-square set , a subring of . Its conjugation is and its norm is
Conjugation is a ring automorphism, so is multiplicative: .
Theorem 5.34 (Every solution is a power of the fundamental one). Let be a non-square and let correspond to the fundamental solution, i.e. the solution with and least. Write . Then every solution of is
so that .
Proof. Step 0: is a group, identified with the solution set by . The map is injective because is irrational, and surjective onto by definition of . Multiplicativity of makes closed under products, and means , so . Hence is a subgroup of .
A fundamental solution exists: nontrivial solutions exist by the theorem Pell's equation always has a nontrivial solution, and if is one then so are , so there is one with ; among these takes a least value, and that determines uniquely.
Monotonicity. For solutions with , the quantity increases with : if then too (since is increasing in ), so . Thus is the smallest element of that exceeds : any with has , so and , making a positive solution; minimality of then gives .
Generation. Let with ; we show for some . Since , the powers , so there is a unique with
Put . By Step 0, , and by construction . If then is an element of strictly between and , contradicting the minimality established above. Hence and .
All of . Let . If take . Otherwise and are reciprocal positive reals, so exactly one of exceeds ; by the previous paragraph it equals for some , so .
Uniqueness and structure. If then comparing signs and taking logarithms of absolute values gives with , so . Hence is an isomorphism .∎
Example 5.35 (The first four solutions for ). List the four smallest positive solutions of .
Solution.
- Fundamental: gives , so , .
- Recursion with : , .
- . Check ✓.
- . Check ✓.
- . Check ✓.
Remark. Dirichlet's unit theorem, in this smallest interesting case, asserts that the unit group of has rank ; the theorem Every solution is a power of the fundamental one is the concrete form of that statement. The generator is the fundamental unit and the regulator, an invariant that grows erratically with — which is why is so much worse than .
5.13The local–global principle
Congruence conditions give necessary criteria for solvability. The remarkable fact, for quadratic forms, is that they are also sufficient — together with the obvious real condition. Making this precise needs a way to speak of "all congruences at at once", which is what the -adic numbers provide.
Notation. A homogeneous is locally soluble if it has a nontrivial zero in and one in for every prime , and globally soluble if it has a nontrivial zero in . The local–global (Hasse) principle holds for a family of equations if, within it, local solubility implies global solubility.
Solubility in is decidable by a finite computation: by Hensel's lemma a nonsingular solution of the congruence modulo a sufficiently high, explicit power of lifts to . So local solubility is checkable, which is what makes the principle useful when it holds.
Theorem 5.36 (Hasse–Minkowski). Let be a nondegenerate quadratic form over . Then has a nontrivial zero over if and only if it has a nontrivial zero over and over for every prime .
Proof. Proof sketch — assumes -adic numbers, the theory of the Hilbert symbol, Dirichlet's theorem on primes in arithmetic progressions, and (for ) the Hasse–Minkowski statement for ; the induction is described but the cases are not carried out.
One direction is trivial: embeds in and in each , so a rational zero is a zero everywhere locally.
The converse is an induction on after diagonalising as .
- : only the trivial zero, locally as well as globally.
- : is isotropic iff is a square, and a rational that is a square in every and in is a square, by comparing valuation parities and the sign.
- : Legendre's theorem — with squarefree and pairwise coprime is soluble iff the signs are not all equal and are quadratic residues modulo . The classical proof is a descent using the geometry of numbers.
- : the hard case. Split and ask which rationals are represented by both binary forms. Hilbert symbols describe the two sets, and Dirichlet's theorem on primes in arithmetic progressions produces a rational represented by both.
- : every -adic form in five variables is isotropic, so only the real condition survives; an indefinite rational form in variables splits off a hyperbolic plane, and one inducts.
Dirichlet's theorem is not a formal device here: it is where the arithmetic of enters.∎
Example 5.37 (A conic with no rational points). Decide whether has a nontrivial rational solution.
Solution.
- Rewrite as the form . Over it is indefinite, so it is soluble there.
- Check . If then modulo : , i.e. . Now since , so .
- So we need to be a quadratic residue mod . The squares mod are , and .
- Hence and ; then , so , so . Scaling down by repeats forever — a descent — so the only -adic solution is trivial.
- The form is not locally soluble at , so by the theorem Hasse–Minkowski (the easy direction suffices) it has no nontrivial rational solution.
5.14Hilbert symbols: making the check finite
Hasse–Minkowski demands a check at infinitely many primes, which would be useless without a bookkeeping device. For and a place of — a prime , or standing for — the Hilbert symbol is
It is multiplicative in each argument and symmetric, and for odd with -adic units it equals — so only finitely many places can possibly give .
Theorem 5.38 (Hilbert's product formula). For all , the symbol equals for all but finitely many places , and
the product running over and all primes.
Proof. Proof sketch — assumes the explicit formulas for in terms of Legendre symbols, and quadratic reciprocity; the reduction is given, the case-checking is not.
By bimultiplicativity it suffices to treat each ranging over and the primes. For odd and -adic units one has , which already gives finiteness: only , the prime , and the primes occurring in and can contribute.
The rest is a handful of cases. For , distinct odd primes the explicit formulas give , , and elsewhere. The product formula in this case therefore reads
which is exactly quadratic reciprocity; the cases and reproduce the two supplementary laws. The product formula is a repackaging of reciprocity, and conversely.∎
Intuition. Think of as a local "obstruction sign". The product formula says the signs cannot be assigned independently: if you know all but one of them, the last is determined. That is precisely what makes Hasse–Minkowski in four variables work, and it is also why, when checking a conic for solubility, it is enough to check all places but one.
5.15Where the principle fails
Hasse–Minkowski is a theorem about quadratic forms, and the hypothesis is not decorative: in degree three the principle is false, and the counterexample is explicit.
Theorem 5.39 (Selmer's counterexample to the local–global principle). The cubic curve
has a nontrivial solution in and in for every prime , but its only rational solution is .
Proof. Local solubility, proved. Over take , since . For the projective plane cubic is smooth over and the Hasse–Weil bound gives , so a smooth -point exists and Hensel lifts it. For cubing is a bijection on , since , so any with is completed by a unique , again nonsingular. For one exhibits a nonsingular solution modulo directly.
Global insolubility — proof sketch, assumes the arithmetic of the cubic field ; Selmer's computation is not reproduced. Scale a nonzero rational solution to coprime integers; substituting converts the equation into a norm equation with confined to a specific coset. Selmer computed the class and unit groups of and showed the required would force a relation among the units that does not hold. In modern language the Tate–Shafarevich group of the associated elliptic curve has a nontrivial -part, and that element is the obstruction the local conditions cannot see; it is captured by the Brauer–Manin pairing, since every rational point pairs to zero against the Brauer group while here some Brauer class kills the entire local adelic set.∎
Remark. The moral is sharp. Local solubility is a cheap necessary condition which for quadratic forms happens also to be sufficient; past degree two it is merely necessary, and the failure is measured by a cohomological invariant. Even the Brauer–Manin obstruction is not always the whole story: Skorobogatov produced a surface with no rational points and no Brauer–Manin obstruction.
Example 5.40 (Checking local solubility is not hard). Verify that has a nontrivial solution modulo , and explain why that implies solubility in .
Solution.
- Cubes mod : since , the cubes are the cubic residues , each nonzero one hit three times.
- Try : need , i.e. . Take : ✓. So is a nontrivial solution mod .
- Smoothness: the partial derivatives are , and at the first is , so the point is a nonsingular zero.
- Hensel's lemma lifts a nonsingular zero modulo to a zero in , hence a nontrivial -point. ✓ The equation passes every such test and still has no rational point — that is the content of the theorem Selmer's counterexample to the local–global principle.
5.16Thue's theorem
Past degree two, the governing result for two-variable equations is Thue's. It says that a homogeneous form of degree at least three, set equal to a constant, has only finitely many integer solutions — an enormous strengthening of anything congruences could give.
Theorem 5.41 (Thue's theorem). Let be homogeneous of degree , irreducible over . Then for every nonzero the Thue equation
has only finitely many solutions .
Proof. Proof — complete, assuming the theorem Thue's approximation theorem stated in the next section. Write where are the (distinct, since is irreducible and separable) roots of , algebraic numbers of degree over .
Suppose there were infinitely many solutions. Since for fixed there are at most values of , the values must be unbounded; pass to a subsequence with . Then
Because is fixed and , the product of the factors tends to , so approaches one of the ; passing to a further subsequence, say . Then the other factors , , are bounded below by a positive constant (half the minimal distance from to the others, eventually). Hence
But is an algebraic number of degree , so the theorem Thue's approximation theorem says there are only finitely many rationals with
and since for , the displayed inequality is eventually stronger than this. That contradicts having infinitely many solutions.∎
Remark. The deduction is genuine but inherits the ineffectivity of its input: "finitely many" says nothing about how large they can be, so the argument cannot certify a found list as complete. Repairing that is what Baker's method below is for.
Example 5.42 (A Thue equation solved by hand). Find all integer solutions of .
Solution.
- is homogeneous of degree and irreducible (its root has degree ), so the theorem Thue's theorem applies and there are finitely many solutions.
- Obvious solution: .
- Small search: needs , no; needs , so : check ✓, giving .
- : , i.e. or , neither a cube. : or , neither.
- In fact and are the only solutions — a result of Delone and Nagell, who proved that has at most one nontrivial solution. Thue's theorem guarantees finiteness; this sharper theorem supplies the count.
5.17Approximation: Liouville, Thue, Roth
The engine behind Thue is one principle: algebraic numbers are badly approximable by rationals. The elementary version is Liouville's, short enough to prove in full.
Theorem 5.43 (Liouville's approximation theorem). Let be an irrational algebraic number of degree over . Then there is a constant such that for all integers with ,
Proof. Let be a minimal polynomial of ; being irreducible of degree it has no rational root.
Fix . If the bound holds with , so assume , and set , finite by continuity on a compact interval and positive after enlarging if necessary.
Lower bound on . Since has no rational root, . Clearing denominators,
is a nonzero integer, so , i.e.
Upper bound via the mean value theorem. There is between and , hence in , with
so .
Combine. , giving . Taking makes the inequality strict and covers the discarded case.∎
Liouville's exponent is the trivial one, and lowering it is the entire subject of Diophantine approximation: Thue reached roughly , Siegel, Dyson and Gelfond pushed further, and Roth reached the optimal .
Theorem 5.44 (Thue's approximation theorem, and Thue–Siegel–Roth). Let be algebraic of degree .
- (Thue, 1909.) For every there are only finitely many rationals with .
- (Roth, 1955.) For every there are only finitely many rationals with . The exponent is optimal, since the lemma Dirichlet's approximation theorem produces infinitely many with .
Proof. Proof sketch — assumes the theory of auxiliary polynomials in many variables, Siegel's lemma, and Roth's index/Wronskian machinery; none of these is developed here.
Both are contradiction arguments of the same shape. Assume infinitely many very good approximations with rapidly increasing denominators. By Siegel's lemma — a pigeonhole statement about integer solutions of underdetermined linear systems — construct a nonzero auxiliary polynomial of controlled height vanishing to high order at . The approximations force to be extremely small at , while clearing denominators makes it a nonzero integer, hence at least . Tuning the parameters makes the two bounds conflict — provided really is nonzero there, which is the technical heart (Roth's lemma, via generalised Wronskians). Thue uses ; Roth needs growing with .
The ineffectivity is intrinsic: the argument shows a second very good approximation cannot exist once a first does, but never locates the first.∎
Example 5.45 (Liouville's bound applied to ). Give an explicit lower bound for .
Solution.
- has minimal polynomial , of degree .
- , and on we have , so take .
- The proof gives for every rational .
- Sanity check with : , while . The bound holds with room to spare ✓.
- Roth's theorem improves the exponent from to but with a constant nobody can write down — the trade-off in one line.
5.18Effective versions and Baker's method
An ineffective finiteness theorem bounds the number of solutions without bounding their size; an effective one supplies a computable with for every solution, so that a finite search settles the equation. Thue's theorem is ineffective; the repair came sixty years later, from transcendence theory.
Theorem 5.46 (Baker's bound and effective Thue equations). (Baker, 1966–68.) Let be nonzero algebraic numbers with linearly independent over , and let be integers, not all zero, with . Then there are effectively computable depending only on the and their degrees with
Consequently, for a Thue equation of degree every solution satisfies an effectively computable bound .
Proof. Proof sketch — assumes transcendence methods (auxiliary functions, Siegel's lemma, extrapolation) and the unit theorem for number fields; the two halves are outlined only.
The linear-forms bound. Assume is very small and build an auxiliary analytic function out of the , vanishing to high order on a grid of integer points. Smallness of extrapolates that vanishing to a larger grid, until the function vanishes identically, contradicting linear independence of the logarithms. Every constant is explicit, which is why the conclusion is effective.
The application to Thue. Factor . Each is an algebraic integer of bounded norm, hence lies in one of finitely many classes modulo units; writing in fundamental units and feeding this into Siegel's identity forces a linear form in logarithms to be exponentially small in . Baker's bound caps , hence and .
The resulting bounds are astronomically large, typically iterated exponentials, but they are bounds, and lattice reduction (LLL) routinely brings them down to a searchable range.∎
5.19Thue's theorem and Fermat's equation
Fermat's equation has three unknowns, so Thue does not apply to it. It applies at once to the two-variable family alongside it, with a consequence that was out of reach before 1909.
Theorem 5.47 ( has finitely many solutions). Let and let be a nonzero integer. Then has only finitely many integer solutions.
Proof. The form is homogeneous of degree . Over it factors as
into irreducible homogeneous factors, corresponding to the factorisation of into cyclotomic-type irreducibles over . If is odd, is one such factor and the complementary factor has degree ; if is even there is no linear factor at all, since has no real root.
Each solution gives a factorisation into integers, and has only finitely many such factorisations. Fix one, so that for each . A factor with gives a Thue equation, finite by the theorem Thue's theorem. A factor of degree is definite — and its analogues are positive definite, being up to scaling — so describes an ellipse, containing finitely many lattice points. A factor of degree , , can be substituted into any other factor equation, which is then a nonconstant one-variable polynomial equation with finitely many roots; and at least one other factor exists whenever , since . Every branch gives finitely many solutions and there are finitely many branches.∎
Example 5.48 (Sums of two cubes equal to ). Find the integer solutions of and explain the role of the factorisation.
Solution.
- Factor: . Both factors are integers.
- Note , so both factors have the same sign, and their product is , so both are positive.
- The positive factorisations of are , , .
- , : substituting gives , i.e. , discriminant , not a square. No integer solution.
- , : , i.e. , so or , giving and . Check ✓.
- , : has no integer root since has discriminant .
- So the only solutions are and — finitely many, as the theorem has finitely many solutions predicts, and here the factorisation made the finiteness explicit without any appeal to Thue.
5.20Fermat's Last Theorem
Theorem 5.49 (Fermat's Last Theorem). For every integer the equation
has no solution in nonzero integers .
Proof. By the proposition Reduction to and odd primes it suffices to rule out and an odd prime. The case is the corollary Fermat's Last Theorem for , proved in full below by descent. The case is Euler's descent in , equivalently Kummer's theorem applied to the regular prime . Every prime is part (3) of the theorem Modularity, Ribet's theorem, and Fermat. Only the first of the three is proved in this chapter; the other two are quoted, with a sketch, where they are stated.∎
Fermat wrote the statement in about 1637 in the margin of his copy of Diophantus, with the remark that he had a marvellous proof which the margin was too narrow to contain. Whatever he had, the one case he did write out is the descent for below. The general case resisted for 358 years and was proved by Wiles in 1995, with a crucial step joint with Taylor.
The first move costs nothing and cuts the problem down enormously.
Proposition 5.50 (Reduction to and odd primes). If Fermat's equation has no nonzero solutions for and for every odd prime , then it has none for any .
Proof. Let . Either , or has an odd prime factor — indeed if is not divisible by any odd prime then is a power of , and forces , so .
Suppose first . If with , put , , ; then with , contradicting the case .
Otherwise with an odd prime. Put ; then with , contradicting the case .
So no admits a solution.∎
Remark. The reduction explains the shape of the historical record: Euler did , Dirichlet and Legendre , Lamé , and Kummer — inventing ideal numbers to repair the failure of unique factorisation in — every regular prime at once, covering all except , , . What no nineteenth-century method reached was all at once, since each argument needed control of the class number of .
5.21The case : infinite descent
This is the one case of Fermat's Last Theorem that is elementary, and it is proved here completely. The method is Fermat's own infinite descent: from a putative solution manufacture a strictly smaller one; positive integers cannot decrease forever. It is proved in the stronger form , which is what makes the descent close up.
Theorem 5.51 (No solutions to ). There are no positive integers with
Proof. Suppose solutions exist. Among all of them choose one, , with minimal; this is legitimate because any non-empty set of positive integers has a least element.
Step 1: the triple is primitive. If a prime divides and , then , so , and is a smaller solution — smaller because . This contradicts minimality, so , and then .
Step 2: apply the Pythagorean parametrisation. is a Pythagorean triple, primitive by Step 1. By the lemma Coprimality and parity in a primitive triple exactly one of is even; relabel so that is odd and is even. The theorem Parametrisation of primitive Pythagorean triples gives coprime of opposite parity with
Step 3: a second Pythagorean triple. Rewrite the first equation as
Since , this triple is primitive. Its even member must be : and have opposite parity and is odd, so if were odd then would be even and , impossible for a square. So is even and is odd. Apply the parametrisation again: there are coprime of opposite parity with
Step 4: extract squares. Substitute into :
(The left side is an integer since is even.) Now are pairwise coprime: by construction; and any prime dividing and would divide , hence , contradiction — likewise for . By the lemma Coprime factors of a square are squares, applied twice (first to , then to ), each of is a perfect square:
for positive integers .
Step 5: descend. Substituting into ,
So is another solution of the same equation, in positive integers. Compare sizes:
using and . Hence , contradicting the minimality of .
The assumption that a solution exists is therefore untenable.∎
Corollary 5.53 (Fermat's Last Theorem for ). The equation has no solution in nonzero integers.
Proof. A solution with may be taken with by changing signs, since every exponent is even. Then is a solution of in positive integers with , contradicting the theorem No solutions to .∎
Remark. The stronger statement is what makes the descent close up, and this is a recurring feature of the method: proving more can be easier, because a stronger conclusion feeds the induction. The same theorem also shows that no right triangle with integer sides has area a perfect square — equivalently, that is not a congruent number — which is the form in which Fermat himself recorded the argument.
5.22The modularity route to the general case
For odd prime exponents no elementary argument is known, and the successful strategy came from elliptic curves. To a hypothetical solution Frey attached the curve
now called the Frey curve. Its discriminant is a constant times a perfect -th power, which makes the curve's ramification absurdly mild: it is semistable, and at every prime of bad reduction the -torsion of is unramified. Serre and Ribet made "absurdly mild" precise; Wiles supplied what was needed to make the contradiction bite.
Theorem 5.54 (Modularity, Ribet's theorem, and Fermat).
- (Modularity, Wiles–Taylor 1995 for semistable curves; Breuil–Conrad–Diamond–Taylor 2001 in general.) Every elliptic curve over is modular: its -function coincides with that of a weight- newform.
- (Ribet 1990, the epsilon conjecture.) If the Frey curve were modular, the associated newform could be taken of level .
- Consequently, Fermat's equation has no nonzero solutions for any prime .
Proof. Proof of (3) from (1) and (2) — complete modulo those two inputs, which are not proved here. A sketch of (1) follows.
Suppose with and prime; scale so , and arrange and even (possible after permuting and changing signs, since exactly one of is even). Form the Frey curve . Its discriminant and conductor make semistable.
By (1), corresponds to a weight- newform of level . By (2) — Ribet's level-lowering theorem, applicable because the mod- representation of is irreducible (Mazur) and unramified outside — that newform may be taken of level .
But the space of weight- cusp forms of level is zero-dimensional: the modular curve has genus , and the dimension of the space of cusp forms of weight and level equals the genus of . So there is no such newform, and the assumed solution cannot exist.
Sketch of (1) — assumes deformation theory of Galois representations and Hecke algebras. Wiles proved a modularity lifting theorem: if the mod- representation attached to is modular, so is every lift with prescribed ramification, the -adic representation of included. The proof identifies a universal deformation ring with a Hecke algebra by showing the natural surjection is an isomorphism. To start, must itself be modular: Langlands–Tunnell supplies this for , and the " – switch" handles curves with reducible mod- representation. The original gap, in an Euler-system bound on a Selmer group, was closed by Taylor and Wiles with a patching argument.∎
Remark. Notice what was not used: no congruence obstruction, no bound on the size of solutions, nothing in the spirit of the first half of this chapter. The proof works by showing that a solution would create a mathematical object — a weight- newform of level — which provably does not exist.
Concluding solvability from congruences. The proposition Congruence obstruction runs one way only, and the theorem Selmer's counterexample to the local–global principle is the standard witness. The one place where local information suffices is quadratic forms over , by the theorem Hasse–Minkowski — and even there the conclusion is about rational, not integral, solubility.
Using the wrong step in the linear general solution. The step vector is , not . Writing , produces valid solutions but misses out of every of them. Divide by the gcd.
Forgetting to check before solving. The extended algorithm on yields , and then an irresistible urge to multiply by . The result is not an integer point.
Dropping a hypothesis in the Pythagorean parametrisation. All four conditions on matter: for positivity, and opposite parity for primitivity. Taking (both odd) gives — a genuine triple, but not primitive, and not in the list the theorem enumerates.
Assuming every triple already has odd. The convention is a labelling, imposed after the lemma Coprimality and parity in a primitive triple. Given , identify as the odd leg before applying ; using gives .
Assuming every quadratic ring is a UFD. The theorem Gaussian derivation of the Pythagorean parametrisation works because has unique factorisation. The same manoeuvre in is invalid: . Name the ring and justify unique factorisation in it.
Searching for a Pell solution and giving up. For the fundamental solution has ten digits, for fifteen. A search that finds nothing up to has proved nothing: the theorem Pell's equation always has a nontrivial solution guarantees one exists, and continued fractions find it.
Believing always has a solution. It does not. is insoluble, since modulo it would need , and is not a square mod . Solubility of the equation depends on the period of being odd, and is a genuinely different question from the theorem Pell's equation always has a nontrivial solution.
Confusing "finitely many" with "effectively listable". The theorems Thue's theorem and Siegel and Faltings bound the number of solutions, not their size, so they never certify a list as complete. Only the theorem Baker's bound and effective Thue equations supplies a computable bound. In particular Faltings does not settle Fermat: for fixed it gives finitely many rational points on , and "finitely many" is not "none".
Attempting the descent without the stronger statement. The descent works for , not for : starting from the fourth-power version, Step 2 produces with itself a square, and the induction does not close.