Cellular cochain group (source code)

= Cellular cochain group
{title2=$C^q_{\mathrm{cell}}(X;A)$}

For a <CW complex> $X$ and coefficient <abelian group> $A$, the degree-$q$ cellular cochain group is
$$
C^q_{\mathrm{cell}}(X;A)=\operatorname{Hom}_{\mathbb Z}(C_q^{\mathrm{cell}}(X;\mathbb Z),A).
$$
Choosing orientations of the $q$-cells identifies it with an arbitrary assignment of one element of $A$ to each cell. Since the cellular chain group is a direct sum over cells, the cochain group is a product $\prod_{e^q}A$, which matters when there are infinitely many cells.

The <cochain differential> is precomposition with the cellular boundary: $(d\phi)(c)=\phi(\partial c)$. The identity $\partial^2=0$ gives $d^2=0$. In finite cellular bases, its matrix is the transpose of the boundary matrix, interpreted in the coefficient group.

For the circle with one vertex and one edge attached at both ends, $C^0=C^1=A$ and the differential is zero because the two endpoint contributions cancel. This gives $H^0(S^1;A)=H^1(S^1;A)=A$.