#17400: simplify_full returns odd result from symbolic series input
-----------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.5
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+------------------------
Old description:
> {{{
> sage: x=var('x')
> sage: s=(1/(1-x)).series(x,6)
> sage: s.coeffs()
> [[x^5 + x^4 + x^3 + x^2 + x + Order(x^6) + 1, 0]]
> sage: s.simplify_full().coeffs()
> [[Order(x^6) + 1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]
> }}}
> See also the related #13655 and #17399.
>
> Originally found in http://ask.sagemath.org/question/24968/coefficients-
> in-polynomial-ring-over-symbolic-ring/
New description:
`SR`.series will lose the order term when passed to Maxima. Thus only the
coefficients may be simplified, and this must be done in all `simplify*`
functions.
{{{
sage: x=var('x')
sage: s=(1/(1-x)).series(x,6)
sage: s.coeffs()
[[x^5 + x^4 + x^3 + x^2 + x + Order(x^6) + 1, 0]]
sage: s.simplify_full().coeffs()
[[Order(x^6) + 1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]
}}}
See also the related #17399.
Originally found in http://ask.sagemath.org/question/24968/coefficients-
in-polynomial-ring-over-symbolic-ring/
--
Comment (by rws):
There are no power series objects in Maxima, just conversion to infinite
sums, i.e. formal power series:
{{{
sage: maxima.powerseries(x^2+1/(1-x),x,0)
'sum(_SAGE_VAR_x^i2,i2,0,inf)+_SAGE_VAR_x^2
sage: maxima.powerseries(x^2+1/(1-x),x,0).sage()
x^2 + sum(x^i3, i3, 0, +Infinity)
}}}
The Taylor series objects have an order parameter on creation, but this
does not get output or translated to Sage:
{{{
sage: maxima.taylor(1+x+x^2+x^3,x,0,3)
1+_SAGE_VAR_x+_SAGE_VAR_x^2+_SAGE_VAR_x^3
sage: maxima.taylor(1+x+x^2+x^3,x,0,3).sage()
x^3 + x^2 + x + 1
}}}
so there is no way around it that `SR`.series will lose the order term
when passed to Maxima. Thus only the coefficients may be simplified, and
this must be done in or called from all `simplify*` functions.
--
Ticket URL: <http://trac.sagemath.org/ticket/17400#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.