proof of Thue’s Lemma

proof of Thue’s Lemma

Let

p

be a prime

congruent

to 1 mod 4.

We prove the uniqueness first: Suppose

a

2

+

b

2

=

p

=

c

2

+

d

2

,

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

=

c

2

+

d

2

=

p

+

4

⁢

a

⁢

x

+

4

⁢

x

2

-

4

⁢

b

⁢

y

+

4

⁢

y

2

,

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

=

a

2

+

b

2

=

(

m

⁢

Y

-

d

⁢

X

)

2

+

(

m

⁢

X

+

d

⁢

Y

)

2

=

(

m

2

+

d

2

)

⁢

(

X

2

+

Y

2

)

,

which contradicts the

primality

of

p

since we have both

m

2

+

d

2

≥

2

and

X

2

+

Y

2

≥

2

. We now proceed to

existence

.

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

congruence

x

2

≡

-

1

(

mod

p

)

(1)

has a solution. By Dirichlet’s

approximation theorem

, there exist

integers

a

and

b

such that

|

a

⁢

x

p

-

b

|

≤

1

[

p

]

+

1

<

1

p

(2)

1

≤

a

≤

[

p

]

<

p

(2) tells us

|

a

⁢

x

-

b

⁢

p

|

<

p

.

Write

u

=

|

a

⁢

x

-

b

⁢

p

|

. We get

u

2

+

a

2

≡

a

2

⁢

x

2

+

a

2

≡

0

(

mod

p

)

and

0

<

u

2

+

a

2

<

2

⁢

p

,

whence

u

2

+

a

2

=

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

x

2

+

y

2

=

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

u

2

+

v

2

=

n

⁢

p

.

If

m

is even, then

x

and

y

are both even or both odd; therefore,
in the

identity

(

x

+

y

2

)

2

+

(

x

-

y

2

)

2

=

x

2

+

y

2

2

both summands are integers, and we can just take

n

=

m

/

2

and conclude.

If

m

is odd, write

a

≡

x

(

mod

m

)

and

b

≡

y

(

mod

m

)

with

|

a

|

<

m

/

2

and

|

b

|

<

m

/

2

. We get

a

2

+

b

2

=

n

⁢

m

for some

n

<

m

. But consider the identity

(

a

2

+

b

2

)

⁢

(

x

2

+

y

2

)

=

(

a

⁢

x

+

b

⁢

y

)

2

+

(

a

⁢

y

-

b

⁢

x

)

2

.

On the left is

n

⁢

m

2

⁢

p

, and on the right we see

a

⁢

x

+

b

⁢

y

≡

x

2

+

y

2

≡

0

(

mod

m

)

a

⁢

y

-

b

⁢

x

≡

x

⁢

y

-

y

⁢

x

≡

0

(

mod

m

)

.

Thus we can divide the equation

n

⁢

m

2

⁢

p

=

(

a

⁢

x

+

b

⁢

y

)

2

+

(

a

⁢

y

-

b

⁢

x

)

2

through by

m

2

, getting an expression
for

n

⁢

p

as a

sum of two squares

. The proof is

complete

.

Remark:

The solutions of the congruence (1) are
explicitly

x

≡

±

(

p

-

1

2

)

!

(

mod

p

)

.

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

Generated on Fri Feb 9 15:17:40 2018 by

LaTeXML