Empty species - Combinatorics

Skip to content
Back to top
View this page
Edit this page

# Empty species

class sage.combinat.species.empty_species.EmptySpecies(min=None, max=None, weight=None)

  Bases: `GenericCombinatorialSpecies`, `UniqueRepresentation`

  Return the empty species. This species has no structure at all. It is the zero of the semi-ring of species.

  EXAMPLES:

  Sage

      sage: X = species.EmptySpecies(); X
      doctest:warning...
      DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
      See https://github.com/sagemath/sage/issues/38544 for details.
      Empty species
      sage: X.structures([]).list()
      []
      sage: X.structures([1]).list()
      []
      sage: X.structures([1,2]).list()
      []
      sage: X.generating_series()[0:4]
      [0, 0, 0, 0]
      sage: X.isotype_generating_series()[0:4]
      [0, 0, 0, 0]
      sage: X.cycle_index_series()[0:4]                                               # needs sage.modules
      [0, 0, 0, 0]

  Python

      >>> from sage.all import *
      >>> X = species.EmptySpecies(); X
      doctest:warning...
      DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
      See https://github.com/sagemath/sage/issues/38544 for details.
      Empty species
      >>> X.structures([]).list()
      []
      >>> X.structures([Integer(1)]).list()
      []
      >>> X.structures([Integer(1),Integer(2)]).list()
      []
      >>> X.generating_series()[Integer(0):Integer(4)]
      [0, 0, 0, 0]
      >>> X.isotype_generating_series()[Integer(0):Integer(4)]
      [0, 0, 0, 0]
      >>> X.cycle_index_series()[Integer(0):Integer(4)]                                               # needs sage.modules
      [0, 0, 0, 0]

  The empty species is the zero of the semi-ring of species. The following tests that it is neutral with respect to addition:

  Sage

      sage: Empt  = species.EmptySpecies()
      sage: S = species.CharacteristicSpecies(2)
      sage: X = S + Empt
      sage: X == S    # TODO: Not Implemented
      True
      sage: (X.generating_series()[0:4] ==
      ....:  S.generating_series()[0:4])
      True
      sage: (X.isotype_generating_series()[0:4] ==
      ....:  S.isotype_generating_series()[0:4])
      True
      sage: (X.cycle_index_series()[0:4] ==                                           # needs sage.modules
      ....:  S.cycle_index_series()[0:4])
      True

  [Python]

      >>> from sage.all import *
      >>> Empt  = species.EmptySpecies()
      >>> S = species.CharacteristicSpecies(Integer(2))
      >>> X = S + Empt
      >>> X == S    # TODO: Not Implemented
      True
      >>> (X.generating_series()[Integer(0):Integer(4)] ==
      ...  S.generating_series()[Integer(0):Integer(4)])
      True
      >>> (X.isotype_generating_series()[Integer(0):Integer(4)] ==
      ...  S.isotype_generating_series()[Integer(0):Integer(4)])
      True
      >>> (X.cycle_index_series()[Integer(0):Integer(4)] ==                                           # needs sage.modules
      ...  S.cycle_index_series()[Integer(0):Integer(4)])
      True

  The following tests that it is the zero element with respect to multiplication:

  Sage

      sage: Y = Empt*S
      sage: Y == Empt   # TODO: Not Implemented
      True
      sage: Y.generating_series()[0:4]
      [0, 0, 0, 0]
      sage: Y.isotype_generating_series()[0:4]
      [0, 0, 0, 0]
      sage: Y.cycle_index_series()[0:4]                                               # needs sage.modules
      [0, 0, 0, 0]

  Python

      >>> from sage.all import *
      >>> Y = Empt*S
      >>> Y == Empt   # TODO: Not Implemented
      True
      >>> Y.generating_series()[Integer(0):Integer(4)]
      [0, 0, 0, 0]
      >>> Y.isotype_generating_series()[Integer(0):Integer(4)]
      [0, 0, 0, 0]
      >>> Y.cycle_index_series()[Integer(0):Integer(4)]                                               # needs sage.modules
      [0, 0, 0, 0]

sage.combinat.species.empty_species.EmptySpecies_class

  alias of `EmptySpecies`