#11770: Add ability to detect CM number fields and take complex conjugate of
their
elements
---------------------------------+------------------------------------------
Reporter: robharron | Owner: tba
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-5.3
Component: number fields | Resolution:
Keywords: CM field | Work issues:
Report Upstream: N/A | Reviewers: Francis Clarke
Authors: Robert Harron | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Changes (by fwclarke):
* status: needs_review => needs_work
Comment:
The problem with naming relativized extensions is, of course, a (minor)
bug in `relativize`. But it is probably best left for now.
The code looks good, and doctests pass.
One or two little things (all except the first are really questions of
style):
* The line break in lines 1933-34 of `number_field.py` introduces unwanted
space (scroll across to see it):
{{{
sage: NumberField(x^3 - 2, 'a').complex_conjugation()
Traceback (most recent call last)
...
ValueError: Complex conjugation is only well-defined for fields contained
in CM fields.
}}}
* At line 2038
{{{
self.__max_tot_real_sub = self.subfield(zeta + zeta**(-1))
}}}
is simpler, and quicker except in small cases.
* Lines 2052 to 2055 could more simply be replaced by
{{{
for i in d.divisors()[1:]:
}}}
* I personally find doctests such as
{{{
sage: Q.<a> = NumberField(x - 1)
sage: Q.is_CM()
False
sage: K.<i> = NumberField(x^2 + 1)
sage: K.is_CM()
True
sage: L.<zeta20> = CyclotomicField(20)
sage: L.is_CM()
True
}}}
more readable as
{{{
sage: NumberField(x - 1, a).is_CM()
False
sage: NumberField(x^2 + 1, i).is_CM()
True
sage: CyclotomicField(20).is_CM()
True
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11770#comment:5>
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.