Product species#

class sage.combinat.species.product_species.ProductSpecies(F, G, min=None, max=None, weight=None)[source]#

Bases: GenericCombinatorialSpecies, UniqueRepresentation

EXAMPLES:

sage: X = species.SingletonSpecies()
sage: A = X*X
sage: A.generating_series()[0:4]
[0, 0, 1, 0]

sage: P = species.PermutationSpecies()
sage: F = P * P; F
Product of (Permutation species) and (Permutation species)
sage: F == loads(dumps(F))
True
sage: F._check()                                                            # needs sage.libs.flint
True
>>> from sage.all import *
>>> X = species.SingletonSpecies()
>>> A = X*X
>>> A.generating_series()[Integer(0):Integer(4)]
[0, 0, 1, 0]

>>> P = species.PermutationSpecies()
>>> F = P * P; F
Product of (Permutation species) and (Permutation species)
>>> F == loads(dumps(F))
True
>>> F._check()                                                            # needs sage.libs.flint
True
left_factor()[source]#

Returns the left factor of this product.

EXAMPLES:

sage: P = species.PermutationSpecies()
sage: X = species.SingletonSpecies()
sage: F = P*X
sage: F.left_factor()
Permutation species
>>> from sage.all import *
>>> P = species.PermutationSpecies()
>>> X = species.SingletonSpecies()
>>> F = P*X
>>> F.left_factor()
Permutation species
right_factor()[source]#

Returns the right factor of this product.

EXAMPLES:

sage: P = species.PermutationSpecies()
sage: X = species.SingletonSpecies()
sage: F = P*X
sage: F.right_factor()
Singleton species
>>> from sage.all import *
>>> P = species.PermutationSpecies()
>>> X = species.SingletonSpecies()
>>> F = P*X
>>> F.right_factor()
Singleton species
weight_ring()[source]#

Returns the weight ring for this species. This is determined by asking Sage’s coercion model what the result is when you multiply (and add) elements of the weight rings for each of the operands.

EXAMPLES:

sage: S = species.SetSpecies()
sage: C = S*S
sage: C.weight_ring()
Rational Field
>>> from sage.all import *
>>> S = species.SetSpecies()
>>> C = S*S
>>> C.weight_ring()
Rational Field
sage: S = species.SetSpecies(weight=QQ['t'].gen())
sage: C = S*S
sage: C.weight_ring()
Univariate Polynomial Ring in t over Rational Field
>>> from sage.all import *
>>> S = species.SetSpecies(weight=QQ['t'].gen())
>>> C = S*S
>>> C.weight_ring()
Univariate Polynomial Ring in t over Rational Field
sage: S = species.SetSpecies()
sage: C = (S*S).weighted(QQ['t'].gen())
sage: C.weight_ring()
Univariate Polynomial Ring in t over Rational Field
>>> from sage.all import *
>>> S = species.SetSpecies()
>>> C = (S*S).weighted(QQ['t'].gen())
>>> C.weight_ring()
Univariate Polynomial Ring in t over Rational Field
class sage.combinat.species.product_species.ProductSpeciesStructure(parent, labels, subset, left, right)[source]#

Bases: GenericSpeciesStructure

automorphism_group()[source]#

EXAMPLES:

sage: # needs sage.groups
sage: p = PermutationGroupElement((2,3))
sage: S = species.SetSpecies()
sage: F = S * S
sage: a = F.structures([1,2,3,4])[1]; a
{1}*{2, 3, 4}
sage: a.automorphism_group()
Permutation Group with generators [(2,3), (2,3,4)]
>>> from sage.all import *
>>> # needs sage.groups
>>> p = PermutationGroupElement((Integer(2),Integer(3)))
>>> S = species.SetSpecies()
>>> F = S * S
>>> a = F.structures([Integer(1),Integer(2),Integer(3),Integer(4)])[Integer(1)]; a
{1}*{2, 3, 4}
>>> a.automorphism_group()
Permutation Group with generators [(2,3), (2,3,4)]
sage: [a.transport(g) for g in a.automorphism_group()]                      # needs sage.groups
[{1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4}]
>>> from sage.all import *
>>> [a.transport(g) for g in a.automorphism_group()]                      # needs sage.groups
[{1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4},
 {1}*{2, 3, 4}]
sage: a = F.structures([1,2,3,4])[8]; a                                     # needs sage.groups
{2, 3}*{1, 4}
sage: [a.transport(g) for g in a.automorphism_group()]                      # needs sage.groups
[{2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}]
>>> from sage.all import *
>>> a = F.structures([Integer(1),Integer(2),Integer(3),Integer(4)])[Integer(8)]; a                                     # needs sage.groups
{2, 3}*{1, 4}
>>> [a.transport(g) for g in a.automorphism_group()]                      # needs sage.groups
[{2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}]
canonical_label()[source]#

EXAMPLES:

sage: S = species.SetSpecies()
sage: F = S * S
sage: S = F.structures(['a','b','c']).list(); S
[{}*{'a', 'b', 'c'},
 {'a'}*{'b', 'c'},
 {'b'}*{'a', 'c'},
 {'c'}*{'a', 'b'},
 {'a', 'b'}*{'c'},
 {'a', 'c'}*{'b'},
 {'b', 'c'}*{'a'},
 {'a', 'b', 'c'}*{}]
>>> from sage.all import *
>>> S = species.SetSpecies()
>>> F = S * S
>>> S = F.structures(['a','b','c']).list(); S
[{}*{'a', 'b', 'c'},
 {'a'}*{'b', 'c'},
 {'b'}*{'a', 'c'},
 {'c'}*{'a', 'b'},
 {'a', 'b'}*{'c'},
 {'a', 'c'}*{'b'},
 {'b', 'c'}*{'a'},
 {'a', 'b', 'c'}*{}]
sage: F.isotypes(['a','b','c']).cardinality()
4
sage: [s.canonical_label() for s in S]
[{}*{'a', 'b', 'c'},
 {'a'}*{'b', 'c'},
 {'a'}*{'b', 'c'},
 {'a'}*{'b', 'c'},
 {'a', 'b'}*{'c'},
 {'a', 'b'}*{'c'},
 {'a', 'b'}*{'c'},
 {'a', 'b', 'c'}*{}]
>>> from sage.all import *
>>> F.isotypes(['a','b','c']).cardinality()
4
>>> [s.canonical_label() for s in S]
[{}*{'a', 'b', 'c'},
 {'a'}*{'b', 'c'},
 {'a'}*{'b', 'c'},
 {'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: S = species.SetSpecies()
sage: F = S * S
sage: a = F.structures(['a','b','c'])[0]; a
{}*{'a', 'b', 'c'}
sage: a.change_labels([1,2,3])
{}*{1, 2, 3}
>>> from sage.all import *
>>> S = species.SetSpecies()
>>> F = S * S
>>> a = F.structures(['a','b','c'])[Integer(0)]; a
{}*{'a', 'b', 'c'}
>>> a.change_labels([Integer(1),Integer(2),Integer(3)])
{}*{1, 2, 3}
transport(perm)[source]#

EXAMPLES:

sage: # needs sage.groups
sage: p = PermutationGroupElement((2,3))
sage: S = species.SetSpecies()
sage: F = S * S
sage: a = F.structures(['a','b','c'])[4]; a
{'a', 'b'}*{'c'}
sage: a.transport(p)
{'a', 'c'}*{'b'}
>>> from sage.all import *
>>> # needs sage.groups
>>> p = PermutationGroupElement((Integer(2),Integer(3)))
>>> S = species.SetSpecies()
>>> F = S * S
>>> a = F.structures(['a','b','c'])[Integer(4)]; a
{'a', 'b'}*{'c'}
>>> a.transport(p)
{'a', 'c'}*{'b'}
sage.combinat.species.product_species.ProductSpecies_class[source]#

alias of ProductSpecies