File: coeilenberg.gi

package info (click to toggle)
gap-hap 1.66%2Bds-1
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 55,348 kB
  • sloc: xml: 15,368; sh: 216; javascript: 155; makefile: 126; ansic: 57; perl: 36
file content (45 lines) | stat: -rw-r--r-- 1,448 bytes parent folder | download | duplicates (3)
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

###############################################################
###############################################################
InstallGlobalFunction(CohomologySimplicialFreeAbelianGroup,
function(K,n)
local p, q, H, D, ans, mlen, bool;

bool:=false;

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

mlen:=EvaluateProperty(K,"moorecomplexlength");
ans:=[];
for  p in [0..n-1] do
   q:=n-p;
   if p<=q*mlen then
if p+1>EvaluateProperty(K,"length") then bool:=true; fi;
      D:=ContractedComplex(E1HomologyPage(K,q,p+1));
      D:=SparseChainComplexToChainComplex(D);
      D:=HomToIntegers(D);
      H:= Cohomology(D,p) ;
      if Length(H)>0 then 
         Append(ans,H);
      fi;
   fi;
od;

#if n>=EvaluateProperty(K,"length") then
if bool then 
Print("WARNING: The computed answer is guaranteed only to be a summand of the correct answer. You'll need to use more terms of the simplicial abelian group to make sure there is no other summand.\n");
fi;

return ans;
end);
###############################################################
###############################################################

#####################################################################
InstallOtherMethod(Cohomology,
"integral homology of simplicial free abelian group",
[IsHapSimplicialFreeAbelianGroup,IsInt],
function(K,n) return CohomologySimplicialFreeAbelianGroup(K,n);
end);
#####################################################################