Proof using prime decomposition in $\mathbb{Z}[i]$ This is the second problem in Neukirch's Algebraic Number Theory.  I did the proof but it feels a bit too slick and I feel I may be missing some subtlety, can someone check it over real quick?
Show that, in the ring $\mathbb{Z}[i]$, the relation $\alpha\beta =\varepsilon\gamma ^n$, for $\alpha,\beta$ relatively prime numbers and $\varepsilon$ a unit, implies $\alpha =\varepsilon '\xi ^n$ and $\beta =\varepsilon ''\eta ^n$, with $\varepsilon '$,$\varepsilon ''$ units.
So basically, because the Gaussian integers are a unique factorization domain and alpha and beta are relatively prime, I have the prime decomposition:
$\alpha = \varepsilon' p_1^{e_1}...p_r^{e_r}$
$\beta = \varepsilon'' p_s^{e_s}...p_y^{e_y}$
$\varepsilon\gamma^n = \varepsilon q_1^{nf_1}...q_k^{nf_k}$
And so $\alpha\beta = p_1^{e_1}...p_r^{e_r}p_s^{e_s}...p_y^{e_y}$.  Where we have a one-to-one correspondence between the $p_i^{e_i}$ and the $q_i^{nf_i}$ and thus setting $p_i^{e_i} = q_i^{f_i}$, in accordance with this correspondence, we obtain our desired xi and eta.  
Does this make sense?  I never used anything specific to the Gaussian integers so if this is right then it holds for all UFDs.  Thanks.
 A: The proof looks OK, but you might want to make the role of the fact that $\alpha$ and $\beta$ are relatively prime more apparent. You probably mean the right thing, but the current wording sounds a bit like you're using that to get the prime decompositions, not for concluding that $p_1$ through $p_r$ and $p_s$ through $p_y$ are disjoint sets of primes; you never mention that crucial fact explicitly.
Also I'd continue the numbering with $p_{r+1}$; the additional index $s$ appears somewhat unmotivated and adds to the unclarity whether there might be an overlap between the two sets of primes.
A: The trouble with Gaussian integers is that unique factorization is only unique up to units. For example consider $-i \cdot (1+i)(2+i)(1+2i)^4 = -1 \cdot (1+i)(-1+2i)(2-i)^4$: The primes $2+i$ and $-1+2i$ are just associates rather than equal. Prime ideals factor out associates and free us from caring about choosing associates correctly: The ideal $(2+i)$ is equal to $(-1+2i)$ and so the factorization into ideals $(1+i)(2+i)(1+2i)^4$ is unique (even if we have a few different ways to write it).
With that in mind take the prime ideal factorization of $\gamma$ so consider $$(\alpha)(\beta) = (\pi_1)^{n r_1} (\pi_2)^{n r_2} \cdots (\pi_k)^{n r_k}$$ so in particular $(\pi_1)|(\alpha)(\beta)$ and by the characterization of a prime ideal this implies that $(\pi_1)|(\alpha)$ or $(\pi_1)|(\beta)$, suppose $(\pi_1)|(\alpha)$ then by coprimality $(\pi_1)\not|(\beta)$ so by unique factorization $(\pi_1)^{n r_1}|(\alpha)$. Just doing the same thing for each prime factor of $(\gamma)$ gives the result that both $(\alpha)$ and $(\beta)$ are products of $n$th powers of prime ideals.
Travelling back to the Gaussian integers themselves, this result requires us to bring units back in so we conclude that $\alpha = \varepsilon' \xi^n$, $\beta = \varepsilon'' \eta^n$.
A: Yes, it seems to hold in every UFD.
