Let $M$ be a differential manifold and $\mathcal H^k$ the presheaf of real vector spaces associating to the open subset $U\subset M$ the $k$-th de Rham cohomology vector space: $\mathcal H^k(U)=H^k_{DR}(U)$. Is this presheaf a sheaf?
Of course not! Indeed, given any non-zero cohomology class $0\neq[\omega]\in \mathcal H^k(U)$ represented by the closed $k$-form $\omega\in \Omega^k_M(U)$ there exists (by Poincaré's Lemma) a covering $(U_i)_{i\in I}$ of $U$ by open subsets $U_i\subset U$ such that $[\omega]\vert U_i=[\omega\vert U_i]=0\in \mathcal H^k(U_i)$, and thus the first axiom for a presheaf to be a sheaf is violated.
But what about the second axiom?
My question:
Suppose we are given a differential manifold M, a covering $(U_\lambda)_{\lambda \in \Lambda}$of $M$ by open subsets $U_\lambda \subset M$, closed differential $k-$forms $\omega_\lambda \in \Omega^k_M(U_\lambda)$ satisfying $[\omega_\lambda]\vert U_\lambda \cap U_\mu=[\omega_\mu]\vert U_\lambda \cap U_\mu\in \mathcal H^k(U_\lambda\cap U\mu)$ for all $\lambda,\mu \in \Lambda$.
Does there then exist a closed differential form $\omega\in \Omega^k(M)$ such that we have for the restrictions in cohomology: $[\omega]\vert U_\lambda=[\omega _\lambda]\in \mathcal H^k(U_\lambda)$ for all $\lambda\in \Lambda$ ?
Remarks
- This is an extremely naïve question which, to my embarrassment, I cannot solve.
I have extensively browsed the literature and consulted some of my friends, all brilliant geometers (albeit not differential topologists), but they didn't know the answer offhand. For what it's worth, I would guess (but not conjecture!) that such glueing is impossible. - If the covering of $X$ has only two opens then we can glue.
This follows immediately from Mayer-Vietoris's long exact sequence $$\cdots \to \mathcal H^k(M) \to \mathcal H^k(U_1) \oplus \mathcal H^k(U_2) \to \mathcal H^k(U_1\cap U_2)\to \cdots$$
Update
My brilliant friends didn't answer offhand but a few hours later, unsurprisingly, they came back to me with splendid counterexamples! See below.