/usr/share/gap/pkg/Polycyclic/gap/basic/coldt.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 | ##
#F AddHallPolynomials
##
BindGlobal( "AddHallPolynomials", function( coll )
if not IsWeightedCollector( coll ) then
Error( "Hall polynomials can be computed ",
"for weighted collectors only" );
fi;
if not IsBound( coll![PC_DEEP_THOUGHT_POLS] ) or
coll![PC_DEEP_THOUGHT_POLS] = [] then
# Compute the deep thought polynomials
coll![PC_DEEP_THOUGHT_POLS] := Calcreps2(coll![PC_CONJUGATES], 8, 1);
# Compute the orders of the genrators of dtrws
CompleteOrdersOfRws(coll);
# reduce the coefficients of the deep thought polynomials
ReduceCoefficientsOfRws(coll);
SetIsPolynomialCollector( coll, true );
fi;
end );
##
#F SetDeepThoughtBoundary . . . set the generator from which on DT is used
##
BindGlobal( "SetDeepThoughtBound", function( coll, n )
coll![ PC_DEEP_THOUGHT_BOUND ] := n;
end );
##
## Methods for CollectWordOrFail.
##
InstallMethod(CollectWordOrFail,
"FTL collector with Hall polynomials, exponent vector, gen-exp-pairs",
[ IsFromTheLeftCollectorRep
and IsPolynomialCollector
and IsUpToDatePolycyclicCollector,
IsList,
IsList],
function( coll, l, genexp )
local res, i, n;
if Length(genexp) = 0 then return true; fi;
res := ObjByExponents( coll, l );
i := 1;
while i < Length(genexp) do
res := DTMultiply( res, [genexp[i], genexp[i+1]], coll );
i := i + 2;
od;
for i in [1..Length(l)] do l[i] := 0; od;
n := Length( res );
l{ res{[1,3..n-1]} } := res{ [2,4..n] };
return true;
end );
|