Factoring into primes using the norm function Let $l(z)=z \bar z$ be a norm function.
How can one perform prime factorization in the rings $\mathbb{Z}[i]$, $\mathbb{Z}[\frac{-1 \sqrt{-3}}2]$ or any other ring using the norm function?
For example, how can one find prime factorization of $8+i \in \mathbb{Z}[i]$ or $13 \in \mathbb{Z}[\frac{-1 \sqrt{-3}}2]$?
Any help would be appreciated.
 A: If $R$ is a ring, $a,b\in R$ such that $a\mid b$, then we have $b=ak$ for some $k\in R$, and if $\mathsf{N}:R\to\mathbb{Z}_{\geq 0}$ is a norm function, then we have
$$\mathsf{N}(b)=\mathsf{N}(ak)=\mathsf{N}(a)\mathsf{N}(k)\;\;\implies \;\;\mathsf{N}(a)\mid \mathsf{N}(b).$$
As an example, if we take $R=\mathbb{Z}[i]$ and $\mathsf{N}(a+bi)=a^2+b^2$, then
$$\mathsf{N}(8+i)=8^2+1^2=65=5\cdot 13.$$
So if
$$8+i=u\;\pi_1^{d_1}\cdots\pi_n^{d_n}$$
is the factorization into irreducibles of $8+i$ in the ring $\mathbb{Z}[i]$ ($u$ being a unit), we have that
$$\mathsf{N}(8+i)=65=\mathsf{N}(\pi_1)^{d_1}\cdots\mathsf{N}(\pi_n)^{d_n}.$$
Now, I leave it to you to check that we cannot have $\mathsf{N}(\pi)=65$ for any irreducible $\pi\in\mathbb{Z}[i]$ (do you know the classification of irreducibles in $\mathbb{Z}[i]$?) But from this, we see that
$$8+i=u\;\pi_1\pi_2$$
where $\mathsf{N}(\pi_1)=5$ and $\mathsf{N}(\pi_2)=13$, and $u\in\{\pm1,\pm i\}$. Now just solve for the real and imaginary parts of $\pi_1$ and $\pi_2$... except for the fact that there are two potential $\pi_1$'s and two potential $\pi_2$'s (up to multiplication by a unit), each potential being the conjugate of the other:
$$\pi_1\in\{2\pm i\},\quad \pi_2\in\{3\pm 2i\}.$$
Here I think you must guess and check (at least, I don't remember any way of deducing which conjugate we need).
