I am sure this is a simple question, but I am really not able to think straight at the moment and this is bugging me. I am doing Exercise 1.22 from Hartshorne. It is the classic gluing of of sheaves on a cover given the cocycle condition question. In particular, we have a space $X$ and a cover for this space $\{ U_{i} \}_{i \in I}$. Further, we are given a family of sheaves indexed by the same set $I$, $\{ \mathcal{F}_{i} \}_{i \in I}$ on each of the $U_{i}$. We are given isomorphisms $$ \phi_{ij}: \mathcal{F}_{i}|_{U_{i} \cap U_{j}} \longrightarrow \mathcal{F}_{j}|_{U_{i} \cap U_{j}}, $$ along with the so-called cocycle condition $$ \phi_{ik} = \phi_{ik} \circ \phi_{ij} \quad \text{on} \quad U_{i} \cap U_{j} \cap U_{k}. $$ The task is to construct a sheaf on $X$ compatible with these local sheaves. I have gone ahead and done the obvious steps of defining a base by taking all open sets contained in one of the $U_{i}$ etc. I then defined a sheaf $\mathcal{G}$ on this base and this is well defined since if there is some $V$ in $U_{i}$ and $U_{j}$ with $i \neq j$, then via the isomorphism $\phi_{ij}$, we have $$ \mathcal{F}_{i}(V) \stackrel{\simeq}{\longrightarrow} \mathcal{F}_{j}(V) $$ My understanding is that to make the restriction maps work, you need to invoke the cocycle condition. My issue is that I can't see exactly where. It seems that the isomorphism alone is enough. The frustrating part is that every resource I look at (and there are a lot since this is a common exercise) simply says "the restrictions are compatible because of the cocycle condition" or "this is well defined because of the cocycle condition" or something similar. Nowhere seems to explicitly lay out where the cocyle condition is invoked, and what breaks when it is not. Is someone able to shed some light on this? Other than this small step I feel like I understand the rest of it completely, but I feel like this is a vital thing to not understand.
Thanks