Constructing the ADD Function
Introduction
(Key F5 to view the highlights -- in DC Proof only)
Here is the beginning of a proof to construct the ADD function for the
natural numbers. It is the first installment of a series of proofs to
construct the real numbers from Peano's Axioms.
Required to Prove: As constructed below, prove that set add is a function.
We begin by constructing the set of orders triples of the natural numbers, n3.
Then we select a subset 'add' from n3. We want to prove that 'add' is a
function. Here, I have used proof by induction to show that
x
n & y
n => EXIST(z):[z
n & (x,y,z)
add]
To prove that 'add' is a function, you must also prove (by induction)
that
(x,y,z1)
add & (x,y,z2)
add => z1=z2
Then you will be able to conclude that
z=add(x,y) <=> (x,y,z)
add
Peano's axioms for the natural numbers (from Numbers menu)
1 Set(n)
& 1
n
& ALL(a):[a
n => next(a)
n]
& ALL(a):[a
n => ~next(a)=1]
& ALL(a):ALL(b):[a
n & b
n & next(a)=next(b) => a=b]
& ALL(a):[Set(a) & 1
a & ALL(b):[b
n & b
a => next(b)
a]
=> ALL(b):[b
n => b
a]]
Premise
Splitting...
2 Set(n)
Split, 1
3 1
n
Split, 1
4 ALL(a):[a
n => next(a)
n]
Split, 1
5 ALL(a):[a
n => ~next(a)=1]
Split, 1
6 ALL(a):ALL(b):[a
n & b
n & next(a)=next(b) => a=b]
Split, 1
7 ALL(a):[Set(a) & 1
a & ALL(b):[b
n & b
a => next(b)
a]
=> ALL(b):[b
n => b
a]]
Split, 1
Construct the set of ordered triples of natural numbers, n3
Applying the Cartesian Product rule...
8 ALL(a1):ALL(a2):ALL(a3):[Set(a1) & Set(a2) & Set(a3) => EXIST(b):[Set''(b) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
b <=> c1
a1 & c2
a2 & c3
a3]]]
Cart Prod
9 ALL(a2):ALL(a3):[Set(n) & Set(a2) & Set(a3) => EXIST(b):[Set''(b) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
b <=> c1
n & c2
a2 & c3
a3]]]
U Spec, 8
10 ALL(a3):[Set(n) & Set(n) & Set(a3) => EXIST(b):[Set''(b) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
b <=> c1
n & c2
n & c3
a3]]]
U Spec, 9
11 Set(n) & Set(n) & Set(n) => EXIST(b):[Set''(b) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
b <=> c1
n & c2
n & c3
n]]
U Spec, 10
12 Set(n) & Set(n)
Join, 2, 2
13 Set(n) & Set(n) & Set(n)
Join, 12, 2
14 EXIST(b):[Set''(b) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
b <=> c1
n & c2
n & c3
n]]
Detach, 11, 13
Define: n3, the set of ordered triples of natural numbers
15 Set''(n3) & ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
n3 <=> c1
n & c2
n & c3
n]
E Spec, 14
16 Set''(n3)
Split, 15
17 ALL(c1):ALL(c2):ALL(c3):[(c1,c2,c3)
n3 <=> c1
n & c2
n & c3
n]
Split, 15
Construct the add function, a subset of n3
Applying the Subset rule...
18 EXIST(s):[Set''(s) & ALL(a):ALL(b):ALL(c):[(a,b,c)
s
<=> (a,b,c)
n3 & [b=1 & next(a)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (a,b',c')
s & next(b')=b & next(c')=c]]]]
Subset, 16
Define: add, a subset of n3
19 Set''(add) & ALL(a):ALL(b):ALL(c):[(a,b,c)
add
<=> (a,b,c)
n3 & [b=1 & next(a)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (a,b',c')
add & next(b')=b & next(c')=c]]]
E Spec, 18
20 Set''(add)
Split, 19
21 ALL(a):ALL(b):ALL(c):[(a,b,c)
add
<=> (a,b,c)
n3 & [b=1 & next(a)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (a,b',c')
add & next(b')=b & next(c')=c]]]
Split, 19
Prove: Add is a function
Applying the definiton of functionality...
22 ALL(f):ALL(a1):ALL(a2):ALL(b):[Set''(f)
& Set(a1) & Set(a2) & Set(b)
& ALL(c1):ALL(c2):[c1
a1 & c2
a2 => EXIST(d):[d
b & (c1,c2,d)
f]]
& ALL(c1):ALL(c2):ALL(d1):ALL(d2):[c1
a1 & c2
a2 & d1
b & d2
b & (c1,c2,d1)
f & (c1,c2,d2)
f => d1=d2]
=> ALL(c1):ALL(c2):ALL(d):[c1
a1 & c2
a2 & d
b => [d=f(c1,c2) <=> (c1,c2,d)
f]]]
Function
23 ALL(a1):ALL(a2):ALL(b):[Set''(add)
& Set(a1) & Set(a2) & Set(b)
& ALL(c1):ALL(c2):[c1
a1 & c2
a2 => EXIST(d):[d
b & (c1,c2,d)
add]]
& ALL(c1):ALL(c2):ALL(d1):ALL(d2):[c1
a1 & c2
a2 & d1
b & d2
b & (c1,c2,d1)
add & (c1,c2,d2)
add => d1=d2]
=> ALL(c1):ALL(c2):ALL(d):[c1
a1 & c2
a2 & d
b => [d=add(c1,c2) <=> (c1,c2,d)
add]]]
U Spec, 22
24 ALL(a2):ALL(b):[Set''(add)
& Set(n) & Set(a2) & Set(b)
& ALL(c1):ALL(c2):[c1
n & c2
a2 => EXIST(d):[d
b & (c1,c2,d)
add]]
& ALL(c1):ALL(c2):ALL(d1):ALL(d2):[c1
n & c2
a2 & d1
b & d2
b & (c1,c2,d1)
add & (c1,c2,d2)
add => d1=d2]
=> ALL(c1):ALL(c2):ALL(d):[c1
n & c2
a2 & d
b => [d=add(c1,c2) <=> (c1,c2,d)
add]]]
U Spec, 23
25 ALL(b):[Set''(add)
& Set(n) & Set(n) & Set(b)
& ALL(c1):ALL(c2):[c1
n & c2
n => EXIST(d):[d
b & (c1,c2,d)
add]]
& ALL(c1):ALL(c2):ALL(d1):ALL(d2):[c1
n & c2
n & d1
b & d2
b & (c1,c2,d1)
add & (c1,c2,d2)
add => d1=d2]
=> ALL(c1):ALL(c2):ALL(d):[c1
n & c2
n & d
b => [d=add(c1,c2) <=> (c1,c2,d)
add]]]
U Spec, 24
Sufficient: For functionality of add
26 Set''(add)
& Set(n) & Set(n) & Set(n)
& ALL(c1):ALL(c2):[c1
n & c2
n => EXIST(d):[d
n & (c1,c2,d)
add]]
& ALL(c1):ALL(c2):ALL(d1):ALL(d2):[c1
n & c2
n & d1
n & d2
n & (c1,c2,d1)
add & (c1,c2,d2)
add => d1=d2]
=> ALL(c1):ALL(c2):ALL(d):[c1
n & c2
n & d
n => [d=add(c1,c2) <=> (c1,c2,d)
add]]
U Spec, 25
Prove: x
n => ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
Suppose...
27 x
n
Premise
Sufficient: For ALL(y):[y
n => EXIST(z):[d
n & (x,y,z)
add]]
Apply the Induction shortcut (on Numbers menu).
28 EXIST(z):[z
n & (x,1,z)
add]
& ALL(y):[y
n & EXIST(z):[z
n & (x,y,z)
add]
=> EXIST(z):[z
n & (x,next(y),z)
add]]
=> ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
Induction
Prove: (x,1,next(x))
add (the case for y=1)
Applying the definition add...
29 ALL(b):ALL(c):[(x,b,c)
add
<=> (x,b,c)
n3 & [b=1 & next(x)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=b & next(c')=c]]]
U Spec, 21
30 ALL(c):[(x,1,c)
add
<=> (x,1,c)
n3 & [1=1 & next(x)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=c]]]
U Spec, 29
31 (x,1,next(x))
add
<=> (x,1,next(x))
n3 & [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]]
U Spec, 30
32 [(x,1,next(x))
add => (x,1,next(x))
n3 & [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]]]
& [(x,1,next(x))
n3 & [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]] => (x,1,next(x))
add]
Iff-And, 31
33 (x,1,next(x))
add => (x,1,next(x))
n3 & [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]]
Split, 32
Sufficient: For (x,1,next(x))
add
34 (x,1,next(x))
n3 & [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]] => (x,1,next(x))
add
Split, 32
Prove: (x,1,next(x))
n3
Applying the definition of n3...
35 ALL(c2):ALL(c3):[(x,c2,c3)
n3 <=> x
n & c2
n & c3
n]
U Spec, 17
36 ALL(c3):[(x,1,c3)
n3 <=> x
n & 1
n & c3
n]
U Spec, 35
37 (x,1,next(x))
n3 <=> x
n & 1
n & next(x)
n
U Spec, 36
38 [(x,1,next(x))
n3 => x
n & 1
n & next(x)
n]
& [x
n & 1
n & next(x)
n => (x,1,next(x))
n3]
Iff-And, 37
39 (x,1,next(x))
n3 => x
n & 1
n & next(x)
n
Split, 38
Sufficient: For (x,1,next(x))
n3
40 x
n & 1
n & next(x)
n => (x,1,next(x))
n3
Split, 38
41 x
n => next(x)
n
U Spec, 4
42 next(x)
n
Detach, 41, 27
43 x
n & 1
n
Join, 27, 3
44 x
n & 1
n & next(x)
n
Join, 43, 42
As Required:
45 (x,1,next(x))
n3
Detach, 40, 44
Prove: 1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]
46 1=1
Reflex
47 next(x)=next(x)
Reflex
48 1=1 & next(x)=next(x)
Join, 46, 47
As Required:
49 1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]
Arb Or, 48
50 (x,1,next(x))
n3
& [1=1 & next(x)=next(x) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=1 & next(c')=next(x)]]
Join, 45, 49
51 (x,1,next(x))
add
Detach, 34, 50
52 next(x)
n & (x,1,next(x))
add
Join, 42, 51
As Required: The case for y=1
53 EXIST(z):[z
n & (x,1,z)
add]
E Gen, 52
Prove: y
n & EXIST(z):[z
n & (x,y,z)
add]
=> EXIST(z):[z
n & (x,next(y),z)
add]
The case for if true for y, then true for next(y) (y+1)
Suppose...
54 y
n & EXIST(z):[z
n & (x,y,z)
add]
Premise
55 y
n
Split, 54
56 EXIST(z):[z
n & (x,y,z)
add]
Split, 54
Define: z
57 z
n & (x,y,z)
add
E Spec, 56
58 z
n
Split, 57
59 (x,y,z)
add
Split, 57
Prove: (x,next(y),next(z))
add
Applying the definition of add...
60 ALL(b):ALL(c):[(x,b,c)
add
<=> (x,b,c)
n3 & [b=1 & next(x)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=b & next(c')=c]]]
U Spec, 21
61 ALL(c):[(x,next(y),c)
add
<=> (x,next(y),c)
n3 & [next(y)=1 & next(x)=c | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=c]]]
U Spec, 60
62 (x,next(y),next(z))
add
<=> (x,next(y),next(z))
n3 & [next(y)=1 & next(x)=next(z) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=next(z)]]
U Spec, 61
63 [(x,next(y),next(z))
add => (x,next(y),next(z))
n3 & [next(y)=1 & next(x)=next(z) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=next(z)]]]
& [(x,next(y),next(z))
n3 & [next(y)=1 & next(x)=next(z) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=next(z)]] => (x,next(y),next(z))
add]
Iff-And, 62
64 (x,next(y),next(z))
add => (x,next(y),next(z))
n3 & [next(y)=1 & next(x)=next(z) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=next(z)]]
Split, 63
Sufficient: For (x,next(y),next(z))
add
65 (x,next(y),next(z))
n3 & [next(y)=1 & next(x)=next(z) | EXIST(b'):EXIST(c'):[b'
n & c'
n & (x,b',c')
add & next(b')=next(y) & next(c')=next(z)]] => (x,next(y),next(z))
add
Split, 63
Prove: (x,next(y),next(z))
n3
Applying the definition of n3...
66 ALL(c2):ALL(c3):[(x,c2,c3)
n3 <=> x
n & c2
n & c3
n]
U Spec, 17
67 ALL(c3):[(x,next(y),c3)
n3 <=> x
n & next(y)
n & c3
n]
U Spec, 66
68 (x,next(y),next(z))
n3 <=> x
n & next(y)
n & next(z)
n
U Spec, 67
69 [(x,next(y),next(z))
n3 => x
n & next(y)
n & next(z)
n]
& [x
n & next(y)
n & next(z)
n => (x,next(y),next(z))
n3]
Iff-And, 68
70 (x,next(y),next(z))
n3 => x
n & next(y)
n & next(z)
n
Split, 69
Sufficient: For (x,next(y),next(z))
n3
71 x
n & next(y)
n & next(z)
n => (x,next(y),next(z))
n3
Split, 69
72 y
n => next(y)
n
U Spec, 4
73 next(y)
n
Detach, 72, 55
74 z
n => next(z)
n
U Spec, 4
75 next(z)
n
Detach, 74, 58
76 x
n & next(y)
n
Join, 27, 73
77 x
n & next(y)
n & next(z)
n
Join, 76, 75
As Required:
78 (x,next(y),next(z))
n3
Detach, 71, 77
Prove: EXIST(b):EXIST(c):[b
n & c
n & (x,b,c)
add & next(b)=next(y) & next(c)=next(z)]
79 next(y)=next(y)
Reflex
80 next(z)=next(z)
Reflex
81 y
n & z
n
Join, 55, 58
82 y
n & z
n & (x,y,z)
add
Join, 81, 59
83 y
n & z
n & (x,y,z)
add & next(y)=next(y)
Join, 82, 79
84 y
n & z
n & (x,y,z)
add & next(y)=next(y)
& next(z)=next(z)
Join, 83, 80
85 EXIST(c):[y
n & c
n & (x,y,c)
add & next(y)=next(y)
& next(c)=next(z)]
E Gen, 84
As Required:
86 EXIST(b):EXIST(c):[b
n & c
n & (x,b,c)
add & next(b)=next(y)
& next(c)=next(z)]
E Gen, 85
87 next(y)=1 & next(x)=next(z) | EXIST(b):EXIST(c):[b
n & c
n & (x,b,c)
add & next(b)=next(y)
& next(c)=next(z)]
Arb Or, 86
88 (x,next(y),next(z))
n3
& [next(y)=1 & next(x)=next(z) | EXIST(b):EXIST(c):[b
n & c
n & (x,b,c)
add & next(b)=next(y)
& next(c)=next(z)]]
Join, 78, 87
As Required:
89 (x,next(y),next(z))
add
Detach, 65, 88
90 next(z)
n & (x,next(y),next(z))
add
Join, 75, 89
91 EXIST(c):[c
n & (x,next(y),c)
add]
E Gen, 90
As Required:
The case for if true for y, then true for next(y) (y+1)
92 y
n & EXIST(z):[z
n & (x,y,z)
add]
=> EXIST(c):[c
n & (x,next(y),c)
add]
Conclusion, 54
Generalizing...
93 ALL(y):[y
n & EXIST(z):[z
n & (x,y,z)
add]
=> EXIST(c):[c
n & (x,next(y),c)
add]]
U Gen, 92
94 EXIST(z):[z
n & (x,1,z)
add]
& ALL(y):[y
n & EXIST(z):[z
n & (x,y,z)
add]
=> EXIST(c):[c
n & (x,next(y),c)
add]]
Join, 53, 93
By induction...
95 ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
Detach, 28, 94
As Required:
96 x
n => ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
Conclusion, 27
97 ALL(x):[x
n => ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]]
U Gen, 96
Prove: x
n & y
n => EXIST(z):[z
n & (x,y,z)
add]
Suppose...
98 x
n & y
n
Premise
99 x
n
Split, 98
100 y
n
Split, 98
101 x
n => ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
U Spec, 97
102 ALL(y):[y
n => EXIST(z):[z
n & (x,y,z)
add]]
Detach, 101, 99
103 y
n => EXIST(z):[z
n & (x,y,z)
add]
U Spec, 102
104 EXIST(z):[z
n & (x,y,z)
add]
Detach, 103, 100
As Required:
105 x
n & y
n => EXIST(z):[z
n & (x,y,z)
add]
Conclusion, 98
Generalizing...
106 ALL(y):[x
n & y
n => EXIST(z):[z
n & (x,y,z)
add]]
U Gen, 105
As Required:
For all natural numbers x and y, there exists a natural number z such that
(x,y,z)
add.
107 ALL(x):ALL(y):[x
n & y
n => EXIST(z):[z
n & (x,y,z)
add]]
U Gen, 106