Let $X$ be a topological space, and $F$ and $G$ be two sheaves of sets on $X$. Let $\eta : F \rightarrow G$ be a morphism of sheaves.
Then how would you show the following:
$\eta$ is an epimorphism in the category of sheaves of sets on $X$ if and only if for all $x \in X$, the induced maps on stalks $\eta_{x}: F_x \rightarrow G_x$ are surjective. (1)
Here are a few comments:
In Algebraic Geometry Chapter 2, Proposition 1.1, Hartshorne proves that in the setup as above $\eta$ is an isomorphism if and only if for all $x \in X$ the induced maps on stalks $\eta_x : F_x \rightarrow G_x$ are bijective (he considers sheaves of abelian groups, so in his statement $\eta_x$ are isomorphisms, but the proof remains valid if we consider sheaves of sets). But, in this proof he relies on the following nice fact: $\eta$ is an isomorphism if and only if for all open $U \subset X$, the component maps $\eta(U) : F(U) \rightarrow G(U)$ are bijective.
I have never really seen a proof of the following analogous fact (which could be helpful in solving the problem): $\eta$ is an epimorphism if and only if for all open $U \subset X$, $\eta(U): F(U) \rightarrow G(U)$ is surjective (2).
((I think (2) is true, but hopefully there is a solution to my problem without using this fact.))
Even if we assume (2) to be a true statement, then to prove the backward implication of (1) we still cannot extend Hartshorne's method, for when he shows that for all open $U \subset X$, $\eta(U): F(U) \rightarrow G(U)$ is surjective, he needs the assumption that $\eta(U)$ are injective, which he proves beforehand.
With these comments, which probably show that I am thinking about the problem incorrectly, can someone give me an indication of how to prove (1)?