Examples

The following SAGE session shows the commands needed to compute the factorization of $ p\O_K$ for $ K$ the number field defined by a root of $ x^5+7x^4+3x^2-x+1$ and $ p=2$ and $ 5$. We first create an element $ f\in\mathbf{Q}[x]$ in SAGE:
sage: R.<x> = QQ[]
sage: f = x^5 + 7*x^4 + 3*x^2 - x + 1

Then we create the corresponding number field obtained by adjoining a root of $ f$, and find its ring of integers.

sage: K.<a> = NumberField(f)
sage: OK = K.ring_of_integers()
sage: OK.basis()
[1, a, a^2, a^3, a^4]

We define the ideal $ 2\O_K$ and factor - it turns out to be prime.

sage: I = K.fractional_ideal(2); I
Fractional ideal (2)
sage: I.factor()
Fractional ideal (2)
sage: I.is_prime()
True

Finally we factor $ 5\O_K$, which factors as a product of three primes.

sage: I = K.fractional_ideal(5); I
Fractional ideal (5)
sage: I.factor()
(Fractional ideal (5, a^2 + 9*a + 2)) * (Fractional ideal (5, a + 2)) * (Fractional ideal (5, a + 3))^2
Notice that the polynomial $ f$ factors in a similar way:
sage: f.factor_mod(5)
(x + 2) * (x + 3)^2 * (x^2 + 4*x + 2)
Thus $ 2\O_K$ is already a prime ideal, and

$\displaystyle 5\O_K = (5,2+a)\cdot(5,3+a)^2\cdot(5,2+4a+a^2).
$

Notice that in this example $ \O_K=\mathbf{Z}[a]$. (Warning: There are examples of $ \O_K$ such that $ \O_K\neq \mathbf{Z}[a]$ for any $ a\in\O_K$, as Example 4.3.2 below illustrates.) When $ \O_K=\mathbf{Z}[a]$ it is relatively easy to factor $ p\O_K$, at least assuming one can factor polynomials in $ \mathbf{F}_p[x]$. The following factorization gives a hint as to why:

$\displaystyle x^5+7x^4+3x^2-x+1 \equiv (x+2)\cdot (x+3)^2 \cdot (x^2+4x+2)\pmod{5}.
$

The exponent $ 2$ of $ (5,3+a)^2$ in the factorization of $ 5\O_K$ above suggests ``ramification'', in the sense that the cover $ X\rightarrow Y$ has less points (counting their ``size'', i.e., their residue class degree) in its fiber over $ 5$ than it has generically.

William Stein 2012-09-24