This is a question whose motivation and framing seem to involve a lot of topology, but which I suspect comes down to some simple and standard combinatorics that's probably recorded in a book somewhere. To draw in the nLab people, I'll say that I also considered entitling this "categorifying Mobius inversion".

Let $X$ be a topological space, and let $U_i$, $i \in I$, be a finite collection of open sets of $X$ such that

$X = \bigcup U_i$

For any two sets $U_i$ and $U_j$ in the collection, $U_i \cap U_j$ is also in the collection.

Suppose that I know all of the $H^{\ast}(U_i)$'s, and all of the restriction maps between them, and I would like to compute $H^{\ast}(X)$.

One way is to compute $H^{\ast}(U_1)$, then $H^{\ast}(U_1 \cup U_2)$, then $H^{\ast}(U_1 \cup U_2 \cup U_3)$, and so forth, successively using Mayer-Vietoris to put in each new set.

I can also do it all in one go, by using the Mayer-Vietoris spectral sequence. Let $J \subseteq I$ be the set of indices $j$ such that $U_j$ is not contained in any other $U_i$. As explained here, one way to think of this is that we have an exact complex of sheaves. $$0 \to \mathbb{Z}(X )\to \bigoplus_{j \in J} \mathbb{Z}(U_j) \to \bigoplus_{j_1, j_2 \in J} \mathbb{Z}(U_{j_1} \cap U_{j_2}) \to \cdots \quad (\ast)$$ (See the comments on that question for issues about whether one should be using the extension by zero or the pushforward; which I'm not sure ever got resolved. I should probably get that right at some point, but it isn't what I want to focus on, so we can switch to covers by closed sets if that will avoid focusing on that point.)

It seems like sometimes one can use knowledge of the relations between the $U$'s to shorten the resolution $(\ast)$. For example, suppose that $U_1 \cap U_2 = U_1 \cap U_3 = U_2 \cap U_3 = U_4$. Then the complex $(\ast)$ looks like $$0 \to \mathbb{Z}(X) \to \mathbb{Z}(U_1) \oplus \mathbb{Z}(U_2) \oplus \mathbb{Z}(U_3) \to \mathbb{Z}(U_4)^{\oplus 3} \to \mathbb{Z}(U_4) \to 0.$$ But there is a shorter resolution $$0 \to \mathbb{Z}(X) \to \mathbb{Z}(U_1) \oplus \mathbb{Z}(U_2) \oplus \mathbb{Z}(U_3) \to \mathbb{Z}(U_4)^{\oplus 2} \to 0. \quad (\ast \ast)$$

Let $I$ be the poset of containment relations between the $U_i$. (Since the collection $U_i$ is closed under intersection, $I$ has joins and, if we adjoin an extra minimal element $0$ of $I$, then $I$ is a lattice.) I am looking for a recipe which would look at the poset $I$ and spit out the complex $(\ast \ast)$.

Mobius inversion tells me that the sheaf $\mathbb{Z}(U_i)$ should be used "$\mu(0,i)$ times", where $\mu$ is the Mobius function and the scare quotes are because using $U_i$ in an odd cohomological degree counts negatively. For example, the double occurrence of $U_4$ in $(\ast \ast)$ reflects that $\mu(0,2) = 2$ for this poset. So this is why I say that I want to "categorify Mobius inversion" -- I want to turn that number into a vector space (or collection of vector spaces).

Thanks!

) is bad because it's longer, but also because it doesn't respect degree (U4 appears in two different degrees) 2. The complex (*) is particularly good if the Mobius function vanishes somewhere, since we don't need to compute that group! $\endgroup$ – John Wiltshire-Gordon Mar 15 '12 at 1:13`$U = \mathbb{R}^2 \setminus \{ (0,0) \}$`

, I think that $\iota_{\ast} \mathbb{Z}(U) \cong \mathbb{Z}$. $\endgroup$ – David E Speyer Mar 15 '12 at 10:12`$U_i$`

and form the "opposite-order" complex from the terms`$j_! \mathbb{Z}$`

where $j$ ranges over the open inclusions, the Mayer-Vietoris sequence for a sheaf $\cal F$ can be deduced by applying $Hom(−,\cal F)$. $\endgroup$ – Tyler Lawson Mar 15 '12 at 13:25