I am reading "Understanding Analysis Second Edition" by Stephen Abbott.
The following exercise is Exercise 1.5.9(b):
Exercise 1.5.9(b) Fix $n\in\mathbb{N}$, and let $A_n$ be the algebraic numbers obtained as roots of polynomials with integer coefficients that have degree $n$. Using the fact that every polynomial has a finite number of roots, show that $A_n$ is countable.
Is my solution ok?
$\mathbb{Z}-\{0\}$ is countable.
$\mathbb{Z}$ is countable.
So, by a famous theorem, $\overbrace{(\mathbb{Z}-\{0\})\times\mathbb{Z}\times\dots\times\mathbb{Z}}^{n+1\text{ countable sets}}$ is countable.
Let $B_n$ be the set of polynomials with integer coefficients that have degree $n$.
Obviously, there is a bijection from $\overbrace{(\mathbb{Z}-\{0\})\times\mathbb{Z}\times\dots\times\mathbb{Z}}^{n+1\text{ countable sets}}$ to $B_n$.
So, $B_n$ is countable.
So, we can write $B_n$ as $B_n=\{p_1,p_2,\dots,\}$.
Let $C_i:=$$\{x\in\mathbb{C}\mid p_i(x)=0\}$.
Then, $A_n=\bigcup_{i=1}^{\infty}C_i$ holds.
Then, by a famous theorem, $C_i$ is a finite set.
So, by a famous theorem, $A_n$ is countable.
The author's solution is here:
Fix $n,m \in \mathbb{N}$. The set of polynomials of the form $a_n x^n + a_{n−1}x^{n−1} + \dots + a_1x + a_0$ satisfying $|a_n| + |a_{n−1}| + \dots + |a_0| \leq m$ is finite because there are only a finite number of choices for each of the coefficients (given that they must be integers.) If we let $A_{nm}$ be the set of all the roots of polynomials of this form, then because each one of these polynomials has at most n roots, the set $A_{nm}$ is finite. Thus $A_n$, the set of algebraic numbers obtained as roots of any polynomial (with integer coefficients) of degree $n$, can be written as a countable union of finite sets $A_n =\bigcup_{m=1}^{\infty}A_{nm}$. It follows that $A_n$ is countable.