#18393: make Expression.series return an element of SR[[]]
-------------------------------+------------------------
       Reporter:  rws          |        Owner:
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-6.7
      Component:  calculus     |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by nbruin):

 Replying to [comment:3 rws]:
 > >  - How does `f=(x^2+y^2+1)` coerce into `SR[['x']]`? Note that `f` is
 already an element of `SR`, so by default it would be a "constant" in
 `SR[['x']]`.
 > As above the `series` argument determines the name of the series
 variable, so it also determines what is being done with the expression.
 Already now:
 That's ambiguous and not what happens by default in our current coercion:
 {{{
 sage: R=PowerSeriesRing(SR,name='x',default_prec=10)
 sage: F=1/(1-R.0)
 sage: F-x
 -x + 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + O(x^10)
 sage: F-R.0
 1 + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + O(x^10)
 }}}
 You see that SR('x') doesn't coerce to R.0 in R. You'd have to override
 that somehow and that will be extremely messy: where does `sin(x)` coerce?

--
Ticket URL: <http://trac.sagemath.org/ticket/18393#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