Is $\mathbb Z[X]/(X^2-1)$ a domain?

I have a doubt on something. I have a theorem that says that if $R$ is a ring, then $R/I$ is a domain iff $I$ is prime. Since $X^2-1$ is note prime, $\mathbb Z[X]/(X^2-1)$ is not a domain. But, $X^2-1=(X-1)(X+1)$, and since $X-1$ and $X+1$ are prime in $\mathbb Z[X]$, there are coprime, and thus, by the chinese remainder $$\mathbb Z[X]/(X^2-1)\cong \mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1),$$ since $\mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1)$ is a domain, then so is $\mathbb Z[X/(X^2-1)$. What is the mistakes here ?


A couple mistakes:

As was already mentioned, the product of two nonzero rings is never a domain, so that would not help.

But in reasoning about the quotient you made another mistake: thinking that $(X-1)$ and $(X+1)$ are coprime ideals. The CRT does not apply to them! You have that $(X+1,X-1)=(2,X+1)\neq R$.

In fact $\mathbb Z[X]/(X^2-1)\ncong \mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1)$ because $\mathbb Z[X]/(X^2-1)$ does not have any nontrivial idempotent elements. (This is easy to compute directly.) But, it is easy to see it is not a domain by exhibiting zero divisors: $(X-1)(X+1)=0$ in the quotient.