Countable sets
From the two previous examples, we have seen that many sets have the same cardinality as . We call those sets countable sets (they are infinite, but it's possible to count them ☺️).
A set is countable if it is finite or there is a bijection between and .
In fact, when is infinite, we don't really need a bijection here. It suffices to show the onto mapping.
A set is countable if and only if there is an onto mapping from to .
One can say that this is the reason why such a set is called countable: We can actually list the elements of one-by-one based on the onto function by just . The onto property guarantees that we will eventually list all the elements in (some elements might be listed more than once, but that's OK).
The set of rational numbers is countable.
For simplicity, we will only deal with positive rational numbers (dealing with negative numbers only requires a small modification). We define an onto mapping as follows. When we write a positive rational number as (for positive integers ) we can imagine dividing , into (overlapping) groups based on the value of . That is,
where . Notice that , so each such set is finite. Intuitively, the function first lists the elements in , then the ones in , and so on.
Often, one would encounter an incorrect proof (from students) of the following form. List all rational numbers of the form (for all ), then the ones of the form , and so on. Let us call this mapping . At some point we would end up listing all of them. Do you know what goes wrong with such an argument? The problem with the above listing is that we cannot formally pinpoint when a given number would be listed, e.g., what is the value of for which ? This problem occurs because listing numbers of the form alone is an infinite process.
In comparison, the proof of Theorem 31 makes it cleat that every number would be listed at some point. For instance, what is the value of for which . Well, , so we know that it would be listed when all are finished. Although giving the exact position in the listing is technical, we know that .