From aa5792d308d0f6b678906100a4abc3d89a5bc041 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 16 Aug 2016 15:59:59 -0600 Subject: [PATCH] ENHANCE: Performance improvements to `PatheticIsomorphism` Use characteristic factors to first map in factor groups (shorter orbits) Use direct product structure to obtain better permrep for automorphism group. FIX: Do not drag autactbase into solvable case. --- lib/autsr.gi | 143 +++++++++++++++++++++++++++++++++++++++++++----- lib/morpheus.gi | 13 ++++- 2 files changed, 139 insertions(+), 17 deletions(-) diff --git a/lib/autsr.gi b/lib/autsr.gi index d5ee7f10057..0c6e0f17fa2 100644 --- a/lib/autsr.gi +++ b/lib/autsr.gi @@ -145,11 +145,21 @@ BindGlobal("AutomGrpSR",function(G) local ff,r,d,ser,u,v,i,j,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, b,fratsim,AQ,OQ,Zm,D,innC,bas,oneC,imgs,C,maut,innB,tmpAut,imM,a,A,B, cond,sub,AQI,AQP,AQiso,rf,res,resperm,proj, - comiso,extra,mo,rada,makeaqiso,ind,lastperm; + comiso,extra,mo,rada,makeaqiso,ind,lastperm,actbase; + + actbase:=ValueOption("autactbase"); makeaqiso:=function(); + if HasIsomorphismPermGroup(AQ) then + AQiso:=IsomorphismPermGroup(AQ); + elif HasNiceMonomorphism(AQ) and IsPermGroup(Range(NiceMonomorphism(AQ))) then + AQiso:=NiceMonomorphism(AQ); + elif actbase<>fail then + AQiso:=IsomorphismPermGroup(AQ:autactbase:=List(actbase,x->Image(hom,x))); + else + AQiso:=IsomorphismPermGroup(AQ); + fi; Info(InfoMorph,3,"Permrep of AQ ",Size(AQ)); - AQiso:=IsomorphismPermGroup(AQ); AQP:=Image(AQiso,AQ); # force degree down a:=Size(AQP); @@ -424,6 +434,9 @@ local ff,r,d,ser,u,v,i,j,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, Append(gens,B); Append(gens,A); + for j in gens do + SetIsBijective(j,true); + od; A:=Group(gens); SetIsAutomorphismGroup(A,true); SetIsGroupOfAutomorphismsFiniteGroup(A,true); @@ -431,8 +444,11 @@ local ff,r,d,ser,u,v,i,j,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, AQI:=SubgroupNC(A,innB); SetInnerAutomorphismsAutomorphismGroup(A,AQI); - AQ:=A; + # use the actbase for order computations + if actbase<>fail then + Size(A:autactbase:=List(actbase,x->Image(hom,x))); + fi; # do we use induced radical automorphisms to help next step? if Size(KernelOfMultiplicativeGeneralMapping(hom))>1 and @@ -466,7 +482,7 @@ local ff,r,d,ser,u,v,i,j,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, if Size(ind)*100ImagesRepresentative(resperm,x))); @@ -495,17 +511,116 @@ end); # only of use as long as we don't yet have a Cannon/Holt version of # isomorphism available and there are many generators BindGlobal("PatheticIsomorphism",function(G,H) -local d,a,map; +local d,a,map,possibly,cG,cH,nG,nH,i,j,sel,u,v,asAutomorphism,K,L,conj,e1,e2, + iso,api,good,gens,pre; + possibly:=function(a,b) + if Size(a)<>Size(b) then + return false; + fi; + if AbelianInvariants(a)<>AbelianInvariants(b) then + return false; + fi; + if Size(a)<1000 and Size(a)<>512 and IdGroup(a)<>IdGroup(b) then + return false; + fi; + return true; + end; + + asAutomorphism:=function(sub,hom) + return Image(hom,sub); + end; + + # go through factors of characteristic series to keep orbits short. + cG:=CharacteristicSubgroupsLib(G); + nG:=[]; + cH:=ShallowCopy(CharacteristicSubgroupsLib(H)); + if Length(cG)<>Length(cH) then + return fail; + fi; + SortBy(cH,Size); + nH:=[]; + i:=1; + good:=[1..Length(cH)]; + while i<=Length(cH) do + if i in good and Size(cH[i])>1 and Size(cH[i])possibly(cG[x],cH[i])); + if Length(sel)=0 then + return fail; + elif Length(sel)=1 then + Add(nG,cG[sel[1]]); + Add(nH,cH[i]); + else + u:=TrivialSubgroup(G); + for j in sel do + u:=ClosureGroup(u,cG[j]); + od; + sel:=Concatenation([i],Filtered([i+1..Length(cH)], + x->possibly(cH[i],cH[x]))); + v:=TrivialSubgroup(H); + for j in sel do + u:=ClosureGroup(v,cH[j]); + od; + if Size(u)<>Size(v) then + return fail; + fi; + good:=Difference(good,sel); + if Size(u)5000 then + # K:=SmallerDegreePermutationRepresentation(api); + # Info(InfoMorph,2,"Permdegree reduced ", +# NrMovedPoints(api),"->",NrMovedPoints(Image(K))); +# iso:=iso*K; +# api:=Image(iso); +# fi; + + # now work in reverse through the characteristic factors + conj:=One(a); + K:=Image(e1,G); + L:=Image(e2,H); + Add(cG,TrivialSubgroup(d)); + for i in cG do + u:=ClosureGroup(i,K); + v:=ClosureGroup(i,L); + if u<>v then + gens:=SmallGeneratingSet(api); + pre:=List(gens,x->PreImagesRepresentative(iso,x)); + map:=RepresentativeAction(SubgroupNC(a,pre),u,v,asAutomorphism); + if map=fail then + return fail; + fi; + conj:=conj*map; + K:=Image(map,K); + + u:=Stabilizer(api,v,gens,pre,asAutomorphism); + Info(InfoMorph,1,"Factor ",Size(d)/Size(i),": ", + "reduce by ",Size(api)/Size(u)); + api:=u; + fi; + od; + return GroupHomomorphismByImagesNC(G,H,GeneratorsOfGroup(G), - List(GeneratorsOfGroup(G),x->PreImagesRepresentative(Embedding(d,2), - Image(map,Image(Embedding(d,1),x))))); + List(GeneratorsOfGroup(G),x->PreImagesRepresentative(e2, + Image(conj,Image(e1,x))))); end); diff --git a/lib/morpheus.gi b/lib/morpheus.gi index 0504fe23a1e..63c8b50579f 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -234,7 +234,8 @@ end); ## # try to find a small faithful action for an automorphism group InstallGlobalFunction(AssignNiceMonomorphismAutomorphismGroup,function(au,g) -local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt, br, bv, v, val, o, i, comb, best; +local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt, br, bv, +v, val, o, i, comb, best,actbase; hom:=fail; allinner:=HasIsAutomorphismGroup(au) and IsAutomorphismGroup(au); @@ -378,10 +379,14 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt, br, bv, fi; od; else + actbase:=ValueOption("autactbase"); + if actbase=fail then + actbase:=[g]; + fi; repeat cnt:=cnt+1; repeat - r:=Random(g); + r:=Random(Random(actbase)); until not r in u; # force prime power order if not IsPrimePowerInt(Order(r)) then @@ -1924,7 +1929,9 @@ local A; if HasIsFrattiniFree(G) and IsFrattiniFree(G) then A:=AutomorphismGroupFrattFreeGroup(G); else - A:=AutomorphismGroupSolvableGroup(G); + # currently autactbase does not work well, as the representation might + # change. + A:=AutomorphismGroupSolvableGroup(G:autactbase:=fail); fi; elif Size(RadicalGroup(G))=1 and IsPermGroup(G) then # essentially a normalizer when suitably embedded