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 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
|
#######################################################################
#0
#F ControlledSubdivision
##
InstallGlobalFunction(HAP_BaryCentricSubdivisionGComplex,
function(C)
local Cells,coBoundaries,N,i,Dims,pos,j,x,y,w,id,t,k,ck,c,s,a,v,g,b,
Elts,Rep,mult,ListUnion, Chains, IsSameOrbit, AddReturn,
Orbit, Dimension, StabRec, Action, Stabilizer, Boundary,
NChains, BoundaryRec, FinalBoundary;
Elts:=C!.elts;
##################################################################
# If g in Elts return the position of g in the list,
# otherwise, add g to Elts and return the position.
pos:=function(g)
local posit;
posit:=Position(Elts,g);
if posit=fail then
Add(Elts,g);
return Length(Elts);
else
return posit;
fi;
end;
##################################################################
# returns a "canonical" representative of the right coset
# Elts[g]*Stab[i+1][j]
Rep:=function(i,j,g)
return pos(CanonicalRightCountableCosetElement
(C!.stabilizer(i,j),Elts[g]^-1)^-1);
end;
##################################################################
AddReturn:=function(a,g)
local b;
b:=StructuralCopy(a);
Add(b,g);
return b;
end;
##################################################################
mult:=function(L,g)
return List(L,a->[a[1],pos(Elts[g]*Elts[a[2]])]);
end;
##################################################################
ListUnion:=function(x,y)
local a;
for a in y do
if not a in x then
Add(x,a);
fi;
od;
end;
##################################################################
IsSameOrbit:=function(a,b)
local s,w,v,x,y,k,g,i;
for i in [1..Length(a)] do
if not a[i][1]=b[i][1] then
return false;
fi;
od;
x:=List([1..Length(a)],i->[a[i][1],Cells[a[i][1]+1][a[i][2]]]);
y:=List([1..Length(b)],i->[b[i][1],Cells[b[i][1]+1][b[i][2]]]);
for i in [1..Length(x)] do
if not x[i][2][1]=y[i][2][1] then
return false;
fi;
od;
w:=List(C!.stabilizer(x[1][1],x[1][2][1]),i->Elts[y[1][2][2]]*i*Elts[x[1][2][2]]^-1);
for s in [2..Length(x)] do
v:=List(C!.stabilizer(x[s][1],x[s][2][1]),i->Elts[y[s][2][2]]*i*Elts[x[s][2][2]]^-1);
w:=Intersection(w,v);
if IsEmpty(w) then return false;fi;
od;
if not IsEmpty(w) then
return w[1];fi;
end;
##################################################################
Dims:=[];
N:=Length(C); #Added by Graham 02/2024
for i in [0..Length(C)] do
if C!.dimension(i)=0 then N:=i-1; break; fi;
Dims[i+1]:=C!.dimension(i);
od;
Cells:=[];
coBoundaries:=[];
id:=pos(One(C!.group));
for i in [1..N+1] do
Cells[i]:=[];
coBoundaries[i]:=[];
od;
for j in [1..Dims[N+1]] do
Add(Cells[N+1],[j,id]);
od;
# Construct the list of cells and the corresponding coboundary of those cells
i:=N;
while i>0 do
for k in [1..Length(Cells[i+1])] do
x:=Cells[i+1][k];
w:=StructuralCopy(C!.boundary(i,AbsInt(x[1])));
w:=mult(w,x[2]);
w:=List(w,a->[AbsInt(a[1]),Rep(i-1,AbsInt(a[1]),a[2])]);
ListUnion(Cells[i],w);
for y in w do
t:=Position(Cells[i],y);
if not IsBound(coBoundaries[i][t]) then
coBoundaries[i][t]:=[];
fi;
Add(coBoundaries[i][t],k);
od;
od;
i:=i-1;
od;
# Record k-chains as a list
Chains:=[];
# Record the 1-chains
Chains[1]:=[];
for i in [1..1] do
for j in [1..Length(Cells[i])] do
Add(Chains[1],[[i-1,j]]);
od;
od;
# Construct the list of N-chains
for k in [1..(N)] do
Chains[k+1]:=[];
for i in [1..Length(Chains[k])] do
ck:=StructuralCopy(Chains[k][i]);
c:=ck[k];
w:=List(coBoundaries[c[1]+1][c[2]],x->AddReturn(ck,[c[1]+1,x]));
Append(Chains[k+1],w);
od;
od;
NChains:=StructuralCopy(Chains[N+1]);
# Recognizing orbits and compute the boundary of cells.
Orbit:=[];
Orbit[N+1]:=[];
Add(Orbit[N+1],NChains[1]);
for i in [2..Length(NChains)] do
for j in [1..Length(Orbit[N+1])] do
c:=0;
if not IsSameOrbit(NChains[i],Orbit[N+1][j])=false then
c:=1;
break;
fi;
od;
if c=0 then Add(Orbit[N+1],NChains[i]);fi;
od;
BoundaryRec:=[];
k:=N+1;
while k>1 do
BoundaryRec[k-1]:=[];
for i in [1..Length(Orbit[k])] do
x:=StructuralCopy(Orbit[k][i]);
b:=[];
for j in [1..Length(x)] do
w:=StructuralCopy(x);
Remove(w,j);
if not IsBound(Orbit[k-1]) then
Orbit[k-1]:=[];
fi;
c:=0;
for s in [1..Length(Orbit[k-1])] do
g:=IsSameOrbit(Orbit[k-1][s],w);
if not g=false then
c:=1;
Add(b,[(-1)^j*s,pos(g)]);
fi;
od;
if c=0 then
Add(Orbit[k-1],w);
Add(b,[(-1)^j*Length(Orbit[k-1]),id]);
fi;
od;
BoundaryRec[k-1][i]:=b;
od;
k:=k-1;
od;
# Find the k-rank
Dimension:=function(k)
if k<0 or k>N then return 0;fi;
return Length(Orbit[k+1]);
end;
# Stabilizer subgroup of the representative of the ith-orbit of (k-1)-cells
StabRec:=[];
for k in [1..(N+1)] do
StabRec[k]:=[];
for i in [1..Dimension(k-1)] do
a:=Orbit[k][i];
x:=List([1..Length(a)],w->[a[w][1],Cells[a[w][1]+1][a[w][2]]]);
w:=ConjugateGroup(C!.stabilizer(a[1][1],x[1][2][1]),Elts[x[1][2][2]]^-1);
for s in [2..Length(x)] do
v:=ConjugateGroup(C!.stabilizer(a[s][1],x[s][2][1]),Elts[x[s][2][2]]^-1);
w:=Intersection(w,v);
od;
StabRec[k][i]:=w;
od;
od;
Stabilizer:=function(k,i)
return StabRec[k+1][i];
end;
# The cell structure is rigid under the action of G then Action(k,i,j) always be 1.
Action:=function(k,i,j)
return 1;
end;
# Calculate the boundary of the representative of the ith-orbit of k-cells
Boundary:=function(n,k)
if k>0 then
return BoundaryRec[n][k];
else
return NegateWord(BoundaryRec[n][AbsInt(k)]);
fi;
end;
##################################################################
return Objectify(HapNonFreeResolution,
rec(
dimension:=Dimension,
Orbit:=Orbit,
Cells:=Cells,
Chains:=Chains,
boundary:=Boundary,
coBoundaries:=coBoundaries,
IsSameOrbit:=IsSameOrbit,
homotopy:=fail,
elts:=Elts,
group:=C!.group,
stabilizer:=Stabilizer,
action:=Action,
properties:=
[["length",Maximum(1000,N)],
["characteristic",0],
["type","resolution"]] ));
end);
################### end of ControlledSubdivision ############################
#########################################################
InstallMethod(BarycentricSubdivision,
"for non-free resolutions",
[IsHapNonFreeResolution],
function(R);
return HAP_BaryCentricSubdivisionGComplex(R);
end);
#########################################################
#########################################################
|