Ask Your Question

# Revision history [back]

This looks like a missing feature and/or a bug. Note that the documentation for S.homology() says, regarding generators:

Since trac ticket #6100, the result may not be what you expect when not using CHomP since its return is in terms of the chain complex.

The bug is that there is no result at all, but you can recover it by doing:

sage: S.chain_complex().homology(generators=True)
{0: [(Z, Chain(0:(0, 0, 0, 1, 0, 0)))],
1: [(Z, Chain(1:(0, 1, -1, 0, 0, 0, -1, 1, 0))),
(Z, Chain(1:(0, 0, 0, 0, 1, -1, -1, 1, 1)))],
2: []}


To interpret this, you need to know how the simplicial complex is turned into a chain complex. The simplices in each dimension are sorted in order to construct the matrices representing the boundary maps, so to get the first generator in dimension 1, for example, you would look at

sage: S._n_cells_sorted(1)
[(0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 5), (2, 4), (2, 5), (3, 4)]


The first generator is given by (0, 1, -1, 0, 0, 0, -1, 1, 0), which means the sum of 1 x (item 1 in list), -1 x (item 2), etc.:

(0, 4) - (0, 5) - (2, 4) + (2, 5)