What is meant by "local equation" for a closed subscheme? This question relates specifically to exercise 6.2 of Chapter II of Hartshorne's Algebraic Geometry. 
In the situation of that exercise, we have projective space $\mathbb{P}_{k}^{n}$ over an algebraically closed field $k$, a projective variety $X$ embedded in $\mathbb{P}_{k}^{n}$, and an irreducible hyperplane $V \subseteq \mathbb{P}_{k}^{n}$ not containing $X$. Then the intersection has some decomposition into irreducible components
$$
V \cap X = Y_{1} \cap Y_{2} \cdots \cap Y_{r}
$$
Hartshorne then says the following:

For each $i$, let $f_{i}$ be a local equation for $V$ on some open set $U_{i}$ of $\mathbb{P}_{k}^{n}$ for which $Y_{i} \cap U_{i} \not = \emptyset$ and let $\bar{f_{i}}$ be the restriction of $f_{i}$ to $U_{i} \cap X$

My problem is that I don't understand what "local equation" means in this context, nor what it means to restrict to $U_{i} \cap X$. My understanding of "local equation" in most contexts is the following: Let $\mathcal{I}$ be the quasi-coherent sheaf of ideals defining $V$ as a closed subscheme of $\mathbb{P}_{k}^{n}$. A "local equation for $V$ on $U_{i}$" would usually mean a section $f \in \Gamma(U, \mathcal{I})$. But then what does it mean to restrict this to $U_{i} \cap X$? Indeed $U_{i} \cap X$ is not an open subset in $U_{i}$. 
 A: Local equation just means a function which picks out $V\cap U_i$ inside $U_i$. Usually one wants this to be a generator of the ideal of all functions vanishing on $V\cap U_i$ inside $U_i$.
As far as restriction goes, $f_i$ is a function on $U_i$, and $U_i\cap X$ is a subset of it's domain, so it makes sense to talk about the restriction of $f_i$ to $U_i\cap X$ as a function. More formally, this is the image of $f_i$ under the pullback associated to the closed immersion $\iota:U_i\cap X\hookrightarrow U_i$.
A: $V\cap U_i$ is an irreducible closed subset (subscheme) of the affine scheme $U_i$. So it can be determined by a prime ideal $\mathfrak{p}$ of the ring $A=k[x_0,\dots,x_n]_{(x_i)}$ associated to $U_i$. Since the codimension of $V\cap U_i$ relative to $U_i$ is $1$, the height of $\mathfrak{p}$ is also one. But note that $A$ is a UFD. So $\mathfrak{p}$ is principal, and the local equation $f_i$ for $V$ on $U_i$ is just the generator of $\mathfrak{p}$.
Next, $U_i\cap X$ is another closed subset of $U_i$, determined by some prime ideal $\mathfrak{q}$ say. So the restriction of $f_i$ to $U_i\cap X$ is just its image $\overline{f}_i$ under the quotient epimorphism $\pi:A\rightarrow A/\mathfrak{q}$.
