Skip to content

Commit

Permalink
FIX: Enforce that Natural(G/S)L test creates module with generators.
Browse files Browse the repository at this point in the history
This fixes gap-system#2104
  • Loading branch information
hulpke committed Feb 1, 2018
1 parent 8691a62 commit 8763634
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/grpffmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ if Length(l)=0 then Error("list must be nonempty");fi;
return GF(char^deg);
end);

BindGlobal("NonemptyGeneratorsOfGroup",function(grp)
local l;
l:=GeneratorsOfGroup(grp);
if Length(l)=0 then l:=[One(grp)]; fi;
return l;
end);

#############################################################################
##
#M IsNaturalGL( <ffe-mat-grp> )
Expand All @@ -91,7 +98,7 @@ InstallMethod( IsNaturalGL,

function( grp )
return MTX.IsAbsolutelyIrreducible(
GModuleByMats(GeneratorsOfGroup(grp),DefaultFieldOfMatrixGroup(grp))) and
GModuleByMats(NonemptyGeneratorsOfGroup(grp),DefaultFieldOfMatrixGroup(grp))) and
Size( grp ) = Size( GL( DimensionOfMatrixGroup( grp ),
Size( FieldOfMatrixGroup( grp ) ) ) );
end );
Expand All @@ -108,7 +115,7 @@ local gen, d, f;
d := DimensionOfMatrixGroup( grp );
gen := GeneratorsOfGroup( grp );
return MTX.IsAbsolutelyIrreducible(
GModuleByMats(GeneratorsOfGroup(grp),DefaultFieldOfMatrixGroup(grp))) and
GModuleByMats(NonemptyGeneratorsOfGroup(grp),DefaultFieldOfMatrixGroup(grp))) and
ForAll(gen, x-> DeterminantMat(x) = One(f))
and Size(grp) = Size(SL(d, Size(f)));
end );
Expand Down
2 changes: 2 additions & 0 deletions tst/testinstall/grpmat.tst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ gap> iso:= IsomorphismPermGroup( g );;
gap> img:=Image( iso );;
gap> Size(img);
67010895544320000
gap> IsNaturalGL( TrivialSubgroup( GL(2,2) ) );
false

# Unbind variables so we can GC memory
gap> Unbind(img); Unbind(iso); Unbind(g); Unbind(hom); Unbind(u);
Expand Down

0 comments on commit 8763634

Please sign in to comment.