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.
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.