<s>[INST] Ideal factorization in cubic extension Let $a:=\sqrt[3]3$
Factoring the ideal $(5)$ in $\Bbb Z[a]$, I used reduction of $X^3-3$ mod $5$ to find gives $(5)=(5,a-2)(5,a^2+2a+4)$
Checking my result under sage math gives $(5)=(a-2)(a^2+2a+4)$
I don't know why this difference?
We have $(5)=(5,a-2)(5,a^2+2a+4)=(5\Bbb Z[a]+(a-2)\Bbb Z[a])(5\Bbb Z[a]+(a^2+2a+4)\Bbb Z[a])$
$=25\Bbb Z[a]+5\Bbb Z[a](a-2+a^2+2a+4)+(a-2)(a^2+2a+4)$
Since $25\Bbb Z[a]=(25)\subset (5)$ and $5\Bbb Z[a](a-2+a^2+2a+4)\subset (5)$ we have
$(5)=(a-2)(a^2+2a+4)$
If there is no mistake, it means that we can just remove p all the time if we have a prime factorization: $(p)=(p,m_i)^{e_i}$ where the $m_i$ are the irreducible polynomials of factorization of the minimal polynomial of $a$ modulo $p$. Does this make sense?
Thank you for your help
 [/INST] In a commutative ring, the product of two principal ideals $(a_1)(a_2)$ is equal to the ideal $(a_1a_2)$. So in this case, this indeed gives us $(a - 2)(a^2 + 2a + 4) = (a^3 - 8) = (-5) = (5)$.
However, we cannot remove the $p$ from your expression in general. For example, if we are working in $\mathbb{Z}[\sqrt[3]{5}]$ (let $b = \sqrt[3]{5}$), let's try to factorize $(3)$. By the same method you used, we get $(3) = (3, b + 1)(3, b^2 - b + 1)$. In this case, though, we have $(b + 1)(b^2 - b + 1) = (b^3 + 1) = (6) \neq (3)$.
</s>