# 3 square theorem

Does anyone know a proof of the 3 square theorem which uses Cassels' Lemma: n can be expressed in 3 squares of rationals iff n can be expressed in 3 squares of integers.

-
Assuming you mean the standard classification of which integers are the sum of three integer squares, the only other thing you need is the local-global principle, which is true in this situation (Hasse-Minkowski). See for example Serre's book "A course in arithmetic". The reason you get the funny $4^m(8n+7)$ business is the local condition at 2; all other local conditions are satisfied. – Kevin Buzzard Dec 29 '10 at 8:13
Google does. Here is a concrete application towards the 3-square theorem: to prove that $M\equiv 3\pmod{8}$ is a sum of three integer squares, apply the Hasse principle to the form $x^2 + y^2 + z^2 - Mw^2$ and thereby show that this form represents 0 over $\mathbb{Q}$ (it does so over all completions). Using Cassels's (sic) lemma completes the proof of the theorem for $M\equiv 3\pmod{8}$. – Alex B. Dec 29 '10 at 8:22
Do you know a proof which doesn't? (Not rhetorical; I only know one proof.) – Qiaochu Yuan Dec 29 '10 at 10:44

Probably worth pointing out a certain distinction. The quoted property is Pete L. Clark's ADC property, see:

For positive forms in three variables with integer coefficients, this is stronger than L. E. Dickson's "regularity," which means that the form integrally represents any number represented by some form in the same genus. The ADC property is not implied by class number one here, nor does ADC guarantee class number one. I sent Pete the 103 positive ternary ADC forms; there are 794 positive ternaries alone in their genera. Also, thanks to Pete for actually checking something I foolishly assumed, there are several ADC forms not alone in their genera, such as $\langle 1,1,3,0,1,0 \rangle$ or $g(x,y,z) = x^2 + y^2 + 3 z^2 + z x,$ of discriminant 11. I also gave an example for the 810 failures, each such regular form (including 14 not proved yet, after B-K Oh proved 8) represented some $p^2 n$ without representing $n,$ where the prime $p$ divides the Brandt-Intrau-Watson discriminant.

So the subtle point is that the ADC property in "Cassels's lemma" includes primes that divide the discriminant, which in the case of three squares is $-4,$ or taken as 4 by me and J. L. Lehman. The fact that the sum of three squares represents $n$ if and only if it represents $4n$ is, well, among regular forms, an artifact of a fortunate arrangement of local conditions, in this case the single "congruence obstruction" $4^k(8 m + 7).$

For example, the regular form $\langle 1, 1, 3, 1, 1, 1 \rangle$ or $g(x,y,z) = x^2 + y^2 + 3 z^2 + y z + z x + x y,$ integrally represents 8 but not 2. Oh, the discriminant of this form is 8, so the only prime available to distinguish between regularity and the stronger ADC property is 2.

Here is an easier one: $x^2 + y^2 + 4 z^2$ is regular, related in an evident way to the sum of three squares, and is not ADC as it integrally represents 12 but not 3.

-
Indeed, the three squares form over $\mathbb{Z}$ is the one I focus on in the introduction of (the latest draft) of this paper: math.uga.edu/~pete/ADCformsPart1b.pdf. In particular, I do give the argument as to why Cassels-Davenport + Hasse-Minkowski implies Gauss-Legendre (three squares theorem). But this is not news: see Serre's Couse in Arithmetic or Weil's Number Theory: an approach through history... or many other standard texts. – Pete L. Clark Dec 30 '10 at 9:04
@Will: by the way, the ADC property does not imply class number one, not even for positive definite ternary forms, as I learned from the list you sent me. It was probably just a typo: the Euclidean property implies class number one in this case and, we think, more generally. – Pete L. Clark Dec 30 '10 at 9:08
Hi, Pete, you are generous. I just assumed without any thought involved that ADC implied class number one for positive ternaries. As I fell asleep last night I briefly wondered if that were really true, but I never checked. About your Euclidean property implying class number one for positive integral forms, as I have been unable to prove that (perhaps the same with your local colleague), I think sometimes about writing to Europe and saying "here is our list, what do you think." But it is your project. Note that Serre's trick does not seem to show that Euclidean implies 2-regular (A. Earnest). – Will Jagy Dec 30 '10 at 20:47

As others have said, the proof of Three Squares using the ((Aubry-)Davenport-)Cassels Lemma is a very prominent one nowadays. But this was not the original proof, and if you look in a number theory text written before 1980 or so that is not Serre's Course in Arithmetic, if they give a proof at all (and some do!) it will not be this one. In fact when I first taught an elementary number theory course in early 2007 I suggested a proof of 3ST as a (rather challenging) final project, and one student, Ben Wyser, did so and wrote up an elementary proof. I would have some trouble finding his paper now (he is completing his PhD this year; maybe I should ask him for another copy soon), but for instance he might have used the text Sums of squares of integers by Moreno and Wagstaff as a reference. These types of proofs unfortunately have the character of many elementary proofs in number theory that it took me a long time to realize that I found discouraging: almost any given step in the argument follows easily enough, but when you look back at the entire argument and ask "What is really going on here?" it is far from clear.

(If you happen to be in possession of more advanced number theoretic knowledge and tools, it can be an interesting challenge to "unrewrite" these elementary proofs using language and concepts that makes more sense to you. But if you are an undergraduate student who is any less brilliant than the handful of students who are prominent on this site, I say good luck with that!)

The reason that I am writing this answer now though is that I recently read a very nice paper:

MR0304334 (46 #3469) Wójcik, Jan On sums of three squares. Colloq. Math. 24 (1971/72), 117–119.

The author gives a short proof of Gauss's theorem that a positive integer $n$, not of the form $4^a(8b+7)$, is expressible as a sum (1) $n=x^2+y^2+z^2$ of three squares. As did N. C. Ankeny [Proc. Amer. Math. Soc. 8 (1957), 316--319; MR0085275 (19,15d)] and L. J. Mordell [Rev. Math. Pures Appl. 3 (1958), 25--27; MR0122778 (23 #A117)] the author uses Minkowski's convex body theorem, in this case (together with the corresponding results for two squares) to show that it is sufficient to solve (1) for square free n in rationals $x,y,z$. He does this by choosing $\beta$ and (by "Dirichlet's theorem'') a prime $q \equiv 1 \pmod 4$ such that Lagrange's conditions for the solubility of $nu^2−v^2−2^\beta q w^2=0$ can be satisfied. (review by G. Greaves)

(i) the Hasse-Minkowski theory (it never mentions $p$-adic anything!), or
(ii) the ADC proof of the fact that an integer which is a sum of three rational squares is also a sum of three integral squares (i.e., the one which observes that $x^2+y^2+z^2$ satisfies a Euclidean property and shows that this suffices). Instead Wojcik gives a very classical geometry of numbers proof, which superficially at least looks different. (I am currently leading a graduate research group in geometry of numbers and applications to quadratic forms, and I have a student looking at Wojcik's argument to see whether it generalizes to other "ADC forms".)
The fact that the proof uses Two Squares, Legendre's Theorem on Conics and Dirichlet's Theorem but not $p$-adic methods was a small miracle to me, because it happens that in my elementary number theory course I do indeed cover the first three topics but not the last. So I recently stitched together a proof of the Three Squares Theorem that uses first the ADC argument to establish that $x^2+y^2+z^2$ is an ADC form and then Wojcik's argument to show exactly which integers it represents. You can find this argument in $\S 2$ of these notes.