A puzzling point in proof of Eisenstein Criterion for irreducible polynomials on Integral Domain Theorem (Eisenstein Criterion).
Let $P$ be a prime ideal of the integral domain
$R$ and let $f(x) = x^n +a_{n-1}x^n+\cdots+a_1 x +a_0$ be a polynomial in $R [x]$ (here $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 $f(x)$ is irreducible in $R[x]$.
Proof. Suppose $f(x)$ were reducible, say $f(x) = a(x)b(x)$ in $R[x]$, where $a(x)$
and $b(x)$ are nonconstant polynomials. Reducing this equation modulo $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 terms of both $a (x)$ and $b(x)$ are elements
of $P$ . But then the constant term $a_0$ of $f(x)$ as the product of these two would be an
element of $P^2$, a contradiction. $\Box$

This proof is from Abstract Algebra by Dummit & Foote. The puzzling point is bold-italic in the proof. Why it is not possible that only one constant of $\overline{a(x)}, \overline{b(x)}$ is $0$ and the other is not? I don't think it violates the rule of integral domain in this case.
Could any one give me some idea ? Thank you in advance!
 A: That proof of Eisenstein's criterion is clearer using unique factorization of prime products.
$\rm\color{#0a0}{Assume}$ that $f$ is reducible $\,f = g\,h,\,$ $\,i = \deg g,\ j = \deg h,\ \color{#c00}{i,j\ge 1}$, wlog $\,g,h\,$ monic.
This factorization maps to $\,x^n = \bar g\,\bar h\,$ in $\,\bar R := R/P,\,$  a domain, so $\,x\,$ is prime in $\bar R[x]$.
Since it is a prime power: $\,x^n = x^k\, x^{n-k}\,$ are the only possible monic factorizations.
Thus $\,\bar g = x^i,\ \bar h = x^j,\,$ so $\,\color{#c00}{i,j\ge 1}\Rightarrow\,\bar g(0)\!=\!0\!=\!\bar h(0),\,$ i.e. $\,g(0),h(0)\in P$.
Therefore $\,f(0) = g(0)h(0)\in P^2,\,$ contra $\rm\color{#0a0}{hypothesis},\,$ hence $f$ is irreducible.
Alternative direct inductive proof that $\,\bar g(0)\!=\!0\!=\!\bar h(0),\,$ i.e. $\,x\mid \bar g,\bar h.\,$ If not, wlog $\, x\nmid \bar g,\,$ then $\,x^n = \bar g\,\bar h\,$ $\Rightarrow\,x\mid \bar g\,\bar h,\,$ so $\,x\nmid \bar g\Rightarrow x\mid \bar h,\,$ by $\,x\,$ prime. Repeating this shows all $\,n\,$ factors of $\,x\,$ must divide into $\,\bar h,\,$ so $\,n = \deg \bar h = \deg h,\,$ so $\,\color{#c00}i = \deg g \color{#c00}{= 0},\,$ contra hypothesis.
A: Match coefficients. You obtain a system of equations where if $\deg a = i$ and $\deg b = j$ then $i+j = n$, and, denoting their coefficients by $\alpha_s$ and $\beta_t$, you have $\alpha_i \beta_j = 1$ and then intermediary sums of cross terms, all of which must be $0$. Then the proof as in Dummit and Foote resumes - if these are zero, they are elements of $P$. Ideal arithmetic says that such products are elements of $P^2$, obtaining the contradiction.
Edit: I did not see your more refined question at the end. Suppose that $a(x)$ has $0$ constant term, and it's $b(x)$ that doesn't. Then $a \mod P$ would have to be identically $0$. If not, you could look at its lowest nonzero coefficient and this would eventually be multiplied by the constant term in $b \mod P$. The result is a nonzero monomial with $\deg < n$ in the product $ab \mod P$, since $P$ is a prime ideal. But that means that the whole polynomial $a(x)$ is in $P$, and therefore the whole polynomial is in $P$ since ideals are closed under multiplication. But $f$ is monic, so this is impossible.
