I'm referring (also for notations and terminology) to P. Johnstone, Sketches of an Elephant. A Topos Theory Compendium. Volume I. Clarendon Press. Oxford, 2002. The Lemma can be found at page 540. I can't manage to explicitly prove the following claim that Johnstone makes in his proof of the lemma:
Further, the compatibility of the $s_{ij}$ ensures that $(s_{i}\vert\ i\in I)$ is a compatible family relative to the $f_{i}$.
Here the $s_{ij}$ form a compatibile family for the compositions $(f_{i}h_{ij}\vert\ i\in I,\ j\in J_{i})$. If one fixes $i$, $(s_{ij}\vert\ j\in J_{i})$ trivially is a compatible family for the family $(h_{ij}\vert j\in J_{i})$ and since $A$ satisfies the sheaf axiom for all the families of the $h_{ij}$, there's a unique $s_{i}\in A(U_{i})$ such that $A(h_{ij})(s_{i})=s_{ij}$ for all $j\in J_{i}$. The problem now is the following: by the very definition of compatible family, I need to show that for each object $M$ of $C$ and for each couple of arrows in $C$, $p\colon M\rightarrow U_{i}$ and $q\colon M\rightarrow U_{\overline{i}}$ such that $f_{i}p=f_{\overline{i}}q$ (for some $i,\overline{i}\in I$), one has $A(p)(s_{i})=A(q)(s_{\overline{i}})$. I suppose I should work with the definition of the $s_{i}$ and the compatibility of $s_{ij}$ as suggested by the author, but I don't know how to do it, basically since there is no reason for p or q to factorize through some $h_{ij}\colon U_{ij}\rightarrow U_{i}$ or some $h_{\overline{i}\overline{j}}\colon U_{\overline{i}\overline{j}}\rightarrow U_{\overline{i}}$. So, how do I use compatibility of $s_{ij}$?
Thanks a lot.
The claim in question is as follows (in my notation):
This appears to be false without additional hypotheses. (I am embarrassed to say that I did not spot this last year when I studied this section.) Let us consider the following category $\mathcal{C}$: it has objects $U, V, W, X$ and morphisms $f : V \to U$, $g : W \to V$, $h : X \to V$. Take $\mathfrak{U} = \{ f, f \circ g, f \circ h \}$, $\mathfrak{V}_f = \{ g \}$, $\mathfrak{V}_{f \circ g} = \{ \textrm{id}_W \}$, $\mathfrak{V}_{f \circ h} = \{ \textrm{id}_X \}$; note that these are all sieves. Consider the trivial presheaf $\mathscr{F}$ such that $\mathscr{F} (Z) = \{ 0, 1 \}$ for all $Z$ in $\mathcal{C}$. Of course, this satisfies the sheaf condition for the above-mentioned sieves, but it does not satisfy the sheaf condition for $\mathfrak{W} = \{ f \circ g, f \circ h \}$: taking $s_{f \circ g} = 0$, $s_{f \circ h} = 1$ yields a matching family for $\mathfrak{W}$ (trivially), but there is no possible amalgamation for this matching family.
Here is one way of repairing the claim: we assume that $\mathfrak{U}$ and all the $\mathfrak{V}_f$ are covering sieves for a sifted coverage $T$, and that $\mathscr{F}$ is a $T$-sheaf. Now suppose $(s_k : k \in \mathfrak{W})$ is a matching family for $\mathfrak{W}$. By the sheaf condition, there exists a unique $t_f$ such that $t_f |_g = s_{f \circ g}$ for all $g$ in $\mathfrak{V}_f$. I claim $(t_f : f \in \mathfrak{U})$ is a matching family for $\mathfrak{U}$.
Indeed, suppose $\operatorname{dom} f = \operatorname{codom} h$; we must show $t_f |_h = t_{f \circ h}$. But, for each $l : Y \to \operatorname{dom} h$ in $\mathfrak{V}_{f \circ h}$, there is a $T$-covering sieve $\mathfrak{Y}$ on $Y$ such that $\{ h \circ l \circ m : m \in \mathfrak{Y} \} \subseteq \mathfrak{V}_f$, so $t_{f \circ h} |_{l \circ m} = s_{f \circ h \circ l \circ m} = t_f |_{h \circ l \circ m}$ for all $m$ in $\mathfrak{Y}$, and hence, $t_{f \circ h} |_l = t_f |_{h \circ l}$ by the sheaf condition for $\mathfrak{Y}$. Thus, $t_{f \circ h} = t_f |_h$, by the sheaf condition for $\mathfrak{V}_{f \circ h}$.
I suspect the condition that $T$ be a sifted coverage could be dropped, but I have not checked the details.