I am reading the section of Flatness from Hartshorne. I have a doubt in the proof of the corollary of the following proposition :
$\textbf{Proposition 9.3}$ Let $f:X\longrightarrow Y$ be a separated morphism of finite type of noetherian schemes and let $\mathcal{F}$ be a quasi-coherent sheaf on $X$. Let $u:Y'\longrightarrow Y$ be a flat morphism of noetherian schemes.

Then for all $i\geq 0$, there are natural isomorphisms
$u^*R^if_*(\mathcal{F})\cong R^ig_*(v^*\mathcal{F})$. I understood the proof of this.
I have a doubt in the corollary to this.
$\textbf{Corollary 9.4}$ Let $f:X\longrightarrow Y$ and $\mathcal{F}$ be as in (9.3) and assume that $Y$ is affine. For any point $y\in Y$, the $X_y$ be the fibre over $y$, and let $\mathcal{F}_y$ be the induced sheaf. On the other hand, let $k(y)$ denote the constant sheaf $k(y)$ on the closed subset $\bar{\{y\}}$ of $Y$. Then for all $i\geq 0$ there are natural isomorphisms. $H^i(X_y,\mathcal{F}_y)\cong H^i(X,\mathcal{F}\otimes k(y))$
They begin the proof by saying : Let $Y'\subset Y$ be the reduced induced subscheme structure on $\bar{\{y\}}$., and let $X'=X\times_Y Y'$, which is a closed subscheme of $X$. Then both sides of the desired isomorphism depend only on the sheaf $\mathcal{F}'=\mathcal{F}\otimes k(y)$ on $X'$. Thus we can replace $X,Y,\mathcal{F}$ by $X',Y',\mathcal{F}'$.
Why can we assume this? Why can we replace as said above? Clearly, on the right side $\mathcal{F}\otimes k(y)$ is $\mathcal{F}'$. But why is it true on the left?
Any help will be appreciated!
@poorna In order to apply Prop. 9.3 in the proof of Cor. 9.4 one needs a flat base change
$$u:A \longrightarrow k(y).$$
When $y \in Y$ is not closed then $u$ is not flat: For the proof consider $u$ as the composition $ A \longrightarrow A_{p_y}$ and $A_{p_y} \longrightarrow k(y), y = p_y$. The former morphism is flat being a localisation. Hence we show that the latter is not flat. Flatness of the latter were equivalent to the field $k(y)$ being a free $A_{p_y}$-module of rank 1 (Matsumura, Hideyuki: Commutative ring theory. Theor. 7.10). Apparently, that does not hold because the ideal $p_y \subset A$ is not maximal.
Therefore Hartshorne introduces the intermediate ring $A' := A/p_y$. It is an integral domain. If $Y' := Spec \ A'$ then $y \in Y'$ is the generic point with residue field $k(y) = A'_{(0)}$ a localisation. Hence
$$u':A' \longrightarrow \ k(y)$$
is flat. By definition
$$X_y := X \times_Y Spec \ k(y) = (X \times_{Y} Y') \times_{Y'} Spec \ k(y) = X' \times_{Y'} Spec \ k(y)$$
$$\mathscr F_y := \mathscr F \otimes_{A} k(y) = (\mathscr F \otimes_A A') \otimes_{A'} k(y) = \mathscr F' \otimes_{A'} k(y).$$
Therefore I differ from Hartshorne's notation and propose to set $\mathscr F' := \mathscr F \otimes_A A'$. Was this your point, too?