The gen() method for power series over power series works incorrectly
If I type the following:
S1 = LazyPowerSeriesRing(ZZ)
S2 = LazyPowerSeriesRing(S1)
y = S2.gen()
y.coefficient(1) == 1
I get True, and
y.coefficient(1).coefficient(0)
gets me the "'int' object has no attribute 'coefficient'" error message.
I solved the problem by changing the following line in the gen() method:
res = self._new_initial(1, Stream([0,1,0]))
by
res = self.term(1, 1)
The coefficient of order 1 in the series y should not be the integer 1, but the power series [1, 0, ...] in S1.
Change History (12)
Description: |
modified (diff)
|
Cc: |
mhansen added
|
Component: |
symbolics →
combinatorics
|
Owner: |
changed from burcin to sage-combinat
|
Milestone: |
sage-5.11 →
sage-5.12
|
Cc: |
mantepse added
|
Keywords: |
LazyPowerSeries added
|
Milestone: |
sage-6.1 →
sage-6.2
|
Milestone: |
sage-6.2 →
sage-6.3
|
Milestone: |
sage-6.3 →
sage-6.4
|
Description: |
modified (diff)
|
Milestone: |
sage-6.4 →
sage-duplicate/invalid/wontfix
|
Status: |
new →
needs_review
|
Reviewers: |
→ Travis Scrimshaw
|
Status: |
needs_review →
positive_review
|
Resolution: |
→ duplicate
|
Status: |
positive_review →
closed
|
A fix is in #15673