Skip to content

Commit

Permalink
Fix IsNormal, uprank FittingSubgroup method(#61)
Browse files Browse the repository at this point in the history
Our IsNormal method was buggy (it incorrectly used `Pcp(H,U)`. After fixing this it is mostly equivalent to GAP's default method; so we remove ours and use the default.

This in turn revealed that our `FittingSubgroup` method may not be invoked for finite pcp groups, depending on which packages are loaded. Fix that by increasing its rank.
  • Loading branch information
stertooy authored May 15, 2021
1 parent f3bdcbd commit 3f385e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
16 changes: 0 additions & 16 deletions gap/basic/pcpgrps.gi
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,6 @@ function( H, U )
return ForAll( GeneratorsOfGroup(U), x -> x in H );
end );

#############################################################################
##
#M IsNormal( H, U ) . . . . . . . . . . . . . . .test if U is normalized by H
##
InstallMethod( IsNormalOp, "for pcp groups",
IsIdenticalObj, [ IsPcpGroup, IsPcpGroup ],
function( H, U )
local u, h;
for h in GeneratorsOfPcp( Pcp(H, U)) do
for u in Igs(U) do
if not u^h in U then return false; fi;
od;
od;
return true;
end );

#############################################################################
##
#M Size( <pcpgrp> )
Expand Down
2 changes: 1 addition & 1 deletion gap/pcpgrp/fitting.gi
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ end );
##
InstallMethod( FittingSubgroup,
"for pcp groups", [IsPcpGroup],
SUM_FLAGS, # Prevent generic GAP library method for finite groups being ranked higher
function( G )
local efas, pcps, l, F, i;

Expand Down Expand Up @@ -253,4 +254,3 @@ InstallGlobalFunction( NilpotentByAbelianByFiniteSeries, function( G )
if IndexNC( G, A ) = infinity then Error("wrong subgroup"); fi;
return [G, A, F, U];
end );

15 changes: 15 additions & 0 deletions tst/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -497,5 +497,20 @@ true
gap> Random( TrivialGroup( IsPcpGroup ) );
id

#
# Fix a bug in IsNormal
# <https://github.com/gap-packages/polycyclic/issues/46>
#
gap> g := PcGroupToPcpGroup(SmallGroup(48,1));
Pcp-group with orders [ 2, 2, 2, 2, 3 ]
gap> S := SylowSubgroup( g, 2 );
Pcp-group with orders [ 2, 2, 2, 2 ]
gap> T := S^g.5;
Pcp-group with orders [ 2, 2, 2, 2 ]
gap> IsNormal( S, T );
false
gap> IsNormal( T, S );
false

#
gap> STOP_TEST( "bugfix.tst", 10000000);

0 comments on commit 3f385e4

Please sign in to comment.