1

I was reading through a proof of the following proposition:

$$a\equiv b\!\!\pmod{m}\iff (a\bmod m) = (b\bmod m)$$

i.e. $\ a \equiv b \pmod{\!m} $ if and only if a and b leave the same remainder when divided by m

I came across a statement that I didn't quite understand. I boxed my area of confusion below:

enter image description here I am confused because I expected the inequality to be $ 0 \leq r_1 - r_2 < m$. How did they come to the conclusion that $ -m < r_1 - r_2 < m$

Any input is appreciated.

Bill Dubuque
  • 272,048

2 Answers2

4

Since $$0\le r_2<m$$ then \begin{align}&-m<-r_2\le0\quad \text{and since}\\ &\;\;\;0\le r_1<m\end{align} then by adding term by term we find $$-m<r_1-r_2<m$$

1

Sami explained the inequality. I explain another way, avoiding it.

$\qquad m\mid a\!-\!b \iff a\!-\!b \in m\Bbb Z \iff a+m\Bbb Z\, =\, b+m\Bbb Z$

$\qquad a\ {\rm mod}\ m\, $ is the least nonnegative element of $\ a+m\Bbb Z$

$\qquad b\ {\rm mod}\ m\, $ is the least nonnegative element of $\ b+m\Bbb Z.$

Being equal sets, they have equal least nonnegative elements.

Bill Dubuque
  • 272,048