#13655: anonymous symbols lose their identity when passed through maxima
-------------------------+--------------------------------------------------
Reporter: tkluck | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.5
Component: symbolics | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-------------------------+--------------------------------------------------
When a symbol returned by `SR.symbol()` is passed through Maxima, it is
turned into another symbol. They compare equal (because comparison invokes
Maxima, probably) but they are not the same object.
This sounds as if it should not make a big difference, but it does in the
case of Taylor series. In this example, I try to obtain taylor series
coefficients. The call to `coefficient` returns zero, however, because the
variable has changed identity because the Taylor series was generated by
Maxima.
{{{
sage: s = SR.symbol()
sage: converted_s = s._maxima_().sage()
sage: converted_s is s
False
sage: bool(converted_s == s)
True
sage: x1 = var('x1')
sage: converted_x1 = x1._maxima_().sage()
sage: converted_x1 is x1
True
sage: bool(converted_x1 == x1)
True
sage: (3*x1).coefficient(converted_x1)
3
sage: (3*s).coefficient(converted_s)
0
sage: (x1^2 + 3*x1 + 1).taylor(x1,0,2).coefficient(x1)
3
sage: (s^2 + 3*s + 1).taylor(s,0,2).coefficient(s)
0
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13655>
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 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.