Skip to content

Commit 7cdec9b

Browse files
author
Matthias Koeppe
committed
./sage -fixdoctests --distribution sagemath-categories --only-tags src/sage/combinat
1 parent 7f20558 commit 7cdec9b

17 files changed

+197
-197
lines changed

src/sage/combinat/species/characteristic_species.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def transport(self, perm):
6767
sage: F = species.CharacteristicSpecies(3)
6868
sage: a = F.structures(["a", "b", "c"]).random_element(); a
6969
{'a', 'b', 'c'}
70-
sage: p = PermutationGroupElement((1,2)) # optional - sage.groups
71-
sage: a.transport(p) # optional - sage.groups
70+
sage: p = PermutationGroupElement((1,2)) # needs sage.groups
71+
sage: a.transport(p) # needs sage.groups
7272
{'a', 'b', 'c'}
7373
"""
7474
return self
@@ -84,7 +84,7 @@ def automorphism_group(self):
8484
sage: F = species.CharacteristicSpecies(3)
8585
sage: a = F.structures(["a", "b", "c"]).random_element(); a
8686
{'a', 'b', 'c'}
87-
sage: a.automorphism_group() # optional - sage.groups
87+
sage: a.automorphism_group() # needs sage.groups
8888
Symmetric group of order 3! as a permutation group
8989
"""
9090
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
@@ -110,7 +110,7 @@ def __init__(self, n, min=None, max=None, weight=None):
110110
[0, 1, 0, 0]
111111
sage: X.isotype_generating_series()[0:4]
112112
[0, 1, 0, 0]
113-
sage: X.cycle_index_series()[0:4] # optional - sage.modules
113+
sage: X.cycle_index_series()[0:4] # needs sage.modules
114114
[0, p[1], 0, 0]
115115
116116
sage: F = species.CharacteristicSpecies(3)
@@ -203,8 +203,8 @@ def _cis_term(self, base_ring):
203203
EXAMPLES::
204204
205205
sage: F = species.CharacteristicSpecies(2)
206-
sage: g = F.cycle_index_series() # optional - sage.modules
207-
sage: g[0:5] # optional - sage.modules
206+
sage: g = F.cycle_index_series() # needs sage.modules
207+
sage: g[0:5] # needs sage.modules
208208
[0, 0, 1/2*p[1, 1] + 1/2*p[2], 0, 0]
209209
"""
210210
cis = SetSpecies(weight=self._weight).cycle_index_series(base_ring)
@@ -251,7 +251,7 @@ def __init__(self, min=None, max=None, weight=None):
251251
[1, 0, 0, 0]
252252
sage: X.isotype_generating_series()[0:4]
253253
[1, 0, 0, 0]
254-
sage: X.cycle_index_series()[0:4] # optional - sage.modules
254+
sage: X.cycle_index_series()[0:4] # needs sage.modules
255255
[p[], 0, 0, 0]
256256
257257
TESTS::
@@ -295,7 +295,7 @@ def __init__(self, min=None, max=None, weight=None):
295295
[0, 1, 0, 0]
296296
sage: X.isotype_generating_series()[0:4]
297297
[0, 1, 0, 0]
298-
sage: X.cycle_index_series()[0:4] # optional - sage.modules
298+
sage: X.cycle_index_series()[0:4] # needs sage.modules
299299
[0, p[1], 0, 0]
300300
301301
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() # optional - sage.libs.flint
32-
sage: a == loads(dumps(a)) # optional - sage.libs.flint
31+
sage: a = L.structures(['a','b','c']).random_element() # needs sage.libs.flint
32+
sage: a == loads(dumps(a)) # needs 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] # optional - sage.libs.flint
44+
sage: L.structures(['a','b','c'])[0] # needs 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)) # optional - sage.groups
54+
sage: p = PermutationGroupElement((2,3)) # needs sage.groups
5555
sage: E = species.SetSpecies(); C = species.CycleSpecies()
5656
sage: L = E(C)
57-
sage: S = L.structures(['a','b','c']).list() # optional - sage.libs.flint
58-
sage: a = S[2]; a # optional - sage.libs.flint
57+
sage: S = L.structures(['a','b','c']).list() # needs sage.libs.flint
58+
sage: a = S[2]; a # needs sage.libs.flint
5959
F-structure: {{'a', 'c'}, {'b'}}; G-structures: (('a', 'c'), ('b'))
60-
sage: a.transport(p) # optional - sage.groups sage.libs.flint
60+
sage: a.transport(p) # needs 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() # optional - sage.libs.flint
87-
sage: a = S[2]; a # optional - sage.libs.flint
86+
sage: S = L.structures(['a','b','c']).list() # needs sage.libs.flint
87+
sage: a = S[2]; a # needs sage.libs.flint
8888
F-structure: {{'a', 'c'}, {'b'}}; G-structures: (('a', 'c'), ('b'))
89-
sage: a.change_labels([1,2,3]) # optional - sage.libs.flint
89+
sage: a.change_labels([1,2,3]) # needs 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 # optional - sage.libs.flint
119+
sage: L._check() #False due to isomorphism types not being implemented # needs 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() # optional - sage.libs.flint
138+
sage: L.structures(['a','b','c']).list() # needs 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] # optional - sage.libs.flint
149-
sage: f, gs = a._list # optional - sage.libs.flint
150-
sage: f # optional - sage.libs.flint
148+
sage: a = _[2] # needs sage.libs.flint
149+
sage: f, gs = a._list # needs sage.libs.flint
150+
sage: f # needs sage.libs.flint
151151
{{'a', 'c'}, {'b'}}
152-
sage: f.parent() # optional - sage.libs.flint
152+
sage: f.parent() # needs sage.libs.flint
153153
Set species
154-
sage: f._list # optional - sage.libs.flint
154+
sage: f._list # needs sage.libs.flint
155155
[1, 2]
156-
sage: f._labels # optional - sage.libs.flint
156+
sage: f._labels # needs sage.libs.flint
157157
[{'a', 'c'}, {'b'}]
158-
sage: [g.parent() for g in gs] # optional - sage.libs.flint
158+
sage: [g.parent() for g in gs] # needs sage.libs.flint
159159
[Cyclic permutation species, Cyclic permutation species]
160-
sage: [g._labels for g in gs] # optional - sage.libs.flint
160+
sage: [g._labels for g in gs] # needs sage.libs.flint
161161
[['a', 'c'], ['b']]
162-
sage: [g._list for g in gs] # optional - sage.libs.flint
162+
sage: [g._list for g in gs] # needs 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() # optional - sage.modules
183+
sage: L.isotypes(['a','b','c']).list() # needs 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] # optional - sage.modules
207+
sage: L.isotype_generating_series()[:10] # needs 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] # optional - sage.modules
219+
sage: L.cycle_index_series()[:5] # needs 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 # optional - sage.modules
236+
sage: S.isotype_generating_series()[:5] #indirect # needs 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] # optional - sage.modules
248+
sage: Par.isotype_generating_series()[:5] # needs 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() # optional - sage.groups
54+
sage: a.permutation_group_element() # needs 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)) # optional - sage.groups
71-
sage: a.transport(p) # optional - sage.groups
70+
sage: p = PermutationGroupElement((1,2)) # needs sage.groups
71+
sage: a.transport(p) # needs 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() # optional - sage.groups
91+
sage: a.automorphism_group() # needs 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()] # optional - sage.groups
96+
sage: [a.transport(perm) for perm in a.automorphism_group()] # needs 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() # optional - sage.modules
259-
sage: cis[0:7] # optional - sage.modules
258+
sage: cis = P.cycle_index_series() # needs sage.modules
259+
sage: cis[0:7] # needs 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] # optional - sage.modules
41+
sage: X.cycle_index_series()[0:4] # needs 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] == # optional - sage.modules
58+
sage: (X.cycle_index_series()[0:4] == # needs 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] # optional - sage.modules
72+
sage: Y.cycle_index_series()[0:4] # needs sage.modules
7373
[0, 0, 0, 0]
7474
7575
TESTS::

src/sage/combinat/species/functorial_composition_species.py

Lines changed: 5 additions & 5 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] # optional - sage.modules
38+
sage: G.isotype_generating_series()[0:5] # needs sage.modules
3939
[1, 1, 2, 4, 11]
4040
4141
sage: G = species.SimpleGraphSpecies()
@@ -44,7 +44,7 @@ def __init__(self, F, G, min=None, max=None, weight=None):
4444
<class 'sage.combinat.species.functorial_composition_species.FunctorialCompositionSpecies'>
4545
sage: G == loads(dumps(G))
4646
True
47-
sage: G._check() # False due to isomorphism types not being implemented # optional - sage.modules
47+
sage: G._check() # False due to isomorphism types not being implemented # needs sage.modules
4848
False
4949
"""
5050
self._F = F
@@ -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() # optional - sage.modules
84+
sage: G.isotypes([1,2,3]).list() # needs 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] # optional - sage.modules
106+
sage: G.isotype_generating_series()[0:5] # needs 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] # optional - sage.modules
116+
sage: G.cycle_index_series()[0:5] # needs sage.modules
117117
[p[],
118118
p[1],
119119
p[1, 1] + p[2],

0 commit comments

Comments
 (0)