Let x and y be integers. If xy and x+y are of the same parity, then both x and y are even.
The contrapositive is very easy to prove. Take two odd integers. What's the parity of the product? the sum?
I started doing the contrapositive and got that if x or y is odd, then xy and x + y are of opposite parity. I originally assumed that the negation of x and y are even was x and y are odd, but my professor said that it was x or y.
Your professor is right. It only takes one of \(x\) or \(y\) to not be even for both to not be even. In other words, "\(x\) and \(y\) are even" is negated if either \(x\) is odd OR \(y\) is odd (or both, but you only need one).
So my first case was if x was odd, thus it could be represented as x = 2a + y, a being an element of the integers. Therefore xy = (2a + 1) y and x + y = 2a + 1 + y. I'm not sure what to do from here. Do I have 2 subcases where y is odd and y is even?
If \(x\) is odd and \(y\) is even, you have \(xy=(2a+1)(2b)\) where \(a,b\in\mathbb{Z}\). So,\(xy=2(2ab+b)\), so \(xy\) is even. Meanwhile, \(x+y=2a+1+2b=2(a+b)+1\), so \(x+y\) is odd. There's no need to rewrite the case for even \(x\) and odd \(y\) because it's the same as the opposite if you just replace \(x\) with \(y\). The argument is identical.
Join our real-time social learning platform and learn together with your friends!