@@ -79,13 +79,15 @@ class IntegerVectorsModPermutationGroup(UniqueRepresentation):
79
79
80
80
OUTPUT:
81
81
82
- - If ``sum`` and ``max_part`` are None, it returns the infinite enumerated
83
- set of all integer vectors (list of integers) maximal in their orbit for
84
- the lexicographic order.
82
+ - If ``sum`` and ``max_part`` are None, it returns the infinite
83
+ enumerated set of all integer vectors (lists of integers) maximal
84
+ in their orbit for the lexicographic order. Exceptionally, if
85
+ the domain of ``G`` is empty, the result is a finite enumerated
86
+ set that contains one element, namely the empty vector.
85
87
86
- - If ``sum`` is an integer, it returns a finite enumerated set containing
87
- all integer vectors maximal in their orbit for the lexicographic order
88
- and whose entries sum to ``sum``.
88
+ - If ``sum`` is an integer, it returns a finite enumerated set
89
+ containing all integer vectors maximal in their orbit for the
90
+ lexicographic order and whose entries sum to ``sum``.
89
91
90
92
EXAMPLES:
91
93
@@ -164,6 +166,15 @@ class IntegerVectorsModPermutationGroup(UniqueRepresentation):
164
166
sage: I.orbit([2,2,2])
165
167
{[2, 2, 2]}
166
168
169
+ Even without constraints, for an empty domain the result is
170
+ a singleton set::
171
+
172
+ sage: G = PermutationGroup([], domain=[])
173
+ sage: sgs = tuple(tuple(s) for s in G.strong_generating_system())
174
+ sage: list(IntegerVectorsModPermutationGroup(G, sgs=sgs))
175
+ [[]]
176
+
177
+
167
178
TESTS:
168
179
169
180
Let us check that canonical integer vectors of the symmetric group
@@ -196,15 +207,16 @@ class IntegerVectorsModPermutationGroup(UniqueRepresentation):
196
207
18
197
208
23
198
209
199
- We present a last corner case: trivial groups. For the trivial
200
- group ``G`` acting on a list of length `n`, all integer vectors of
201
- length `n` are canonical::
210
+ Another corner case is trivial groups. For the trivial group ``G``
211
+ acting on a list of length `n`, all integer vectors of length `n`
212
+ are canonical::
202
213
203
214
sage: # long time
204
215
sage: G = PermutationGroup([[(6,)]])
205
216
sage: G.cardinality()
206
217
1
207
- sage: I = IntegerVectorsModPermutationGroup(G)
218
+ sage: sgs = tuple(tuple(s) for s in G.strong_generating_system())
219
+ sage: I = IntegerVectorsModPermutationGroup(G, sgs=sgs)
208
220
sage: for i in range(10):
209
221
....: d1 = I.subset(i).cardinality()
210
222
....: d2 = IntegerVectors(i,6).cardinality()
@@ -220,6 +232,7 @@ class IntegerVectorsModPermutationGroup(UniqueRepresentation):
220
232
792
221
233
1287
222
234
2002
235
+
223
236
"""
224
237
@staticmethod
225
238
def __classcall__ (cls , G , sum = None , max_part = None , sgs = None ):
0 commit comments