#8327: Implement the universal cyclotomic field, using Zumbroich basis
-----------------------------------------------------+----------------------
Reporter: nthiery | Owner:
Type: enhancement | Status:
needs_work
Priority: major | Milestone: sage-5.0
Component: number fields | Resolution:
Keywords: Cyclotomic field, Zumbroich basis | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Christian Stump, Simon King | Merged in:
Dependencies: #4539 #10771 #7980 | Stopgaps:
-----------------------------------------------------+----------------------
Changes (by davidloeffler):
* status: needs_review => needs_work
Comment:
Right, so now we have a patch which actually works, we can start testing
it. And we find the following bug:
{{{
----------------------------------------------------------------------
| Sage Version 5.0.beta11, Release Date: 2012-03-28 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
**********************************************************************
* *
* Warning: this is a prerelease version, and it may be unstable. *
* *
**********************************************************************
sage: z1 = E(3)
sage: z2 = UCF(CyclotomicField(3).gen())
sage: z1 == z2
False
sage: z1 + z2
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
/home/masiao/<ipython console> in <module>()
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/structure/element.so in
sage.structure.element.RingElement.__add__
(sage/structure/element.c:11990)()
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/structure/element.so in
sage.structure.element.ModuleElement._add_
(sage/structure/element.c:8612)()
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/rings/universal_cyclotomic_field/universal_cyclotomic_field.pyc
in _add_(self, other)
890 E(12)^4 - E(12)^7 - E(12)^11
891 """
--> 892 n,m = self.field_order(),other.field_order()
893 l = cached_lcm( [ n, m ] )
894
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/rings/universal_cyclotomic_field/universal_cyclotomic_field.pyc
in field_order(self)
1020 3
1021 """
-> 1022 if bool(self.value._monomial_coefficients):
1023 return
iter(self.value._monomial_coefficients).next()[0]
1024 else:
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/structure/element.so in
sage.structure.element.Element.__getattr__
(sage/structure/element.c:2919)()
/storage/masiao/sage-5.0.beta11/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:3329)()
AttributeError:
'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic'
object has no attribute '_monomial_coefficients'
}}}
This is even worse, since the element involved isn't cyclotomic in the
first place:
{{{
sage: K.<a> = NumberField(x^3 - 7)
sage: UCF(a)
a
sage: UCF(a) in UCF
True
}}}
In fact UCF will attempt to construct an element from anything whatsoever:
{{{
sage: UCF(None)
None
sage: UCF(QQ)
Rational Field
sage: UCF('hello')
'hello'
}}}
The following are not great either:
{{{
sage: UCF.has_coerce_map_from(CyclotomicField(3))
False
sage: QQbar.has_coerce_map_from(UCF)
False
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8327#comment:93>
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.