Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions gap/projective/sl.gi
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ end;
RECOG.SLn_godownfromd:=function(g,q,d,dim)
local y,yy,ready,order,es,dims,subsp,z,x,a,b,c,h,vec,vec2,
pol,factors,degrees,comm1,comm2,comm3,image,basis,action,vs,readyqpl1,
readyqm1,count,u,orderu;
readyqm1,count,u,orderu,expecteddims;

repeat
ready:=false;
Expand All @@ -283,8 +283,11 @@ RECOG.SLn_godownfromd:=function(g,q,d,dim)
if not IsOne(yy) then
es:= Eigenspaces(GF(q),yy);
dims:=List(es,Dimension);
if IsSubset(Set([1,d-1,dim-d]),Set(dims)) and
(1 in Set(dims)) then
# Since yy^(q-1)=1, yy is semisimple over GF(q). We want
# one 1-space, one (d-1)-space, and the fixed outside space
# of dimension dim-d; the last one is absent when dim=d.
expecteddims:=Filtered([1,d-1,dim-d], x -> x > 0);
if AsSortedList(dims)=AsSortedList(expecteddims) then
es:=Filtered(es,x->Dimension(x)=1);
vec:=Basis(es[1])[1];
if vec*yy=vec then
Expand Down
11 changes: 11 additions & 0 deletions tst/working/slow/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ gap> for i in [1..50] do
> ri := RECOG.TestGroup(GL(8,27), false, Size(GL(8,27)));
> od;

# The following test used to run into an error because SLn_godownfromd
# accepted eigenspace dimensions which did not include the expected
# fixed-space dimension.
gap> seed:=1;;
gap> Reset(GlobalMersenneTwister, seed);;
gap> Reset(GlobalRandomSource, seed);;
gap> h := GL(6,8);;

@Till-Eisen Till-Eisen Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see the case $d-1 = dim-d$ as a problem in the previous code. In this case there might have been "to many" eigenspaces of dimension 1.
Perhaps $GL(7,8)$ instead of $GL(6,8)$ would be a good test as well, since then $dim=7, d= 4$ and thereby $dim-d=d-1$?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact also $dim=5$ is of interest, too, as then $dim-d=1$

gap> gens := List([1..10], x -> PseudoRandom(h));;
gap> g := GroupWithGenerators(gens);;
gap> ri := RECOG.TestGroup(g, false, Size(h));;

#
gap> SetInfoLevel(InfoRecog, oldInfoLevel);
gap> STOP_TEST("bugfix.tst");