Following is an example taken from Dummit Foote - Abstract Algebra after Proposition $9.4.12$
The idea of reducing modulo an ideal to determine irreducibility can be used also in several variables, but some extra care must be exercised. For example, the polynomial $x^2+xy+1$ in $\mathbb{Z}[x,y]$ is irreducible since modulo the ideal $(y)$ it is $x^2+1$ in $\mathbb{Z}[x]$ which is irreducible and of same degree. In this sort of argument it is necessary to be careful about collapsing. For example the polynomial $xy+x+y+1$ (which is $(x+1)(y+1)$) is reducible but appears irreducible modulo both $(x)$ and $(y)$.The reason for this is that non unit polynomials in $\mathbb{Z}[x,y]$ can reduce to units in quotient ring. To take account of this it is necessary to determine which elements in the original ring becomes units in the quotient.
I do not really understand this...
I realize that $xy+x+y+1$ is reducible in $\mathbb{Z}[x,y]$
going modulo $(y)$ gives $x+1$ which is irreducible.
I do not understand what does he mean when he says The reason for this is that non unit polynomials in $\mathbb{Z}[x,y]$ can reduce to units in quotient ring.
$f(x,y)=xy+x+y+1$ after going modulo $(y)$ is $x+1$ which is clearly not a unit...
So, I do not understand what does he actually wants me to see in this.
Please help me to see this.
Thank you.
EDIT : The proposition that i was referring to and which was used in this example is :
Let $I$ be proper ideal in an integral domain $R$ and let $p(x)$ be a non constant monic polynomial in $R[x]$. If the image of $p(x)$ in $(R/I)[x]$ is irreducible then $p(x)$ is irreducible in $R[x]$
I think the other factor is what you are being asked to consider.
Yes, mod $y$ the factor $x+1$ remains irreducible but the factor $y+1$ becomes a unit.
Hence the product $(x+1)(y+1)$ winds up mod $y$ being an irreducible polynomial.