Proving modular arithmetic using its contrapositive

266 Views Asked by At

I am given this sort of problem:

Prove the following statement using a proof by contraposition.

$∀n∈Z$, if $n^2 \bmod 5=1$ then, $n \bmod 5=1$ or $n \bmod 5=4.$

So, the contrapositive would be:

$∀n∈Z$, if $n\bmod 5≠1$ or $n\bmod 5≠4$ then, $n^2\bmod 5≠1$

My problem here is how would you prove that such elements do not equal to each other?