Proof
In the case where a, b > 0, the proof is roughly as follows. Find the greatest multiple qb of b that is less than or equal to a; this can be accomplished by starting with q = 0 and increasing q by 1 until a - (q + 1)b < 0. Then r = a - qb.
If a < b, then we set q = 0 and r = a.
If a
b, then by the induction hypothesis there exist integers
q' and r' (with 0
r' < b) such that
Thus,
Apparently, q = q' + 1 and r = r' satisfy the conditions of the theorem in this case.
If a < 0, then by the above there are q' and r' with |a| = q'b + r'. But then
So
satisfy the conditions of the theorem.
 
By subtracting these equalities we get
Now it follows that the multiple (q' - q)b of b satisfies
This can
only happen if q' - q = 0. In other words
q = q'. Now it also follows that r = r'.