Partition Species#

class sage.combinat.species.partition_species.PartitionSpecies(min=None, max=None, weight=None)[source]#

Bases: GenericCombinatorialSpecies

Returns the species of partitions.

EXAMPLES:

sage: P = species.PartitionSpecies()
sage: P.generating_series()[0:5]
[1, 1, 1, 5/6, 5/8]
sage: P.isotype_generating_series()[0:5]
[1, 1, 2, 3, 5]

sage: P = species.PartitionSpecies()
sage: P._check()
True
sage: P == loads(dumps(P))
True
>>> from sage.all import *
>>> P = species.PartitionSpecies()
>>> P.generating_series()[Integer(0):Integer(5)]
[1, 1, 1, 5/6, 5/8]
>>> P.isotype_generating_series()[Integer(0):Integer(5)]
[1, 1, 2, 3, 5]

>>> P = species.PartitionSpecies()
>>> P._check()
True
>>> P == loads(dumps(P))
True
class sage.combinat.species.partition_species.PartitionSpeciesStructure(parent, labels, list)[source]#

Bases: GenericSpeciesStructure

EXAMPLES:

sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
sage: P = species.PartitionSpecies()
sage: s = PartitionSpeciesStructure(P, ['a','b','c'], [[1,2],[3]]); s
{{'a', 'b'}, {'c'}}
sage: s == loads(dumps(s))
True
>>> from sage.all import *
>>> from sage.combinat.species.partition_species import PartitionSpeciesStructure
>>> P = species.PartitionSpecies()
>>> s = PartitionSpeciesStructure(P, ['a','b','c'], [[Integer(1),Integer(2)],[Integer(3)]]); s
{{'a', 'b'}, {'c'}}
>>> s == loads(dumps(s))
True
automorphism_group()[source]#

Returns the group of permutations whose action on this set partition leave it fixed.

EXAMPLES:

sage: p = PermutationGroupElement((2,3))
sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
sage: a = PartitionSpeciesStructure(None, [2,3,4], [[1,2],[3]]); a
{{2, 3}, {4}}
sage: a.automorphism_group()
Permutation Group with generators [(1,2)]
>>> from sage.all import *
>>> p = PermutationGroupElement((Integer(2),Integer(3)))
>>> from sage.combinat.species.partition_species import PartitionSpeciesStructure
>>> a = PartitionSpeciesStructure(None, [Integer(2),Integer(3),Integer(4)], [[Integer(1),Integer(2)],[Integer(3)]]); a
{{2, 3}, {4}}
>>> a.automorphism_group()
Permutation Group with generators [(1,2)]
canonical_label()[source]#

EXAMPLES:

sage: P = species.PartitionSpecies()
sage: S = P.structures(["a", "b", "c"])
sage: [s.canonical_label() for s in S]
[{{'a', 'b', 'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a'}, {'b'}, {'c'}}]
>>> from sage.all import *
>>> P = species.PartitionSpecies()
>>> S = P.structures(["a", "b", "c"])
>>> [s.canonical_label() for s in S]
[{{'a', 'b', 'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a', 'b'}, {'c'}},
 {{'a'}, {'b'}, {'c'}}]
change_labels(labels)[source]#

Return a relabelled structure.

INPUT:

  • labels, a list of labels.

OUTPUT:

A structure with the i-th label of self replaced with the i-th label of the list.

EXAMPLES:

sage: p = PermutationGroupElement((2,3))
sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
sage: a = PartitionSpeciesStructure(None, [2,3,4], [[1,2],[3]]); a
{{2, 3}, {4}}
sage: a.change_labels([1,2,3])
{{1, 2}, {3}}
>>> from sage.all import *
>>> p = PermutationGroupElement((Integer(2),Integer(3)))
>>> from sage.combinat.species.partition_species import PartitionSpeciesStructure
>>> a = PartitionSpeciesStructure(None, [Integer(2),Integer(3),Integer(4)], [[Integer(1),Integer(2)],[Integer(3)]]); a
{{2, 3}, {4}}
>>> a.change_labels([Integer(1),Integer(2),Integer(3)])
{{1, 2}, {3}}
transport(perm)[source]#

Returns the transport of this set partition along the permutation perm. For set partitions, this is the direct product of the automorphism groups for each of the blocks.

EXAMPLES:

sage: p = PermutationGroupElement((2,3))
sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
sage: a = PartitionSpeciesStructure(None, [2,3,4], [[1,2],[3]]); a
{{2, 3}, {4}}
sage: a.transport(p)
{{2, 4}, {3}}
>>> from sage.all import *
>>> p = PermutationGroupElement((Integer(2),Integer(3)))
>>> from sage.combinat.species.partition_species import PartitionSpeciesStructure
>>> a = PartitionSpeciesStructure(None, [Integer(2),Integer(3),Integer(4)], [[Integer(1),Integer(2)],[Integer(3)]]); a
{{2, 3}, {4}}
>>> a.transport(p)
{{2, 4}, {3}}
sage.combinat.species.partition_species.PartitionSpecies_class[source]#

alias of PartitionSpecies