Cosets in quotient rings over ideals of the form $(n,f(x))$

When we take $\mathbb{Z}[X] / (n,f(X))$, $n \in \mathbb{Z}$ and $f(X) \in \mathbb{Z}[X]$, how do we construct the cosets?

For example, consider the ideal $(2,X) = \{2p(X) + Xq(X) \mid p(X), q(X) \in \mathbb{Z}[X]$. Now suppose we take the quotient ring: $\mathbb{Z}[X] / (2,X)$. What do the cosets look like? In particular, if we take any polynomial $f(X) \in \mathbb{Z}[X]$ and look for the remainder, do we divide by 2, or by $x$? Do we divide it separately and then add the remainder? (For what it's worth I know that this quotient ring is isomorphic to $\mathbb{Z}_2$ - I'd just like a more thorough explanation of how to construct the cosets). Thanks.

In terms of "remainders", you would divide by $X$, get the remainder (which will be an integer, the constant term of the polynomial), then the integer divide by 2 and take that remainder. You could divide in the other order, too -- by 2 and then by $X$ -- the result will be the same. There are only 2 possible remainders, 0 and 1. The cosets are the ideal $(2,X)$ itself, and $1 + (2,X)$. If you want a more explicit description, $(2,X)$ consists of all polynomials with even constant term, and the other coset consists of the polynomials with odd constant term.

• So if our ideal is more generally (n, p(X)), we would divide by $p(X)$ to get some remainder $r(x)$, and then divide this remainder by $n$ to get $r'(x)$, and all the distinct $r'(x)$s would form the elements of the quotient ring? – zojirushi Jan 30 '15 at 5:05
• If $p(X)$ does not having leading coefficient $\pm 1$, then it is not so clear what it means to divide a polynomial by $p(X)$ and take the remainder. (e.g. How do you divide $x^3+1$ by $2x^2$ in $\mathbb{Z}[x]$?) – Ted Jan 30 '15 at 5:24
• And even if you do have leading coefficient 1, it's still complicated. Suppose $p(x)=x^2+1$. Dividing by $p(x)$ gives a remainder $a+bx$. Now how do you divide this by $n$? The most straightforward thing to do is divide $a$ and $b$ separately by $n$ and replace them with their remainders. So $a$ and $b$ can be any integer from $0,1,\ldots,n-1$. This gives you the cardinality of the quotient ring ($n^2$), but it does not tell you the ring structure, which is a number theory question - it depends in a more complicated way on the prime factorization of $n$. – Ted Jan 30 '15 at 5:29
• Okay - that suddenly makes so much sense. That's precisely the complication I was struggling with. Now I understand why something like $\mathbb{Z}[X] / (5, x^3 + x + 1)$ would be isomorphic to $\mathbb{Z}_5[X]/(x^3 + x + 1)$. Thanks! – zojirushi Jan 30 '15 at 5:33