Sets and Cardinality Notes For 620-111: C. F. Miller Semester 1, 2000

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Sets and Cardinality Notes

for
620-111

C. F. Miller

Semester 1, 2000
Abstract

These lecture notes were compiled in the Department of Mathematics and


Statistics in the University of Melbourne for the use of students in the subject
620-111. Copyright C. F. Miller, 1989-2000.
2
Contents

1 Sets and functions 1


1.1 Operations on sets . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Cardinality 11

0
Chapter 1

Sets and functions

A set is a collection of objects called the elements or members of the set.


Usually sets are defined either by listing their elements, as in A = {0, 2, 3},
or by giving a rule or condition which determines membership in the set, as
in A = {x ∈ R | x3 − 5x2 + 6x = 0}.
If A is a set one writes x ∈ A to mean that x is an element of A while
x ∈/ A means that x is not an element of A. If A and B are sets the A
is a subset of or contained in B written A ⊆ B means that every element
of A is also an element of B, that is x ∈ A implies x ∈ B. Two sets are
equal if they have the same members (they might have been given to us via
different descriptions for instance). Thus A = B exactly when both A ⊆ B
and B ⊆ A. If A ⊆ B but A 6= B then we say that A is a proper subset of B
and write A ⊂ B.
Here are some familiar sets of (mostly mathematical) objects:
- the natural numbers N = {0, 1, 2, 3, 4, . . .};
- the (rational) integers Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . .};
- the rational numbers consisting of all (reduced) fractions of integers
x
Q={ | x, y ∈ Z, y 6= 0};
y

- the real numbers R (it is a bit more difficult to define the real numbers
precisely, but one can think of them as either the points on the real
line or as infinite decimal expansions);
- the half open interval (1, 3] = {x ∈ R | 1 ≤ x ≤ 3};
- the English alphabet {a, b, c, . . . , x, y, z} which is a set of symbols as
listed;

1
2 CHAPTER 1. SETS AND FUNCTIONS

- the empty set ∅ which is the set containing no members at all, or


alternatively ∅ = {x | x 6= x}.
In these examples we have the following containment relations: N ⊂ Z ⊂
Q ⊂ R and (1, 3] ⊂ R. Note that (1, 3] 6⊆ Q because the interval (1, 3]
contains real numbers which are not rational. Also, for any set A we have
∅ ⊆ A.
As indicated above the notation {. . .} is used for set formation. Sets are
themselves mathematical objects and so can be members of other sets. For
instance the set {3, 5} consists of two elements, namely the numbers 3 and 5.
The set {{3, 5}, {3, 7}, {7}} is a set consisting of 3 objects, namely the sets
{3, 5},{3, 7} and {7}. Observe that {7} is the set whose only element is the
number 7. Thus 7 ∈ {7} but 7 6⊆ {7}.
The empty set merits some comment: the set {∅} is a set with exactly
one member, namely ∅, whereas ∅ has no members so that ∅ and {∅} are
different sets. Note that ∅ ∈ {∅} and ∅ ⊆ {∅} but that ∅ ∈ / ∅. In formal set
theory the natural numbers are often defined inductively as follows:
0 = ∅, 1 = {∅}, 2 = {0, 1} = {∅, {∅}}, 3 = {0, 1, 2} = {∅, {∅}, {∅, {∅}}}, . . . .
This construction builds the natural numbers out of nothing (so to speak).
In general one must place some restriction on set formation. For example
trying to form {x | x is a set} or {x | x ∈
/ x} can lead to logical paradoxes.
These can be dealt with or excluded in a more formal or axiomatic treatment
of set theory, but normally informal use of set formation does not lead to
difficulties.

1.1 Operations on sets


The reader is probably familiar with the usual operations on sets such as the
following:
- the union of two sets
A ∪ B = {x | either x ∈ A or x ∈ B (or both) };

- the intersection of two sets


A ∩ B = {x | x ∈ A and x ∈ B};

- the relative complement or set difference


A \ B = {x | x ∈ A and x ∈
/ B};
1.1. OPERATIONS ON SETS 3

- the symmetric difference of two sets

A + B = (A ∪ B) \ (A ∩ B) = {x | x ∈ A or x ∈ B but not both };

- the complement of a set A denote Ac is defined only when all sets being
considered are subsets of one fixed larger set U called the universe.
Then Ac is defined as

Ac = U \ A = { x | x ∈ U but x ∈
/ A}.

One is tempted to write Ac = { x | x ∈ / A} but this can lead to set


formation difficulties. So we agree only to use Ac when we have some
fixed universe under consideration.

Two sets A and B are said to be disjoint if they have no elements in common,
that is if A ∩ B = ∅.
Assuming all sets are contained in a fixed universe U the following laws
hold for the algebra of sets with these operations:

Laws of the algebra of sets (subsets of U )


A∪B =B∪A commutative laws
A∩B =B∩A
A ∪ (B ∪ C) = (A ∪ B) ∪ C associative laws
A ∩ (B ∩ C) = (A ∩ B) ∩ C
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) distributive laws
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
A∪A=A idempotent laws
A∩A=A
A∪∅=A identity laws
A∩U =A
A∩∅=∅
A∪U =U
(Ac )c = A complementation laws
A ∪ Ac = U
A ∩ Ac = ∅
Uc = ∅
∅c = U
(A ∪ B)c = Ac ∩ B c DeMorgan’s laws
(A ∩ B)c = Ac ∪ B c

In informal set theory one often represents sets as (possibly overlapping)


disks in the plane and interprets these operations geometrically - this is
4 CHAPTER 1. SETS AND FUNCTIONS

called the method of Venn diagrams and can be quite helpful for intuitive
purposes. Here the entire plane represents the universe U in which all sets
under consideration are contained. The reader may wish to check the above
laws using such diagrams.
If A is a set we denote the set consisting of all subsets of A by P ow(A),
called the power set of A. Thus, for example if A = {3, 4, 5} then

P ow(A) = {∅, {3}, {4}, {5}, {3, 4}, {3, 5}, {4, 5}, {3, 4, 5}}.

Note that the empty set and the set A itself are both members of P ow(A).
The reader should be warned that a more customary notation for P ow(A)
is 2A . The reason for this notation will be explained in a later section, but
meanwhile we agree to use either form.
If the set A has only finitely many elements, the number of elements of A
is denoted card(A), the cardinality of A. If A is infinite it is also possible to
discuss its size and this will be done in a subsequent section on cardinality.
For the moment we content ourselves with discussing the size of certain finite
sets. The following is a result easily proved using mathematical induction:

Lemma 1.1 If A is a finite set with n elements then P ow(A) = 2A has 2n


elements. Thus card(2A ) = 2card(A) .

Proof: (Base steps) If A has no elements, so A = ∅, then the only subset of A


is A itself and hence P ow(A) = {∅}. Thus P ow(A) has 1 = 20 elements in this
case. If A consists of a single element, say A = {a} then P ow(A) = {∅, {a}}
which has 2 = 21 elements in this case. So the result holds when A has either
0 or 1 element.
(Induction step) Now suppose (induction hypothesis) that we have shown
the lemma holds for sets with fewer than n elements and that n ≥ 2. We
want to deduce that the lemma holds for sets with n elements. To do this
suppose A = {a1 , . . . , an } is a set with n elements.
Let B = {a1 , . . . , an−1 } be a subset of A containing n − 1 elements. Now
if C is a subset of A with an ∈ / C then C ⊆ B and so C ∈ P ow(B). We
already know card(P ow(B)) = 2n−1 by the induction hypothesis. Thus there
are 2n−1 subsets C of A with an ∈ / C.
If D is a subset of A with an ∈ D then D = {an } ∪ (D ∩ B) and so
(D ∩ B) ∈ P ow(B). Conversely, if C ∈ P ow(B) then {an } ∪ C is a subset of
A containing an . So again by the induction hypothesis there are 2n−1 subsets
D of A with an ∈ D. Thus altogether P ow(A) has 2n−1 +2n−1 = 2n elements.
This establishes the “induction step”.
By the principle of mathematical induction, the lemma holds for all n.
This completes the proof.
1.2. FUNCTIONS 5

Let A and B be two sets. Then for each a ∈ A and b ∈ B we can form
the ordered pair (a, b). The order here is important and a is the first element
and b is the second element of the ordered pair. Equality between ordered
pairs (a1 , b1 ) = (a2 , b2 ) means that both a1 = a2 and b1 = b2 . The Cartesian
product or simply the product of A and B, written A × B, is the collection of
all such ordered pairs. Thus

A × B = {(a, b) | a ∈ A and b ∈ B}.

If A = B in this construction then one writes A2 for A×A. Thus, for example
R2 is the set of all ordered pairs of real numbers which can be identified with
the Euclidean plane in the usual way.
Suppose A and B are finite sets. If we fix a ∈ A there are card(B) ordered
pairs of the form (a, b) with b ∈ B having that fixed a as first element. Since
there are card(A) ways to choose a from A we conclude the following:

Lemma 1.2 Let A and B be finite sets. Then card(A × B) = card(A) ·


card(B).

More generally, if A1 , A2 , . . . , An are any n sets we can consider the col-


lection of all ordered sequences or n-tuples (a1 , a2 , . . . , an ) where ai ∈ Ai
for i = 1, . . . , n. The collection of all of these n-tuples is the n-fold product
denoted A1 × A2 × . . . × An . If all of these Ai ’s are the same, say Ai = A
for i = 1, . . . , n then we denote the n-fold product A × . . . × A by An . For
instance R3 consists of all triples (alias 3-tuples) of real numbers and can be
identified with three dimensional Euclidean space in the usual way.

1.2 Functions
Let A and B be two sets. We want to define the notion of a mapping or
function f : A −→ B from A to B. Usually functions are given to us by a
rule or formula which enable us to compute them. Thus a function f from
A to B assigns to each element a ∈ A a unique element denoted f (a) in the
set B. The element f (a) in B is called the value of f at a or the image of a
under f .
Unfortunately this is not a precise definition because the meaning of “as-
signs to” is vague. We will see shortly how to fix this up, but for now we
recall some of the usual terminology.
If f : A −→ B is a function, the set A is called the domain of f, denoted
dom(f ). The domain of f is just the set on which the function is defined.
6 CHAPTER 1. SETS AND FUNCTIONS

The set B in which the function’s values lie is the codomain of f. The set of
all images under f of elements of A is called the image of f and is denoted

im(f ) = {f (a) | a ∈ dom(f )}.

Note that im(f ) is a subset of B but may not be equal to all of B.


In calculus one studies many functions f : R −→ R and in particular one
looks at their graphs. In the general situation of a function f : A −→ B we
can think of A and B as coordinate axes and consider the graph of f as a
subset of A × B defined by

graph(f ) = {(a, b) ∈ A × B | f (a) = b }.

Clearly the graph of f contains all the information about f so we use it to


make the definition of a function precise as follows:
Definition 1.1 Let A and B be sets. Then a function with domain A and
codomain B is a subset f ⊆ A × B such that for each a ∈ A there is exactly
one b ∈ B such that (a, b) ∈ f. If (a, b) ∈ f we write f (a) = b.
If f : A −→ B and g : B −→ C are functions, then their composition is
the function g ◦ f : A −→ C defined by

g ◦ f (a) = g(f (a)) for all a ∈ A.

There are a few special types of functions that one should be familiar with.
If A is a set then the identity function denoted 1A or idA is the function that
maps every element of A to itself, that is 1A (a) = a for all a ∈ A. A function
f : A −→ B is a constant function if it has the same value for every a ∈ A,
that is for some fixed b0 ∈ B we have f (a) = b0 for all a ∈ A.
If A is a subset of the universe U of discourse then the characteristic
function of A is the function χA : U −→ {0, 1} defined by
½
1 for x ∈ A
χA (x) =
0 for x ∈ U \ A

If f : A −→ B is a function and S is a subset of A then the image of S


under f is defined to be

f (S) = {f (x) | x ∈ S}.

Of course f (S) ⊆ f (A) = im(f ) ⊆ B. If T is a subset of the codomain B


then the pre-image of T under f is defined to be

f −1 (T ) = {x ∈ A | f (x) ∈ T }.
1.2. FUNCTIONS 7

Now f −1 (T ) is a subset of A but beware that f −1 is not in general a function.


In the case of a particular element b ∈ B one usually writes f −1 (b) instead
of f −1 ({b}), so that

f −1 (b) = {x ∈ A | f (x) = b}.

Next we consider some useful properties that functions can have.

Definition 1.2 Let A and B be two sets and f : A −→ B be a function.

1. The function f is said to be one-one or injective if f (a1 ) = f (a2 ) implies


that a1 = a2 . That is, f sends distinct elements of A to distinct elements
of B.

2. The function f is said to be onto or surjective if for every b ∈ B there


is an a ∈ A such that f (a) = b. That is, every element of B is the
image under f of some element of A.

3. The function f is said to be a one-one correspondence or bijective if it


is both one-one and onto. That is, f defines an exact matching between
the elements of the two sets A and B.

Observe that if f : A −→ B is a bijection, then f −1 can be viewed as a


function from B to A called the inverse of f. It has the properties f ◦f −1 = 1B
and f −1 ◦ f = 1A . Indeed if we think of functions as sets of ordered pairs
and if f is a bijection, then the ordered pairs of f −1 are just the pairs of f
in reverse order.
In mathematics one often needs functions of several variables, for example
the operation of addition of real numbers is a function of two variables which
assigns to each pair of real numbers (x, y) their sum x + y. Thus + is a
function from R2 to R. More generally, a function f of n variables from A
to B, or an n-ary function f from A to B, is just a function f : An −→ B.

Exercises on sets and functions

1.1. List five elements belonging to each of the following sets:

(a) {n ∈ N | n is divisible by 5}
(b) P ow({1, 2, 3, 4, 5})
(c) {n ∈ N | n + 1 is a prime }
(d) {2n | n ∈ N}
8 CHAPTER 1. SETS AND FUNCTIONS

(e) {r ∈ Q | 0 < r < 1}

1.2. Determine which of the following sets are nonempty and list their ele-
ments:

(a) {n ∈ N | n2 = 3}
(b) {n ∈ Z | 3 < |n| < 7}
(c) {x ∈ R | x < 1 and x ≥ 2}
(d) {3n + 1 | n ∈ N and n ≤ 6}
(e) {n ∈ N | n is a prime and n ≤ 15}

1.3. Consider the sets

A = {n ∈ N | n is odd }
B = {n ∈ N | n is a prime }
C = {4n + 3 | n ∈ N}
D = {x ∈ R | x2 − 8x + 15 = 0}

Which are subsets of which? Consider all sixteen possibilities.

1.4. Consider the sets

A = {n ∈ N | n ≤ 11}
B = {n ∈ N | n is even and n ≤ 20}
E = {n ∈ N | n is even}

Determine each of the following sets: A ∪ B, A ∩ B, A \ B, B \ A, A + B,


E ∩ B, B \ E, E \ B, N \ E, and A + E.

1.5. Prove that (A ∪ B) ∩ Ac ⊆ B using three different methods: first by


Venn diagrams, then directly from the definitions of the operations,
and then by using the laws of the algebra of sets (note that C ∩ B ⊆ B
for any set C).

1.6. Prove or disprove each of the following: (A proof needs to be a gen-


eral argument - you may use any method. A single counterexample is
enough to disprove an assertion)

(a) A ∩ B = A ∩ C implies B = C.
(b) A ∪ B = A ∪ C implies B = C.
(c) A ∩ B = A ∩ C and A ∪ B = A ∪ C imply B = C.
1.2. FUNCTIONS 9

(d) A ∪ B ⊆ A ∩ B implies A = B.
(e) A + B = A + C implies B = C.

1.7. Let S = {0, 1, 2, 3, 4} and T = {0, 2, 4}.

(a) How many ordered pairs are in S × T ? T × S?


(b) List or draw the elements in {(m, n) ∈ S × T | m < n}.
(c) List or draw the elements in {(m, n) ∈ T × S | m < n}.
(d) List or draw the elements in {(m, n) ∈ S × T | m + n ≥ 3}.
(e) List or draw the elements in {(m, n) ∈ T × S | mn ≥ 4}.
(f) List or draw the elements in {(m, n) ∈ S × S | m + n = 10}.

1.8. Sketch the following sets:

(a) {(m, n) ∈ N2 | − 1 ≤ m − n ≤ 1}
(b) {(m, n) ∈ N2 | m − n ≤ 2}
(c) {(x, y) ∈ R2 | x = y 2 }
(d) {(x, y) ∈ R2 | x ≤ y 2 }
(e) {(x, y) ∈ R2 | x ≥ 0, y ≥ 0, x + y = 1}
(f) {(x, y) ∈ R2 | x ≥ 0, y ≥ 0, x + y ≤ 1}

1.9. For sets A, B and C prove that (A ∩ B) × C = (A × C) ∩ (B × C) and


(A ∪ B) × C = (A × C) ∪ (B × C).

1.10. Let S = {1, 2, 3, 4, 5} and T = {a, b, c, d}. For each question below:
if the answer is “yes” give an example; if the answer is “no” explain
briefly.

(a) Are there any one-one functions from S to T ?


(b) Are there any one-one functions from T to S?
(c) Are there any functions mapping S onto T ?
(d) Are there any functions mapping T onto S?
(e) Are there any one-one correspondences between S and T ?

1.11. Let S = {1, 2, 3, 4, 5} and consider the following functions from S to S:


1S (n) = n, f (n) = 6 − n, g(n) = max{3, n} and h(n) = max{1, n − 1}.

(a) Write each of these functions as sets of ordered pairs, that is, list
the elements in their graphs.
10 CHAPTER 1. SETS AND FUNCTIONS

(b) Sketch the graph of each of these functions.


(c) Which of these functions are one-one and which are onto?

1.12. Consider the two functions from N2 to N defined by f (m, n) = 2m 3n


and g(m, n) = 2m 4n . Show that f is a one-one function but that g is
not one-one. Does f map N2 onto N? Explain.

1.13. Show that if f : A −→ B and g : B −→ C are one-one functions, then


g ◦ f is one-one.

1.14. Show that composition of functions is associative, that is h ◦ (g ◦ f ) =


(h ◦ g) ◦ f.

1.15. Here are two “shift functions” mapping N to N: f (n) = n + 1 and


g(n) = max{0, n − 1} for n ∈ N.

(a) Calculate f (n) for n = 0, 1, 2, 3, 4, 73.


(b) Calculate g(n) for n = 0, 1, 2, 3, 4, 73.
(c) Show that f is one-one but does not map N onto N.
(d) Show that g maps N onto N but is not one-one.
(e) Show that g ◦ f = 1N but that f ◦ g 6= 1N .
Chapter 2

Cardinality

We are going to develop a theory concerning the sizes or cardinalities of


infinite sets. Rather than trying to define the “size” of a set directly, it
is convenient to introduce the notion of two sets “having the same number
of elements” or “having the same cardinality”. The notion of a bijective
function (bijection) is clearly just what is required.

Definition 2.1 Two sets are said to be equipotent or to have the same num-
ber of elements or to have the same cardinality if there is a one-one corre-
spondence (bijection) between them. If X and Y are equipotent we write
X ' Y.

We also want to be able compare the size of two sets. For instance a subset
of a set should be no larger than the set itself. The following definition is
convenient.

Definition 2.2 If X and Y are sets, then X ¹ Y means there is a one-one


correspondence between X and a suitable subset Y0 ⊆ Y .

Equivalently, X ¹ Y if and only if there is a one-one function f : X −→ Y,


for then we may take Y0 = f (X). There is an important result connecting
these notions whose proof is a bit difficult and may be skipped on first read-
ing.

Theorem 2.1 (Schroder-Bernstein) If X ¹ Y and Y ¹ X, then X ' Y.

Proof: By hypothesis there is a one-one function f : X −→ Y and a one-one


function g : Y −→ X. The existence of a one-one correspondence between

11
12 CHAPTER 2. CARDINALITY

X and Y will be proved as follows: first we find a subset X1 ⊆ X such that


g(Y \ f (X1 )) = X \ X1 . Then the function h : X −→ Y defined by
½
f (a) for a ∈ X1
h(a) = −1
g (a) for a ∈ X \ X1

will be the desired one-one correspondence.


So consider the collection Ω of all subsets X0 ⊆ X such that both X \
g(Y ) ⊆ X0 and (g ◦ f )(X0 ) ⊆ X0 . Since the set X itself satisfiesT these
two conditions, the collection Ω is non-empty. Now define X1 = Ω, the
intersection of all of the subsets in Ω.
Since every set in Ω contains X \ g(Y ) it is clear that X \ g(Y ) ⊆ X1 .
Moreover, since (g ◦Tf )(X1 ) ⊆ (g ◦ f )(X0 ) ⊆ X0 for ever X0 ∈ Ω it follows
that (g ◦ f )(X1 ) ⊆ Ω = X1 . Hence X1 itself belongs to the collection Ω
and is indeed its least member.
It remains to show that the set X1 just defined has the desired property
that g(Y \ f (X1 )) = X \ X1 . This will be done by showing that each side is
contained in the other. First, since X \ g(Y ) ⊆ X1 it follows that X \ X1 ⊆
g(Y ). Then since (g ◦ f )(X1 ) ⊆ X1 it follows that X \ X1 ⊆ g(Y \ f (X1 ))
which is one of the desired inclusions.
To establish the reverse inclusion, we first prove that

(X \ g(Y )) ∪ (g ◦ f )(X1 ) = X1 . (2.1)

Since X1 ∈ Ω we have both X \ g(Y ) ⊆ X1 and (g ◦ f )(X1 ) ⊆ X1 so it is


clear the left hand side of (1) is contained in X1 , the right hand side of (1).
But (g ◦ f )((X \ g(Y )) ∪ (g ◦ f )(X1 )) ⊆ X1 so it also follows that the left
hand side of (1) belongs to Ω. Since X1 is the least member of Ω it follows
that the left hand side of (1) is actually equal to X1 as claimed.
Now the equality (1) just established implies that X1 and g(Y \f (X1 )) are
disjoint. Thus g(Y \ f (X1 )) ⊆ X \ X1 which is the desired reverse inclusion.
As previously explained, this completes the proof of the theorem.
Of particular interest to us are the countable sets and of course the finite
sets. As usual we denote the natural numbers by N = {0, 1, 2, 3, . . .}.

Definition 2.3 A set X is said to be countable if X ¹ N, that is if X


is in one-one correspondence with a subset of N. A non-empty set X is
said to be finite if it is in one-one correspondence with an initial segment
{0, 1, . . . , n − 1} of N in which case we say X has n elements. A set is
said to be infinite if it is not finite and to be countably infinite if it is both
countable and infinite. An infinite set is uncountable if it is not countable.
13

Because countable sets are of considerable importance we will investigate


a few of their properties. Clearly finite sets are countable. Further it is clear
that a subset of a countable set is countable. The following gives another
characterization of countable sets.

Lemma 2.2 A set is countable if and only if it is either finite or is in one-


one correspondence with N.

Proof: If a set is either finite or equipotent with N then it is clearly countable


by the definition. To prove the converse we will need to use the following
property of N which is essentially equivalent to the principle of mathematical
induction:

Well ordering of N: If Z is a non-empty subset of N then Z


has a smallest element (in the usual order).

To prove the lemma it suffices to show that if Y is an infinite subset of N then


there is a bijection f : N −→ Y. This will be done by inductively defining
both f and a sequence of infinite subsets

Y = Y0 ⊃ Y1 ⊃ . . . ⊃ Yn ⊃ . . .

as follows: put Y0 = Y. Suppose that Yn has been defined and is infinite. By


the well ordering of N the subset Yn has a minimal element, say an . Define
f (n) = an and put Yn+1 = Yn \ {an }. Since Yn was infinite it follow that Yn+1
is also infinite. The f so defined is clearly one-one and its values form an in-
creasing sequence so any element b ∈ Y will be among {f (0), f (1), . . . , f (b)}.
Thus f is onto and a bijection. This proves the lemma.
Essentially the same proof shows the following:

Lemma 2.3 If Y is an infinite set then Y contains a countably infinite sub-


set.

Proof: It suffices to show that if Y is an infinite set then there is a one-one


function f : N −→ Y. This will be done by inductively defining both f and
a sequence of infinite subsets

Y = Y 0 ⊃ Y1 ⊃ . . . ⊃ Y n ⊃ . . .

as follows: put Y0 = Y. Suppose that Yn has been defined and is infinite.


Choose any element say an ∈ Yn . Define f (n) = an and put Yn+1 = Yn \ {an }.
Since Yn was infinite it follow that Yn+1 is also infinite. The f so defined is
clearly one-one. This proves the lemma.
14 CHAPTER 2. CARDINALITY

Intuitively then an infinite set Y is countable if its elements can be ex-


haustively listed as say

Y = {a0 , a1 , a2 , . . . , an , . . .}

(not necessarily an effective listing by a machine). It is useful to know that


a number of other sets are countable.

Lemma 2.4 The set N<∞ of all finite sequences of natural numbers is count-
able. Hence, in particular, the sets Nk of all k-tuples of natural numbers, the
set Z of integers and the set Q of rational numbers are all countable.

Proof: From number theory we know that every natural number greater than
1 can be uniquely expressed as a product of powers of prime numbers and
that there are infinitely many prime numbers. Let p0 = 2, p1 = 3, . . . be the
prime numbers in increasing order. (The primes are clearly a countable set).
Define a function f : N<∞ −→ N as follows: if < b0 , b1 , . . . , bn > is a finite
sequence of natural numbers, then define

f (< b0 , b1 , . . . , bn >) = p0b0 +1 · p1b1 +1 · · · pnbn +1 .

For example, f (< 17, 0, 3, 1988 >) = 218 · 31 · 54 · 71989 . By the uniqueness of
factorization, f is a one-one function and hence defines a one-one correspon-
dence between N<∞ and its image in N. Hence N<∞ is countable. Each of
the other sets mentioned is either a subset or is easily put in one-one corre-
spondence with a subset of N<∞ and hence is also countable. This completes
the proof.
Naively one might have thought that all infinite sets are of the same size.
Thus one can ask whether or not all sets are countable. The next result due
to Cantor asserts that the real numbers are uncountable. As usual we think
of a real number as a decimal expansion

n.b0 b1 . . . bk . . .

where n ∈ Z and each bk is one of the digits 0, 1, . . . , 9. As usual a decimal


expansion such as .32456999999 . . . ending in an infinite sequence of the digit
9 will be identified with the appropriate expansion .3245700000 . . . ending
in an infinite sequence of the digit 0. In proving the following result Can-
tor introduced a new type of reasoning into mathematics called a diagonal
argument.

Theorem 2.5 The real numbers R are uncountable. Indeed the real numbers
in the interval (0, 1) are uncountable.
15

Proof: (diagonal argument) Suppose on the contrary that the real numbers
in (0, 1) were countable, say (0, 1) = {a0 , a1 , a2 , . . .}. If we list these vertically
in decimal expansion form we get a sort of table of digits:

a0 = .b00 b01 b02 b03 . . .


a1 = .b10 b11 b12 b13 . . .
a2 = .b20 b21 b22 b23 . . .
..
.
an = .bn0 bn1 bn2 bn3 . . .
..
.

Here each bij is one of the digits 0, . . . , 9. We view these bij as an infinite
array and consider the sequence down the long diagonal:

b00 , b11 , b22 , . . . bnn . . . .

Define a real number c = .c0 c1 c2 . . . as follows:


½
5 if bii = 4
ci =
4 if bii 6= 4

For example if the array began

a0 = .7316 . . .
a1 = .1423 . . .
a2 = .3251 . . .

then c would begin c = .454 . . . . Note that the digits ci of c are constructed
so that, for all i, ci 6= bii . Clearly the real number c defined by this decimal
expansion lies in the interval (0, 1) and so by our previous assumption that
(0, 1) = {a0 , a1 , a2 , . . .} for some k we must have c = ak . Therefore the k-th
digit ck in the decimal expansion of c is just bkk , that is ck = bkk . But by
construction ci 6= bii for all i which is a contradiction. Thus (0, 1) could not
have been countable and the theorem is proved.

Definition 2.4 If X and Y are sets, then Y X denotes the set of all functions
from X to Y. The set of all subsets of X is denoted P ow(X), called the power
set of X.

It is also customary to denote P ow(X) by 2X . The reason for this notation


is as follows. In set theory it is convenient to define 0 as the empty set, define
1 as the singleton set {0}, define 2 as the set {0, {0}} = {0, 1} and generally
define the natural number n as the set {0, . . . , n − 1}. All we need of this is
16 CHAPTER 2. CARDINALITY

to think of 2 = {0, 1}. Thus 2X is the set of all functions from X to the set
consisting of two elements 2 = {0, 1}. Now if f ∈ 2X then f determines a
subset Z f ⊆ X by the rule Z f = {a ∈ X|f (a) = 1}. Thus we have associated
to each f ∈ 2X an element Z f ∈ P ow(X). In fact the association f −→ Z f
is a one-one correspondence. To see this observe that to a subset W ⊆ X
one can associate its characteristic function χW ∈ 2X defined by the rule
½
1 if a ∈ W
χW (a) =
0 if a ∈
/W

One can now check that Z (χW ) = W and that χ(Z f ) = f so that both of these
associations are one-one correspondences.
It is clear that for any set X, X ¹ P ow(X) for the function f : X −→
P ow(X) defined by f (a) = {a} is one-one. However, the following result
again due to Cantor says that P ow(X) 6¹ X.

Theorem 2.6 For any set X, the sets X and P ow(X) are not equipotent.

Proof: Suppose on the contrary that there were a one-one correspondence


f : X −→ P ow(X). Define W = {a ∈ X|a ∈ / f (a)}. Now W ⊆ X so, since f
is onto, for some particular a0 ∈ X we must have f (a0 ) = W. But then

a0 ∈ f (a0 )↔a0 ∈ W ↔a0 ∈


/ f (a0 ).

This is a contradiction, proving the theorem. We remark that this type of


argument is also called a diagonal argument.
It follows from this theorem that P ow(X), P ow(P ow(X)), . . . defines an
infinite sequence of sets of increasing cardinality. Hence, there are an infinite
number of mutually non-equipotent infinite sets (that is there are infinitely
many infinite cardinal numbers). Actually the situation is much more compli-
cated than our brief discussion can indicate and the study of infinite cardinal
numbers is a deep and important branch of set theory.
17

Exercises on cardinality

2.1. Construct an explicit bijection between the natural numbers N and the
integers Z.
2.2. Construct an explicit bijection between [0, 1] and (2, 3)
2.3. Let a < b be real numbers. Find an explicit bijection between the open
interval (a, b) and the interval (0, 1). Use this and a suitable function
from the calculus or trigonometry to construct an explicit bijection
from (0, 1) onto all of the real numbers R.
2.4. Consider a countable sequence of sets A0 , A1 , A2 , . . . of sets each of
which is countable. Show that their union
[
A∞ = Ai
i∈N

is also a countable set. (Hint: The sets Ai may not be disjoint. Replace
the Ai by a disjoint sequence Bi still having A∞ as it’s union.)
2.5. Consider the infinite binary branching tree T rooted at the vertex v,
the initial portion of which is illustrated below. A branch of T is an
infinite reduced path beginning at v. Show that T has uncountably
many branches.
.. .. .. .. .. .. .. ..
. . . . . . . .
u u u u u u u u
@u @u @u @u
@ @
@u @u
HH 
HH
u 
v
[Hint: there is a unique reduced path from v to any vertex. Such a path
is determined by a sequence of left versus right branching decisions
at lower vertices. Thus one can associate to any branch an infinite
sequence of l’s and r’s which specify the path completely.]
2.6. Let C be the subset of the unit interval (0, 1) consisting of those num-
bers whose decimal representation contains the digit 4. Show that
C ' (0, 1). Show further that for any 0 ≤ a < b ≤ 1 the interval (a, b)
contains a subinterval (c, d) ⊆ (a, b) such that (c, d) ⊆ C. Hence the
complement (0, 1) \ C does not contain any open interval of the form
(a, b). Show that the complement (0, 1) \ C is uncountable.

You might also like