Skip to content
15 changes: 12 additions & 3 deletions src/sage/combinat/species/recursive_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _gs(self, series_ring, base_ring):

sage: F = CombinatorialSpecies()
sage: F.generating_series()
Uninitialized Lazy Laurent Series
Uninitialized Lazy Series
"""
if base_ring not in self._generating_series:
self._generating_series[base_ring] = series_ring.undefined(valuation=(0 if self._min is None else self._min))
Expand All @@ -247,7 +247,7 @@ def _itgs(self, series_ring, base_ring):

sage: F = CombinatorialSpecies()
sage: F.isotype_generating_series()
Uninitialized Lazy Laurent Series
Uninitialized Lazy Series
"""
if base_ring not in self._isotype_generating_series:
self._isotype_generating_series[base_ring] = series_ring.undefined(valuation=(0 if self._min is None else self._min))
Expand All @@ -264,7 +264,7 @@ def _cis(self, series_ring, base_ring):

sage: F = CombinatorialSpecies()
sage: F.cycle_index_series()
Uninitialized Lazy Laurent Series
Uninitialized Lazy Series
"""
if base_ring not in self._cycle_index_series:
self._cycle_index_series[base_ring] = series_ring.undefined(valuation=(0 if self._min is None else self._min))
Expand Down Expand Up @@ -401,6 +401,15 @@ def define(self, x):
[1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
sage: F.isotype_generating_series()[0:10]
[1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

Check that :issue:`35071` is fixed::

sage: X = species.SingletonSpecies()
sage: E = species.SetSpecies(max=3)
sage: B = species.CombinatorialSpecies(min=1)
sage: B.define(X*E(B))
sage: B.generating_series()
z + z^2 + 3/2*z^3 + 5/2*z^4 + 9/2*z^5 + 17/2*z^6 + 133/8*z^7 + O(z^8)
"""
if not isinstance(x, GenericCombinatorialSpecies):
raise TypeError("x must be a combinatorial species")
Expand Down
Loading