Showing that $Z[\sqrt{-n}]/\sqrt{-n}\approx Z_n $ and other similar isomorphisms. I found the isomorphism here: Show that $\sqrt{-n}$ and $\sqrt{-n} +1$ are not prime in $\mathbb{Z}[\sqrt{-n} ]$
First I would like to show the isomorphism $\mathbb Z[\sqrt{-n}]\simeq\mathbb Z[X]/(X^2+n)$. This is my attempt:
Consider the map $\phi: Z[x] \to Z[\sqrt{-n}]$ defined by $f \to f(\sqrt{-n})$. It is clearly surjective and so by by First isomorphism theorem $Z[x]/\ker(\phi)\approx Z[\sqrt{-n}]$. It is easy to see that $\ker(\phi)$ contains $(x^2+n)$ but i am not sure how to show equality. We know that $(x^2+n)$ is not maximal (that is aposteriori) so that is not helpful. We do know it is prime as $x^2+n$ is irreducable and so prime ($Z[x]$ is a UFD). How do i conclude the two ideals are equal. I was thinking of perhaps doing things with the field of fractions and minimal polynomials but that does not seem to work.
Next how do I show the other two isomorphisms in the link above?

*

*$\mathbb Z[\sqrt{-n}]/(\sqrt{-n})\simeq \mathbb Z/n\mathbb Z$


*$\mathbb Z[\sqrt{-n}]/(\sqrt{-n}+1)\simeq \mathbb Z/(n+1)\mathbb Z$
My suspicion is to use the isomorphism theorems here. The ideal $(\sqrt{-n})$ coresponds to the ideal $(x+(x^2+n))$ I think but I am not sure.
Thank yoou
 A: The polynomials in $\ker(\phi)$ are exactly the polynomials with $\sqrt{-n}$ as a root. These polynomials are exactly multiples of the minimal polyomial of $\sqrt{-n}$, which is $x^2 + n$. To prove this, assume there is a polynomial $p(x) \in \ker(\phi)$ and use division with remainder to write $p(x) = q(x)(x^2+n) + r(x)$ where $r$ is linear (which is valid because $x^2+n$ is monic so you can divide by it without resorting to the field of fractions). Then because you know that $\sqrt{-n}$ is a root of $p(x)$, you know that it must be a root of $r(x)$. All that remains to be shown is that the only linear polynomial with $\sqrt{-n}$ as a root is the zero polynomial (this is equivalent to showing that $x^2+n$ is the minimal polynomial of $\sqrt{-n}$).
EDIT: I just saw the last two parts. Your intuition here is correct. By the fourth isomorphism theorem, the ideal $(\sqrt{-n}) \subset Z[\sqrt{-n}]$ corresponds to an ideal of $Z[x]$ containing $x^2+n$ which you’ve correctly identified as the ideal generated by $x,x^2+n$. Then by the third isomorphism theorem we have that
$$ Z[\sqrt{-n}]/(\sqrt{-n}) \cong \left(Z[x]/(x^2+n)\right)/\left((x,x^2+n)/(x^2+n)\right) \cong Z[x]/(x,x^2+n),$$
and this quotient is pretty easily seen to be isomorphic to $Z/nZ$. Similarly, the other example is isomorphic to
$$ Z[x]/(x+1,x^2+n) \cong Z[x]/(x+1,x-n) \cong Z[x]/(x+1,n+1) \cong Z/(n+1)Z. $$
