-
-
Notifications
You must be signed in to change notification settings - Fork 698
Closed
Description
Currently
sage: R = LazyPowerSeriesRing(QQ)
sage: type(R.gen().coefficient(0))
<type 'sage.rings.rational.Rational'>
sage: type(R.gen().coefficient(1))
<type 'int'>
sage: type(R.gen().coefficient(2))
<type 'int'>
it should be always Rational
I also fixed the following bug:
sage: from sage.combinat.species.series import LazyPowerSeriesRing
sage: L = LazyPowerSeriesRing(QQ)
sage: g = L.gen(); z = L.zero()
sage: s = z+g; s
Uninitialized lazy power series
sage: s.coefficients(10)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sage: s
Uninitialized lazy power series
It should be:
sage: s.coefficients(10)
[0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
sage: s
x + O(x^10)
Depends on #14685
CC: @sagetrac-sage-combinat @simon-king-jena @fchapoton @darijgr
Component: combinatorics
Keywords: LazyPowerSeries, Species, days49
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/13433