- #1
HMPARTICLE
- 95
- 0
Homework Statement
For any natural numbers a,b,c, we have (a+b) + c = a + (b + c)
Homework Equations
Definition 2.2.1
Let m be a natural number. To add zero to m, we define 0 + m := m. Now suppose inductively that we have defined how to add n to m. Them we can add n++ to m by defining (n++) + m := (n + m)++.
Lemma 2.2.2
For any natural number n, n + 0 = n.
Lemma 2.2.3
For any natural numbers n and m , n + (m++) = (n+m)++
The Attempt at a Solution
We shall use induction on (a+b)
First we do the base case, c = 0.
By the definition of addition 0 + (a+b) = (a+b), while by lemma 2.2.2 (a+b) + 0 = (a+b). Thus the base case is done. Now suppose inductively that c + (a+b) = (a+b) + c, Now to we have to prove that c++ + (a+b) = (a+b) + c++ to close the induction.
By the definition of addition, c++ + (a+b) = (a+b+c)++ and while by lemma 2.2.3 (a+b) + c++ = (a+b+c)++. This is equal to (a+b+c)++ by the inductive hypothesis c + (a+b) = (a+b) + c. Thus c++ + (a+b) = (a+b) + c++ . Also suppose inductively that a + (b+c) = (b+c) + a.
Now to we have to prove that a++ + (b+c) = (b+c) + a++ to close the induction.
By the definition of addition, a++ + (b+c) = (a+b+c)++ and while by lemma 2.2.3 (b+c) + a++ = (a+b+c)++. This is equal to (a+b+c)++ by the inductive hypothesis a + (b+c) = (b+c) + a. Thus a++ + (b+c) = (b+c) + a++.
so (a+b) + c++ = (a+b+c)++ and (b+c) + a++ = (a+b+c)++
Hence
(a+b) + c = a + (b + c)
----------------------------------------------------------
Now is this a correct proof? if so, is it a decent one. It seems to make sense to me.