Opened 5 years ago
Closed 4 years ago
#18094 closed defect (fixed)
conversion of bigoh to symbolic
Reported by:  dkrenn  Owned by:  

Priority:  major  Milestone:  sage7.2 
Component:  symbolics  Keywords:  sd66 
Cc:  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Daniel Krenn 
Report Upstream:  N/A  Work issues:  
Branch:  3efac92 (Commits)  Commit:  3efac92413b61698bef39621b57d32c5a55761a6 
Dependencies:  #10846  Stopgaps: 
Description
sage: P.<p> = ZZ[[]] sage: a = 1/(1+p) sage: o = a  a.truncate() sage: o O(p^20) sage: 2*o O(p^20) sage: 2*SR(o) 0
The last line is wrong.
Change History (13)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
comment:4 Changed 5 years ago by
 Branch set to u/rws/multiplication_of_powerseries_wrapped_in_sr_wrong
comment:5 Changed 5 years ago by
 Commit set to 48011a4ac77473f5a45c59f6b89c374d0013a50a
 Status changed from new to needs_review
New commits:
99916f9  10846: fix conversion of power series to symbolic series

26df71b  10846: handle order term correctly

1f25c61  Merge branch 'u/rws/conversion_of_powerseries____sr_bug' of trac.sagemath.org:sage into t/18094/multiplication_of_powerseries_wrapped_in_sr_wrong

48011a4  18094: constants were not handled by 10846: better take the variable from the power series element

comment:6 Changed 5 years ago by
The example in the ticket now gives:
sage: P.<p> = ZZ[[]] sage: a = 1/(1+p) sage: o = a  a.truncate() sage: 2*SR(o) 2*(Order(p^20))
But it should be Order(p^20)
.
comment:7 Changed 5 years ago by
 Reviewers set to Daniel Krenn
 Status changed from needs_review to needs_info
comment:8 followup: ↓ 9 Changed 5 years ago by
It's "only" a hack that will give us bare symbolic bigoh. Realistic behaviour must be added on Pynac level, it's simply not there at the moment, if I understand correctly.
You see you cannot do arithmetics at all with symbolic series:
sage: s = SR(1/(1x)).series(x,5); s 1 + 1*x + 1*x^2 + 1*x^3 + 1*x^4 + Order(x^5) sage: 2*s 2*(1 + 1*x + 1*x^2 + 1*x^3 + 1*x^4 + Order(x^5))
For that reason it would be helpful if someone could at least review those tickets that deal with symbolic<>dedicated ring conversion (#10846, #16203, #17402 and maybe #17400 and #17659). I cannot do this: I am the author 8P
comment:9 in reply to: ↑ 8 Changed 4 years ago by
Replying to rws:
It's "only" a hack that will give us bare symbolic bigoh. Realistic behaviour must be added on Pynac level, it's simply not there at the moment, if I understand correctly.
No, it's there but the user is asked to apply series
again:
sage: (2*s).series(x,5) 2 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + Order(x^5)
So, it's not as bad as thought, and the patch could go in without having to fix a bigger issue.
comment:10 Changed 4 years ago by
 Branch changed from u/rws/multiplication_of_powerseries_wrapped_in_sr_wrong to u/rws/18094
comment:11 Changed 4 years ago by
 Commit changed from 48011a4ac77473f5a45c59f6b89c374d0013a50a to 3efac92413b61698bef39621b57d32c5a55761a6
 Milestone changed from sage6.6 to sage7.2
 Status changed from needs_info to needs_review
 Summary changed from multiplication of powerseries wrapped in SR wrong to conversion of bigoh to symbolic
New commits:
3efac92  18094: conversion of bigoh to symbolic

comment:12 Changed 4 years ago by
 Status changed from needs_review to positive_review
comment:13 Changed 4 years ago by
 Branch changed from u/rws/18094 to 3efac92413b61698bef39621b57d32c5a55761a6
 Resolution set to fixed
 Status changed from positive_review to closed
Surely the big Oh is badly integrated into
SR