Subset Species¶
- class sage.combinat.species.subset_species.SubsetSpecies(min=None, max=None, weight=None)[source]¶
- Bases: - GenericCombinatorialSpecies,- UniqueRepresentation- Return the species of subsets. - EXAMPLES: - sage: S = species.SubsetSpecies() sage: S.generating_series()[0:5] [1, 2, 2, 4/3, 2/3] sage: S.isotype_generating_series()[0:5] [1, 2, 3, 4, 5] sage: S = species.SubsetSpecies() sage: c = S.generating_series()[0:3] sage: S._check() True sage: S == loads(dumps(S)) True - >>> from sage.all import * >>> S = species.SubsetSpecies() >>> S.generating_series()[Integer(0):Integer(5)] [1, 2, 2, 4/3, 2/3] >>> S.isotype_generating_series()[Integer(0):Integer(5)] [1, 2, 3, 4, 5] >>> S = species.SubsetSpecies() >>> c = S.generating_series()[Integer(0):Integer(3)] >>> S._check() True >>> S == loads(dumps(S)) True 
- class sage.combinat.species.subset_species.SubsetSpeciesStructure(parent, labels, list)[source]¶
- Bases: - GenericSpeciesStructure- automorphism_group()[source]¶
- Return the group of permutations whose action on this subset leave it fixed. - EXAMPLES: - sage: F = species.SubsetSpecies() sage: a = F.structures([1,2,3,4])[6]; a {1, 3} sage: a.automorphism_group() # needs sage.groups Permutation Group with generators [(2,4), (1,3)] - >>> from sage.all import * >>> F = species.SubsetSpecies() >>> a = F.structures([Integer(1),Integer(2),Integer(3),Integer(4)])[Integer(6)]; a {1, 3} >>> a.automorphism_group() # needs sage.groups Permutation Group with generators [(2,4), (1,3)] - sage: [a.transport(g) for g in a.automorphism_group()] # needs sage.groups [{1, 3}, {1, 3}, {1, 3}, {1, 3}] - >>> from sage.all import * >>> [a.transport(g) for g in a.automorphism_group()] # needs sage.groups [{1, 3}, {1, 3}, {1, 3}, {1, 3}] 
 - canonical_label()[source]¶
- Return the canonical label of - self.- EXAMPLES: - sage: P = species.SubsetSpecies() sage: S = P.structures(["a", "b", "c"]) sage: [s.canonical_label() for s in S] [{}, {'a'}, {'a'}, {'a'}, {'a', 'b'}, {'a', 'b'}, {'a', 'b'}, {'a', 'b', 'c'}] - >>> from sage.all import * >>> P = species.SubsetSpecies() >>> S = P.structures(["a", "b", "c"]) >>> [s.canonical_label() for s in S] [{}, {'a'}, {'a'}, {'a'}, {'a', 'b'}, {'a', 'b'}, {'a', 'b'}, {'a', 'b', 'c'}] 
 - complement()[source]¶
- Return the complement of - self.- EXAMPLES: - sage: F = species.SubsetSpecies() sage: a = F.structures(["a", "b", "c"])[5]; a {'a', 'c'} sage: a.complement() {'b'} - >>> from sage.all import * >>> F = species.SubsetSpecies() >>> a = F.structures(["a", "b", "c"])[Integer(5)]; a {'a', 'c'} >>> a.complement() {'b'} 
 - label_subset()[source]¶
- Return a subset of the labels that “appear” in this structure. - EXAMPLES: - sage: P = species.SubsetSpecies() sage: S = P.structures(["a", "b", "c"]) sage: [s.label_subset() for s in S] [[], ['a'], ['b'], ['c'], ['a', 'b'], ['a', 'c'], ['b', 'c'], ['a', 'b', 'c']] - >>> from sage.all import * >>> P = species.SubsetSpecies() >>> S = P.structures(["a", "b", "c"]) >>> [s.label_subset() for s in S] [[], ['a'], ['b'], ['c'], ['a', 'b'], ['a', 'c'], ['b', 'c'], ['a', 'b', 'c']] 
 - transport(perm)[source]¶
- Return the transport of this subset along the permutation perm. - EXAMPLES: - sage: F = species.SubsetSpecies() sage: a = F.structures(["a", "b", "c"])[5]; a {'a', 'c'} sage: p = PermutationGroupElement((1,2)) # needs sage.groups sage: a.transport(p) # needs sage.groups {'b', 'c'} sage: p = PermutationGroupElement((1,3)) # needs sage.groups sage: a.transport(p) # needs sage.groups {'a', 'c'} - >>> from sage.all import * >>> F = species.SubsetSpecies() >>> a = F.structures(["a", "b", "c"])[Integer(5)]; a {'a', 'c'} >>> p = PermutationGroupElement((Integer(1),Integer(2))) # needs sage.groups >>> a.transport(p) # needs sage.groups {'b', 'c'} >>> p = PermutationGroupElement((Integer(1),Integer(3))) # needs sage.groups >>> a.transport(p) # needs sage.groups {'a', 'c'} 
 
- sage.combinat.species.subset_species.SubsetSpecies_class[source]¶
- alias of - SubsetSpecies