On Saturday, December 3, 2011 6:15:03 PM UTC-8, Felix Breuer wrote: > > Hello everyone! > > I would like to compute the cup-product of two chains in the cohomology of > a simplicial complex. >
Me too. > > What I have so far, is that I have the simplicial complex realized as a > SimplicialComplex in sage and I can compute its cohomology groups. They > are: {0: 0, 1: Z x Z, 2: Z^28, 3: Z^9}. What I would like to do, is to take > two generators of the cohomology group in degree 1 and compute that their > cup-product is non-trivial. What is the best way to do this? > > > > As I gather from Trac issue > #6102<http://trac.sagemath.org/sage_trac/ticket/6102>, > I can't simply compute the cohomology ring, as this functionality is not > yet implemented. So I have to do this by hand, but that's okay. AFAICT, > there are two things I need to figure out. > > 1) How can I get my hands on two representatives of the generators of the > first cohomology group? I am not sure, whether I can have sage compute > these for me (see ticket > #6100<http://trac.sagemath.org/sage_trac/ticket/6100>). > If yes, how? If no, I could maybe construct these two by hand (as I "know" > how my simplicial complex "looks"). But in what format do I have to > construct these chains so that I can use them in step 2? > If you install the optional Sage package "chomp", then it should be able to give you representatives. Type "sage -i chomp" (or while you're running Sage, I think "install_package('chomp')" should work). Once you've installed chomp, do this: sage: X = (your favorite simplicial complex) sage: X.cohomology(generators=True) > 2) How can I compute coboundaries of chains in the cochain complex? I know > that sage will give me the cochain complex induced by my simplicial complex > including the (co)boundary maps. But how do I apply these coboundary maps > to chains? What format do these chains need to have? > Actually, it might be better to do this: sage: X = ... # some simplicial complex sage: C = X.chain_complex(cochain=True) # its cochain complex sage: print C._chomp_repr_() This prints a basis for the cochains in each dimension, along with the coboundary of each element, but note that the dimensions are wrong. Oops, just found a bug. For example, if X only has 0-, 1-, and 2-simplices, then when you print C._chomp_repr_(), the elements which say they're in dimension 0 are actually in dimension 2, etc.: the chain complex is printed upside-down. sage: C.homology(generators=True) This should now print the cohomology groups along with generators for each one, as a vector in terms of the basis given in the previous step. The chain complex itself is stored as a collection of matrices (representing the coboundary maps), so you can just multiply any vector of the appropriate dimension by the coboundary matrix to compute the coboundary. Try this out and see if it's helpful. Improving the simplicial complex stuff in Sage is on the to-do list, as you've observed. Progress has been slow... -- John -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org