Hardy and Wright's first proof of Lagrange's Theorem [HardyWright, §20.5] goes back to Euler. The key idea in the proof is to reduce representability of integers to representability of primes.
Lemma. The set of representable integers is closed under multiplication.
Sketch of Proof. Using elementary algebra, show that
After establishing this lemma, it suffices to prove that every positive
prime is representable. The proof on page 302 starts with a lemma
(Theorem 87, page 70) which says that some positive multiple of an odd
prime
is representable, or more specifically:
Lemma. If
is an odd prime, then there are integers
,
and
with
such that
The basic idea in proving that every odd prime is representable
is to show that with four squares, the smallest
representable multiple of prime
is
itself. To be complete, one also
needs to verify that
and
are also representable.
Hardy and Wright give a second proof [HardyWright, §20.9]
of Lagrange's Theorem going back to a 1919 study by Hurwitz
of integer quaternions. Since a representation of an integer
as the sum of four squares can be viewed as the norm of an integer
quaternion, Lagrange's Theorem is equivalent to the statement
that every positive integer is the norm of some integer quaternion. For each
integer
, Jacobi's Theorem counts the number of integer quaternions
with norm
.
Hardy and Wright also give a more elementary elliptic functions (without elliptic functions) proof of Jacobi's Theorem using theta functions in sections §20.11 and §20.12. This proof goes back to Ramanujan.