[Math] Prove addition is commutative using axioms, definitions, and induction

axiomsnatural numberspeano-axiomsproof-verificationreal-analysis

I wanted to try to prove the commutative property of addition before reading too much about it and "spoiling" things for myself. So I am curious how close I got.

First, some axioms (statements/relationships we take to be true):

$$\begin{align}
0 &\in \mathbb{N} \tag{$0$ is a natural number} \\
\forall a \in \mathbb{N}, (a &= a) \tag{reflexivity of equality} \\
\forall a,b \in \mathbb{N}, ((a=b) &\implies (b=a)) \tag{symmetry of equality} \\
\forall a,b,c \in \mathbb{N}, ((a=b) \land (b=c) &\implies (a=c)) \tag{transitivity of equality} \\
\forall a \in \mathbb{N}, (S(a) &\in \mathbb{N}) \tag{successors are naturals} \\
\forall a,b \in \mathbb{N}, ((S(a)=S(b)) &\implies (a=b)) \tag{???} \\
\forall a \in \mathbb{N}, (0 &\neq S(a)) \tag{$0$ is not a successor}
\end{align}$$

And some definitions (or are these also axioms? I can't really tell how you prove $a + 0 = a$ but I digress…):

$$\begin{align}
1 &= S(0) \tag{1 is the successor of 0} \\
a + 0 &= a \tag{additive identity} \\
a + S(b) &= S(a + b) \tag{addition of naturals}
\end{align}$$

where $S(a)$ is the successor function. I don't know a good way to describe that function but I can use the equality relations with the definition of addition, the additive identity, and the definition of $1$ to show that:

$$a + 1 = a + S(0) = S(a + 0) = S(a)$$

This lets us use $S(a) = a + 1$. Now I want to prove $0 + a = a$ (the other order of the additive identity):

Base case: When $a=0$, the additive identity says that $0 + 0 = 0$ is true, so we can write $0 + a = a$ as well.

Inductive step: Suppose $0 + a = a$. Then $0 + S(a) = S(0 + a) = S(a)$ and we are done.

Now I want to prove that $a + 1 = 1 + a$.

Base case: $0 + 1 = 1 + 0$ is true since $0 + a = a = a + 0$.

Inductive step: Suppose $a + 1 = 1 + a$. Then $a + S(1) = S(a + 1) = S(1 + a) = 1 + S(a)$ and we are done.

Next, I want to prove that $(a+b)+c = a+(b+c)$.

Base case: $(a+b)+0 = a + b = a + (b+0)$. Both of these follow from the additive identity.

Inductive step: Suppose $(a+b)+c = a+(b+c)$. Then $(a+b)+S(c) = S((a+b)+c) = S(a+(b+c)) = a + S(b+c) = a + (b + S(c))$, and we are done.

Finally, I want to prove that $a + b = b + a$.

Base case: We have $a + 1 = 1 + a$ as true, since we just proved it.

Inductive step: Suppose $a+b = b+a$. Then $a+S(b) = S(a + b) = S(b + a) = b + S(a) = b + (a + 1) = b + (1 + a) = (b + 1) + a = S(b) + a$. We also have $(b+1)+a = (1+b)+a = 1+(b+a) = 1+(a+b) = (1+a)+b = S(a) + b$. And we are done.

Did I use axioms and definitions and induction correctly to eventually prove that addition is commutative?

Best Answer

  • You didn't list an induction principle in your axioms, which means no proof involving induction can result from them. Because of this lack of induction, the set of axioms you listed is slightly weaker than Robinson arithmetic. In fact, commutativity of addition is not provable in this arithmetic.

  • There's no reason to prove $a+1=1+a$ in particular when your natural numbers begin with $0$.

  • Your proof of commutativity is incomplete—you needed to show $a+S(b)=S(b)+a$ in your inductive step, but you only showed $a+S(b)=b+S(a)$.