Homology and cohomology with a basis

This module provides homology and cohomology vector spaces suitable for computing cup products and cohomology operations.

REFERENCES:

AUTHORS:

  • John H. Palmieri, Travis Scrimshaw (2015-09)
sage.homology.homology_vector_space_with_basis.CohomologyRing

The cohomology ring.

Note

This is not intended to be created directly by the user, but instead via the cohomology ring of a cell complex.

INPUT:

  • base_ring – must be a field
  • cell_complex – the cell complex whose homology we are computing

EXAMPLES:

sage: CP2 = simplicial_complexes.ComplexProjectivePlane()
sage: H = CP2.cohomology_ring(QQ)
sage: H.basis(2)
Finite family {(2, 0): h^{2,0}}
sage: x = H.basis(2)[2,0]

The product structure is the cup product:

sage: x.cup_product(x)
-h^{4,0}
sage: x * x
-h^{4,0}

There are mod 2 cohomology operations defined, also, for simplicial complexes and simplicial sets:

sage: Hmod2 = CP2.cohomology_ring(GF(2))
sage: y = Hmod2.basis(2)[2,0]
sage: y.Sq(2)
h^{4,0}

sage: Y = simplicial_sets.RealProjectiveSpace(6).suspension()
sage: H_Y = Y.cohomology_ring(GF(2))
sage: b = H_Y.basis()[2,0]
sage: b.Sq(1)
h^{3,0}
sage: b.Sq(2)
0
sage: c = H_Y.basis()[4,0]
sage: c.Sq(1)
h^{5,0}
sage: c.Sq(2)
h^{6,0}
sage: c.Sq(3)
h^{7,0}
sage: c.Sq(4)
0
sage.homology.homology_vector_space_with_basis.HomologyVectorSpaceWithBasis

Homology (or cohomology) vector space.

This provides enough structure to allow the computation of cup products and cohomology operations. See the class CohomologyRing (which derives from this) for examples.

It also requires field coefficients (hence the “VectorSpace” in the name of the class).

Note

This is not intended to be created directly by the user, but instead via the methods homology_with_basis() and cohomology_ring() for the class of cell complexes.

INPUT:

  • base_ring – must be a field
  • cell_complex – the cell complex whose homology we are computing
  • cohomology – (default: False) if True, return the cohomology as a module
  • category – (optional) a subcategory of modules with basis

EXAMPLES:

Homology classes are denoted by h_{d,i} where d is the degree of the homology class and i is their index in the list of basis elements in that degree. Cohomology classes are denoted h^{1,0}:

sage: RP2 = cubical_complexes.RealProjectivePlane()
sage: RP2.homology_with_basis(GF(2))
Homology module of Cubical complex with 21 vertices and 81 cubes
 over Finite Field of size 2
sage: RP2.cohomology_ring(GF(2))
Cohomology ring of Cubical complex with 21 vertices and 81 cubes
 over Finite Field of size 2
sage: simplicial_complexes.Torus().homology_with_basis(QQ)
Homology module of Minimal triangulation of the torus
 over Rational Field

To access a basis element, use its degree and index (0 or 1 in the 1st cohomology group of a torus):

sage: H = simplicial_complexes.Torus().cohomology_ring(QQ)
sage: H.basis(1)
Finite family {(1, 0): h^{1,0}, (1, 1): h^{1,1}}
sage: x = H.basis()[1,0]; x
h^{1,0}
sage: y = H.basis()[1,1]; y
h^{1,1}
sage: 2*x-3*y
2*h^{1,0} - 3*h^{1,1}

You can compute cup products of cohomology classes:

sage: x.cup_product(y)
-h^{2,0}
sage: y.cup_product(x)
h^{2,0}
sage: x.cup_product(x)
0

This works with simplicial, cubical, and \(\Delta\)-complexes, and also simplicial sets:

sage: Klein_c = cubical_complexes.KleinBottle()
sage: H = Klein_c.cohomology_ring(GF(2))
sage: x,y = H.basis(1)
sage: x.cup_product(x)
0
sage: x.cup_product(y)
h^{2,0}
sage: y.cup_product(y)
h^{2,0}

sage: Klein_d = delta_complexes.KleinBottle()
sage: H = Klein_d.cohomology_ring(GF(2))
sage: u,v = H.basis(1)
sage: u.cup_product(u)
h^{2,0}
sage: u.cup_product(v)
0
sage: v.cup_product(v)
h^{2,0}

An isomorphism between the rings for the cubical model and the \(\Delta\)-complex model can be obtained by sending \(x\) to \(u+v\), \(y\) to \(v\).

sage: X = simplicial_sets.RealProjectiveSpace(6)
sage: H_X = X.cohomology_ring(GF(2))
sage: a = H_X.basis()[1,0]
sage: a**6
h^{6,0}
sage: a**7
0

All products of positive-dimensional elements in a suspension should be zero:

sage: Y = X.suspension()
sage: H_Y = Y.cohomology_ring(GF(2))
sage: b = H_Y.basis()[2,0]
sage: b**2
0
sage: B = sorted(H_Y.basis())[1:]
sage: B
[h^{2,0}, h^{3,0}, h^{4,0}, h^{5,0}, h^{6,0}, h^{7,0}]
sage: import itertools
sage: [a*b for (a,b) in itertools.combinations(B, 2)]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

The basis elements in the simplicial complex case have been chosen differently; apply the change of basis \(x \mapsto a + b\), \(y \mapsto b\) to see the same product structure.

sage: Klein_s = simplicial_complexes.KleinBottle()
sage: H = Klein_s.cohomology_ring(GF(2))
sage: a,b = H.basis(1)
sage: a.cup_product(a)
0
sage: a.cup_product(b)
h^{2,0}
sage: (a+b).cup_product(a+b)
h^{2,0}
sage: b.cup_product(b)
h^{2,0}
sage.homology.homology_vector_space_with_basis.sum_indices(k, i_k_plus_one, S_k_plus_one)

This is a recursive function for computing the indices for the nested sums in González-Díaz and Réal [GDR1999], Corollary 3.2.

In the paper, given indices \(i_n\), \(i_{n-1}\), …, \(i_{k+1}\), given \(k\), and given \(S(k+1)\), the number \(S(k)\) is defined to be

\[S(k) = -S(k+1) + floor(k/2) + floor((k+1)/2) + i_{k+1},\]

and \(i_k\) ranges from \(S(k)\) to \(i_{k+1}-1\). There are two special cases: if \(k=0\), then \(i_0 = S(0)\). Also, the initial case of \(S(k)\) is \(S(n)\), which is set in the method Sq() before calling this function. For this function, given \(k\), \(i_{k+1}\), and \(S(k+1)\), return a list consisting of the allowable possible indices \([i_k, i_{k-1}, ..., i_1, i_0]\) given by the above formula.

INPUT:

  • k – non-negative integer
  • i_k_plus_one – the positive integer \(i_{k+1}\)
  • S_k_plus_one – the integer \(S(k+1)\)

EXAMPLES:

sage: from sage.homology.homology_vector_space_with_basis import sum_indices
sage: sum_indices(1, 3, 3)
[[1, 0], [2, 1]]
sage: sum_indices(0, 4, 2)
[[2]]