$\mathbb{Q}$ isn't a number field for SAGE

144 Views Asked by At

This is more a question about the weird behavior of SAGE:

sage: K.<a> = NumberField(x^3-5)
sage: O_K = K.ring_of_integers()
sage: I_K = O_K.fractional_ideal(3/7)
sage: I_K
Fractional ideal (3/7)

But SAGE insists that for QQ (which is the rationals $\mathbb{Q}$) there are no fractional ideals:

sage: reset()
sage: O_K = QQ.ring_of_integers()
sage: I_K = O_K.fractional_ideal(3/7)
AttributeError: 'sage.rings.integer_ring.IntegerRing_class' object has
no attribute 'fractional_ideal'