diff --git a/lib/grp.gi b/lib/grp.gi index c9e687ca70..fd3315f82a 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -990,19 +990,20 @@ InstallMethod( Exponent, #M FittingSubgroup( ) . . . . . . . . . . . Fitting subgroup of a group ## InstallMethod( FittingSubgroup, "for nilpotent group", - [ IsGroup and IsNilpotentGroup ], 0, IdFunc ); + [ IsGroup and IsNilpotentGroup ], SUM_FLAGS, IdFunc ); InstallMethod( FittingSubgroup, "generic method for groups", [ IsGroup and IsFinite ], function (G) - if IsTrivial (G) then - return G; - else - return SubgroupNC( G, Filtered(Union( List( Set( FactorsInt( Size( G ) ) ), + if not IsTrivial( G ) then + G := SubgroupNC( G, Filtered(Union( List( Set( FactorsInt( Size( G ) ) ), p -> GeneratorsOfGroup( PCore( G, p ) ) ) ), p->p<>One(G))); + Assert( 2, IsNilpotentGroup( G ) ); + SetIsNilpotentGroup( G, true ); fi; + return G; end); RedispatchOnCondition( FittingSubgroup, true, [IsGroup], [IsFinite], 0); @@ -1019,7 +1020,12 @@ local m; return G; fi; m:=List(ConjugacyClassesMaximalSubgroups(G),C->Core(G,Representative(C))); - return Intersection(m); + m := Intersection(m); + if HasIsFinite(G) and IsFinite(G) then + Assert(2,IsNilpotentGroup(m)); + SetIsNilpotentGroup(m,true); + fi; + return m; end); diff --git a/lib/grppcatr.gi b/lib/grppcatr.gi index 960dafc272..faba1406a2 100644 --- a/lib/grppcatr.gi +++ b/lib/grppcatr.gi @@ -134,7 +134,10 @@ InstallMethod( FrattiniSubgroup, 0, function( G ) - return Core( G, PrefrattiniSubgroup( G ) ); + G := Core( G, PrefrattiniSubgroup( G ) ); + Assert( 2, IsNilpotentGroup( G) ); + SetIsNilpotentGroup( G, true ); + return G; end); diff --git a/lib/maxsub.gi b/lib/maxsub.gi index a6f64b8319..f32d8d218d 100644 --- a/lib/maxsub.gi +++ b/lib/maxsub.gi @@ -346,6 +346,9 @@ local m,f,i; f:=Core(G,NormalIntersection(f,m[i])); fi; od; + if HasIsFinite(G) and IsFinite(G) then + SetIsNilpotentGroup(f,true); + fi; return f; end); diff --git a/tst/testinstall/opers/FittingSubgroup.tst b/tst/testinstall/opers/FittingSubgroup.tst new file mode 100644 index 0000000000..3bbe924a2b --- /dev/null +++ b/tst/testinstall/opers/FittingSubgroup.tst @@ -0,0 +1,48 @@ +gap> START_TEST("FittingSubgroup.tst"); + +# +gap> G:=SylowSubgroup(SymmetricGroup(5),2);; +gap> HasIsNilpotentGroup(G); +true +gap> IsIdenticalObj(G, FittingSubgroup(G)); +true + +# +gap> G := CyclicGroup(IsPermGroup, 12);; +gap> IsIdenticalObj(G, FittingSubgroup(G)); +true +gap> G := CyclicGroup(IsPcGroup, 12);; +gap> IsIdenticalObj(G, FittingSubgroup(G)); +true + +# +gap> List(AllSmallGroups(60), g -> Size(FittingSubgroup(g))); +[ 30, 30, 30, 60, 1, 15, 15, 15, 20, 30, 30, 30, 60 ] +gap> ForAll(AllSmallGroups(60), g -> IsNormal(g, FrattiniSubgroup(g))); +true + +# +gap> g := SL(2,5);; +gap> f := FittingSubgroup(g);; Size(f); +2 +gap> HasIsNilpotentGroup(f); +true +gap> p := SylowSubgroup(g, 2);; +gap> HasIsNilpotentGroup(p); +true +gap> HasIsNilpotentGroup(FittingSubgroup(p)); +true + +# +gap> g := SL(IsPermGroup,2,5);; +gap> f := FittingSubgroup(g);; +gap> HasIsNilpotentGroup(f); +true +gap> p := SylowSubgroup(g, 2);; +gap> HasIsNilpotentGroup(p); +true +gap> HasIsNilpotentGroup(FittingSubgroup(p)); +true + +# +gap> STOP_TEST("FittingSubgroup.tst", 1); diff --git a/tst/testinstall/opers/FrattiniSubgroup.tst b/tst/testinstall/opers/FrattiniSubgroup.tst new file mode 100644 index 0000000000..2eabbf19e2 --- /dev/null +++ b/tst/testinstall/opers/FrattiniSubgroup.tst @@ -0,0 +1,51 @@ +gap> START_TEST("FrattiniSubgroup.tst"); + +# +gap> FrattiniSubgroup(SymmetricGroup(3)); +Group(()) +gap> FrattiniSubgroup(SymmetricGroup(4)); +Group(()) +gap> FrattiniSubgroup(SymmetricGroup(5)); +Group(()) + +# +gap> FrattiniSubgroup(CyclicGroup(IsPermGroup, 3)); +Group(()) +gap> FrattiniSubgroup(CyclicGroup(IsPermGroup, 9)); +Group([ (1,4,7)(2,5,8)(3,6,9) ]) +gap> FrattiniSubgroup(CyclicGroup(IsPcGroup, 3)); +Group([ ]) +gap> FrattiniSubgroup(CyclicGroup(IsPcGroup, 9)); +Group([ f2 ]) + +# +gap> List(AllSmallGroups(60), g -> Size(FrattiniSubgroup(g))); +[ 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] +gap> ForAll(AllSmallGroups(60), g -> IsNormal(g, FrattiniSubgroup(g))); +true + +# +gap> g := SL(2,5);; +gap> f := FrattiniSubgroup(g); + +gap> HasIsNilpotentGroup(f); +true +gap> p := SylowSubgroup(g, 2);; +gap> HasIsNilpotentGroup(p); +true +gap> HasIsNilpotentGroup(FrattiniSubgroup(p)); +true + +# +gap> g := SL(IsPermGroup,2,5);; +gap> f := FrattiniSubgroup(g);; +gap> HasIsNilpotentGroup(f); +true +gap> p := SylowSubgroup(g, 2);; +gap> HasIsNilpotentGroup(p); +true +gap> HasIsNilpotentGroup(FrattiniSubgroup(p)); +true + +# +gap> STOP_TEST("FrattiniSubgroup.tst", 1);