Confused by proof of the irrationality of root 2: if $p^2$ is divisible by $2$, then so is $p$. In typical proofs of the irrationality of $\sqrt{2}$, I have seen the following logic:

If $p^2$ is divisible by $2$, then $p$ is divisible by $2$.

Perhaps I am being over-analytical, but how do we know this to be true? IE. do we require a proof of this implication, or is it simply fact?

The quickest proof of that fact is to note that every whole number $n$ is either even or odd.
If $n$ is even, $n=2k$ for some whole number $k$: $n^2 = 4k^2 = 2(2k^2)$ is even.
If $n$ is odd, $n=2k+1$ for some whole number $k$: $n^2 = (2k+1)^2 = 4k^2 +4k + 1 = 2(2k^2 +2k) +1$ is odd.
Therefore the square of a whole number is even if and only if that number is even.
