A set \(X\) is called:
- countably infinite if \(X\cong \mathbb{N}\);
- countable if it is finite or countably infinite;
- uncountable if \(X\) is finite nor countably infinite.
Examples of uncountable sets are \(\mathbb{R}\), intervals in \(\mathbb{R}\), and \({\Large\wp}(\mathbb{N})\).
Let \(X\) be a countably infinite set. Then there is a bijective function \(x\) from \(\mathbb{N}\) to \(X\). Such a function is called an enumeration. Let us denote \(x(i)\) as \(x_i\) for each \(i\in \mathbb{N}\). Then \(X\) can be written as \(\{x_i\mid i\in\mathbb{N}\}\) or as \(X=\{x_0,x_1,x_2,\ldots\}\).
Every subset of a countable set is countable.
Let \(X\) be a countable set and \(Y\subset X\). If \(X\) or \(Y\) is finite, we are actually done quickly. Therefore, we only consider the case where \(X\) is countably infinite and the subset is not finite. Suppose \(X=\{x_0,x_1,x_2,\ldots\}\). Then there is a smallest \(i\), say \(i_0\), for which \(x_i\in Y\) and we denote \(x_{i_0}\) as \(y_0\). Furthermore, there is a smallest \(i\), say \(i_1\), for which \(x_{i_1}\in Y\backslash \{y_0\}\) and we denote \(x_{i_1}\) as \(y_1\). If \(y_0,y_1, \ldots y_n\) have already been defined, we take \(y_{n+1}\) to be the element \(x_{i_{n+1}}\), where \(i_{n+1}\) is the smallest index \(i\) for which \(x_i\in Y\backslash \{y_0,y_1,\ldots y_n\}\). Note that every element of \(Y\) appears in the sequence \(y_0,y_1,\ldots\) and that this sequence does not end, as \(Y\) is not assumed to be finite. Thus, \(Y\) is countably infinite. Therefore, \(Y\) is a countable set in all cases.
Let \(X\) and \(Y\) be countable sets. Then \(X\cup Y\) and \(X\times Y\) are also countable.
We prove the countability of \(X\cup Y\) only for two sets that are countably infinite, so if \(X\cong \mathbb{N}\) and \(Y\cong \mathbb{N}\). Because \(\mathbb{N}\cong \{n\in \mathbb{N}\mid n\text{ is even}\}\) and \(\mathbb{N}\cong \{n\in \mathbb{N}\mid n\text{ is odd}\}\), we can create a bijective function from \(X\cup Y\) to \(\mathbb{N}\) by mapping \(X\) bijectively to \(\mathbb{N}\mid n\text{ is even}\}\) and \(Y\) bijectively to \(\mathbb{N}\mid n\text{ is odd}\}\). In other words, \(X\cup Y\) is countable.
We prove the countability of \(X\times Y\) only for two sets that are countably infinite, so if \(X\cong \mathbb{N}\) and \(Y\cong \mathbb{N}\). Then, there is a bijection from \(X\times Y\) to \(\mathbb{N}\times \mathbb{N}\). Thus, \(X\times Y\cong\mathbb{N}\times \mathbb{N}\). Because \(\mathbb{N}\times \mathbb{N}\cong (\mathbb{N}\), we have \(X\times Y\cong\mathbb{N}\). In other words, \(X\times Y\) is countable.
\(\mathbb{Q}\) is countably infinite.
We first show that the set \(\mathbb{Q}^{+}\) of all positive rational numbers is countably infinite. These positive rational numbers can be considered as \(p/q\) with \(p\) and \(q\) positive natural numbers and \(p/q\) an irreducible fraction, i.e., \(\mathrm{gcd}(p,q)=1\). We can now define the function \(f:\;\mathbb{Q}\rightarrow \mathbb{Z}\times \mathbb{Z}\backslash\{0\}\) by \(f(p/q)=(p,q)\). Then \(f\) is an injective function. Because \(\mathbb{N}\times \mathbb{N}\) is countably infinite and \(f(\mathbb{Q}^{+}\) is a infinite subset of this, it follows that \(f(\mathbb{Q}^{+})\) is countably infinite. But then \(\mathbb{Q}^{+}\) is also countably infinite.
The set \(\mathbb{Q}^{-}\) of all negative rational numbers is evidently equipotent to \(\mathbb{Q}^{+}\) and thus also countably infinite. Therefore, \(\mathbb{Q}=\mathbb{Q}^{-}\cup\{0\}\cup \mathbb{Q}^{+}\), as union of countable sets, is also countable. Because the set of rational numbers is not finite, we know that this set is countably infinite.