<s>[INST] Proof strategy for showing $a^2 + b^2 \neq c^2$ for $a,b$ odd, $c$ even. I am trying to understand a proof that $a^2 + b^2 = c^2$ cannot hold for $a,b$ odd and $c$ even.
The proof I am reading, and I believe I understand its steps, proceeds as follows. If $a,b$ are odd, then $a,b$ are congruent to either $1$ or $3$, mod $4$. (I don't know how to prove this other than by writing out cases, and it seems clear; if anyone has a more formal explanation, I would definitely be interested.) In either event, their square is equal to $1$ mod $4$, so the sum of the squares is equal to $2$, mod $4$.  If $c$ is even, then its equivalent to $0$ or $2$ mod $4$, so its square its equivalent to $0$ mod $4$. As $2 \neq 0$ mod $4$, $a^2 + b^2 \neq c^2$.
I believe the argument is that IF $a^2 + b^2 = c^2$, then they would have to be equivalent to each other in any modulus. Because they don't agree mod $4$, that can't be the case.
Is that correct? Is their another way to understand the above statement about congruences mod $4$?
 [/INST] Yes your reasoning is right.
For the first doubt note that for $a$ odd we have $a=4k+1$ or $a=4k+3$ and in any case since $a=2h+1$ we have $a^2=4h^2+4h+1\equiv 1 \pmod 4$.
For $c$ even we have that $c^2=4h^2\equiv 0 \pmod 4$.
Therefore we have
$$a^2+b^2=c^2 \implies a^2+b^2 \equiv c^2 \pmod 4$$
but as you noticed the latter is false and then $a^2+b^2=c^2$ is impossible for $a,b$ odd and $c$ even.
</s>