From 3f385e49fca33917bfcf5f6d61828bdd97c4468a Mon Sep 17 00:00:00 2001 From: sTertooy <5571903+sTertooy@users.noreply.github.com> Date: Sat, 15 May 2021 18:25:25 +0200 Subject: [PATCH] Fix IsNormal, uprank FittingSubgroup method(#61) 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. --- gap/basic/pcpgrps.gi | 16 ---------------- gap/pcpgrp/fitting.gi | 2 +- tst/bugfix.tst | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/gap/basic/pcpgrps.gi b/gap/basic/pcpgrps.gi index 299aaa4..2f8f65a 100644 --- a/gap/basic/pcpgrps.gi +++ b/gap/basic/pcpgrps.gi @@ -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( ) diff --git a/gap/pcpgrp/fitting.gi b/gap/pcpgrp/fitting.gi index 1c75fe4..924d74e 100644 --- a/gap/pcpgrp/fitting.gi +++ b/gap/pcpgrp/fitting.gi @@ -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; @@ -253,4 +254,3 @@ InstallGlobalFunction( NilpotentByAbelianByFiniteSeries, function( G ) if IndexNC( G, A ) = infinity then Error("wrong subgroup"); fi; return [G, A, F, U]; end ); - diff --git a/tst/bugfix.tst b/tst/bugfix.tst index 5a5f0a5..22b46e4 100644 --- a/tst/bugfix.tst +++ b/tst/bugfix.tst @@ -497,5 +497,20 @@ true gap> Random( TrivialGroup( IsPcpGroup ) ); id +# +# Fix a bug in IsNormal +# +# +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);