2012/11/25 David Roe <
roed...@gmail.com>:
> Hi number theorists,
> Currently fractional ideals inherit from ideals, and there's a general lack
> of clarify between the two (and between the ideal monoids containing them).
> I'd like to propose the following changes for comments.
>
> Let K be a number field, R its ring of integers and a an element of K or OK.
>
> 1. We should deprecate K.ideal(a) in favor of the more explicit
> K.fractional_ideal(a) and R.ideal(a). This abuse is incompatible with
> general algorithms that rely on K.ideal yielding an actual ideal of K. Only
The same argument about incompatibility with general algorithms can be
made for K.unit_group(). Both are part of the same design: when people
talk about unit groups and ideals of a number field, they always mean
unit groups and ideals of the maximal order. Changing one of these,
but not the other will add to the confusion. So whatever is done with
K.ideal should be done with K.unit_group too. But for K.unit_group, it
was decided to keep it as it is:
https://groups.google.com/d/topic/sage-nt/jbLLraOIVaA/discussion
> having fractional ideals available makes it more difficult to eventually
> implement non-maximal orders and their ideals.
I don't understand. Surely we want to have fractional ideals of the
non-maximal orders too!
Now that we only have fractional ideals, we only need to create
fractional ideals for non-maximal orders. For that, we could have for
example NumberFieldFractionalIdeal (for fractional ideals of the
maximal order) inheriting from a new class OrderFractionalIdeal (for
arbitrary orders).
If we have a separate class for actual ideals, then we have twice (or
even three times if I read below) as many classes to generalize to
non-maximal orders.
> 2. We should have a NumberFieldIdeal class that is used for more than just
> the zero ideal. Eventually this class will be used for ideals of
> non-maximal orders, but for now we can distinguish between ideals of R and
> fractional ideals.
>
> 3. If I is a fractional ideal, I.ring() should return R. This is an
> incompatible change to the current behavior, but you can recover K from R by
> taking the fraction field; once we have ideals in non-maximal orders the
> other direction is impossible.
+1
> 4. Neither NumberFieldIdeal nor NumberFieldFractionalIdeal should inherit
> from the other (rather I'm planning on having a common superclass that
> implements much of the functionality).
>
> 5. There should be parents in Sage for the monoid of integral ideals, the
> group of invertible fractional ideals and the monoid of R-submodules of K
> (satisfying aI \subset R for some a \in R), with coercions from the first
> and second to the third and a construction functor so that the product of an
> integral ideal and a fractional ideal lives in the third parent. Another
> option would be to just have the first and third parent.
-1 for not having the second parent (group of fractional ideals), as
that is the most important one mathematically. Though I'm open to
explanations of why it is better for the programming to do without it.
And shouldn't there also be coercion of all non-zero (integral) ideals
to the group of fractional ideals?
If I have a fractional ideal I and a non-zero (integral) ideal J, then
all basic ideal arithmetic I+J, I*J, I.intersection(J), I/J (also with
I and J swapped) should work and give me a fractional ideal.
So if we have the first parent (ideals), then there should also be the
intersection of the first and second parents: non-zero ideals,
equivalently integral fractional ideals.
The coercions are then ({non-zero ideals} to everything) and
(everything to third parent).
>
> Thoughts? What's the best way to make these changes in a way that doesn't
> break backward-compatibility? Do we deprecate K.ideal and I.ring and
> encourage the alternatives K.fractional_ideal and I.number_field?
> David
>