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

Fix Earns to always returns a list, as documented (and other improvements) #4759

Merged
merged 6 commits into from
Feb 9, 2022
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
2 changes: 1 addition & 1 deletion doc/ref/ctbl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ yielding smaller spaces and several irreducible characters.
<Example><![CDATA[
gap> DixonSplit( d );
#I Matrix 2,Representative of Order 3,Centralizer: 5832
#I Dimensions: [ 1, 2, 1, 4, 12, 1, 1, 2, 1, 2, 1 ]
#I Dimensions: [ [ 1, 6 ], [ 2, 3 ], [ 4, 1 ], [ 12, 1 ] ]
#I Two-dim space split
#I Two-dim space split
#I Two-dim space split
Expand Down
102 changes: 59 additions & 43 deletions lib/autsr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -386,34 +386,39 @@ local S,c,hom,q,a,b,i,t,int,bad,have,ups,up,new,u,good,abort,clim,worked,pp,
abort:=false;
havetest:=[];

worked:=SubgroupProperty(G,
function(elm)
if abort then
return true; # are we bailing out since it behaves too badly?
fi;
# would it contribute to avoid outside S?
if elm in avoid or
ForAny(Set(Factors(Order(elm))),e->elm^e in avoid and not elm^e in S)
then
# cannot be good
return false;
fi;
if IsPermGroup(G) then
worked:=SubgroupProperty(G,
function(elm)
if abort then
return true; # are we bailing out since it behaves too badly?
fi;
# would it contribute to avoid outside S?
if elm in avoid or
ForAny(Set(Factors(Order(elm))),e->elm^e in avoid and not elm^e in S)
then
# cannot be good
return false;
fi;

tstcnt:=tstcnt+1;
AddSet(havetest,elm);
if cond(elm) then
S:=ClosureGroup(S,elm); # remember
Info(InfoMorph,3,"New element ",IndexNC(G,S));
b:=0;
return true;
else
b:=b+1;
if b>clim then
abort:=true;
tstcnt:=tstcnt+1;
AddSet(havetest,elm);
if cond(elm) then
S:=ClosureGroup(S,elm); # remember
Info(InfoMorph,3,"New element ",IndexNC(G,S));
b:=0;
return true;
else
b:=b+1;
if b>clim then
abort:=true;
fi;
return false;
fi;
return false;
fi;
end,S);
end,S);
else
worked:=S;
abort:=true;
fi;

if abort=false then
# we actually found the subgroup
Expand Down Expand Up @@ -512,6 +517,10 @@ local S,c,hom,q,a,b,i,t,int,bad,have,ups,up,new,u,good,abort,clim,worked,pp,

repeat
good:=false;
u:=Filtered(GeneratorsOfGroup(G),x->cond(x) and not x in S);
for i in u do
S:=ClosureGroup(S,i);
od;

# try to prove no supergroup works
t:=RightTransversal(G,S:noascendingchain); # don't try to be clever in
Expand All @@ -520,7 +529,7 @@ local S,c,hom,q,a,b,i,t,int,bad,have,ups,up,new,u,good,abort,clim,worked,pp,
b:=RepresentativesMinimalBlocks(a,MovedPoints(a));
Info(InfoMorph,3,"Above are ",Length(b)," blocks");

if Length(b)*10>IndexNC(G,S) then
if IsPermGroup(G) and Length(b)*10>IndexNC(G,S) then
# there are too many blocks. Direct test is cheaper!
S:=SubgroupProperty(G,locond,S);
else
Expand Down Expand Up @@ -555,17 +564,22 @@ local cs,nr,u,no,un,S,rad,res,ise,uno;
# step.
nr:=2^LogInt(Size(G),1000)+Length(Factors(Size(G)));
u:=[];
S:=SubgroupProperty(G,
function(elm)
if nr<0 then return true;fi;
nr:=nr-1;
if cond(elm) then
Add(u,elm);
return true;
else
return false;
fi;
end,Sorig);
if IsPermGroup(G) then
S:=SubgroupProperty(G,
function(elm)
if nr<0 then return true;fi;
nr:=nr-1;
if cond(elm) then
Add(u,elm);
return true;
else
return false;
fi;
end,Sorig);
else
u:=Filtered(GeneratorsOfGroup(G),cond);
nr:=-1;
fi;

if nr>=0 then # succeeded (small index case)
return S;
Expand All @@ -585,15 +599,17 @@ local cs,nr,u,no,un,S,rad,res,ise,uno;
# does not need to be found through search through complements)
res:=PerfectResiduum(G);

nr:=[Core(G,S),NormalClosure(G,S)];
nr:=Unique([Core(G,S),NormalClosure(G,S)]);

# refine with perfect residuum
no:=Intersection(nr[1],res);
if not no in nr then Add(nr,no);fi;
no:=ClosureGroup(nr[2],res);
if not no in nr then Add(nr,no);fi;
no:=Intersection(nr[2],ClosureGroup(nr[1],res));
if not no in nr then Add(nr,no);fi;
if Length(nr)>1 then
no:=ClosureGroup(nr[2],res);
if not no in nr then Add(nr,no);fi;
no:=Intersection(nr[2],ClosureGroup(nr[1],res));
if not no in nr then Add(nr,no);fi;
fi;

cs:=CompositionSeriesThrough(G,nr);

Expand Down
2 changes: 1 addition & 1 deletion lib/ctblgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ InstallGlobalFunction(SplitStep,function(D,bestMat)
fi;
od;

Info(InfoCharacterTable,1,"Dimensions: ",List(raeume,i->i.dim));
Info(InfoCharacterTable,1,"Dimensions: ",Collected(List(raeume,i->i.dim)));
D.raeume:=raeume;
return true;
end);
Expand Down
Loading