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:
- $\mathbb{Z}$
- $\mathbb{Z}^n$, because the cartesian product of countable sets is countable too
- $E=\{\mathbb{Z}^n, n\in\mathbb{N}\}$
- $\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?