First of all, according to the textbook that I use, there are some theorems about maximal and prime ideals.
(a) If R is a commutative ring such that R2=R, then every maximal ideal M in R is prime.
(b) In a commutative ring R with identity maximal ideals always exist.
(c) In a commutative ring R with identity 1R, which is not equal to 0, an ideal P is prime iff the quotient ring R/P is an integral domain.
It seems all right, but the contradiction happens when I think about Zm, the integers modulo m with m not prime.
This is my reasoning:
First, Zm is a commutative ring with identity 1R, which is not equal to 0. And since the identity exists in this ring, Zm2=Zm, so maximal ideals exist and they are prime.
On the other hand, since m is not prime, Zm has zero divisors, say xy=m, 1<x,y<m, then for all ideals I in Zm, Zm/I has zero divisors because (x+I)(y+I)=xy+I=I where x+I and y+I are not equal to I. This means Zm/I is not an integral domain for all ideals I in Zm. By (c), all ideals are not prime. But what about the maximal ideals? They do exist and they're prime.
Can anyone tell me what's wrong with my thought?