Anda di halaman 1dari 152

Axiomatic Set Theory

Formal Specication and Verication


Prof. P.H. Schmitt
Fakult at f ur Informatik Universit at Karlsruhe (TH)

Sommer 2006

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

1 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (1)


A1 Extensionality z (z x z y ) x = y .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

2 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (1)


A1 Extensionality z (z x z y ) x = y . A2 Foundation y (y x ) y (y x z (z x z y )).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

2 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (1)


A1 Extensionality z (z x z y ) x = y . A2 Foundation y (y x ) y (y x z (z x z y )). A3 Subset y z (z y z x (z )). for any formula not containing y .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

2 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (1)


A1 Extensionality z (z x z y ) x = y . A2 Foundation y (y x ) y (y x z (z x z y )). A3 Subset y z (z y z x (z )). for any formula not containing y . A4 Empty set y x (x y ).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

2 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (2)


A5 Pair set y x (x y x = z1 x = z2 ).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

3 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (2)


A5 Pair set y x (x y x = z1 x = z2 ). A6 Power set y z (z y u (u z u x )).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

3 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (2)


A5 Pair set y x (x y x = z1 x = z2 ). A6 Power set y z (z y u (u z u x )). A7 Sum y z (z y u (z u u x ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

3 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (2)


A5 Pair set y x (x y x = z1 x = z2 ). A6 Power set y z (z y u (u z u x )). A7 Sum y z (z y u (z u u x )) A8 Innity w ( w x (x w z (z w u (u z u x u = x ))))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

3 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (3)

A9 Replacement x , y , z ( (x , y ) (x , z ) y = z ) u w1 (w1 u w2 (w2 a (w2 , w1 )))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

4 / 36

Axiomatic Set Theory

Zermelo-Fraenkel Axiom System (3)

A9 Replacement x , y , z ( (x , y ) (x , z ) y = z ) u w1 (w1 u w2 (w2 a (w2 , w1 ))) A10 Axiom of Choice x (x z x = y (y z x y = x = y )) u x v (x z u x = {v })

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

4 / 36

Axiomatic Set Theory

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).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

5 / 36

Axiomatic Set Theory

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:

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

5 / 36

Axiomatic Set Theory

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 )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

5 / 36

Axiomatic Set Theory

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 )))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

5 / 36

Axiomatic Set Theory

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 )))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

5 / 36

Axiomatic Set Theory

Class Terms as Sets

A class term {x | (x )} does not necessarily denote a set.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

6 / 36

Axiomatic Set Theory

Class Terms as Sets

A class term {x | (x )} does not necessarily denote a set.

Counterexample

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

6 / 36

Axiomatic Set Theory

Class Terms as Sets

A class term {x | (x )} does not necessarily denote a set.

Counterexample
Assume {x | x x } is a set c , then we obtain

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

6 / 36

Axiomatic Set Theory

Class Terms as Sets

A class term {x | (x )} does not necessarily denote a set.

Counterexample
Assume {x | x x } is a set c , then we obtain c c c c

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

6 / 36

Axiomatic Set Theory

Some Abbreviations for Sets

= {x | x = x }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

7 / 36

Axiomatic Set Theory

Some Abbreviations for Sets

= {x | x = x } {a , b } = {x | x = a x = b }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

7 / 36

Axiomatic Set Theory

Some Abbreviations for Sets

= {x | x = x } {a , b } = {x | x = a x = b } {a} = {a , a }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

7 / 36

Axiomatic Set Theory

Some Abbreviations for Sets

{a , b } {a} a, b

= = = =

{x | x = x } {x | x = a x = b } {a , a } {{a}, {a, b }}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

7 / 36

Axiomatic Set Theory

Some Abbreviations for Sets

{a , b } {a} a, b

= = = =

{x | x = x } {x | x = a x = b } {a , a } {{a}, {a, b }}

a, b is called the ordered pair of a and b .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

7 / 36

Axiomatic Set Theory

Existence Claims

The following formulas follow from the ZF axioms

x (x = )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

8 / 36

Axiomatic Set Theory

Existence Claims

The following formulas follow from the ZF axioms

x (x = ) x , y z (z = {x , y })

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

8 / 36

Axiomatic Set Theory

Existence Claims

The following formulas follow from the ZF axioms

x (x = ) x , y z (z = {x , y }) x z (z = {x })

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

8 / 36

Axiomatic Set Theory

Existence Claims

The following formulas follow from the ZF axioms

x (x = ) x , y z (z = {x , y }) x z (z = {x }) x , y z (z = x , y )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

8 / 36

Axiomatic Set Theory

Lemma on Unions and Intersections

The following theorems are derivable in ZF:

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

9 / 36

Axiomatic Set Theory

Lemma on Unions and Intersections

The following theorems are derivable in ZF: y z (z y z a z b ) y =ab

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

9 / 36

Axiomatic Set Theory

Lemma on Unions and Intersections

The following theorems are derivable in ZF: y z (z y z a z b ) y z (z y z a z b ) y =ab y =ab

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

9 / 36

Axiomatic Set Theory

Lemma on Unions and Intersections

The following theorems are derivable in ZF: y z (z y z a z b ) y z (z y z a z b ) y =ab y =ab

If A is a non-empty class term, then there is a set c satisfying z (z c u (u A z u )) c= A

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

9 / 36

Axiomatic Set Theory

Lemma on Unions and Intersections

The following theorems are derivable in ZF: y z (z y z a z b ) y z (z y z a z b ) y =ab y =ab

If A is a non-empty class term, then there is a set c satisfying z (z c u (u A z u )) c= y z (z y u (u a z u ) y= A a

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

9 / 36

Axiomatic Set Theory

Proof of Existence of Intersections


Goal y z (z y z a z b )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

10 / 36

Axiomatic Set Theory

Proof of Existence of Intersections


Goal y z (z y z a z b ) Start with the subset axiom A3 y z (z y z x (z )).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

10 / 36

Axiomatic Set Theory

Proof of Existence of Intersections


Goal y z (z y z a z b ) Start with the subset axiom A3 y z (z y z x (z )). Replace x by a (z ) by z b yields y z (z y z a z b )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

10 / 36

Axiomatic Set Theory

Proof of Existence of Intersections


Goal y z (z y z a z b ) Start with the subset axiom A3 y z (z y z x (z )). Replace x by a (z ) by z b yields y z (z y z a z b ) as required

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

10 / 36

Axiomatic Set Theory

Proof of Existence of Unions


Let a, b be sets. We seek c with z (z c (z a z b ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

11 / 36

Axiomatic Set Theory

Proof of Existence of Unions


Let a, b be sets. We seek c with z (z c (z a z b )) The pair axioms, A5, y x (x y x = z1 x = z2 ) guarantees the existence of the set d = {a, b }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

11 / 36

Axiomatic Set Theory

Proof of Existence of Unions


Let a, b be sets. We seek c with z (z c (z a z b )) The pair axioms, A5, y x (x y x = z1 x = z2 ) guarantees the existence of the set d = {a, b } The sum axiom, A7, y z (z y u (z u u x )) yields the existence of a set c satisfying z (z c u (u d z u ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

11 / 36

Axiomatic Set Theory

Proof of Existence of Unions


Let a, b be sets. We seek c with z (z c (z a z b )) The pair axioms, A5, y x (x y x = z1 x = z2 ) guarantees the existence of the set d = {a, b } The sum axiom, A7, y z (z y u (z u u x )) yields the existence of a set c satisfying z (z c u (u d z u )) Substituting d = {a, b } yields the claim.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

11 / 36

Axiomatic Set Theory

Ordered Pairs

The following formula can be proved in ZF:

x1 , x2 , y1 , y2 (

x1 , x2 = y1 , y2 x1 = y1 x2 = y2

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

12 / 36

Axiomatic Set Theory

Relations and Functions


A relation r is a set of ordered pairs, i.e. rel (r ) x (x r x1 , x2 (x = x1 , x2 ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

13 / 36

Axiomatic Set Theory

Relations and Functions


A relation r is a set of ordered pairs, i.e. rel (r ) x (x r x1 , x2 (x = x1 , x2 )) The relation r is said to be a relation on the set s if rel (r , s ) rel (r ) x1 , x2 ( x1 , x2 r x1 s x2 s )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

13 / 36

Axiomatic Set Theory

Relations and Functions


A relation r is a set of ordered pairs, i.e. rel (r ) x (x r x1 , x2 (x = x1 , x2 )) The relation r is said to be a relation on the set s if rel (r , s ) rel (r ) x1 , x2 ( x1 , x2 r x1 s x2 s ) A function is a one-valued relation, i.e. func (r ) rel (r ) x , y1 , y2 ( x , y1 r x , y2 r y1 = y2 )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

13 / 36

Axiomatic Set Theory

Relations and Functions


A relation r is a set of ordered pairs, i.e. rel (r ) x (x r x1 , x2 (x = x1 , x2 )) The relation r is said to be a relation on the set s if rel (r , s ) rel (r ) x1 , x2 ( x1 , x2 r x1 s x2 s ) A function is a one-valued relation, i.e. func (r ) rel (r ) x , y1 , y2 ( x , y1 r x , y2 r y1 = y2 ) A function f is said to be a function from a set a to a set b if func (f , a, b ) func (f ) x1 , x2 ( x1 , x2 f x1 a x2 b )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

13 / 36

Axiomatic Set Theory

Existence Proofs

From the ZF axioms we can prove for any sets a, b the existence

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

Existence Proofs

From the ZF axioms we can prove for any sets a, b the existence of the set of all relations on a

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

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.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

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 ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

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 ))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

14 / 36

Axiomatic Set Theory

Natural Numbers N
Dene for any set a its successor set a+ : a+ = a {a}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

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 {, + , ++ , . . .}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

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=

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

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 = + = {}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

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+ = {, {}}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

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+ = {, {}} 3 = 2+ = {, {}, {, {}}}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

15 / 36

Axiomatic Set Theory

Formal Denition of N

Ded (a) 0 a x (x a x + a)

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

16 / 36

Axiomatic Set Theory

Formal Denition of N

Ded (a) 0 a x (x a x + a)

a is called a Dedekind set if Ded (a) is true.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

16 / 36

Axiomatic Set Theory

Formal Denition of N

Ded (a) 0 a x (x a x + a)

a is called a Dedekind set if Ded (a) is true.

N=

{a | Ded (a)}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

16 / 36

Axiomatic Set Theory

Peanos Axioms

0 N.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

17 / 36

Axiomatic Set Theory

Peanos Axioms

0 N. If n N then n+ N.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

17 / 36

Axiomatic Set Theory

Peanos Axioms

0 N. If n N then n+ N. n(n N n+ = 0).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

17 / 36

Axiomatic Set Theory

Peanos Axioms

0 N. If n N then n+ N. n(n N n+ = 0). n, m(n N m N n+ = m+ n = m).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

17 / 36

Axiomatic Set Theory

Peanos Axioms

0 N. If n N then n+ N. n(n N n+ = 0). n, m(n N m N n+ = m+ n = m). x (0 x y (y x y + x ) N x ).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

17 / 36

Axiomatic Set Theory

Proof of Axiom 4
n, m(n N m N n+ = m+ n = m).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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}.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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

m n {n}, i.e. n = m or m n. n m {m}, i.e. n = m or n m.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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

m n {n}, i.e. n = m or m n. n m {m}, i.e. n = m or n m.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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

m n {n}, i.e. n = m or m n. n m {m}, i.e. n = m or n m.

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 )).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

18 / 36

Axiomatic Set Theory

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

m n {n}, i.e. n = m or m n. n m {m}, i.e. n = m or n m.

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

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for x = {n N | 0 n} {0}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for x = {n N | 0 n} {0} Induction basis: 0 x obvious

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for x = {n N | 0 n} {0} Induction basis: 0 x obvious Induction step: n x n+ x

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for x = {n N | 0 n} {0} Induction basis: 0 x obvious Induction step: n x n+ x Case n = 0 This implies 0 n. From n n+ = n {n} we get 0 n+ and thus n+ x .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

19 / 36

Axiomatic Set Theory

Set Theoretic Properties of N


For all n N with n = 0 0n Show by induction axiom x = N for x = {n N | 0 n} {0} Induction basis: 0 x obvious Induction step: n x n+ x Case n = 0 This implies 0 n. From n n+ = n {n} we get 0 n+ and thus n+ x . Case n = 0 By denition n+ = {0}. Thus obviously 0 n+ and also n+ x .
Prof. P.H. Schmitt Formal Specification and Verification Sommer 2006 19 / 36

Axiomatic Set Theory

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)

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

20 / 36

Axiomatic Set Theory

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)

Lemma 1 n is transitive for all n N .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

20 / 36

Axiomatic Set Theory

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)

Lemma 1 n is transitive for all n N .


2

N is transitive.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

20 / 36

Axiomatic Set Theory

n is transitive for all n N

By induction.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

21 / 36

Axiomatic Set Theory

n is transitive for all n N

By induction. The empty set 0 is transitive by denition.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

21 / 36

Axiomatic Set Theory

n is transitive for all n N

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+ .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

21 / 36

Axiomatic Set Theory

n is transitive for all n N

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+ .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

21 / 36

Axiomatic Set Theory

n is transitive for all n N

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+ .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

21 / 36

Axiomatic Set Theory

N is transitive

Prove n(n N n N) by induction.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

22 / 36

Axiomatic Set Theory

N is transitive

Prove n(n N n N) by induction. For n = 0 this is clear.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

22 / 36

Axiomatic Set Theory

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.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

22 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r ) Induction on m.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r ) Induction on m. For m = 0 the statement is vacuously true.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r ) Induction on m. For m = 0 the statement is vacuously true. Assume n(n m n, m r ) Prove n(n m+ n, m+ r ).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r ) Induction on m. For m = 0 the statement is vacuously true. Assume n(n m n, m r ) Prove n(n m+ n, m+ r ). Case n m Hypothesis n, m r . From m, m+ and transitivity of r we get n, m+ r .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

The order relation on N


Claim The -relation is the smallest transitive relation r on N with n, n+ r for all n. i.e. n, m(n m n, m r ) Induction on m. For m = 0 the statement is vacuously true. Assume n(n m n, m r ) Prove n(n m+ n, m+ r ). Case n m Hypothesis n, m r . From m, m+ and transitivity of r we get n, m+ r . Case n = m We immediately have m, m+ r .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

23 / 36

Axiomatic Set Theory

Set Theoretic Properties of N (II)

The <-relation on N coincides with the -relation.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

24 / 36

Axiomatic Set Theory

Set Theoretic Properties of N (II)

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 }.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

24 / 36

Axiomatic Set Theory

The Recursion Theorem

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,

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

25 / 36

Axiomatic Set Theory

The Recursion Theorem

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 ,

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

25 / 36

Axiomatic Set Theory

The Recursion Theorem

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

dom(f ) = N, f (0) = u , f (n+ ) = F (f (n)) for all n N

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

25 / 36

Axiomatic Set Theory

The Recursion Theorem

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

dom(f ) = N, f (0) = u , f (n+ ) = F (f (n)) for all n N

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

25 / 36

Axiomatic Set Theory

The Recursion Theorem

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

dom(f ) = N, f (0) = u , f (n+ ) = F (f (n)) for all n N

The assumptions ran(F ) dom(F ) and u dom(F ) are needed to make sure that all function applications of F are dened.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

25 / 36

Axiomatic Set Theory

Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

26 / 36

Axiomatic Set Theory

Uniqueness
Consider two functions f and g both satisfying 1-3 from the theorem. Set x = {y N | f (y ) = g (y )}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

26 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

26 / 36

Axiomatic Set Theory

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+ )

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

26 / 36

Axiomatic Set Theory

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 .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

26 / 36

Axiomatic Set Theory

Idea of Existence Proof

Idea H = {h | func (h) h(0) = u n(n = 0 dom(h) = n m(m+ n h(m+ ) = F (h(m))))}

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

27 / 36

Axiomatic Set Theory

Idea of Existence Proof

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

27 / 36

Axiomatic Set Theory

Details of Existence Proof

In order to make the idea work we have to show:

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Details of Existence Proof

In order to make the idea work we have to show: H is a set.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Details of Existence Proof

In order to make the idea work we have to show: H is a set. dom(f ) = N

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Details of Existence Proof

In order to make the idea work we have to show: H is a set. dom(f ) = N f is a function

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Details of Existence Proof

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Details of Existence Proof

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

28 / 36

Axiomatic Set Theory

Addition
of natural numbers

for every m N there is a unique function addm such that addm (0) = m + addm (n ) = (addm (n))+

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

29 / 36

Axiomatic Set Theory

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 +

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

29 / 36

Axiomatic Set Theory

Multiplication
of natural numbers

for every m N there is a unique function multm such that multm (0) = 0 + multm (n ) = addm (multm (n))

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

30 / 36

Axiomatic Set Theory

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 ).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

30 / 36

Axiomatic Set Theory

The Integers

The idea is to reconstruct an integer z as a pair m, n of natural numbers with z =mn .

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

31 / 36

Axiomatic Set Theory

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.

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

31 / 36

Axiomatic Set Theory

The Integers
The construction of Z

For m, n, p , q N we dene: m, n =i p , q def m + q = p + n

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

32 / 36

Axiomatic Set Theory

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 }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

32 / 36

Axiomatic Set Theory

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 }

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

32 / 36

Axiomatic Set Theory

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).

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

32 / 36

Axiomatic Set Theory

The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

The Integers
Let m, n, p , q N and assume m, n =i p , q . Lemma m<np<q m=np=q

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

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

[ m, n ]i is negative def m < n

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

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

[ m, n ]i is negative def m < n [ m, n ]i is zero def m = n

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

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

[ m, n ]i is negative def m < n [ m, n ]i is zero def m = n [ m, n ]i is positive def m > n

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

33 / 36

Axiomatic Set Theory

Lemma

[ m, n ]i is negative there is a unique p N, p = 0 with m, n =i 0, p

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

34 / 36

Axiomatic Set Theory

Lemma

[ m, n ]i is negative there is a unique p N, p = 0 with m, n =i 0, p

[ m, n ]i is zero m, n =i 0, 0

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

34 / 36

Axiomatic Set Theory

Lemma

[ m, n ]i is negative there is a unique p N, p = 0 with m, n =i 0, p

[ m, n ]i is zero m, n =i 0, 0 [ m, n ]i is positive there is a unique p N, p = 0 with m, n =i p , 0

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

34 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Independence of choice of representative is needed!

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Independence of choice of representative is needed! Let m1 , m2 , n1 , n2 , p1 , p2 , q1 , q2 N be given with m1 , n1 =i m2 , n2 and p1 , q1 =i p2 , q2 . Then


1

m1 + p1 , n1 + q1 =i m2 + p2 , n2 + q2

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Independence of choice of representative is needed! Let m1 , m2 , n1 , n2 , p1 , p2 , q1 , q2 N be given with m1 , n1 =i m2 , n2 and p1 , q1 =i p2 , q2 . Then


1 2

m1 + p1 , n1 + q1 =i m2 + p2 , n2 + q2 m1 + q1 , n1 + p1 =i m2 + q2 , n2 + p2

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

Operations on Z
For [ m, n ]i , [ p , q ]i Z:
1 2 3

[ m, n ]i + [ p , q ]i =def [ m + p , n + q ]i [ m, n ]i [ p , q ]i =def [ m + q , n + p ]i [ m, n ]i [ p , q ]i =def [ mp + nq , mq + np ]i

Independence of choice of representative is needed! Let m1 , m2 , n1 , n2 , p1 , p2 , q1 , q2 N be given with m1 , n1 =i m2 , n2 and p1 , q1 =i p2 , q2 . Then


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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

35 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

36 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

36 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

36 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

36 / 36

Axiomatic Set Theory

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

Prof. P.H. Schmitt

Formal Specification and Verification

Sommer 2006

36 / 36

Anda mungkin juga menyukai