How to tell an ideal of integer polynomial ring is principal? I understand that uni-variate polynomial rings with coefficients in a field only have principal ideals. For example, $\mathbb{C}[x]$. But how can I tell if an ideal of integer polynomial ring is principal, please? For example, a textbook claims that "the kernel of the map $\mathbb{Z[x]} \rightarrow \mathbb{Z[i]}$ sending $x \mapsto i$ is the principal ideal of $\mathbb{Z}[x]$ generated by $f=x^2+1$" without any justification. How to show this is true, please?

In this case, it is fairly easy. Since the polynomial $f$ is monic, you can write every $p \in \mathbb{Z}[x]$ as
$$p = q\cdot f + r$$
with $r \in \mathbb{Z}[x]$ of degree at most one. Since - easily verified - $f$ maps to $0$, the kernel of $\pi \colon g \mapsto g(i)$ surely contains the principal ideal $(f)$ generated by $f$, and to show that it contains nothing more, by the above it suffices to show that no polynomial of degree $\leqslant 1$ except the zero polynomial is mapped to $0$. But $a + bx \mapsto a + bi$, so $a+bx \in \ker \pi \iff a = b = 0$.
