# Using a Direct Proof to show that two integers of same parity have an even sum?

I seem to be having a lot of difficulty with proofs and wondered if someone can walk me through this. The question out of my textbook states:

Use a direct proof to show that if two integers have the same parity, then their sum is even.

A very similar example from my notes is as follows: Use a direct proof to show that if two integers have opposite parity, then their sum is odd. This led to:

Proposition: The sum of an even integer and an odd integer is odd.

Proof: Suppose a is an even integer and b is an odd integer. Then by our definitions of even and odd numbers, we know that integers m and n exist so that a = 2m and b = 2n+1. This means:

a+b = (2m)+(2n+1) = 2(m+n)+1 = 2c+1 where c=m+n is an integer by the closure property of addition.

Thus it is shown that a+b = 2c+1 for some integer c so a+b must be odd.

## ----------------------------------------------------------------------------

So then for the proof of showing two integers of the same parity would have an even sum, I have thus far:

Proposition: The sum of 2 even integers is even.

Proof: Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2m???

• So now that you have $a = 2n$ (you have a typo) and $b = 2m$, we need to talk about the sum of $a$ and $b$, so look at $a+b = 2n+2m$. Can you show that this sum is even? – Mike Pierce Jan 28 '16 at 16:45
• Yes, and so? (Once you've made the correction to $b=2n$, ) mimic the proof of the result in your notes and factor out the $2$... Now what's the other fork in the road? Well, that the two integers are both odd. Unfold the definition of "odd" similarly, add the resulting expressions, factor out the $2$, ... . – BrianO Jan 28 '16 at 16:46
• Just as a comment for future reference, note that this follows easily from the fact that $2=0 \mod 2$. That is, $2x=0 \mod 2$ for $x=1$ or $x=0$. – Aloizio Macedo Jan 28 '16 at 16:48
• @AloizioMacedo That's true, of course, but it may be too abstract an approach. – BrianO Jan 28 '16 at 16:50

"Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2m???"

Since a and b are different numbers they should be different m and n.

"Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2*n*?

And so a + b = 2m + 2n = 2(m+n) and as m+n =c for some integer c, a + b = 2c so by definition a + b is even.

Yes, you can use the definitions directly. If $a,b$ are even then like you say we have $a = 2m$ and $b = 2n$, so $a+b = 2m + 2n = 2(m+n)$, which is even.

Similarly, if $a,b$ are odd then we have $a = 2m + 1$ and $b = 2n + 1$, and so $a+b = (2m +1) + (2n + 1) = 2(m + n + 1)$, which is also even.

• thanks for replying. So since the resulting integer sum of (a+b) always ends up being multiplied by (2), it will always yield an even sum? – Analytic Lunatic Jan 28 '16 at 17:28
• @AnalyticLunatic Yes, since by definition an even integer is one of the form $2\cdot \text{integer}$. – Alex Provost Jan 28 '16 at 17:32
• So then, how would this change if say, we were looking at a product instead of a sum? – Analytic Lunatic Jan 28 '16 at 19:32
• @AnalyticLunatic Can you put $2m \cdot 2n$ in the form $2 \cdot \text{integer}$? Can you put $(2m+1)\cdot(2n+1)$ in the form $2\cdot \text{integer}+1$? – Alex Provost Jan 28 '16 at 21:13
• Is it sufficient to prove using only the even case? If it is necessary to provide the odd case as well to prove the theorem, then how is it considered a "direct proof" rather than "proof by cases"? – Michael Fulton Apr 13 '17 at 0:23