I've been working on an excercise from the book Algebraic Geometry over the Complex Numbers by D. Arapura:
Let $Y \subset X$ be a closed subset of a topological space. Let $\mathcal{P}$ be a sheaf of $T$-valued functions on $X$. For each $U \subset Y$, let $\mathcal{P}_Y(U)$ be the set of functions $f : U \longrightarrow T$ locally extendible to an element of $\mathcal{P}$, i.e., $f \in \mathcal{P}_Y(U)$ if and only if for each $y \in U$, there exist a neighborhood $V \subset X$ and an element of $\mathcal{P}(V)$ restricting to $f|_{V \cap U}$. Show that $\mathcal{P}_Y$ is a sheaf.
I've proved that $\mathcal{P}_Y$ is a presheaf, but I'm still trying to show that it is a sheaf. I tried the following:
Let $U \subset Y$ be an open set with an open cover $\{ U_i \}$. I must prove that if $f|_{U_i} \in \mathcal{P}_Y(U_i)$ $\forall i$, then $f \in \mathcal{P}_Y(U)$. If I take an element $y \in U$, then it will also be in at least one of the $U_i$. Let $\{ U_j \}$ be the $U_i$'s that contain $y$. For each $j$, there exist a neighborhood $V_j \subset X$ and a function $\tilde{f}_j \in \mathcal{P}(V_j)$ such that $\tilde{f}_j|_{V_j \cap U_j} = f|_{V_j \cap U_j}$. I'm stuck here.
This is not exactly what you need to prove. You need to prove that if $f_i \in P_Y(U_i)$ is a family of sections such that $f_i = f_j$ in $U_{ij}$ for all $i,j$ then there is $f$ with $f|_{U_i} = f_i$, where $U_{ij} := U_i \cap U_j$.
Indeed, define $f : U \to T$, by $f(x) = f_i(x)$ if $x \in U_i$. This is well defined, and by definition it restricts to an element of $P$ in a smaller open since $f_i$ does.
You also need to prove the second axiom, namely that if $f,g \in P_Y(U)$ are such that $f|_{U_i} = g|_{U_i}$ for all $i$ then $f = g$, but again it is clear from the definition of the presheaf $P_Y$, since it is a presheaf of functions, so sections are fully determined by value at points.