34
Naive Set Theory Maths Class http://www.inf.unibz.it/~gennari/maths/ Rosella Gennari KRDB, CS Faculty, FUB Rosella Gennari | Naive Set Theory 1/18

Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Naive Set TheoryMaths Class

http://www.inf.unibz.it/~gennari/maths/

Rosella Gennari

KRDB, CS Faculty, FUB

Rosella Gennari | Naive Set Theory 1/18

Page 2: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Table of Contents

1 Basics of Set TheoryBasic notionsSubsets and supersetsExtensive definitions of setsSet operations

2 Relations and functionsRelationsProperties of relationsFunctions and their propertiesOperation on functions

3 Countable and uncountable setsCardinalityFinite and denumerableCountable and uncountable

Rosella Gennari | Naive Set Theory 2/18

Page 3: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Basics of set theory

Basic notions of arithmetics/analysis:

I N , the set {0, 1, . . .} of natural numbers;I Z , the set {. . . ,−1, 0, 1, . . .} of integers;I Q , the set of rational numbers, e.g., 1, −1, 1/2;I R , the set of real numbers, e.g., 1, −1, 1/2,

√2.

Question. Is√4 a rational number? What about

√−1?

Basic/primitive notions of set theory:

I set; we usually denote it with one of the first (capital) letters of thealphabet, A, . . . , D, . . . ;

I membership: x ∈ A is read as x is an element of A.

Rosella Gennari | Naive Set Theory 3/18

Page 4: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Basics of set theory

Basic notions of arithmetics/analysis:

I N , the set {0, 1, . . .} of natural numbers;I Z , the set {. . . ,−1, 0, 1, . . .} of integers;I Q , the set of rational numbers, e.g., 1, −1, 1/2;I R , the set of real numbers, e.g., 1, −1, 1/2,

√2.

Question. Is√4 a rational number? What about

√−1?

Basic/primitive notions of set theory:

I set; we usually denote it with one of the first (capital) letters of thealphabet, A, . . . , D, . . . ;

I membership: x ∈ A is read as x is an element of A.

Rosella Gennari | Naive Set Theory 3/18

Page 5: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Basics of set theory

Basic notions of arithmetics/analysis:

I N , the set {0, 1, . . .} of natural numbers;I Z , the set {. . . ,−1, 0, 1, . . .} of integers;I Q , the set of rational numbers, e.g., 1, −1, 1/2;I R , the set of real numbers, e.g., 1, −1, 1/2,

√2.

Question. Is√4 a rational number? What about

√−1?

Basic/primitive notions of set theory:

I set; we usually denote it with one of the first (capital) letters of thealphabet, A, . . . , D, . . . ;

I membership: x ∈ A is read as x is an element of A.

Rosella Gennari | Naive Set Theory 3/18

Page 6: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Basics of set theory

Basic notions of arithmetics/analysis:

I N , the set {0, 1, . . .} of natural numbers;I Z , the set {. . . ,−1, 0, 1, . . .} of integers;I Q , the set of rational numbers, e.g., 1, −1, 1/2;I R , the set of real numbers, e.g., 1, −1, 1/2,

√2.

Question. Is√4 a rational number? What about

√−1?

Basic/primitive notions of set theory:

I set; we usually denote it with one of the first (capital) letters of thealphabet, A, . . . , D, . . . ;

I membership: x ∈ A is read as x is an element of A.

Rosella Gennari | Naive Set Theory 3/18

Page 7: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Subsets and supersets

Suppose A and B are sets. Then:

I A is a subset of B (A ⊆ B) if, for all x ∈ A, x ∈ B;I A is a superset of B if B ⊆ A;I A is a equal to B if A ⊆ B and B ⊆ A; A is different from B if

A 6= B.I A is a proper subset (proper superset) of B if A ⊆ B (B ⊆ A) and

A 6= B; then we write A ⊂ B (B ⊂ A).

Examples: N is a proper subset of Z; Z is a proper subset of Q; Q is aproper subset of R.

Question. Is R a superset of N?

Rosella Gennari | Naive Set Theory 4/18

Page 8: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Subsets and supersets

Suppose A and B are sets. Then:

I A is a subset of B (A ⊆ B) if, for all x ∈ A, x ∈ B;I A is a superset of B if B ⊆ A;I A is a equal to B if A ⊆ B and B ⊆ A; A is different from B if

A 6= B.I A is a proper subset (proper superset) of B if A ⊆ B (B ⊆ A) and

A 6= B; then we write A ⊂ B (B ⊂ A).

Examples: N is a proper subset of Z; Z is a proper subset of Q; Q is aproper subset of R.

Question. Is R a superset of N?

Rosella Gennari | Naive Set Theory 4/18

Page 9: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Intensive definitions of sets

We will write

{x ∈ A | P(x , . . . )} or {x | x ∈ A and P(x , . . . )}

to denote the (same) set of A elements with the “property” P. Forinstance, if

P(x , y)

E ={

x ∈ N |︷ ︸︸ ︷there exists y ∈ N such that x = 2y

}then E is the set of even numbers (e.g., 2, 4, 6).Question. Consider the following sets:

A ={

x ∈ N | x2 = 1};

B ={

x ∈ R | x2 = 1}

.

Is −1 ∈ A? Is −1 ∈ B? Is B ⊆ A?

Rosella Gennari | Naive Set Theory 5/18

Page 10: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Intensive definitions of sets

We will write

{x ∈ A | P(x , . . . )} or {x | x ∈ A and P(x , . . . )}

to denote the (same) set of A elements with the “property” P. Forinstance, if

P(x , y)

E ={

x ∈ N |︷ ︸︸ ︷there exists y ∈ N such that x = 2y

}then E is the set of even numbers (e.g., 2, 4, 6).Question. Consider the following sets:

A ={

x ∈ N | x2 = 1};

B ={

x ∈ R | x2 = 1}

.

Is −1 ∈ A? Is −1 ∈ B? Is B ⊆ A?

Rosella Gennari | Naive Set Theory 5/18

Page 11: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Set operations

We will make use of the following basic operations on sets:

A ∪ B = {x | x ∈ A or x ∈ B} (union)A ∩ B = {x | x ∈ A and x ∈ B} (intersection)A− B = {x | x ∈ A but x 6∈ B} (difference)A× B = {(x , y) | x ∈ A and y ∈ B} (Cartesian product)℘(A)= {C | C ⊆ A} (powerset)

For instance:I if A = {1, 2}, then ℘(A) = {∅, {1} , {2} , {1, 2}}I if A = {0} and B = {1, 2} then (0, 1), (0, 2) ∈ A× B. What about

(1, 0)? Is A× B = A ∪ B?

In general,n times︷ ︸︸ ︷

A× · · · × A is abbreviated as An.

Rosella Gennari | Naive Set Theory 6/18

Page 12: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Relations

� A (binary) relation R from A to B is a subset of A× B. Then

dom(R) = {x ∈ A | there exists y ∈ B and (x , y) ∈ R}

is the domain of R. Whereas

range(R) = {y ∈ B | there exists x ∈ A and (x , y) ∈ R}

is the range of R.

� A relation R over A is a relation from A to A.

We often write R xy instead of (x , y) ∈ R.

Rosella Gennari | Naive Set Theory 7/18

Page 13: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of relations

A B

• ◦

• //

JJ

JJ

N

...

n + 1

OO

n

OO

...

1

OO

0

OO

A

•11

•11

OO

•11

OO

A

•11

��•11

OO

��•11

OO

A

•11

��

��

•11

OO

��•11

OO

]]

Rosella Gennari | Naive Set Theory 8/18

Page 14: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Properties of relations

A relation R is:

I reflexive on A if, for all x ∈ A, (x , x) ∈ R;I symmetric from A to B if (x , y) ∈ R yields (y , x) ∈ R;I transitive from A to B if (x , y) ∈ R and (y , z) ∈ R yield (x , z) ∈ R;I of equivalence on A if all the above three properties hold true.

Prove that an equivalence relation R divides A into separately disjoint(i.e., their intersection is empty) subsets whose union is A.

Proof sketch. Let R be an equivalence relation and, for each x ∈ A, let[x ] be the subset of y ∈ A such that Rxy . Prove that (i) if [z ] ∩ [w ] 6= ∅then Rzw and (ii)

⋃x∈A[x ] = A (partition of A). Hint: to prove (ii), use

reflexivity. . .

Rosella Gennari | Naive Set Theory 9/18

Page 15: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Properties of relations

A relation R is:

I reflexive on A if, for all x ∈ A, (x , x) ∈ R;I symmetric from A to B if (x , y) ∈ R yields (y , x) ∈ R;I transitive from A to B if (x , y) ∈ R and (y , z) ∈ R yield (x , z) ∈ R;I of equivalence on A if all the above three properties hold true.

Prove that an equivalence relation R divides A into separately disjoint(i.e., their intersection is empty) subsets whose union is A.Proof sketch. Let R be an equivalence relation and, for each x ∈ A, let[x ] be the subset of y ∈ A such that Rxy . Prove that (i) if [z ] ∩ [w ] 6= ∅then Rzw and (ii)

⋃x∈A[x ] = A (partition of A). Hint: to prove (ii), use

reflexivity. . .

Rosella Gennari | Naive Set Theory 9/18

Page 16: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Functions

A relation R is deterministic or amapping or a function if (x , y) ∈ R and(x , z) ∈ R yields y = z . It is a partial function from A if dom(R) ⊂ A.

Usually functions are denoted with small letters such as f , g , h. Afunction from A to B is usually written as f : A 7→ B and f xy isrewritten as f (x) = y (why can we do it?).

A B

• //

**•

• // •

44

f

A B

•**•

• // •

44

g

Question. Consider the relations above; are they functions?

Rosella Gennari | Naive Set Theory 10/18

Page 17: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Properties of functions

A function f : A 7→ B is:

I injective if it has the following uniqueness property:for each x , x ′ ∈ dom(f ), if f (x) = f (x ′) then x = x ′;

I surjective if it has the following existential property:for each y ∈ range(f ) there exists x ∈ dom(f ) and f (x) = y ;

I bijective if it is injective and surjective.

Rosella Gennari | Naive Set Theory 11/18

Page 18: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 19: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 20: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 21: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 22: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 23: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Examples of functions (are they?)

A B

• // •

55

A B

• // •

55

::

Z N...

...

−1

&&

20 // 01 // 1...

...

• // •

• // •

• // •

• // •

55

......

−1 // 20 // 01 // 1...

...

Rosella Gennari | Naive Set Theory 12/18

Page 24: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Composition of functions

Consider f : A 7→ B and g : B 7→ C .Then gf : A 7→ C , the composition of fand g , is defined as follows:

for all x ∈ A, gf (x) = g(f (x))

A

f ++

gf// C

Bg

LL

Question. Given f , g from Z to Z, with f (x) = x2 and g(y) = y + 1,what is gf , e.g., gf (2)? What is fg , e.g., fg(2)? Is function compositiona commutative operation?

Remark. From now onwards we only consider total functions.

Rosella Gennari | Naive Set Theory 13/18

Page 25: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Cardinality

We say that a set A has the same cardinality or size as a set B (A u B)if there is a bijection from A to B.

Exercise. Prove the following:

1 A u A;2 A u B then B u A;3 A u B and B u C then A u C .

Proof sketch. To prove 1, show that the identity function, id(x) = x forall x ∈ A, is bijective.As for 2, take the inverse f −1 of f : A 7→ B, namely: f −1(y) = x ifff (x) = y ; prove that f −1 is indeed a function and bijective.Finally 3 follows from the fact that the composition of two bijectivefunctions is bijective (prove it!).

Rosella Gennari | Naive Set Theory 14/18

Page 26: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Cardinality

We say that a set A has the same cardinality or size as a set B (A u B)if there is a bijection from A to B.

Exercise. Prove the following:

1 A u A;2 A u B then B u A;3 A u B and B u C then A u C .

Proof sketch. To prove 1, show that the identity function, id(x) = x forall x ∈ A, is bijective.As for 2, take the inverse f −1 of f : A 7→ B, namely: f −1(y) = x ifff (x) = y ; prove that f −1 is indeed a function and bijective.Finally 3 follows from the fact that the composition of two bijectivefunctions is bijective (prove it!).

Rosella Gennari | Naive Set Theory 14/18

Page 27: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Finite and denumerable

Fix an arbitrary n ∈ N, n 6= 0. Then [1, n] denotes the set {1, . . . , n} ofnatural numbers from 1 to n.

I A set B is finite if B u [1, n] for some n ∈ N; then n is thecardinality of B. Else B is infinite;

I A set B is denumerable if B u N.

Exercise. Prove that Z is denumerable.

Proof sketch. Consider the function f : Z 7→ N s.t. f (x) = 2x − 1 ifx ∈ Z+ and f (x) = 2x if x ∈ Z− ∪ {0}; prove that it is bijective.

Rosella Gennari | Naive Set Theory 15/18

Page 28: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Finite and denumerable

Fix an arbitrary n ∈ N, n 6= 0. Then [1, n] denotes the set {1, . . . , n} ofnatural numbers from 1 to n.

I A set B is finite if B u [1, n] for some n ∈ N; then n is thecardinality of B. Else B is infinite;

I A set B is denumerable if B u N.

Exercise. Prove that Z is denumerable.

Proof sketch. Consider the function f : Z 7→ N s.t. f (x) = 2x − 1 ifx ∈ Z+ and f (x) = 2x if x ∈ Z− ∪ {0}; prove that it is bijective.

Rosella Gennari | Naive Set Theory 15/18

Page 29: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Sequences

A sequence s in B is a function s : I 7→ B where I ⊆ N.

In particular:

I if I u [1, n], for some n ∈ N, then s : [1, n] 7→ B is an n-lengthsequence;

I if I u N then s is an infinite sequence.

Usually s(i) is denoted as si , and sequences are rewritten ass1, . . . , sn(, . . . ).

Exercise. Prove that B is finite iff there is a bijective n-length sequence sin B; and that B is denumerable iff there is a bijective infinite sequencein B.

Proof sketch. Use the definitions above.

Rosella Gennari | Naive Set Theory 16/18

Page 30: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Sequences

A sequence s in B is a function s : I 7→ B where I ⊆ N.

In particular:

I if I u [1, n], for some n ∈ N, then s : [1, n] 7→ B is an n-lengthsequence;

I if I u N then s is an infinite sequence.

Usually s(i) is denoted as si , and sequences are rewritten ass1, . . . , sn(, . . . ).

Exercise. Prove that B is finite iff there is a bijective n-length sequence sin B; and that B is denumerable iff there is a bijective infinite sequencein B.

Proof sketch. Use the definitions above.

Rosella Gennari | Naive Set Theory 16/18

Page 31: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Countable and uncountable

A set A is countable if it is either finite or denumerable; else it isuncountable.

Exercise. The set F(N) of the total functions f : N 7→ N is uncountable.Proof sketch. Suppose N is countable. Then we have a bijectivesequence in F(N) as displayed in the top horizontal line below:

f0 f1 . . .0 f0(0) f1(0) . . .1 f0(1) f1(1) . . .. . .

Take the ‘diagonal’ and define g : N 7→ N as g(i) = fi(i) + 1 for alli ∈ N. Now, g is a total function on N hence, by hypothesis, g = fj foran fj in the top line. Then fj(j)

by hypothesis=

(g(j) by definition

=)fj(j) + 1,

which is absurd in N.

Rosella Gennari | Naive Set Theory 17/18

Page 32: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Countable and uncountable

A set A is countable if it is either finite or denumerable; else it isuncountable.

Exercise. The set F(N) of the total functions f : N 7→ N is uncountable.Proof sketch. Suppose N is countable. Then we have a bijectivesequence in F(N) as displayed in the top horizontal line below:

f0 f1 . . .0 f0(0) f1(0) . . .1 f0(1) f1(1) . . .. . .

Take the ‘diagonal’ and define g : N 7→ N as g(i) = fi(i) + 1 for alli ∈ N. Now, g is a total function on N hence, by hypothesis, g = fj foran fj in the top line. Then fj(j)

by hypothesis=

(g(j) by definition

=)fj(j) + 1,

which is absurd in N.

Rosella Gennari | Naive Set Theory 17/18

Page 33: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Countable and uncountable

Remark. The diagonalization method is also used to prove theunsolvability of the halting problem, i.e., that the total function

halt(p, n) ={

1 if the program p terminates with input n0 otherwise

is computed by no algorithm.

Exercise. Use the diagonalization method or the above exercise/theoremto prove the following:

I the set of all partial functions from N to N is uncountable;I the set of all total functions from N to {0, 1} is uncountable;I the set of all real numbers in the interval [0, 1] is uncountable. What

about R (Cantor Theorem)?

Rosella Gennari | Naive Set Theory 18/18

Page 34: Naive Set Theory - Maths Class [.8em] ` `%%%`#`&12 ` ~~~ alseOutlineBasicsofSetTheoryTableofContentsRelationsandfunctionsCountableanduncountablesets 1 BasicsofSetTheory Basicnotions

Outline Basics of Set Theory Relations and functions Countable and uncountable sets

Countable and uncountable

Remark. The diagonalization method is also used to prove theunsolvability of the halting problem, i.e., that the total function

halt(p, n) ={

1 if the program p terminates with input n0 otherwise

is computed by no algorithm.

Exercise. Use the diagonalization method or the above exercise/theoremto prove the following:

I the set of all partial functions from N to N is uncountable;I the set of all total functions from N to {0, 1} is uncountable;I the set of all real numbers in the interval [0, 1] is uncountable. What

about R (Cantor Theorem)?

Rosella Gennari | Naive Set Theory 18/18