diff --git a/lib/grp.gi b/lib/grp.gi index 1b42683d07..3504bb56eb 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -1816,7 +1816,8 @@ InstallMethod( Socle, "for elementary abelian groups", ## InstallMethod( Socle, "for nilpotent groups", [ IsGroup and IsNilpotentGroup ], - SUM_FLAGS, + RankFilter( IsGroup and IsFinite and IsNilpotentGroup ) + - RankFilter( IsGroup and IsNilpotentGroup ), function(G) local P, C, size, gen, abinv, indgen, i, p, q, soc; @@ -4699,6 +4700,14 @@ InstallMethod( MinimalNormalSubgroups, function( G ) local nt, c, r, U; + # force an IsNilpotent check + # should have and IsSolvable check, as well, + # but methods for solvable groups are only in CRISP + # which aggeressively checks for solvability, anyway + if (not HasIsNilpotentGroup(G) and IsNilpotentGroup(G)) then + return MinimalNormalSubgroups( G ); + fi; + nt:= []; for c in ConjugacyClasses( G ) do r:= Representative( c ); @@ -4713,6 +4722,10 @@ InstallMethod( MinimalNormalSubgroups, return nt; end ); +RedispatchOnCondition(MinimalNormalSubgroups, true, + [IsGroup], + [IsFinite], 0); + ############################################################################# ## diff --git a/lib/grplatt.gi b/lib/grplatt.gi index c16c48eedf..537a4c24c6 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -2238,11 +2238,20 @@ InstallMethod(NormalSubgroups,"homomorphism principle perm groups",true, ## #M Socle() ## -InstallMethod(Socle,"from normal subgroups",true,[IsGroup],0, +InstallMethod(Socle,"from normal subgroups",true,[IsGroup and IsFinite],0, function(G) local n,i,s; if Size(G)=1 then return G;fi; - # deal with lareg EA socle factor for fitting free + + # force an IsNilpotent check + # should have and IsSolvable check, as well, + # but methods for solvable groups are only in CRISP + # which aggeressively checks for solvability, anyway + if (not HasIsNilpotentGroup(G) and IsNilpotentGroup(G)) then + return Socle(G); + fi; + + # deal with large EA socle factor for fitting free # this could be a bit shorter. if Size(RadicalGroup(G))=1 then diff --git a/tst/testinstall/opers/MinimalNormalSubgroups.tst b/tst/testinstall/opers/MinimalNormalSubgroups.tst index a0abafb910..74dbea479b 100644 --- a/tst/testinstall/opers/MinimalNormalSubgroups.tst +++ b/tst/testinstall/opers/MinimalNormalSubgroups.tst @@ -43,6 +43,9 @@ true gap> k := 5;; P := SylowSubgroup(SymmetricGroup(4*k), 2);; A := Group((4*k+1, 4*k+2, 4*k+3));; G := ClosureGroup(P, A);; IsNilpotentGroup(G);; gap> Set(MinimalNormalSubgroups(G)) = Set([ Group([ (1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16) ]), Group([ (17,18)(19,20) ]), Group([ (1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16)(17,18)(19,20) ]), Group([ (21,22,23) ]) ]); true +gap> G := SmallGroup(24,12);; +gap> SortedList(List(MinimalNormalSubgroups(G), IdGroup)); +[ [ 4, 2 ] ] gap> A := DihedralGroup(16);; gap> B := SmallGroup(27, 3);; gap> C := SmallGroup(125, 4);; @@ -62,6 +65,10 @@ gap> x := F.1;; y := F.2;; z := F.3;; gap> G := F/[x^(-1)*y^(-1)*x*y, x^(-1)*z^(-1)*x*z, z^(-1)*y^(-1)*z*y, (x*y)^180, (x*y^5)^168];; IsAbelian(G);; gap> Size(MinimalNormalSubgroups(G)); 9 +gap> G := F/[x^2, y^2, x^(-1)*y^(-1)*x*y, z];; +gap> IsFinite(G);; +gap> Size(MinimalNormalSubgroups(G)); +3 gap> for G in AllGroups(60) do NormalSubgroups(G);; Print(Collected(List(Set(MinimalNormalSubgroups(G)), IdGroup)), "\n"); od; [ [ [ 2, 1 ], 1 ], [ [ 3, 1 ], 1 ], [ [ 5, 1 ], 1 ] ] [ [ [ 2, 1 ], 1 ], [ [ 3, 1 ], 1 ], [ [ 5, 1 ], 1 ] ] diff --git a/tst/testinstall/opers/Socle.tst b/tst/testinstall/opers/Socle.tst index 6a5dbdd45e..5c4a2e8868 100644 --- a/tst/testinstall/opers/Socle.tst +++ b/tst/testinstall/opers/Socle.tst @@ -57,9 +57,14 @@ true gap> Socle(PrimitiveGroup(8,3)) = Group([ (1,7)(2,8)(3,5)(4,6), (1,3)(2,4)(5,7)(6,8), (1,2)(3,4)(5,6)(7,8) ]); true gap> k := 5;; P := SylowSubgroup(SymmetricGroup(4*k), 2);; A := Group((4*k+1, 4*k+2, 4*k+3));; G := ClosureGroup(P, A);; -gap> IsNilpotentGroup(G);; gap> Socle(G) = Group([ (21,22,23), (1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16), (17,18)(19,20) ]); true +gap> G := Group([ (1,2,3,5,4), (1,3)(2,4)(6,7) ]);; +gap> Socle(G) = Group((1,2,3),(3,4,5),(6,7)); +true +gap> G := SmallGroup(24,12);; +gap> IdGroup(Socle(G)); +[ 4, 2 ] gap> A := DihedralGroup(16);; gap> B := SmallGroup(27, 3);; gap> C := SmallGroup(125, 4);; @@ -80,4 +85,8 @@ gap> G := F/[x^(-1)*y^(-1)*x*y, x^(-1)*z^(-1)*x*z, z^(-1)*y^(-1)*z*y, (x*y)^180, gap> IsAbelian(G);; gap> Size(Socle(G)); 1260 +gap> G := F/[x^2, y^2, x^(-1)*y^(-1)*x*y, z];; +gap> IsFinite(G);; +gap> Size(Socle(G)); +4 gap> STOP_TEST("Socle.tst", 10000);