Suppose that $w^2 + x^2 + y^2 = z^2$, where $w, x, y,$ and $z$ always denote positive integers. (Hint: It may be helpful to represent even integers as $2i$ and odd integers as $2j + 1$, where $i$ and $j$ are integers)
Prove the proposition: $z$ is even if and only if $w, x,$ and $y$ are even. Do this by considering all the cases of $w, x, y$ being odd or even.
I am posting this question in order to receive constructive criticism about my proof, and I would also like to improve it and verify it. In addition, I know that this question was already asked here, but I don't need to just better understand the question; I want to come up with a complete and elegant proof for the proposition.
So, I used @ZevChonoles answer from here to help me better understand the question and start constructing my proof.
The first problem I came across when writing this proof is that it is a proposition with if an only if, but it asks to consider all the cases. I use these notes to create my proof templates, but the problem I came across is that the proof template for if an only if propositions and the proof template for case analysis are not exactly the same. I was better able to see how to construct a proof using case analysis, so that is what I went with.
I realized that there could be a total of $4$ different cases, since the order of which numbers are even and which ones are odd does not matter. The cases could be as such:
1) Odd Odd Odd
2) Odd Odd Even
3) Odd Even Even
4) Even Even Even
Theorem: $z$ is even if and only if $w, x,$ and $y$ are even.
Proof: The proof is by case analysis.
None of the numbers $w, x, y$ are odd.
One of the numbers $w, x, y$ is odd.
Two of the numbers $w, x, y$ are odd.
Three of the numbers $w, x, y$ are odd.
Lemma: The square of an odd number is one more than a multiple of $4$:
$$(2j+1)^{ 2 }=4j^{ 2 }+4j+1=4(j^{ 2 }+j)+1$$ and the square of an even number is exactly a multiple of 4:
$$(2i)^{ 2 }=4i^{ 2 }$$
Case 1: If none of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=4a+4b+4c$, where $a,b,c\in\mathbb{Z}$, is a multiple of $4$, which implies $z$ is even.
Case 2: If exactly one of the numbers $w, x, y$ is odd, then $z^2=w^2+x^2+y^2=4a+4b+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is one more than a multiple of $4$, and therefore $z$ is odd.
Case 3: If exactly two of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=4a+(4b+1)+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is two more than a multiple of $4$, and therefore $z$ is even.
Case 4: If exactly three of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=(4a+1)+(4b+1)+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is three more than a multiple of $4$, and therefore $z$ is odd.
Now, from what I understand it seems that $w, x,$ and $y$ being even $\Rightarrow $ $z$ is even, but when I take case $3$ into consideration, it seems that $z$ being even does not necessarily imply that $w, x,$ and $y$ are even.
Am I correct in my conclusion? If not, where did I go wrong in my proof? Please feel free to give me constructive criticism about my proof writing techniques as well.