Let G be a module over a
principal ideal domain R (for example \Z, or any field.) There is a
universal coefficient theorem for cohomology involving the
Ext functor, which asserts that there is a natural short exact sequence : 0 \to \operatorname{Ext}_R^1(H_{i-1}(X; R), G) \to H^i(X; G) \, \overset{h} \to \, \operatorname{Hom}_R(H_i(X; R), G)\to 0. As in the homology case, the sequence splits, though not naturally. In fact, suppose :H_i(X;G) = \ker \partial_i \otimes G / \operatorname{im}\partial_{i+1} \otimes G, and define :H^*(X; G) = \ker(\operatorname{Hom}(\partial, G)) / \operatorname{im}(\operatorname{Hom}(\partial, G)). Then h above is the canonical map: :h([f])([x]) = f(x). An alternative point of view can be based on representing cohomology via
Eilenberg–MacLane space, where the map h takes a
homotopy class of maps X\to K(G,i) to the corresponding homomorphism induced in homology. Thus, the Eilenberg–MacLane space is a
weak right adjoint to the homology
functor. == Example: mod 2 cohomology of the real projective space==