Skip to content

Conventions

NickG-Math edited this page Sep 10, 2019 · 7 revisions

Chains Indexing

We only use chain complexes with decreasing differentials and nonnegative indices i.e. from C0 to Ck and C-1=Ck+1=0. If we have a cochain complex or a complex indexed on negative integers, we need to reindex them first.

MATLAB Indexing

We store chain complexes and the corresponding ranks in cell types. Cells are arrays that can store arbitrary data, including matrices or other cells. However just like matrices must always be indexed on positive integers. That means that we have to change the "math index" to to the "MATLAB index" by adding 1: the differential di is stored in D{i+1} of our cell D. Similarly the rank of Ci is stored in rank{i+1}

First Differential

The first differential D{1}:C0->0 is always trivial so for convenience, we store it as an empty matrix (otherwise we would have to store it as a zero matrix of the correction dimension!). The first rank, rank{1}=rank(C0) is not 0 so we can't store it as empty.

The complex 0->Z?->0

For this complex we could store both differentials as empty matrices, but then we would not be able to tell whether the middle group Z? is actually a Z or 0 or Z2 etc. So in this very specific case we store the first differential as D{1}=zeros(1,?)

Last Differential+1

The last differential+1 D{k+2}:0->Ck is not usually stored, which can create some problems when calling homology as Homology(D{i+1},D{i}) since if i=k+1 the first term is not defined. So we need to be slightly careful with this.

Clone this wiki locally