Division Theorem/Proof 2

Proof
Consider the set of integer multiples $x \, \size b$ of $\size b$ less than or equal to $a$:
 * $M := \set {k \in \Z: \exists x \in \Z: k = x \, \size b, k \le a}$

We have that:
 * $- \size a \, \size b \le - \size a \le a$

and so $M \ne \O$.

From Set of Integers Bounded Above by Integer has Greatest Element, $M$ has a greatest element $h \, \size b$.

Then $h \, \size b \le a$ and so:
 * $a = h \, \size b + r$

where $r \ge 0$.

On the other hand:
 * $\paren {h + 1} \, \size b = h \, \size b + \size b > h \, \size b$

So:
 * $\paren {h + 1} \, \size b > a$

and:
 * $h \, \size b + \size b > h \, \size b + r$

Thus:
 * $r \le b$

Setting:
 * $q = h$ when $b > 0$
 * $q = -h$ when $b < 0$

it follows that:
 * $h \, \size b = q b$

and so:
 * $a = q b + r$

as required.