hcju/stacksqa huggingface dataset:
Let $U \in \Ob(\mathcal{C})$. Let $\{E_i \to v(u(U))\}$ be a covering of $U$ in $\mathcal{E}$. By assumption there exists a covering $\{D_j \to u(U)\}$ in $\mathcal{D}$ such that $\{v(D_j) \to v(u(U))\}$ refines $\{E_i \to v(u(U))\}$. Also by assumption there exists a covering $\{C_l \to U\}$ in $\mathcal{C}$ such that $\{u(C_l) \to u(U)\}$ refines $\{D_j \to u(U)\}$. Then it is true that $\{v(u(C_l)) \to v(u(U))\}$ refines the covering $\{E_i \to v(u(U))\}$. This proves that $v \circ u$ is cocontinuous. To prove the last assertion it suffices to show that ${}_sv \circ {}_su = {}_s(v \circ u)$. It suffices to prove that ${}_pv \circ {}_pu = {}_p(v \circ u)$, see Lemma \ref{lemma-pu-sheaf}. Since ${}_pu$, resp.\ ${}_pv$, resp.\ ${}_p(v \circ u)$ is right adjoint to $u^p$, resp.\ $v^p$, resp.\ $(v \circ u)^p$ it suffices to prove that $u^p \circ v^p = (v \circ u)^p$. And this is direct from the definitions.
By Lemma \ref{lemma-pushforward-sheaf} for any sheaf $\mathcal{G}$ on $\mathcal{D}$ the presheaf $u^p\mathcal{G}$ is a sheaf on $\mathcal{C}$. And then we see the adjointness by the following string of equalities \begin{eqnarray*} \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, g^{-1}\mathcal{G}) & = & \Mor_{\textit{PSh}(\mathcal{C})}(\mathcal{F}, u^p\mathcal{G}) \\ & = & \Mor_{\textit{PSh}(\mathcal{D})}(u_p\mathcal{F}, \mathcal{G}) \\ & = & \Mor_{\Sh(\mathcal{D})}(g_{!}\mathcal{F}, \mathcal{G}) \end{eqnarray*} The statement on limits and colimits follows from the discussion in Categories, Section \ref{categories-section-adjoint}.
Assume (a), (b), and (c). We have $g_! = (u_p\ )^\#$. Recall (Lemma \ref{lemma-limit-sheaf}) that limits of sheaves are equal to the corresponding limits as presheaves. And sheafification commutes with finite limits (Lemma \ref{lemma-sheafification-exact}). Thus it suffices to show that $u_p$ commutes with fibre products and equalizers. To do this it suffices that colimits over the categories $(\mathcal{I}_V^u)^{opp}$ of Section \ref{section-functoriality-PSh} commute with fibre products and equalizers. This follows from Lemma \ref{lemma-almost-directed} and Categories, Lemma \ref{categories-lemma-almost-directed-commutes-equalizers}.
Let $X$ be an object of $\mathcal{C}$. In Lemmas \ref{lemma-pu-sheaf} and \ref{lemma-when-shriek} we have seen that sheafification is not necessary for the functors $g^{-1} = (u^p\ )^\#$ and $g_{*} = ({}_pu\ )^\#$. We may compute $(g^{-1}g_{*}\mathcal{F})(X) = g_{*}\mathcal{F}(u(X)) = \lim \mathcal{F}(Y)$. Here the limit is over the category of pairs $(Y, u(Y) \to u(X))$ where the morphisms $u(Y) \to u(X)$ are not required to be of the form $u(\alpha)$ with $\alpha$ a morphism of $\mathcal{C}$. By assumption (c) we see that they automatically come from morphisms of $\mathcal{C}$ and we deduce that the limit is the value on $(X, u(\text{id}_X))$, i.e., $\mathcal{F}(X)$. This proves that $g^{-1}g_{*}\mathcal{F} = \mathcal{F}$. \medskip\noindent On the other hand, $(g^{-1}g_{!}\mathcal{F})(X) = g_{!}\mathcal{F}(u(X)) = (u_p\mathcal{F})^\#(u(X))$, and $u_p\mathcal{F}(u(X)) = \colim \mathcal{F}(Y)$. Here the colimit is over the category of pairs $(Y, u(X) \to u(Y))$ where the morphisms $u(X) \to u(Y)$ are not required to be of the form $u(\alpha)$ with $\alpha$ a morphism of $\mathcal{C}$. By assumption (c) we see that they automatically come from morphisms of $\mathcal{C}$ and we deduce that the colimit is the value on $(X, u(\text{id}_X))$, i.e., $\mathcal{F}(X)$. Thus for every $X \in \Ob(\mathcal{C})$ we have $u_p\mathcal{F}(u(X)) = \mathcal{F}(X)$. Since $u$ is cocontinuous and continuous any covering of $u(X)$ in $\mathcal{D}$ can be refined by a covering (!) $\{u(X_i) \to u(X)\}$ of $\mathcal{D}$ where $\{X_i \to X\}$ is a covering in $\mathcal{C}$. This implies that $(u_p\mathcal{F})^+(u(X)) = \mathcal{F}(X)$ also, since in the colimit defining the value of $(u_p\mathcal{F})^+$ on $u(X)$ we may restrict to the cofinal system of coverings $\{u(X_i) \to u(X)\}$ as above. Hence we see that $(u_p\mathcal{F})^+(u(X)) = \mathcal{F}(X)$ for all objects $X$ of $\mathcal{C}$ as well. Repeating this argument one more time gives the equality $(u_p\mathcal{F})^\#(u(X)) = \mathcal{F}(X)$ for all objects $X$ of $\mathcal{C}$. This produces the desired equality $g^{-1}g_!\mathcal{F} = \mathcal{F}$.
By assumption the functor $u$ satisfies the hypotheses of Proposition \ref{proposition-get-morphism}. Hence $u$ defines a morphism of sites and hence a morphism of topoi $f$ as in Lemma \ref{lemma-morphism-sites-topoi}. The formulas $f_* = g^{-1}$ and $f^{-1} = g_!$ are clear from the lemma cited and Lemma \ref{lemma-when-shriek}. We have $f_* \circ g_* = g^{-1} \circ g_* \cong \text{id}$, and $g^{-1} \circ f^{-1} = g^{-1} \circ g_! \cong \text{id}$ by Lemma \ref{lemma-back-and-forth}. \medskip\noindent We still have to show that $f^{-1}$ is fully faithful. Let $\mathcal{F}, \mathcal{G} \in \Ob(\Sh(\mathcal{C}))$. We have to show that the map $$ \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, \mathcal{G}) \longrightarrow \Mor_{\Sh(\mathcal{D})}(f^{-1}\mathcal{F}, f^{-1}\mathcal{G}) $$ is bijective. But the right hand side is equal to \begin{align*} \Mor_{\Sh(\mathcal{D})}(f^{-1}\mathcal{F}, f^{-1}\mathcal{G}) & = \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, f_*f^{-1}\mathcal{G}) \\ & = \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, g^{-1}f^{-1}\mathcal{G}) \\ & = \Mor_{\Sh(\mathcal{C})}(\mathcal{F}, \mathcal{G}) \end{align*} (the first equality by adjunction) which proves what we want.
We have $u^ph_V = h_{v(V)}$ by Lemma \ref{lemma-adjoint-functors}. By Lemma \ref{lemma-technical-pu} this implies that $g^{-1}(h_V^\#) = (u^ph_V^\#)^\# = (u^ph_V)^\# = h_{v(V)}^\#$. Hence for any sheaf $\mathcal{F}$ on $\mathcal{C}$ we have \begin{eqnarray*} (g_*\mathcal{F})(V) & = & \Mor_{\Sh(\mathcal{D})}(h_V^\#, g_*\mathcal{F}) \\ & = & \Mor_{\Sh(\mathcal{C})}(g^{-1}(h_V^\#), \mathcal{F}) \\ & = & \Mor_{\Sh(\mathcal{C})}(h_{v(V)}^\#, \mathcal{F}) \\ & = & \mathcal{F}(v(V)) \end{eqnarray*} which proves the lemma.
Recall that $g_!\mathcal{F}$ is the sheafification of $u_p\mathcal{F}$. Hence (1)(a) follows from the fact that $u_p = w^p$ by Lemma \ref{lemma-adjoint-functors}. \medskip\noindent To see (1)(b) note that $g_!$ commutes with all colimits as $g_!$ is a left adjoint (Categories, Lemma \ref{categories-lemma-adjoint-exact}). Let $i \mapsto \mathcal{F}_i$ be a finite diagram in $\Sh(\mathcal{C})$. Then $\lim \mathcal{F}_i$ is computed in the category of presheaves (Lemma \ref{lemma-limit-sheaf}). Since $w^p$ is a right adjoint (Lemma \ref{lemma-adjoints-u}) we see that $w^p \lim \mathcal{F}_i = \lim w^p\mathcal{F}_i$. Since sheafification is exact (Lemma \ref{lemma-sheafification-exact}) we conclude by (1)(a). \medskip\noindent Assume $w$ is continuous. Then $g_! = (w^p\ )^\# = w^s$ but sheafification isn't necessary and one has the left adjoint $w_s$, see Lemmas \ref{lemma-pushforward-sheaf} and \ref{lemma-adjoint-sheaves}. \medskip\noindent Assume $w$ is cocontinuous. The equality $g_! = h^{-1}$ follows from (1)(a) and the definitions. The equality $g^{-1} = h_*$ follows from the equality $g_! = h^{-1}$ and uniqueness of adjoint functor. Alternatively one can deduce it from Lemma \ref{lemma-have-functor-other-way}.
By the Yoneda lemma (Categories, Lemma \ref{categories-lemma-yoneda}) the sheaf $\mathcal{G}_V$ corresponding to $V \in E$ is defined up to unique isomorphism by the formula $f^{-1}\mathcal{F}(V) = \Mor_{\Sh(\mathcal{C})}(\mathcal{G}_V, \mathcal{F})$. Recall that $f^{-1}\mathcal{F}(V) = \Mor_{\Sh(\mathcal{D})}(h_V^\#, f^{-1}\mathcal{F})$. Denote $i_V : h_V^\# \to f^{-1}\mathcal{G}_V$ the map corresponding to $\text{id}$ in $\Mor(\mathcal{G}_V, \mathcal{G}_V)$. Functoriality in (1) implies that the bijection is given by $$ \Mor_{\Sh(\mathcal{C})}(\mathcal{G}_V, \mathcal{F}) \to \Mor_{\Sh(\mathcal{D})}(h_V^\#, f^{-1}\mathcal{F}),\quad \varphi \mapsto f^{-1}\varphi \circ i_V $$ For any $V_1, V_2 \in E$ there is a canonical map $$ \Mor_{\Sh(\mathcal{D})}(h^\#_{V_2}, h^\#_{V_1}) \to \Hom_{\Sh(\mathcal{C})}(\mathcal{G}_{V_2}, \mathcal{G}_{V_1}),\quad \varphi \mapsto f_!(\varphi) $$ which is characterized by $f^{-1}(f_!(\varphi)) \circ i_{V_2} = i_{V_1} \circ \varphi$. Note that $\varphi \mapsto f_!(\varphi)$ is compatible with composition; this can be seen directly from the characterization. Hence $h_V^\# \mapsto \mathcal{G}_V$ and $\varphi \mapsto f_!\varphi$ is a functor from the full subcategory of $\Sh(\mathcal{D})$ whose objects are the $h_V^\#$. \medskip\noindent Let $J$ be a set and let $J \to E$, $j \mapsto V_j$ be a map. Then we have a functorial bijection $$ \Mor_{\Sh(\mathcal{C})}(\coprod \mathcal{G}_{V_j}, \mathcal{F}) \longrightarrow \Mor_{\Sh(\mathcal{D})}(\coprod h_{V_j}^\#, f^{-1}\mathcal{F}) $$ using the product of the bijections above. Hence we can extend the functor $f_!$ to the full subcategory of $\Sh(\mathcal{D})$ whose objects are coproducts of $h_V^\#$ with $V \in E$. \medskip\noindent Given an arbitrary sheaf $\mathcal{H}$ on $\mathcal{D}$ we choose a coequalizer diagram $$ \xymatrix{ \mathcal{H}_1 \ar@<1ex>[r] \ar@<-1ex>[r] & \mathcal{H}_0 \ar[r] & \mathcal{H} } $$ where $\mathcal{H}_i = \coprod h_{V_{i, j}}^\#$ is a coproduct with $V_{i, j} \in E$. This is possible by assumption (2), see Lemma \ref{lemma-sheaf-coequalizer-representable} (for those worried about set theoretical issues, note that the construction given in Lemma \ref{lemma-sheaf-coequalizer-representable} is canonical). Define $f_!(\mathcal{H})$ to be the sheaf on $\mathcal{C}$ which makes $$ \xymatrix{ f_!\mathcal{H}_1 \ar@<1ex>[r] \ar@<-1ex>[r] & f_!\mathcal{H}_0 \ar[r] & f_!\mathcal{H} } $$ a coequalizer diagram. Then \begin{align*} \Mor(f_!\mathcal{H}, \mathcal{F}) & = \text{Equalizer}( \xymatrix{ \Mor(f_!\mathcal{H}_0, \mathcal{F}) \ar@<1ex>[r] \ar@<-1ex>[r] & \Mor(f_!\mathcal{H}_1, \mathcal{F}) } ) \\ & = \text{Equalizer}( \xymatrix{ \Mor(\mathcal{H}_0, f^{-1}\mathcal{F}) \ar@<1ex>[r] \ar@<-1ex>[r] & \Mor(\mathcal{H}_1, f^{-1}\mathcal{F}) } ) \\ & = \Hom(\mathcal{H}, f^{-1}\mathcal{F}) \end{align*} Hence we see that we can extend $f_!$ to the whole category of sheaves on $\mathcal{D}$.
By Lemma \ref{lemma-when-shriek} we have $j_{U!}(\mathcal{G}^\#) = ((j_U)_p\mathcal{G}^\#)^\#$. By Lemma \ref{lemma-technical-up} this is equal to $((j_U)_p\mathcal{G})^\#$. Hence it suffices to prove that $(j_U)_p$ is given by the formula above for any presheaf $\mathcal{G}$ on $\mathcal{C}/U$. OK, and by the definition in Section \ref{section-functoriality-PSh} we have $$ (j_U)_p\mathcal{G}(V) = \colim_{(W/U, V \to W)} \mathcal{G}(W) $$ Now it is clear that the category of pairs $(W/U, V \to W)$ has an object $O_\varphi = (\varphi : V \to U, \text{id} : V \to V)$ for every $\varphi : V \to U$, and moreover for any object there is a unique morphism from one of the $O_\varphi$ into it. The result follows.
Denote $p : X \to U$ the structure morphism of $X$. By Lemma \ref{lemma-describe-j-shriek} we see $j_{U!}(h_{X/U}^\#)$ is the sheaf associated to the presheaf $$ V \longmapsto \coprod\nolimits_{\varphi \in \Mor_\mathcal{C}(V, U)} \{\psi : V \to X \mid p \circ \psi = \varphi\} $$ This is clearly the same thing as $\Mor_\mathcal{C}(V, X)$. Hence the lemma follows.
Via Lemma \ref{lemma-essential-image-j-shriek} and the fact that an equivalence of categories commutes with all limits, this reduces to the fact that the functor $\Sh(\mathcal{C})/h_U^\# \rightarrow \Sh(\mathcal{C})$ commutes with fibre products and equalizers. Alternatively, one can prove this directly using the description of $j_{U!}$ in Lemma \ref{lemma-describe-j-shriek} using that sheafification is exact. (Also, in case $\mathcal{C}$ has fibre products and equalizers, the result follows from Lemma \ref{lemma-preserve-equalizers}.)
We have to show $j_{U!}$ reflects monomorphisms and epimorphisms, see Lemma \ref{lemma-mono-epi-sheaves}. Via Lemma \ref{lemma-essential-image-j-shriek} this reduces to the fact that the functor $\Sh(\mathcal{C})/h_U^\# \to \Sh(\mathcal{C})$ reflects monomorphisms and epimorphisms.
The commutativity of the diagram is immediate. The agreement of $j$ with $j_{V/U}$ follows from the definitions. By Lemma \ref{lemma-composition-cocontinuous} we see that the following diagram of morphisms of topoi \begin{equation} \label{equation-relocalize} \vcenter{ \xymatrix{ \Sh(\mathcal{C}/V) \ar[rd]_{j_V} \ar[rr]_j & & \Sh(\mathcal{C}/U) \ar[ld]^{j_U} \\ & \Sh(\mathcal{C}) & } } \end{equation} is commutative. This proves that $j_V^{-1} = j^{-1} \circ j_U^{-1}$ and $j_{V*} = j_{U*} \circ j_*$. The equality $j_{V!} = j_{U!} \circ j_!$ follows formally from adjointness properties.
Proof of (2). Recall that the identification $\Sh(\mathcal{C}/V) \to \Sh(\mathcal{C})/h_V^\#$ sends $\mathcal{G}$ to $j_{V!}\mathcal{G} \to j_{V!}(*) = h_V^\#$ and similarly for $\Sh(\mathcal{C}/U) \to \Sh(\mathcal{C})/h_U^\#$. Thus $j_!\mathcal{G}$ is mapped to $j_{U!}(j_!\mathcal{G}) \to j_{U!}(*) = h_U^\#$ and (2) follows because $j_{U!}j_! = j_{V!}$ by Lemma \ref{lemma-relocalize}. \medskip\noindent The reader can now prove (1) by using that $j^{-1}$ is the right adjoint to $j_!$ and using that the rule in (1) is the right adjoint to the rule in (2). Here is a direct proof. Suppose that $\varphi : \mathcal{H} \to h_U^\#$ is an object of $\Sh(\mathcal{C})/h_U^\#$. By the proof of Lemma \ref{lemma-essential-image-j-shriek} this corresponds to the sheaf $\mathcal{H}_\varphi$ on $\mathcal{C}/U$ defined by the rule $$ (a : W \to U) \longmapsto \{ s \in \mathcal{H}(W) \mid \varphi(s) = a\} $$ on $\mathcal{C}/U$. The pullback $j^{-1}\mathcal{H}_\varphi$ to $\mathcal{C}/V$ is given by the rule $$ (a : W \to V) \longmapsto \{ s \in \mathcal{H}(W) \mid \varphi(s) = f \circ a\} $$ by the description of $j^{-1} = j_{U/V}^{-1}$ as the restriction of $\mathcal{H}_\varphi$ to $\mathcal{C}/V$. On the other hand, applying the rule to the object $$ \xymatrix{ \mathcal{H}' = \mathcal{H} \times_{\varphi, h_U^\#, f} h_V^\# \ar[rr]^-{\varphi'} & & h_V^\# } $$ of $\Sh(\mathcal{C})/h_V^\#$ we get $\mathcal{H}'_{\varphi'}$ given by \begin{align*} (a : W \to V) \longmapsto &  \{ s' \in \mathcal{H}'(W) \mid \varphi'(s') = a\} \\ = & \{ (s, a') \in \mathcal{H}(W) \times h_V^\#(W) \mid a' = a \text{ and } \varphi(s) = f \circ a'\} \end{align*} which is exactly the same rule as the one describing $j^{-1}\mathcal{H}_\varphi$ above.
The restrictions used in the lemma are those of Lemma \ref{lemma-relocalize}. Let $V/U$ be an object of $\mathcal{C}/U$. Set $V_i = U_i \times_U V$ and denote $\mathcal{V} = \{V_i \to V\}$. Observe that $(U_i \times_U U_j) \times_U V = V_i \times_V V_j$. Then we have $\mathcal{F}|_{\mathcal{C}/U_i}(V_i/U_i) = \mathcal{F}(V_i)$ and $\mathcal{F}|_{\mathcal{C}/U_i \times_U U_j}(V_i \times_V V_j/U_i \times_U U_j) = \mathcal{F}(V_i \times_V V_j)$ and similarly for $\mathcal{G}$. Thus we can define $\varphi$ on sections over $V$  as the dotted arrows in the diagram $$ \xymatrix{ \mathcal{F}(V) \ar@{=}[r] & H^0(\mathcal{V}, \mathcal{F}) \ar@{..>}[d] \ar[r] & \prod \mathcal{F}(V_i) \ar[d]_{\prod \varphi_i} \ar@<1ex>[r] \ar@<-1ex>[r] & \prod \mathcal{F}(V_i \times_V V_j) \ar[d]_{\prod \varphi_{ij}} \\ \mathcal{G}(V) \ar@{=}[r] & H^0(\mathcal{V}, \mathcal{G}) \ar[r] & \prod \mathcal{G}(V_i) \ar@<1ex>[r] \ar@<-1ex>[r] & \prod \mathcal{G}(V_i \times_V V_j) } $$ The equality signs come from the sheaf condition; see Section \ref{section-sheafification} for the notation $H^0(\mathcal{V}, -)$. We omit the verification that these maps are compatible with the restriction maps.
This can be shown by directly constructing an isomorphism of sheaves. Instead we argue as follows. Let $\mathcal{G}$ be a sheaf on $\mathcal{C}$. Then \begin{align*} \Mor(\mathcal{G}, j_*(\mathcal{F}|_{\mathcal{C}/U})) & = \Mor(\mathcal{G}|_{\mathcal{C}/U}, \mathcal{F}|_{\mathcal{C}/U}) \\ & = \Mor(j_!(\mathcal{G}|_{\mathcal{C}/U}), \mathcal{F}) \\ & = \Mor(\mathcal{G} \times h_U^\#, \mathcal{F}) \\ & = \Mor(\mathcal{G}, \SheafHom(h_U^\#, \mathcal{F})) \end{align*} and we conclude by the Yoneda lemma. Here we used Lemmas \ref{lemma-internal-hom-sheaf} and \ref{lemma-compute-j-shriek-restrict}.
Let $\mathcal{V} = \{V_i \to V\}_{i \in I}$ be a covering of $V$ in the site $\mathcal{C}$. We are going to check the sheaf condition for the presheaf $\mathcal{H}$ of Lemma \ref{lemma-describe-j-shriek} directly. Let $(s_i, \varphi_i)_{i \in I} \in \prod_i \mathcal{H}(V_i)$, This means $\varphi_i : V_i \to U$ is a morphism in $\mathcal{C}$, and $s_i \in \mathcal{G}(V_i \xrightarrow{\varphi_i} U)$. The restriction of the pair $(s_i, \varphi_i)$ to $V_i \times_V V_j$ is the pair $(s_i|_{V_i \times_V V_j/U}, \text{pr}_1 \circ \varphi_i)$, and likewise the restriction of the pair $(s_j, \varphi_j)$ to $V_i \times_V V_j$ is the pair $(s_j|_{V_i \times_V V_j/U}, \text{pr}_2 \circ \varphi_j)$. Hence, if the family $(s_i, \varphi_i)$ lies in $\check{H}^0(\mathcal{V}, \mathcal{H})$, then we see that $\text{pr}_1 \circ \varphi_i = \text{pr}_2 \circ \varphi_j$. The condition that the topology on $\mathcal{C}$ is weaker than the canonical topology then implies that there exists a unique morphism $\varphi : V \to U$ such that $\varphi_i$ is the composition of $V_i \to V$ with $\varphi$. At this point the sheaf condition for $\mathcal{G}$ guarantees that the sections $s_i$ glue to a unique section $s \in \mathcal{G}(V \xrightarrow{\varphi} U)$. Hence $(s, \varphi) \in \mathcal{H}(V)$ as desired.
The functor $v$ being right adjoint to $j_U$ means that given $Y/U$ and $X$ we have $$ \Mor_\mathcal{C}(Y, X) = \Mor_{\mathcal{C}/U}(Y/U, X \times U/U) $$ which is clear. To check that $v$ is continuous let $\{X_i \to X\}$ be a covering of $\mathcal{C}$. By the third axiom of a site (Definition \ref{definition-site}) we see that $$ \{X_i \times_X (X \times U) \to X \times_X (X \times U)\} = \{X_i \times U \to X \times U\} $$ is a covering of $\mathcal{C}$ also. Hence $v$ is continuous. The other statements of the lemma follow from Lemmas \ref{lemma-have-functor-other-way} and \ref{lemma-have-functor-other-way-morphism}.
The commutativity of the left square in the first statement of the lemma is immediate from the definitions. It implies the commutativity of the diagram of topoi by Lemma \ref{lemma-composition-cocontinuous}. Assume the diagram is cartesian. By the uniqueness of adjoint functors, to show $j_{V'/V}^{-1} \circ j_{U/V, *} = j_{U'/V', *} \circ j_{U'/U}^{-1}$ is equivalent to showing $j_{U/V}^{-1} \circ j_{V'/V!} = j_{U'/U!} \circ j_{U'/V'}^{-1}$. Via the identifications of Lemma \ref{lemma-essential-image-j-shriek} we may think of our diagram of topoi as $$ \xymatrix{ \Sh(\mathcal{C})/h_{U'}^\# \ar[d] \ar[r] & \Sh(\mathcal{C})/h_U^\# \ar[d] \\ \Sh(\mathcal{C})/h_{V'}^\# \ar[r] & \Sh(\mathcal{C})/h_V^\# } $$ and we know how to interpret the functors $j^{-1}$ and $j_!$ by Lemma \ref{lemma-relocalize-explicit}. Thus we have to show given $\mathcal{F} \to h_{V'}^\#$ that $$ \mathcal{F} \times_{h_{V'}^\#} h_{U'}^\# = \mathcal{F} \times_{h_V^\#} h_U^\# $$ as sheaves with map to $h_U^\#$. This is true because $h_{U'} = h_{V'} \times_{h_V} h_U$ and hence also $$ h_{U'}^\# = h_{V'}^\# \times_{h_V^\#} h_U^\# $$ as sheafification is exact.
It is clear that $u'$ is continuous, and hence we get functors $f'_* = (u')^s = (u')^p$ (see Sections \ref{section-functoriality-PSh} and \ref{section-continuous-functors}) and an adjoint $(f')^{-1} = (u')_s = ((u')_p\ )^\#$. The assertion $f'_*j_U^{-1} = j_V^{-1}f_*$ follows as $$ (j_V^{-1}f_*\mathcal{F})(V'/V) = f_*\mathcal{F}(V') = \mathcal{F}(u(V')) = (j_U^{-1}\mathcal{F})(u(V')/U) = (f'_*j_U^{-1}\mathcal{F})(V'/V) $$ which holds even for presheaves. What isn't clear a priori is that $(f')^{-1}$ is exact, that the diagram commutes, and that the description of $(f')^{-1}$ holds. \medskip\noindent Let $\mathcal{H}$ be a sheaf on $\mathcal{D}/V$. Let us compute $j_{U!}(f')^{-1}\mathcal{H}$. We have \begin{eqnarray*} j_{U!}(f')^{-1}\mathcal{H} & = ((j_U)_p(u'_p\mathcal{H})^\#)^\# \\ & = ((j_U)_pu'_p\mathcal{H})^\# \\ & = (u_p(j_V)_p\mathcal{H})^\# \\ & = f^{-1}j_{V!}\mathcal{H} \end{eqnarray*} The first equality by unwinding the definitions. The second equality by Lemma \ref{lemma-technical-up}. The third equality because $u \circ j_V = j_U \circ u'$. The fourth equality by Lemma \ref{lemma-technical-up} again. All of the equalities above are isomorphisms of functors, and hence we may interpret this as saying that the following diagram of categories and functors is commutative $$ \xymatrix{ \Sh(\mathcal{C}/U) \ar[r]_{j_{U!}} & \Sh(\mathcal{C})/h_U^\# \ar[r] & \Sh(\mathcal{C}) \\ \Sh(\mathcal{D}/V) \ar[r]^{j_{V!}} \ar[u]^{(f')^{-1}} & \Sh(\mathcal{D})/h_V^\# \ar[r] \ar[u]^{f^{-1}} & \Sh(\mathcal{D}) \ar[u]^{f^{-1}} } $$ The middle arrow makes sense as $f^{-1}h_V^\# = (h_{u(V)})^\# = h_U^\#$, see Lemma \ref{lemma-pullback-representable-sheaf}. In particular this proves the description of $(f')^{-1}$ given in the statement of the lemma. Since by Lemma \ref{lemma-essential-image-j-shriek} the left horizontal arrows are equivalences and since $f^{-1}$ is exact by assumption we conclude that $(f')^{-1} = u'_s$ is exact. Namely, because it is a left adjoint it is already right exact (Categories, Lemma \ref{categories-lemma-adjoint-exact}). Hence we only need to show that it transforms a final object into a final object and commutes with fibre products (Categories, Lemma \ref{categories-lemma-characterize-left-exact}). Both are clear for the induced functor $f^{-1} : \Sh(\mathcal{D})/h_V^\# \to \Sh(\mathcal{C})/h_U^\#$. This proves that $f'$ is a morphism of sites. \medskip\noindent We still have to verify that $(f')^{-1}j_V^{-1} = j_U^{-1}f^{-1}$. To see this use the formula above and the description in Lemma \ref{lemma-compute-j-shriek-restrict}. Namely, combined these give, for any sheaf $\mathcal{G}$ on $\mathcal{D}$, that $$ j_{U!}(f')^{-1}j_V^{-1}\mathcal{G} = f^{-1}j_{V!}j_V^{-1}\mathcal{G} = f^{-1}(\mathcal{G} \times h_V^\#) = f^{-1}\mathcal{G} \times h_U^\# = j_{U!}j_U^{-1}f^{-1}\mathcal{G}. $$ Since the functor $j_{U!}$ induces an equivalence $\Sh(\mathcal{C}/U) \to \Sh(\mathcal{C})/h_U^\#$ we conclude.
Note that $u$ satisfies the assumptions of Proposition \ref{proposition-get-morphism} and hence induces a morphism of sites $f : \mathcal{C} \to \mathcal{D}$ by that proposition. It is clear that $u$ induces a functor $u'$ as indicated. It is clear that this functor also satisfies the assumptions of Proposition \ref{proposition-get-morphism}. Hence we get a morphism of sites $f' : \mathcal{C}/U \to \mathcal{D}/V$. The diagram commutes by our definition of composition of morphisms of sites (see Definition \ref{definition-composition-morphisms-sites}) and because $$ u(Y \times V) = u(Y) \times u(V) = u(Y) \times U $$ which shows that the diagram of categories and functors opposite to the diagram of the lemma commutes.
This lemma proves itself, and is more a collection of things we know at this stage of the development of theory. For example the commutativity of the first square follows from the commutativity of Diagram (\ref{equation-relocalize}) and the commutativity of the diagram in Lemma \ref{lemma-localize-morphism}. The description of $f_c^{-1}$ follows on combining Lemma \ref{lemma-relocalize-explicit} with Lemma \ref{lemma-localize-morphism}. The commutativity of the last square then follows from the equality $$ f^{-1}\mathcal{H} \times_{h_{u(V)}^\#, c} h_U^\# \times_{h_U^\#} h_{U'}^\# = f^{-1}(\mathcal{H} \times_{h_V^\#} h_{V'}^\#) \times_{h_{u(V'), c'}^\#} h_{U'}^\# $$ which is formal using that $f^{-1}h_V^\# = h_{u(V)}^\#$ and $f^{-1}h_{V'}^\# = h_{u(V')}^\#$, see Lemma \ref{lemma-pullback-representable-sheaf}.