Solution (source code)

= Solution

The nonzero <ideal> $\widetilde P$ is principal because $\mathbb Q[t]$ is a <principal ideal domain>. Choose a nonzero generator $h\in\mathbb Q[t]$. Part (a) gives
$$
f=\frac{h}{c(h)}\in\mathbb Z[t],\qquad c(f)=1.
$$
The nonzero rational scalar $c(h)$ is a <unit> in $\mathbb Q[t]$, so this rescaling does not change the generated <principal ideal>:
$$
\boxed{\widetilde P=(f)_{\mathbb Q[t]},\qquad c(f)=1.}
$$
Part (b) now places $f$ in $P$, since $f\in\widetilde P\cap\mathbb Z[t]$. Thus $(f)_{\mathbb Z[t]}\subseteq P$.

For the reverse inclusion, let $g\in P$ be nonzero. The displayed equality supplies $q\in\mathbb Q[t]$ with $g=fq$. Multiplicativity of <rational polynomial content> gives
$$
c(g)=c(f)c(q)=c(q).
$$
Since $g$ has <integer> coefficients, $c(g)$ is a positive <integer>. The normalization from part (a) gives $q/c(q)\in\mathbb Z[t]$, so multiplying it by the integer $c(q)=c(g)$ proves $q\in\mathbb Z[t]$. Consequently $g\in(f)_{\mathbb Z[t]}$. The zero <polynomial> belongs as well, proving
$$
\boxed{P=(f)_{\mathbb Z[t]}.}
$$
This is the divisibility descent in <Gauss lemma for polynomials>: dividing an integer-coefficient <polynomial> by a <primitive polynomial> cannot introduce a denominator into an exact quotient. Here it yields the description of <prime ideals of the integer polynomial ring above zero>. The generator has positive <polynomial degree>, since a primitive constant would be a <unit> and would put $1$ in $P$.