Prove the following statements using either direct or contra
Prove the following statements using either direct or contrapositive proof. Sometimes one approach will be much easier than the other.
Suppose x Z. If x+ y is even, then x and y have the same parity
Solution
Case 1: If x, y are even.
then we have x=2m and y=2n ==> x+y=2m+2n=2(m+n), which is even.
Case 2: If x,y are odd.
then we have x=2m+1 and y=2n+1 ==> x+y=(2m+1)+(2n+1)=2(m+n+1), which is also even.
hence If two integers have the same parity, then their sum is even.
and vice versa proved : If x+ y is even, then x and y have the same parity

