Skip to content

Commit

Permalink
Merge pull request #1809 from hulpke/additions
Browse files Browse the repository at this point in the history
Fixes/Improvements that should make the 4.9 release, fixing a number of issues that were brought up.
  • Loading branch information
hulpke committed Nov 5, 2017
2 parents 4cf9b71 + 0cb7461 commit 67dc403
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 29 deletions.
27 changes: 21 additions & 6 deletions lib/csetgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 4 additions & 10 deletions lib/gprd.gd
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ DeclareGlobalFunction("SubdirectDiagonalPerms");
## gap> au:=DerivedSubgroup(AutomorphismGroup(n));;
## gap> Size(au);
## 120
## gap> p:=SemidirectProduct(au,n);
## <permutation group with 5 generators>
## gap> p:=SemidirectProduct(au,n);;
## gap> Size(p);
## 3000
## gap> n:=Group((1,2),(3,4));;
Expand All @@ -206,16 +205,11 @@ DeclareGlobalFunction("SubdirectDiagonalPerms");
## <pc group with 3 generators>
## gap> n:=AbelianGroup(IsPcGroup,[2,2]);
## <pc group of size 4 with 2 generators>
## gap> au:=AutomorphismGroup(n);
## <group of size 6 with 2 generators>
## gap> apc:=IsomorphismPcGroup(au);
## CompositionMapping( Pcgs([ (2,3), (1,2,3) ]) ->
## [ f1, f2 ], <action isomorphism> )
## 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);
Expand Down
20 changes: 13 additions & 7 deletions lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -424,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) );
Expand Down Expand Up @@ -1965,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)<NrMovedPoints(s) then
Info(InfoFpGroup,3,"reduced degree from ",NrMovedPoints(s)," to ",
NrMovedPoints(A));
Expand Down
2 changes: 2 additions & 0 deletions lib/grplatt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ DeclareGlobalFunction("LowLayerSubgroups");
## <#/GAPDoc>
##
DeclareOperation("ContainedConjugates",[IsGroup,IsGroup,IsGroup]);
DeclareSynonym("EmbeddedConjugates",ContainedConjugates);

#############################################################################
##
Expand All @@ -493,6 +494,7 @@ DeclareOperation("ContainedConjugates",[IsGroup,IsGroup,IsGroup]);
## <#/GAPDoc>
##
DeclareOperation("ContainingConjugates",[IsGroup,IsGroup,IsGroup]);
DeclareSynonym("EmbeddingConjugates",ContainingConjugates);

#############################################################################
##
Expand Down
8 changes: 5 additions & 3 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2349,7 +2351,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
Expand Down
4 changes: 2 additions & 2 deletions lib/grppcext.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
## <group of size 6 with 4 generators>
## gap> D := DirectProduct( A, B );; Size(D);
## 6
## gap> P := CompatiblePairs( G, M, D );
## <group of size 6 with 2 generators>
## gap> ExtensionRepresentatives( G, M, P );
Expand Down
19 changes: 19 additions & 0 deletions lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,25 @@ local A;
return A;
end);

#############################################################################
##
#M AutomorphismGroup(<G>) . . 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);
Expand Down
2 changes: 1 addition & 1 deletion lib/sgpres.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions tst/testextra/grplatt.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67dc403

Please sign in to comment.