diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index edcd50dfa4f..d2305a655b4 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -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): """ diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index 4de29a5c8e0..208758282b2 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -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):