# Top cohomology detecting compactness

Could someone point me to a standard reference for the fact that the top cohomology $H^n(M,A)$ of an $n$-dimensional manifold $M$ is non-trivial for local coefficients $A$ if and only if the manifold is compact?

EDIT: It seems that there are some issues when $M$ is non-orientable. I would like to include the non-orientable case. I figure the result uses (twisted) Poincaré duality and some kind of pairing between the $n$th cohomology and compactly supported cohomology in degree $0$.

I am not sure of its validity, but I am looking for (a reference for) an isomorphism $H_c^0\cong H^n$ which holds for local systems.

-
You need the hypothesis of orientability as well. If no one does before me, I'll get a reference once I get to work. – Jason DeVito Jul 5 '12 at 12:21

As I pointed out in the comments, you need the hypothesis of orientability. For example, $\mathbb{R}P^2$ is nonorientable and compact, but has $H_2(\mathbb{R}P^2;\mathbb{Z}) = 0$.
Well, we have $H^2(\mathbb{R P}^2, \mathbb{R}) = 0$, by de Rham's theorem. – Zhen Lin Jul 5 '12 at 14:14
I don't know of a reference for the case with local coefficients. (I am only vaguely aware of the existence of local coefficients). But in general, coefficients make the statement slightly more tricky, since, for example, $H_2(\mathbb{R}P^2;\mathbb{Z}/2\mathbb{Z})\cong \mathbb{Z}/2\mathbb{Z}$ is non trivial (and likewise for cohomology). – Jason DeVito Jul 5 '12 at 14:55
@ZhenLin: But from my intuition, this must be so, precisely because $\mathbb RP^2$ is non-orientable and $\mathbb R$ is thought of as constant sheaf. If we twist the coefficients by the orientation character $w$, I would think that, since $\mathbb RP^2$ is compact, $H^2(\mathbb RP^2,\mathbb R^w)\neq 0$. – Earthliŋ Jul 6 '12 at 6:40
Well, we can always find some non-trivial coefficients for which the top cohomology vanishes, even if the manifold is compact. E.g. considering the Klein bottle $K^2$ and the torus $T^2$, we have a local system $\mathbb R^w$, where $w$ is the orientation character of the Klein bottle. In this case, I would think that $H^2(T^2,\mathbb R^w)$ and $H^2(K^2,\mathbb R)$ are both trivial. – Earthliŋ Jul 7 '12 at 0:45