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:

Status badges

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 hivert

Here is a smaller code which triggers the problem:

Z     = species.SingletonSpecies()
Set2  = species.SetSpecies(min=2)
NMult   = species.CombinatorialSpecies()
NMult.define(Set2(Z+NMult))
NMult.generating_series()[0]

comment:2 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 7 years ago by mhansen

Fixed in #15673.

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.