Skip to content

Commit

Permalink
AbelInv and IndepGens are called once at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
hungaborhorvath committed Feb 11, 2016
1 parent cbfea49 commit 29f6920
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1018,16 +1018,18 @@ InstallMethod( FrattiniSubgroup, "generic method for nilpotent groups",
RankFilter( IsGroup and IsNilpotentGroup )
- RankFilter( IsGroup ),
function(G)
local i, p, q, gen, Gf;
local i, abinv, indgen, p, q, gen, Gf;
if IsTrivial(G) then
return G;
elif IsAbelian(G) then
gen := [ ];
for i in [1..Length(AbelianInvariants(G))] do
q := AbelianInvariants(G)[i];
abinv := AbelianInvariants(G);
indgen := IndependentGeneratorsOfAbelianGroup(G);
for i in [1..Length(abinv)] do
q := abinv[i];
if q<>0 and not IsPrime(q) then
p := SmallestRootInt(q);
Add(gen, IndependentGeneratorsOfAbelianGroup(G)[i]^p);
Add(gen, indgen[i]^p);
fi;
od;
return SubgroupNC(G, gen);
Expand Down

0 comments on commit 29f6920

Please sign in to comment.