diff --git a/doc/ref/groups.xml b/doc/ref/groups.xml index b90516e4d3..003c6706b0 100644 --- a/doc/ref/groups.xml +++ b/doc/ref/groups.xml @@ -449,8 +449,9 @@ the series without destroying the properties of the series. <#Include Label="IsConjugacyClassSubgroupsRep"> <#Include Label="ConjugacyClassesSubgroups"> <#Include Label="ConjugacyClassesMaximalSubgroups"> -<#Include Label="AllSubgroups"> <#Include Label="MaximalSubgroupClassReps"> +<#Include Label="LowIndexSubgroups"> +<#Include Label="AllSubgroups"> <#Include Label="MaximalSubgroups"> <#Include Label="NormalSubgroups"> <#Include Label="MaximalNormalSubgroups"> diff --git a/lib/grp.gd b/lib/grp.gd index 89c36764e0..56464b809d 100644 --- a/lib/grp.gd +++ b/lib/grp.gd @@ -4486,12 +4486,12 @@ DeclareGlobalFunction("GroupEnumeratorByClosure"); ## ## <#GAPDoc Label="LowIndexSubgroups"> ## -## ## +## ## ## -## These operations computes representatives of the conjugacy classes of +## The operation LowIndexSubgroups computes representatives of the +## conjugacy classes of ## subgroups of the group G that ## index less than or equal to ## index. @@ -4500,6 +4500,11 @@ DeclareGlobalFunction("GroupEnumeratorByClosure"); ## LowIndexSubgroupsFpGroup. In other cases, it uses repeated ## calculation of maximal subgroups. ##

+##

+## The operation LowLayerSubgroups works similar but does not bound +## the index, but instead considers up to layer-th maximal +## subgroups. +##

## g:=TransitiveGroup(18,950);; ## gap> l:=LowIndexSubgroups(g,20);;Collected(List(l,x->Index(g,x))); diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 5cab99c7c2..0012a27ac5 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -3055,6 +3055,23 @@ local recog,m,len; return m; end); +InstallMethod(LowIndexSubgroups,"finite groups, using iterated maximals", + true,[IsGroup and IsFinite,IsPosInt],0, +function(G,n) +local m,all,m2; + m:=[G]; + all:=[G]; + while Length(m)>0 do + m2:=Concatenation(List(m,MaximalSubgroupClassReps)); + m2:=Unique(Filtered(m2,x->Index(G,x)<=n)); + m2:=List(SubgroupsOrbitsAndNormalizers(G,m2,false),x->x.representative); + m2:=Filtered(m2,x->ForAll(all,y->RepresentativeAction(G,x,y)=fail)); + Append(all,m2); + m:=Filtered(m2,x->Index(G,x)<=n/2); # otherwise subgroups will have too large index + od; + return all; +end); + ############################################################################# ## #F LowLayerSubgroups( [,] , [, [,]] )