Prime ideal $P$ of $\mathbb{Z}[x]$ such that $P \cap \mathbb{Z}=\{0\}$ is principal The problem stated more precisely is this: 

Let $P$ be a prime ideal of $\mathbb{Z}[x]$ such that $P \cap \mathbb{Z} =\{0\}$. Show that $P$ is a principal ideal.

I think there is a problem with my proof. 
So I said that if $m(x)$ is a nonzero polynomial in $P$ of minimum degree then $P=(m(x))$. If $f(x) \in P$ is any polynomial then in $\mathbb{Q}[x]$ there is $q(x),r(x) \in \mathbb{Q}[x]$ such that $f(x)=q(x)m(x)+r(x) \implies r(x)=f(x)-q(x)m(x)$ with $r=0$ or the degree of r less than the degree of $m$. Letting $L$ be the LCM of the denominators of the coefficients we have $Lr(x)=Lf(x)-Lq(x)m(x) \implies Lr(x) \in P$.  

This is where the problem is. I want to claim that $Lr(x) \in P \implies L\in P$ or $r(x) \in P$. Obviously this then forces $r(x) \in P$ by the intersection assumption which then forces $r=0$. The problem is that $r(x)$ is not necessarily in $\mathbb{Z}[x]$ so the prime condition on $P$ does not necessarily apply here. Is there a way to strengthen the condition on $m(x)$ to ensure that $r(x) \in \mathbb{Z}[x]$? 

 A: Let  P be the prime ideal $P \subseteq \Bbb{Z}[x]$ and let it be not a principal ideal, so $P$ contains two non zero elements $f,g$ with no common factor in $\Bbb{Z}[x]$. We can prove this easy lemma-
Lemma- $f,g$ has no common factor in $\Bbb{Q}[x]$.
Sketch- If they have a common factor, say $h\in \Bbb{Q}[x]$ with degree $\ge1$, then writing $h=ah_0$ where $h_0$ is primitive polynomial in $\Bbb{Z}[x]$, we can easily show $h_0$ divides $f$ and $g$, which is a contradiction.
Claim- $P \cap \Bbb{Z}\neq 0$
Proof- Consider $I=\langle f,g \rangle \subseteq P$. As $\Bbb{Q}[x]$ is a PID, so it is a g.c.d domain, i.e. g.c.d exists, and by Lemma $f,g$ has no common factor in $\Bbb{Q}[x]$, therefore $(f,g)=1$ so, there exist $a,b\in \Bbb{Q}[x]$ (Because PIDs are Bezout domains) such that $$af+bg=1 \hspace{5cm}(*)$$ 
Now, multiplying $*$ by lcm of denominators $a$ and $b$, say $c$, we get $$P \ni caf+cbg=c\in \Bbb{Z}$$  So,  $P \cap \Bbb{Z}\neq 0$
A: You know that $r(x)\in\mathbb Q[x]$ and $Lr(x)\in P$ for some $L\in\mathbb Z$, $L\ne0$. Now multiply $Lr(x)$ by a non-zero integer $a$ such that $ar(x)\in\mathbb Z[x]$, and find $Lar(X)\in P$. Then $ar(x)\in P$ and $\deg ar(x)=\deg r(x)<\deg m(x)$. 
You have to be careful when start with $m\in P$, $\deg m\ge1$ of minimal degree to suppose that $m$ is primitive if want $P=(m(x))$, that is, the $\gcd$ of coefficients of $m$ is $1$. (You also need this assumption when $r=0$.) If this is not the case, then $m(x)=kn(x)\in P$ with $k\ge 2$ and $n(x)$ primitive, and then $n(x)\in P$ is a generator.
