|
| 1 | + |
| 2 | +##################################################################### |
| 3 | +##################################################################### |
| 4 | +InstallGlobalFunction(GComplexToRegularCWComplex, |
| 5 | +function(R,N) |
| 6 | +local Y, dim, dim1, Cells,boundaries, StandardForm, |
| 7 | +Tiles, tile, pos,NeighbourGens,TileReps, |
| 8 | +w,NewLeaves,Leaves,i,e,f,n,k,g,b,x,T; |
| 9 | +#R is a contractible G-complex |
| 10 | +#S is a set of elements in G=R!.group |
| 11 | +#N is a finite index subgroup of G=R!.group |
| 12 | + |
| 13 | +T:=RightTransversal(R!.group,N); |
| 14 | + |
| 15 | +####################################################### |
| 16 | +dim:=0; |
| 17 | +for n in [1..Length(R)] do |
| 18 | +if R!.dimension(n)>0 then dim:=dim+1; |
| 19 | +else break; fi; |
| 20 | +od; |
| 21 | +dim1:=dim-1; |
| 22 | +####################################################### |
| 23 | + |
| 24 | +######################################## |
| 25 | +StandardForm:=function(n,x) |
| 26 | +local e,g,gc,stab; |
| 27 | + |
| 28 | +e:=AbsInt(x[1]); |
| 29 | +g:=x[2]; |
| 30 | +stab:=R!.stabilizer(n,e); |
| 31 | +gc:=g*Elements(stab); |
| 32 | +gc:=List(gc, a->T[T!.poscan(a)]); |
| 33 | +#gc:=SSortedList(gc); |
| 34 | +#gc:=gc[1]; |
| 35 | +gc:=Minimum(gc); |
| 36 | +return [e,gc]; |
| 37 | +end; |
| 38 | +######################################## |
| 39 | + |
| 40 | + |
| 41 | +Tiles:=[]; |
| 42 | +for k in [1..R!.dimension(dim)] do |
| 43 | + tile:=1*R!.boundary(dim,k); |
| 44 | + Apply(tile,x->[x[1],R!.elts[x[2]]]); |
| 45 | + Apply(tile,e->StandardForm(dim1,e)); |
| 46 | + Add(Tiles,tile); |
| 47 | +od; |
| 48 | + |
| 49 | + |
| 50 | +TileReps:=List([1..Length(Tiles)],i->T); |
| 51 | +################################################################## |
| 52 | +################################################################## |
| 53 | + |
| 54 | +######################################## |
| 55 | +######################################## |
| 56 | + |
| 57 | +Cells:=List([1..dim+1],i->[]); |
| 58 | +## Cells[k+1] is a list of the k-cells present in the complex |
| 59 | + |
| 60 | +for k in [1..R!.dimension(dim)] do |
| 61 | +for g in TileReps[k] do |
| 62 | +Add(Cells[dim+1],StandardForm(dim,[k,g])); |
| 63 | +od; |
| 64 | +od; |
| 65 | +Cells[dim+1]:=SSortedList(Cells[dim+1]); |
| 66 | + |
| 67 | +for n in Reversed([1..dim]) do |
| 68 | +for x in Cells[n+1] do |
| 69 | +b:=1*R!.boundary(n,x[1]); |
| 70 | +Apply(b,z->[z[1],R!.elts[z[2]]]); |
| 71 | +Apply(b,y->[y[1],x[2]*y[2]]); |
| 72 | +Apply(b,y->StandardForm(n-1,y)); |
| 73 | +Append(Cells[n],b); |
| 74 | +od; |
| 75 | +Cells[n]:=SSortedList(Cells[n]); |
| 76 | +od; |
| 77 | + |
| 78 | + |
| 79 | +boundaries:=List([1..dim+2], n->[]); |
| 80 | +boundaries[1]:=List(Cells[1],x->[1,0]); |
| 81 | + |
| 82 | +for n in [1..dim] do |
| 83 | +for k in [1..Length(Cells[n+1])] do |
| 84 | +x:=Cells[n+1][k]; |
| 85 | +b:=1*R!.boundary(n,x[1]); |
| 86 | +Apply(b,z->[z[1],R!.elts[z[2]]]); |
| 87 | +Apply(b,y->[y[1],x[2]*y[2]]); |
| 88 | +Apply(b,y->StandardForm(n-1,y)); |
| 89 | +Apply(b,c->PositionSorted(Cells[n],c)); |
| 90 | +b:=Concatenation([Length(b)],b); |
| 91 | +boundaries[n+1][k]:=b; |
| 92 | +od; |
| 93 | +od; |
| 94 | + |
| 95 | +Y:=RegularCWComplex(boundaries); |
| 96 | + |
| 97 | +return Y; |
| 98 | +end); |
| 99 | +##################################################################### |
| 100 | +##################################################################### |
| 101 | + |
0 commit comments