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 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
|
#(C) Graham Ellis, 2005-2006
#####################################################################
InstallGlobalFunction(ResolutionFiniteSubgroup,
function(arg)
local
R,gensG,gensK,
DimensionR, BoundaryR, HomotopyR, EltsG,
Dimension, Boundary, BoundaryRec, Homotopy, EltsK,
G, K, TransK, sK,
Gword2Kword, G2K, G2KRec, Pair2Int, Int2Pair,
Mult, MultRec, FIN, i,HomotopyRec;
if Length(arg)=3 then
R:=arg[1]; gensG:=arg[2]; gensK:=arg[3];
fi;
if Length(arg)=2 then
R:=arg[1]; gensG:=R!.group; gensK:=arg[2];
fi;
#gensG and gensK originally had to be
#generating sets. Later I allowed them to be
#the groups G, K themselves. Sloppy!
DimensionR:=R!.dimension;
BoundaryR:=R!.boundary;
HomotopyR:=R!.homotopy;
EltsG:=R!.elts;
if IsList(gensG) then G:=Group(gensG); else G:=gensG; fi;
if IsList(gensK) then K:=Group(gensK); else K:=gensK; fi;
if Size(G)=Length(EltsG) then FIN:=true; else FIN:= false; fi;
if FIN then
if IsPseudoList(EltsG) then EltsK:=EltsG;
else
EltsK:=Elements(K);
fi;
else
EltsK:=[];
fi;
TransK:=RightTransversal(G,K);
sK:=Size(TransK);
if FIN then
#####################################################################
Mult:=function(i,j);
return Position(EltsG,TransK[i]*EltsG[j]);
end;
#####################################################################
else
MultRec:=List([1..Length(TransK)],i->[]);
#####################################################################
Mult:=function(i,j) local x,r;
if not IsBound(MultRec[i][j]) then
x:=TransK[i]*EltsG[j];
r:=Position(EltsG,x);
if r=fail then Add(EltsG,x); r:=Length(EltsG); fi;
return r;
MultRec[i][j]:= r;
fi;
return MultRec[i][j];
end;
#####################################################################
fi;
#####################################################################
Dimension:=function(n);
return sK*DimensionR(n);
end;
#####################################################################
if FIN then
#####################################################################
G2K:=function(g)
local t,k;
t:=PositionCanonical(TransK,EltsG[g]);
k:=Position(EltsK,EltsG[g]*TransK[t]^-1);
return [k,t];
end;
#####################################################################
else
G2KRec:=[];
#####################################################################
G2K:=function(g)
local t,k,x;
if not IsBound(G2KRec[g]) then
t:=PositionCanonical(TransK,EltsG[g]);
x:=EltsG[g]*TransK[t]^-1;
k:=Position(EltsK,x);
if k=fail then Add(EltsK,x); k:=Length(EltsK); fi;
G2KRec[g]:= [k,t];
fi;
return G2KRec[g];
end;
#####################################################################
fi;
#####################################################################
Pair2Int:=function(x)
local i,t;
i:=x[1]; t:=x[2];
return SignInt(i)*((AbsoluteValue(i)-1)*sK + t);
end;
#####################################################################
#####################################################################
Int2Pair:=function(i)
local j,k, x;
j:=AbsoluteValue(i);
x:=j mod sK;
k:=(j-x)/sK;
if not x=0 then return [SignInt(i)*(k+1),x]; else
return [SignInt(i)*k,sK]; fi;
end;
#####################################################################
#####################################################################
Gword2Kword:=function(w)
local x, y, v;
v:=[];
for x in w do
y:=G2K(x[2]);
y:=[Pair2Int([x[1],y[2]]),y[1]];
Add(v,y);
od;
return v;
end;
#####################################################################
BoundaryRec:=[];
for i in [1..EvaluateProperty(R,"length")] do
BoundaryRec[i]:=[];
od;
#####################################################################
Boundary:=function(n,ii)
local x, w, i;
if n<=0 then return []; fi;
i:=AbsInt(ii);
if not IsBound(BoundaryRec[n][i]) then
x:=Int2Pair(i);
w:=StructuralCopy(BoundaryR(n,x[1]));
Apply(w, y->[y[1],Mult(x[2],y[2])]);
#Apply(w, y->[y[1],Position(EltsG,TransK[x[2]]*EltsG[y[2]]) ]); #Changed this back but forgot why this line was ever here!!
BoundaryRec[n][i]:= Gword2Kword(w);
###BoundaryRec[n][i]:=AlgebraicReduction(BoundaryRec[n][i]);
fi;
if ii>0 then return BoundaryRec[n][i];
else return NegateWord(BoundaryRec[n][i]); fi;
end;
#####################################################################
HomotopyRec:=List([0..Length(R)],i->List([1..Dimension(i)],j->[]));;
######################
Homotopy:=function(n,e)
local x,g,pos,ae;
ae:=AbsInt(e[1]);
if not IsBound(HomotopyRec[n+1][ae][e[2]]) then
x:=Int2Pair(ae);
g:=EltsK[e[2]]*TransK[x[2]]; #Need to check the maths again here!
pos:=Position(EltsG,g);
if pos =fail then Add(EltsG,g); pos:=Length(EltsG);fi;
HomotopyRec[n+1][ae][e[2]]:= Gword2Kword( R!.homotopy(n,[x[1],pos]));
fi;
if e[1]>0 then return HomotopyRec[n+1][ae][e[2]];
else return NegateWord(HomotopyRec[n+1][ae][e[2]]);
fi;
end;
######################
return Objectify(HapResolution,
rec(
dimension:=Dimension,
boundary:=Boundary,
homotopy:=Homotopy,
elts:=EltsK,
group:=K,
Int2Pair:=Int2Pair,
transversal:=TransK,
properties:=
[["length",EvaluateProperty(R,"length")],
["characteristic",EvaluateProperty(R,"characteristic")],
["reduced",false],
["type","resolution"] ]));
end);
#####################################################################
|