Originally Posted by

**emakarov** This sounds pretentious. Just say, "Let a be an integer".

You assumed that $\displaystyle a^2\equiv 2\pmod{4}$ and concluded that $\displaystyle a^2$ is even. This means you proved the following: For every $\displaystyle a\in\mathbb{Z}$, $\displaystyle a^2\equiv 2\pmod{4}$ implies $\displaystyle a^2$ is even. You have not proved this: For every $\displaystyle a\in\mathbb{Z}$, $\displaystyle a^2$ is even. You cannot arbitrarily remove an assumption that was crucial in deriving the conclusion. This is similar to how the claim, "If you give me a million dollars, I can buy a golden Lamborghini" is not the same as "I can buy a golden Lamborghini".

Also, 4k - 2 above should be 4k + 2.

Edit: If 5 were congruent to 2 mod 4, then you would indeed reach a contradiction and the proof would be fine. That is, a = 5 would be a counterexample to the proved claim, "For every $\displaystyle a\in\mathbb{Z}$, $\displaystyle a^2\equiv 2\pmod{4}$ implies $\displaystyle a^2$ is even" because the premise of the implication is true (under our assumption, not in reality) and the conclusion is false. As it is, a = 5 does not contradict the proved claim.