Proposition. Congruence in terms of remainders [01CX]
- October 1, 2026
- Marcelo Fiore, Jon Sterling
Let m be a positive integer. For all natural numbers k and l, k \equiv l \mod m \Longleftrightarrow \operatorname {rem}{\mathopen {}\left (k,m\right )\mathclose {}} = \operatorname {rem}{\mathopen {}\left (l,m\right )\mathclose {}}
Proof.
- October 1, 2026
- Marcelo Fiore, Jon Sterling
Let m be positive, and fix arbitrary naturals k and l.
In the forward direction, we assume k \equiv l \mod m. Recalling that \operatorname {rem}{\mathopen {}\left (x,m\right )\mathclose {}} < m and the fact that equality of modular integers is congruence, it suffices to show \operatorname {rem}{\mathopen {}\left (k,m\right )\mathclose {}}\equiv \operatorname {rem}{\mathopen {}\left (l,m\right )\mathclose {}}\mod m\text {,} or in other words that m divides the difference between the two remainders. We introduce the following notations to simplify what follows:
\begin {aligned} \Delta {q} &\coloneqq \operatorname {quo}{\mathopen {}\left (k,m\right )\mathclose {}}-\operatorname {quo}{\mathopen {}\left (l,m\right )\mathclose {}} \\ \Delta {r} &\coloneqq \operatorname {rem}{\mathopen {}\left (k,m\right )\mathclose {}}-\operatorname {rem}{\mathopen {}\left (l,m\right )\mathclose {}} \end {aligned}We want to show that m\mid \Delta {r}. To isolate \Delta r we first consider the difference k-l:
\begin {aligned} k-l &= m\cdot \operatorname {quo}{\mathopen {}\left (k,m\right )\mathclose {}}+\operatorname {rem}{\mathopen {}\left (k,m\right )\mathclose {}} - {\mathopen {}\left (m\cdot \operatorname {quo}{\mathopen {}\left (l,m\right )\mathclose {}}+\operatorname {rem}{\mathopen {}\left (l,m\right )\mathclose {}}\right )\mathclose {}} \\ &= m\cdot \Delta {q} + \Delta {r} \end {aligned}Hence, we have \Delta {r} = {\mathopen {}\left (k - l\right )\mathclose {}} - m \cdot \Delta {q} , and recalling our assumption k\equiv l \mod m we may assume some p such that pm = k-l. Hence \Delta {r} = pm - m\cdot \Delta q = m(p - \Delta q) and therefore m \mid \Delta {r}.
- In the backward direction, we assume \operatorname {rem}{\mathopen {}\left (k,m\right )\mathclose {}} = \operatorname {rem}{\mathopen {}\left (l,m\right )\mathclose {}}, so that in the notation established above we have \Delta {r}=0. Therefore k-l = m\cdot \Delta q and hence k\equiv l\mod m.