Question about Proof of Eisenstein's Criterion for integral domains Let $P$ be a prime ideal of the integral domain $R$ and let $f(x)=x^n+a_{n-1}x^{n-1}+\cdots a_1x+a_0$ be a polynomial in $R[x]$ with $n\geq 1$. Suppose $a_{n-1},\dots,a_1,a_0$ are all elements of $P$ and suppose $a_0$ is not an element of $P^2$. Then Eisenstein's criterion states that $f(x)$ is irreducible in $R[x]$. I am having trouble understanding a part of the proof of this statement as given in Dummit and Foote. The proof starts as follows:
Suppose to the contrary that $f(x)=a(x)b(x)$ in $R[x]$ where $a(x)$ and $b(x)$ are nonconstant polynomials. Reducing the equation mod $P$ and using the assumptions on the coefficients of $f(x)$ we obtain the equation $x^n=\overline{a(x)b(x)}$ in $(R/P)[x]$ where the bar denotes the polynomials with coefficients reduced mod $P$. Since $P$ is a prime ideal, $R/P$ is an integral domain, and it follows that both $\overline{a(x)}$ and $\overline{b(x)}$ have $0$ constant term, i.e., the constant term of both $a(x)$ and $b(x)$ are elements of $P$.
Why does this last part follow? Why does this mean that $a(x)$ and $b(x)$ have $0$ constant term?
 A: I reckon it uses the fact that $x^n$ can be only factorized as $x^ix^j$, where $i+j=n$ and thus we must have that the constant terms of $a(x)$ and $b(x)$ are in $P$, since they have positive degree.
However, I like the following proof more. Let $\overline{a(x)} = x^k + c_{k-1}x^{k-1} + \cdots + c_0$ and $\overline{b(x)} = x^k + b_{k-1}x^{k-1} + \cdots + b_0$. Then from $x^n = \overline{a(x)b(x)}$ we have that $c_0b_0 = 0$. Since $a_0 \not \in P^2$ we have that WLOG $a_0 \not = 0$ in $(R/P)[x]$, while me have $b_0 = 0$ in $(R/P)[x]$.
Now consider the coefficient in front of x, which is $0$. It's given by $c_1b_0 + c_0b_1$. Since $b_0 = 0$ and $c_0 \not = 0$ we must have $b_1 = 0$. Inductively, liek this you can prove that $b_i = 0$ in $(R/P)[x]$ for all $i$. However this is a contradiction, since the coefficient in front of $x^k$ in $\overline{b(x)}$ is $1$, which is not an element of $P$. 
Hence the proof.
A: $a(x)$ and $b(x)$ do not necessarily have $0$ constant term. Your arguments show that $a(x)b(x)$ has the constant term lying in $P^2$, which contradicts the assumption for $a_0$, and hence the proof follows.
