TESTS:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: a = L.structures(['a','b','c']).random_element()
sage: a == loads(dumps(a))
True
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.structures(['a','b','c']).random_element()
F-structure: {{'a', 'b', 'c'}}; G-structures: [('a', 'b', 'c')]
EXAMPLES:
sage: p = PermutationGroupElement((2,3))
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: S = L.structures(['a','b','c']).list()
sage: a = S[2]; a
F-structure: {{'a', 'c'}, {'b'}}; G-structures: [('a', 'c'), ('b')]
sage: a.change_labels([1,2,3])
F-structure: {{1, 3}, {2}}; G-structures: [(1, 3), (2)]
EXAMPLES:
sage: p = PermutationGroupElement((2,3))
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: S = L.structures(['a','b','c']).list()
sage: a = S[2]; a
F-structure: {{'a', 'c'}, {'b'}}; G-structures: [('a', 'c'), ('b')]
sage: a.transport(p)
F-structure: {{'a', 'b'}, {'c'}}; G-structures: [('a', 'c'), ('b')]
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: c = L.generating_series().coefficients(3)
sage: L._check() #False due to isomorphism types not being implemented
False
sage: L == loads(dumps(L))
True
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.cycle_index_series().coefficients(5)
[p[],
p[1],
p[1, 1] + p[2],
p[1, 1, 1] + p[2, 1] + p[3],
p[1, 1, 1, 1] + p[2, 1, 1] + p[2, 2] + p[3, 1] + p[4]]
Here we (indirectly) check that the the cycle index series for permutations weighted by the number of cycles is correctly computed.
sage: t = QQ['t'].gen()
sage: E = species.SetSpecies()
sage: C = species.CycleSpecies(weight=t)
sage: S = E(C)
sage: S.isotype_generating_series().coefficients(5) #indirect
[1, t, t^2 + t, t^3 + t^2 + t, t^4 + t^3 + 2*t^2 + t]
We do the same thing with set partitions weighed by the number of blocks.
sage: t = QQ['t'].gen()
sage: E = species.SetSpecies()
sage: E_t = species.SetSpecies(min=1,weight=t)
sage: Par = E(E_t)
sage: Par.isotype_generating_series().coefficients(5)
[1, t, t^2 + t, t^3 + t^2 + t, t^4 + t^3 + 2*t^2 + t]
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.generating_series().coefficients(5)
[1, 1, 1, 1, 1]
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.isotypes(['a','b','c']).list()
...
NotImplementedError
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.isotype_generating_series().coefficients(10)
[1, 1, 2, 3, 5, 7, 11, 15, 22, 30]
EXAMPLES:
sage: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.structures(['a','b','c']).list()
[F-structure: {{'a', 'b', 'c'}}; G-structures: [('a', 'b', 'c')],
F-structure: {{'a', 'b', 'c'}}; G-structures: [('a', 'c', 'b')],
F-structure: {{'a', 'c'}, {'b'}}; G-structures: [('a', 'c'), ('b')],
F-structure: {{'a', 'b'}, {'c'}}; G-structures: [('a', 'b'), ('c')],
F-structure: {{'b', 'c'}, {'a'}}; G-structures: [('b', 'c'), ('a')],
F-structure: {{'a'}, {'b'}, {'c'}}; G-structures: [('a'), ('b'), ('c')]]
TESTS:
sage: a = _[2]
sage: f, gs = a._list
sage: f
{{'a', 'c'}, {'b'}}
sage: f.parent()
Set species
sage: f._list
[1, 2]
sage: f._labels
[{'a', 'c'}, {'b'}]
sage: [g.parent() for g in gs]
[Cyclic permutation species, Cyclic permutation species]
sage: [g._labels for g in gs]
[['a', 'c'], ['b']]
sage: [g._list for g in gs]
[[1, 2], [1]]
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: E = species.SetSpecies(); C = species.CycleSpecies()
sage: L = E(C)
sage: L.weight_ring()
Rational Field