hcju/stacksqa huggingface dataset:
We already know that $j_{U!}$ is exact, see Lemma \ref{lemma-extension-by-zero-exact}. Thus it suffices to show that $j_{U!} :  \textit{Mod}(\mathcal{O}_U) \to \textit{Mod}(\mathcal{O})$ reflects injections and surjections. \medskip\noindent For every $\mathcal{G}$ in $\textit{Mod}(\mathcal{O}_U)$ we have the unit $\mathcal{G} \to j_U^*j_{U!}\mathcal{G}$ of the adjunction. We claim this map is an injection of sheaves. Namely, looking at the construction of Lemma \ref{lemma-extension-by-zero} we see that this map is the sheafification of the rule sending the object $V/U$ of $\mathcal{C}/U$ to the injective map $$ \mathcal{G}(V/U) \longrightarrow \bigoplus\nolimits_{\varphi \in \Mor_\mathcal{C}(V, U)} \mathcal{G}(V \xrightarrow{\varphi} U) $$ given by the inclusion of the summand corresponding to the structure morphism $V \to U$. Since sheafification is exact the claim follows. Some details omitted. \medskip\noindent If $\mathcal{G} \to \mathcal{G}'$ is a map of $\mathcal{O}_U$-modules with $j_{U!}\mathcal{G} \to j_{U!}\mathcal{G}'$ injective, then $j_U^*j_{U!}\mathcal{G} \to j_U^*j_{U!}\mathcal{G}'$ is injective (restriction is exact), hence $\mathcal{G} \to j_U^*j_{U!}\mathcal{G}'$ is injective, hence $\mathcal{G} \to \mathcal{G}'$ is injective. We conclude that $j_{U!}$ reflects injections. \medskip\noindent Let $a : \mathcal{G} \to \mathcal{G}'$ be a map of $\mathcal{O}_U$-modules such that $j_{U!}\mathcal{G} \to j_{U!}\mathcal{G}'$ is surjective. Let $\mathcal{H}$ be the cokernel of $a$. Then $j_{U!}\mathcal{H} = 0$ as $j_{U!}$ is exact. By the above the map $\mathcal{H} \to j^*_U j_{U!}\mathcal{H}$ is injective. Hence $\mathcal{H} = 0$ as desired.
Just take $(f')^\sharp$ to be $$ (f')^{-1}\mathcal{O}'_V = (f')^{-1}j_V^{-1}\mathcal{O}' = j_U^{-1}f^{-1}\mathcal{O}' \xrightarrow{j_U^{-1}f^\sharp} j_U^{-1}\mathcal{O} = \mathcal{O}_U $$ and everything else follows from Sites, Lemma \ref{sites-lemma-localize-morphism}. (Note that $j^{-1} = j^*$ on sheaves of modules if $j$ is a localization morphism, hence the first equality of functors implies the second.)
On the level of morphisms of topoi this is Sites, Lemma \ref{sites-lemma-relocalize-morphism}. To check that the diagrams commute as morphisms of ringed topoi use Lemmas \ref{lemma-relocalize} and \ref{lemma-localize-morphism-ringed-sites} exactly as in the proof of Sites, Lemma \ref{sites-lemma-relocalize-morphism}.
By Sites, Lemma \ref{sites-lemma-localize-topos} we see that $\Sh(\mathcal{C})/\mathcal{F}$ is a topos and that (1) and (3) are true. In particular this shows that $j_\mathcal{F}^{-1}\mathcal{O} = \mathcal{O}_\mathcal{F}$ and shows that $\mathcal{O}_\mathcal{F}$ is a sheaf of rings. Thus we may choose the map $j_\mathcal{F}^\sharp$ to be the identity, in particular we see that (2) is true. Moreover, the proof of Sites, Lemma \ref{sites-lemma-localize-topos} shows that we may assume $\mathcal{C}$ is a site with all finite limits and a subcanonical topology and that $\mathcal{F} = h_U$ for some object $U$ of $\mathcal{C}$. Then (4) follows from the description of $j_{\mathcal{F}!}$ in Lemma \ref{lemma-extension-by-zero}. Alternatively one could show directly that the functor described in (4) is a left adjoint to $j_\mathcal{F}^*$.
The assertion for underlying topoi is Sites, Lemma \ref{sites-lemma-localize-compare}. Note that $\mathcal{O}_U$ is the restriction of $\mathcal{O}$ which by Sites, Lemma \ref{sites-lemma-compute-j-shriek-restrict} corresponds to $\mathcal{O} \times h_U^\#$ under the equivalence of Sites, Lemma \ref{sites-lemma-essential-image-j-shriek}. By definition of $\mathcal{O}_\mathcal{F}$ we get (1). What's left is to prove that $j_\mathcal{F}^\sharp = j_U^\sharp$ under this identification. We omit the verification.
By Sites, Lemma \ref{sites-lemma-localize-morphism-topoi} we have the diagram of underlying topoi, the equality $f'_*j_\mathcal{F}^{-1} = j_\mathcal{G}^{-1}f_*$, and the description of $(f')^{-1}$. To define $(f')^\sharp$ we use the map $$ (f')^\sharp : \mathcal{O}'_\mathcal{G} = j_\mathcal{G}^{-1} \mathcal{O}' \xrightarrow{j_\mathcal{G}^{-1}f^\sharp} j_\mathcal{G}^{-1} f_*\mathcal{O} = f'_* j_\mathcal{F}^{-1}\mathcal{O} = f'_* \mathcal{O}_\mathcal{F} $$ or equivalently the map $$ (f')^\sharp : (f')^{-1}\mathcal{O}'_\mathcal{G} = (f')^{-1}j_\mathcal{G}^{-1} \mathcal{O}' = j_\mathcal{F}^{-1}f^{-1}\mathcal{O}' \xrightarrow{j_\mathcal{F}^{-1}f^\sharp} j_\mathcal{F}^{-1} \mathcal{O} = \mathcal{O}_\mathcal{F}. $$ We omit the verification that these two maps are indeed adjoint to each other. The second construction of $(f')^\sharp$ shows that the diagram commutes in the $2$-category of ringed topoi (as the maps $j_\mathcal{F}^\sharp$ and $j_\mathcal{G}^\sharp$ are identities). Finally, the equality $f'_*j_\mathcal{F}^* = j_\mathcal{G}^*f_*$ follows from the equality $f'_*j_\mathcal{F}^{-1} = j_\mathcal{G}^{-1}f_*$ and the fact that pullbacks of sheaves of modules and sheaves of sets agree, see Lemma \ref{lemma-localize-ringed-topos}.
At the level of morphisms of topoi this is Sites, Lemma \ref{sites-lemma-localize-morphism-compare}. This works also on the level of morphisms of ringed topoi since the formulas defining $(f')^\sharp$ in the proofs of Lemma \ref{lemma-localize-morphism-ringed-sites} and Lemma \ref{lemma-localize-morphism-ringed-topoi} agree.
In each case we have (a) $\Rightarrow (b)$. In each of the cases (1) - (6) condition (b) implies condition (c) by axiom (2) of a site (see Sites, Definition \ref{sites-definition-site}) and the definition of the local types of modules. Suppose $\{X_i \to X\}$ is a covering. Then for every object $U$ of $\mathcal{C}$ we get an induced covering $\{X_i \times_X U \to U\}$. Moreover, the global property for $\mathcal{F}|_{\mathcal{C}/X_i}$ in part (c) implies the corresponding global property for $\mathcal{F}|_{\mathcal{C}/X_i \times_X U}$ by Lemma \ref{lemma-global-pullback}, hence the sheaf has property (a) by definition. We omit the proof of (b) $\Rightarrow$ (a) in case (7).
According to the discussion in Section \ref{section-intrinsic} we need only check preservation under pullback for a morphism of ringed sites $(f, f^\sharp) : (\mathcal{C}, \mathcal{O}_\mathcal{C}) \to (\mathcal{D}, \mathcal{O}_\mathcal{D})$ such that $f$ is given by a left exact, continuous functor $u : \mathcal{D} \to \mathcal{C}$ between sites which have all finite limits. Let $\mathcal{G}$ be a sheaf of $\mathcal{O}_\mathcal{D}$-modules which has one of the properties (1) -- (6) of Definition \ref{definition-site-local}. We know $\mathcal{D}$ has a final object $Y$ and $X = u(Y)$ is a final object for $\mathcal{C}$. By assumption we have a covering $\{Y_i \to Y\}$ such that $\mathcal{G}|_{\mathcal{D}/Y_i}$ has the corresponding global property. Set $X_i = u(Y_i)$ so that $\{X_i \to X\}$ is a covering in $\mathcal{C}$. We get a commutative diagram of morphisms ringed sites $$ \xymatrix{ (\mathcal{C}/X_i, \mathcal{O}_\mathcal{C}|_{X_i}) \ar[r] \ar[d] & (\mathcal{C}, \mathcal{O}_\mathcal{C}) \ar[d] \\ (\mathcal{D}/Y_i, \mathcal{O}_\mathcal{D}|_{Y_i}) \ar[r] & (\mathcal{D}, \mathcal{O}_\mathcal{D}) } $$ by Sites, Lemma \ref{sites-lemma-localize-morphism-strong}. Hence by Lemma \ref{lemma-global-pullback} that $f^*\mathcal{G}|_{X_i}$ has the corresponding global property. Hence we conclude that $\mathcal{G}$ has the local property we started out with by Lemma \ref{lemma-local-final-object}.
By Lemma \ref{lemma-exactness} and Sites, Lemma \ref{sites-lemma-closed-immersion} we see that $i_*$ is exact. From the fact that $i_*$ is fully faithful on sheaves of sets, and the fact that $i^\sharp$ is surjective it follows that $i_*$ is fully faithful as a functor $\textit{Mod}(\mathcal{O}) \to \textit{Mod}(\mathcal{O}')$. Namely, suppose that $\alpha : i_*\mathcal{F}_1 \to i_*\mathcal{F}_2$ is an $\mathcal{O}'$-module map. By the fully faithfulness of $i_*$ we obtain a map $\beta : \mathcal{F}_1 \to \mathcal{F}_2$ of sheaves of sets. To prove $\beta$ is a map of modules we have to show that $$ \xymatrix{ \mathcal{O} \times \mathcal{F}_1 \ar[r] \ar[d] & \mathcal{F}_1 \ar[d] \\ \mathcal{O} \times \mathcal{F}_2 \ar[r] & \mathcal{F}_2 } $$ commutes. It suffices to prove commutativity after applying $i_*$. Consider $$ \xymatrix{ \mathcal{O}' \times i_*\mathcal{F}_1 \ar[r] \ar[d] & i_*\mathcal{O} \times i_*\mathcal{F}_1 \ar[r] \ar[d] & i_*\mathcal{F}_1 \ar[d] \\ \mathcal{O}' \times i_*\mathcal{F}_2 \ar[r] & i_*\mathcal{O} \times i_*\mathcal{F}_2 \ar[r] & i_*\mathcal{F}_2 } $$ We know the outer rectangle commutes. Since $i^\sharp$ is surjective we conclude. \medskip\noindent To finish the proof we have to prove the statement on the essential image of $i_*$. It is clear that $i_*\mathcal{F}$ is annihilated by $\mathcal{I}$ for any $\mathcal{O}$-module $\mathcal{F}$. Conversely, let $\mathcal{G}$ be a $\mathcal{O}'$-module with $\mathcal{I}\mathcal{G} = 0$. By definition of a closed subtopos there exists a subsheaf $\mathcal{U}$ of the final object of $\mathcal{D}$ such that the essential image of $i_*$ on sheaves of sets is the class of sheaves of sets $\mathcal{H}$ such that $\mathcal{H} \times \mathcal{U} \to \mathcal{U}$ is an isomorphism. In particular, $i_*\mathcal{O} \times \mathcal{U} = \mathcal{U}$. This implies that $\mathcal{I} \times \mathcal{U} = \mathcal{O} \times \mathcal{U}$. Hence our module $\mathcal{G}$ satisfies $\mathcal{G} \times \mathcal{U} = \{0\} \times \mathcal{U} = \mathcal{U}$ (because the zero module is isomorphic to the final object of sheaves of sets). Thus there exists a sheaf of sets $\mathcal{F}$ on $\mathcal{C}$ with $i_*\mathcal{F} = \mathcal{G}$. Since $i_*$ is fully faithful on sheaves of sets, we see that in order to define the addition $\mathcal{F} \times \mathcal{F} \to \mathcal{F}$ and the multiplication $\mathcal{O} \times \mathcal{F} \to \mathcal{F}$ it suffices to use the addition $$ \mathcal{G} \times \mathcal{G} \longrightarrow \mathcal{G} $$ (given to us as $\mathcal{G}$ is a $\mathcal{O}'$-module) and the multiplication $$ i_*\mathcal{O} \times \mathcal{G} \to \mathcal{G} $$ which is given to us as we have the multiplication by $\mathcal{O}'$ which annihilates $\mathcal{I}$ by assumption and $i_*\mathcal{O} = \mathcal{O}'/\mathcal{I}$. By construction $\mathcal{G}$ is isomorphic to the pushforward of the $\mathcal{O}$-module $\mathcal{F}$ so constructed.
Omitted. Hints: Note first that $\SheafHom_\mathcal{O}(\mathcal{F}, \mathcal{G}) = \SheafHom_\mathcal{O}(\mathcal{F}^\#, \mathcal{G})$, which reduces the question to the case where both $\mathcal{F}$ and $\mathcal{G}$ are sheaves. The result for sheaves of sets is Sites, Lemma \ref{sites-lemma-glue-maps}.
Let $\mathcal{H}$ be an object of $\textit{Mod}(\mathcal{O})$. Then \begin{align*} \Hom_\mathcal{O}(j_{U!}(\mathcal{G} \otimes_{\mathcal{O}_U} \mathcal{F}|_U), \mathcal{H}) & = \Hom_{\mathcal{O}_U}(\mathcal{G} \otimes_{\mathcal{O}_U} \mathcal{F}|_U, \mathcal{H}|_U) \\ & = \Hom_{\mathcal{O}_U}(\mathcal{G}, \SheafHom_{\mathcal{O}_U}(\mathcal{F}|_U, \mathcal{H}|_U)) \\ & = \Hom_{\mathcal{O}_U}(\mathcal{G}, \SheafHom_\mathcal{O}(\mathcal{F}, \mathcal{H})|_U) \\ & = \Hom_\mathcal{O}(j_{U!}\mathcal{G}, \SheafHom_\mathcal{O}(\mathcal{F}, \mathcal{H})) \\ & = \Hom_\mathcal{O}(j_{U!}\mathcal{G} \otimes_\mathcal{O} \mathcal{F}, \mathcal{H}) \end{align*} The first equality because $j_{U!}$ is a left adjoint to restriction of modules. The second by Lemma \ref{lemma-internal-hom-adjoint-tensor}. The third by Lemma \ref{lemma-internal-hom-restriction}. The fourth because $j_{U!}$ is a left adjoint to restriction of modules. The fifth by Lemma \ref{lemma-internal-hom-adjoint-tensor}. The lemma follows from this and the Yoneda lemma.
Part (1) follows from Lemma \ref{lemma-tensor-commute-colimits} and Algebra, Lemma \ref{algebra-lemma-directed-colimit-exact} by looking at sections over objects. To see part (2), use Lemma \ref{lemma-tensor-commute-colimits} and the fact that a filtered colimit of exact complexes is an exact complex (this uses that sheafification is exact and commutes with colimits). Some details omitted.
Let $\mathcal{G}_1 \to \mathcal{G}_2 \to \mathcal{G}_3$ be an exact complex of $\mathcal{O}_U$-modules. Since $j_{U!}$ is exact (Lemma \ref{lemma-extension-by-zero-exact}) and $\mathcal{F}$ is flat as an $\mathcal{O}$-modules then we see that the complex made up of the modules $$ j_{U!}(\mathcal{G}_i \otimes_{\mathcal{O}_U} \mathcal{F}|_U) = j_{U!}\mathcal{G}_i \otimes_\mathcal{O} \mathcal{F} $$ (Lemma \ref{lemma-j-shriek-and-tensor}) is exact. We conclude that $\mathcal{G}_1 \otimes_{\mathcal{O}_U} \mathcal{F}|_U \to \mathcal{G}_2 \otimes_{\mathcal{O}_U} \mathcal{F}|_U \to \mathcal{G}_3 \otimes_{\mathcal{O}_U} \mathcal{F}|_U$ is exact by Lemma \ref{lemma-j-shriek-reflects-exactness}.
Proof of (1). By the discussion in Remark \ref{remark-localize-presheaves} we see that $$ j_{U!}\mathcal{O}_U(V) = \bigoplus\nolimits_{\varphi \in \Mor_\mathcal{C}(V, U)} \mathcal{O}(V) $$ which is a flat $\mathcal{O}(V)$-module. Hence (1) follows from Lemma \ref{lemma-flatness-presheaves}. Then (2) follows as $j_{U!}\mathcal{O}_U = (j_{U!}\mathcal{O}_U)^\#$ (the first $j_{U!}$ on sheaves, the second on presheaves) and Lemma \ref{lemma-flatness-sheafification}.
Proof of (1). For every object $U$ of $\mathcal{C}$ and every $s \in \mathcal{F}(U)$ we get a morphism $j_{U!}\mathcal{O}_U \to \mathcal{F}$, namely the adjoint to the morphism $\mathcal{O}_U \to \mathcal{F}|_U$, $1 \mapsto s$. Clearly the map $$ \bigoplus\nolimits_{(U, s)} j_{U!}\mathcal{O}_U \longrightarrow \mathcal{F} $$ is surjective. The source is flat by combining Lemmas \ref{lemma-colimits-flat} and \ref{lemma-j-shriek-flat} which proves (2). The sheaf case follows from this either by sheafifying or repeating the same argument.
Choose a flat presheaf of $\mathcal{O}$-modules $\mathcal{G}'$ which surjects onto $\mathcal{G}$. This is possible by Lemma \ref{lemma-module-quotient-flat}. Let $\mathcal{G}'' = \Ker(\mathcal{G}' \to \mathcal{G})$. The lemma follows by applying the snake lemma to the following diagram $$ \begin{matrix}  & & 0 & & 0 & & 0 & & \\  & & \uparrow & & \uparrow & & \uparrow & & \\  & & \mathcal{F}'' \otimes_{p, \mathcal{O}} \mathcal{G} & \to &      \mathcal{F}' \otimes_{p, \mathcal{O}} \mathcal{G} & \to &      \mathcal{F} \otimes_{p, \mathcal{O}} \mathcal{G} & \to & 0 \\  & & \uparrow & & \uparrow & & \uparrow & & \\ 0 & \to & \mathcal{F}'' \otimes_{p, \mathcal{O}} \mathcal{G}' & \to &           \mathcal{F}' \otimes_{p, \mathcal{O}} \mathcal{G}' & \to &           \mathcal{F} \otimes_{p, \mathcal{O}} \mathcal{G}' & \to & 0 \\  & & \uparrow & & \uparrow & & \uparrow & & \\  & & \mathcal{F}'' \otimes_{p, \mathcal{O}} \mathcal{G}'' & \to &      \mathcal{F}' \otimes_{p, \mathcal{O}} \mathcal{G}'' & \to &      \mathcal{F} \otimes_{p, \mathcal{O}} \mathcal{G}'' & \to & 0 \\  & & & & & & \uparrow & & \\  & & & & & & 0 & & \end{matrix} $$ with exact rows and columns. The middle row is exact because tensoring with the flat module $\mathcal{G}'$ is exact. The proof in the case of sheaves is exactly the same.
Let $\mathcal{G}^\bullet$ be an arbitrary exact complex of presheaves of $\mathcal{O}$-modules. Assume that $\mathcal{F}_0$ is flat. By Lemma \ref{lemma-flat-tor-zero} we see that $$ 0 \to \mathcal{G}^\bullet \otimes_{p, \mathcal{O}} \mathcal{F}_2 \to \mathcal{G}^\bullet \otimes_{p, \mathcal{O}} \mathcal{F}_1 \to \mathcal{G}^\bullet \otimes_{p, \mathcal{O}} \mathcal{F}_0 \to 0 $$ is a short exact sequence of complexes of presheaves of $\mathcal{O}$-modules. Hence (1) and (2) follow from the snake lemma. The case of sheaves of modules is proved in the same way.
If (1) holds, then $\mathcal{F} = \mathcal{F}' \otimes_{\mathcal{O}'} \mathcal{O}$ is flat over $\mathcal{O}$ by Lemma \ref{lemma-flat-change-of-rings} and we see the map $\mathcal{I} \otimes_\mathcal{O} \mathcal{F} \to \mathcal{F}'$ is injective by applying $- \otimes_{\mathcal{O}'} \mathcal{F}'$ to the exact sequence $0 \to \mathcal{I} \to \mathcal{O}' \to \mathcal{O} \to 0$, see Lemma \ref{lemma-flat-tor-zero}. Assume (2). In the rest of the proof we will use without further mention that $\mathcal{K} \otimes_{\mathcal{O}'} \mathcal{F}' = \mathcal{K} \otimes_\mathcal{O} \mathcal{F}$ for any $\mathcal{O}'$-module $\mathcal{K}$ annihilated by $\mathcal{I}$. Let $\alpha : \mathcal{G}' \to \mathcal{H}'$ be an injective map of $\mathcal{O}'$-modules. Let $\mathcal{G} \subset \mathcal{G}'$, resp.\ $\mathcal{H} \subset \mathcal{H}'$ be the subsheaf of sections annihilated by $\mathcal{I}$. Consider the diagram $$ \xymatrix{ \mathcal{G} \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] \ar[d] & \mathcal{G}' \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] \ar[d] & \mathcal{G}'/\mathcal{G} \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] \ar[d] & 0 \\ \mathcal{H} \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] & \mathcal{H}' \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] & \mathcal{H}'/\mathcal{H} \otimes_{\mathcal{O}'} \mathcal{F}' \ar[r] & 0 } $$ Note that $\mathcal{G}'/\mathcal{G}$ and $\mathcal{H}'/\mathcal{H}$ are annihilated by $\mathcal{I}$ and that $\mathcal{G}'/\mathcal{G} \to \mathcal{H}'/\mathcal{H}$ is injective. Thus the right vertical arrow is injective as $\mathcal{F}$ is flat over $\mathcal{O}$. The same is true for the left vertical arrow. Hence the middle vertical arrow is injective and $\mathcal{F}'$ is flat.
The assumptions mean that $$ \mathcal{F} \xrightarrow{\eta \otimes 1} \mathcal{F} \otimes_\mathcal{O} \mathcal{G} \otimes_\mathcal{O} \mathcal{F} \xrightarrow{1 \otimes \epsilon} \mathcal{F} \quad\text{and}\quad \mathcal{G} \xrightarrow{1 \otimes \eta} \mathcal{G} \otimes_\mathcal{O} \mathcal{F} \otimes_\mathcal{O} \mathcal{G} \xrightarrow{\epsilon \otimes 1} \mathcal{G} $$ are the identity map. Let $U$ be an object of $\mathcal{C}$. After replacing $U$ by the members of a covering of $U$, we can find a finite number of sections $f_1, \ldots, f_n$ and $g_1, \ldots, g_n$ of $\mathcal{F}$ and $\mathcal{G}$ over $U$ such that $\eta(1) = \sum f_i g_i$. Denote $$ \mathcal{O}_U^{\oplus n} \to \mathcal{F}|_U $$ the map sending the $i$th basis vector to $f_i$. Then we can factor the map $\eta|_U$ over a map $\tilde \eta : \mathcal{O}_U \to \mathcal{O}_U^{\oplus n} \otimes_{\mathcal{O}_U} \mathcal{G}|_U$. We obtain a commutative diagram $$ \xymatrix{ \mathcal{F}|_U \ar[rr]_-{\eta \otimes 1} \ar[rrd]_-{\tilde \eta \otimes 1} & & \mathcal{F}|_U \otimes \mathcal{G}|_U \otimes \mathcal{F}|_U \ar[r]_-{1 \otimes \epsilon} & \mathcal{F}|_U \\ & & \mathcal{O}_U^{\oplus n} \otimes \mathcal{G}|_U \otimes \mathcal{F}|_U \ar[u] \ar[r]^-{1 \otimes \epsilon} & \mathcal{O}_U^{\oplus n} \ar[u] } $$ This shows that the identity on $\mathcal{F}|_U$ factors through a finite free $\mathcal{O}_U$-module. This proves (1). Part (2) follows from Categories, Lemma \ref{categories-lemma-left-dual} and its proof. Part (3) follows from the first equality of the proof. You can also deduce (2) and (3) from the uniqueness of left duals (Categories, Remark \ref{categories-remark-left-dual-adjoint}) and the construction of the left dual in Example \ref{example-dual}.
Choose an object $U$ of $\mathcal{C}$. After replacing $U$ by the members of a covering, we may assume there exists a presentation $$ \mathcal{O}_U^{\oplus r} \to \mathcal{O}_U^{\oplus n} \to \mathcal{F}|_U \to 0 $$ By Lemma \ref{lemma-flat-eq} we may, after replacing $U$ by the members of a covering, assume there exists a factorization $$ \mathcal{O}_U^{\oplus n} \to \mathcal{O}_U^{\oplus n_1} \to \mathcal{F}|_U $$ such that the composition $\mathcal{O}_U^{\oplus r} \to \mathcal{O}_U^{\oplus n} \to \mathcal{O}_U^{\oplus n_r}$ is zero. This means that the surjection $\mathcal{O}_U^{\oplus n_r} \to \mathcal{F}|_U$ has a section and we win.
For any $\mathcal{O}$-module $\mathcal{F}$ the functor $\Hom_\mathcal{O}(-, \mathcal{F})$ turns our sequence into the exact sequence $0 \to \mathcal{F}(U) \to \prod \mathcal{F}(U_i) \to \prod \mathcal{F}(U_i \times_U U_j)$, see (\ref{equation-map-lower-shriek-OU-into-module}). The lemma follows from this and Homology, Lemma \ref{homology-lemma-check-exactness}.
This lemma is immediate from Lemma \ref{lemma-covering-gives-surjection} if $U$ satisfies condition (3) of Sites, Lemma \ref{sites-lemma-conclude-quasi-compact}. We urge the reader to skip the proof in the general case. By definition there exists a covering $\mathcal{V} = \{V_j \to U\}_{j \in J}$ and a morphism $\mathcal{V} \to \mathcal{U}$ of families of maps with fixed target given by $\text{id} : U \to U$, $\alpha : J \to I$, and $f_j : V_j \to U_{\alpha(j)}$ (see Sites, Definition \ref{sites-definition-morphism-coverings}) such that the image $I' \subset I$ of $\alpha$ is finite. By Homology, Lemma \ref{homology-lemma-check-exactness} it suffices to show that for any sheaf of $\mathcal{O}$-modules $\mathcal{F}$ the functor $\Hom_\mathcal{O}(-, \mathcal{F})$ turns the sequence of the lemma into an exact sequence. By (\ref{equation-map-lower-shriek-OU-into-module}) we obtain the usual sequence $$ 0 \to \mathcal{F}(U) \to \prod\nolimits_{i \in I'} \mathcal{F}(U_i) \to \prod\nolimits_{i, i' \in I'} \mathcal{F}(U_i \times_U U_{i'}) $$ This is an exact sequence by Sites, Lemma \ref{sites-lemma-compare-sheaf-condition} applied to the family of maps $\{U_i \to U\}_{i \in I'}$ which is refined by the covering $\mathcal{V}$.
Proof of (1). Taking sections over $W$ commutes with filtered colimits with injective transition maps by Sites, Lemma \ref{sites-lemma-directed-colimits-sections}. If $\mathcal{F}_i$ is a family of sheaves of sets indexed by a set $I$. Then $\coprod \mathcal{F}_i$ is the filtered colimit over the partially ordered set of finite subsets $E \subset I$ of the coproducts $\mathcal{F}_E = \coprod_{i \in E} \mathcal{F}_i$. Since the transition maps are injective we conclude. \medskip\noindent Proof of (2). Let $\mathcal{F}_i$ be a family of sheaves of $\mathcal{O}$-modules indexed by a set $I$. Then $\bigoplus \mathcal{F}_i$ is the filtered colimit over the partially ordered set of finite subsets $E \subset I$ of the direct sums $\mathcal{F}_E = \bigoplus_{i \in E} \mathcal{F}_i$. A filtered colimit of abelian sheaves can be computed in the category of sheaves of sets. Moreover, for $E \subset E'$ the transition map $\mathcal{F}_E \to \mathcal{F}_{E'}$ is injective (as sheafification is exact and the injectivity is clear on underlying presheaves). Hence it suffices to show the result for a finite index set by Sites, Lemma \ref{sites-lemma-directed-colimits-sections}. The finite case is dealt with in Lemma \ref{lemma-limits-colimits-abelian-sheaves} (it holds over any object of $\mathcal{C}$).
This is true because $\Hom_\mathcal{O}(j_!\mathcal{O}_U, \mathcal{F}) = \mathcal{F}(U)$ by (\ref{equation-map-lower-shriek-OU-into-module}) and because the functor $\mathcal{F} \mapsto \mathcal{F}(U)$ commutes with direct sums by Lemma \ref{lemma-sections-over-quasi-compact}.