Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conversion from SR.series to PowerSeries #16203

Closed
rwst opened this issue Apr 22, 2014 · 41 comments
Closed

conversion from SR.series to PowerSeries #16203

rwst opened this issue Apr 22, 2014 · 41 comments

Comments

@rwst
Copy link

rwst commented Apr 22, 2014

sage: R.<x> = PowerSeriesRing(SR)
sage: var('y')
y
sage: ex=1/(1-y)
sage: ex.series(y,20)
1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 + 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 + 1*y^18 + 1*y^19 + Order(y^20)
sage: s=R(_); s
1 + y + y^2 + y^3 + y^4 + y^5 + y^6 + y^7 + y^8 + y^9 + y^10 + y^11 + y^12 + y^13 + y^14 + y^15 + y^16 + y^17 + y^18 + y^19 + Order(y^20)
sage: type(s)
<type 'sage.rings.power_series_poly.PowerSeries_poly'>
sage: s.list()
[1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 + 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 + 1*y^18 + 1*y^19 + Order(y^20)]

The correct result would be 1 + x + x^2.... Obviously Order(20) is not recognized as a marker for the existence of a power series. The whole symbolic expression is taken as a constant.

Also reported in http://ask.sagemath.org/question/24777/how-to-convert-a-taylor-polynomial-to-a-power-series/ and http://ask.sagemath.org/question/24968/coefficients-in-polynomial-ring-over-symbolic-ring/

Depends on #17399
Depends on #17438
Depends on #17659

CC: @kcrisman

Component: algebra

Keywords: series conversion days71

Author: Ralf Stephan

Branch/Commit: aa9c05c

Reviewer: Maurizio Monge, Marc Mezzarobba

Issue created by migration from https://trac.sagemath.org/ticket/16203

@rwst rwst added this to the sage-6.2 milestone Apr 22, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst

This comment has been minimized.

@rwst

This comment has been minimized.

@rwst
Copy link
Author

rwst commented Dec 3, 2014

@rwst
Copy link
Author

rwst commented Dec 3, 2014

Dependencies: #17399, #17438

@rwst
Copy link
Author

rwst commented Dec 3, 2014

Commit: 0a43e21

@rwst
Copy link
Author

rwst commented Dec 3, 2014

New commits:

32ae67c17399: do not let maxima handle ex.series coefficients
0a43e2116203: preliminary implementation, dependent on 17399, 17438

@rwst
Copy link
Author

rwst commented Dec 4, 2014

Changed commit from 0a43e21 to none

@rwst
Copy link
Author

rwst commented Dec 4, 2014

@rwst
Copy link
Author

rwst commented Dec 4, 2014

Branch: public/16203

@rwst
Copy link
Author

rwst commented Dec 4, 2014

Commit: 53b2ca4

@rwst
Copy link
Author

rwst commented Dec 4, 2014

comment:10

This also resolves #16198


New commits:

32ae67c17399: do not let maxima handle ex.series coefficients
99820cf17399: roll back previous commit to allow merge of 17428
d7da52c17438: implement coeff list
9452fa917438: deprecate ex.coeff/coeffs()
0fec12917438: implement ex.list()
168b659Merge branch 'u/rws/coefficients_of_symbolic_expressions_revamp' of trac.sagemath.org:sage into t/17399/fix_coefficients_for_symbolic_series
6cd528617399: handle series in ex.coefficients()
53b2ca416203: implement conversion SR.series --> PowerSeries

@rwst rwst changed the title conversion from SR.series() to PowerSeries(SR) gives unexpected result conversion from SR.series to PowerSeries Dec 4, 2014
@tscrim
Copy link
Collaborator

tscrim commented Dec 4, 2014

comment:11

As currently stated in the description, this is the correct result as the variable for PowerSeriesRing is x, whereas we have some symbolic expression in y (so is naturally an element in the coefficient ring). Having mismatched variable names automatically converting over seems fraught with problems and could lead to subtle bugs.

@rwst
Copy link
Author

rwst commented Dec 5, 2014

comment:12

Replying to @tscrim:

As currently stated in the description, this is the correct result as the variable for PowerSeriesRing is x, whereas we have some symbolic expression in y (so is naturally an element in the coefficient ring). Having mismatched variable names automatically converting over seems fraught with problems and could lead to subtle bugs.

I see. So, conversion to an existing power series ring should only be allowed if the series expansion variable has the same name as the ring var. Multiple vars aren't supported by SR.series anyway.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2014

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

e1a903916203: implement ex.series_variable; disallow ex.series conversion into mismatched PowerSeries ring element

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 5, 2014

Changed commit from 53b2ca4 to e1a9039

@rwst
Copy link
Author

rwst commented Dec 5, 2014

Author: Ralf Stephan

@rwst
Copy link
Author

rwst commented Jan 23, 2015

Changed branch from public/16203 to public/16203-1

@rwst
Copy link
Author

rwst commented Jan 23, 2015

Changed dependencies from #17399, #17438 to #17399, #17438, #17659

@rwst
Copy link
Author

rwst commented Jan 23, 2015

Changed commit from e1a9039 to 3ece975

@rwst
Copy link
Author

rwst commented Jan 23, 2015

New commits:

3ece97516203: conversion from SR.series to PowerSeries

@rwst
Copy link
Author

rwst commented Apr 20, 2015

comment:20

Pending because #17659 is pending.

@rwst rwst removed this from the sage-6.4 milestone Apr 20, 2015
@rwst rwst added the pending label Apr 20, 2015
@rwst
Copy link
Author

rwst commented Feb 5, 2016

Changed branch from public/16203-1 to public/16203-2

@rwst
Copy link
Author

rwst commented Feb 5, 2016

New commits:

9cb0cc9Merge branch 'public/16203-1' of trac.sagemath.org:sage into tmp06

@rwst
Copy link
Author

rwst commented Feb 5, 2016

Changed commit from 50cb33c to 9cb0cc9

@rwst rwst added this to the sage-7.2 milestone Feb 5, 2016
@rwst rwst removed the pending label Feb 5, 2016
@sagetrac-maurimo
Copy link
Mannequin

sagetrac-maurimo mannequin commented Mar 21, 2016

comment:23

"is" should be "==".
The changes to ring.pyx are unrelated and should be removed.
Everything else looks alright.

@sagetrac-maurimo
Copy link
Mannequin

sagetrac-maurimo mannequin commented Mar 21, 2016

Changed keywords from series conversion to series conversion days71

@sagetrac-maurimo
Copy link
Mannequin

sagetrac-maurimo mannequin commented Mar 21, 2016

Reviewer: Maurizio Monge

@rwst
Copy link
Author

rwst commented Mar 21, 2016

Changed branch from public/16203-2 to public/16203-3

@rwst
Copy link
Author

rwst commented Mar 21, 2016

Changed commit from 9cb0cc9 to ec8c797

@rwst
Copy link
Author

rwst commented Mar 21, 2016

New commits:

ec8c79716203: conversion from SR.series to PowerSeries

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 21, 2016

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

aa9c05c16203: fix string cmp

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 21, 2016

Changed commit from ec8c797 to aa9c05c

@mezzarobba
Copy link
Member

Changed reviewer from Maurizio Monge to Maurizio Monge, Marc Mezzarobba

@rwst
Copy link
Author

rwst commented Mar 27, 2016

comment:28

Thanks!

@vbraun
Copy link
Member

vbraun commented Mar 28, 2016

Changed branch from public/16203-3 to aa9c05c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants