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
|
#(C) Graham Ellis, 2005-2006
#####################################################################
#####################################################################
#####################################################################
InstallGlobalFunction(HomToIntegersModP,
function(X,prime)
local HomToZ_Obj,
HomToZ_Arr;
#####################################################################
#####################################################################
HomToZ_Obj:=function(R)
local
BoundaryC,
LengthC,
M,
myOne,
Charact;
#One:=Elements(GaloisField(prime))[2];
myOne:=One(GF(prime));
LengthC:=EvaluateProperty(R,"length");
M:=[1..LengthC];
#####################################################################
BoundaryC:=function(N,k)
local
n,row, Mt, i, j, x, sum;
n:=N+1;
if n <0 then return false; fi;
if n=0 then
#return List([1..R!.dimesnion(1)],x->0); fi;
return [1..R!.dimesnion(1)]*0; fi;
if M[n]=n then
Mt:=[];
if R!.dimension(n)>0 then
for i in [1..R!.dimension(n)] do
row:=[];
for j in [1..R!.dimension(n-1)] do
sum:=0;
for x in R!.boundary(n,i) do
if AbsoluteValue(x[1])=j then
sum := sum + SignInt(x[1]);
fi;
od;
row[j]:=sum;
od;
Mt[i]:=row;
od;
M[n]:=TransposedMat(Mt);
else
row:=[];
for j in [1..R!.dimension(n-1)] do
row[j]:=0;
od;
for i in [1..R!.dimension(n-1)] do
Append(Mt,[row]);
od;
M[n]:=Mt;
fi;
fi;
return M[n][k]*myOne;
end;
#####################################################################
if EvaluateProperty(R,"characteristic")=0
or EvaluateProperty(R,"characteristic")=prime
then Charact:=prime;
else
Print("ERROR: You probably entered the wrong prime. \n");
return fail; fi;
return Objectify(HapCochainComplex,
rec(
dimension:=R!.dimension,
boundary:=BoundaryC,
properties:=
[["length",LengthC],
["connected",true],
["type", "cochainComplex"],
["characteristic", Charact]
]));
end;
#####################################################################
#####################################################################
#####################################################################
#####################################################################
HomToZ_Arr:=function(F)
local
R,S,RhomS, #R->S is an equivariant chain
#map. C<-D is the chain map
C,D,DhomC, #got by Homing.
DimensionC,
DimensionD, #Throughout the program we
x; #identify R and S with their
R:=F!.source; #duals Hom(R,Z).
S:=F!.target;
RhomS:=F!.mapping;
C:=HomToZ_Obj(R);
D:=HomToZ_Obj(S);
DimensionC:=C!.dimension;
DimensionD:=D!.dimension;
#####################################################################
DhomC:=function(v,n)
local
u, i,j,temp,x;
#u:=List([1..DimensionC(n)],x->0);
u:=[1..DimensionC(n)]*0;
for i in [1..DimensionD(n)] do
for j in [1..DimensionC(n)] do
temp:=0;
for x in List(RhomS([[j,1]],n),y->y[1]) do
if x=i then temp:=temp+1;fi;
if x=-i then temp:=temp-1; fi;
od;
u[j]:=u[j]+temp*v[i];
od;
od;
return u;
end;
#####################################################################
return Objectify(HapCochainMap,
rec(
source:=D,
target:=C,
mapping:=DhomC,
properties:=[ ["type","cochainMap"],
["characteristic", prime
]
]));
end;
#####################################################################
#####################################################################
if EvaluateProperty(X,"type") = "resolution" then
return HomToZ_Obj(X); fi;
if EvaluateProperty(X,"type") = "equivariantChainMap" then
return HomToZ_Arr(X); fi;
if EvaluateProperty(X,"type") = "chainComplex" then
return HAP_HomToIntModP_ChainComplex(X,prime); fi;
if EvaluateProperty(X,"type") = "chainMap" then
return HAP_HomToIntModP_ChainMap(X,prime); fi;
if EvaluateProperty(X,"type") = "cochainComplex" then
return HAP_HomToIntModP_CochainComplex(X,prime); fi;
if EvaluateProperty(X,"type") = "cochainMap" then
return HAP_HomToIntModP_CochainMap(X,prime); fi;
return fail;
Print("ERROR: Input should be a resolution or equivariant map between resolutions. \n");
end);
#####################################################################
#####################################################################
#####################################################################
|