Sum species

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

Bases: sage.combinat.species.species.GenericCombinatorialSpecies, sage.structure.unique_representation.UniqueRepresentation

Returns the sum of two species.

EXAMPLES:

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

sage: P = species.PermutationSpecies()
sage: F = P + P
sage: F._check()
True
sage: F == loads(dumps(F))
True
left_summand()

Returns the left summand of this species.

EXAMPLES:

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

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)
weight_ring()

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
sage: S = species.SetSpecies(weight=QQ['t'].gen())
sage: C = S + S
sage: C.weight_ring()
Univariate Polynomial Ring in t over Rational Field
class sage.combinat.species.sum_species.SumSpeciesStructure(parent, s, **options)

Bases: sage.combinat.species.structure.SpeciesStructureWrapper

sage.combinat.species.sum_species.SumSpecies_class

alias of SumSpecies