Fractional ideals for Z

asked 9 years ago

Oderyn gravatar image

Why isn't it possible to construct fractional ideals for the integers Z?

sage: ZZ.fractional_ideal(3/5)
AttributeError: 'sage.rings.integer_ring.IntegerRing_class' object has no attribute 'fractional_ideal'

sage: II = ZZ.ideal(5)
sage: II^(-1)
TypeError: bad operand type for unary ~: 'Ideal_pid'

But absurdly this works:

sage: JJ = NumberField(x-7,"a").ring_of_integers().fractional_ideal(3/5)
sage: JJ^(-1)
Fractional ideal (5/3)

What should I do? Use this crude workaround?

Preview: (hide)

Comments

kcrisman gravatar imagekcrisman ( 9 years ago )