-
-
Notifications
You must be signed in to change notification settings - Fork 702
Closed
Description
The following specification is valid:
sage: Set0 = species.SetSpecies()
sage: Set1 = species.SetSpecies(min=1)
sage: Set2 = species.SetSpecies(min=2)
sage: Four = species.CombinatorialSpecies()
sage: Four.define(Set2(Four) + Set1*Set0(Four))
However, the following code breaks
sage: Four.generating_series()[1]
[...]
ValueError: generator already executing
Strangely enough, adding some seemingly unrelated instruction work
around it::
sage: Set0 = species.SetSpecies()
sage: Set1 = species.SetSpecies(min=1)
sage: Set2 = species.SetSpecies(min=2)
sage: Set2(Set1).generating_series()[1]
0
sage: Four = species.CombinatorialSpecies()
sage: Four.define(Set2(Four) + Set1*Set0(Four))
sage: Four.generating_series()[1]
1
sage: Four.generating_series()[4]
52/3
sage: Four.generating_series()
x + 2*x^2 + 16/3*x^3 + 52/3*x^4 + O(x^5)
Florent
CC: @sagetrac-sage-combinat @mantepse
Component: combinatorics
Keywords: Species, LazyPowerSeries
Issue created by migration from https://trac.sagemath.org/ticket/12649