#19742: CyclotomicField.zeta() inconsistent with zeta_order() and docs
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-7.0
Component: number fields | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers: Julian RĂ¼th
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/cyclotomicfield_zeta___inconsistent_with_zeta_order___and_docs|
748110b4e08ff4b1a61ec13e792c6250d787085e
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by fwclarke):
* status: positive_review => needs_work
Comment:
I don't think this is quite ready.
It would be reasonable to expect that `C.primitive_root_of_unity()` and
`C.zeta()` gave the same answer. But
{{{
sage: C = CyclotomicField(5)
sage: C.primitive_root_of_unity(), C.zeta()
(-zeta5, -zeta5^3)
}}}
The new error message
{{{
sage: C.zeta(4)
...
ValueError: 4 does not divide order of generator (10)
}}}
is somewhat misleading, since
{{{
sage: C.gen().multiplicative_order()
5
}}}
The error message for generic fields is better:
{{{
sage: K.<a> = NumberField(x^3 - 5)
sage: K.zeta(3)
...
ValueError: There are no 3rd roots of unity in self.
}}}
and negative arguments are handled differently:
{{{
sage: C.zeta(-2)
-1
sage: K.zeta(-2)
Traceback (most recent call last)
...
ValueError: n (=-2) must be positive
}}}
But there is incompatibility with generic fields, for which n=2 is the
default (surely a mistake):
{{{
sage: K = NumberField(x^2 - x + 1, 'a')
sage: C = CyclotomicField(6)
sage: K.zeta(), C.zeta()
(-1, zeta6)
sage: C.is_isomorphic(K)
True
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19742#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 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.