/usr/share/gap/pkg/Polycyclic/gap/pcpgrp/nilpot.gi is in gap-polycyclic 2.11-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | ############################################################################
##
#W nilpot.gi Polycyc Bettina Eick
#W Werner Nickel
##
## This file defines special functions for nilpotent groups. The
## corresponding methods are usually defined with the general methods
## for pcp groups in other files.
##
#############################################################################
##
#F MinimalGeneratingSet( G )
##
MinimalGeneratingSetNilpotentPcpGroup := function( G )
return GeneratorsOfPcp( Pcp( G, DerivedSubgroup(G), "snf" ) );
end;
#############################################################################
##
#F PcpNextStepCentralizer( gens, cent, pcp )
##
PcpNextStepCentralizer := function( gens, cent, pcp )
local pcpros, rels, i, g, newgens, matrix, notcentral, h,
pcpgens, comm, null, j, elm, r, l;
pcpgens := GeneratorsOfPcp( pcp );
pcpros := RelativeOrdersOfPcp( pcp );
## Get the relations in this factor group.
rels := [];
for i in [1..Length(pcpgens)] do
if pcpros[i] > 0 then
r := ExponentsByPcp( pcp, pcpgens[i]^pcpros[i] );
r[i] := -pcpros[i];
Add( rels, r );
fi;
od;
for g in gens do
#Print("start gen ",g,"\n");
if Length( cent ) = 0 then return []; fi;
newgens := [];
matrix := [];
notcentral := [];
for h in cent do
comm := ExponentsByPcp( pcp, Comm( h, g ) );
if comm = 0 * comm then
Add( newgens, h );
else
Add( notcentral, h );
Add( matrix, comm );
fi;
od;
#Print(" got matrix \n");
if Length( matrix ) > 0 then
# add the relations to the matrix.
Append( matrix, rels );
# get nullspace
null := PcpNullspaceIntMat( matrix );
#Print(" solved matrix \n");
# calculate elements corresponding to null
l := Length( notcentral );
for j in [1..Length(null)] do
elm := MappedVector( null[j]{[1..l]}, notcentral );
if elm <> elm^0 then
Add( newgens, elm );
fi;
od;
fi;
cent := newgens;
od;
return cent;
end;
#############################################################################
##
#F CentralizeByCentralSeries( G, gens, ser )
##
CentralizeByCentralSeries := function( G, gens, ser )
local cent, i, pcp;
cent := ShallowCopy( GeneratorsOfPcp( Pcp( ser[1], ser[2] ) ) );
for i in [2..Length(ser)-1] do
pcp := Pcp( ser[i], ser[i+1] );
cent := PcpNextStepCentralizer( gens, cent, pcp );
Append( cent, GeneratorsOfPcp( pcp ) );
od;
Append( cent, GeneratorsOfGroup( ser[Length(ser)] ) );
return cent;
end;
#############################################################################
##
#F Centre( G )
##
CentreNilpotentPcpGroup := function(G)
local ser, gens, cent;
if Length(Igs(G)) = 0 then return G; fi;
ser := LowerCentralSeriesOfGroup(G);
gens := Reversed(GeneratorsOfPcp( Pcp( ser[1], ser[2] ) ));
cent := CentralizeByCentralSeries( G, gens, ser );
return Subgroup( G, cent );
end;
#############################################################################
##
#F Centralizer
##
CentralizerNilpotentPcpGroup := function( G, g )
local sers, cent, U;
if Length(Igs(G)) = 0 then return G; fi;
if IsPcpElement(g) then
if not g in G then TryNextMethod(); fi;
sers := LowerCentralSeriesOfGroup(G);
cent := CentralizeByCentralSeries( G, [g], sers );
elif IsPcpGroup(g) then
if not IsSubgroup( G, g ) then TryNextMethod(); fi;
SetIsNilpotentGroup( g, true );
sers := LowerCentralSeriesOfGroup(G);
cent := CentralizeByCentralSeries( G, MinimalGeneratingSet(g), sers );
fi;
return Subgroup( G, cent );
end;
#############################################################################
##
#F UpperCentralSeriesNilpotentPcpGroup( G )
##
UpperCentralSeriesNilpotentPcpGroup := function( G )
local ser, gens, C, upp;
ser := LowerCentralSeriesOfGroup(G);
gens := GeneratorsOfPcp( Pcp( ser[1], ser[2] ) );
C := TrivialSubgroup( G );
upp := [C];
while IndexNC( G, C ) > 1 do
ser := ModuloSeries( ser, C );
C := CentralizeByCentralSeries( G, gens, ser );
C := Subgroup( G, C );
Add( upp, C );
od;
upp[ Length(upp) ] := G;
return Reversed( upp );
end;
|