From e6f056c66591b26fbb468a876fe6e60762677022 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Thu, 12 Oct 2017 08:24:31 -0600 Subject: [PATCH 1/8] ENHANCE: Force abelian test before computing automorphism group. Use RankFilter. --- lib/morpheus.gi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/morpheus.gi b/lib/morpheus.gi index a226a895b2..0d6c6a04c4 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -1959,6 +1959,25 @@ local A; return A; end); +############################################################################# +## +#M AutomorphismGroup() . . abelian case +## +InstallMethod(AutomorphismGroup,"test abelian",true,[IsGroup and IsFinite], + RankFilter(IsSolvableGroup and IsFinite), +function(G) +local A; + if not IsAbelian(G) then + TryNextMethod(); + fi; + A:=AutomorphismGroupAbelianGroup(G); + SetIsAutomorphismGroup(A,true); + SetIsGroupOfAutomorphismsFiniteGroup(A,true); + SetIsFinite(A,true); + SetAutomorphismDomain(A,G); + return A; +end); + # just in case it does not know to be finite RedispatchOnCondition(AutomorphismGroup,true,[IsGroup], [IsGroup and IsFinite],0); From 3785333856db18322bf39245fd2bdeb08833dc55 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 8 Aug 2017 13:54:33 +0100 Subject: [PATCH 2/8] Fix: Pseudorandom for fp on rank 1. --- lib/grpfp.gi | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/grpfp.gi b/lib/grpfp.gi index 7d8e46d60e..be9542a0f1 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -351,13 +351,18 @@ local gens, lim, n, r, l, w, a,la,f,up; if not IsBound(grp!.randomrange) or lim<>grp!.randlim then # there are 1+(n+1)(1+n+n^2+...+n^(lim-1))=(n^lim*(n+1)-2)/(n-1) # words of length up to lim in the free group on |gens| generators - up:=(n^lim*(n+1)-2)/(n-1); - if up>=2^28 then - f:=Int(up/2^28+1); - grp!.randomrange:=[1..2^28-1]; + if n=1 then + grp!.randomrange:=[1..Minimum(lim,2^28-1)]; + f:=1; else - grp!.randomrange:=[1..up]; - f:=1; + up:=(n^lim*(n+1)-2)/(n-1); + if up>=2^28 then + f:=Int(up/2^28+1); + grp!.randomrange:=[1..2^28-1]; + else + grp!.randomrange:=[1..up]; + f:=1; + fi; fi; l:=[Int(1/f),Int((n+2)/f)]; a:=n+1; From 8c349f1aa8436a5f30bd8e46710f9c4e4f5f2321 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 24 Oct 2017 15:13:29 -0600 Subject: [PATCH 3/8] FIX: Ensure same generating set is used in `Intersection' even if `Image' of homomorphisms wants to use differently. This fixes #1774 --- lib/grpfp.gi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/grpfp.gi b/lib/grpfp.gi index be9542a0f1..90454c059d 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -429,6 +429,7 @@ local S; # return S; # fi; + Assert(1,Length(GeneratorsOfGroup(Q))=Length(GeneratorsOfGroup(fam!.wholeGroup))); S := Objectify(NewType(fam, IsGroup and IsSubgroupOfWholeGroupByQuotientRep and IsAttributeStoringRep ), rec(quot:=Q,sub:=U) ); @@ -1970,7 +1971,7 @@ local d,A,B,e1,e2,Ag,Bg,s,sg,u,v; if HasSize(s) and IsPermGroup(s) and (Size(s)=Size(A) or Size(s)=Size(B) or NrMovedPoints(s)>1000) then d:=SmallerDegreePermutationRepresentation(s); - A:=Image(d,s); + A:=SubgroupNC(Range(d),List(GeneratorsOfGroup(s),x->ImagesRepresentative(d,x))); if NrMovedPoints(A) Date: Tue, 24 Oct 2017 15:15:54 -0600 Subject: [PATCH 4/8] ENHANCE: Minor improvements to intermediate subgroups Added Synonym: EmbeddedConjugates, EmbeddingConjugates also added private option to ease debugging by forcing old code to run. --- lib/grplatt.gd | 2 ++ lib/grplatt.gi | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/grplatt.gd b/lib/grplatt.gd index 6fc2951256..8601f812c0 100644 --- a/lib/grplatt.gd +++ b/lib/grplatt.gd @@ -469,6 +469,7 @@ DeclareGlobalFunction("LowLayerSubgroups"); ## <#/GAPDoc> ## DeclareOperation("ContainedConjugates",[IsGroup,IsGroup,IsGroup]); +DeclareSynonym("EmbeddedConjugates",ContainedConjugates); ############################################################################# ## @@ -493,6 +494,7 @@ DeclareOperation("ContainedConjugates",[IsGroup,IsGroup,IsGroup]); ## <#/GAPDoc> ## DeclareOperation("ContainingConjugates",[IsGroup,IsGroup,IsGroup]); +DeclareSynonym("EmbeddingConjugates",ContainingConjugates); ############################################################################# ## diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 991022fff0..7de00ef3bd 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -2349,7 +2349,7 @@ local uind,subs,incl,i,j,k,m,gens,t,c,p,conj,bas,basl,r; TryNextMethod(); fi; uind:=IndexNC(G,U); - if uind<200 then + if uind<200 and ValueOption("usemaximals")<>true then TryNextMethod(); fi; subs:=[G]; #subgroups so far From f576c97ee29a0a17f3947a897febd531b7ea62f4 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 24 Oct 2017 15:18:58 -0600 Subject: [PATCH 5/8] ENHANCE: Robustness fix for DoConjugateInto, less storage when comparing double cosets. --- lib/csetgrp.gi | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/lib/csetgrp.gi b/lib/csetgrp.gi index a6147762a4..b00f607fcc 100644 --- a/lib/csetgrp.gi +++ b/lib/csetgrp.gi @@ -239,8 +239,8 @@ local o,b,img,G1,c,m,hardlimit,gens,t,k,intersize; fi; od; else - t:=DoConjugateInto(G,c,U,true:intersize:=intersize); - if t<>fail then + t:=DoConjugateInto(G,c,U,true:intersize:=intersize,onlyone:=true); + if t<>fail and t<>[] then Info(InfoCoset,2,"Found Size ",Size(c),"\n"); return c^(Inverse(t)); fi; @@ -256,7 +256,7 @@ local o,b,img,G1,c,m,hardlimit,gens,t,k,intersize; if IsInt(c) then hardlimit:=c; else - hardlimit:=100000; + hardlimit:=1000000; fi; if Index(G,U)>hardlimit then return fail;fi; @@ -428,10 +428,25 @@ end); InstallMethod(\=,"DoubleCosets",IsIdenticalObj,[IsDoubleCoset,IsDoubleCoset],0, function(a,b) - return LeftActingGroup(a)=LeftActingGroup(b) and - RightActingGroup(a)=RightActingGroup(b) and - RepresentativesContainedRightCosets(a) + if LeftActingGroup(a)<>LeftActingGroup(b) or + RightActingGroup(a)<>RightActingGroup(b) then + return false; + fi; + # avoid forcing RepresentativesContainedRightCosets on both if one has + if HasRepresentativesContainedRightCosets(b) then + if HasRepresentativesContainedRightCosets(a) then + return RepresentativesContainedRightCosets(a) =RepresentativesContainedRightCosets(b); + else + return CanonicalRightCosetElement(LeftActingGroup(a), + Representative(a)) in + RepresentativesContainedRightCosets(b); + fi; + else + return CanonicalRightCosetElement(LeftActingGroup(b), + Representative(b)) in + RepresentativesContainedRightCosets(a); + fi; end); InstallMethod(ViewString,"DoubleCoset",true,[IsDoubleCoset],0, From 6b5def880b268d02f45ecea05ca5563b0a896250 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Thu, 26 Oct 2017 09:46:59 -0600 Subject: [PATCH 6/8] Change examples in manual to not require number of generators. Otherwise manual tests fail due to changes in automorphism group generators. --- lib/gprd.gd | 14 ++++---------- lib/grppcext.gd | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/gprd.gd b/lib/gprd.gd index 330938fc79..af5d5452da 100644 --- a/lib/gprd.gd +++ b/lib/gprd.gd @@ -191,8 +191,7 @@ DeclareGlobalFunction("SubdirectDiagonalPerms"); ## gap> au:=DerivedSubgroup(AutomorphismGroup(n));; ## gap> Size(au); ## 120 -## gap> p:=SemidirectProduct(au,n); -## +## gap> p:=SemidirectProduct(au,n);; ## gap> Size(p); ## 3000 ## gap> n:=Group((1,2),(3,4));; @@ -206,16 +205,11 @@ DeclareGlobalFunction("SubdirectDiagonalPerms"); ## ## gap> n:=AbelianGroup(IsPcGroup,[2,2]); ## -## gap> au:=AutomorphismGroup(n); -## -## gap> apc:=IsomorphismPcGroup(au); -## CompositionMapping( Pcgs([ (2,3), (1,2,3) ]) -> -## [ f1, f2 ], ) +## gap> au:=AutomorphismGroup(n);; +## gap> apc:=IsomorphismPcGroup(au);; ## gap> g:=Image(apc); ## Group([ f1, f2 ]) -## gap> apci:=InverseGeneralMapping(apc); -## [ f1*f2^2, f1*f2 ] -> [ Pcgs([ f1, f2 ]) -> [ f1*f2, f2 ], -## Pcgs([ f1, f2 ]) -> [ f2, f1 ] ] +## gap> apci:=InverseGeneralMapping(apc);; ## gap> IsGroupHomomorphism(apci); ## true ## gap> p:=SemidirectProduct(g,apci,n); diff --git a/lib/grppcext.gd b/lib/grppcext.gd index 5b9fa89d38..89ee59d2ce 100644 --- a/lib/grppcext.gd +++ b/lib/grppcext.gd @@ -190,8 +190,8 @@ DeclareOperation( "Extensions", [ CanEasilyComputePcgs, IsObject ] ); ## gap> M := GModuleByMats( mats, GF(2) );; ## gap> A := AutomorphismGroup( G );; ## gap> B := GL( 1, 2 );; -## gap> D := DirectProduct( A, B ); -## +## gap> D := DirectProduct( A, B );; Size(D); +## 6 ## gap> P := CompatiblePairs( G, M, D ); ## ## gap> ExtensionRepresentatives( G, M, P ); From 1252edaf7518677d8973e3c65315147f2f43883c Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 31 Oct 2017 15:30:17 -0600 Subject: [PATCH 7/8] FIX: When copying a new augmented coset table also allow for further names of components: "one" and "useAddition". This fixes #1819. --- lib/sgpres.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sgpres.gi b/lib/sgpres.gi index 708437ec39..1b6bd7389f 100644 --- a/lib/sgpres.gi +++ b/lib/sgpres.gi @@ -2202,7 +2202,7 @@ local t,j; t:=rec(isNewAugmentedTable:=true); for j in [ "A", "aug", "ct", "defcount", "from", "homgenims", "homgens", - "index", "n", "offset", "primaryImages", "rels", + "index", "n", "offset", "primaryImages", "rels","one","useAddition", "secondary", "secount", "secondaryImages", "subgens" ] do if IsBound(aug.(j)) then t.(j):=aug.(j); From 0cb7461a7180d14893d98e93e6918fab7e329ff3 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Tue, 31 Oct 2017 16:09:42 -0600 Subject: [PATCH 8/8] ENHANCE: Allow perfect subgroups from library of perfect groups even if NoPrecomputedData option is set -- otherwise the calculation cannot but fail. This fixes #1822. --- lib/grplatt.gi | 6 ++++-- tst/testextra/grplatt.tst | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 7de00ef3bd..5cab99c7c2 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -885,7 +885,7 @@ InstallGlobalFunction(LatticeViaRadical,function(arg) pcgs:=ser[2]; ser:=ser[1]; if Index(G,ser[1])=1 then - Info(InfoWarning,1,"group is solvable"); + Info(InfoWarning,3,"group is solvable"); hom:=NaturalHomomorphismByNormalSubgroup(G,G); hom:=hom*IsomorphismFpGroup(Image(hom)); u:=[[G],[G],[hom]]; @@ -1373,7 +1373,9 @@ local badsizes,n,un,cl,r,i,l,u,bw,cnt,gens,go,imgs,bg,bi,emb,nu,k,j, Length(ConjugacyClasses(G))," to consider"); if Length(un)>0 and ValueOption(NO_PRECOMPUTED_DATA_OPTION)=true then - Error("Cannot get perfect subgroups without data library!"); + Info(InfoWarning,1, + "Using (despite option) data library of perfect groups, as the perfect\n", + "#I subgroups otherwise cannot be obtained!"); elif Length(un)>0 then Info(InfoPerformance,2,"Using Perfect Groups Library"); fi; diff --git a/tst/testextra/grplatt.tst b/tst/testextra/grplatt.tst index e25ec76b54..4687b52571 100644 --- a/tst/testextra/grplatt.tst +++ b/tst/testextra/grplatt.tst @@ -190,6 +190,8 @@ gap> Length(MaximalSubgroupClassReps(g)); gap> Length(ConjugacyClassesSubgroups(SymmetricGroup(7))); 96 gap> Length(ConjugacyClassesSubgroups(SymmetricGroup(7):NoPrecomputedData)); +#I Using (despite option) data library of perfect groups, as the perfect +#I subgroups otherwise cannot be obtained! 96 # thats all, folks