# Sum species#

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

Returns the sum of two species.

EXAMPLES:

sage: S = species.PermutationSpecies()
sage: A = S+S
sage: A.generating_series()[:5]
[2, 2, 2, 2, 2]

sage: P = species.PermutationSpecies()
sage: F = P + P
sage: F._check()                                                            # needs sage.libs.flint
True
True

>>> from sage.all import *
>>> S = species.PermutationSpecies()
>>> A = S+S
>>> A.generating_series()[:Integer(5)]
[2, 2, 2, 2, 2]

>>> P = species.PermutationSpecies()
>>> F = P + P
>>> F._check()                                                            # needs sage.libs.flint
True
True

left_summand()[source]#

Returns the left summand of this species.

EXAMPLES:

sage: P = species.PermutationSpecies()
sage: F = P + P*P
sage: F.left_summand()
Permutation species

>>> from sage.all import *
>>> P = species.PermutationSpecies()
>>> F = P + P*P
>>> F.left_summand()
Permutation species

right_summand()[source]#

Returns the right summand of this species.

EXAMPLES:

sage: P = species.PermutationSpecies()
sage: F = P + P*P
sage: F.right_summand()
Product of (Permutation species) and (Permutation species)

>>> from sage.all import *
>>> P = species.PermutationSpecies()
>>> F = P + P*P
>>> F.right_summand()
Product of (Permutation species) and (Permutation 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 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

class sage.combinat.species.sum_species.SumSpeciesStructure(parent, s, **options)[source]#
sage.combinat.species.sum_species.SumSpecies_class[source]#

alias of SumSpecies