Skip to content

Commit

Permalink
Merge PR #711: Fix rankings for Socle and MinimalNormalSubgroups
Browse files Browse the repository at this point in the history
Fixed the rankings of Socle and MinimalNormalSubgroups methods for
nilpotent groups.

Some old methods for Socle or for MinimalNormalSubgroups were called for
arbitrary groups, but they seem to only work for finite groups, and thus
their filters have been changed. Further, for two methods we now force
an IsNilpotent check, because for such groups the nilpotent method seems
to be much more faster.

Added some new tests. All tests run without packages, as well.
Interestingly, they are much faster without packages. The reason is that
CRISP is rather aggressively checks for solvability and finiteness (in
fact, there is a `CRISP_RedispatchOnCondition` command, which seems to
redispatch even if there were other applicable methods with lower ranks.
And solvable methods are slower than nilpotent methods, thus the speed
difference.

Note that there are no explicit methods for solvable groups without
CRISP, thus we never force an `IsSolvableGroup` check in the low ranked
methods.
  • Loading branch information
fingolfin committed Nov 9, 2016
2 parents 312ab24 + 3602058 commit 54ae310
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
15 changes: 14 additions & 1 deletion lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 );
Expand All @@ -4713,6 +4722,10 @@ InstallMethod( MinimalNormalSubgroups,
return nt;
end );

RedispatchOnCondition(MinimalNormalSubgroups, true,
[IsGroup],
[IsFinite], 0);


#############################################################################
##
Expand Down
13 changes: 11 additions & 2 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2238,11 +2238,20 @@ InstallMethod(NormalSubgroups,"homomorphism principle perm groups",true,
##
#M Socle(<G>)
##
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
Expand Down
7 changes: 7 additions & 0 deletions tst/testinstall/opers/MinimalNormalSubgroups.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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);;
Expand All @@ -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 ] ]
Expand Down
11 changes: 10 additions & 1 deletion tst/testinstall/opers/Socle.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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);;
Expand All @@ -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);

0 comments on commit 54ae310

Please sign in to comment.