The set of counting numbers, or of positive integers, is the set .
A set is called countable or enumerable if there exists a surjection from the counting numbers onto .
Example: The rational numbers
The set of rational numbers, , is the set of integer fractions in reduced form; the greatest common divisor of and is one, with .
Theorem The rational numbers are countable.
The proof is, essentially, that is isomorphic to ; we count in a roughly spiral pattern centered at zero.
Proof Define the height of to be . We may count the rational numbers in order of height, and ordering by , and then , when the heights are the same. The beginning of this counting is , , , , , , , Since there are at most rational numbers of height less than or equal to , a rational number with height is mapped on to by one of the counting numbers up to ; every rational number is mapped onto by this counting. Thus, the rational numbers are countable.
Note: It is not hard to extend this proof to show that is countable for any finite .
Theorem If there exists a surjection from a countable set to a set , then is countable. Proof By definition of countable, there exists an enumeration of . Now, is an enumeration of , so is countable.
Exercises
Show that the set of [ finite words] of an enumerable [ alphabet] is countable.
%%hidden(Show solution): First, we note that since is countable, the set of words of length for each is countable.
Let stand for an enumeration of , and for an enumeration of .
Consider the function which maps every number to a word in . Then a little thought shows that is an enumeration of .
%%
Show that the set of finite subsets of an enumerable set is countable.
%%hidden(Show solution): Let be an enumeration of .
Consider the function which relates a word made from natural numbers to the set . Clearly is an enumeration of . %%
Show that the set of [ cofinite subsets] of an enumerable set is countable.
%%hidden(Show solution): Simply consider the function which relates each cofinite set with its complementary. %%