Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the range of precomputed simple groups from orders up to 10^18 to orders up to about 10^27 #3861

Merged
merged 2 commits into from
Jan 22, 2020
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
4 changes: 2 additions & 2 deletions grp/simple.gd
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ DeclareGlobalFunction("EpimorphismFromClassical");
##
## <Description>
## This function returns an iterator that will run over all nonabelian simple groups, starting
## at order <A>start</A> if specified, up to order <M>10^{18}</M> (or -- if specified
## at order <A>start</A> if specified, up to order <M>10^{27}</M> (or -- if specified
## -- order <A>end</A>). If the option <A>NOPSL2</A> is given, groups of type
## <M>PSL_2(q)</M> are omitted.
## <Example><![CDATA[
Expand All @@ -95,7 +95,7 @@ DeclareGlobalFunction("EpimorphismFromClassical");
## </ManSection>
## <#/GAPDoc>
DeclareGlobalFunction("SimpleGroupsIterator");

BindGlobal("SIMPLE_GROUPS_ITERATOR_RANGE",10^27);

#############################################################################
##
Expand Down
27 changes: 20 additions & 7 deletions grp/simple.gi
Original file line number Diff line number Diff line change
Expand Up @@ -703,16 +703,30 @@ local NextL2PrimePowerInt;
fi;
end);

BindGlobal("LOADSIMPLE2",function()
local a;
if not IsBound(SIMPLEGPSNONL2[248]) then
MakeReadWriteGlobal("SIMPLEGPSNONL2");
a:=ReadAsFunction(Filename(List(GAPInfo.RootPaths,Directory),
"grp/simple2.g"));
SIMPLEGPSNONL2:=Immutable(Concatenation(SIMPLEGPSNONL2,a()));
MakeReadOnlyGlobal("SIMPLEGPSNONL2");
fi;
end);

BindGlobal("NextIterator_SimGp",function(it)
local a,l,pos,g,b;
if it!.done then return fail;fi;
a:=it!.b;
if a>1259903 then
# 1259903 is the last prime power whose L2 order is <10^18
Error("List of simple groups is only available up to order 10^18");
if a>=1316848669 then
# 1316848669 is the first prime power whose L2 order is beyond the
# simple2 list
Error("List of simple groups only available up to order",
SIMPLE_GROUPS_ITERATOR_RANGE);
fi;
l:=SizeL2Q(a);
pos:=it!.pos;
if pos>=245 then LOADSIMPLE2(); fi;
if l<SIMPLEGPSNONL2[pos][1] and not it!.nopsl2 then
# next is a L2
g:=SimpleGroup("L",2,a);
Expand Down Expand Up @@ -775,8 +789,8 @@ InstallGlobalFunction(SimpleGroupsIterator,function(arg)
stack:=a[3];
a:=a[2];
until SizeL2Q(b)>=start;
pos:=First([1..Length(SIMPLEGPSNONL2)],x->SIMPLEGPSNONL2[x][1]>=start);

if start>=10^18 then LOADSIMPLE2(); fi;
pos:=First([1..Length(SIMPLEGPSNONL2)],x->SIMPLEGPSNONL2[x][1]>=start);
Copy link
Member

Choose a reason for hiding this comment

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

Optional alternative (should be double checked ;-):

Suggested change
pos:=First([1..Length(SIMPLEGPSNONL2)],x->SIMPLEGPSNONL2[x][1]>=start);
pos:=PositionProperty(SIMPLEGPSNONL2,x->x[1]>=start);

return IteratorByFunctions(rec(
IsDoneIterator:=IsDoneIterator_SimGp,
NextIterator:=NextIterator_SimGp,
Expand Down Expand Up @@ -1165,7 +1179,7 @@ local a;
if n<168 then return 5;fi;
a:=Filtered(SIMPLEGPSNONL2,x->x[1]=n);
# we have degree data up to order 2^55
if n<=10^55 and Length(a)=0 then
if n<=2^55 and Length(a)=0 then
hulpke marked this conversation as resolved.
Show resolved Hide resolved
# L2 case
return 2*RootInt(n,3);
elif Length(a)>0 and ForAll(a,x->Length(x)>4) then
Expand Down Expand Up @@ -1262,4 +1276,3 @@ local H,d,id,hom,field,C,dom,orbs;
return hom*RestrictedInverseGeneralMapping(d);

end);

Loading