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

Enhancements: Solvable permutation groups and others #1046

Merged
merged 11 commits into from
Feb 16, 2017
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
12 changes: 7 additions & 5 deletions grp/perf.grp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ end );
##
InstallGlobalFunction( NumberPerfectGroups, function ( size )

if IsOddInt(size) then return 0;fi;
if size=1 then
return 1;
elif IsOddInt(size) then return 0;fi;
PerfGrpLoad(0);

# get the number and return it.
Expand All @@ -89,10 +91,12 @@ end );
InstallGlobalFunction( NumberPerfectLibraryGroups, function ( size )
local sizenum;

if IsOddInt(size) then return 0;fi;
if size=1 then
return 1;
elif IsOddInt(size) then return 0;fi;
# get the number and return it.
sizenum := PerfGrpLoad( size );
if sizenum = fail or size in PERFRec.notAvailable or size = 1 then
if sizenum = fail or size in PERFRec.notAvailable then
return 0;
else
return PERFRec.number[sizenum];
Expand Down Expand Up @@ -451,8 +455,6 @@ local func,sz,p;
Error("Perfect groups of size ",sz[1]," not known");
elif sz[1] in PERFRec.notAvailable then
Error("Perfect groups of size ",sz[1]," not available");
elif sz[1]=1 then
Error("The trivial group is not considered to be part of this library");
fi;
p:=PerfGrpLoad(sz[1]);
if p=fail or sz[2]>PERFRec.number[p] then
Expand Down
4 changes: 3 additions & 1 deletion grp/perf1.grp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
## All data is based on Holt/Plesken: Perfect Groups, OUP 1989
##

PERFGRP[1]:=[];
PERFGRP[1]:=[# trivial
[[1,"a",function(a) return [[a],[]];end,[1]],
"Idgroup",[],-1,0,1]];
PERFGRP[2]:=[# 60.1
[[1,"ab",
function(a,b)
Expand Down
13 changes: 12 additions & 1 deletion lib/clashom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ local clT, # classes T
if ppos=fail then
p:=First(select,
i->Size(clTR[i][3])<=maxdiff and img in clTR[i][3]);
#if p=fail then Error("nanu"); fi;
if p=fail then return fail; fi;
else
p:=ppos;
fi;
Expand Down Expand Up @@ -1299,6 +1299,17 @@ local cs, # chief series of G

clF:=ConjugacyClassesSubwreath(F,FM,n,S1,
Action(FM,components[1]),T1,components,emb,proj);
if clF=fail then
# weird error happened -- redo
j:=Random(SymmetricGroup(MovedPoints(G)));
FM:=List(GeneratorsOfGroup(G),x->x^j);
F:=Group(FM);
SetSize(F,Size(G));
FM:=GroupHomomorphismByImagesNC(G,F,GeneratorsOfGroup(G),FM);
clF:=ConjugacyClassesFittingFreeGroup(F);
clF:=List(clF,x->[PreImagesRepresentative(FM,x[1]),PreImage(FM,x[2])]);
return clF;
fi;
#fi;
else
FM:=Image(Fhom,M);
Expand Down
6 changes: 4 additions & 2 deletions lib/dict.gd
Original file line number Diff line number Diff line change
Expand Up @@ -515,17 +515,19 @@ BindGlobal("DefaultSparseHashWithIKRepType",

#############################################################################
##
#F SparseHashTable([<intkeyfun>])
#F SparseHashTable([<intkeyfun>[,<startlength>])
##
## <#GAPDoc Label="SparseHashTable">
## <ManSection>
## <Func Name="SparseHashTable" Arg='[intkeyfun]'/>
## <Func Name="SparseHashTable" Arg='[intkeyfun[,startlength]]'/>
##
## <Description>
## Construct an empty sparse hash table. This is the only correct way to
## construct such a table.
## If the argument <A>intkeyfun</A> is given, this function will be used to
## obtain numbers for the keys passed to it.
## If also <A>startlength</A> is given, the hash table will be initalized
## at that size.
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand Down
16 changes: 11 additions & 5 deletions lib/dict.gi
Original file line number Diff line number Diff line change
Expand Up @@ -564,19 +564,25 @@ InstallMethod( RandomHashKey, "for dense hash tables", true,
##
## Default starting hash table size
##
DefaultHashLength := 2^7;
BindGlobal("HASH_RANGE",[0..DefaultHashLength-2]);
DefaultHashLength := 2^8;
BindGlobal("HASH_RANGE",[0..2^7-2]);

#############################################################################
##
#F SparseHashTable( )
##
InstallGlobalFunction( SparseHashTable,
function(arg)
local Rec,T;
local Rec,T,len;

Rec := rec( KeyArray := ListWithIdenticalEntries( DefaultHashLength, fail ),
ValueArray := [], LengthArray := DefaultHashLength, NumberKeys := 0 );
len:=DefaultHashLength;
if Length(arg)>1 then
len:=arg[2];
fi;


Rec := rec( KeyArray := ListWithIdenticalEntries( len, fail ),
ValueArray := [], LengthArray := len, NumberKeys := 0 );

if Length(arg)>0 then
T:=Objectify( DefaultSparseHashWithIKRepType, Rec );
Expand Down
4 changes: 3 additions & 1 deletion lib/groebner.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,9 @@ local ord,b,ind,num,c,corners,i,j,a,rem,bound,mon,n,monb,dim,sc,k,l,char,hom;
if j<>fail then
Add(l,GeneratorsOfLeftOperatorRing(a)[j]);
else
Add(l,Zero(a));
rem:=PolynomialReducedRemainder(i,b,ord);
rem:=Coefficients(monb,rem);
Add(l,GeneratorsOfLeftOperatorRing(a)*rem);
fi;
od;

Expand Down
1 change: 1 addition & 0 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ DeclareAttribute("MaximalSubgroupClassReps",IsGroup);

# utility function in maximal subgroups code
DeclareGlobalFunction("DoMaxesTF");
DeclareGlobalFunction("MaxesAlmostSimple");

#############################################################################
##
Expand Down
22 changes: 19 additions & 3 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2854,24 +2854,39 @@ local dom,n,t,map;
end);

BindGlobal("TomExtensionNames",function(r)
local n,pool,ext,sz,lsz,t,f,i;
local n,pool,ext,sz,lsz,t,f,i,ns;
if IsBound(r.tomExtensions) then
return t.tomExtensions;
return r.tomExtensions;
fi;
n:=r.tomName;
ns:=[n];
pool:=[n];
ext:=[];
sz:=fail;
for i in pool do
t:=TableOfMarks(i);
if t<>fail then
# does the TOM use a different simple group name?
if i=n and Identifier(t)<>i then
r.tomName:=Identifier(t);
fi;
f:=Position(Identifier(t),'.');
if f=fail then
f:=Identifier(t);
else
f:=Identifier(t){[1..f-1]};
fi;
if not f in ns then
Add(ns,f);
fi;

lsz:=Maximum(OrdersTom(t));
if sz=fail then sz:=lsz;fi;
if lsz>sz then
Add(ext,[lsz/sz,i{[Length(n)+2..Length(i)]}]);
fi;
for f in FusionsTom(t) do
if f[1]{[1..Minimum(Length(f[1]),Length(n))]}=n and not f[1] in pool then
if f[1]{[1..Minimum(Length(f[1]),Length(n))]} in ns and not f[1] in pool then
Add(pool,f[1]);
fi;
od;
Expand All @@ -2897,6 +2912,7 @@ local T,t,hom,inf,nam,i,aut;
fi;
Info(InfoPerformance,2,"Using Table of Marks Library");

TomExtensionNames(inf); # possibly change nam
nam:=inf.tomName;

# simple group
Expand Down
43 changes: 33 additions & 10 deletions lib/maxsub.gi
Original file line number Diff line number Diff line change
Expand Up @@ -527,19 +527,42 @@ local hom,embs,s,k,agens,ad,i,j,perm,dia,ggens,e,tgens,d,m,reco,emba,outs,id;
return m;
end);

BindGlobal("MaxesAlmostSimple",function(G)
local id,m,epi;
# Are just finding out that a group is symmetric or alternating?
# if so, try tu use method that uses data library
if not (HasIsNaturalSymmetricGroup(G) or HasIsNaturalAlternatingGroup(G))
and (IsNaturalSymmetricGroup(G) or IsNaturalAlternatingGroup(G)) then
Info(InfoLattice,1,"MaxesAlmostSimple: Use S_n/A_n");
m:=MaximalSubgroupsSymmAlt(G,false);
if m<>fail then
return m;
InstallGlobalFunction(MaxesAlmostSimple,function(G)
local id,m,epi,cnt,h;

# is a permutation degree too big?
if IsPermGroup(G) then
if NrMovedPoints(G)>
SufficientlySmallDegreeSimpleGroupOrder(Size(PerfectResiduum(G))) then
h:=G;
for cnt in [1..5] do
epi:=SmallerDegreePermutationRepresentation(h);
if NrMovedPoints(Range(epi))<NrMovedPoints(h) then
m:=MaxesAlmostSimple(Image(epi,G));
m:=List(m,x->PreImage(epi,x));
return m;
fi;
# new group to avoid storing the map
h:=Group(GeneratorsOfGroup(G));
SetSize(h,Size(G));
od;
fi;


# Are just finding out that a group is symmetric or alternating?
# if so, try to use method that uses data library
if not (HasIsNaturalSymmetricGroup(G) or HasIsNaturalAlternatingGroup(G))
and (IsNaturalSymmetricGroup(G) or IsNaturalAlternatingGroup(G)) then
Info(InfoLattice,1,"MaxesAlmostSimple: Use S_n/A_n");
m:=MaximalSubgroupsSymmAlt(G,false);
if m<>fail then
return m;
fi;
fi;
fi;

# is the degree bad?

# does the table of marks have it?
m:=TomDataMaxesAlmostSimple(G);
if m<>fail then return m;fi;
Expand Down
3 changes: 2 additions & 1 deletion lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ v, val, o, i, comb, best,actbase;
return Image(img[2],ConjugatorOfConjugatorIsomorphism(auto));
fi;
return RepresentativeAction(img[1],r,
List(GeneratorsOfGroup(g),i->Image(img[2],Image(auto,i))));
List(GeneratorsOfGroup(g),i->Image(img[2],Image(auto,i))),
OnTuples);
end,
function(perm)
if perm in ran then
Expand Down
3 changes: 3 additions & 0 deletions lib/onecohom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,9 @@ end);
##
InstallGlobalFunction(ComplementClassesRepresentativesEA,function(g,n)
local oc,l;
if Size(g)=Size(n) then
return TrivialSubgroup(g);
fi;
oc:=OneCocycles(g,n);
if not oc.isSplitExtension then
return [];
Expand Down
2 changes: 2 additions & 0 deletions lib/pcgsperm.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ DeclareGlobalFunction( "SolvableNormalClosurePermGroup" );
DeclareGlobalFunction( "TailOfPcgsPermGroup" );
DeclareGlobalFunction( "PcgsMemberPcSeriesPermGroup" );

DeclareGlobalFunction( "PermgroupSuggestPcgs" );

#############################################################################
##
#E pcgsperm.gd
Expand Down
Loading