Solution (source code)

= Solution

Write a rational <root of a polynomial> as $\gamma=a/b$ in lowest terms with $b>0$. Substituting into the monic integer-coefficient <polynomial> and multiplying by $b^d$ gives
$$
a^d+c_{d-1}a^{d-1}b+c_{d-2}a^{d-2}b^2+\cdots+c_0b^d=0.
$$
Every term other than $a^d$ is divisible by $b$, so $b\mid a^d$. But $\gcd(a,b)=1$ implies $\gcd(a^d,b)=1$, and hence $b=1$. Thus
$$
\boxed{\gamma\in\mathbb Z.}
$$
This is the monic case of the <rational root theorem>. The <monic polynomial> assumption is essential because it removes any leading coefficient that could supply prime factors of the denominator.