Division Theorem/Proof 1

Theorem
For every pair of integers $a, b$ where $b \ne 0$, there exist unique integers $q, r$ such that $a = q b + r$ and $0 \le r < \left|{b}\right|$:


 * $\forall a, b \in \Z, b \ne 0: \exists! q, r \in \Z: a = q b + r, 0 \le r < \left|{b}\right|$

Proof
From Division Theorem: Positive Divisor:
 * $\forall a, b \in \Z, b > 0: \exists! q, r \in \Z: a = q b + r, 0 \le r < b$

That is, the result holds for positive $b$.

It remains to show that the result also holds for negative values of $b$.

Let $b < 0$.

Consider:
 * $\left|{b}\right| = -b > 0$

where $\left|{b}\right|$ denotes the absolute value of $b$: by definition $\left|{b}\right| > 0$.

From Division Theorem: Positive Divisor, we have the existence of $\tilde q, \tilde r \in \Z$ such that:
 * $a = \tilde q \left|{b}\right| + \tilde r, 0 \le \tilde r < \left|{b}\right|$

Since $\left|{b}\right| = -b$:


 * $a = \tilde q \left({-b}\right) + \left({\tilde r}\right) = \left({-\tilde q}\right) b + \tilde r$

Taking:
 * $q = -\tilde q, r = \tilde r$

the existence has been proved of integers $q$ and $r$ that satisfy the requirements.

The proof that they are unique is the same as that for the proof for positive $b$, but with $\left|{b}\right|$ replacing $b$.