In watching a video from Prof. Gross's algebra course, there were some remarks for which I would appreciate explanations.
They were in a discussion of Gaussian primes, and in the case where $p \equiv 1\pmod {4}$, and $(x^2 +1)$ factors into $(x - a)(x + a)$ where $a^2\equiv - 1\pmod {p}$.
The lecture went on to say that these two factors are related to two roots whose related ideals are $(p, i - a)$ and $(p, i + a)$.
He then went on to point out that these are not principal.
But here (at last) is my first question: he then said that these are both prime in $Z[i]$. How, please, can a non-principal ideal be considered prime? (I probably should know this, did try to look it up.)
Then he went on to show that there are only two elements of order $2$, $+1$ and $-1 \pmod {p}$ by the argument that $p\mid(a^2 - 1)$, and since $p$ is prime, $p\mid(a -1)$ or $p\mid(a + 1)$; thus $a = 1$ or $a = -1$.
My second question is where does $a^2 - 1$ come from, since, we are assuming $a^2 \equiv - 1\pmod {p}$.
Lastly, I was wondering how this leads to Fermat's Theorem where $p = a^2 + b^2$. I can see that since there are two roots above which are complex conjugates and there is the constraint on $p$, $p \equiv 1\pmod {4}$. But I would appreciate help pulling it together.
Thanks. These lectures were produced eight years ago, so although I would prefer it, there is no mechanism for me to go up after class, etc.