#10448: Extensions of ZZ are not unique parents
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: davidloeffler
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.6.1
Component: number fields | Keywords: uniqueness of parents
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Changes (by SimonKing):
* status: needs_work => needs_review
Comment:
Dear David, dear Robert
Replying to [comment:7 robertwb]:
> That was exactly my first thought as well, we should not require the
list of generators to be a tuple. (As well as breaking convention, this
will break people's existing code.)
>
> Much better to just convert gens to a tuple in the called function.
There is a convenient way: Everything is based on the function
`sage.rings.number_field.order.absolute_order_from_module_generators`.
This function is not supposed to be called directly, if I understand
correctly. Hence, it won't hurt to change the expected input of that
function (or of
`sage.rings.number_field.order.absolute_order_from_ring_generators`).
My solution is:
* Prepend
`sage.rings.number_field.order.absolute_order_from_module_generators` with
`...@cached_function`.
* The generators must form a tuple, so, the internals of some methods
need to be adapted.
* In addition to the tuple of generators, I suggest that the field is
passed as an argument as well.
The last point is for preventing coercion trouble: If there is a coercion
from number field K to number field L and if only the tuple of generators
would be cached, then orders in K would be identic to orders in L.
Therefore, the field ''must'' be included in the cache data.
Anyway. I reverted part of the doctests, so that we have tests where
`K.order(...)` is called with a single element, with a list of elements,
or with a tuple of elements. And of course we have a new test for the
cache. Ready for review, I guess.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10448#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.