[Math] let $a, b \in \mathbb{Z}$. Prove that if $a-b$ is odd, then $a$ and $b$ have opposite parity.

parity

Just wondering if this is the correct way to write this proof. Thank you!

Assume $a$ and $b$ have opposite parity. We’ll consider two cases: $a$ is even, $b$ is odd or $a$ is odd, and $b$ is even. WLOG, suppose $a$ is even, and $b$ is odd. By definition, $a=2m$ and $b=2n+1$ for some integers $m,n$. Then $a-b=2m-2n+1$ and therefore $a-b=2(m-n)+1$. Since $m-n$ is an integer, then $a-b$ is odd.

Best Answer

You have proven the statement: "If a and b have opposite parity, then a-b is odd" instead of "If a-b is odd, then a and b have opposite parity".

In particular, if you want to show that a and b have opposite parity, you cannot start your proof with "Assume a and b have opposite parity".

You either have to start from your assumption, "Assume that a-b is odd", or from contraposition: "Asssume that a and b do not have opposite parity", and from there conclude a contradiction with your assumption, i.e. show "if a and b do not have opposite parity, then a-b is not odd".

Related Question