proof of Thue’s Lemma


Let p be a prime congruentMathworldPlanetmath to 1 mod 4.

We prove the uniqueness first: Suppose

a2+b2=p=c2+d2,

where without loss of generality, we can assume a and c even, b and d odd, c>a, and thus that b>d. Let c=2⁢x+a and d=b-2⁢y, and compute

p=c2+d2=p+4⁢a⁢x+4⁢x2-4⁢b⁢y+4⁢y2,

whence x⁢(a+x)=y⁢(b-y). If (x,y)=d, cancel the factor of d to get a new equation X⁢(a+x)=Y⁢(b-y) with (X,Y)=1, so we can write

m⁢Y=a+x=a+d⁢X

and

m⁢X=b-y=b-d⁢Y

for some positive integer m. Then

p=a2+b2=(m⁢Y-d⁢X)2+(m⁢X+d⁢Y)2=(m2+d2)⁢(X2+Y2),

which contradicts the primality of p since we have both m2+d2≥2 and X2+Y2≥2. We now proceed to existence.

By Euler’s criterion (or by Gauss’s lemma), the congruenceMathworldPlanetmathPlanetmathPlanetmath

x2≡-1(modp) (1)

has a solution. By Dirichlet’s approximation theorem, there exist integers a and b such that

|a⁢xp-b|≤1[p]+1<1p (2)
1≤a≤[p]<p

(2) tells us

|a⁢x-b⁢p|<p.

Write u=|a⁢x-b⁢p|. We get

u2+a2≡a2⁢x2+a2≡0(modp)

and

0<u2+a2<2⁢p,

whence u2+a2=p, as desired.

To prove Thue’s lemma in another way, we will imitate a part of the proof of Lagrange’s four-square theorem. From (1), we know that the equation

x2+y2=m⁢p (3)

has a solution (x,y,m) with, we may assume, 1≤m<p. It is enough to show that if m>1, then there exists (u,v,n) such that 1≤n<m and

u2+v2=n⁢p.

If m is even, then x and y are both even or both odd; therefore, in the identityPlanetmathPlanetmathPlanetmath

(x+y2)2+(x-y2)2=x2+y22

both summands are integers, and we can just take n=m/2 and conclude.

If m is odd, write a≡x(modm) and b≡y(modm) with |a|<m/2 and |b|<m/2. We get

a2+b2=n⁢m

for some n<m. But consider the identity

(a2+b2)⁢(x2+y2)=(a⁢x+b⁢y)2+(a⁢y-b⁢x)2.

On the left is n⁢m2⁢p, and on the right we see

a⁢x+b⁢y≡x2+y2 ≡ 0(modm)
a⁢y-b⁢x≡x⁢y-y⁢x ≡ 0(modm).

Thus we can divide the equation

n⁢m2⁢p=(a⁢x+b⁢y)2+(a⁢y-b⁢x)2

through by m2, getting an expression for n⁢p as a sum of two squares. The proof is completePlanetmathPlanetmathPlanetmathPlanetmath.

Remark: The solutions of the congruence (1) are explicitly

x≡±(p-12)!(modp).
Title proof of Thue’s Lemma
Canonical name ProofOfThuesLemma
Date of creation 2013-03-22 13:19:08
Last modified on 2013-03-22 13:19:08
Owner mathcam (2727)
Last modified by mathcam (2727)
Numerical id 10
Author mathcam (2727)
Entry type Proof
Classification msc 11A41