-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Labels
Description
Steps To Reproduce
As pointed out in this sage-devel thread, if a permutation group has a nonstandard domain, then the commutator method can return an incorrect result:
sage: G = PermutationGroup(gens=[(1,2), (2,4)], domain={1, 2, 4})
sage: G.commutator()
Permutation Group with generators [(1,2,3)]
Expected Behavior
The commutator subgroup should be generated by the cycle (1,2,4)
.
Actual Behavior
Sagemath reports that the commutator subgroup is generated by the cycle (1,2,3)
, which is not even in the group, because 3 is not in the domain.
Additional Information
I think the problem is that the commutator
method ignores the domain. Line 3348 of src/sage/groups/perm_gps/permgroup.py
is
return PermutationGroup(gap_group=libgap.DerivedSubgroup(self))
but I think it should be
return PermutationGroup(gap_group=libgap.DerivedSubgroup(self), domain=self.domain())
Environment
any
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide