/usr/share/gap/pkg/Polycyclic/gap/pcpgrp/polyz.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 | ############################################################################
##
#W polyz.gi Polycyc Bettina Eick
##
############################################################################
##
#F GeneratorsOfCentralizerOfPcp( gens, pcp )
##
GeneratorsOfCentralizerOfPcp := function( gens, pcp )
local idm, v, mats;
idm := IdentityMat( Length( pcp ), GF( RelativeOrdersOfPcp(pcp)[1] ) );
for v in idm do
mats := LinearActionOnPcp( gens, pcp );
gens := PcpOrbitStabilizer( v, gens, mats, OnRight ).stab;
od;
return gens;
end;
############################################################################
##
#F PolyZNormalSubgroup( G )
##
## returns a normal subgroup N of finite index in G such that N has a
## normal series with free abelian factors.
##
InstallGlobalFunction( PolyZNormalSubgroup, function( G )
local N, F, U, ser, nat, pcps, m, i, free, j, p;
# set up
N := TrivialSubgroup( G );
ser := [N];
nat := IdentityMapping( G );
F := Image( nat );
# loop
while not IsFinite( F ) do
# get gens of free abelian normal subgroup
pcps := PcpsOfEfaSeries(F);
m := Length( pcps );
i := m;
while RelativeOrdersOfPcp( pcps[i] )[1] > 0 do
i := i - 1;
od;
free := AsList( pcps[i] );
for j in [i+1..m] do
free := GeneratorsOfCentralizerOfPcp( free, pcps[j] );
p := RelativeOrdersOfPcp( pcps[j] )[1];
if p = 2 then
free := List( free, x -> x^4 );
else
free := List( free, x -> x^p );
fi;
od;
# reset
U := Subgroup( F, free );
N := PreImage( nat, U );
Add( ser, N );
nat := NaturalHomomorphism( G, N );
F := Image( nat );
od;
SetEfaSeries( N, Reversed( ser ) );
return N;
end );
|