Calculating Mayer-Vietoris efficiently 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!
 A: To be safe, let me assume the cohomologies are taken with coefficients in a field, like $\mathbf{C}$.
Let $I' \subset I$ be the indices for which $U_i$ is nonempty.  The incidence algebra of $I'$ is a finite-dimensional algebra that naturally acts on the vector space of $\mathbf{C}$-valued functions on $I'$.  Your "categorified Mobius inversion" amounts to finding the minimal projective resolution of this module.
Let $f:X \to I'$ be the function that carries $x$ to the index of $\bigcap_{i \in I \mid x \in U_i} U_i$.  This function is continuous for topology on $I'$ whose open subsets are order ideals.  The Mayer-Vietoris spectral sequence for the cover is also the Leray spectral sequence for the map $f$ and the constant sheaf .
$$
E_2^{st} = H^s(I';R^t f_* \mathbf{C}) \implies H^{s+t}(X)
$$
A sheaf on a finite topological space like $I'$ is the same data as a functor out of $I'$ regarded as a poset, and is also the same data as a module over the incidence algebra of $I'$.  If $\mathcal{F}$ is a sheaf, the corresponding functor $F$ is given by the formula
$$
F(i) = \Gamma(\text{minimal open neighborhood of $i$};\mathcal{F})
$$
The corresponding module $M$ is the direct sum of all the $F(i)$.  Under this correspondence:


*

*The sheaves $R^t f_* \mathbf{C}$ take the value $H^t(U_i;\mathbf{C})$ at $i$.

*Projective modules over finite dimensional algebras have a Krull-Schmidt property.  In the case of the incidence algebra the indecomposable projectives are parametrized by $i \in I'$.  The projective $P_{i}$ is given by
$$
P_i(j) = \begin{cases}
\mathbf{C} & \text{if $j \leq i$} \\
0 & \text{otherwise}
\end{cases}
$$
Homomorphisms out of $P_i$ compute the value of the functor at $i$.

*The constant sheaf on $I'$ is the module $\mathbf{C}^{I'}$.


As $H^s(I';-) = \mathrm{Ext}^s(\text{constant sheaf},-)$, a projective resolution of $\mathbf{C}^{I'}$ gives a chain complex computing $H^s(I';-)$ and the $E_2$ page of the spectral sequence.  The theory of finite-dimensional algebras says that there is a unique minimal resolution (it appears as a subquotient of any other projective resolution) of $\mathbf{C}^{I'}$, or of any other finite-dimensional module $M$.  One computes it by taking the projective cover of $M$, call it $P_M \to M$, next taking the projective cover of the kernel of $P_M \to M$, and so on.  
A: I would like to point out  the main theorem of 
R. Brown and P.J. Higgins, ``Colimit theorems for relative homotopy
groups'', J. Pure Appl. Algebra 22 (1981) 11-41.
now available in our book with R. Sivera,  "Nonabelian algebraic topology" EMS Tract in Math. 15 (2011), as the Higher Homotopy Seifert-van Kampen Theorem (HHSvKT). 
First it works for filtered space $X_*$. There is a functor $\Pi$ from filtered spaces to crossed complexes, defined using the fundamental groupoid $\pi_1(X_1,X_0)$,  the relative homotopy groups $\pi_n(X_n, X_{n-1},v), v \in X_0$, and the usual operations and boundary maps.  
Second it works  for so-called connected filtered spaces. A filtered space $X_*$ is called connected if it satisfies the following: 
The function $\pi_0X_0  \to \pi_0X_r$ induced by
  inclusion is surjective for all $r \geqslant 0$; and, for all $i \geqslant
  1$, 
   $\pi_i(X_r,X_i,v)=0$   for all $r >i$  and $ v \in X_0$.
This condition may be formulated in other ways. An example of a connected filtered space is the skeletal filtration of a CW-complex. 
Theorem (HHSvKT) 
Let $X_* $ be a filtered space, and let $\cal U = (
U^\lambda : \lambda \in \Lambda $ be  a family of subsets of $X$ whose
interiors cover $X$. Suppose that for every finite intersection
$U^\zeta$ of elements of $\cal U  $, the induced filtration $U^\zeta_* $ is connected. Then
 $ X_* $ is connected,  and
$$ c:\bigsqcup_{\lambda \in
\Lambda} \Pi U^\lambda_* \rightarrow \Pi X_* , $$ 
determined by the inclusions $U^\lambda \to X$, is in the category $\mathsf{Crs} $ of crossed complexes the
coequaliser  of $$a, b:\bigsqcup_{\zeta \in \Lambda^{2} } \Pi U^\zeta_* \rightrightarrows \bigsqcup_{\lambda \in \Lambda } \Pi U^\lambda_* , $$ determined by the inclusions $U^\lambda\cap U^\mu \to U^\lambda, U^\lambda\cap U^\mu \to U^\mu $.
This result does not quite deal with homology but for a CW-filtration $X_* $, $\Pi X_* $ is closely related to the cellular chains with operators of the universal cover. 
The proof of the theorem is not straightforward. One consequence is the relative Hurewicz Theorem. Another is that a CW-filtration is connected. It also includes the usual Seifert-van Kampen Theorem for the fundamental groupoid on a set of base  points, and Whitehead's theorem on free crossed modules. In fact it enables some calculations of homotopy 2-types, in terms of  colimits of crossed modules. 
This may seem way out, but I hope readers can see that the basic situation is as asked for in the question, and that the Theorem will give some information not otherwise available. 
