Fermats proof that a rational square is never congruent I've been going through Fermats proof that a rational square is never congruent. And I've stumbled upon something I can't see why is. Fermat says: ''If a square is made up of a square and the double of another square, its side is also made up of a square and the double of another square'' Im having difficulties understanding why this is. Can anyone help me understand this?
 A: In other words, Fermat is saying that if $x^2=y^2+2z^2$, then $x=c^2+2d^2$ for some $c$, $d$. I take it you know how to show that the solutions of $x^2+y^2=z^2$ are given by $x=2kmn$, $y=(m^2-n^2)k$, $z=(m^2+n^2)k$. Maybe if you subject $x^2=y^2+2z^2$ to the same kind of analysis, you get Fermat's claim. 
A: The result Fermat is using here is the following: if a number $n$ is represented primitively by the quadratic form $x^2 + my^2$, where $m = 1, \pm 2, 3$, then so is
any (positive) divisor of $n$ (primitively represented means $\gcd(x,y) = 1$).
Fermat had descent proofs for these claims. Lagrange later showed that if a number 
$n$ is represented primitively by the quadratic form $x^2 + my^2$, then any prime
divisor of $n$ is represented by some (reduced) form with the same discriminant $-4m$.
In Fermat's examples, the class number is $1$, and the only reduced form with discriminant $-4m$ is then the principal form.
Gerry's idea will also work, and it is instructive to find out where the method of parametrization for $m=5$ differs from the case $m=2$.  
