Ask Your Question
2

Generators of simplicial homology

asked 2020-10-29 12:49:00 +0200

springfieldgion gravatar image

updated 2023-01-09 23:59:53 +0200

tmonteil gravatar image

I have this code to compute the homology of a simplicial complex

S = SimplicialComplex([[5, 2], [5, 2, 1], [5, 0], [5, 1], [4, 3], [4, 3, 0], [4, 2], [4, 0], [3, 0], [3, 1], [2, 1],])
S.homology(generators = True)

The output only consists of the homology, and does not contain the generators. Am I missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2020-10-29 18:05:03 +0200

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)
edit flag offensive delete link more

Comments

This is perfect, thank a lot!

springfieldgion gravatar imagespringfieldgion ( 2020-10-29 18:14:21 +0200 )edit
1

I don't think it's perfect — it should be fixed — but I'm glad it's helpful.

John Palmieri gravatar imageJohn Palmieri ( 2020-10-29 18:36:40 +0200 )edit
1

This problem is being tracked at https://trac.sagemath.org/ticket/30838.

John Palmieri gravatar imageJohn Palmieri ( 2020-10-29 18:44:44 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-10-29 12:49:00 +0200

Seen: 508 times

Last updated: Oct 29 '20