Skip to content

Commit 8f05564

Browse files
author
Release Manager
committed
gh-39624: Fix Commutator subgroup of permutation group Fixes #39416 as mentioned [here](https://github.com/sagemath/sage/issues /39416#issuecomment-2689882838) ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies URL: #39624 Reported by: Aditya Khambete Reviewer(s): Aditya Khambete, Frédéric Chapoton
2 parents 57b3142 + e0d4916 commit 8f05564

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sage/groups/perm_gps/permgroup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,9 +3304,17 @@ def commutator(self, other=None):
33043304
Traceback (most recent call last):
33053305
...
33063306
TypeError: junk is not a permutation group
3307+
3308+
TESTS:
3309+
3310+
Verify that :issue`39416` is fixed::
3311+
3312+
sage: G = PermutationGroup(gens=[(1,2), (2,4)], domain={1, 2, 4})
3313+
sage: G.commutator()
3314+
Permutation Group with generators [(1,2,4)]
33073315
"""
33083316
if other is None:
3309-
return PermutationGroup(gap_group=libgap.DerivedSubgroup(self))
3317+
return PermutationGroup(gap_group=libgap.DerivedSubgroup(self), domain=self.domain())
33103318
else:
33113319
from sage.categories.finite_permutation_groups import FinitePermutationGroups
33123320
if other not in FinitePermutationGroups():

0 commit comments

Comments
 (0)