Fermat right triangle theorem (source code)

= Fermat right triangle theorem
{c}

There is no positive integer <right triangle> whose area is a square. For a hypothetical primitive triangle of minimal hypotenuse, its <primitive Pythagorean parametrization> makes $m,n,m-n,m+n$ pairwise coprime squares. Write $m=r^2$, $n=s^2$, $m+n=u^2$, $m-n=v^2$. Modulo eight forces $m$ odd and $n$ even. The new integer legs $(u+v)/2,(u-v)/2$ have hypotenuse $r$ and area $(s/2)^2$, a smaller positive hypotenuse, contradicting <infinite descent>. Clearing denominators extends the conclusion to rational right triangles of area one.