Opened 12 years ago

Closed 4 months ago

#10085 closed defect (duplicate)

The gen() method for power series over power series works incorrectly

Reported by: schilly Owned by: sage-combinat
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: combinatorics Keywords: LazyPowerSeries
Cc: axel.bacher@…, mhansen, mantepse Merged in:
Authors: Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description (last modified by chapoton)

If I type the following:

S1 = LazyPowerSeriesRing(ZZ)
S2 = LazyPowerSeriesRing(S1)
y = S2.gen()
y.coefficient(1) == 1

I get True, and


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]))


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)

comment:1 Changed 12 years ago by schilly

Description: modified (diff)

comment:2 Changed 12 years ago by burcin

Cc: mhansen added
Component: symbolicscombinatorics
Owner: changed from burcin to sage-combinat

comment:3 Changed 9 years ago by jdemeyer

Milestone: sage-5.11sage-5.12

comment:4 Changed 9 years ago by mantepse

Cc: mantepse added
Keywords: LazyPowerSeries added

comment:5 Changed 9 years ago by mhansen

A fix is in #15673

comment:6 Changed 9 years ago by vbraun_spam

Milestone: sage-6.1sage-6.2

comment:7 Changed 9 years ago by vbraun_spam

Milestone: sage-6.2sage-6.3

comment:8 Changed 8 years ago by vbraun_spam

Milestone: sage-6.3sage-6.4

comment:9 Changed 7 years ago by chapoton

Description: modified (diff)

comment:10 Changed 5 months ago by mantepse

Milestone: sage-6.4sage-duplicate/invalid/wontfix
Status: newneeds_review

This is no longer relevant, since #32367. (the example works now and is tested)

comment:11 Changed 4 months ago by tscrim

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

comment:12 Changed 4 months ago by chapoton

Resolution: duplicate
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.