I'm reading Mac Lane & Moerdijk's Sheaves in Geometry and Logic and I got stuck at the definition of sheaves on a site.
The authors declare that a presheaf $ F $ on a site $ (\mathcal C,J) $ is a sheaf if for every $ C\in \mathcal C $, for every covering sieve $ S\in J(C) $, and for every family $ (x_f)_{D\xrightarrow{f} C\in S} $ of sections $ x_f\in F(D) $ such that $ x_f\cdot g = x_{f\circ g} $ for every arrow $ g\colon E\to D $, there exists a unique section $ x\in F(C) $ such that $ x\cdot f = x_f $ for each $ f\in S $. Here of course $ x_f\cdot g $ means $ F(g)(x_f) $.
Some lines below it is claimed that the above definition could be restated as follows: $ F $ is a sheaf if and only if for each $ C\in\mathcal C $ and for any covering sieve $ S\in J(C) $, the obvious mapping $$ \hom(h_C,F)\to \hom(S,F) $$ where $ h_C = \hom({-},C) $ and the sieve $ S $ is interpreted in an obvious way as a subfunctor of $ h_C $, is an isomorphism.
I couldn't convince myself that what the book is saying is correct. The isomorphism condition above states that given a matching family $ (x_f)_{f\in S} $, there is a matching family $ (y_t)_{t\in S_C} $ defined with respect to the maximal covering sheaf $ S_C $ on $ C $, such that $ y_f = x_f $ for $ f\in S $. But shouldn't sheaves be meant to give a "global" thing starting from a bunch of "local" things, and not another bunch of "local" things, as it seems to be a morphism of presheaves $ h_C\to F $?
The Yoneda lemma states that $$\hom(よ(C), F) \cong F(C)$$ where $よ(C) = \hom(-, C)$ is the Yoneda embedding. Therefore the morphism of presheaves $よ(C) \to F$ already gives us the global thing.