irreducible polynomial in $Z_p [x]$ Let $p$ be a prime integer. prove that the following are equivalent
(a) $p$ is a prime in $Z[i]$
(b) $x^2 +1$ is irreducible in $Z_p [x]$
What I know is that if p is a prime in $Z[i]$, $p$ is congruent to $3$ modulo $4$
and $x^2 +1$ is irreducible in $Z_p [x]$ iff for all $x=0,1,....,p-1$ , $x^2 +1$ is not congruent to 0 modulo p
Can you help me please
 A: If $x^2+1$ is not irreducible in $\Bbb{Z}_p[x]$ then $x^2+1\equiv 0\pmod p$ has a solution. Let $a$ be a solution of this congruence equation. 
We consider $a^2+1=(a+i)(a-i)$. It is trivial that $p\mid (a^2+1)$. If $p$ is prime in $\Bbb{Z}[i]$ then $p\mid(a+i)$ or $p\mid(a-i)$. If $p\mid (a+i)$, then $p\mid i$. (Because $p$ is integer.) It is not possible. Similarly, you can prove $p\nmid (a-i)$ so $p$ is not prime in $\Bbb{Z}[i]$.
Conversely, If $p$ is not prime in $\Bbb{Z}[i]$, then $p$ is of the form $4k+1$. By Fermat's theorem on sums of two squares, there is integer $a$, $b$ such that $a^2+b^2=p$. These $a$ and $b$ satisfies $a^2+b^2\equiv 0 \pmod p$ and multiply $a^{-2}$ both sides then we get $1+(ba^{-1})^2\equiv 0 \pmod p$. So the equation $x^2+1\equiv 0\pmod p$ has a solution so the polynomial $x^2+1$ is not irreducible.
A: I think the question is easy:
First, if $x^2+1$ is irreducible in $\mathbb Z_p[x]$, then $x^2+1\equiv 0\pmod p$ has no solution, as you observed, so no integer $a$ satisfies $a^2\equiv -1\pmod p$, i.e. the quadratic residue $(\dfrac{-1}{p})=-1.$ Hence, by Euler's criterion, we find that $p\equiv 3\pmod4,$ which is exactly equivalent with your other condition.
Second, if $a^2\equiv-1\pmod p,$ then we see that $$\mathbb Z[i]/(p)=\mathbb (Z[x]/(x^2+1))/(p)=\mathbb Z_p[x]/(x^2+1)=\mathbb Z_p[x]/((x-a)(x+a))=\mathbb Z_p\oplus\mathbb Z_p$$ is not an integral domain, i.e. $p$ is not a prime in $\mathbb Z[x].$  
Hope this helps.  
P.S. For the last isomorphism, see Chinese Remainder Theorem.
P.P.S.This is a special case of Dedekind's theorem.
P.P.P.S.If you know not about the commutative algebra, just employ of the wonderful proof by tetori instead, in the second part of the proof.  
