Closed
Description
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.
CC: axel.bacher@labri.fr @mwhansen @mantepse
Component: combinatorics
Keywords: LazyPowerSeries
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/10085