Peano arithmetic

Addition

Definition

Let’s add another function: addition. Defined by:

\(\forall a \in \mathbb{N} (a+0=a)\)

\(\forall a b \in \mathbb{N} (a+s(b)=s(a+b))\)

That is, adding zero to a number doesn’t change it, and \((a+b)+1=a+(b+1)\).

Example

Let’s use this to solve \(1+2\):

\(1+2=1+s(1)\)

\(1+s(1)=s(1+1)\)

\(s(1+1)=s(1+s(0))\)

\(s(1+s(0))=s(s(1+0))\)

\(s(s(1+0))=s(s(1))\)

\(s(s(1))=s(2)\)

\(s(2)=3\)

\(1+2=3\)

All addition can be done iteratively like this.

Commutative property of addition

Addition is commutative:

\(x+y=y+x\)

Associative property of addition

Addition is associative:

\(x+(y+z)=(x+y)+z\)

Multiplication

Multiplication of natural numbers

Definition

Multiplication can be defined by:

\(\forall a \in \mathbb{N} (a.0=0)\)

\(\forall a b \in \mathbb{N} (a.s(b)=a.b+a)\)

Example

Let’s calculate \(2.2\).

\(2.2=2.s(1)\)

\(2.s(1)=2.1+2\)

\(2.1+2=2.s(0)+2\)

\(2.s(0)+2=2.0+2+2\)

\(2.0+2+2=2+2\)

\(2+2=4\)

Commutative property of multiplication

Multiplication is commutative:

\(xy=yx\)

Associative property of multiplication

Multiplication is associative:

\(x(yz)=(xy)z\)

Distributive property of multiplication

Multiplication is distributive over addition:

\(a(b+c)=ab+ac\)

\((a+b)c=ac+bc\)