TITLE: Which cohomology theories have a formula $\langle \Omega,\text d \omega \rangle = \langle \partial \Omega,\omega \rangle$?
QUESTION [12 upvotes]: Is a formula
$$\langle \Omega,\text d \omega \rangle = \langle \partial \Omega,\omega \rangle$$
like Stokes theorem
$$\int_\Omega \text d \omega=\int_{\partial\Omega} \omega$$
common in cohomology theories? 
Are there relevant examples and what is their interpretation?

REPLY [10 votes]: The formula you ask about is reasonably common.  E.g. in simplicial homology/cohomology, we triangulate a space into simplices.  The chain complex
made out of these simplices then computes the simplicial homology.
We can also define simplicial cochains: this is just the dual complex to the simplicial chain complex, so concretely a simplicial cochain just attaches a number to each simplex in our space.
If $\Omega$ is a simplex, and $\omega$ is a simplicial cochain, then by definition of the coboundary operator $d$ on simplicial cochains, one has the formula 
$$\langle \Omega, d\omega \rangle = \langle \partial \Omega, \omega\rangle.$$
This is more tautological than the de Rham cohomology case, though, because
one doesn't have an a priori notion of simplicial cochains, or of the coboundary operator on them, so the whole theory of simplicial cohomology is defined to make this formula be true.  (An entirely analogous story is true if we replace simplicial by singular everywhere in the above.)
What is somewhat special in the de Rham case is that we have an a priori notion both of simplices or other submanifold-like subobjects of a manifold and their boundaries, and of differential forms and the exterior derivative on forms.  The formula relating them is in then not a formality; indeed, it allows you to compare simplicial or singular cohomology with de Rham cohomology, and is really the most important ingredient in the the fact that those cohomologies are isomorphic to de Rham cohomology.  
If one keeps in the purely simplicial (or singular) context, at first the formula looks completely formal, and indeed simplicial (or singular) cohomology
itself at first seems quite formal (and you can wonder why you need it, when
you already have singular/simplicial homology).  But there are other descriptions
of singular cohomology, e.g. via obstruction theory.   For example, one has 
the isomorphism
$$H^1(X,\mathbb Z) = \text{ homotopy classes of maps } X \to S^1.$$
From this point of view simplicial or singular cohomology classes can take on
a non-formal appearance, and in proving such statements, the formula you ask about plays a key role.