# Factoring an ideal in a number field into prime ideals

I'd like to factor an ideal in a number field into prime ideals, exactly as in this example from the Sage documentation:

sage: K.<a> = NumberField(x^4 + 23); K
Number Field in a with defining polynomial x^4 + 23
sage: I = K.ideal(19); I
Fractional ideal (19)
sage: F = I.factor(); F
(Fractional ideal (19, 1/2*a^2 + a - 17/2)) * (Fractional ideal (19, 1/2*a^2 - a - 17/2))


What is the easiest way to achieve this in Mathematica?

It doesn't seem there is any built-in functionality for this. Is there are package available that I'm not seeing? Or should I just call PARI, via mathlink or a shell?

## 1 Answer

I don't have a general approach but in a world where 19 and x^4+23 define our number field, a decomposition can be found by factoring the polynomial.

InputForm[Factor[x^4+23,Modulus->19]]

(* Out[3]//InputForm= (2 + 2*x + x^2)*(2 + 17*x + x^2) *)


The upshot is that the ideal <19,x^4+23> in Z[x] is the intersection of <19,2+2*x+x^2> and <19,2+17*x+x^2>.

• Thanks -- I guess I should have given a harder example. :-) Dec 3, 2014 at 0:04