Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fractional ideals for $\mathbb{Z}$

Why isn't it possible to construct fractional ideals for the integers $\mathbb{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?