Solution (source code)

= Solution

Use the module criterion: an element $x$ is an algebraic integer if and only if it lies in a nonzero finitely generated $\mathbb Z$-module $M$ with $xM\subseteq M$.

Let the coefficients of the monic <polynomial> be $c_0,\ldots,c_{n-1}$ and put $A=\mathbb Z[c_0,\ldots,c_{n-1}]$. A <ring> generated by finitely many algebraic integers is a finitely generated $\mathbb Z$-module. If $\alpha$ is a root, then
$$
M=A+A\alpha+\cdots+A\alpha^{n-1}
$$
is finitely generated, and the monic relation
$$
\alpha^n=-c_{n-1}\alpha^{n-1}-\cdots-c_0
$$
shows that $\alpha M\subseteq M$. The criterion proves that every root is an algebraic integer.