Sum species¶
-
class
sage.combinat.species.product_species.
ProductSpecies
(F, G, min=None, max=None, weight=None)¶ Bases:
sage.combinat.species.species.GenericCombinatorialSpecies
,sage.structure.unique_representation.UniqueRepresentation
EXAMPLES:
sage: X = species.SingletonSpecies() sage: A = X*X sage: A.generating_series().coefficients(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() True
TESTS:
sage: X = species.SingletonSpecies() sage: X*X is X*X True
-
weight_ring
()¶ 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
sage: S = species.SetSpecies(weight=QQ['t'].gen()) sage: C = S*S sage: 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
-
-
class
sage.combinat.species.product_species.
ProductSpeciesStructure
(parent, labels, subset, left, right)¶ Bases:
sage.combinat.species.structure.GenericSpeciesStructure
TESTS:
sage: S = species.SetSpecies() sage: F = S * S sage: a = F.structures(['a','b','c']).random_element() sage: a == loads(dumps(a)) True
-
automorphism_group
()¶ EXAMPLES:
sage: p = PermutationGroupElement((2,3)) sage: S = species.SetSpecies() sage: F = S * S sage: a = F.structures([1,2,3,4]).random_element(); a {1}*{2, 3, 4} sage: a.automorphism_group() Permutation Group with generators [(2,3), (2,3,4)]
sage: [a.transport(g) for g in a.automorphism_group()] [{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]).random_element(); a {2, 3}*{1, 4} sage: [a.transport(g) for g in a.automorphism_group()] [{2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}, {2, 3}*{1, 4}]
-
canonical_label
()¶ 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'}*{}]
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'}*{}]
-
change_labels
(labels)¶ EXAMPLES:
sage: S = species.SetSpecies() sage: F = S * S sage: a = F.structures(['a','b','c']).random_element(); a {}*{'a', 'b', 'c'} sage: a.change_labels([1,2,3]) {}*{1, 2, 3}
-
transport
(perm)¶ EXAMPLES:
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'}
-
-
sage.combinat.species.product_species.
ProductSpecies_class
¶ alias of
ProductSpecies