#16203: conversion from SR.series() to PowerSeries(SR) gives unexpected result
-------------------------------------+------------------------
       Reporter:  rws                |        Owner:
           Type:  defect             |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  algebra            |   Resolution:
       Keywords:  series conversion  |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:                     |     Stopgaps:
-------------------------------------+------------------------
Description changed by rws:

Old description:

> {{{
> sage: R.<x> = PowerSeriesRing(SR)
> sage: var('y')
> y
> sage: ex=1/(1-y)
> sage: ex.series(y,20)
> 1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 +
> 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 +
> 1*y^18 + 1*y^19 + Order(y^20)
> sage: s=R(_); s
> 1 + y + y^2 + y^3 + y^4 + y^5 + y^6 + y^7 + y^8 + y^9 + y^10 + y^11 +
> y^12 + y^13 + y^14 + y^15 + y^16 + y^17 + y^18 + y^19 + Order(y^20)
> sage: type(s)
> <type 'sage.rings.power_series_poly.PowerSeries_poly'>
> sage: s.list()
> [1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9
> + 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 +
> 1*y^18 + 1*y^19 + Order(y^20)]
> }}}
> The correct result would be `1 + x + x^2...`. Obviously `Order(20)` is
> not recognized as a marker for the existence of a power series. The whole
> symbolic expression is taken as a constant.
>
> Also reported in http://ask.sagemath.org/question/24777/how-to-convert-a
> -taylor-polynomial-to-a-power-series/

New description:

 {{{
 sage: R.<x> = PowerSeriesRing(SR)
 sage: var('y')
 y
 sage: ex=1/(1-y)
 sage: ex.series(y,20)
 1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 +
 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 +
 1*y^18 + 1*y^19 + Order(y^20)
 sage: s=R(_); s
 1 + y + y^2 + y^3 + y^4 + y^5 + y^6 + y^7 + y^8 + y^9 + y^10 + y^11 + y^12
 + y^13 + y^14 + y^15 + y^16 + y^17 + y^18 + y^19 + Order(y^20)
 sage: type(s)
 <type 'sage.rings.power_series_poly.PowerSeries_poly'>
 sage: s.list()
 [1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 +
 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 +
 1*y^18 + 1*y^19 + Order(y^20)]
 }}}
 The correct result would be `1 + x + x^2...`. Obviously `Order(20)` is not
 recognized as a marker for the existence of a power series. The whole
 symbolic expression is taken as a constant.

 Also reported in http://ask.sagemath.org/question/24777/how-to-convert-a
 -taylor-polynomial-to-a-power-series/ and
 http://ask.sagemath.org/question/24968/coefficients-in-polynomial-ring-
 over-symbolic-ring/

--

--
Ticket URL: <http://trac.sagemath.org/ticket/16203#comment:4>
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/d/optout.

Reply via email to