Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reference manual gives the solution (if I understand you question correctly):

sage: K.<a, b> = NumberField([x^2 - 23, x^2 + 1])
sage: I = K.ideal([7, (-1/2*b - 3/2)*a + 3/2*b + 9/2])
sage: I.is_principal()
True
sage: I
Fractional ideal ((1/2*b + 1/2)*a - 3/2*b - 3/2)