Skip to content

Commutator subgroup of permutation group ignores the domain #39416

@DaveWitteMorris

Description

@DaveWitteMorris

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions