Consider the statement: For all x, y, z ∈ Z. At least one of x− y, x− z and y − z is even
I want to check if my proof is correct via contradiction:
Suppose(for a contradiction) that all of x-y, x-z, and y-z are odd:
x - y = 2k+1 for some k ∈ Z
rearranging for x:
x=2k+1+y
y - z = 2n+1 for some n ∈ Z
rearranging for z:
z=y-2n-1
taking x-z and subbing in
x - z =2k+1+y-(y-2n-1)
= 2k+2n+2
=2(k+1+n)
therefore x-y is even which is a contradiction therefore the original statement is true
Yes your proof looks fine.
Another way to think about this is to notice that the sum $$ ( x - y) + (y - z) + (x-z) = 2 (x-z) $$ is even, so the numbers $(x-y), (y-z), (x-z)$ can't all be odd.
If you want to continue posting here you should consider learning LaTeX. It will make your equations easier to read.