1

I am reading this https://en.wikipedia.org/wiki/Peano_axioms#:~:text=The%20Peano%20axioms%20define%20the,0%20is%20a%20natural%20number.

They use S(x) for successor of x. Here, I just use x* to make it easier to see.

Proofing that commutative works for 0 is easy. 0+0=0

Say successor of x is x*

Proofing that commutative works if one of the thing we added is 1 is easy

x+1=x+0*=(x+0)*=x*

Is it the same with 1+x, well just use induction

Wanna show that 1+x*=1+x**

1+0=1, by peano axiom now assume 1+x=x* too Then 1+x*=(1+x)*=x** bingo....

Now, we want to proof that y+x=x+y for all x and y in natural number

We know it's true that y+x=x+y when both are 0. We know that it's true when one of them is either 0 or 1.

Now we want to show that

y*+x=x+y*

Then y*+x=?

Then what?

How do I show that y*+x = x+y*?

I suppose I can do x+y*=(x+y)*=(y+x)*=y+x*

Then what?

Should I show that x+y*=x*+y first? That is the star can move around in addition? How?

Curiously I can derive associativity first. And then use commutative when one of the things added is 1. But say I don't want something more elegant

What would be the solution?

Sample of similar questions Prove the commutativity property of addition of natural numbers by induction This doesn't work. It uses associativity and +1

I basically want to use only star and bracket operation. Successor and bracket.

user4951
  • 1,714

2 Answers2

2

The proof is by Induction, using the property $P(m)=(n+m=m+n)$.

For the base case, we need the Axiom for sum: $n+0=0$ and we have to prove a preliminary result: $n=0+n$.

[This, in turn, needs induction: base is $0+0=0$ and then, assuming $n=0+n$ we have $s(n)=s(0+n)=0+s(n)$, using axiom.]

Having $n+0=n$ and having proved $n=0+n$, using transitivity of $=$, we get: $n+0=0+n$.

The induction step is: if $n+m=m+n$, then $n+s(m)=s(m)+n$.

Also here we need some preliminary steps involving successor: $s(m)+n=s(m+n)$.

[We need induction againz. Base case is: $m+0=m$ by axiom, and thus $s(m+0)=s(m)$. But $s(m)+0=s(m)$ by axiom again, and thus by equality: $s(m)+0=s(m+0)$. The next step assumes $s(m)+n=s(m+n)$ and proves: $s(m)+s(n)=s(m+s(n))$. Using the hypotheses we have: $s(s(m)+n)=s(s(m+n))$ and then $s(s(m+n))=s(m+s(n))$ by axiom; but $s(m)+s(n)=s(s(m)+n)$ by axiom, and using the hypotheses: $s(m)+s(n)=s(s(m+n))$. Thus, by equality: $s(m)+s(n)=s(m+s(n))$.]

We have: $s(m)+n=s(m+n)$ and axiom: $n+s(m)=s(n+m)$; by induction hypothesis: $n+m=m+n$, we get $s(n+m)=s(m+n)$, and thus, by equality:

$n+s(m)=s(m)+n.$

Now we have proved $P(0)$ and $\forall m [P(m) \to P(s(m))]$ and we can conclude with $\forall m P(m)$, that is:

$\forall m (n+m=m+n)$.

By generalization: $\forall n \forall m (n+m=m+n)$.

  • How do you get this? s(m)+n=s(m+n) actually the peano axioms only define a+s(b) but never s(a)+b. The successor is defined on the right. – user4951 Nov 10 '23 at 09:38
  • That's where I am stuck actually. If I can show that a+s(b)=s(a)+b=s(a+b) I am golden. – user4951 Nov 10 '23 at 09:40
  • Obviously with associativity I can do (a+1)+b=a+(1+b). Proofing that 1+b=b+1=s(b) for all b is also not that hard. From that I can proof 2+b=s(s(b))=b+2 and continuing that I seem to be able to proof commutativity. But when I try to put actual letters things fall apart and I am confused. – user4951 Nov 10 '23 at 09:43
  • This part I understand n+s(m)=s(n+m). That's just definition of addition. s(m)+n=s(m+n)? s(m+n)=s(n+m)=n+s(m) the s is in the right. Not in the left. We want s(n+m)=s(m)+n

    How do we get that?

    – user4951 Nov 10 '23 at 09:48
  • 1
    @user4951: Let me spell it out for you. The induction predicate is $\forall x. s(x) + y = s(x + y)$. Base case: $\forall x. s(x) + 0 = s(x + 0)$. Since $\forall z. z + 0 = z$ is an axiom, this is immediate. Inductive case: assume $\forall x. s(x) + y = s(x + y)$. The goal is to show $\forall x. s(x) + s(y) = s(x + s(y))$. But you have $s(x) + s(y) = s(s(x) + y)$ by an axiom, $s(s(x) + y) = s(s(x+y))$ by the induction hypothesis, and $s(x+y) = x + s(y)$, so $s(s(x+y)) = s(x + s(y))$. Putting them together, $s(x) + s(y) = s(s(x) + y) = s(s(x+y)) = s(x + s(y))$, which was to be shown. – Z. A. K. Nov 10 '23 at 10:23
  • Can you add this to the answer. Okay I am checking. Interesting. – user4951 Nov 10 '23 at 10:39
  • Looks correct. Bingo.. Okay I will study this.

    So yea we need double s. That's the catch

    – user4951 Nov 10 '23 at 10:43
  • ∀x.s(x)+y=s(x+y) So this is like a lemma isn't it? Great – user4951 Nov 12 '23 at 09:04
  • @user4951 - correct. Sum is defined with 0 and successor "to the right". We have to show that using them "to the left" gives the same result. And this is commutativety. – Mauro ALLEGRANZA Nov 12 '23 at 10:22
  • Once I got that lemma I can proof commutativity easily. Very interesting. Wow. Most people proof associativity first. Selected as answer. Thanks – user4951 Nov 12 '23 at 13:16
0

According to this

Proving commutativity without associativity is either very difficult or impossible. You will still need some special case associativity.

Should I turn this into an answer? https://www.quora.com/How-do-you-prove-the-commutativity-of-addition-from-Peanos-axioms-without-first-proving-the-associativity-of-addition

With associativity I can prove that easily.

So it seems that associativity needs to be proven first and then commutativity.

Update:

@Mauro proof me wrong

user4951
  • 1,714