If $\phi(\alpha)$ is prime in $\mathbb{Z}$, show that $\alpha$ is prime in $\mathbb{Z}[i]$ If $\alpha=a+bi$ is a Gaussian integer, let $\phi(\alpha)=a^2+b^2$. 

If $\phi(\alpha)$ is prime in $\mathbb{Z}$, show that $\alpha$ is prime in $\mathbb{Z}[i]$.

I use the idea that if $a^2+b^2=p$ where $p$ is prime number, then $\mathbb{Z}[i]/(a+bi) \cong \mathbb{Z}_p$. Hence, $(a+bi)$ is a maximal ideal since $\mathbb{Z}_p$ is a field. So, $(a+bi)$ is a prime ideal and hence $a+bi$ is a prime element.
Is this proof works?
EDIT: $\mathbb{Z}[i]/(a+bi) \cong \mathbb{Z}_p$ is proved in my class so I think I can straight away use it here. By the way, in the proof of $\mathbb{Z}[i]/(a+bi) \cong \mathbb{Z}_p$, my lecturer said that $a^2+b^2=p$ implies $\gcd(a,b)=1$. 
I can't figure out the proof of this. I start with contradiction, i.e. $d=\gcd(a,b)>1$. Then $d(\frac{a^2}{d}+\frac{b^2}{d})=p \implies d |p \implies d=p \implies a^2+b^2=\gcd(a,b)$, contradiction. Is this proof work ?
 A: Here is an alternative proof: 
Because $\mathbb{Z}[i]$ is a unique factorization domain, it is equivalent to show that $a+ib$ is irreducible. So let $z_1,z_2 \in \mathbb{Z}[i]$ such that $a+ib=z_1z_2$. Then $p=\phi(a+ib)=\phi(z_1)\phi(z_2)$, hence $\phi(z_1)=1$ or $\phi(z_2)=1$; however, for $z \in \mathbb{Z}[i]$, $\phi(z)=1$ iff $z$ is invertible.
A: Not only is your proof correct, it also avoids using the fact that $\def\Z{\mathbf Z}\Z[i]$ is a unique factorisation domain. This surprised me somewhat, but one does indeed have the following more general result.
Propostion. Let $n\in\Z$ be a non-square, and $R=\Z[\sqrt n]\cong\Z[X]/(X^2-n)$, and $\alpha=a+b\sqrt n\in R$ such that $\phi(\alpha)=a^2-nb^2$ is an irreducible integer (up to a sign a prime number). Then $\alpha$ is a prime element of$~R$ (which means $\alpha R$ is a prime ideal, or equivalently that $\alpha$ satisfies the property of Euclid's lemma).
Proof in several simple steps.


*

*One has $\phi(xy)=\phi(x)\phi(y)$ for all $x,y$, because $\phi(a+b\sqrt n)=(a+b\sqrt n)(a-b\sqrt n)$.

*So $\alpha$ cannot be invertible in $R$, as $p=\phi(\alpha)$ is not invertible in $\Z$.

*$a$ and $b$ are relatively prime in $\Z$, since any for any common divisor $d$ the irreducible number $p$ is divisible by $d^2$, forcing $d^2=1$.

*If $s,t\in\Z$ are Bezout coefficients with $\gcd(a,b)=1=sa+tb$, then $(t+s\sqrt n)\alpha\in\Z+1\sqrt n$, from which it easily follows that $\Z+\alpha R=R$.

*Therefore the composite morphism $\Z\to R\to R/\alpha R$ is surjective.

*The kernel of this composite morphism contains the irreducible number $p$ since $p=\alpha(a-b\sqrt n)\in\alpha R$, but it does not contain $1$ since $\alpha R\neq R$; therefore the kernel equals $p\Z$.

*Then $R/\alpha R\cong\Z/p\Z$ is a field, $\alpha R$ is a maximal ideal of $R$ and in particular a prime ideal.
Your statement is of course the instance $n=-1$ of this proposition. My surprise was due to the fact that most instances of $\Z[\sqrt n]$ are not unique factorisation domains, and for them the property of being a prime element is much stronger than being irreducible.
A: Interestingly, I used more or less exactly the converse argument to show the converse result in this other answer very recently (relevant because I do prove the question in your title). In particular, someone wants to show that a quotient of $\mathbb{Z}[i]$ is a field, and I do it by showing something is prime, which I do by considering the norm being prime. You want to show that the norm behaves nicely, and you show that it being prime gives a field.
