diff --git a/lib/grpreps.gi b/lib/grpreps.gi index 5259acfe57..4a317738e9 100644 --- a/lib/grpreps.gi +++ b/lib/grpreps.gi @@ -55,20 +55,39 @@ local modu, modus,gens,v,subs,sub,ser,i,j,a,si,dims,cf,mats,clos,bas,rad; a:=DerivedSubgroup(G); if Size(a)=Size(G) then return [gens,[TrivialModule(Length(gens),F)]]; - else - a:=MaximalAbelianQuotient(G); - si:=List(gens,x->ImagesRepresentative(a,x)); - sub:=IrreducibleModules(Group(si),F,1); - if sub[1]=si then - return [gens,sub[2]]; + elif IsAbelian(G) then + if IsPrimeField(F) then + if CanEasilyComputePcgs(G) then + # call `IrreducibleMethods` again; + # we assume that now another method is applicable + return IrreducibleModules(G, F, 1); + else + # delegate to a pc group, + # for which another method is available + a:= IsomorphismPcGroup(G); + fi; else - modu:=[]; - for i in sub[2] do + a:= IsomorphismPermGroup(G); + fi; + else + # delegate to a proper factor group + a:= MaximalAbelianQuotient(G); + fi; + si:=List(gens,x->ImagesRepresentative(a,x)); + sub:= Group(si); + SetIsAbelian(sub, true); + sub:= IrreducibleModules(sub,F,0); + if sub[1]=si then + return [gens, Filtered( sub[2], x -> x.dimension = 1 )]; + else + modu:=[]; + for i in sub[2] do + if i.dimension = 1 then v:=GroupHomomorphismByImages(Image(a),Group(i.generators),sub[1],i.generators); Add(modu,GModuleByMats(List(si,x->ImagesRepresentative(v,x)),F)); - od; - return [gens,modu]; - fi; + fi; + od; + return [gens,modu]; fi; fi; diff --git a/tst/testinstall/grpreps.tst b/tst/testinstall/grpreps.tst index 859e2d15f6..427c94bc4b 100644 --- a/tst/testinstall/grpreps.tst +++ b/tst/testinstall/grpreps.tst @@ -16,5 +16,21 @@ gap> res2:= AbsolutelyIrreducibleModules( G2, F, 10 );; gap> List( res2[2], r -> [ r.field, r.dimension ] ); [ [ GF(2), 1 ] ] +# Test that the delegation between methods for 'IrreducibleModules' works. +gap> Length( IrreducibleModules( AlternatingGroup(5), GF(3), 1 )[2] ) = 1; +true +gap> Length( IrreducibleModules( Group( (1,2), (1,2) ), GF(3), 1 )[2] ) = 2; +true +gap> Length( IrreducibleModules( Group( (1,2), (1,2) ), GF(4), 1 )[2] ) = 1; +true +gap> Length( IrreducibleModules( Group( (1,2,3,4,5) ), GF(4), 1 )[2] ) = 1; +true +gap> Length( IrreducibleModules( CyclicGroup( IsFpGroup, 2 ), GF(3), 1 )[2] ) = 2; +true +gap> Length( IrreducibleModules( CyclicGroup( IsFpGroup, 2 ), GF(4), 1 )[2] ) = 1; +true +gap> Length( IrreducibleModules( SymmetricGroup(5), GF(3), 1 )[2] ) = 2; +true + # gap> STOP_TEST( "grpreps.tst" );