Skip to content

Commit 6cb95c1

Browse files
author
Matthias Koeppe
committed
More # optional
1 parent 36ee074 commit 6cb95c1

11 files changed

+67
-68
lines changed

src/sage/combinat/species/characteristic_species.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,15 @@ def canonical_label(self):
6060

6161
def transport(self, perm):
6262
"""
63-
Returns the transport of this structure along the permutation
64-
perm.
63+
Return the transport of this structure along the permutation ``perm``.
6564
6665
EXAMPLES::
6766
6867
sage: F = species.CharacteristicSpecies(3)
6968
sage: a = F.structures(["a", "b", "c"]).random_element(); a
7069
{'a', 'b', 'c'}
71-
sage: p = PermutationGroupElement((1,2))
72-
sage: a.transport(p)
70+
sage: p = PermutationGroupElement((1,2)) # optional - sage.groups
71+
sage: a.transport(p) # optional - sage.groups
7372
{'a', 'b', 'c'}
7473
"""
7574
return self
@@ -85,7 +84,7 @@ def automorphism_group(self):
8584
sage: F = species.CharacteristicSpecies(3)
8685
sage: a = F.structures(["a", "b", "c"]).random_element(); a
8786
{'a', 'b', 'c'}
88-
sage: a.automorphism_group()
87+
sage: a.automorphism_group() # optional - sage.groups
8988
Symmetric group of order 3! as a permutation group
9089
"""
9190
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
@@ -111,7 +110,7 @@ def __init__(self, n, min=None, max=None, weight=None):
111110
[0, 1, 0, 0]
112111
sage: X.isotype_generating_series()[0:4]
113112
[0, 1, 0, 0]
114-
sage: X.cycle_index_series()[0:4]
113+
sage: X.cycle_index_series()[0:4] # optional - sage.modules
115114
[0, p[1], 0, 0]
116115
117116
sage: F = species.CharacteristicSpecies(3)
@@ -204,7 +203,7 @@ def _cis_term(self, base_ring):
204203
EXAMPLES::
205204
206205
sage: F = species.CharacteristicSpecies(2)
207-
sage: g = F.cycle_index_series()
206+
sage: g = F.cycle_index_series() # optional - sage.modules
208207
sage: g[0:5]
209208
[0, 0, 1/2*p[1, 1] + 1/2*p[2], 0, 0]
210209
"""
@@ -220,11 +219,11 @@ def _equation(self, var_mapping):
220219
EXAMPLES::
221220
222221
sage: C = species.CharacteristicSpecies(2)
223-
sage: Qz = QQ['z']
224-
sage: R.<node0> = Qz[]
225-
sage: var_mapping = {'z':Qz.gen(), 'node0':R.gen()}
226-
sage: C._equation(var_mapping)
227-
z^2
222+
sage: Qz = QQ['z']
223+
sage: R.<node0> = Qz[]
224+
sage: var_mapping = {'z':Qz.gen(), 'node0':R.gen()}
225+
sage: C._equation(var_mapping)
226+
z^2
228227
"""
229228
return var_mapping['z']**(self._n)
230229

@@ -252,7 +251,7 @@ def __init__(self, min=None, max=None, weight=None):
252251
[1, 0, 0, 0]
253252
sage: X.isotype_generating_series()[0:4]
254253
[1, 0, 0, 0]
255-
sage: X.cycle_index_series()[0:4]
254+
sage: X.cycle_index_series()[0:4] # optional - sage.modules
256255
[p[], 0, 0, 0]
257256
258257
TESTS::
@@ -296,7 +295,7 @@ def __init__(self, min=None, max=None, weight=None):
296295
[0, 1, 0, 0]
297296
sage: X.isotype_generating_series()[0:4]
298297
[0, 1, 0, 0]
299-
sage: X.cycle_index_series()[0:4]
298+
sage: X.cycle_index_series()[0:4] # optional - sage.modules
300299
[0, p[1], 0, 0]
301300
302301
TESTS::

src/sage/combinat/species/composition_species.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def __init__(self, parent, labels, pi, f, gs):
2828
2929
sage: E = species.SetSpecies(); C = species.CycleSpecies()
3030
sage: L = E(C)
31-
sage: a = L.structures(['a','b','c']).random_element()
32-
sage: a == loads(dumps(a))
31+
sage: a = L.structures(['a','b','c']).random_element() # optional - sage.libs.flint
32+
sage: a == loads(dumps(a)) # optional - sage.libs.flint
3333
True
3434
"""
3535
self._partition = pi
@@ -41,7 +41,7 @@ def __repr__(self):
4141
4242
sage: E = species.SetSpecies(); C = species.CycleSpecies()
4343
sage: L = E(C)
44-
sage: L.structures(['a','b','c'])[0]
44+
sage: L.structures(['a','b','c'])[0] # optional - sage.libs.flint
4545
F-structure: {{'a', 'b', 'c'}}; G-structures: (('a', 'b', 'c'),)
4646
"""
4747
f, gs = self._list
@@ -51,13 +51,13 @@ def transport(self, perm):
5151
"""
5252
EXAMPLES::
5353
54-
sage: p = PermutationGroupElement((2,3))
54+
sage: p = PermutationGroupElement((2,3)) # optional - sage.groups
5555
sage: E = species.SetSpecies(); C = species.CycleSpecies()
5656
sage: L = E(C)
57-
sage: S = L.structures(['a','b','c']).list()
58-
sage: a = S[2]; a
57+
sage: S = L.structures(['a','b','c']).list() # optional - sage.libs.flint
58+
sage: a = S[2]; a # optional - sage.libs.flint
5959
F-structure: {{'a', 'c'}, {'b'}}; G-structures: (('a', 'c'), ('b'))
60-
sage: a.transport(p)
60+
sage: a.transport(p) # optional - sage.groups sage.libs.flint
6161
F-structure: {{'a', 'b'}, {'c'}}; G-structures: (('a', 'c'), ('b'))
6262
"""
6363
f, gs = self._list
@@ -83,10 +83,10 @@ def change_labels(self, labels):
8383
8484
sage: E = species.SetSpecies(); C = species.CycleSpecies()
8585
sage: L = E(C)
86-
sage: S = L.structures(['a','b','c']).list()
87-
sage: a = S[2]; a
86+
sage: S = L.structures(['a','b','c']).list() # optional - sage.libs.flint
87+
sage: a = S[2]; a # optional - sage.libs.flint
8888
F-structure: {{'a', 'c'}, {'b'}}; G-structures: (('a', 'c'), ('b'))
89-
sage: a.change_labels([1,2,3])
89+
sage: a.change_labels([1,2,3]) # optional - sage.libs.flint
9090
F-structure: {{1, 3}, {2}}; G-structures: [(1, 3), (2)]
9191
"""
9292
f, gs = self._list
@@ -116,7 +116,7 @@ def __init__(self, F, G, min=None, max=None, weight=None):
116116
sage: E = species.SetSpecies(); C = species.CycleSpecies()
117117
sage: L = E(C)
118118
sage: c = L.generating_series()[:3]
119-
sage: L._check() #False due to isomorphism types not being implemented
119+
sage: L._check() #False due to isomorphism types not being implemented # optional - sage.libs.flint
120120
False
121121
sage: L == loads(dumps(L))
122122
True
@@ -135,7 +135,7 @@ def _structures(self, structure_class, labels):
135135
136136
sage: E = species.SetSpecies(); C = species.CycleSpecies()
137137
sage: L = E(C)
138-
sage: L.structures(['a','b','c']).list()
138+
sage: L.structures(['a','b','c']).list() # optional - sage.libs.flint
139139
[F-structure: {{'a', 'b', 'c'}}; G-structures: (('a', 'b', 'c'),),
140140
F-structure: {{'a', 'b', 'c'}}; G-structures: (('a', 'c', 'b'),),
141141
F-structure: {{'a', 'c'}, {'b'}}; G-structures: (('a', 'c'), ('b')),
@@ -145,21 +145,21 @@ def _structures(self, structure_class, labels):
145145
146146
TESTS::
147147
148-
sage: a = _[2]
149-
sage: f, gs = a._list
150-
sage: f
148+
sage: a = _[2] # optional - sage.libs.flint
149+
sage: f, gs = a._list # optional - sage.libs.flint
150+
sage: f # optional - sage.libs.flint
151151
{{'a', 'c'}, {'b'}}
152-
sage: f.parent()
152+
sage: f.parent() # optional - sage.libs.flint
153153
Set species
154-
sage: f._list
154+
sage: f._list # optional - sage.libs.flint
155155
[1, 2]
156-
sage: f._labels
156+
sage: f._labels # optional - sage.libs.flint
157157
[{'a', 'c'}, {'b'}]
158-
sage: [g.parent() for g in gs]
158+
sage: [g.parent() for g in gs] # optional - sage.libs.flint
159159
[Cyclic permutation species, Cyclic permutation species]
160-
sage: [g._labels for g in gs]
160+
sage: [g._labels for g in gs] # optional - sage.libs.flint
161161
[['a', 'c'], ['b']]
162-
sage: [g._list for g in gs]
162+
sage: [g._list for g in gs] # optional - sage.libs.flint
163163
[[1, 2], [1]]
164164
"""
165165
from itertools import product
@@ -180,7 +180,7 @@ def _isotypes(self, structure_class, labels):
180180
181181
sage: E = species.SetSpecies(); C = species.CycleSpecies()
182182
sage: L = E(C)
183-
sage: L.isotypes(['a','b','c']).list()
183+
sage: L.isotypes(['a','b','c']).list() # optional - sage.modules
184184
Traceback (most recent call last):
185185
...
186186
NotImplementedError
@@ -204,7 +204,7 @@ def _itgs(self, series_ring, base_ring):
204204
205205
sage: E = species.SetSpecies(); C = species.CycleSpecies()
206206
sage: L = E(C)
207-
sage: L.isotype_generating_series()[:10]
207+
sage: L.isotype_generating_series()[:10] # optional - sage.modules
208208
[1, 1, 2, 3, 5, 7, 11, 15, 22, 30]
209209
"""
210210
cis = self.cycle_index_series(base_ring)
@@ -216,7 +216,7 @@ def _cis(self, series_ring, base_ring):
216216
217217
sage: E = species.SetSpecies(); C = species.CycleSpecies()
218218
sage: L = E(C)
219-
sage: L.cycle_index_series()[:5]
219+
sage: L.cycle_index_series()[:5] # optional - sage.modules
220220
[p[],
221221
p[1],
222222
p[1, 1] + p[2],
@@ -233,7 +233,7 @@ def _cis(self, series_ring, base_ring):
233233
sage: E = species.SetSpecies()
234234
sage: C = species.CycleSpecies(weight=t)
235235
sage: S = E(C)
236-
sage: S.isotype_generating_series()[:5] #indirect
236+
sage: S.isotype_generating_series()[:5] #indirect # optional - sage.modules
237237
[1, t, t^2 + t, t^3 + t^2 + t, t^4 + t^3 + 2*t^2 + t]
238238
239239
We do the same thing with set partitions weighted by the number of
@@ -245,7 +245,7 @@ def _cis(self, series_ring, base_ring):
245245
sage: E = species.SetSpecies()
246246
sage: E_t = species.SetSpecies(min=1,weight=t)
247247
sage: Par = E(E_t)
248-
sage: Par.isotype_generating_series()[:5]
248+
sage: Par.isotype_generating_series()[:5] # optional - sage.modules
249249
[1, t, t^2 + t, t^3 + t^2 + t, t^4 + t^3 + 2*t^2 + t]
250250
"""
251251
f_cis = self._F.cycle_index_series(base_ring)

src/sage/combinat/species/cycle_species.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def permutation_group_element(self):
5151
sage: F = species.CycleSpecies()
5252
sage: a = F.structures(["a", "b", "c"])[0]; a
5353
('a', 'b', 'c')
54-
sage: a.permutation_group_element()
54+
sage: a.permutation_group_element() # optional - sage.groups
5555
(1,2,3)
5656
"""
5757
from sage.groups.perm_gps.constructor import PermutationGroupElement
@@ -67,8 +67,8 @@ def transport(self, perm):
6767
sage: F = species.CycleSpecies()
6868
sage: a = F.structures(["a", "b", "c"])[0]; a
6969
('a', 'b', 'c')
70-
sage: p = PermutationGroupElement((1,2))
71-
sage: a.transport(p)
70+
sage: p = PermutationGroupElement((1,2)) # optional - sage.groups
71+
sage: a.transport(p) # optional - sage.groups
7272
('a', 'c', 'b')
7373
"""
7474
p = self.permutation_group_element()
@@ -88,12 +88,12 @@ def automorphism_group(self):
8888
sage: P = species.CycleSpecies()
8989
sage: a = P.structures([1, 2, 3, 4])[0]; a
9090
(1, 2, 3, 4)
91-
sage: a.automorphism_group()
91+
sage: a.automorphism_group() # optional - sage.groups
9292
Permutation Group with generators [(1,2,3,4)]
9393
9494
::
9595
96-
sage: [a.transport(perm) for perm in a.automorphism_group()]
96+
sage: [a.transport(perm) for perm in a.automorphism_group()] # optional - sage.groups
9797
[(1, 2, 3, 4), (1, 2, 3, 4), (1, 2, 3, 4), (1, 2, 3, 4)]
9898
"""
9999
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
@@ -255,8 +255,8 @@ def _cis_callable(self, base_ring, n):
255255
EXAMPLES::
256256
257257
sage: P = species.CycleSpecies()
258-
sage: cis = P.cycle_index_series()
259-
sage: cis[0:7]
258+
sage: cis = P.cycle_index_series() # optional - sage.modules
259+
sage: cis[0:7] # optional - sage.modules
260260
[0,
261261
p[1],
262262
1/2*p[1, 1] + 1/2*p[2],

src/sage/combinat/species/empty_species.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation):
3838
[0, 0, 0, 0]
3939
sage: X.isotype_generating_series()[0:4]
4040
[0, 0, 0, 0]
41-
sage: X.cycle_index_series()[0:4]
41+
sage: X.cycle_index_series()[0:4] # optional - sage.modules
4242
[0, 0, 0, 0]
4343
4444
The empty species is the zero of the semi-ring of species.
@@ -55,7 +55,7 @@ class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation):
5555
sage: (X.isotype_generating_series()[0:4] ==
5656
....: S.isotype_generating_series()[0:4])
5757
True
58-
sage: (X.cycle_index_series()[0:4] ==
58+
sage: (X.cycle_index_series()[0:4] == # optional - sage.modules
5959
....: S.cycle_index_series()[0:4])
6060
True
6161
@@ -69,7 +69,7 @@ class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation):
6969
[0, 0, 0, 0]
7070
sage: Y.isotype_generating_series()[0:4]
7171
[0, 0, 0, 0]
72-
sage: Y.cycle_index_series()[0:4]
72+
sage: Y.cycle_index_series()[0:4] # optional - sage.modules
7373
[0, 0, 0, 0]
7474
7575
TESTS::

src/sage/combinat/species/functorial_composition_species.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, F, G, min=None, max=None, weight=None):
3535
sage: WP = species.SubsetSpecies()
3636
sage: P2 = E2*E
3737
sage: G = WP.functorial_composition(P2)
38-
sage: G.isotype_generating_series()[0:5]
38+
sage: G.isotype_generating_series()[0:5] # optional - sage.modules
3939
[1, 1, 2, 4, 11]
4040
4141
sage: G = species.SimpleGraphSpecies()
@@ -81,7 +81,7 @@ def _isotypes(self, structure_class, s):
8181
EXAMPLES::
8282
8383
sage: G = species.SimpleGraphSpecies()
84-
sage: G.isotypes([1,2,3]).list()
84+
sage: G.isotypes([1,2,3]).list() # optional - sage.modules
8585
Traceback (most recent call last):
8686
...
8787
NotImplementedError
@@ -103,7 +103,7 @@ def _itgs(self, series_ring, base_ring):
103103
EXAMPLES::
104104
105105
sage: G = species.SimpleGraphSpecies()
106-
sage: G.isotype_generating_series()[0:5]
106+
sage: G.isotype_generating_series()[0:5] # optional - sage.modules
107107
[1, 1, 2, 4, 11]
108108
"""
109109
return self.cycle_index_series(base_ring).isotype_generating_series()
@@ -113,7 +113,7 @@ def _cis(self, series_ring, base_ring):
113113
EXAMPLES::
114114
115115
sage: G = species.SimpleGraphSpecies()
116-
sage: G.cycle_index_series()[0:5]
116+
sage: G.cycle_index_series()[0:5] # optional - sage.modules
117117
[p[],
118118
p[1],
119119
p[1, 1] + p[2],

src/sage/combinat/species/linear_order_species.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def transport(self, perm):
4343
sage: F = species.LinearOrderSpecies()
4444
sage: a = F.structures(["a", "b", "c"])[0]; a
4545
['a', 'b', 'c']
46-
sage: p = PermutationGroupElement((1,2))
46+
sage: p = PermutationGroupElement((1,2)) # optional - sage.groups
4747
sage: a.transport(p)
4848
['b', 'a', 'c']
4949
"""
@@ -60,7 +60,7 @@ def automorphism_group(self):
6060
sage: F = species.LinearOrderSpecies()
6161
sage: a = F.structures(["a", "b", "c"])[0]; a
6262
['a', 'b', 'c']
63-
sage: a.automorphism_group()
63+
sage: a.automorphism_group() # optional - sage.groups
6464
Symmetric group of order 1! as a permutation group
6565
"""
6666
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
@@ -155,7 +155,7 @@ def _cis_callable(self, base_ring, n):
155155
EXAMPLES::
156156
157157
sage: L = species.LinearOrderSpecies()
158-
sage: g = L.cycle_index_series()
158+
sage: g = L.cycle_index_series() # optional - sage.modules
159159
sage: g[0:5]
160160
[p[], p[1], p[1, 1], p[1, 1, 1], p[1, 1, 1, 1]]
161161
"""

src/sage/combinat/species/partition_species.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _cis(self, series_ring, base_ring):
272272
EXAMPLES::
273273
274274
sage: P = species.PartitionSpecies()
275-
sage: g = P.cycle_index_series()
275+
sage: g = P.cycle_index_series() # optional - sage.modules
276276
sage: g[0:5]
277277
[p[],
278278
p[1],

src/sage/combinat/species/product_species.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def __init__(self, F, G, min=None, max=None, weight=None):
215215
Product of (Permutation species) and (Permutation species)
216216
sage: F == loads(dumps(F))
217217
True
218-
sage: F._check()
218+
sage: F._check() # optional - sage.libs.flint
219219
True
220220
221221
TESTS::
@@ -340,7 +340,7 @@ def _itgs(self, series_ring, base_ring):
340340
341341
sage: P = species.PermutationSpecies()
342342
sage: F = P * P
343-
sage: F.isotype_generating_series()[0:5]
343+
sage: F.isotype_generating_series()[0:5] # optional - sage.libs.flint
344344
[1, 2, 5, 10, 20]
345345
"""
346346
res = (self.left_factor().isotype_generating_series(base_ring) *

0 commit comments

Comments
 (0)