IUM lectures on Numbers

2.4. Definition of addition

Recall the set-up: a is a fixed natural number, and we want to define the function which sends x to a+x. By "That's it", here's what we have to do:

  1. Define a+0;

  2. If we have already defined a+n, we must define a+S(n).

We want addition to agree with our real world intuition, so let's make the following definition:

Definition 4 (Addition)

  • Define a+0 to be a.

  • If a+n is already defined to be y, then define a+S(n) to be S(y). In other words, a+S(n) is defined to be S(a+n).

def add : ℕ → ℕ → ℕ | a, 0 => a | a, succ n => succ (add a n)

"That's it" ensures that this is a valid definition. The logic in the successor case is that a+S(n) is a and n and one more, so it's the number after a+n.

Let's now prove that 1+1=2.

Theorem 5

1+1=2.

Proof

\begin{align*} 1+1&=1+S(0) &&\mathrm{(by\ definition\ of\ 1)}\\ &=S(1+0) &&\mathrm{(by\ definition\ of\ }a+S(n))\\ &=S(1) &&\mathrm{(by\ definition\ of\ }a+0)\\ &=2 &&\mathrm{(by\ definition\ of\ }2). \end{align*}

Exercise. Prove that 2+2=4.

Now we have defined addition, the equation S(x)=x+1 finally makes sense. Let's prove that it is true.

Lemma 6

If x is a natural number then S(x)=x+1.

Proof

\begin{align*} x+1&=x+S(0)&& \mathrm{(by\ definition\ of\ 1)}\\ &=S(x+0)&& \mathrm{(by\ definition\ of\ }+)\\ &=S(x)&& \mathrm{(by\ definition\ of\ }+). \end{align*}