Characterization of epimorphisms of sheaves on a site

I'm stuck with a detail in the proof of the characterization of epimorphism of sheaves on a site in the Mac Lane & Moerdijk book "Sheaves in Geometry and Logic".

I want to prove that: "If $\phi:F \to G$ is an epimorphism of sheaves in the Grothendieck topos $Sh(\mathscr{C},J)$ then for each $C\in \mathscr{C}$ and $\forall y \in G(C)$ there is a cover $S$ of $C$ such that $\forall f:D\to C$ in $S$ the element $y\cdot f$ is in the image of $\phi_D:F(D)\to G(D)$''. (Here $y \cdot f$ means $G(f)(y)$).

The book goes like this: define a presheaf $A \subset G$ by $A(C):=\{y \in G(C) : \exists S \in J(C) \ \forall f:B \to C\in S \ \ \ \ \ y\cdot f \in Im(\phi_B)\}$, $A$ is in fact a sheaf (thus a subsheaf of $G$). The author suggests to apply the lemma for which if $A$ is a subpresheaf of the sheaf $G$ then $A$ is a sheaf iff $\forall C \in \mathscr{C}, \ \forall x \in G(C), \forall S \in J(C)$ it holds that $x \in A(C)$ whenever $x\cdot f \in A(D) \ \forall f:D \to C \in S$.

The problem is that I don't know how to use it, or better how to show that in this precise case such an $x$ does really belong to $A(C)$. What I tried is to consider for each arrow $f\in S$ (same notation as in the lemma) a cover $R_f \in J(D)$ (the one of the definition of the presheaf $A$) such that $((x \cdot f) \cdot g) \in Im(\phi_E) \ \ \forall g:E \to D \in R_f$, this because by hypothesis $x \cdot f \in A(D)$. I took then a preimage $y_g \in F(E) \ \ \forall ((x \cdot f) \cdot g)$ , so that $\phi_E(y_g)=((x \cdot f) \cdot g)$, hoping that $\{y_g\}_{g \in R_f}$ was a matching family. For, in that case, an amalgamation of that family would be sent by $\phi_D$ to $x \cdot f$, obtaining that $x \in A(C)$. I did not succeed in proving this (and maybe it's not even true), so please will you help me?

-

You're given $x \in G(C)$ and a cover $S$ of $C$ such that for all $f \colon D \to C$ in $S$, $x \cdot f$ is in $A(D)$. By definition of $A$, the latter means that there is a cover $R_f$ of $D$ such that for all $g \colon E \to D$ in $R_f$, $x \cdot f \cdot g$ is in $Im(\phi_E)$.

By the transitivity axiom for Grothendieck topologies, the sieve $T$ on $C$ consisting of all $f \circ g$ with $f \in S$ and $g \in R_f$ covers $C$ (because its restriction along any $f \in S$ is $R_f$, hence covering). Now, by construction, for all $f \circ g \colon E \to C$ in $T$, $x \cdot (f \circ g) = x \cdot f \cdot g$ is in $Im(\phi_E)$. Thus, $x \in A(C)$.

By the lemma, this shows that $A$ is a subsheaf of $G$.

-
Perfect, just what I was looking for... Thank you very much! –  Edoardo Lanari Sep 25 '13 at 13:48

Let $\phi : F \to G$ be an epimorphism of sheaves on a space (or topos). Consider the image sheaf $\mathrm{im}(\phi)$. A section in this sheaf is a section in $G$ which locally has a preimage in $A$. Then $\mathrm{im}(\phi) \to G$ is a monomorphism and an epimorphism, hence an isomorphism.

-
Thanks for the answer! But I would like to understand the proof of the book, just to know where's the problem.. thanks anyway! –  Edoardo Lanari Sep 24 '13 at 21:22