number-theorypedantic

Created 25 Jul 2023

Discovering Division

tl;dr: A journey from the ground up in which we use axioms to build a proof that every positive integer can be uniquely prime factored.

This is part 2, where we use the rigorous foundation we developed in part 1 to establish the division algorithm. In general, the level of rigor will decrease as the parts go on, so that the reader doesn't get bored to death. But it should be obvious how to fill out everything with complete rigor. Here is a glossary of math symbols.

Back to School

Children tend to get taught division as repeated subtraction - for example, 14 divided by 3 is 4 remainder 2, because:

143=1114 - 3 = 11

113=811 - 3 = 8

83=58 - 3 = 5

53=25 - 3 = 2

And we stop because if we subtract again, the remainder becomes negative. In particular, 2<3, and in general the remainder is always less than the divisor, because if it was at least as big then we could always subtract off another copy.

That would definitely be enough justification to any high schooler as to why the division algorithm works.1 But, how do we prove it from our axioms and lemmas that we've developed so far? How do we make infinite descent rigorous?

Let's first formalize the statement we want to prove:

Theorem. (Divison Algorithm)

For any aZ,bNa \in \mathbb{Z}, b \in \mathbb{N}, there exist integers q,rq,r such that a=bq+ra = bq + r, and 0r<b0 \leq r \lt b.

Now... how do we attempt a proof?

The key is the well-ordering principle that we introduced, stating that every non-empty subset of the naturals has a least element.

To use this, we can consider the set of all possible remainders, i.e. all the possible numbers we can obtain by starting with aa and adding or subtracting bb. Then we can consider those remainders that are natural, and take the smallest element. If it's at least bb, then we can subtract bb again to get a smaller element of the set, contradiction. In other words, "choose the smallest possible remainder, if it's at least bb then subtract bb". Do you see how this is equivalent to the infinite descent argument?

Proof. (of the Division Algorithm)

Let aa be a fixed integer and bb be a fixed natural. Consider the set:

S={nNn=abq+1,qZ}S = \{n \in \mathbb{N} \mid n = a - bq + 1, q \in \mathbb{Z}\}

Then S is a subset of the naturals. Furthermore, it is nonempty, because:

  • if aNa \in \mathbb{N} or a=0a=0, then when q=0q=0, n=ab0+1=a+1n = a - b \cdot 0 + 1 = a+1 which is natural and so it is an element of S.

  • if aN-a \in \mathbb{N}, then when q=aq = -a, n=ab(a)+1n = a-b(-a) + 1 =(a)(b1)+1 = (-a)(b-1) + 1 which is natural since (a),(b1)(-a), (b-1) are nonnegative, and so it is an element of S.

By Trichotomy, we considered all cases, thus S is always non-empty.

Hence by the well-ordering principle, S has a least element (say ee), occuring when q=q0q = q_0, so that e=abq0+1e = a - bq_0+1.

Claim.

ebe \leq b

Proof.

Suppose not, we will show a contradiction.

Then e>be\gt b, so ebNe-b \in \mathbb{N} (defn. ">\gt").

But eb=(abq0+1)be-b = (a-bq_0+1)-b =ab(q0+1)+1 = a-b(q_0+1)+1, and so ebSe-b \in S. But eb<ee-b \lt e, contradicting the minimality of ee.

Now at last, letting r=e1r = e-1, we have a=bq0+ra = bq_0 + r (since e=abq0+1e = a-bq_0+1). Since 0<eb0 \lt e \leq b, we have 0r<b0 \leq r \lt b, which is what we wanted, and we are done.

Note that I stopped writing the multiply symbol in between two letters, as per normal convention. Also, I stopped being as rigorous as in part 1 (for example writing "abq+1a-bq+1" instead of "(abq)+1(a-bq)+1" due to associativity), because I don't think anyone would want to read such a long tedious proof. BUT, it should be clear (if not monotonous) how to fill out this proof into one as rigorous as in part 1.

And that's it! We've now proved the division algorithm. High schoolers would be very impressed (not).


  1. Can you come up with an analogous division algorithm for the complex numbers? Can you prove that it works?