Division with remainder

156 Views Asked by At

I have proved the division with remainder theorem:

If a $\in \mathbb{Z}$ and $d \in \mathbb{N}$ then there exists unique numbers $q,r \in \mathbb{Z}$ such that $a=dq+r$ where $0\le r<d$.

I proved it by at first assuming that $a >d>0$ and then using the well-ordering principle to find the $q$ and $r$.

Now my question is how to prove it for $a\le 0$ from what I already have proved.

2

There are 2 best solutions below

3
On

Do it for $-a>0$. Then there are $q', r'$ such that

$$-a=q'd+r'$$

and $0\le r'<d$. Then we see that with $r=d-r'$ we have $a=(1-q')d+r$ and $0\le r < d$.

Setting $q=1-q'$, we get existence.

But since $q', r'$ are unique, so too are $q, r$ since they are uniquely determined by $q', r'$, so uniqueness follows.

1
On

For $a\le d$, choose some $s$ such that $a+ds>d$ (this is always possible).

Then applying the theorem with $a+ds$ instead of $a$, there exists unique numbers $p,r \in \mathbb{Z}$ such that $a+ds=dp+r$ where $0\le r<d$.

Setting $q=p-s$, we have $a=dq+r$ and $0\le r<d$.

$q$ is unique: if it were not, $p$ wouldn't be unique.