I'm stuck on a practice problem for an upcoming midterm. Can someone tell me if I'm starting off on the right foot here?
Q: $x,y,z \in \mathbb{Z}$. $x + y$ and $y + z$ are even. Prove that $x + z$ is even.
I thought it would be easier to prove using the contrapositive so I am proving that if $x+z$ is odd, then either $x+y$ or $y+z$ are odd.
By the definition of an odd number, $x+z = 2n + 1, n \in \mathbb{Z}$.
Case 1 : suppose x is even. $x = 2a, a \in\mathbb{Z}$. Then $x+z = 2(a+b) + 1 = (2a) + (2b + 1)$, where $n = a+b, a,b \in\mathbb{Z}$. This means $z$ must be odd. The same logic holds for $x+y$, meaning that $y$ must also be odd. Therefore, $y = 2c + 1$. It follows that $y+z = 2b +1 + 2c + 1 = 2d$, where $d = b+c+1$.
Case 2 : suppose $x$ is odd. $x = 2a +1, a \in\mathbb{Z}$. Then $x+z = 2(a+b) + 1 = (2a +1) + (2b)$, where $n = a+b, a,b\in\mathbb{Z}$. This means $z$ must be even. The same logic holds for $x+y$, meaning that $y$ must also be even. Therefore, $y = 2c$. It follows that $y+z = 2b + 2c = 2d$, where $d = b+c$.
I just don't think this proves that one of the two expressions is odd. Any help would be much appreciated!
Hint: $x+z = (x+y) + (y+z) - 2y$