Skip to content

Commit

Permalink
CLEANUP: Use new attribute AbelianRank to clean up gen. nr. arguments
Browse files Browse the repository at this point in the history
in multiple places.
  • Loading branch information
hulpke committed Aug 23, 2018
1 parent 2051d42 commit 8105faf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/autsr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,7 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs,

# do we use induced radical automorphisms to help next step?
if Size(KernelOfMultiplicativeGeneralMapping(hom))>1 and
Size(A)>10^8 and (IsAbelian(r) or
Length(AbelianInvariants(r))<10)
Size(A)>10^8 and (IsAbelian(r) or AbelianRank(r)<10)
#(
## potentially large GL
#Size(GL(Length(MPcgs),RelativeOrders(MPcgs)[1]))>10^10 and
Expand Down
4 changes: 4 additions & 0 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@ InstallTrueMethod( IsPolycyclicGroup,
##
DeclareAttribute( "AbelianInvariants", IsGroup );

# minimal number of generators for abelianization. Used internally to check
# whether it is worth to attempt to reduce generator number
DeclareAttribute( "AbelianRank", IsGroup );

#############################################################################
##
#A IsInfiniteAbelianizationGroup( <G> )
Expand Down
12 changes: 12 additions & 0 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,18 @@ InstallMethod( AbelianInvariants,
return inv;
end );

InstallMethod( AbelianRank ,"generic method for groups", [ IsGroup ],0,
function(G)
local a,r;
a:=AbelianInvariants(G);
r:=Number(a,IsZero);
a:=Filtered(a,x->not IsZero(x));
if Length(a)=0 then return r; fi;
a:=List(Set(Factors(Product(a))),p->Number(a,x->x mod p=0));
return r+Maximum(a);
end);


#############################################################################
##
#M IsInfiniteAbelianizationGroup( <G> )
Expand Down
2 changes: 1 addition & 1 deletion lib/grppclat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ InstallMethod(CharacteristicSubgroups,"solvable, automorphisms",true,
[IsGroup and IsSolvableGroup],0,
function(G)
local A,s;
if Length(AbelianInvariants(G))<5 then
if AbelianRank(G)<5 then
TryNextMethod();
fi;
A:=AutomorphismGroup(G);
Expand Down
7 changes: 3 additions & 4 deletions lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,7 @@ local G,cl,lcl,len,comb,combc,com,a,cnt,s,alltwo;
#create just a list of ordinary classes.
lcl:=List(cl,i->Concatenation(List(i,j->j.classes)));
len:=1;
len:=Maximum(1,Length(MinimalGeneratingSet(
Image(IsomorphismPcGroup((G/DerivedSubgroup(G))))))-1);
len:=Maximum(1,AbelianRank(G)-1);
while true do
len:=len+1;
Info(InfoMorph,2,"Trying length ",len);
Expand Down Expand Up @@ -2188,8 +2187,8 @@ local m;
return fail;
fi;

if (Length(AbelianInvariants(G))>2 or Length(SmallGeneratingSet(G))>2) and Size(RadicalGroup(G))>1 then
# In place until a proper implementation of Cannon/Holt automorphism is
if (AbelianRank(G)>2 or Length(SmallGeneratingSet(G))>2) and Size(RadicalGroup(G))>1 then
# In place until a proper implementation of Cannon/Holt isomorphism is
# made available.
return PatheticIsomorphism(G,H);
fi;
Expand Down

0 comments on commit 8105faf

Please sign in to comment.