File: gchaincomplex.gi

package info (click to toggle)
gap-hap 1.74%2Bds-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 58,664 kB
  • sloc: xml: 16,678; sh: 197; javascript: 155; makefile: 121; ansic: 47; perl: 24
file content (138 lines) | stat: -rw-r--r-- 3,262 bytes parent folder | download | duplicates (2)
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

#####################################################################
#####################################################################
IsHapGChainComplex:=NewFilter("IsHapGChainComplex");;
HapGChainComplex:=NewType(FamilyObj(rec()),
                   IsHapGChainComplex
                   and IsComponentObjectRep
                   and IsHapComplex);;

InstallMethod( ViewObj,
"for HapGChainComplex",
[IsHapGChainComplex],
function(R)
Print("G-chain complex in characteristic ", EvaluateProperty(R,"characteristic"),
 " for "); ViewObj(R!.group); Print(" . \n");
 end);

InstallMethod( PrintObj,
"for HapGChainComplex",
[IsHapGChainComplex],
function(R)
Print("G-chain complex of length ",
EvaluateProperty(R,"length"),
" in characteristic ", EvaluateProperty(R,"characteristic"),
" for ", R!.group," . \n");
end);
#####################################################################
#####################################################################


######################################################
######################################################
GChainComplex:=function(K,G)
local Ksimps,R, orbits, stabilizers, stabfn, Dim, lessthan, boundfn,
elts, i, k, x, m,action ,ontuples;

elts:=Elements(G);
Ksimps:=[];
for k in [1..1+Dimension(K)] do
Ksimps[k]:=List(K!.simplicesLst[k],x->StructuralCopy(x));
od;

#############################
action:=function(a,b,c) return 1; end;
#############################

#############################
ontuples:=function(x,g)
local g1;
g1:=g^-1;
return OnTuples(x,g1);
end;
#############################

lessthan:=function(a,b) return Order(a)<Order(b); end;
for k in [1..Dimension(K)+1] do
for x in Ksimps[k] do
Sort(x,lessthan);
od;
od;

orbits:=[];
for k in [1..1+Dimension(K)] do
orbits[k]:=OrbitsDomain(G,Ksimps[k], ontuples);
od;

stabilizers:=[];
for k in [1..1+Dimension(K)] do
stabilizers[k]:=[];
for i in [1..Length(orbits[k])] do
stabilizers[k][i]:=Stabilizer(G,orbits[k][i][1],ontuples);
od;od;

######################
Dim:=function(k)
if k<0 or k>Dimension(K) then return 0; fi;
return Length(orbits[k+1]);
end;
######################

######################
stabfn:=function(k,i)
return stabilizers[k+1][i];
end;
######################

######################
boundfn:=function(n,i)
local V,Vhat, ii, j, m,bnd,g,ob;

if n<=0 then return []; fi;

V:=orbits[n+1][i][1];
V:=SSortedList(V);

bnd:=[];

for j in [1..Length(V)] do
Vhat:=StructuralCopy(V);
RemoveSet(Vhat,V[j]);
m:=K!.enumeratedSimplex(Vhat);
m:=Ksimps[n][m];
for ii in [1..Length(orbits[n])] do
if m in orbits[n][ii] then ob:=ii; break; fi;
od; 
for g in [1..Length(elts)] do
if ontuples(orbits[n][ob][1],elts[g])=m then break; fi;
od;
if IsOddInt(j) then
Add(bnd,[ob,g]);
else
Add(bnd,[-ob,g]);
fi;
od;

return bnd;

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

R:=Objectify(HapGChainComplex,
            rec(
            dimension:=Dim,
            boundary:=boundfn,
            homotopy:=fail,
            elts:=Elements(G),
            group:=G,
            stabilizer:=stabfn,
            action:=action,
            properties:=
            [["length",Dimension(K)],
             ["characteristic",0]]));

return R;
end;
######################################################
######################################################