Examples
The two theorems just seen are among the most powerful in this book. They allow one to construct all the basic algebraic and order structure of N:
- Addition: In RecDef0, let X be N, x be any natural and φ be the successor function S itself. Then, the theorem says that to every such x as above, there corresponds a unique function Ax:N→N such that Ax(0)=x and Ax(S(y))=S(Ax(y)). Now, simply define the infix-function +:N×N→N to be x+y=Ax(y) for any x,y∈N. Using this function, the conditions Ax(0)=x and Ax(S(y))=S(Ax(y)) become x+0=x and x+S(y)=S(x+y) respectively. Also, using the fact that S maps equals to equals, it is easy to see that x+S(0)=S(x+0)=S(x). Denoting S(0) as 1, this becomes x+1=S(x).
- Multiplication: In RecDef1, choose N, 0 and addition (+) to be the raw materials for constructing multiplication. Then, the theorem says that to every x∈N there corresponds a unique function Mx:N→N such that Mx(0)=0 and Mx(S(y))=Mx(y)+x. Now, define the infix-function ⋅:N×N→N as x⋅y=Mx(y) for every x,y∈N. Hence, x⋅0=0 and x⋅(y+1)=x⋅y+x (assuming ⋅ has higher precedence than + i.e. x⋅y+x=(x⋅y)+x).
- Exponentiation: In RecDef1, choose N, S(0) and multiplication (⋅) as inputs. Then, to every x∈N one gets a unique function Ex:N→N such that Ex(0)=S(0) and Ex(S(y))=Ex(y)⋅x. Now, define the placeholder-function □□:N×N→N as xy=Ex(y) for every x,y∈N. Hence, x0=1 and xy+1=xy⋅x (assuming □□ has higher precedence than ⋅).
- Factorial: In RecDef1, choose N, S(0) and the placeholder-function □⋅S(□):N×N∋(n,n′)↦n⋅S(n′)∈N as inputs. Then, one has a unique postfix-function !:N→N such that 0!=S(0) and S(y)!=y!⋅S(y).
- Canonical Order: The order that I am about to define comes about as a by-product of addition. Concretely, define the N-relation (i.e. subset of N×N), ≤, thus: (x,y)∈ ≤ iff ∃n∈N [x+n=y]. One often writes (x,y)∈ ≤ in infix-form: x≤y. One can see that this order is at least reflexive: x≤x since x+0=x. Verifying the other two properties of a partial order must wait.
- Order of Divisibility: I can also define an analogous order on the naturals based on multiplication. For this, define the N-relation, ∣ , thus: (x,y)∈ ∣ iff ∃n∈N [x⋅n=y]. One often writes (x,y)∈ ∣ in infix-form: x ∣ y where x is called a factor of y while y is called a multiple of x. Just like previous order, this is a partial order. However, verification of this fact must wait.
- The Family of Sets Fin: In RecDef1, choose PN, ∅ and the infix-function ⊕:PN×N∋(Σ,n)↦Σ∪{n}∈PN as inputs. Then, one gets a unique function Fin:N→PN such that Fin(0)=∅ and Fin(S(n))=Fin(n)⊕n. Later, I show that Fin(n) is precisely the set of all naturals strictly less than n.