#2462: Odd results when adding Laurent series
----------------------+-----------------------------------------------------
Reporter: ljpk | Owner: robertwb
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.1
Component: coercion | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Changes (by mabshoff):
* owner: was => robertwb
* component: linear algebra => coercion
Comment:
This is still a problem with 3.2.alpha2-ish:
{{{
----------------------------------------------------------------------
| Sage Version 3.2.alpha1, Release Date: 2008-10-26 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: Qx.<xxx>=PolynomialRing(QQ)
sage:
sage: K.<w>=NumberField(xxx^2+xxx+1)
sage:
sage: R.<y>=PolynomialRing(K)
sage:
sage: L.<s>=K.extension(y^6+y^5+y^4+y^3+y^2+y+1)
sage:
sage: S.<q>=LaurentSeriesRing(L,"q")
sage:
sage: 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
sage:
sage: eta7=eta1(q^7 )+O(q^500)
sage:
sage: eta49=eta1(q^49)+O(q^500)
sage:
sage: x=q^(-2)*eta1*eta49^-1
sage: y=eta7^4*eta49^-4
sage:
sage: x+y-x-y
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/<ipython console> in
<module>()
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/local/lib/python2.5/site-
packages/sage/structure/element.so in
sage.structure.element.ModuleElement.__sub__
(sage/structure/element.c:5718)()
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/local/lib/python2.5/site-
packages/sage/rings/laurent_series_ring_element.so in
sage.rings.laurent_series_ring_element.LaurentSeries._sub_
(sage/rings/laurent_series_ring_element.c:5543)()
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/local/lib/python2.5/site-
packages/sage/rings/laurent_series_ring_element.so in
sage.rings.laurent_series_ring_element.LaurentSeries.__init__
(sage/rings/laurent_series_ring_element.c:1831)()
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/local/lib/python2.5/site-
packages/sage/rings/power_series_poly.so in
sage.rings.power_series_poly.PowerSeries_poly.valuation
(sage/rings/power_series_poly.c:2296)()
/scratch/mabshoff/release-cycle/sage-3.2.alpha2/local/lib/python2.5/site-
packages/sage/rings/polynomial/polynomial_element.so in
sage.rings.polynomial.polynomial_element.Polynomial.valuation
(sage/rings/polynomial/polynomial_element.c:24197)()
TypeError: The polynomial, p, must have the same parent as self.
}}}
Robert: Any idea what is going on here?
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2462#comment:3>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---