Where cohomology classifies cocycles on an object with coefficients in some object , relative cohomology for a map morphism classifies cocycles on that satisfy some condition when pulled back to , such as being trivializable there. Or rather: cocycles equipped with some structure on their pullback to , such as a trivialization.
We first give a general abstract definition and then reduce to certain special cases.
Recall the general abstract definition of cohomology, as discussed there:
for an (∞,1)-topos, and two objects, a cocycle on with coefficients in is a morphism , the ∞-groupoid of cocycles, coboundaries and higher coboundaries is the (∞,1)-categorical hom space and the cohomology classes themselves are the connected components / homotopy classes in there
Let and be two morphisms in . Then the relative cohomology of with coefficients in relative to these morphisms is the connected components of the -groupoid of relative cocycles
The -groupoid of relative cocycles is the (∞,1)-pullback in
This makes manifest the interpretation of relative cocycles as -cocycles on whose restriction to is equipped with a coboundary to a -cocycle on .
If is the point then this means: cocycles on which are equipped with a trivialization on .
If we fix an -cocycle on , then we may consider the relative cohomology just of this cocycle, hence the homotopy fiber of the -groupoid of relative cocycles over
See for instance the example of twisted bundles on D-branes below.
A special case of the general definition of cohomology is abelian sheaf cohomology, obtained by taking the coefficient objects and to be in the image of chain complexes under the Dold-Kan correspondence.
If moreover we restrict attention to the case that , then by remark 1 the relative cohomology is given by the homotopy fiber of a morphism of cochain complexes , presenting the morphism . Such homotopy fibers are given for instance by dual mapping cone complexes. Accordingly, in the abelian case the -cohomology on relative to is the cochain cohomology of this mapping cone complex. This is the definition one finds in much traditional literature.
We consider an example of relative cohomology for the general case where is not the point inclusion, but exhibits an additional twist, according to 2.
For a smooth manifold, the -twisted cohomology of is classifies -principal twisted bundles on , as discussed there. These appear in string theory/twisted K-theory, where the twist is a B-field/circle 2-bundle/bundle gerbe classified by .
But in these applications, this 2-bundle is the restriction of an ambient 2-bundle classified by on a spacetime along an embedding of the D-brane worldvolume. Therefore the moduli stack of total field configurations consisting of the ambient B-field and the gauge field on the D-brane (see Freed-Witten anomaly for the details of this mechanism) is the -groupoid of -relative cocycles with coefficients in .