Changing modulus in modular arithmetic

If $a\equiv b \pmod{m}$ then there is $q\in\mathbb{Z}$ such that $a=b+qm$ which implies that, for $n\not=0$, $$\frac{a}{n}=\frac{b}{n}+q\frac{m}{n}.$$ So, when $\frac{a}{n},\frac{b}{n},\frac{m}{n}\in\mathbb{Z}$, we may conclude that $\frac{a}{n}\equiv\frac{b}{n}\pmod{\frac{m}{n}}$.


$$a\equiv b\pmod m$$ means $$\frac{a-b}m\in\Bbb Z.$$ $$\frac{a}n\equiv \frac bn\pmod{\frac mn}$$ means $$\frac{a/n-b/n}{m/n}\in\Bbb Z.$$


From the definition of modulo:

$$a \equiv b \pmod m \implies a=km+b \tag{1}$$ $$\frac{a}{n} \equiv {\frac{b}{n}} \pmod {\frac{m}{n}} \implies \frac{a}{n}=k \frac{m}{n} + \frac{b}{n} \tag{2}$$

Observe $(2)$.

\begin{align} \frac{a}{n}&=k \frac{m}{n} + \frac{b}{n} \tag {2} \\ \frac{a}{n} \cdot n&=k \frac{m}{n} \cdot n + \frac{b}{n} \cdot n \\ a & = km+b \tag{1} \end{align}

By multiplying $(2)$ by $n$, we get $(1)$, so the expressions are the same. Hence $a \equiv b \pmod m \implies \frac{a}{n} \equiv \frac{b}{n} \pmod{ \frac{m}{n}}$