Proof verification on countability of algebraic numbers? I'm writing a proof that the set of all algebraic numbers for a homework assignment, do all my steps look correct?
For each $i = 0, 1, 2,\ldots$ let $P_i := \{\text{all integer polynomials of degree $i$}\} := \{p_0 + p_1x + \cdots + p_i x^i \ : \ p_0,\ldots,p_i \in \Bbb{Z}\}$
Each $P_i$ is countable by induction:
1) $P_0 = \{ p \ : \ p \in \Bbb{Z} \} = \Bbb{Z}$ is clearly countable.
2) Assuming $P_k$ is countable, we note that clearly $|P_{k+1}| = |P_k \cup \Bbb{Z}|$, since $P_{k+1}$ adds just one more term to each polynomial in $P_k$, then as the union of countable sets, $P_{k+1}$ is countable.
Then the set of all polynomials, $P = \bigcup_{i=0}^\infty P_i$ is a countable union of countable sets, hence countable
Now let $\Bbb{A}$ be the set of all algebraic numbers - that is, the set of all real numbers $a$ such that $\exists p \in P \ : \ p(a) = 0$. Then for each algebraic number there is a unique monic polynomial of least degree with this property.
Define a function $f \ : \ \Bbb{A} \to P$ as $f(a) = p \iff p(a) = 0$ and $p$ is monic and is of minimal degree with this property.
Note that for each $p \in P$ there are at most finitely many algebraic numbers $a$ for which $p(a) = 0$, by the fundamental theorem of algebra.
Equivalently, $f^{-1}\left(\{p\}\right)$ is at most finite for every $p \in P$
Thus $\Bbb{A} = f^{-1}(P) = \bigcup_{p \in P} f^{-1} \left(\{p\}\right)$ is a countable union of finite sets, thus $\Bbb{A}$ is countable. 
The only step I am the most iffy about is the very last step, saying that $f^{-1}(P) = \bigcup_{p \in P} f^{-1} \left(\{p\}\right)$. It makes sense, but can we only actually conclude that $P$ is a subset of this union? Or is this fine?

This isn't quite right. You have the right idea: leveraging the countability of the integers. However, as you presented it, the set $P_k \cup \mathbb{Z} = \mathbb{Z}$, and I don't think this is what you want.
For instance, you give $P_0 = \mathbb{Z}$. Then you claim that $P_1 = P_0 \cup \mathbb{Z}$. This means that $P_1 = \mathbb{Z}$.
Instead, I would view $P_k$ in correspondence with $\mathbb{Z}^k$. Note that the Cartesian product of countable sets is still countable (this is how we show the rationals are countable as well).
