# Proof of Legendre's theorem on the ternary quadratic form

Theorem (Legendre): Let $a,b,c$ coprime positive integers, then $ax^2 + by^2 = cz^2$ has a nontrivial solution in rationals $x,y,z$ iff $\left(\frac{-bc}{a}\right)=\left(\frac{-ac}{b}\right)=\left(\frac{ab}{c}\right)=1$.

I'm trying to prove this theorem using

Lemma Modified global square theorem: The rational number $cz$ is a $c$ times a square iff it is a $c$ times a square in $\mathbb{Q}_p$ for every prime $p$.

So far, it is possible to show that the equation can be solved locally for all primes powers except $2^r$:

To solve this equation $\pmod {abc}$ just put $x = bc$, $y = ac$, $z = ab$. Reducing this gives a solution for every odd prime $p | abc$. Hensel lifts it to $\mathbb{Q}_p$.

If an odd prime $p \not| abc$ then put $z = 1$ so that we have $ax^2 \equiv c - by^2 \pmod p$, $x$ and $y$ can take on $(p+1)/2$ values each so they must have an intersection which solves this congruence. Hensel lifts it to $\mathbb{Q}_p$ again.

It's easy to solve when $p=2$ but I think it $p=4$ needs to be done for Hensel to apply.

My question is how to get a rational number out of this, so that I can apply the global square theorem and conclude? It seems like the $p$-adic numbers have to have a finite expansion but that seems just as hard to prove as anything. Also if anyone has a hint for the $2^r$ case that would be great too! Thanks a lot.

• I think all the derivatives are zero in the $p | abc$ case, are you sure you can apply Hensel's lemma? – Plop Mar 17 '11 at 0:12
• Note that en.wikipedia.org/wiki/Hasse%E2%80%93Minkowski_theorem solves the problem. If you're interested in that kind of stuff, read A course in arithmetic, it is excellent and very well written. – Plop Mar 17 '11 at 0:15
• @Plop, you're right! Thanks for that, I will see if I can fix it somehow. – quanta Mar 17 '11 at 0:16
• I'm sure you can find solutions mod $p$ if you use the condition (you have to use it somewhere ;)). – Plop Mar 17 '11 at 0:20
• If there is a way to prove this theorem without using such devices as the process of lifting solutions of Hensel, will you be satisfied? Or are you trying to explore this approach? I am just confused. – awllower Aug 20 '11 at 4:15

Best link about solvability $ax^2+by^2=cz^2$ is a chapter 2 of book