Remainder on Division is Least Positive Residue
Let $a, b \in \Z$ be integers such that $a \ge 0$ and $b \ne 0$.
$a = q b + r, 0 \le r < \size b$
Then $r$ is equal to the least positive residue of $a \pmod b$.
By definition of least positive residue:
- $a = q b + r \iff r \equiv a \pmod b$
for some $q \in \Z$.
By the Division Theorem, there exists a $q$ such that:
- $0 \le r < \size b$
which is precisely the definition of the least positive residue of $a \pmod b$.