Professional Documents
Culture Documents
Sommer 2006
Sommer 2006
1 / 36
Sommer 2006
2 / 36
Sommer 2006
2 / 36
Sommer 2006
2 / 36
Sommer 2006
2 / 36
Sommer 2006
3 / 36
Sommer 2006
3 / 36
Sommer 2006
3 / 36
Sommer 2006
3 / 36
Sommer 2006
4 / 36
Sommer 2006
4 / 36
Class Terms
We will use for any formula (x ) the syntactical construct {x | (x )}, called a class term. Intuitively {x | (x )} is the collection of all sets a satisfying the formula (a).
Sommer 2006
5 / 36
Class Terms
We will use for any formula (x ) the syntactical construct {x | (x )}, called a class term. Intuitively {x | (x )} is the collection of all sets a satisfying the formula (a). Elimination of class terms:
Sommer 2006
5 / 36
Class Terms
We will use for any formula (x ) the syntactical construct {x | (x )}, called a class term. Intuitively {x | (x )} is the collection of all sets a satisfying the formula (a). Elimination of class terms: y {x | (x )} is replaced by (y )
Sommer 2006
5 / 36
Class Terms
We will use for any formula (x ) the syntactical construct {x | (x )}, called a class term. Intuitively {x | (x )} is the collection of all sets a satisfying the formula (a). Elimination of class terms: y {x | (x )} {x | (x )} y is replaced by is replaced by (y ) u (u y z (z u (z )))
Sommer 2006
5 / 36
Class Terms
We will use for any formula (x ) the syntactical construct {x | (x )}, called a class term. Intuitively {x | (x )} is the collection of all sets a satisfying the formula (a). Elimination of class terms: y {x | (x )} {x | (x )} y {x | (x )} {y | (y )} is replaced by is replaced by is replaced by (y ) u (u y z (z u (z ))) u ( (u ) z (z u (z )))
Sommer 2006
5 / 36
Sommer 2006
6 / 36
Counterexample
Sommer 2006
6 / 36
Counterexample
Assume {x | x x } is a set c , then we obtain
Sommer 2006
6 / 36
Counterexample
Assume {x | x x } is a set c , then we obtain c c c c
Sommer 2006
6 / 36
= {x | x = x }
Sommer 2006
7 / 36
= {x | x = x } {a , b } = {x | x = a x = b }
Sommer 2006
7 / 36
= {x | x = x } {a , b } = {x | x = a x = b } {a} = {a , a }
Sommer 2006
7 / 36
{a , b } {a} a, b
= = = =
{x | x = x } {x | x = a x = b } {a , a } {{a}, {a, b }}
Sommer 2006
7 / 36
{a , b } {a} a, b
= = = =
{x | x = x } {x | x = a x = b } {a , a } {{a}, {a, b }}
Sommer 2006
7 / 36
Existence Claims
x (x = )
Sommer 2006
8 / 36
Existence Claims
x (x = ) x , y z (z = {x , y })
Sommer 2006
8 / 36
Existence Claims
x (x = ) x , y z (z = {x , y }) x z (z = {x })
Sommer 2006
8 / 36
Existence Claims
x (x = ) x , y z (z = {x , y }) x z (z = {x }) x , y z (z = x , y )
Sommer 2006
8 / 36
Sommer 2006
9 / 36
Sommer 2006
9 / 36
Sommer 2006
9 / 36
Sommer 2006
9 / 36
Sommer 2006
9 / 36
Sommer 2006
10 / 36
Sommer 2006
10 / 36
Sommer 2006
10 / 36
Sommer 2006
10 / 36
Sommer 2006
11 / 36
Sommer 2006
11 / 36
Sommer 2006
11 / 36
Sommer 2006
11 / 36
Ordered Pairs
x1 , x2 , y1 , y2 (
x1 , x2 = y1 , y2 x1 = y1 x2 = y2
Sommer 2006
12 / 36
Sommer 2006
13 / 36
Sommer 2006
13 / 36
Sommer 2006
13 / 36
Sommer 2006
13 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence
Sommer 2006
14 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a
Sommer 2006
14 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a of the set of all functions from a to b
Sommer 2006
14 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a of the set of all functions from a to b i.e.
Sommer 2006
14 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a of the set of all functions from a to b i.e. x y z (z y rel (z , x ))
Sommer 2006
14 / 36
Existence Proofs
From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a of the set of all functions from a to b i.e. x y z (z y rel (z , x )) u , w y z (z y func (z , u , w ))
Sommer 2006
14 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a}
Sommer 2006
15 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a} We want to dene the set of natural numbers N as {, + , ++ , . . .}
Sommer 2006
15 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a} We want to dene the set of natural numbers N as {, + , ++ , . . .}
0=
Sommer 2006
15 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a} We want to dene the set of natural numbers N as {, + , ++ , . . .}
0= 1 = + = {}
Sommer 2006
15 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a} We want to dene the set of natural numbers N as {, + , ++ , . . .}
0= 1 = + = {} 2 = 1+ = {, {}}
Sommer 2006
15 / 36
Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a} We want to dene the set of natural numbers N as {, + , ++ , . . .}
Sommer 2006
15 / 36
Formal Denition of N
Ded (a) 0 a x (x a x + a)
Sommer 2006
16 / 36
Formal Denition of N
Ded (a) 0 a x (x a x + a)
Sommer 2006
16 / 36
Formal Denition of N
Ded (a) 0 a x (x a x + a)
N=
{a | Ded (a)}
Sommer 2006
16 / 36
Peanos Axioms
0 N.
Sommer 2006
17 / 36
Peanos Axioms
0 N. If n N then n+ N.
Sommer 2006
17 / 36
Peanos Axioms
Sommer 2006
17 / 36
Peanos Axioms
Sommer 2006
17 / 36
Peanos Axioms
Sommer 2006
17 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m).
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}.
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}. Thus we must have
1
m n {n}, i.e. n = m or m n.
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}. Thus we must have
1 2
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}. Thus we must have
1 2
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}. Thus we must have
1 2
The foundation axiom, A2, y (y x ) y (y x z (z x z y )), instantiated for x = {n, m} yields y (y {n, m} z (z {n, m} z y )).
Sommer 2006
18 / 36
Proof of Axiom 4
n, m(n N m N n+ = m+ n = m). By Denition n+ = m+ is equivalent to n {n} = m {m}. Thus we must have
1 2
The foundation axiom, A2, y (y x ) y (y x z (z x z y )), instantiated for x = {n, m} yields y (y {n, m} z (z {n, m} z y )). Thus n m or m n.
Prof. P.H. Schmitt Formal Specification and Verification Sommer 2006 18 / 36
Sommer 2006
19 / 36
Sommer 2006
19 / 36
Sommer 2006
19 / 36
Sommer 2006
19 / 36
Sommer 2006
19 / 36
Sommer 2006
19 / 36
Transitive Sets
Denition A set a is called transitive if the -relation restricted to a is a transitive relation. In symbols trans (a) x (x a x a)
Sommer 2006
20 / 36
Transitive Sets
Denition A set a is called transitive if the -relation restricted to a is a transitive relation. In symbols trans (a) x (x a x a)
Sommer 2006
20 / 36
Transitive Sets
Denition A set a is called transitive if the -relation restricted to a is a transitive relation. In symbols trans (a) x (x a x a)
N is transitive.
Sommer 2006
20 / 36
By induction.
Sommer 2006
21 / 36
Sommer 2006
21 / 36
By induction. The empty set 0 is transitive by denition. Assume n is transitive and consider x n+ = n {n} with the aim to show x n+ .
Sommer 2006
21 / 36
By induction. The empty set 0 is transitive by denition. Assume n is transitive and consider x n+ = n {n} with the aim to show x n+ . If x n then by hypothesis x n n+ .
Sommer 2006
21 / 36
By induction. The empty set 0 is transitive by denition. Assume n is transitive and consider x n+ = n {n} with the aim to show x n+ . If x n then by hypothesis x n n+ . If x = n, then by denition x n+ .
Sommer 2006
21 / 36
N is transitive
Sommer 2006
22 / 36
N is transitive
Sommer 2006
22 / 36
N is transitive
Prove n(n N n N) by induction. For n = 0 this is clear. If n N and by induction hypothesis n N then also n+ = n {n} N.
Sommer 2006
22 / 36
Sommer 2006
23 / 36
Sommer 2006
23 / 36
Sommer 2006
23 / 36
Sommer 2006
23 / 36
Sommer 2006
23 / 36
Sommer 2006
23 / 36
Sommer 2006
24 / 36
The <-relation on N coincides with the -relation. Any natural number n is the set of all its predecessors, i.e. n = {m | m < n }.
Sommer 2006
24 / 36
Let F be a function satisfying ran(F ) dom(F ) and let u be an element in dom(F ). Then there exists exactly one function f satisfying
1
dom(f ) = N,
Sommer 2006
25 / 36
Let F be a function satisfying ran(F ) dom(F ) and let u be an element in dom(F ). Then there exists exactly one function f satisfying
1 2
dom(f ) = N, f (0) = u ,
Sommer 2006
25 / 36
Let F be a function satisfying ran(F ) dom(F ) and let u be an element in dom(F ). Then there exists exactly one function f satisfying
1 2 3
Sommer 2006
25 / 36
Let F be a function satisfying ran(F ) dom(F ) and let u be an element in dom(F ). Then there exists exactly one function f satisfying
1 2 3
Sommer 2006
25 / 36
Let F be a function satisfying ran(F ) dom(F ) and let u be an element in dom(F ). Then there exists exactly one function f satisfying
1 2 3
The assumptions ran(F ) dom(F ) and u dom(F ) are needed to make sure that all function applications of F are dened.
Sommer 2006
25 / 36
Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem.
Sommer 2006
26 / 36
Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem. Set x = {y N | f (y ) = g (y )}
Sommer 2006
26 / 36
Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem. Set x = {y N | f (y ) = g (y )} Since f (0) = g (0) = u we get 0 x
Sommer 2006
26 / 36
Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem. Set x = {y N | f (y ) = g (y )} Since f (0) = g (0) = u we get 0 x n x implies n+ x since f (n+ ) = F (f (n)) = F (g (n)) = g (n+ )
Sommer 2006
26 / 36
Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem. Set x = {y N | f (y ) = g (y )} Since f (0) = g (0) = u we get 0 x n x implies n+ x since f (n+ ) = F (f (n)) = F (g (n)) = g (n+ ) Thus by the last Peano axiom induction axiom, we get x =N i.e. f = g .
Sommer 2006
26 / 36
Sommer 2006
27 / 36
Idea H = {h | func (h) h(0) = u n(n = 0 dom(h) = n m(m+ n h(m+ ) = F (h(m))))} and f = H
Sommer 2006
27 / 36
Sommer 2006
28 / 36
Sommer 2006
28 / 36
Sommer 2006
28 / 36
In order to make the idea work we have to show: H is a set. dom(f ) = N f is a function
Sommer 2006
28 / 36
In order to make the idea work we have to show: H is a set. dom(f ) = N f is a function f (0) = u
Sommer 2006
28 / 36
In order to make the idea work we have to show: H is a set. dom(f ) = N f is a function f (0) = u f (n+ ) = F (f (n)) for all n
Sommer 2006
28 / 36
Addition
of natural numbers
for every m N there is a unique function addm such that addm (0) = m + addm (n ) = (addm (n))+
Sommer 2006
29 / 36
Addition
of natural numbers
for every m N there is a unique function addm such that addm (0) = m + addm (n ) = (addm (n))+ Apply the recursion theorem with u = m and F (x ) = x +
Sommer 2006
29 / 36
Multiplication
of natural numbers
for every m N there is a unique function multm such that multm (0) = 0 + multm (n ) = addm (multm (n))
Sommer 2006
30 / 36
Multiplication
of natural numbers
for every m N there is a unique function multm such that multm (0) = 0 + multm (n ) = addm (multm (n)) Apply the recursion theorem with u = 0 and Fm (x ) = addm (x ).
Sommer 2006
30 / 36
The Integers
Sommer 2006
31 / 36
The Integers
The idea is to reconstruct an integer z as a pair m, n of natural numbers with z =mn . Since 5, 7 and 8, 10 would both represent the same number, we have to use equivalence classes of ordered pairs instead of pairs themselves.
Sommer 2006
31 / 36
The Integers
The construction of Z
Sommer 2006
32 / 36
The Integers
The construction of Z
For m, n, p , q N we dene: m, n =i p , q def m + q = p + n the equivalence class [ m, n ]i of the pair m, n with respect to the relation =i : [ m, n ]i = { p , q | m, n =i p , q }
Sommer 2006
32 / 36
The Integers
The construction of Z
For m, n, p , q N we dene: m, n =i p , q def m + q = p + n the equivalence class [ m, n ]i of the pair m, n with respect to the relation =i : [ m, n ]i = { p , q | m, n =i p , q }
Sommer 2006
32 / 36
The Integers
The construction of Z
For m, n, p , q N we dene: m, n =i p , q def m + q = p + n the equivalence class [ m, n ]i of the pair m, n with respect to the relation =i : [ m, n ]i = { p , q | m, n =i p , q } Denitions Z = {u | mn(m N n N u = [ m, n ]i )} Z is a set by the powerset and subset axioms since Z P 3 (N).
Sommer 2006
32 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q m>np>q
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q m>np>q
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q m>np>q Denitions Let [ m, n ]i Z.
1
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q m>np>q Denitions Let [ m, n ]i Z.
1 2
Sommer 2006
33 / 36
The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q m>np>q Denitions Let [ m, n ]i Z.
1 2 3
Sommer 2006
33 / 36
Lemma
Sommer 2006
34 / 36
Lemma
[ m, n ]i is zero m, n =i 0, 0
Sommer 2006
34 / 36
Lemma
Sommer 2006
34 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1
[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2
[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
m1 + p1 , n1 + q1 =i m2 + p2 , n2 + q2
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
m1 + p1 , n1 + q1 =i m2 + p2 , n2 + q2 m1 + q1 , n1 + p1 =i m2 + q2 , n2 + p2
Sommer 2006
35 / 36
Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3
m1 + p1 , n1 + q1 =i m2 + p2 , n2 + q2 m1 + q1 , n1 + p1 =i m2 + q2 , n2 + p2 m1 p1 + n1 q1 , m1 q1 + n1 p1 =i m2 p2 + n2 q2 , m2 q2 + n2 p2
Sommer 2006
35 / 36
Order Relation on Z
Denitions Let [ m, n ]i , [ p , q ]i Z, then [ m, n ]i < [ p , q ]i def [ m, n ]i [ p , q ]i is negative
Sommer 2006
36 / 36
Order Relation on Z
Denitions Let [ m, n ]i , [ p , q ]i Z, then [ m, n ]i < [ p , q ]i def [ m, n ]i [ p , q ]i is negative [ m, n ]i [ p , q ]i def [ m, n ]i < [ p , q ]i or [ m, n ]i = [ p , q ]i
Sommer 2006
36 / 36
Order Relation on Z
Denitions Let [ m, n ]i , [ p , q ]i Z, then [ m, n ]i < [ p , q ]i def [ m, n ]i [ p , q ]i is negative [ m, n ]i [ p , q ]i def [ m, n ]i < [ p , q ]i or [ m, n ]i = [ p , q ]i
Lemma For [ m, n ]i , [ p , q ]i Z
Sommer 2006
36 / 36
Order Relation on Z
Denitions Let [ m, n ]i , [ p , q ]i Z, then [ m, n ]i < [ p , q ]i def [ m, n ]i [ p , q ]i is negative [ m, n ]i [ p , q ]i def [ m, n ]i < [ p , q ]i or [ m, n ]i = [ p , q ]i
Lemma For [ m, n ]i , [ p , q ]i Z
1
[ m, n ]i < [ p , q ]i m + q < n + p
Sommer 2006
36 / 36
Order Relation on Z
Denitions Let [ m, n ]i , [ p , q ]i Z, then [ m, n ]i < [ p , q ]i def [ m, n ]i [ p , q ]i is negative [ m, n ]i [ p , q ]i def [ m, n ]i < [ p , q ]i or [ m, n ]i = [ p , q ]i
Lemma For [ m, n ]i , [ p , q ]i Z
1 2
[ m, n ]i < [ p , q ]i m + q < n + p [ m, n ]i [ p , q ]i m + q n + p
Sommer 2006
36 / 36