Epimorphism from $\mathbb{Z}[i]$ to $\mathbb{F}_{p}$ where $p\equiv1 \pmod 4$ I was given the following problem:


*

*Using Fermat's little theorem, show that given a prime $p$ so that $p\equiv1 \pmod 4$, there exists a number $x\in\mathbb{F}_{p}$ that solves the equation $x^2+1=0$.

*Find an epimorphism $\phi{:}\space\mathbb{Z}[i]\to\mathbb{F}_p$.

*Suppose now $p=13$. Express $\ker{\phi}$ as a principal ideal. 


So far, I found:


*

*Suppose $p=4k+1$ for some $k\in\mathbb{Z}$. From Fermat's theorem, for every nonzero $x\in\mathbb{F}_p$, $x^{p-1}-1=(x^{2k}+1)(x^{2k}-1)=0$, and since the exponent of $\mathbb{F}_p^{\times}$ cannot be less than $p-1$, we must have some $y\in\mathbb{F}^{\times}$ so that $y^{2k}\ne1$, and therefore $(y^k)^2+1=0$. 

*Let $l\in\mathbb{F}_p$ be a solution for the equation $l^2+1=0$, as we proved such number exists. For every $a+bi\in\mathbb{Z}[i]$, define $\phi(a+bi)=a+bl \pmod p$. We can check that this is a homomorphism, and for every $x\in\mathbb{F}_p$, $\phi((x-xl)+xi)=x$ and therefore this is an epimorphism.

*Here I got stuck. For $p=13$, we may choose $l=8$ as $l^2+1=65\equiv0 \pmod{13}$. So $\ker\phi$ is the ideal of the Gaussian integers of form $13n-8b+8bi$ where $n,b\in\mathbb{Z}$. However, how does one express these as a form of a principal ideal?


I'll appreciate your help with answering Q. #3, and in checking my proof of the previous questions.
 A: $\;\;\;\;$$\Bbb F_p^*$ is cyclic and of size $p-1$ which is divisible by $4$ and therefore we may fix  $\alpha\in\Bbb F_p^*$ of order $4$ so that $\alpha^2$ has order $2$ ; i.e. $\alpha^2=\mathbf{-1}$. Therefore, $\alpha$ is a solution to $x^2+\mathbf{1}=\mathbf{0}$ over $\Bbb F_p$ and $\phi:x+yi\mapsto \mathbf{x}+\mathbf{y}\alpha$ defines a ring epimorphism from the Euclidean domain $\Bbb Z[i]$ to the field $\Bbb F_p$ where $\mathbf x,\mathbf y$ respectively denote the residue classes $x+p\Bbb Z,y+p\Bbb Z$.
$\;\;\;\;$Note $\langle p\rangle$ is not a prime ideal of $\Bbb Z[i]$ because, in particular, for each $a\in\alpha$ we must have $a^2+1=(a+i)(a-i)=a'p$ for some $a'\in\Bbb N$. Therefore, $p$ must split into prime factors in $\Bbb Z[i]$ yielding $p=q\bar q$ for any prime factor $q$ of $p$. Therefore, $\phi(p)=\phi(q)\cdot\phi(\bar q)=\mathbf 0$,  $\langle q\rangle\subseteq\text{ker}(\phi)$ and consequently $\text{ker}(\phi)=\langle q\rangle$ as $\text{ker}(\phi)$ and $\langle q\rangle$ are maximal $\Bbb Z[i]$ ideals.
$\;\;\;\;$When $p=13$ we have $p=13=2^2+3^2=(2+3i)(2-3i)$ which yields  $\text{ker}(\phi)=\langle 2+3i\rangle$. 
