Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generators for homology of simplicial complexes #30838

Closed
jhpalmieri opened this issue Oct 29, 2020 · 14 comments
Closed

Generators for homology of simplicial complexes #30838

jhpalmieri opened this issue Oct 29, 2020 · 14 comments

Comments

@jhpalmieri
Copy link
Member

This is a followup to #6100, and was reported on this ask question. If K is a simplicial complex, the generators argument to K.homology(...) does nothing: K.homology(...) calls the homology method for generic cell complexes, which in turn calls _homology_ for simplicial complexes, and that method ignores the generators keyword.

There is an easy solution: in the generic homology method, if generators is True, then don't call _homology_, just continue in that method. This will give information about chain complex generators. It is possible, although obscure, to extract the simplicial complex information from that.

A better solution: actually do the obscure work, don't force the users to figure it out. That is:

  • call K.chain_complex(generators=True), and
  • use K._n_cells_sorted() to convert the chain complex generators (which are just vectors in the corresponding free module over the base ring) to actual chains in the simplicial complex.

CC: @tscrim

Component: algebraic topology

Author: John Palmieri

Branch/Commit: a5b41da

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/30838

@jhpalmieri
Copy link
Member Author

Branch: u/jhpalmieri/homology-generators

@jhpalmieri
Copy link
Member Author

Commit: c1eae33

@jhpalmieri
Copy link
Member Author

New commits:

c1eae33trac 30838: compute generators for homology of simplicial complexes,

@jhpalmieri
Copy link
Member Author

Author: John Palmieri

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

8ca6c0etrac 30838: compute generators for homology of simplicial complexes,

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2020

Changed commit from c1eae33 to 8ca6c0e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

a5b41datrac 30838: compute generators for homology of simplicial complexes,

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2020

Changed commit from 8ca6c0e to a5b41da

@jhpalmieri
Copy link
Member Author

comment:5

Before this branch:

sage: simplicial_complexes.Sphere(2).homology(generators=True)                                                        
{0: 0, 1: 0, 2: Z}
sage: cubical_complexes.Sphere(2).homology(generators=True)                                                        
{0: [], 1: [], 2: [(Z, Chain(2:(1, -1, 1, -1, 1, -1)))]}
sage: simplicial_sets.Sphere(2).homology(generators=True)                                 
{0: [], 1: 0, 2: [(Z, Chain(2:(1)))]}

Note that no generators are given at all in the simplicial complex case. In the other cases, the answers are given in terms of the chain groups.

After:

sage: simplicial_complexes.Sphere(2).homology(generators=True)                            
{0: [], 1: [], 2: [(Z, (0, 1, 2) - (0, 1, 3) + (0, 2, 3) - (1, 2, 3))]}
sage: cubical_complexes.Sphere(2).homology(generators=True)                               
{0: [],
 1: [],
 2: [(Z,
   [0,0] x [0,1] x [0,1] - [0,1] x [0,0] x [0,1] + [0,1] x [0,1] x [0,0] - [0,1] x [0,1] x [1,1] + [0,1] x [1,1] x [0,1] - [1,1] x [0,1] x [0,1])]}
sage: simplicial_sets.Sphere(2).homology(generators=True)                                 
{0: [], 1: 0, 2: [(Z, sigma_2)]}

@sagetrac-tmonteil

This comment has been minimized.

@tscrim
Copy link
Collaborator

tscrim commented Oct 31, 2020

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Oct 31, 2020

comment:8

LGTM.

@jhpalmieri
Copy link
Member Author

comment:9

Thanks very much.

@vbraun
Copy link
Member

vbraun commented Nov 7, 2020

Changed branch from u/jhpalmieri/homology-generators to a5b41da

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants