#15027: Inconsistent primitive_root_of_unity for number fields
------------------------------------------------+--------------------------
Reporter: cremona | Owner: cremona
Type: defect | Status:
Priority: major | needs_review
Component: number fields | Milestone: sage-5.13
Keywords: number field unit | Resolution:
Authors: John Cremona, Jeroen Demeyer | Merged in:
Report Upstream: N/A | Reviewers:
Branch: | Work issues:
Dependencies: | Commit:
| Stopgaps:
------------------------------------------------+--------------------------
Changes (by {'newvalue': u'John Cremona, Jeroen Demeyer', 'oldvalue': u'John
Cremona'}):
* status: needs_work => needs_review
* author: John Cremona => John Cremona, Jeroen Demeyer
Old description:
> In 5.11.rc0:
> {{{
> sage: K = QuadraticField(-3)
> sage: K.primitive_root_of_unity()
> 1/2*a + 1/2
> sage: UK = K.unit_group()
> sage: K.primitive_root_of_unity()
> u
> sage: K.primitive_root_of_unity().value()
> -1/2*a + 1/2
> }}}
> In the first call since the unit group has not yet been computed and
> cached, a fundamental torsion unit is computed idrectly (using pari). In
> the second case it is obtained from the cached unit group, but should
> have value() applied to convert from an abstract element of the unit
> group to an actual number field element.
>
> This can be fixed with a one-line edit to line 5526 of number_field.py.
New description:
In 5.11.rc0:
{{{
sage: K = QuadraticField(-3)
sage: K.primitive_root_of_unity()
1/2*a + 1/2
sage: UK = K.unit_group()
sage: K.primitive_root_of_unity()
u
sage: K.primitive_root_of_unity().value()
-1/2*a + 1/2
}}}
In the first call since the unit group has not yet been computed and
cached, a fundamental torsion unit is computed idrectly (using pari). In
the second case it is obtained from the cached unit group, but should have
value() applied to convert from an abstract element of the unit group to
an actual number field element.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/15027#comment:12>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.