Let $X$ be a simplicial complex, and suppose $U_1, ..., U_n$ is an open cover of $X$ where each $U_i$ is itself a union of open stars, and moreover, each closed face of $X$ sits inside some $U_u$. The following code initializes one possible $X$ and cover.
i1 : Xfacets = {{1,2,3},{1,3,4},{1,4,5},{1,2,5},{2,3,6},{3,4,6},{4,5,6},{2,5,6},{1,6}};
|
i2 : Usets = {{1,2,3,4,5},{2,3,4,5,6},{1,2,6}};
|
In the example, $X$ is an octahedron with an extra segment connecting two antipodal points, 1 and 6. The open cover is the complement of 1, the complement of 6, and the union of the open stars around 1, 2, and 6.
i3 : Xfaces = k -> unique flatten apply(Xfacets, f -> subsets(f, k+1)); |
i4 : Xdim = max apply(Xfacets, f -> #f - 1); |
i5 : Xfacelist = flatten apply(Xdim + 1, Xfaces); |
i6 : MVfacets = flatten for f in Xfacelist list {f|select(Usets, us->isSubset(f,us))}
o6 = {{1, {1, 2, 3, 4, 5}, {1, 2, 6}}, {2, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6},
------------------------------------------------------------------------
{1, 2, 6}}, {3, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}}, {4, {1, 2, 3, 4, 5},
------------------------------------------------------------------------
{2, 3, 4, 5, 6}}, {5, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}}, {6, {2, 3, 4,
------------------------------------------------------------------------
5, 6}, {1, 2, 6}}, {1, 2, {1, 2, 3, 4, 5}, {1, 2, 6}}, {1, 3, {1, 2, 3,
------------------------------------------------------------------------
4, 5}}, {2, 3, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}}, {1, 4, {1, 2, 3, 4,
------------------------------------------------------------------------
5}}, {3, 4, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}}, {1, 5, {1, 2, 3, 4, 5}},
------------------------------------------------------------------------
{4, 5, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}}, {2, 5, {1, 2, 3, 4, 5}, {2, 3,
------------------------------------------------------------------------
4, 5, 6}}, {2, 6, {2, 3, 4, 5, 6}, {1, 2, 6}}, {3, 6, {2, 3, 4, 5, 6}},
------------------------------------------------------------------------
{4, 6, {2, 3, 4, 5, 6}}, {5, 6, {2, 3, 4, 5, 6}}, {1, 6, {1, 2, 6}}, {1,
------------------------------------------------------------------------
2, 3, {1, 2, 3, 4, 5}}, {1, 3, 4, {1, 2, 3, 4, 5}}, {1, 4, 5, {1, 2, 3,
------------------------------------------------------------------------
4, 5}}, {1, 2, 5, {1, 2, 3, 4, 5}}, {2, 3, 6, {2, 3, 4, 5, 6}}, {3, 4,
------------------------------------------------------------------------
6, {2, 3, 4, 5, 6}}, {4, 5, 6, {2, 3, 4, 5, 6}}, {2, 5, 6, {2, 3, 4, 5,
------------------------------------------------------------------------
6}}}
o6 : List
|
i7 : MVdim = max apply(MVfacets, f -> #f - 1) o7 = 3 |
i8 : rowfilt = f -> #select(f,e->instance(e,ZZ)) - 1; |
i9 : colfilt = f -> #select(f,e->not instance(e,ZZ)) - 1; |
i10 : MVfaces = k -> if k == -1 then {{}} else select(unique flatten apply(MVfacets, f -> subsets(f, k+2)), (
f -> (rowfilt(f) >= 0 and colfilt(f) >= 0)
));
|
i11 : R = ZZ[t]; |
i12 : chains = apply(1+MVdim,k->R^(-apply(MVfaces k, colfilt)))
13 27 15
o12 = {R , R , R , 0}
o12 : List
|
i13 : omega = (a,b)->if isSubset(a,b) then (-1)^(position(b, v->not member(v,a))) * t^(colfilt(b)-colfilt(a)) else 0; |
i14 : diffs = apply(MVdim-1,k->map(chains#k, chains#(k+1), matrix table(MVfaces k, MVfaces (k+1),omega))); |
i15 : sm = sequenceModule(R[D,Degrees=>{{-1}}]/D^2, (reverse diffs) | {map(R^{}, first chains, {})});
|
i16 : sm = sm ** (ring sm)^{{1-MVdim,0}};
|
i17 : smm = restackModule({2,1},sm);
|
i18 : print("pruning module");
pruning module
|
i19 : M = prune restackModule({1,1},smm);
|
i20 : print("computing couple");
computing couple
|
i21 : couple = prune exactCouple M;
warning: clearing value of symbol t to allow access to subscripted variables based on it
: debug with expression debug 5504 or with command line option --debug 5504
|
i22 : plotPages((-1..(MVdim+1),-3..3,1..2), eid, couple)
warning: clearing value of symbol e to allow access to subscripted variables based on it
: debug with expression debug 3903 or with command line option --debug 3903
warning: clearing value of symbol t to allow access to subscripted variables based on it
: debug with expression debug 5504 or with command line option --debug 5504
page 1, with differential of degree {-1, -1}:
+----++----+---+---+---+---+---+
|q=3 ||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
| || | | | 1| | |
|q=2 ||0 |0 |0 |ZZ |0 |0 |
+----++----+---+---+---+---+---+
| || | | 3| 1| | |
|q=1 ||0 |0 |ZZ |ZZ |0 |0 |
+----++----+---+---+---+---+---+
| || | 3| 1| | | |
|q=0 ||0 |ZZ |ZZ |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-1||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-2||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-3||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
| ||p=-1|p=0|p=1|p=2|p=3|p=4|
+----++----+---+---+---+---+---+
page 2, with differential of degree {-1, -2}:
+----++----+---+---+---+---+---+
|q=3 ||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=2 ||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
| || | | | 1| | |
|q=1 ||0 |0 |0 |ZZ |0 |0 |
+----++----+---+---+---+---+---+
| || | 1| 1| | | |
|q=0 ||0 |ZZ |ZZ |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-1||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-2||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
|q=-3||0 |0 |0 |0 |0 |0 |
+----++----+---+---+---+---+---+
| ||p=-1|p=0|p=1|p=2|p=3|p=4|
+----++----+---+---+---+---+---+
|
The q=0 row gives the sum of the homologies of the opens individually. Generally, row q is the sum of the homologies of the (q+1)-fold overlaps among the opens, with a rightward shift of q so that the total homology appears in columns on page infinity.