Skip to content

Commit 4092ca9

Browse files
mantepsedimpase
authored andcommitted
allow non-canonicalized generators
1 parent aa0ba80 commit 4092ca9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/sage/groups/perm_gps/permgroup.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ def is_trivial(self):
13711371
13721372
A permutation group is trivial, if it consists only of the
13731373
identity element, that is, if it has no generators or only
1374-
the trivial generator.
1374+
trivial generators.
13751375
13761376
EXAMPLES::
13771377
@@ -1387,9 +1387,16 @@ def is_trivial(self):
13871387
sage: DihedralGroup(1).is_trivial()
13881388
False
13891389
1390+
TESTS::
1391+
1392+
sage: G = PermutationGroup([[], []], canonicalize=False)
1393+
sage: G.ngens()
1394+
2
1395+
sage: G.is_trivial()
1396+
True
13901397
"""
1391-
return not self._gens or (len(self._gens) == 1 and self._gens[0].is_one())
1392-
1398+
return all(g.is_one() for g in self._gens)
1399+
13931400
@cached_method
13941401
def one(self):
13951402
"""

0 commit comments

Comments
 (0)