File: radical.gi

package info (click to toggle)
gap-hap 1.74%2Bds-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 58,664 kB
  • sloc: xml: 16,678; sh: 197; javascript: 155; makefile: 121; ansic: 47; perl: 24
file content (186 lines) | stat: -rw-r--r-- 4,173 bytes parent folder | download
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186


###############################################
###############################################
InstallGlobalFunction(RadicalSeriesOfResolution,
function(R)
local G, ordG, FG, FGdims, Tdims, T,L,prime, 
      Dimension, FDimension, Boundary, BoundRec, IntToPair, one, 
      PairToInt, cnt, Mult, invT, n, i,g, j, k, r,
      WordToVectorList, VectorListToWord ;

G:=R!.group;
ordG:=Order(G);
prime:=Factors(ordG)[1];

###################
###################
if not (IsPrime(EvaluateProperty(R,"characteristic"))
and
IsPrimePowerInt(ordG)) then
Print("The resolution must have prime characteristic for a prime-power group\n");
return fail;
fi;
###################
###################

one:=One(GF(prime));

###################
Mult:=function(g,h)
return Position(R!.elts,R!.elts[g]*R!.elts[h]);
end;
###################

###################
FG:=GroupAlgebraAsFpGModule(G);
L:=RadicalSeriesOfFpGModule(FG);;
L:=L{[1..Length(L)-1]};
L:=Reversed(L);
T:=List(L,x->GeneratorsOfFpGModule(x));
FGdims:=List(T,Length);
Tdims:=1*FGdims;
for i in [2..Length(FGdims)] do
FGdims[i]:=FGdims[i]+FGdims[i-1];
od;
T:=Concatenation(T); ##So T is the new basis

invT:=T^-1;
###################

###################
Dimension:=function(n)
if n>Length(R) then return 0; fi;
return ordG*R!.dimension(n);
end;
###################

###################
FDimension:=function(k,n)
if n>Length(R) then return 0; fi;
return FGdims[k]*R!.dimension(n);
end;
###################


##################################
IntToPair:=List([0..Length(R)],i->[]);
PairToInt:=List([0..Length(R)],i->List([1..R!.dimension(i)], j->[]));
# so i --> [r,g] where r is the FG summand and g is the (new basis) position 
# in summand

for n in [0..Length(R)] do
cnt:=0;
   for j in [1..Length(Tdims)] do
   for g in [1..Tdims[j]] do
   for r in [1..R!.dimension(n)] do
   cnt:=cnt+1;
   IntToPair[n+1][cnt]:=[r,g];
   if j>1 then IntToPair[n+1][cnt][2]:=IntToPair[n+1][cnt][2]+FGdims[j-1]; fi;
   PairToInt[n+1][IntToPair[n+1][cnt][1]][IntToPair[n+1][cnt][2]]:=cnt;
   od;
   od;
   od;
od;
################################

#####################################################################
WordToVectorList:=function(w,k) #w is a FG-word in R_k.
local v,x,r;                    #v is a list of vectors mod p.

v:=List([1..R!.dimension(k)],i->List([1..ordG],j->0*one) );

for x in w do
r:=AbsInt(x[1]);
v[r][x[2]]:=v[r][x[2]] + SignInt(x[1])*one;
od;

return v ;
end;
#####################################################################


#####################################################################
VectorListToWord:=function(v,n)  #returns a sparse word over F.
local w, r, g, vv;

w:=[];

for r in [1..Length(v)] do
for g in [1..Length(v[r])] do
if not IsZero(v[r][g]) then Add(w,[PairToInt[n+1][r][g],v[r][g]]); fi;
od;
od;

return w;
end;
#####################################################################


BoundRec:=List([1..Length(R)],i->[]);;

###################################
Boundary:=function(n,k)
local w, x,b, bnd, pr, gg,i;

if IsBound(BoundRec[n][AbsInt(k)]) then
if SignInt(k)>0 then return 1*BoundRec[n][k]; 
else
return NegateWord(BoundRec[n][k]);
fi;
fi;
 
pr:=IntToPair[n+1][AbsInt(k)];
r:=pr[1];
g:=pr[2];

w:=T[g];
gg:=[];
for i in [1..Length(w)] do
for j in [1..IntFFE(w[i])] do
Add(gg,i);
od;
od;

w:=R!.boundary(n,r);  #This is an FG-word
bnd:=[];
for i in gg do
b:=List(w, x->[x[1],Mult(i,x[2])]);
Append(bnd,b);
od;
bnd:=WordToVectorList(bnd,n-1);

for i in [1..Length(bnd)] do
if not IsZero(bnd[i]) then
bnd[i]:=bnd[i]*invT;
fi;
od;

bnd:=VectorListToWord(bnd,n-1);
BoundRec[n][AbsInt(k)]:=bnd;

if SignInt(k)=1 then return 1*bnd;
else return NegateWord(bnd); fi;

end;
###################


return 
Objectify(HapFilteredSparseChainComplex,
           rec(
           dimension:=Dimension,
           boundary:=Boundary,
           filteredDimension:=FDimension,
           properties:=[
           ["length",Length(R)],
           ["filtration_length",Length(FGdims)],
           ["type","FilteredChainComplex"],
           ["characteristic",prime]]
           ));


end);
###############################################
###############################################