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
The coefficient of order 1 in the series y should not be the integer 1, but the power series [1, 0, ...] in S1.
CC: [email protected] @mwhansen @mantepse
Component: combinatorics
Keywords: LazyPowerSeries
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/10085