The following is a proposed solution to a fairly routine problem (which has in fact been asked on stackexchange Quotient ring of Gaussian integers, but not as a solution verification question), which I am having severe difficulty understanding. As there are many questions, partial answers (e.g. answering only questions 1, 5 for example) are very welcome! I tend to get confused easily when answers are compact, please consider spelling things out in full glory please!
Problem A: Let $a$ and $b$ be relatively prime integers, and $i^{2}=-1 .$ Show that the natural map $\mathbb{Z} \rightarrow \mathbb{Z}[i] /\langle a+b i\rangle$ induces an isomorphism of $\mathbb{Z}/\left(a^{2}+b^{2}\right) \mathbb{Z}$ with $\mathbb{Z}[i] /\langle a+b i\rangle$.
Proof: First, note that the map $\mathbb{Z}[X] \rightarrow \mathbb{Z}[i]$ taking $X$ to $i$ is surjective, and its kernel is the ideal generated by $X^{2}+1$.
$\textbf{Question 1:}$ I think that this is "obvious", I mean the two rings "look" the same! But how would I rigorously argue that the kernel is precisely the ideal generated by $X^{2}+1$?)
Therefore, $\mathbb{Z}[i]$ is isomorphic to $\mathbb{Z}[X] /\left\langle X^{2}+1\right\rangle,$ and $\mathbb{Z}[i] /\langle a+b i\rangle$ is isomorphic to $\mathbb{Z}[X] /\left\langle X^{2}+1, a+b X\right\rangle$. We therefore work with the latter.
$\textbf{Question 2:}$ Why is this? How can we take quotients simultaneously like that? And why is the $i$ transforming into the $X$; can anyone spell this out rigorously/pedantically please?)
Note that $a^{2}+b^{2}$ is in the kernel of the map from $\mathbb{Z}$ to $\mathbb{Z}[X] /\left\langle X^{2}+\right.$ $1, a+b X\rangle,$ as $a^{2}+b^{2}=(a+b X)(a-b X)+b^{2}\left(X^{2}+1\right)$. We need to show that the map is surjective, and that its kernel is exactly $a^{2}+b^{2}$.
For surjectivity, since $\mathbb{Z}[X] /\left\langle X^{2}+1\right\rangle$ is spanned by $1$ and $X$ it suffices to show that $1$ and $X$ are in the image of $\mathbb{Z} \rightarrow \mathbb{Z}[X] /\left\langle X^{2}+1, a+b X\right\rangle$.
$\textbf{Question 3:}$ Why does it suffice? I get that $\mathbb{Z}[X] /\left\langle X^{2}+1, a+b X\right\rangle$ is also spanned by $1,X$. But the natural map $\mathbb{Z} \rightarrow \mathbb{Z}[X] /\left\langle X^{2}+1, a+b X\right\rangle$ can only map to a constant term of degree $0$. So how do we "span using $X$" to get the desired conclusion?)
It is clear that $1$ is in the image. For $X,$ note that since $a$ and $b$ are relatively prime, so are $b$ and $a^{2}+b^{2}$. Write $1=m b+n\left(a^{2}+b^{2}\right)$. Then $X+m a = m(a+b X)+n(a+b X)(a-b X)+n b^{2}\left(X^{2}+1\right),$
$\textbf{Question 4:}$ How in the world does one come up with this identity)
and the right hand side is clearly contained in $\left\langle a+b X, X^{2}+1\right\rangle .$ Thus $X$ is congruent to $-m a$ modulo $\left\langle a+b X, X^{2}+1\right\rangle,$ so $X$ is in the image of $\mathbb{Z} \rightarrow \mathbb{Z}[X] /\left\langle X^{2}+1, a+b X\right\rangle$.
We thus have a surjective map of $\mathbb{Z} /\left(a^{2}+b^{2}\right) \mathbb{Z}$ onto $\mathbb{Z}[X] /\left\langle X^{2}+1, a+bX\right\rangle$ so it suffices to show that it is injective. We do this by showing that there are at least $a^{2}+b^{2}$ distinct elements of $\mathbb{Z}[X] /\left\langle X^{2}+1, a+bX\right\rangle .$
$\textbf{Question 5:}$ I have no idea what the next few lines of the proof means. In particular, I do not know what "free abelian group" of "rank two" is, and the argument using parallograms entirely goes over my head.)
Note that $\mathbb{Z}[X] /\left\langle X^{2}+1\right\rangle$ is a free abelian group of rank two, spanned by 1 and $X$ and the ideal inside this generated by $\langle a+bX\rangle$ is spanned by $a+bX$ and $X(a +bX)=b-aX .$ The number of elements in the quotient of these two abelian groups is equal to the area of the parallogram spanned by $(a, b)$ and $(b,-a),$ which is $a^{2}+b^{2}$.
For question 1, first show that the ring homomorphism $\mathbb{Z}\left[X\right] \to \mathbb{Z}\left[i\right]$ sending $X$ to $i$ factors through $\mathbb{Z}\left[X\right] / \left(X^2+1\right)$; then show that the resulting map is injective (since $\mathbb{Z}\left[X\right] / \left(X^2+1\right)$ has a basis consisting of the projections of $1$ and $X$, and this basis gets sent to a linearly independent family).
– darij grinberg Nov 08 '20 at 23:46