You are on page 1of 12

3 Countable and Uncountable Sets

A set A is said to be finite, if A is empty or there is n ∈ N and there is a


bijection f : {1, . . . , n} → A. Otherwise the set A is called infinite. Two
sets A and B are called equinumerous, written A ∼ B, if there is a bijection
f : X → Y . A set A is called countably infinite if A ∼ N. We say that A is
countable if A ∼ N or A is finite.

Example 3.1. The sets (0, ∞) and R are equinumerous. Indeed, the func-
tion f : R → (0, ∞) defined by f (x) = ex is a bijection.

Example 3.2. The set Z of integers is countably infinite. Define f : N → Z


by !
n/2 if n is even;
f (n) =
−(n − 1)/2 if n is odd.
Then f is a bijection from N to Z so that N ∼ Z.

If there is no bijection between N and A, then A is called uncountable.

Theorem 3.3. There is no surjection from a set A to P(A).

Proof. Consider any function f : A → P(A) and let

B = {a ∈ A| a &∈ f (a)}.

We claim that there is no b ∈ A such that f (b) = B. Indeed, assume


f (b) = B for some b ∈ A. Then either b ∈ B hence b &∈ f (b) which is
a contradiction, or b &∈ B = f (b) implying that b ∈ B which is again a
contradiction. Hence the map f is not surjective as claimed. !

As a corollary we have the following result.

Corollary 3.4. The set P(N) is uncountable.

Proposition 3.5. Any subset of a countable set is countable.

Proof. Without loss of generality we may assume that A is an infinite subset


of N. We define h : N → A as follows. Let h(1) = min A. Since A is infinite,
A is nonempty and so h() is well-defined. Having defined h(n − 1), we
define h(n) = min(A \ {h(1), . . . , h(n − 1)}). Again since A is infinite the set
(A \ {h(1), . . . , h(n − 1)}) is nonempty, h(n) is well-defined. We claim that
h is a bijection. We first show that h is an injection. To see this we prove
that h(n + k) > h(n) for all n, k ∈ N. By construction h(n + 1) > h(n)

11
for all n ∈ N. Then setting B = {k ∈ N| h(n + k) > h(n)} we see that
1 ∈ B and if h(n + (k − 1)) > h(n), then h(n + k) > h(n + (k − 1)) > h(n).
Consequently, B = N. Since n was arbitrary, h(n + k) > h(n) for all
n, k ∈ N. Now taking distinct n, m ∈ N we may assume that m > n so that
m = n + k. By the above h(m) = h(n + k) > h(n) proving that h is an
injection. Next we show that h is a surjection. To do this we first show that
h(n) ≥ n. Let C = {n ∈ N| h(n) ≥ n}. Clearly, 1 ∈ C. If k ∈ C, then
h(k + 1) > h(k) ≥ n so that h(k + 1) ≥ k + 1. Hence k + 1 ∈ C and by the
principle of mathematical induction C = N. Now take n0 ∈ A. We have to
show that h(m0 ) = n0 for some m0 ∈ N. If n0 = 1, then m0 = 1. So assume
that n0 ≥ 2. Consider the set D = {n ∈ A| h(n) ≥ n0 }. Since h(n0 ) ≥ n0 ,
the set D is nonempty and by the well-ordering principle D has a minimum.
Let m0 = min D. If m0 = 1, then h(m0 ) = min A ≤ n0 ≤ h(m0 ) and
hence h(m0 ) = n0 . So we may also assume that n> min A. Then h(m0 ) ≥
n0 > h(m0 − 1) > . . . > h(1) in view of definitions of m0 and h. Since
h(m0 ) = min(A \ {h(1), . . . , h(m0 − 1)}) and n0 ∈ A \ {h(1), . . . , h(m0 − 1)}
and h(m0 ) ≥ n0 , it follows that h(m0 ) = n0 . This proves that h is also a
surjection. !

Proposition 3.6. Let A be a non-empty set. Then the following are equiv-
alent.

(a) A is countable.

(b) There exists a surjection f : N → A.

(c) There exists an injection g : A → N.

Proof. (a) =⇒ (b) If A is countably infinite, then there exists a bijection


f : N → A and then (b) follows. If A is finite, then there is bijection
h : {1, . . . , n} → A for some n. Then the function f : N → A defined by
!
h(i) 1 ≤ i ≤ n,
f (i) =
h(n) i > n.

is a surjection.
(b) =⇒ (c). Assume that f : N → A is a surjection. We claim that there is
an injection g; A → N. To define g note that if a ∈ A, then f −1 ({a}) &= ∅.
Hence we set g(a) = min f −1 ((a)}). Now note that if a &= a" , then the sets
f −1 ({a}) ∩ f −1 ({a" }) = ∅ which implies min−1 ({a}) &= min−1 ({a" }). Hence
g(a) &= g(a" )and g : A → N is an injective.
(c) ⇒ (a). Assume that g : A → N is an injection. We want to show that A

12
is countable. Since g : A → g(A) is a bijection and g(A) ⊂ N, Proposition
3.5 implies that A is countable. !

Corollary 3.7. The set N × N is countable.

Proof. By Proposition 3.6 it suffices to construct an injective function f :


N × N → N. Define f : N × N → N by f (n, m) = 2n 3m . Assume that
2n 3m = 2k 3l . If n < k, then 3m = 2k−n 3l . The left side of this equality is
an odd number whereas the right is an even number implying n = k and
3m = 3l . Then also m = l. Hence f is injective. !

Proposition 3.8. If A and B are countable, then A × B is countable.

Proof. Since A and B are countable, there exist surjective functions f : N →


A and g : N → B. Define h : N×N → A×B by F (n, m) = (f (n), g(m)). The
function F is surjective. Since N×N is countably infinite, there is a bijection
h : N → N × N. Then G : N × A × B defined by G = F ◦ h is a surjection.
By part (c) of Proposition 3.6, the set A × B A × B is countable. !

Corollary 3.9. The set Q of all rational numbers is countable.

Proposition 3.10. Assume


" that the set I is countable and Ai is countable
for every i ∈ I . Then i∈I Ai is countable.

Proof. For each i ∈ I, there exists a surjection fi : N → Ai . Moreover, since


I"is countable, there exists a surjection g : N → I. Now define h : N × N →
i∈I Ai by F (n, m) = fg(n) (m) and let h : N → N×N " be a bijection. Then F
" composition G = F ◦ h : N → i∈I Ai is a surjection.
is a surjection and the
By Proposition 3.6, i∈i Ai is countable. !

Proposition 3.11. The set of real numbers R is uncountable.

The proof will be a consequence of the following result about nested


intervals.

Proposition 3.12. Assume that (In )n∈N is a countable collection of closed


and bounded intervals In = an , bn ] satisfying In+1 ⊂ In for all n ∈ N. Then
#
n∈N In &= ∅.

Proof. Since [an+1 , bn+1 ] ⊂ [an , bn ] for all n, it follows that an ≤ bk for all
n, k ∈ N. So, the set A = {an | n ∈ N} is bounded above by every bk and
consequently a := sup A ≤ bk for all k ∈ N. But this implies that the set
# = {bk | k ∈ N} is bounded below by a so that a ≤ b := inf B. Hence
B
n∈N In = [a, b]. !

13
Proof of Proposition 3.11. Arguing by contradiction assume that R is count-
able. Let x1 , x2 , x3 , . . . be enumeration of R. Choose a closed bounded inter-
val I1 such that x1 &∈ I1 . Having chosen the closed intervals I1 , I2 , . . . , In−1 ,
we choose the closed interval In to be a subset of In−1 such that xn &∈ In .
Consequently, we have a countable collection of closed bounded intervals
#n ) such that In+1 ⊂ In and xn &∈ In . Then by the above proposition,
(I
n∈N In &= ∅. Observe that if x belongs to this intersection, then x is not
on the list x1 , x2 , . . ., contradiction.
!

14
46 I Foundations

6 Countability
In the previous section we saw that ‘infinite sets’ are necessary for the construction
of the natural numbers. However, the bijection N → 2N, n "→ 2n, which suggests
that there are exactly as many even numbers as natural numbers, encourages
caution in dealing with infinity. How can there be room for the odd numbers
1, 3, 5, . . . in N? In this section we consider the concept of infinity again, and, in
particular, we show that there is more than one kind of infinity.
A set X is called finite, if X is empty or if there are n ∈ N× and a bijection
from {1, . . . , n} to X. If a set is not finite, it is called infinite.

6.1 Examples (a) The set N is infinite.


Proof Suppose, to the contrary, that N is finite. Since N is nonempty, there is a bijec-
tion ϕ from N to {1, . . . , m} for some m ∈ N× . Thus ψ := ϕ | {1, . . . , m} is an injection
from {1, . . . , m} to itself, and so, by Exercise 1, a bijection. Since ϕ(m + 1) ∈ {1, . . . , m}
there is, in particular, some n ∈ {1, . . . , m} such that ϕ(n) = ψ(n) = ϕ(m + 1). But this
contradicts the injectivity of ϕ. !

(b) It is not difficult to see that any infinite system as in Remark 5.2(a) is an
infinite set (see Exercise 2). !

The above discussion suggests that the ‘size’ of a finite set X can be deter-
mined by counting, that is, with a bijection from {1, . . . , n} to X. For infinite sets,
of course, this idea will not work. Nonetheless it is very useful to define Num(X)
for both infinite and finite sets by

 0,
 X=∅,
Num(X) := n, n ∈ N× and a bijection from {1, . . . , n} to X exists ,

 ∞, X is infinite .1

If X is finite with Num(X) = n ∈ N, then we say that X has n elements or


that X is an n element set.

6.2 Remark If m, n ∈ N× and ϕ and ψ are bijections from X to {1, . . . , m} and


{1, . . . , n} respectively, then ϕ ◦ ψ −1 is a bijection from {1, . . . , n} to {1, . . . , m},
and it follows from Exercise 2 that m = n. Thus the above definition makes sense,
that is, Num(X) is well defined. !

1 Thesymbol ∞ (‘infinity’) is not a natural number. It is nonetheless useful to (par-


tially) extend addition and multiplication on N to N̄ := N ∪ {∞} using the conventions
n + ∞ := ∞ + n := ∞ for all n ∈ N̄, and n · ∞ := ∞ · n := ∞ for n ∈ N× ∪ {∞}. Further, we
define n < ∞ for all n ∈ N.
I.6 Countability 47

Permutations

Let X be a finite set. A bijective function from X to itself is called a permutation


of X. (Note that, by Exercise 1, an injective function from X to itself is necessarily
bijective too.) We denote the set of all permutations of X by SX .

6.3 Proposition If X is an n element set, then Num(SX ) = n! . That is, there are
n! permutations of an n element set.

Proof We consider first the case when X = ∅. Then there is a unique function
∅ : ∅ → ∅. This is function is bijective2 so the claim is true this case.
We prove the case n ∈ N× by induction. Since SX = {idX } for any one ele-
ment set X, we can start the induction with n0 = 1. The induction hypothesis is
that for each n element set X, we have Num(SX ) = n! .
Now let Y = {a1 , . . . , an+1 } be an (n + 1) element set. In view of the in-
duction hypothesis, there are, for each j ∈ {1, . . . , n + 1}, exactly n! permutations
of Y which send aj to a1 . So in total (see Exercise 5) there are (n + 1)n! = (n + 1)!
permutations of Y . !

Equinumerous Sets

Two sets X and Y are called equinumerous or equipotent, written X ∼ Y , if there


is a bijection from X to Y . If M is a set of sets then ∼ is clearly an equivalence
relation on M (see Proposition 3.6).
A set X is called countably infinite if X ∼ N, and we say X is countable if
X ∼ N or X is finite. Finally, X is uncountable if X is not countable.

6.4 Remark If X ∼ N then it follows from Example 6.1(a) that X is not finite.
Thus a set cannot be both finite and countably infinite. !

Of course, the set of natural numbers is countably infinite. More interest-


ing is the observation that proper subsets of countably infinite sets can them-
selves be countably infinite, as the example of the set of even natural numbers
2N = { 2n ; n ∈ N } shows. In the other direction, we will meet, in the next sec-
tion, countably infinite sets which properly contain N.
Before we investigate further the properties of countable sets, we show the
existence of uncountable sets. To that end we prove the following fundamental
result due to G. Cantor.
2 This is vacuously true since none of the conditions in the definition of bijective is ever tested.

The real intention here is not to make n = 0 a special case, thus avoiding cumbersome case
distinctions in upcoming proofs.
48 I Foundations

6.5 Theorem There is no surjection from a set X to P(X).

Proof For a function ϕ : X → P(X), consider the subset


% &
A := x ∈ X ; x ∈
/ ϕ(x)

of X. We show that A is not in the image of ϕ. Indeed if y ∈ X with ϕ(y) = A,


then either y ∈ A and hence y ∈/ ϕ(y) = A, a contradiction, or y ∈/ A = ϕ(y) and
so y ∈ A which is also a contradiction. This shows that ϕ is not surjective. !

An immediate consequence of this theorem is the existence of uncountable


sets.

6.6 Corollary P(N) is uncountable.

Countable Sets

We now return to countable sets and prove some seemingly obvious propositions:

6.7 Proposition Any subset of a countable set is countable.

Proof (a) Let X be a countable set and A ⊆ X. We are done if A is finite (see
Exercise 9), so we can assume that A is infinite, in which case X must be countably
infinite. That is, there are a bijection ϕ from X to N and a bijection ψ := ϕ |A
from A to ϕ(A). Therefore we can assume, without loss of generality, that X = N
and A is an infinite subset of N.
(b) We define recursively a function α : N → A by
% &
α(0) := min(A) , α(n + 1) := min m ∈ A ; m > α(n) .

Because of Proposition 5.5 and the supposition that Num(A) = ∞, α : N → A is


well defined. It is clear that

α(n + 1) > α(n) , α(n + 1) ≥ α(n) + 1 , n∈N. (6.1)

(c) We have α(n + k) > α(n) for n ∈ N and k ∈ N× . This follows easily from
the first inequality of (6.1) by induction on k. In particular, α is injective.
(d) We verify the surjectivity of α. First we prove by induction that

α(m) ≥ m , m∈N. (6.2)

For m = 0, this is certainly true. The induction step m → m + 1 follows from the
second inequality of (6.1) and the induction hypothesis,

α(m + 1) ≥ α(m) + 1 ≥ m + 1 .
I.6 Countability 49

Now let n0 ∈ A be given.


% We need to find some
& m0 ∈ N such that α(m0 ) = n0 .
Consider the set B := m ∈ N ; α(m) ≥ n0 . Because of (6.2), B is not empty.
So there exists, by Proposition 5.5, some m0 := min(B). If m0 = 0, then

min(A) = α(0) ≥ n0 ≥ min(A) ,

and hence n0 = α(0). So we can suppose that n0 > min(A) and so m0 ∈ N× . But
then α(m0 − 1) < n0 ≤ α(m0 ) and, by the definition of α, we have α(m0 ) = n0 . !

6.8 Proposition A countable union of countable sets is countable.

Proof For each n ∈ N, let Xn be a countable set. By Proposition 6.7, we can


assume that the Xn are countably infinite and pairwise disjoint. Thus we have
Xn = {xn,k ; k ∈ N } with xn,k ,= xn,j for k ,= j, that is, xn,k is the image
'∞of k ∈ N
under a bijection from N to Xn . Now we order the elements of X := n=0 Xn as
indicated by the arrows in the ‘infinite matrix’ below. This induces a bijection
from X to N.
x0,0 $ x0,2
x0,1 x0,3 $ x0,4 . . .
#
" " #
" " ..
!" %
" " %
" .
x1,0 x1,1 x1,2 x1,3
%
"" " #
" %
" " ..
x2,0 x2,1 x2,2 .
!""
# %" . (6.3)
.
" .
x3,0 x3,1
%" ..
.
"
x4,0
..
.

We leave to the reader the task of defining this bijection explicitly. !

6.9 Proposition A finite product of countable sets is countable.


(n
Proof Let Xj , j = 0, 1, . . . , n be countable sets, and X := j=0 Xj . By definition
)(n−1 *
X= j=0 Xj × Xn , so it suffices to consider the case n = 1. Thus we suppose
X := X0 × X1 with X0 and X1 countably infinite. Write X0 = { yk ; k ∈ N } and
X1 = { zk ; k ∈ N }, and set xj,k := (yj , zk ) for j, k ∈ N. Using this notation we
have X = { xj,k ; j, k ∈ N } and so we can use (6.3) again to define a bijection
from X to N. !

Infinite Products

Proposition 6.9 is no longer correct if we allow ‘infinite products’ of countable


sets. To make this claim more precise, we need to explain first what an ‘infinite
product’ is. Suppose that { X(α ; α ∈ A } is a family of subsets of a fixed set.
Then the Cartesian product α∈A Xα is defined to be the set of all functions
50 I Foundations

'
ϕ : A → α∈A Xα such that ϕ(α) ∈ Xα for each α ∈ A. In place of ϕ one often
writes { xα ; α ∈ A }, where, of course, xα := ϕ(α).
× (
In the special case that
(n A = {1, . . . , n} for some n ∈ N , α∈A Xα is clearly
identical to the product k=1 Xk which ( was introduced in Section 2. If Xα = X
for each α ∈ A, then we write X A := α∈A Xα .
(
6.10 Remark It is clear that α∈A Xα = ∅ if one (or more) of the Xα is empty. ( On the
other hand, even if Xα #= ∅ for each α ∈ A, it is not possible to prove that α∈A Xα is
nonempty using the axioms of'set theory we have seen so far. To do that one needs to
know that a function ϕ : A → α∈A Xα exists such that ϕ(α) ∈ Xα for each α ∈ A, that
is, a rule which chooses a single element from each set Xα . To ensure that such a function
exists one needs the axiom of choice, which we formulate as follows: For any family of
sets { Xα ; α ∈ A }, +
Xα #= ∅ ⇐⇒ (Xα #= ∅ ∀ α ∈ A) .
α∈A

In the following we will use this naturally appearing axiom without comment. Readers
who are interested in the foundations of mathematics are directed to the literature, for
example, [Ebb77] and [FP85]. !

Surprisingly, in contrast to Proposition 6.9, countably infinite products of


finite sets are, in general, not countable, as the following proposition shows.

6.11 Proposition The set {0, 1}N is uncountable.

Proof Let A ∈ P(N). Then the characteristic function χA is an element of {0, 1}N .
It is clear that the function

P(N) → {0, 1}N , A "→ χA (6.4)

is injective. For ϕ ∈ {0, 1}N , let A(ϕ) := ϕ−1 (1) ∈ P(N). Then χA(ϕ) = ϕ. This
shows that the function (6.4) is surjective. (See also Exercise 3.6.) Thus {0, 1}N
and P(N) are equinumerous and the claim follows from Corollary 6.6. !

6.12 Corollary The sets {0, 1}N and P(N) are equinumerous.

Exercises
1 Let n ∈ N× . Prove that any injective function from {1, . . . , n} to itself is bijective.
(Hint: Use induction on n. Let f : {1, . . . , n + 1} → {1, . . . , n + 1} be an injective function
and k := f (n + 1). Consider the functions


 n+1 , j=k ,
g(j) := k, j =n+1 ,

 j otherwise ,

together with h := g ◦ f and h | {1, . . . , n}.)


I.6 Countability 51

2 Prove the following:


(a) Let m, n ∈ N× . Then there is a bijective function from {1, . . . , m} to {1, . . . , n} if and
only if m = n.
(b) If M is an infinite system, then Num(M ) = ∞ (Hint: Exercise 1).
)n*
3 Show that the number of m element subsets of an n element set is m . (Hint: Let N
be an n element set and M an m element subset of N . From Proposition 6.3 deduce that
there are m! (n − m)! bijections from {1, . . . , n} to N such that {1, . . . , m} goes to M .)
4 Let M and N be finite sets. How many injective functions are there from M to N ?
'
5 Let X0 , . . . , Xm be finite sets. Show that X := mj=0 Xj is also finite and that

m
,
Num(X) ≤ Num(Xj ) .
j=0

When do we get equality?


(m
6 Let X0 , . . . , Xm be finite sets. Prove that X := j=0 Xj is also finite and that
m
+
Num(X) = Num(Xj ) .
j=0

7 Show that a nonempty set X is countable if and only if there is a surjection from N
to X.
8 Let X be a countable set. Show that the set of all finite subsets of X is countable.
(Hint: Consider the functions X n → En (X), (x1 , . . . , xn ) ,→ {x1 , . . . , xn } where En (X)
is the set of all subsets with at most n elements.)
9 Show that any subset of a finite set is finite.

You might also like