Infinity: Countable, Uncountable, and Cantor’s Diagonal Argument
What this article is about
Infinite sets come in more than one size. Some can be written out as a list, item after item; others are too big for any list. The account here follows chapter 4 of the Open Logic Project’s Sets, Logic, Computation, titled “The Size of Sets” [1].
1. Listing a set: enumerations
Take any set A. In the book’s informal definition (Definition 4.1), an enumeration lists the elements of A, possibly without end, so that each element of A turns up at some finite place. Sets with an enumeration are called countable [1, p. 47]. Listing an element twice does no damage, since a set with an enumeration also has one in which nothing repeats (Proposition 4.2) [1, p. 48].
The formal version: for a nonempty set A, an enumeration of A is any surjection from the positive integers ℤ⁺ onto A, and A is countable when it is either empty or enumerable (Definitions 4.3 and 4.4) [1, pp. 48–49]. Another way to say the same thing: a nonempty countable set is the image of a bijection whose domain is either all of ℕ or an initial segment {0, …, n} (Corollary 4.11) [1, p. 51]. Some easy cases: f(n) = n lists the positive integers, f(n) = 2n lists the even ones, and g(n) = 2n − 1 the odd ones [1, p. 49].
2. Bigger-looking sets that are still countable
At first sight ℕ × ℕ, which collects every pair of natural numbers, has more members than ℕ, yet it too is countable (Proposition 4.12) [1, p. 52]. The zig-zag method, Cantor’s, puts the pairs into an infinite grid, with ⟨n, m⟩ placed at row n and column m so that no pair is missing, and then walks through the grid along its diagonals to get a single sequence: ⟨0, 0⟩ first, then the two pairs whose numbers add up to 1, then the three that add up to 2, and so on [1, pp. 51–52]. For every n, the set ℕⁿ of n-tuples of natural numbers is countable in the same way (Proposition 4.13) [1, p. 53]. A pairing function expresses this in arithmetic: an injective function from A × B into ℕ, which assigns each pair its own number as a code (Definition 4.14) [1, p. 54].
3. Cantor’s diagonal argument
To prove a set A uncountable, one must show that any list of A’s members misses at least one. Cantor’s diagonal method does exactly that: from any list x₁, x₂, … it builds a member of A, and the construction itself guarantees that this member is not on the list [1, p. 57].
The book’s first case (Theorem 4.17) is the uncountability of B^ω, the set of all endless, gap-free sequences of 0s and 1s [1, p. 57]. Assume s₁, s₂, s₃, … lists every such sequence. Stack them as the rows of an array and go down its diagonal, taking position n of row n; flip each of these digits, 0 to 1 and 1 to 0. The new sequence s disagrees with row n at position n for every n, so it cannot be any row of the list [1, pp. 57–58]. Since this works whatever the list, no list has room for all of B^ω [1, pp. 57–59].
The diagonal idea also shows that ℘(ℤ⁺), whose members are all the subsets of ℤ⁺, is uncountable (Theorem 4.18) [1, p. 59]. A second proof in the book is by reduction: each set of positive integers is paired with a sequence of 0s and 1s. The book cautions that a reduction only works in one direction. Sending each sequence in B^ω to its first digit maps B^ω onto {0, 1}, yet {0, 1} is plainly finite, so this map proves nothing about {0, 1} being uncountable [1, pp. 61–62].
4. Comparing sizes
A and B are equinumerous, written A ≈ B, when some bijection links them (Definition 4.19). The relation ≈ is reflexive, symmetric and transitive (Proposition 4.20), and a set equinumerous with a countable set is countable too [1, p. 63]. For comparing sizes the book defines “A is no larger than B, written A ⪯ B, iff there is an injection f : A → B” and “A is smaller than B, written A ≺ B, iff there is an injection f : A → B but no bijection g : A → B” (Definitions 4.22 and 4.23) [1, p. 64].
In 1892 Cantor proved that the diagonal result holds in full generality (Theorem 4.24, Cantor’s theorem): A ≺ ℘(A) for every set A [1, p. 65]. No set is as large as the set of its own subsets. (A consequence, which the book does not spell out: infinite sizes have no largest member.)
Theorem 4.25, named for Schröder and Bernstein, says that injections running both ways between two sets yield a bijection; given B ⪯ A as well as A ⪯ B, A ≈ B follows [1, p. 66]. The book says the proof is “really rather difficult”, and that “although Cantor stated the result, others proved it” [1, p. 66].
Not covered here
- Why the real numbers are uncountable: the chapter sets this as an exercise (Problem 4.25) and does not work it [1, p. 70]. The continuum hypothesis is not taken up in this chapter.
- The proof of Cantor’s theorem [1, pp. 65–66]. The chapter does not prove Schröder–Bernstein either; it tells the reader, “For now, you can (and must) take it on trust” [1, p. 66].
Sources
[1]Open Logic Project, Sets, Logic, Computation: An Open Introduction to Metalogic, chapter 4 “The Size of Sets” (pp. 46–66; Problem 4.25, p. 70). View at source ↗
Works cited
- Richard Zach, Sets, Logic, Computation: An Open Introduction to Metalogic (Open Logic Project, F25). builds.openlogicproject.org/courses/sets-logic-computation. License: CC BY 4.0.