Proving transitivity on relation: $aRb=7\mid |a-b|$ Proving transitivity on relation: $aRb=7|(|a-b|)$, so $aRb\, \wedge bRc\implies aRc$
What I tried:
$$7k =|a-b| $$
$$7l=|b-c|$$
$$l,k\in\mathbb{Z}$$
Now I squared the two equations and subtracted the top one from the bottom one:
$$49(l^2-k^2)=(b-c)^2-(a-b)^2 =c^2-2b(a-c)-a^2\neq|a-c|^2$$
I see that this approach does not work, since I can't get the square root of the distance between $a$ and $c$, so that $\sqrt{49(l^2-k^2)}$ would be a rational number for all $l$ and $k$ (for instance we could have $l=3$ and $k= 2,$ and we get $7\cdot\sqrt{5}\notin\mathbb{Q}$), so my equation above does not imply that transitivity does not exist.
My question is what would be the best way to prove if it does or doesn't exist?
 A: You want to see that $aRc$, that is $7$ divides $|a-c|$. By hypothesis $7k=a-b$ and $7l=b-c$ (you can do this choosing $k,l$ from $\mathbb{Z}$). Then:
$$a-c=a-b+b-c=7k+7l=7(k+l)\rightarrow |a-c|=7|k+l|$$
A: Alternative approach:
You want to prove that
$$\{ ~( ~7 ~| ~|a-b| ~) ~~\wedge~~ ~( ~7 ~| ~|b-c| ~) ~\} ~~\implies ~~ ~( ~7 ~| ~|a-c| ~).$$
Note that

*

*Either $~~~~~|a - b| = (a-b)~~~~~$ or $~~~~~|a - b| = (-1) \times (a-b).$

*Either $~~~~~|b - c| = (b-c)~~~~~$ or $~~~~~|b - c| = (-1) \times (b-c).$

*Either $~~~~~|a - c| = (a-c)~~~~~$ or $~~~~~|a - c| = (-1) \times (a-c).$
By assumption, there exists $r,s \in \Bbb{Z}$ such that

*

*$7r = |a - b|.$

*$7s = |b - c|.$
Define $R$ so that:

*

*$R = (r)~~$ if $~~|a - b| = (a-b)$.

*$R = (-r)~~$ Otherwise.

Define $S$ so that:

*

*$S = (s)~~$ if $~~|b - c| = (b-c)$.

*$S = (-s)~~$ Otherwise.

Then,
$$\{ ~[ ~7R = (a-b) ~] ~~\wedge~~ ~[ ~7S = (b-c) ~] ~\} 
~~\implies$$
$$[ ~7(R+S) = (a-c) ~: ~(R+S) \in \Bbb{Z} ~].$$
Define $T$ so that:

*

*$T = (R+S)~~$ if $~~|a - c| = (a-c)$.

*$T = [-(R+S)]~~$ Otherwise.

Then, $~~T \in \Bbb{Z}~~$ and $~~7T = |a - c|.$
Therefore, $~7 ~| ~|a - c|.$
