#7643: composite_fields does not play nice with QuadraticFields
-----------------------------+----------------------------------------------
Reporter: rlm | Owner: davidloeffler
Type: defect | Status: needs_info
Priority: major | Milestone: sage-4.3.1
Component: number fields | Keywords:
Work_issues: | Author: Francis Clarke
Upstream: N/A | Reviewer: John Cremona
Merged: |
-----------------------------+----------------------------------------------
Changes (by cremona):
* status: needs_review => needs_info
* reviewer: => John Cremona
Comment:
Review: The code looks excellent. It deals with the problem originally
given and does a lot more besides, is well-written and very well
documented. Applied fine to 4.3 and all tests pass (in the two files
changed and also in totallyreal_rel.py where the function is used).
Quick question: in cases where we compute K.composite_fields(L) where
there is an embedding of K into L or K into K, would it not be nice to
return L (resp K) rather than some new field? Surely that would not be
expensive to test for. For example:
{{{
sage: K.<a> = QuadraticField(-3)
sage: L.<z> = CyclotomicField(21)
sage: K.composite_fields(L)
[Number Field in az with defining polynomial x^12 - x^11 + 21*x^10 -
20*x^9 + 188*x^8 - 168*x^7 + 925*x^6 - 756*x^5 + 2645*x^4 - 1952*x^3 +
4725*x^2 - 2458*x + 2269]
}}}
while we could have used one of these:
{{{
sage: K.embeddings(L)
[
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 3
To: Cyclotomic Field of order 21 and degree 12
Defn: a |--> 2*z^7 + 1,
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 3
To: Cyclotomic Field of order 21 and degree 12
Defn: a |--> -2*z^7 - 1
]
}}}
If this can be done easily then I would vote for it, otherwise I'll give
this a positive review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7643#comment:2>
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.