hcju/stacksqa huggingface dataset:
We first show that $\mathcal{A}'_X \subset \textit{Ab}(\textit{LC}_{Zar}/X)$ is a weak Serre subcategory by checking conditions (1), (2), (3), and (4) of Homology, Lemma \ref{homology-lemma-characterize-weak-serre-subcategory}. Parts (1), (2), (3) are immediate as $\pi_X^{-1}$ is exact and fully faithful by Lemma \ref{lemma-collect-true-things-Zar} part (3). If $0 \to \pi_X^{-1}\mathcal{F} \to \mathcal{G} \to \pi_X^{-1}\mathcal{F}' \to 0$ is a short exact sequence in $\textit{Ab}(\textit{LC}_{Zar}/X)$ then $0 \to \mathcal{F} \to \pi_{X, *}\mathcal{G} \to \mathcal{F}' \to 0$ is exact by Lemma \ref{lemma-collect-true-things-Zar} part (2). Hence $\mathcal{G} = \pi_X^{-1}\pi_{X, *}\mathcal{G}$ is in $\mathcal{A}'_X$ which checks the final condition. \medskip\noindent Property (\ref{item-base-change-P}) holds by Lemma \ref{lemma-LC-basic} and the fact that the base change of a proper map is a proper map, see Topology, Theorem \ref{topology-theorem-characterize-proper}. \medskip\noindent Property (\ref{item-restriction-A}) follows from the commutative diagram (5) in Lemma \ref{lemma-collect-true-things-Zar}. \medskip\noindent Property (\ref{item-A-sheaf}) is Lemma \ref{lemma-describe-pullback-pi}. \medskip\noindent Property (\ref{item-A-and-P}) is Lemma \ref{lemma-collect-true-things-Zar} part (7)(b). \medskip\noindent Proof of (\ref{item-refine-tau-by-P}). Suppose given a qc covering $\{U_i \to U\}$. For $u \in U$ pick $i_1, \ldots, i_m \in I$ and quasi-compact subsets $E_j \subset U_{i_j}$ such that $\bigcup f_{i_j}(E_j)$ is a neighbourhood of $u$. Observe that $Y = \coprod_{j = 1, \ldots, m} E_j \to U$ is proper as a continuous map from a quasi-compact space to a Hausdorff one (Topology, Lemma \ref{topology-lemma-closed-map}). Choose an open neighbourhood $u \in V$ contained in $\bigcup f_{i_j}(E_j)$. Then $Y \times_U V \to V$ is a surjective proper morphism and hence a $qc$ covering by Lemma \ref{lemma-proper-surjective-is-qc-covering}. Since we can do this for every $u \in U$ we see that (\ref{item-refine-tau-by-P}) holds.
By Lemma \ref{lemma-compare-qc-zar} the lemmas in Section \ref{section-compare-general} all apply to our current setting. To translate the results observe that the category $\mathcal{A}_X$ of Lemma \ref{lemma-A} is the essential image of $a_X^{-1} : \textit{Ab}(X) \to \textit{Ab}(\textit{LC}_{qc}/X)$. \medskip\noindent Part (1) is equivalent to $(V_n)$ for all $n$ which holds by Lemma \ref{lemma-V-C-all-n-general}. \medskip\noindent Part (2) follows by applying $\epsilon_Y^{-1}$ to the conclusion of Lemma \ref{lemma-V-implies-C-general}. \medskip\noindent Part (3) follows from Lemma \ref{lemma-V-C-all-n-general} part (1) because $\pi_X^{-1}K$ is in $D^+_{\mathcal{A}'_X}(\textit{LC}_{Zar}/X)$ and $a_X^{-1} = \epsilon_X^{-1} \circ a_X^{-1}$. \medskip\noindent Part (4) follows from Lemma \ref{lemma-V-C-all-n-general} part (2) for the same reason.
We first reduce the statement to the case where $K$ is given by a single abelian sheaf. Namely, represent $K$ by a bounded below complex $\mathcal{F}^\bullet$. By the case of a sheaf we see that $\mathcal{F}^n = a_{X, *} a_X^{-1} \mathcal{F}^n$ and that the sheaves $R^qa_{X, *}a_X^{-1}\mathcal{F}^n$ are zero for $q > 0$. By Leray's acyclicity lemma (Derived Categories, Lemma \ref{derived-lemma-leray-acyclicity}) applied to $a_X^{-1}\mathcal{F}^\bullet$ and the functor $a_{X, *}$ we conclude. From now on assume $K = \mathcal{F}$. \medskip\noindent By Lemma \ref{lemma-describe-pullback-pi} we have $a_{X, *}a_X^{-1}\mathcal{F} = \mathcal{F}$. Thus it suffices to show that $R^qa_{X, *}a_X^{-1}\mathcal{F} = 0$ for $q > 0$. For this we can use $a_X = \epsilon_X \circ \pi_X$ and the Leray spectral sequence Lemma \ref{lemma-relative-Leray}. By Lemma \ref{lemma-V-C-all-n} we have $R^i\epsilon_{X, *}(a_X^{-1}\mathcal{F}) = 0$ for $i > 0$ and $\epsilon_{X, *}a_X^{-1}\mathcal{F} = \pi_X^{-1}\mathcal{F}$. By Lemma \ref{lemma-collect-true-things-Zar} we have $R^j\pi_{X, *}(\pi_X^{-1}\mathcal{F}) = 0$ for $j > 0$. This concludes the proof.
This is true because going around the diagram either way we obtain the map adjoint to the map \begin{align*} & L(f' \circ f)^*\left(R(f' \circ f)_*K \otimes_{\mathcal{O}''}^\mathbf{L} R(f' \circ f)_*L\right) \\ & = L(f' \circ f)^*R(f' \circ f)_*K \otimes_\mathcal{O}^\mathbf{L} L(f' \circ f)^*R(f' \circ f)_*L) \\ & \to K \otimes_\mathcal{O}^\mathbf{L} L \end{align*} in $D(\mathcal{O})$. To see this one uses that the composition of the counits like so $$ L(f' \circ f)^*R(f' \circ f)_* = Lf^* L(f')^* Rf'_* Rf_*  \to Lf^* Rf_* \to \text{id} $$ is the counit for $L(f' \circ f)^*$ and $R(f' \circ f)_*$. See Categories, Lemma \ref{categories-lemma-compose-counits}.
We have \begin{align*} H^0(\Gamma(U, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet))) & = \Hom_{K(\mathcal{O}_U)}(L|_U, M|_U) \\ & = \Hom_{D(\mathcal{O}_U)}(L|_U, M|_U) \end{align*} The first equality is (\ref{equation-cohomology-hom-complex}). The second equality is true because $\mathcal{I}^\bullet|_U$ is K-injective by Lemma \ref{lemma-restrict-K-injective-to-open}. The proof of the last equation is similar except that it uses (\ref{equation-global-cohomology-hom-complex}).
Let $M$ be the object of $D(\mathcal{O})$ represented by $\mathcal{I}^\bullet$ and $(\mathcal{I}')^\bullet$. Let $L$ be the object of $D(\mathcal{O})$ represented by $\mathcal{L}^\bullet$ and $(\mathcal{L}')^\bullet$. By Lemma \ref{lemma-RHom-into-K-injective} we see that the sheaves $$ H^0(\SheafHom^\bullet(\mathcal{L}^\bullet, (\mathcal{I}')^\bullet)) \quad\text{and}\quad H^0(\SheafHom^\bullet((\mathcal{L}')^\bullet, \mathcal{I}^\bullet)) $$ are both equal to the sheaf associated to the presheaf $$ U \longmapsto \Hom_{D(\mathcal{O}_U)}(L|_U, M|_U) $$ Thus the map is a quasi-isomorphism.
Namely, if $\mathcal{K}^\bullet$ is an acyclic complex of $\mathcal{O}$-modules, then \begin{align*} \Hom_{K(\mathcal{O})}(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)) & = H^0(\Gamma(\mathcal{C}, \SheafHom^\bullet(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)))) \\ & = H^0(\Gamma(\mathcal{C}, \SheafHom^\bullet(\text{Tot}( \mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet), \mathcal{I}^\bullet))) \\ & = \Hom_{K(\mathcal{O})}( \text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet), \mathcal{I}^\bullet) \\ & = 0 \end{align*} The first equality by (\ref{equation-global-cohomology-hom-complex}). The second equality by Lemma \ref{lemma-compose}. The third equality by (\ref{equation-global-cohomology-hom-complex}). The final equality because $\text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet)$ is acyclic because $\mathcal{L}^\bullet$ is K-flat (Definition \ref{definition-K-flat}) and because $\mathcal{I}^\bullet$ is K-injective.
Choose a K-injective complex $\mathcal{I}^\bullet$ of $\mathcal{O}$-modules representing $M$ and a K-flat complex $\mathcal{L}^\bullet$ representing $L$. Then $\SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)$ is K-injective by Lemma \ref{lemma-RHom-from-K-flat-into-K-injective}. Hence we can compute cohomology over $U$ by simply taking sections over $U$ and the result follows from Lemma \ref{lemma-RHom-into-K-injective}.
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$ and a K-flat complex of $\mathcal{O}$-modules $\mathcal{L}^\bullet$ representing $L$. For any complex of $\mathcal{O}$-modules $\mathcal{K}^\bullet$ we have $$ \SheafHom^\bullet(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)) = \SheafHom^\bullet( \text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet), \mathcal{I}^\bullet) $$ by Lemma \ref{lemma-compose}. Note that the left hand side represents $R\SheafHom(K, R\SheafHom(L, M))$ (use Lemma \ref{lemma-RHom-from-K-flat-into-K-injective}) and that the right hand side represents $R\SheafHom(K \otimes_\mathcal{O}^\mathbf{L} L, M)$. This proves the displayed formula of the lemma. Taking global sections and using Lemma \ref{lemma-section-RHom-over-U} we obtain (\ref{equation-internal-hom}).
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$, a K-injective complex $\mathcal{J}^\bullet$ representing $L$, and a K-flat complex $\mathcal{K}^\bullet$ representing $K$. The map is defined using the map $$ \text{Tot}(\SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_\mathcal{O} \mathcal{K}^\bullet) \longrightarrow \SheafHom^\bullet(\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet), \mathcal{I}^\bullet) $$ of Lemma \ref{lemma-evaluate-and-more}. By our particular choice of complexes the left hand side represents $R\SheafHom(L, M) \otimes_\mathcal{O}^\mathbf{L} K$ and the right hand side represents $R\SheafHom(R\SheafHom(K, L), M)$. We omit the proof that this is functorial in all three objects of $D(\mathcal{O})$.
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$, a K-injective complex $\mathcal{J}^\bullet$ representing $L$, and any complex of $\mathcal{O}$-modules $\mathcal{K}^\bullet$ representing $K$. By Lemma \ref{lemma-composition} there is a map of complexes $$ \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_\mathcal{O} \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet) \right) \longrightarrow \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{I}^\bullet) $$ The complexes of $\mathcal{O}$-modules $\SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet)$, $\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet)$, and $\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{I}^\bullet)$ represent $R\SheafHom(L, M)$, $R\SheafHom(K, L)$, and $R\SheafHom(K, M)$. If we choose a K-flat complex $\mathcal{H}^\bullet$ and a quasi-isomorphism $\mathcal{H}^\bullet \to \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet)$, then there is a map $$ \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_\mathcal{O} \mathcal{H}^\bullet \right) \longrightarrow \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_\mathcal{O} \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet) \right) $$ whose source represents $R\SheafHom(L, M) \otimes_\mathcal{O}^\mathbf{L} R\SheafHom(K, L)$. Composing the two displayed arrows gives the desired map. We omit the proof that the construction is functorial.
Choose a K-flat complex $\mathcal{K}^\bullet$ representing $K$, and a K-injective complex $\mathcal{I}^\bullet$ representing $L$, and choose any complex of $\mathcal{O}$-modules $\mathcal{M}^\bullet$ representing $M$. Choose a quasi-isomorphism $\text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{I}^\bullet) \to \mathcal{J}^\bullet$ where $\mathcal{J}^\bullet$ is K-injective. Then we use the map $$ \text{Tot}\left( \mathcal{K}^\bullet \otimes_\mathcal{O} \SheafHom^\bullet(\mathcal{M}^\bullet, \mathcal{I}^\bullet) \right) \to \SheafHom^\bullet(\mathcal{M}^\bullet, \text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{I}^\bullet)) \to \SheafHom^\bullet(\mathcal{M}^\bullet, \mathcal{J}^\bullet) $$ where the first map is the map from Lemma \ref{lemma-diagonal-better}.
Choose a K-flat complex $\mathcal{K}^\bullet$ representing $K$ and any complex of $\mathcal{O}$-modules $\mathcal{L}^\bullet$ representing $L$. Choose a K-injective complex $\mathcal{J}^\bullet$ and a quasi-isomorphism $\text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet) \to \mathcal{J}^\bullet$. Then we use $$ \mathcal{K}^\bullet \to \SheafHom^\bullet(\mathcal{L}^\bullet, \text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{O} \mathcal{L}^\bullet)) \to \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{J}^\bullet) $$ where the first map comes from Lemma \ref{lemma-diagonal}.
The vanishing of the lemma follows from Lemma \ref{lemma-cech-vanish-collection} if we can prove vanishing of all higher {\v C}ech cohomology groups $\check H^p(\mathcal{U}, g^{-1}\mathcal{I})$ for any covering $\mathcal{U} = \{U_i \to U\}$ of $\mathcal{C}$. Since $u$ is continuous, $u(\mathcal{U}) = \{u(U_i) \to u(U)\}$ is a covering of $\mathcal{D}$, and $u(U_{i_0} \times_U \ldots \times_U U_{i_n}) = u(U_{i_0}) \times_{u(U)} \ldots \times_{u(U)} u(U_{i_n})$. Thus we have $$ \check H^p(\mathcal{U}, g^{-1}\mathcal{I}) = \check H^p(u(\mathcal{U}), \mathcal{I}) $$ because $g^{-1} = u^p$ by Sites, Lemma \ref{sites-lemma-when-shriek}. Since $\mathcal{I}$ is an injective $\mathcal{O}_\mathcal{D}$-module these {\v C}ech cohomology groups vanish, see Lemma \ref{lemma-injective-module-trivial-cech}.
We will use the criterion of Lemma \ref{lemma-characterize-limp}. Condition (1) holds by Lemma \ref{lemma-pullback-injective-pre-limp}. Let $K' \to K$ be a surjective map of sheaves of sets on $\mathcal{C}$. Since $g_!^{Sh}$ is a left adjoint, we see that $g_!^{Sh}K' \to g_!^{Sh}K$ is surjective. Observe that \begin{align*} H^0(K' \times_K \ldots \times_K K', g^{-1}\mathcal{I})  & = H^0(g_!^{Sh}(K' \times_K \ldots \times_K K'), \mathcal{I}) \\ & = H^0(g_!^{Sh}K' \times_{g_!^{Sh}K} \ldots \times_{g_!^{Sh}K} g_!^{Sh}K', \mathcal{I}) \end{align*} by our assumption on $g_!^{Sh}$. Since $\mathcal{I}$ is an injective module it is totally acyclic by Lemma \ref{lemma-direct-image-injective-sheaf} (applied to the identity). Hence we can use the converse of Lemma \ref{lemma-characterize-limp} to see that the complex $$ 0 \to H^0(K, g^{-1}\mathcal{I}) \to H^0(K', g^{-1}\mathcal{I}) \to H^0(K' \times_K K', g^{-1}\mathcal{I}) \to \ldots $$ is exact as desired.
In the bounded below case (1) and (2) can be seen by representing $K$ by a bounded below complex of injectives and using Lemma \ref{lemma-pullback-injective-pre-limp} as well as Leray's acyclicity lemma. In the unbounded case, first note that (1) is a special case of (2). For (2) we can use $$ R\Gamma(U, g^*M) = R\Hom_{\mathcal{O}_\mathcal{C}}(j_{U!}\mathcal{O}_U, g^*M) = R\Hom_{\mathcal{O}_\mathcal{D}}(j_{u(U)!}\mathcal{O}_{u(U)}, M) = R\Gamma(u(U), M) $$ where the middle equality is a consequence of Lemma \ref{lemma-existence-derived-lower-shriek}.
We have $g^* = Lg^* = g^{-1}$ and $(g')^* = L(g')^* = (g')^{-1}$ by condition (5). By Lemma \ref{lemma-modules-abelian-unbounded} it suffices to prove the result on the derived category $D(\mathcal{C})$ of abelian sheaves. Choose an object $K \in D(\mathcal{C})$. Let $\mathcal{I}^\bullet$ be a K-injective complex of abelian sheaves on $\mathcal{C}$ representing $K$. By Derived Categories, Lemma \ref{derived-lemma-adjoint-preserve-K-injectives} and assumption (6) we find that $(g')^{-1}\mathcal{I}^\bullet$ is a K-injective complex of abelian sheaves on $\mathcal{C}'$. By Modules on Sites, Lemma \ref{sites-modules-lemma-special-square-cocontinuous} we find that $f'_*(g')^{-1}\mathcal{I}^\bullet = g^{-1}f_*\mathcal{I}^\bullet$. Since $f_*\mathcal{I}^\bullet$ represents $Rf_*K$ and since $f'_*(g')^{-1}\mathcal{I}^\bullet$ represents $Rf'_*(g')^{-1}K$ we conclude.
We have $g^* = Lg^* = g^{-1}$ and $(g')^* = L(g')^* = (g')^{-1}$ by condition (5). By Lemma \ref{lemma-modules-abelian-unbounded} it suffices to prove the result on the derived category $D^+(\mathcal{C})$ or $D(\mathcal{C})$ of abelian sheaves. \medskip\noindent Choose an object $K \in D^+(\mathcal{C})$. Let $\mathcal{I}^\bullet$ be a bounded below complex of injective abelian sheaves on $\mathcal{C}$ representing $K$. By Lemma \ref{lemma-pullback-injective-pre-limp} we see that $H^p(U', (g')^{-1}\mathcal{I}^q) = 0$ for all $p > 0$ and any $q$ and any $U' \in \Ob(\mathcal{C}')$. Recall that $R^pf'_*(g')^{-1}\mathcal{I}^q$ is the sheaf associated to the presheaf $V' \mapsto H^p(u'(V'), (g')^{-1}\mathcal{I}^q)$, see Lemma \ref{lemma-higher-direct-images}. Thus we see that $(g')^{-1}\mathcal{I}^q$ is right acyclic for the functor $f'_*$. By Leray's acyclicity lemma (Derived Categories, Lemma \ref{derived-lemma-leray-acyclicity}) we find that $f'_*(g')^*\mathcal{I}^\bullet$ represents $Rf'_*(g')^{-1}K$. By Modules on Sites, Lemma \ref{sites-modules-lemma-special-square-continuous} we find that $f'_*(g')^{-1}\mathcal{I}^\bullet = g^{-1}f_*\mathcal{I}^\bullet$. Since $g^{-1}f_*\mathcal{I}^\bullet$ represents $g^{-1}Rf_*K$ we conclude. \medskip\noindent Choose an object $K \in D(\mathcal{C})$. Let $\mathcal{I}^\bullet$ be a K-injective complex of abelian sheaves on $\mathcal{C}$ representing $K$. By Derived Categories, Lemma \ref{derived-lemma-adjoint-preserve-K-injectives} and assumption (6) we find that $(g')^{-1}\mathcal{I}^\bullet$ is a K-injective complex of abelian sheaves on $\mathcal{C}'$. By Modules on Sites, Lemma \ref{sites-modules-lemma-special-square-continuous} we find that $f'_*(g')^{-1}\mathcal{I}^\bullet = g^{-1}f_*\mathcal{I}^\bullet$. Since $f_*\mathcal{I}^\bullet$ represents $Rf_*K$ and since $f'_*(g')^{-1}\mathcal{I}^\bullet$ represents $Rf'_*(g')^{-1}K$ we conclude.
Observe that $\pi_U$ is the restriction of $\pi$ to the localizations, see Sites, Lemma \ref{sites-lemma-localize-cocontinuous}. For an object $V \to p(U)$ of $\mathcal{D}/p(U)$ denote $V \times_{p(U)} U \to U$ the strongly cartesian morphism of $\mathcal{C}$ over $\mathcal{D}$ which exists as $p$ is a fibred category. The functor $$ v : \mathcal{D}/p(U) \to \mathcal{C}/U,\quad V/p(U) \mapsto V \times_{p(U)} U/U $$ is continuous by the definition of the topology on $\mathcal{C}$. Moreover, it is a right adjoint to $p$ by the definition of strongly cartesian morphisms. Hence we are in the situation discussed in Sites, Section \ref{sites-section-cocontinuous-adjoint} and we see that the sheaf $\pi_{U, *}\mathcal{F}$ is equal to $V \mapsto \mathcal{F}(V \times_{p(U)} U)$ (see especially Sites, Lemma \ref{sites-lemma-have-functor-other-way-morphism}). \medskip\noindent But here we have more. Namely, the functor $v$ is also cocontinuous (as all morphisms in coverings of $\mathcal{C}$  are strongly cartesian). Hence $v$ defines a morphism $\sigma$ as indicated in the lemma. The equality $\sigma^{-1} = \pi_{U, *}$ is immediate from the definition. Since $\pi_U^{-1}\mathcal{G}$ is given by the rule $U'/U \mapsto \mathcal{G}(p(U')/p(U))$ it follows that $\sigma^{-1} \circ \pi_U^{-1} = \text{id}$ which proves the equality $\pi_U \circ \sigma = \text{id}$.
Let $v' : \mathcal{D}/V \to \mathcal{C}'/U'$ be the functor constructed in the proof of Lemma \ref{lemma-fibred-category-with-object} starting with $p' : \mathcal{C}' \to \mathcal{D}'$ and the object $U'$. Since $u$ is a $1$-morphism of fibred categories over $\mathcal{D}$ it transforms strongly cartesian morphisms into strongly cartesian morphisms, hence the functor $v = u \circ v'$ is the functor of the proof of Lemma \ref{lemma-fibred-category-with-object} relative to $p : \mathcal{C} \to \mathcal{D}$ and $U$. Thus our lemma follows from that lemma.
The functor $u$ is continuous and cocontinuous Stacks, Lemma \ref{stacks-lemma-topology-inherited-functorial}. Hence the existence of the functors $g_!$, $g_!^{\textit{Ab}}$, $Lg_!$, and $Lg_!^{\textit{Ab}}$ can be found in Modules on Sites, Sections \ref{sites-modules-section-exactness-lower-shriek} and \ref{sites-modules-section-lower-shriek-modules} and Section \ref{section-derived-lower-shriek}. \medskip\noindent To prove (2) it suffices to show that the canonical map $$ g_!^{\textit{Ab}}j_{U'!}\mathcal{O}_{U'} \to j_{u(U')!}\mathcal{O}_{u(U')} $$ is an isomorphism for all objects $U'$ of $\mathcal{C}'$, see Modules on Sites, Remark \ref{sites-modules-remark-when-shriek-equal}. Similarly, to prove (4) it suffices to show that the canonical map $$ Lg_!^{\textit{Ab}}j_{U'!}\mathcal{O}_{U'} \to j_{u(U')!}\mathcal{O}_{u(U')} $$ is an isomorphism in $D(\mathcal{C})$ for all objects $U'$ of $\mathcal{C}'$, see Remark \ref{remark-when-derived-shriek-equal}. This will also imply the previous formula hence this is what we will show. \medskip\noindent We will use that for a localization morphism $j$ the functors $j_!$ and $j_!^{\textit{Ab}}$ agree (see Modules on Sites, Remark \ref{sites-modules-remark-localize-shriek-equal}) and that $j_!$ is exact (Modules on Sites, Lemma \ref{sites-modules-lemma-extension-by-zero-exact}). Let us adopt the notation of Lemma \ref{lemma-morphism-fibred-categories-with-object}. Since $Lg_!^{\textit{Ab}} \circ j_{U'!} = j_{U!} \circ L(g')^{\textit{Ab}}_!$ (by commutativity of Sites, Lemma \ref{sites-lemma-localize-cocontinuous} and uniqueness of adjoint functors) it suffices to prove that $L(g')^{\textit{Ab}}_!\mathcal{O}_{U'} = \mathcal{O}_U$. Using the results of Lemma \ref{lemma-morphism-fibred-categories-with-object} we have for any object $E$ of $D(\mathcal{C}/u(U'))$ the following sequence of equalities \begin{align*} \Hom_{D(\mathcal{C}/U)}(L(g')_!^{\textit{Ab}}\mathcal{O}_{U'}, E) & = \Hom_{D(\mathcal{C}'/U')}(\mathcal{O}_{U'}, (g')^{-1}E) \\ & = \Hom_{D(\mathcal{C}'/U')}((\pi'_{U'})^{-1}\mathcal{O}_V, (g')^{-1}E) \\ & = \Hom_{D(\mathcal{D}/V)}(\mathcal{O}_V, R\pi'_{U', *}(g')^{-1}E) \\ & = \Hom_{D(\mathcal{D}/V)}(\mathcal{O}_V, (\sigma')^{-1}(g')^{-1}E) \\ & = \Hom_{D(\mathcal{D}/V)}(\mathcal{O}_V, \sigma^{-1}E) \\ & = \Hom_{D(\mathcal{D}/V)}(\mathcal{O}_V, \pi_{U, *}E) \\ & = \Hom_{D(\mathcal{C}/U)}(\pi_U^{-1}\mathcal{O}_V, E) \\ & = \Hom_{D(\mathcal{C}/U)}(\mathcal{O}_U, E) \end{align*} By Yoneda's lemma we conclude.
Denote $\mathcal{H}$ be the rule of the lemma. For a morphism $h : V' \to V$ of $\mathcal{D}$ there is a pullback functor $h^* : \mathcal{C}_V \to \mathcal{C}_{V'}$ of fibre categories (Categories, Definition \ref{categories-definition-pullback-functor-fibred-category}). Moreover for $U \in \Ob(\mathcal{C}_V)$ there is a strongly cartesian morphism $h^*U \to U$ covering $h$. Restriction along these strongly cartesian morphisms defines a transformation of functors $$ \mathcal{F}|_{\mathcal{C}_V} \longrightarrow \mathcal{F}|_{\mathcal{C}_{V'}} \circ h^*. $$ Hence a map $\mathcal{H}(V) \to \mathcal{H}(V')$ between colimits, see Categories, Lemma \ref{categories-lemma-functorial-colimit}. \medskip\noindent To prove the lemma we show that $$ \Mor_{\textit{PSh}(\mathcal{D})}(\mathcal{H}, \mathcal{G}) = \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, \pi^{-1}\mathcal{G}) $$ for every sheaf $\mathcal{G}$ on $\mathcal{C}$. An element of the left hand side is a compatible system of maps $\mathcal{F}(U) \to \mathcal{G}(p(U))$ for all $U$ in $\mathcal{C}$. Since $\pi^{-1}\mathcal{G}(U) = \mathcal{G}(p(U))$ by our choice of topology on $\mathcal{C}$ we see the same thing is true for the right hand side and we win.
If $\mathcal{C}$ has an initial object, then $\pi_!$ is computed by evaluating on this object and the statement is clear. If $\mathcal{C}$ has a final object, then $R\pi_*$ is computed by evaluating on this object, hence $R\pi_* \circ \pi^{-1} \cong \text{id}$ on $D(\textit{Ab})$, resp.\ $D(B)$. This implies that $\pi^{-1} : D(\textit{Ab}) \to D(\mathcal{C})$, resp.\ $\pi^{-1} : D(B) \to D(\underline{B})$ is fully faithful, see Categories, Lemma \ref{categories-lemma-adjoint-fully-faithful}. Then the same lemma implies that $L\pi_! \circ \pi^{-1} = \text{id}$ as desired.