[Math] prove that two integers are in the same remainder class mod n provided that they have the same remainder when divided by n

modular arithmeticmodulesproof-explanation

prove that two integers are in the same remainder class mod n provided that they have the same remainder when divided by n.

Let $a,b \in \mathbb{Z}$, and since they have the same remainder when divided by n, this implies that $\exists s,t \in \mathbb{Z} $ such that $a=sn+r,b=tn+r \implies$ $ a \equiv r \ mod \ n,b \equiv r \ mod \ n \implies a \equiv b \equiv r \ mod \ n$.therefore, $$a,b \in \mathbb{Z} /n \mathbb{Z} $$

Is this proof valid?

Best Answer

Formal answer.

Definition: Two integers are equivalent$\mod n$ if they leave the same remainder when divided by $n$. We say $a \equiv b \mod n$ if $a$ and $b$ are equivalent.

So, when you've proved that they have the same remainder, you can easily conclude that they're equivalent.

Related Question