TITLE: Relative version of de Rham cohomology with local coefficients
QUESTION [8 upvotes]: Given a vector bundle $E \to M$ with connection $\nabla$, we get a twisted de Rham sequence using the exterior covariant derivative:
$$\mathcal{E} \xrightarrow{d^\nabla=\nabla} \Omega^1_M \otimes_{\Omega^0_M} \mathcal{E} \xrightarrow{d^\nabla} \Omega^2_M \otimes_{\Omega^0_M}  \mathcal{E} \xrightarrow{d^\nabla} \cdots$$
Here, I am using $\mathcal{E}$ to denote the sheaf of smooth sections of $E$, and $\Omega_M$ the sheaf of smooth differential forms on $M$. 
We say that the connection $\nabla$ is flat if $(d^\nabla)^2 = 0$, and in this case we get an actual complex of sheaves. In this situation, the sheaf $\mathcal{L}$ of parallel sections is a local system and we can use this complex (a soft resolution) to compute its sheaf cohomology. 
As described in Kashiwara and Schapira, or in Liviu Nicolaescu's answer here, given a closed submanifold $i: Z \hookrightarrow M$, and $j: M \setminus Z \hookrightarrow M$ the inclusion of its complement, we get a short exact sequence of sheaves
$$0 \to j_!j^{-1}\mathcal{L} \to \mathcal{L} \to i_*i^{-1}\mathcal{L} \to 0.$$
The natural maps here are the counit $j_!j^{-1}\mathcal{L} \to \mathcal{L}$ of the $j_! \dashv j^{-1}$ adjunction, and the unit $\mathcal{L} \to i_*i^{-1}\mathcal{L}$ of the $i^{-1} \dashv i_*$ adjunction, respectively.
Note that the pullback bundle $i^* E \to Z$ inherits the flat connection from $E \to M$, and this gives rise to a complex of sheaves on $Z$
$$\mathcal{i^*E} \xrightarrow{d^\nabla=\nabla} \Omega^1_Z \otimes_{\Omega^0_Z}  i^*\mathcal{E} \xrightarrow{d^\nabla} \Omega^2_Z \otimes_{\Omega^0_Z}  i^*\mathcal{E} \xrightarrow{d^\nabla} \cdots$$
Note that $i^*= \Omega^0_Z \otimes_{i^{-1} \Omega^0_M} i^{-1}$, so it is not the same as the inverse image functor above. Is it correct to say that this complex gives a soft resolution of the sheaf $i^{-1} \mathcal{L}$? If so, how can I show that this is true? 
This problem has come up in my research (in differential geometry) but my department doesn't really have anyone who works with sheaves. I would really appreciate some help with this!

REPLY [2 votes]: I had a look in Ramanan's Global Calculus, and sure enough he gives the necessary details:
Let $\mathbb{R}_M$ denote the constant sheaf corresponding to $\mathbb{R}$ on $M$.
Note that $\Omega^k_M\otimes_{\mathbb{R}_M} \mathcal{L} = \Omega^k_M\otimes_{\Omega^0_M} \mathcal{E},$ and hence the connection is recovered from the exterior derivative by the formula:
$$\nabla = d \otimes_{\mathbb{R}_M} 1:  \mathcal{E} \to \Omega^1_M \otimes_{\Omega^0_M} \mathcal{E}.$$
So in particular, tensoring the de Rham resolution of $\mathbb{R}_M$ with $\mathcal{L}$ recovers the twisted de Rham resolution of $\mathcal{L}$.
With regards to the resolution of $i^{-1} \mathcal{L}$ on $Z$, note that we have the following canonical isomorphisms:
\begin{align}
\Omega^k_Z \otimes_{\Omega^0_Z} i^* \mathcal{E} &= \Omega^k_Z \otimes_{\Omega^0_Z} (\Omega^0_Z \otimes_{i^{-1}\Omega^0_M} i^{-1} \mathcal{E}) \\
&\cong \Omega^k_Z \otimes_{i^{-1}\Omega^0_M} i^{-1} \mathcal{E} \\
&\cong \Omega^k_Z \otimes_{i^{-1}\Omega^0_M} i^{-1} (\Omega^0_M\otimes_{\mathbb{R}_M} \mathcal{L}) \\
&\cong \Omega^k_Z \otimes_{i^{-1}\Omega^0_M} i^{-1}\Omega^0_M \otimes_{\mathbb{R}_Z} i^{-1} \mathcal{L} \\
&\cong\Omega^k_Z \otimes_{\mathbb{R}_Z} i^{-1} \mathcal{L}.
\end{align}
Hence, tensoring the de Rham resolution of $\mathbb{R}_Z$ with $i^{-1} \mathcal{L}$ gives the usual de Rham resolution of $i^{-1} \mathcal{L}$, and this computes the twisted de Rham cohomology on $Z$.
The same idea works to get the resolution of $j^{-1} \mathcal{L}$ on $M \setminus Z$. Then, applying the "extension by zero" functor $j_!$, we get a resolution for $j_!j^{-1} \mathcal{L}$, which computes the relative twisted de Rham cohomology.