-
-
Notifications
You must be signed in to change notification settings - Fork 805
Closed
Milestone
Description
The following code, which defines a Laurent series ring over a field extension of QQ, gives a weird error when one tries to add and subract Laurent series, all defined over the same ring.
Qx.<xxx>=PolynomialRing(QQ)
K.<w>=NumberField(xxx^2+xxx+1)
R.<y>=PolynomialRing(K)
L.<s>=K.extension(y^6+y^5+y^4+y^3+y^2+y+1)
S.<q>=LaurentSeriesRing(L,"q")
eta1=1 - q - q^2 + q^5 + q^7 - q^12 - q^15 + q^22 + q^26 - q^35 - q^40 + \
q^51+ q^57 - q^70 - q^77 + q^92 + q^100 - q^117 - q^126 + q^145 + q^155 -\
q^176 - q^187 + q^210 + q^222 - q^247 - q^260 + \
q^287 + q^301 - q^330 -q^345 + q^376 + q^392 - q^425 - q^442 + q^477 + q^495
eta7=eta1(q^7 )+O(q^500)
eta49=eta1(q^49)+O(q^500)
x=q^(-2)*eta1*eta49^-1
y=eta7^4*eta49^-4
x+y-x-y
The error is:
<type 'exceptions.TypeError'> Traceback (most recent call last)
/home/ljpk/<ipython console> in <module>()
/home/ljpk/element.pyx in sage.structure.element.ModuleElement.__sub__()
/home/ljpk/coerce.pxi in sage.structure.element._sub_c()
/home/ljpk/laurent_series_ring_element.pyx in sage.rings.laurent_series_ring_element.LaurentSeries._sub_c_impl()
/home/ljpk/laurent_series_ring_element.pyx in sage.rings.laurent_series_ring_element.LaurentSeries.__init__()
/home/ljpk/power_series_poly.pyx in sage.rings.power_series_poly.PowerSeries_poly.valuation()
/home/ljpk/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.valuation()
<type 'exceptions.TypeError'>: The polynomial, p, must have the same parent as self.
Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/2462
Reactions are currently unavailable