#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:
-----------------------------+------------------------
Description changed by rws:
Old 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/
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/
Also, `series` should simplify its terms on a per-term basis:
{{{
sage: var('x,y')
(x, y)
sage: ex=1/(1-x*y-x^2)
sage: ex.series(x,5)
1 + (y)*x + (y^2 + 1)*x^2 + ((y^2 + 1)*y + y)*x^3 + (((y^2 + 1)*y + y)*y +
y^2 + 1)*x^4 + Order(x^5)
}}}
Compare with e.g. Pari:
{{{
? 1/(1-x*y-x^2) + O(x^5)
%1 = 1 + y*x + (y^2 + 1)*x^2 + (y^3 + 2*y)*x^3 + (y^4 + 3*y^2 + 1)*x^4 +
O(x^5)
}}}
Both issues can be fixed by writing series simplification methods.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17400#comment:6>
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.