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 ?