Opened 8 years ago

Closed 4 years ago

#10846 closed defect (fixed)

Conversion of PowerSeries -> SR bug

Reported by: vbraun Owned by: burcin
Priority: major Milestone: sage-6.4
Component: symbolics Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: 26df71b (Commits) Commit: 26df71b66563b3785d8180412f5979a62f1ba0c1
Dependencies: Stopgaps:

Description

If I convert a powerseries into the symbolic ring, it does not have any variables.

sage: R.<x> = PowerSeriesRing(QQ)
sage: s = R([1,2,3,4,5],prec=10)
sage: s
1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + O(x^10)
sage: SR(s)
1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + O(x^10)
sage: SR(s).variables()
()

Running simplify() fixes it:

sage: SR(s).simplify().variables()
(x,)

Change History (14)

comment:1 Changed 8 years ago by vbraun

A possibly related bug is Trac #9769: Coercon problems to symbolic ring

comment:2 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:6 Changed 5 years ago by rws

  • Branch set to u/rws/conversion_of_powerseries____sr_bug

comment:7 Changed 5 years ago by rws

  • Authors set to Ralf Stephan
  • Commit set to 99916f9b08354e99489d59858311bf57f342c24b
  • Status changed from new to needs_review

New commits:

99916f910846: fix conversion of power series to symbolic series

comment:8 Changed 5 years ago by rws

I'm considering moving all series methods into a subclass SymbolicSeries of Expression because they need to be handled apart from expressions, anyway. In a separate file the documentation would be easier to find as well. Comments?

Version 0, edited 5 years ago by rws (next)

comment:9 Changed 5 years ago by rws

Note that GiNaC will not add an order term to series from polynomials even if requested. I would consider this a bug. The reason is that pseries are formal, anyway, so they should be fully manipulatable.

This restriction can be circumvented with a simple trick.

Last edited 5 years ago by rws (previous) (diff)

comment:10 Changed 5 years ago by git

  • Commit changed from 99916f9b08354e99489d59858311bf57f342c24b to 26df71b66563b3785d8180412f5979a62f1ba0c1

Branch pushed to git repo; I updated commit sha1. New commits:

26df71b10846: handle order term correctly

comment:11 Changed 4 years ago by rws

Passes all tests in a 6.5 patchbot run.

comment:12 Changed 4 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:13 Changed 4 years ago by rws

Followup in #18094 which uncovers a bug with bigoh handling.

comment:14 Changed 4 years ago by vbraun

  • Branch changed from u/rws/conversion_of_powerseries____sr_bug to 26df71b66563b3785d8180412f5979a62f1ba0c1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.