Is the prove correct for: If both ab and a + b are even then both a and b are even

Show: If both $ab$ and $a + b$ are even, then both $a$ and $b$ are even

Proof: Assume both $ab$ and $a + b$ are even but both $a$ and $b$ are not even

Case1: one is odd
$a=2m+1$, $b=2n$
Hence $a+b = (2m+1) + 2n = 2(m+n) + 1$

Case2: both are odd
$a=2m+1$, $b=2n+1$
Hence $ab = (2m+1)(2n+1) = 2(2mn+m+n) + 1$

Therefore both $a$ and $b$ have to be even for both $ab$ and $a+b$ to be even.

My question is that 1) Is this proof correct? 2) Is this proof by contradiction or negation or any other?

• Your first line in the proof should be Assume both $ab$ and $a+b$ are even but not both $a$ and $b$ are even, which means at least one of them is odd, while your clause both $a$ and $b$ are not even means both are odd. – egreg Feb 13 '14 at 11:46
• Case 1: one is odd and the other is even. – André Caldas Feb 13 '14 at 11:53

This is a proof by contradiction, as what you have really shown is that if "$a$ and $b$ are even" does not hold, then "$ab$ and $a+b$ are even" does not hold. Using the rule of double negation, this of course prooves your original statement.
• This is not exactly contradiction in its full power. For a contradiction, you would assume that $ab$ and $a+b$ are even. But there is no need to assume that. You assume that $a$ and $b$ are not both even and conclude that one of $ab$ or $a+b$ is not even. en.wikipedia.org/wiki/… – André Caldas Feb 13 '14 at 12:00
You might also argue that as $a + b$ is even, both are odd or both are even. But if $a$ and $b$ are odd, then $a b$ is odd, contradicting the premises. So both are even.