Reading preferences
Optional display controls need JavaScript. All reading content and navigation work without it.
How to use Read
This page follows the source chapter in ordinary reading order. Equations remain native MathML so compatible screen readers and braille systems can navigate their internal structure. Each small source link returns to the exact source line.
Introduction
When Georg Cantor developed set theory in the 1870s, one of his aims was to make palatable the idea of an infinite collection—an actual infinity, as the medievals would say. A key part of this was his treatment of the size of different sets. If source 16, source 16 and source 16 are all distinct, then the set source 17 is intuitively larger than source 18. But what about infinite sets? Are they all as large as each other? It turns out that they are not.
The first important idea here is that of an enumeration. We can list every finite set by listing all its elements. For some infinite sets, we can also list all their elements if we allow the list itself to be infinite. Such sets are called enumerable. Cantor's surprising result, which we will fully understand by the end of this chapter, was that some infinite sets are not enumerable.
Enumerations and Enumerable Sets
Definition: Informal enumeration
Informally, an enumeration of a set source 28 is a list (possibly infinite) of elements of source 29 such that every element of source 29 appears on the list at some finite position. If source 30 has an enumeration, then source 31 is said to be enumerable.
Proposition: Removing repetitions from an enumeration
If source 69 has an enumeration, it has an enumeration without repetitions.
Proof
Suppose source 74 has an enumeration source 74, source 74, … in which each source 75 is an element of source 75. We can remove repetitions from an enumeration by removing repeated elements. For instance, we can turn the enumeration into a new one in which we list source 77 if it is a element of source 78 that is not among source 78, …, source 79 or remove source 79 from the list if it already appears among source 80, …, source 80.
End of proof.
The last argument shows that in order to get a good handle on enumerations and enumerable sets and to prove things about them, we need a more precise definition. The following provides it.
Definition: Enumeration as a surjection from the positive integers
An enumeration of a set source 88 is any surjective function source 89.
Definition: Enumerable sets
A set source 115 is enumerable iff it is empty or has an enumeration.
Example: Enumerating the positive integers and natural numbers
A function enumerating the positive integers (source 119) is simply the identity function given by source 120. A function enumerating the natural numbers source 121 is the function source 121.
Example: Enumerating positive even and odd integers
The functions source 125 and source 125 given by source 127 enumerate the even positive integers and the odd positive integers, respectively. However, neither function is an enumeration of source 133, since neither is surjective.
Exercise: Enumerating the positive square numbers
Define an enumeration of the positive squares source 137, source 137, source 137, source 137, …
Example: Alternating enumeration of the integers from positive inputs
The function source 141 (where source 142 denotes the ceiling function, which rounds source 143 up to the nearest integer) enumerates the set of integers source 144. Notice how source 144 generates the values of source 144 by “hopping” back and forth between positive and negative integers: source 146 You can also think of source 154 as defined by cases as follows: source 155
Exercise: Union of two enumerable sets using positive-integer enumerations
Show that if source 165 and source 165 are enumerable, so is source 165. To do this, suppose there are surjective functions source 166 and source 167, and define a surjective function source 168 and prove that it is surjective. Also consider the cases where source 169 or source 169.
Exercise: Enumerable subsets of enumerable sets
Show that if source 173 and source 173 is enumerable, so is source 173. To do this, suppose there is a surjective function source 174. Define a surjective function source 175 and prove that it is surjective. What happens if source 176?
Exercise: Finite unions of enumerable sets using induction
Show by induction on source 180 that if source 180, source 180, …, source 180 are all enumerable, so is source 181. You may assume the fact that if two sets source 182 and source 182 are enumerable, so is source 182.
Although it is perhaps more natural when listing the elements of a set to start counting from the source 187st element, mathematicians like to use the natural numbers source 188 for counting things. They talk about the source 189th, source 189st, source 189nd, and so on, elements of a list. Correspondingly, we can define an enumeration as a surjective function from source 191 to source 191. Of course, the two definitions are equivalent.
Proposition: Shifting enumerations between positive and natural indices
There is a surjection source 195 iff there is a surjection source 196.
Proof
Given a surjection source 200, we can define source 200 for all source 201. It is easy to see that source 201 is surjective. Conversely, given a surjection source 202, define source 203.
End of proof.
This gives us the following result:
Corollary: Enumerable sets via surjections from the natural numbers
A set source 209 is enumerable iff it is empty or there is a surjective function source 210.
We discussed above that a list of elements of a set source 213 can be turned into a list without repetitions. This is also true for enumerations, but a bit harder to formulate and prove rigorously. Any function source 216 must be defined for all source 216. If there are only finitely many elements in source 217 then we clearly cannot have a function defined on the infinitely many elements of source 219 that takes as values all the elements of source 220 but never takes the same value twice. In that case, i.e., in the case where the list without repetitions is finite, we must choose a different domain for source 222, one with only finitely many elements. Not having repetitions means that source 223 must be injective. Since it is also surjective, we are looking for a bijection between some finite set source 225 or source 225 and source 225.
Proposition: Replacing a surjective enumeration by a bijective one
If source 228 is surjective (i.e., an enumeration of source 229), there is a bijection source 229 where source 229 is either source 230 or source 230 for some source 230.
Proof
We define the function source 234 recursively: Let source 234. If source 234 has already been defined, let source 235 be the first value of source 235, source 236, … not already among source 236, …, source 236, if there is one. If source 237 has just source 237 elements, then source 237, …, source 237 are all defined, and so we have defined a function source 238. If source 239 has infinitely many elements, then for any source 239 there must be a element of source 240 in the enumeration source 240, source 240, …, which is not already among source 241, …, source 241. In this case we have defined a function source 242.
The function source 244 is surjective, since any element of source 244 is among source 245, source 245, … (since source 245 is surjective) and so will eventually be a value of source 246 for some source 246. It is also injective, since if there were source 247 such that source 247, then source 248 would already be among source 248, …, source 248, contrary to how we defined source 249.
End of proof.
Corollary: Enumerable sets via bijections from natural initial segments
A set source 253 is enumerable iff it is empty or there is a bijection source 254 where either source 254 or source 254 for some source 255.
Proof
source 259 is enumerable iff source 259 is empty or there is a surjective source 260. By Proposition: Replacing a surjective enumeration by a bijective one, the latter holds iff there is a bijective function source 261 where source 261 or source 262 for some source 262. By the same argument as in the proof of Proposition: Shifting enumerations between positive and natural indices, that in turn is the case iff there is a bijection source 264 where either source 265 or source 265.
End of proof.
Exercise: Injective and surjective characterizations of enumerability
According to Definition: Enumerable sets, a set source 269 is enumerable iff source 270 or there is a surjective source 270. It is also possible to define “enumerable set” precisely by: a set is enumerable iff there is a injective function source 273. Show that the definitions are equivalent, i.e., show that there is a injective function source 275 iff either source 275 or there is a surjective source 276.
Cantor's Zig-Zag Method
Proposition: Enumerability of pairs of natural numbers
source 69 is enumerable.
Proof
Let source 73 take each source 73 to the tuple source 74 such that source 74 is the value of the source 75th row and source 75th column in Cantor's zig-zag array.
End of proof.
Proposition: Enumerability of finite powers of the natural numbers
source 115 is enumerable, for every source 115.
Exercise: Enumerability of finite powers of the positive integers
Show that source 119 is enumerable, for every source 119.
Exercise: Enumerability of all finite positive-integer sequences
Show that source 123 is enumerable. You may assume Exercise: Enumerability of finite powers of the positive integers.
Pairing Functions and Codes
Definition: Arithmetic pairing functions and codes
A function source 52 is an arithmetical pairing function if source 53 is injective. We also say that source 53 encodes source 54, and that source 54 is the code for source 55.
Exercise: Enumerating the nonnegative rational numbers
Give an enumeration of the set of all non-negative rational numbers.
Exercise: Enumerability of all rational numbers
Show that source 71 is enumerable. Recall that any rational number can be written as a fraction source 72 with source 72, source 72.
Exercise: Enumerating finite binary strings
Define an enumeration of source 76.
Exercise: Enumerability of finite-arity truth functions
Recall from your introductory logic course that each possible truth table expresses a truth function. In other words, the truth functions are all functions from source 82 for some source 82. Prove that the set of all truth functions is enumerable.
Exercise: Enumerability of finite subsets of an enumerable set
Show that the set of all finite subsets of an arbitrary infinite enumerable set is enumerable.
Exercise: Enumerability of finite and cofinite subsets of the natural numbers
A subset of source 92 is said to be cofinite iff it is the complement of a finite set source 93; that is, source 93 is cofinite iff source 94 is finite. Let source 94 be the set whose elements are exactly the finite and cofinite subsets of source 95. Show that source 96 is enumerable.
Exercise: Countable unions of enumerable sets
Show that the enumerable union of enumerable sets is enumerable. That is, whenever source 101, source 101, … are sets, and each source 102 is enumerable, then the union source 102 of all of them is also enumerable. [NB: this is hard!]
Exercise: Inverting a pairing function to enumerate its product
Let source 107 be an arbitrary pairing function. Show that the inverse of source 108 is an enumeration of source 108.
Exercise: Encoding triples of natural numbers
Specify a function that encodes source 112.
An Alternative Pairing Function
Example: Pairing natural numbers by powers of two
The function source 87 given by source 88 is a pairing function for the set of pairs of natural numbers source 91.
Sometimes it is enough to encode pairs of natural numbers source 102 without requiring that the encoding is surjective. Such encodings have inverses that are only partial functions.
Example: Injective pair encoding by prime powers
The function source 107 given by source 108 is a injective function source 111.
Nonenumerable Sets
Some sets, such as the set source 20 of positive integers, are infinite. So far we've seen examples of infinite sets which were all enumerable. However, there are also infinite sets which do not have this property. Such sets are called nonenumerable.
First of all, it is perhaps already surprising that there are nonenumerable sets. For any enumerable set source 26 there is a surjective function source 27. If a set is nonenumerable there is no such function. That is, no function mapping the infinitely many elements of source 29 to source 29 can exhaust all of source 30. So there are “more” elements of source 30 than the infinitely many positive integers.
How would one prove that a set is nonenumerable? You have to show that no such surjective function can exist. Equivalently, you have to show that the elements of source 35 cannot be enumerated in a one way infinite list. The best way to do this is to show that every list of elements of source 37 must leave at least one element out; or that no function source 38 can be surjective. We can do this using Cantor's diagonal method. Given a list of elements of source 40, say, source 40, source 40, …, we construct another element of source 40 which, by its construction, cannot possibly be on that list.
Our first example is the set source 43 of all infinite, non-gappy sequences of source 44's and source 44's.
Theorem: Non-enumerability of positive-indexed infinite binary sequences
source 48 is nonenumerable.
Proof
Suppose, by way of contradiction, that source 52 is enumerable, i.e., suppose that there is a list source 53, source 53, source 54, source 54, … of all elements of source 54. Each of these source 55 is itself an infinite sequence of source 55's and source 55's. Let's call the source 56-th element of the source 56-th sequence in this list source 57. Then the source 57-th sequence source 57 is source 58
We may arrange this list, and the elements of each sequence source 62 in it, in an array: source 64 The labels down the side give the number of the sequence in the list source 75, source 75, …; the numbers across the top label the elements of the individual sequences. For instance, source 76 is a name for whatever number, a source 77 or a source 77, is the first element in the sequence source 78, and so on.
Now we construct an infinite sequence, source 80, of source 80's and source 81's which cannot possibly be on this list. The definition of source 82 will depend on the list source 82, source 82, …. Any infinite list of infinite sequences of source 83's and source 83's gives rise to an infinite sequence source 84 which is guaranteed to not appear on the list.
To define source 87, we specify what all its elements are, i.e., we specify source 88 for all source 88. We do this by reading down the diagonal of the array above (hence the name “diagonal method”) and then changing every source 90 to a source 90 and every source 91 to a source 91. More abstractly, we define source 91 to be source 91 or source 92 according to whether the source 92-th element of the diagonal, source 93, is source 93 or source 93. source 94 If you like formulas better than definitions by cases, you could also define source 102.
Clearly source 104 is an infinite sequence of source 104's and source 105's, since it is just the mirror sequence to the sequence of source 105's and source 106's that appear on the diagonal of our array. So source 106 is a element of source 107. But it cannot be on the list source 107, source 108, … Why not?
It can't be the first sequence in the list, source 110, because it differs from source 111 in the first element. Whatever source 111 is, we defined source 112 to be the opposite. It can't be the second sequence in the list, because source 113 differs from source 113 in the second element: if source 114 is source 114, source 114 is source 114, and vice versa. And so on.
More precisely: if source 117 were on the list, there would be some source 118 so that source 118. Two sequences are identical iff they agree at every place, i.e., for any source 119, source 119. So in particular, taking source 120 as a special case, source 121 would have to hold. source 121 is either source 122 or source 122. If it is source 122 then source 122 must be source 122—that's how we defined source 123. But if source 123 then, again because of the way we defined source 124, source 124. In either case source 125.
We started by assuming that there is a list of elements of source 128, source 128, source 128, … From this list we constructed a sequence source 129 which we proved cannot be on the list. But it definitely is a sequence of source 130's and source 130's if all the source 130 are sequences of source 131's and source 131's, i.e., source 131. This shows in particular that there can be no list of all elements of source 133, since for any such list we could also construct a sequence source 134 guaranteed to not be on the list, so the assumption that there is a list of all sequences in source 136 leads to a contradiction.
End of proof.
Theorem: Non-enumerability of the power set of the positive integers
source 149 is not enumerable.
Proof
We proceed in the same way, by showing that for every list of subsets of source 154 there is a subset of source 154 which cannot be on the list. Suppose the following is a given list of subsets of source 155: source 156 We now define a set source 159 such that for any source 159, source 160 iff source 160: source 161 source 164 is clearly a set of positive integers, since by assumption each source 165 is, and thus source 165. But source 166 cannot be on the list. To show this, we'll establish that for each source 167, source 167.
So let source 170 be arbitrary. We've defined source 170 so that for any source 171, source 171 iff source 171. In particular, taking source 172, source 172 iff source 172. But this shows that source 173, since source 173 is a element of one but not the other, and so source 174 and source 174 have different elements. Since source 175 was arbitrary, source 175 is not on the list source 176, source 176, …
End of proof.
Exercise: Diagonal proof for the power set of the natural numbers
Show that source 203 is nonenumerable by a diagonal argument.
Exercise: Diagonal proof for functions on the positive integers
Show that the set of functions source 207 is nonenumerable by an explicit diagonal argument. That is, show that if source 209, source 209, …, is a list of functions and each source 209, then there is some source 210 not on this list.
Reduction
We showed source 20 to be nonenumerable by a diagonalization argument. We already had a proof that source 21, the set of all infinite sequences of source 22s and source 22s, is nonenumerable. Here's another way we can prove that source 23 is nonenumerable: Show that if source 24 is enumerable then source 24 is also enumerable. Since we know source 25 is not enumerable, source 26 can't be either. This is called reducing one problem to another—in this case, we reduce the problem of enumerating source 28 to the problem of enumerating source 29. A solution to the latter—an enumeration of source 30—would yield a solution to the former—an enumeration of source 31.
How do we reduce the problem of enumerating a set source 33 to that of enumerating a set source 34? We provide a way of turning an enumeration of source 35 into an enumeration of source 35. The easiest way to do that is to define a surjective function source 36. If source 36, source 36, … enumerates source 37, then source 37, source 37, … would enumerate source 38. In our case, we are looking for a surjective function source 39.
Exercise: Reduction along an injection with positive-integer enumerations
Show that if there is an injective function source 42, and source 43 is nonenumerable, then so is source 43. Do this by showing how you can use source 44 to turn an enumeration of source 44 into one of source 44.
Proof of Theorem: Non-enumerability of the power set of the positive integers by reduction
Suppose that source 48 were enumerable, and thus that there is an enumeration of it, source 49, source 49, source 49, …
Define the function source 51 by letting source 52 be the sequence source 52 such that source 52 iff source 52, and source 53 otherwise. This clearly defines a function, since whenever source 54, any source 54 either is a element of source 55 or isn't. For instance, the set source 55 of positive even numbers gets mapped to the sequence source 57, the empty set gets mapped to source 57 and the set source 58 itself to source 58.
It also is surjective: Every sequence of source 60s and source 60s corresponds to some set of positive integers, namely the one which has as its members those integers corresponding to the places where the sequence has source 63s. More precisely, suppose source 63. Define source 63 by: source 65 Then source 68, as can be verified by consulting the definition of source 69.
Now consider the list source 72 Since source 75 is surjective, every member of source 75 must appear as a value of source 76 for some argument, and so must appear on the list. This list must therefore enumerate all of source 77.
So if source 79 were enumerable, source 79 would be enumerable. But source 80 is nonenumerable (Theorem: Non-enumerability of positive-indexed infinite binary sequences). Hence source 81 is nonenumerable.
End of proof.
Exercise: Non-enumerability of sets of positive-integer pairs
Show that the set of all sets of pairs of positive integers is nonenumerable by a reduction argument.
Exercise: Functions on the natural numbers by positive-indexed reduction
Show that the set source 109 of all functions source 109 is nonenumerable by a reduction argument (Hint: give a surjective function from source 111 to source 111.)
Exercise: Infinite natural-number sequences by positive-indexed reduction
Show that source 115, the set of infinite sequences of natural numbers, is nonenumerable by a reduction argument.
Exercise: Total and partial zero-valued functions
Let source 120 be the set of functions from the set of positive integers to the set source 121, and let source 121 be the set of partial functions from the set of positive integers to the set source 122. Show that source 123 is enumerable and source 123 is not. (Hint: reduce the problem of enumerating source 124 to enumerating source 124).
Exercise: Binary surjections from the positive integers
Let source 128 be the set of all surjective functions from the set of positive integers to the set {0,1}, i.e., source 129 consists of all surjective source 130. Show that source 130 is nonenumerable.
Exercise: Real numbers by positive-indexed reduction
Show that the set source 135 of all real numbers is nonenumerable.
Equinumerosity
We have an intuitive notion of “size” of sets, which works fine for finite sets. But what about infinite sets? If we want to come up with a formal way of comparing the sizes of two sets of any size, it is a good idea to start by defining when sets are the same size. Here is Frege:
If a waiter wants to be sure that he has laid exactly as many knives as plates on the table, he does not need to count either of them, if he simply lays a knife to the right of each plate, so that every knife on the table lies to the right of some plate. The plates and knives are thus uniquely correlated to each other, and indeed through that same spatial relationship. (Gottlob Frege, 1884, §70)
The insight of this passage can be brought out through a formal definition:
Definition: Equinumerous sets
source 30 is equinumerous with source 30, written source 30, iff there is a bijection source 31.
Proposition: Equinumerosity as an equivalence relation
Equinumerosity is an equivalence relation.
Proof
We must show that equinumerosity is reflexive, symmetric, and transitive. Let source 40, and source 40 be sets.
Reflexivity. The identity map source 42, where source 43 for all source 43, is a bijection. So source 44.
Symmetry. Suppose source 46, i.e., there is a bijection source 47. Since source 47 is bijective, its inverse source 48 exists and is also bijective. Hence, source 49 is a bijection, so source 49.
Transitivity. Suppose that source 51 and source 51, i.e., there are bijections source 52 and source 52. Then the composition source 53 is bijective, so that source 54.
End of proof.
Proposition: Preservation of enumerability under equinumerosity
If source 58, then source 58 is enumerable if and only if source 59 is.
Proof
Suppose source 69, so there is some bijection source 69, and suppose that source 70 is enumerable.
Then either source 72 or there is a surjective function source 73. If source 73, then source 73 also (otherwise there would be a element source 74 but no source 74 with source 75). If, on the other hand, source 75 is surjective, then source 76 is surjective. To see this, let source 77. Since source 77 is surjective, there is an source 78 such that source 78. Since source 79 is surjective, there is an source 79 such that source 79. Hence, source 81 and thus source 84 is surjective. We have that source 84 is an enumeration of source 85, and so source 85 is enumerable.
If source 96 is enumerable, we obtain that source 96 is enumerable by repeating the argument with the bijection source 97 instead of source 98.
End of proof.
Exercise: Equinumerosity of disjoint unions
Show that if source 102 and source 102, and source 102, then source 103.
Exercise: Infinite enumerable sets and the natural numbers
Show that if source 107 is infinite and enumerable, then source 108.
Sets of Different Sizes, and Cantor's Theorem
Definition: Cardinality comparison by injection
source 27 is no larger than source 27, written source 27, iff there is a injection source 28.
It is clear that this is a reflexive and transitive relation, but that it is not symmetric (this is left as an exercise). We can also introduce a notion, which states that one set is (strictly) smaller than another.
Definition: Strict cardinal inequality
source 37 is smaller than source 37, written source 37, iff there is a injection source 38 but no bijection source 38, i.e., source 39 and source 39.
It is clear that this relation is irreflexive and transitive. (This is left as an exercise.) Using this notation, we can say that a set source 44 is enumerable iff source 44, and that source 45 is nonenumerable iff source 45. This allows us to restate
Theorem: Non-enumerability of the power set of the natural numbers as the observation that source 50. In fact, Georg Cantor (1892) proved that this last point is perfectly general:
Theorem: Cantor's theorem on power sets
Proof
The map source 61 is a injection source 61, since if source 62, then also source 62 by extensionality, and so source 63. So we have that source 63.
We will now show that there cannot be a surjective function source 71, let alone a bijective one, and hence that source 73. For suppose that source 73. Since source 74 is total, every source 74 is mapped to a subset source 74. We can show that source 75 cannot be surjective. To do this, we define a subset source 76 which by definition cannot be in the range of source 77. Let source 78 Since source 81 is defined for all source 81, source 81 is clearly a well-defined subset of source 82. But, it cannot be in the range of source 83. Let source 83 be arbitrary, we will show that source 83. If source 84, then it does not satisfy source 84, and so by the definition of source 85, we have source 85. If source 86, it must satisfy the defining property of source 87, i.e., source 87 and source 87. Since source 88 was arbitrary, this shows that for each source 88, source 89 iff source 89, and so source 90. In other words, source 90 cannot be in the range of source 91, contradicting the assumption that source 91 is surjective.
End of proof.
Exercise: No injection from a power set into its base set
Show that there cannot be a injection source 143, for any set source 144. Hint: Suppose source 144 is injective. Consider source 145. Let source 146. Use the fact that source 146 is injective to derive a contradiction.
The Notion of Size, and Schröder-Bernstein
Theorem: Schröder-Bernstein theorem
Enumerations and Enumerable Sets
We can specify finite set is by simply enumerating its elements. We do this when we define a set like so: source 23 Assuming that the elements source 26, …, source 26 are all distinct, this gives us a bijection between source 27 and the first source 27 natural numbers source 28, …, source 28. Conversely, since every finite set has only finitely many elements, every finite set can be put into such a correspondence. In other words, if source 30 is finite, there is a bijection between source 31 and source 31, where source 31 is the number of elements of source 32.
If we allow for certain kinds of infinite sets, then we will also allow some infinite sets to be enumerated. We can make this precise by saying that an infinite set is enumerated by a bijection between it and all of source 37.
Definition: Set-theoretic enumeration
An enumeration of a set source 40 is a bijection whose range is source 41 and whose domain is either an initial set of natural numbers source 41 or the entire set of natural numbers source 42.
Definition: Enumerable and nonenumerable sets in the set-theoretic presentation
A set source 59 is enumerable iff either source 59 or there is an enumeration of source 60. We say that source 60 is nonenumerable iff source 60 is not enumerable.
Example: Enumerating natural and positive natural numbers
A function enumerating the natural numbers is simply the identity function source 71 given by source 71. A function enumerating the positive natural numbers, source 72, is the function source 73, i.e., the successor function.
Exercise: Injective and surjective tests for set-theoretic enumerability
Show that a set source 78 is enumerable iff either source 78 or there is a surjection source 79. Show that source 79 is enumerable iff there is a injection source 80.
Example: Enumerating even and odd natural numbers
The functions source 84 and source 84 given by source 86 respectively enumerate the even natural numbers and the odd natural numbers. But neither is surjective, so neither is an enumeration of source 92.
Exercise: Enumerating square numbers from natural inputs
Define an enumeration of the square numbers source 96, source 96, source 96, source 96, …
Example: Alternating enumeration of the integers from natural inputs
Let source 100 be the ceiling function, which rounds source 100 up to the nearest integer. Then the function source 101 given by: source 103 enumerates the set of integers source 107 as follows: source 108 Notice how source 115 generates the values of source 115 by “hopping” back and forth between positive and negative integers. You can also think of source 117 as defined by cases as follows: source 118
Exercise: Union of two enumerable sets in the set-theoretic presentation
Show that if source 127 and source 127 are enumerable, so is source 127.
Exercise: Finite unions in the set-theoretic presentation
Show by induction on source 131 that if source 131, source 131, …, source 131 are all enumerable, so is source 132.
Nonenumerable Sets
Theorem: Non-enumerability of zero-indexed infinite binary strings
source 58 is nonenumerable.
Proof
Consider any enumeration of a subset of source 62. So we have some list source 63, source 63, source 63, … where every source 63 is an infinite string of source 64's and source 64's. Let source 64 be the source 64th digit of the source 65th string in this list. So we can now think of our list as an array, where source 66 is placed at the source 66th row and source 66th column: source 67 We will now construct an infinite string, source 77, of source 77's and source 77's which is not on this list. We will do this by specifying each of its entries, i.e., we specify source 79 for all source 79. Intuitively, we do this by reading down the diagonal of the array above (hence the name “diagonal method”) and then changing every source 81 to a source 81 and every source 82 to a source 82. More abstractly, we define source 82 to be source 82 or source 82 according to whether the source 83-th element of the diagonal, source 83, is source 84 or source 84, that is: source 85 Clearly source 92, since it is an infinite string of source 92's and source 93's. But we have constructed source 93 so that source 93 for any source 94. That is, source 94 differs from source 94 in its source 94th entry. So source 95 for any source 95. So source 95 cannot be on the list source 96, source 96, source 96, …
We have shown, given an arbitrary enumeration of some subset of source 100, that it will omit some element of source 100. So there is no enumeration of the set source 101, i.e., source 101 is nonenumerable.
End of proof.
Theorem: Non-enumerability of the power set of the natural numbers
source 115 is not enumerable.
Proof
We proceed in the same way, by showing that every list of subsets of source 120 omits some subset of source 120. So, suppose that we have some list source 121 of subsets of source 121. We define a set source 121 as follows: source 122 iff source 122: source 123 Clearly source 126. But source 126 cannot be on the list. After all, by construction source 127 iff source 127, so that source 127 for any source 128.
End of proof.
Exercise: Diagonal proof for functions on the natural numbers
Show that the set of all functions source 155 is nonenumerable by an explicit diagonal argument. That is, show that if source 157, source 157, …, is a list of functions and each source 157, then there is some source 158 not on this list.
Reduction
We proved that source 20 is nonenumerable by a diagonalization argument. We used a similar diagonalization argument to show that source 22 is nonenumerable. But here's another way we can prove that source 23 is nonenumerable: show that if source 24 is enumerable then source 24 is also enumerable. Since we know source 25 is nonenumerable, it will follow that source 26 is too.
This is called reducing one problem to another. In this case, we reduce the problem of enumerating source 29 to the problem of enumerating source 30. A solution to the latter—an enumeration of source 31—would yield a solution to the former—an enumeration of source 32.
To reduce the problem of enumerating a set source 34 to that of enumerating a set source 35, we provide a way of turning an enumeration of source 35 into an enumeration of source 36. The easiest way to do that is to define a surjection source 37. If source 37, source 37, … enumerates source 38, then source 38, source 38, … would enumerate source 38. In our case, we are looking for a surjection source 39.
Exercise: Reduction along an injection with natural-number enumerations
Show that if there is an injective function source 43, and source 44 is nonenumerable, then so is source 44. Do this by showing how you can use source 45 to turn an enumeration of source 45 into one of source 45.
Proof of Theorem: Non-enumerability of the power set of the natural numbers by reduction
For a reduction, suppose that source 49 is enumerable, and thus that there is an enumeration of it, source 50, source 50, source 50, …
Define the function source 52 by letting source 53 be the string source 53 such that source 53 iff source 53, and source 54 otherwise.
This clearly defines a function, since whenever source 56, any source 57 either is a element of source 57 or isn't. For instance, the set source 58 of even naturals gets mapped to the string source 59; source 60 gets mapped to source 60; source 60 gets mapped to source 61.
It is also surjective: every string of source 63s and source 63s corresponds to some set of natural numbers, namely the one which has as its members those natural numbers corresponding to the places where the string contains a source 66s. More precisely, if source 66, then define source 66 by: source 68 Then source 71, as can be verified by consulting the definition of source 72.
Now consider the list source 75 Since source 78 is surjective, every member of source 78 must appear as a value of source 79 for some argument, and so must appear on the list. This list must therefore enumerate all of source 80.
So if source 82 were enumerable, source 82 would be enumerable. But source 83 is nonenumerable (Theorem: Non-enumerability of zero-indexed infinite binary strings). Hence source 84 is nonenumerable.
End of proof.
Exercise: Functions on the natural numbers by zero-indexed reduction
Show that the set source 107 of all functions source 107 is nonenumerable by a reduction argument (Hint: give a surjective function from source 109 to source 109.)
Exercise: Sets of natural-number pairs by reduction
Show that the set of all sets of pairs of natural numbers, i.e., source 114, is nonenumerable by a reduction argument.
Exercise: Infinite natural-number sequences by zero-indexed reduction
Show that source 119, the set of infinite sequences of natural numbers, is nonenumerable by a reduction argument.
Exercise: Binary surjections from the natural numbers
Let source 131 be the set of all surjections from source 131 to the set source 132, i.e., source 132 consists of all surjections source 132. Show that source 133 is nonenumerable.
Exercise: Real numbers by zero-indexed reduction
Show that the set source 137 of all real numbers is nonenumerable.