Homology

Questions and problems about using polymake go here.
ramanath
Posts: 8
Joined: 28 Mar 2011, 15:38

Homology

Postby ramanath » 27 Mar 2013, 18:35

I am working with a simplicial complex, and would like to print out just a particular homology group. Doing ->HOMOLOGY prints all the groups, and for a large dimension complex one has lots of 0's.

I see that one can do $sc->F2_VECTOR->(2,2) etc. to access particular values, is there something similar like for Homology? (I tried a couple obvious parallels, but didn't work). Any tips/tricks?

Basically I want to print out the Betti number sequence.

Thanks

-Ram

User avatar
joswig
Main Author
Posts: 282
Joined: 24 Dec 2010, 11:10

Re: Homology

Postby joswig » 27 Mar 2013, 19:34

The data type of the HOMOLOGY property is a bit special; actually it is Array<HomologyGroup<Integer>>. This is how you can address an individual group:

Code: Select all

topaz > $rp2=projective_plane(); topaz > print $rp2->HOMOLOGY->[1]; {(2 1)} 0
Each homology group more or less works like an array (of a pair and a number); the rational Betti number is the latter.

Code: Select all

topaz > print $rp2->HOMOLOGY->[1]->[0]; {(2 1)} topaz > print $rp2->HOMOLOGY->[1]->[1]; 0
You can also play with the torsion and its degree.

Code: Select all

topaz > print $rp2->HOMOLOGY->[1]->[0]->[0]; 2 1 topaz > print $rp2->HOMOLOGY->[1]->[0]->[0]->[0]; 2

ramanath
Posts: 8
Joined: 28 Mar 2011, 15:38

Re: Homology

Postby ramanath » 27 Mar 2013, 19:55

Exactly what I need, thanks very much!

Ram

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: Homology

Postby gawrilow » 27 Mar 2013, 22:26

For convenience, there are also named accessors:

Code: Select all

print $sc->HOMOLOGY->[$dim]->torsion; print $sc->HOMOLOGY->[$dim]->betti_number;
With some luck, polymake will even auto-TAB-complete these names on the command line.

ramanath
Posts: 8
Joined: 28 Mar 2011, 15:38

Re: Homology

Postby ramanath » 28 Mar 2013, 01:00

Indeed, that is convenient!

Is there documentation some place to see what other nice features like this is out there that I might be missing? I am primarily interested in features of simplicial complexes (topaz). I had searched for Betti numbers under documentation before but didn't find any.

Thank you.

-Ram

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: Homology

Postby gawrilow » 28 Mar 2013, 10:57

The reference documentation for property type HomologyGroup (linked from HOMOLOGY property) briefly lists the field names, albeit without further explanation. Admittedly, there is still room for improvement.


Return to “Helpdesk”