Skip to content

Commit

Permalink
sagemathgh-37038: Add minimal_normal_subgroups and maximal_normal_sub…
Browse files Browse the repository at this point in the history
…groups functions for permutation groups

    
- Added the function
This patch implements a minimal_normal_subgroups function in
PermutationGroup_generic class.
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
NA
    
URL: sagemath#37038
Reported by: Ruchit Jagodara
Reviewer(s): Ruchit Jagodara, Travis Scrimshaw
  • Loading branch information
Release Manager committed Jan 16, 2024
2 parents a3a5611 + fa26be9 commit c78acc3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/sage/groups/libgap_wrapper.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,39 @@ class ParentLibGAP(SageObject):
"""
return self._libgap._repr_()

def minimal_normal_subgroups(self):
"""
Return the nontrivial minimal normal subgroups ``self``.
EXAMPLES::
sage: SL(2,GF(49)).minimal_normal_subgroups()
[Subgroup with 1 generators (
[6 0]
[0 6]
) of Special Linear Group of degree 2 over Finite Field in z2 of size 7^2]
"""
return [self._subgroup_constructor(gap_subgroup)
for gap_subgroup in self._libgap.MinimalNormalSubgroups()]

def maximal_normal_subgroups(self):
"""
Return the maximal proper normal subgroups of ``self``.
This raises an error if `G/[G, G]` is infinite, yielding infinitely
many maximal normal subgroups.
EXAMPLES::
sage: SL(2,GF(49)).minimal_normal_subgroups()
[Subgroup with 1 generators (
[6 0]
[0 6]
) of Special Linear Group of degree 2 over Finite Field in z2 of size 7^2]
"""
return [self._subgroup_constructor(gap_subgroup)
for gap_subgroup in self._libgap.MaximalNormalSubgroups()]

@cached_method
def gens(self):
"""
Expand Down
31 changes: 31 additions & 0 deletions src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4116,6 +4116,37 @@ def isomorphism_type_info_simple_group(self):
else:
raise TypeError("group must be simple")

def minimal_normal_subgroups(self):
"""
Return the nontrivial minimal normal subgroups ``self``.
EXAMPLES::
sage: G = PermutationGroup([(1,2,3),(4,5)])
sage: G.minimal_normal_subgroups()
[Subgroup generated by [(4,5)] of (Permutation Group with generators [(4,5), (1,2,3)]),
Subgroup generated by [(1,2,3)] of (Permutation Group with generators [(4,5), (1,2,3)])]
"""
return [self.subgroup(gap_group=gap_subgroup)
for gap_subgroup in self._libgap_().MinimalNormalSubgroups()]

def maximal_normal_subgroups(self):
"""
Return the maximal proper normal subgroups of ``self``.
This raises an error if `G/[G, G]` is infinite, yielding infinitely
many maximal normal subgroups.
EXAMPLES::
sage: G = PermutationGroup([(1,2,3),(4,5)])
sage: G.maximal_normal_subgroups()
[Subgroup generated by [(1,2,3)] of (Permutation Group with generators [(4,5), (1,2,3)]),
Subgroup generated by [(4,5)] of (Permutation Group with generators [(4,5), (1,2,3)])]
"""
return [self.subgroup(gap_group=gap_subgroup)
for gap_subgroup in self._libgap_().MaximalNormalSubgroups()]

###################### Boolean tests #####################

def is_abelian(self):
Expand Down

0 comments on commit c78acc3

Please sign in to comment.