# The set of algebraic numbers is countable: is this proof correct and well written?

Problem: prove that the set of all algebraic numbers is countable.

My proof:

Let $f: \bigcup^{\infty}_{n=1} \mathbb{Z}^n \rightarrow \mathcal P(\mathbb{C})$ be a function associating an ordered $n$-tuple $(a_1,...,a_n)$ of integers the set of complex solutions of the equation $a_1+a_2z^2+...+a_nz^{n-1}$.

The following sets are countable:

1. $\mathbb{Z}$
2. $\mathbb{Z}^n$, because the cartesian product of countable sets is countable too
3. $E=\{\mathbb{Z}^n, n\in\mathbb{N}\}$
4. $\bigcup^{\infty}_{n=1}\mathbb{Z}^n$ (that is the union of all the sets of $E$), since the union of countably many countable sets is countable.

Therefore, there exists a sequence $x_n$ associating a natural number $n$ to a $m$-tuple of integers. Define $f(x_n)=A_n$; $A_n$ is finite, and therefore countable, as it contains all the only the solutions of a finite-degree equation, which are finite. Hence, $\bigcup^{\infty}_{n=1}A_n$ is countable. But it also contains all the algebraic numbers: let $z$ be one of them, then there exist an $m$-tuple of integers $(a_1,...,a_m)$ such that $a_1+a_2z+...a_mz^m=0$, and so $z\in f(a_1,...,a_m)=E_a$ for some $a\in \mathbb{N}$.

The proof seems correct to me but I'm not entirely conviced: could you point out the mistakes, if any? Also, I fear that I haven't thoroughly justified every step of it and that it could be written in a more clear and precise fashion...would it be accepted if I were to present it in an university exam?

• I don't see any mistake in your proof. It seems correct. Jun 2, 2015 at 16:50
• @Nicol It's usual way to prove it, but IMHO you can write it shorter Jun 2, 2015 at 16:50
• It's a bit verbose. All you need to say is there are a countable number of polynomials (since a countable union of countable sets is countable). And each polynomial has a finite number of solutions, so the algebraic numbers are a countable number of finite sets. You don't need to introduce all the extra notation. Jun 2, 2015 at 16:53
• Sure it could be condensed a bit/smoothed out, but for a class it's better to err on the side of verbosity, than leave out details you thought you understood well enough to gloss over! Jun 2, 2015 at 17:17

The proof is sound, provided you use $\mathbb{Z}^n\setminus\{(0,0,\dots,0)\}$ or you'd include the zero polynomial.
Let $g\colon \mathbb{N}\to\bigcup_{n\in\mathbb{N}}(\mathbb{Z}^n\setminus\{(0,0,\dots,0)\})$ be a bijection. Then the set of algebraic numbers is $$\bigcup_{n\in\mathbb{N}}f(g(n))$$ so a countable union of finite sets.