Can someone can tell me if my proof of the next propostion is correct?
Define the following relation: $$a\sim b \iff a-b=km, m\in \mathbb{Z}$$ Show $\sim$ is an equivalence relation
And so here's my attempt on showing it
Proof.
Let $a, b, c \in \sim$
i)Reflexivity of $\sim$: $$a\sim a \iff a-a = km \iff 0=km \iff k = 0 \in \mathbb{Z} \vee m=0 \in \mathbb{Z}$$ ii)Simmetry of $\sim$: $$a\sim b \iff a-b = km \iff b-a = (-k)m\iff a\sim b$$ iii)Transitivity of $\sim$: $$a\sim b \wedge b\sim c \iff a-b=km \wedge b-c=qm \iff a-b+b-c = km - qm $$ $$\iff a-c = km-qm \iff a-c = (k-q)m, (k-q)\in \mathbb{Z}$$
The essence of the matter is clearer as follows. Note $\ a\sim b\iff (a-b)/m\in\Bbb Z.$
i) $\ \ (a-a)/m \in \Bbb Z\ $ by $\ 0\in\Bbb Z$
ii) $\ \ (a-b)/m \in \Bbb Z \, \Rightarrow\, (b-a)/m \in \Bbb Z\ $ by $\ \Bbb Z\ $ closed under negation.
iii) $ \ (a-b)/m,\, (b-c)/m \in \Bbb Z\,\Rightarrow\, (a-c)/m \in \Bbb Z\ $ by $\ \Bbb Z\ $ closed under addition.
So congruence is an equivalence relation precisely because $\,\Bbb Z\,$ is an additive subgroup of $\,\Bbb Q.$