A reduced induced closed subscheme structure of an affine scheme Let $A$ be a commutative ring and let $Y$ be a closed subset of  $U = \operatorname{Spec} A$, and we endow it with the reduced induced closed subscheme structure. If $f \in A$ and $V = D(f) =  \operatorname{Spec} A_f$, then the  we put the reduced induced subscheme structure on $V \cap Y$ as well. We can consider $V \cap Y$ as an open subscheme of $Y$ and this agrees with the mentioned reduced induced subscheme structure as a closed subset of $V$. 
I am trying to understand how to deduce this statement. Hartshorne pp. 86 says that this corresponds to "the algebraic fact that if $\mathfrak{a}$ is the intersection of prime ideals in $Y$ then $\mathfrak{a}A_f$ is the intersection of those prime ideals of $A_f$ which are in $Y \cap D(f)$." I understand this algebraic fact, but I am struggling to deduce the above statement. Any explanation is appreciated. Thank you.
 A: Recall that every closed subset of $\operatorname{Spec} A$ is of the form $V(I)$ for some ideal $I\subset A$, and putting the reduced induced scheme structure on $V(I)$ gives it the same scheme structure as $\operatorname{Spec} A/\sqrt{I}$. Similarly, the scheme structure on $V(I_f)\subset \operatorname{Spec} A_f$ is given by $\operatorname{Spec} A_f/\sqrt{I_f}$.
In order to check that two scheme structures on the same set agree, we may demonstrate that their structure sheaves are isomorphic. But as we're working with affine schemes, we can just compute global sections. For the reduced induced scheme structure on $V(I)$, we get that the global sections are $A/\sqrt{I}$, and upon restricting to $D(f)$, we get $(A/\sqrt{I})_f$. For the reduced induced structure on $Y\cap V$ as a subset of $V$, we get $A_f/\sqrt{I_f}$. 
As the radical of an ideal is exactly the intersection of all primes containing it, Hartshorne's comment now implies that these two rings of sections are the same and thus the scheme structures agree.
