Skip to content

Commit 2d2b52f

Browse files
author
Release Manager
committed
gh-40441: src/sage/groups/perm_gps/permgroup.py: bullet-proof a test There's a test in this file that finds a random subgroup of `SymmetricGroup(6)` with three generators, round-trips it through a finite presentation, and then checks the result for isomorphism with itself. If you are unlucky, however, GAP will get confused, and raise a `GAPError` during the round trip. This was originally reported in #32141, and a workaround was added at some point. The workaround is a bit ugly though, and it does not make a lot of sense to test something that in fact does not work. I have tried all 2024 of them, and the same problem does not arise with subgroups of `SymmetricGroup(4)`, so this commit reverts the workaround and then changes the 6 to a 4. (Five has the same problem that six does.) Closes: #32141 URL: #40441 Reported by: Michael Orlitzky Reviewer(s):
2 parents 3c7f6ba + 132e7e0 commit 2d2b52f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/sage/groups/perm_gps/permgroup.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3131,15 +3131,11 @@ def as_finitely_presented_group(self, reduced=False):
31313131
31323132
sage: PermutationGroup([]).as_finitely_presented_group()
31333133
Finitely presented group < a | a >
3134-
sage: S = SymmetricGroup(6)
3134+
sage: S = SymmetricGroup(4)
31353135
sage: perm_ls = [S.random_element() for i in range(3)]
31363136
sage: G = PermutationGroup(perm_ls)
3137-
sage: while True:
3138-
....: try:
3139-
....: assert G.as_finitely_presented_group().as_permutation_group().is_isomorphic(G) # sometimes results in GAP error (see :issue:`32141`)
3140-
....: break
3141-
....: except ValueError:
3142-
....: pass
3137+
sage: G.as_finitely_presented_group().as_permutation_group().is_isomorphic(G)
3138+
True
31433139
31443140
`D_9` is the only non-Abelian group of order 18
31453141
with an automorphism group of order 54 [TW1980]_::

0 commit comments

Comments
 (0)