Opened 9 years ago
Last modified 7 years ago
#12649 new defect
Bug in initialisation of species
Reported by: | hivert | Owned by: | sage-combinat |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | combinatorics | Keywords: | Species |
Cc: | sage-combinat | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
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
Change History (6)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 7 years ago by
Fixed in #15673.
comment:4 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Note: See
TracTickets for help on using
tickets.
Here is a smaller code which triggers the problem: