Characteristic species - Combinatorics

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

# Characteristic species

class sage.combinat.species.characteristic_species.CharacteristicSpecies(n, min=None, max=None, weight=None)

  Bases: `GenericCombinatorialSpecies`, `UniqueRepresentation`

  Return the characteristic species of order \(n\).

  This species has exactly one structure on a set of size \(n\) and no structures on sets of any other size.

  EXAMPLES:

  Sage

      sage: X = species.CharacteristicSpecies(1)
      sage: X.structures([1]).list()
      [1]
      sage: X.structures([1,2]).list()
      []
      sage: X.generating_series()[0:4]
      [0, 1, 0, 0]
      sage: X.isotype_generating_series()[0:4]
      [0, 1, 0, 0]
      sage: X.cycle_index_series()[0:4]                                           # needs sage.modules
      [0, p[1], 0, 0]

      sage: F = species.CharacteristicSpecies(3)
      sage: c = F.generating_series()[0:4]
      sage: F._check()
      True
      sage: F == loads(dumps(F))
      True

  Python

      >>> from sage.all import *
      >>> X = species.CharacteristicSpecies(Integer(1))
      >>> X.structures([Integer(1)]).list()
      [1]
      >>> X.structures([Integer(1),Integer(2)]).list()
      []
      >>> X.generating_series()[Integer(0):Integer(4)]
      [0, 1, 0, 0]
      >>> X.isotype_generating_series()[Integer(0):Integer(4)]
      [0, 1, 0, 0]
      >>> X.cycle_index_series()[Integer(0):Integer(4)]                                           # needs sage.modules
      [0, p[1], 0, 0]

      >>> F = species.CharacteristicSpecies(Integer(3))
      >>> c = F.generating_series()[Integer(0):Integer(4)]
      >>> F._check()
      True
      >>> F == loads(dumps(F))
      True

class sage.combinat.species.characteristic_species.CharacteristicSpeciesStructure(parent, labels, list)

  Bases: `GenericSpeciesStructure`

  automorphism_group()

    Return the group of permutations whose action on this structure leave it fixed. For the characteristic species, there is only one structure, so every permutation is in its automorphism group.

    EXAMPLES:

    Sage

        sage: F = species.CharacteristicSpecies(3)
        sage: a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        sage: a.automorphism_group()                                                # needs sage.groups
        Symmetric group of order 3! as a permutation group

    Python

        >>> from sage.all import *
        >>> F = species.CharacteristicSpecies(Integer(3))
        >>> a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        >>> a.automorphism_group()                                                # needs sage.groups
        Symmetric group of order 3! as a permutation group

  canonical_label()

    EXAMPLES:

    Sage

        sage: F = species.CharacteristicSpecies(3)
        sage: a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        sage: a.canonical_label()
        {'a', 'b', 'c'}

    Python

        >>> from sage.all import *
        >>> F = species.CharacteristicSpecies(Integer(3))
        >>> a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        >>> a.canonical_label()
        {'a', 'b', 'c'}

  transport(perm)

    Return the transport of this structure along the permutation `perm`.

    EXAMPLES:

    Sage

        sage: F = species.CharacteristicSpecies(3)
        sage: a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        sage: p = PermutationGroupElement((1,2))                                    # needs sage.groups
        sage: a.transport(p)                                                        # needs sage.groups
        {'a', 'b', 'c'}

    Python

        >>> from sage.all import *
        >>> F = species.CharacteristicSpecies(Integer(3))
        >>> a = F.structures(["a", "b", "c"]).random_element(); a
        {'a', 'b', 'c'}
        >>> p = PermutationGroupElement((Integer(1),Integer(2)))                                    # needs sage.groups
        >>> a.transport(p)                                                        # needs sage.groups
        {'a', 'b', 'c'}

sage.combinat.species.characteristic_species.CharacteristicSpecies_class

  alias of `CharacteristicSpecies`

class sage.combinat.species.characteristic_species.EmptySetSpecies(min=None, max=None, weight=None)

  Bases: `CharacteristicSpecies`

  Return the empty set species.

  This species has exactly one structure on the empty set. It is the same (and is implemented) as `CharacteristicSpecies(0)`.

  EXAMPLES:

  Sage

      sage: X = species.EmptySetSpecies()
      sage: X.structures([]).list()
      [{}]
      sage: X.structures([1,2]).list()
      []
      sage: X.generating_series()[0:4]
      [1, 0, 0, 0]
      sage: X.isotype_generating_series()[0:4]
      [1, 0, 0, 0]
      sage: X.cycle_index_series()[0:4]                                           # needs sage.modules
      [p[], 0, 0, 0]

  Python

      >>> from sage.all import *
      >>> X = species.EmptySetSpecies()
      >>> X.structures([]).list()
      [{}]
      >>> X.structures([Integer(1),Integer(2)]).list()
      []
      >>> X.generating_series()[Integer(0):Integer(4)]
      [1, 0, 0, 0]
      >>> X.isotype_generating_series()[Integer(0):Integer(4)]
      [1, 0, 0, 0]
      >>> X.cycle_index_series()[Integer(0):Integer(4)]                                           # needs sage.modules
      [p[], 0, 0, 0]

sage.combinat.species.characteristic_species.EmptySetSpecies_class

  alias of `EmptySetSpecies`

class sage.combinat.species.characteristic_species.SingletonSpecies(min=None, max=None, weight=None)

  Bases: `CharacteristicSpecies`

  Return the species of singletons.

  This species has exactly one structure on a set of size \(1\). It is the same (and is implemented) as `CharacteristicSpecies(1)`.

  EXAMPLES:

  Sage

      sage: X = species.SingletonSpecies()
      sage: X.structures([1]).list()
      [1]
      sage: X.structures([1,2]).list()
      []
      sage: X.generating_series()[0:4]
      [0, 1, 0, 0]
      sage: X.isotype_generating_series()[0:4]
      [0, 1, 0, 0]
      sage: X.cycle_index_series()[0:4]                                           # needs sage.modules
      [0, p[1], 0, 0]

  Python

      >>> from sage.all import *
      >>> X = species.SingletonSpecies()
      >>> X.structures([Integer(1)]).list()
      [1]
      >>> X.structures([Integer(1),Integer(2)]).list()
      []
      >>> X.generating_series()[Integer(0):Integer(4)]
      [0, 1, 0, 0]
      >>> X.isotype_generating_series()[Integer(0):Integer(4)]
      [0, 1, 0, 0]
      >>> X.cycle_index_series()[Integer(0):Integer(4)]                                           # needs sage.modules
      [0, p[1], 0, 0]

sage.combinat.species.characteristic_species.SingletonSpecies_class

  alias of `SingletonSpecies`