Lemma 37.16.5. Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of schemes over $S$. Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_ X$-module. Assume

1. $X$ is locally of finite presentation over $S$,

2. $\mathcal{F}$ an $\mathcal{O}_ X$-module of finite presentation,

3. $\mathcal{F}$ is flat over $S$, and

4. $Y$ is locally of finite type over $S$.

Then the set

$U = \{ x \in X \mid \mathcal{F} \text{ flat at }x \text{ over }Y\} .$

is open in $X$ and its formation commutes with arbitrary base change: If $S' \to S$ is a morphism of schemes, and $U'$ is the set of points of $X' = X \times _ S S'$ where $\mathcal{F}' = \mathcal{F} \times _ S S'$ is flat over $Y' = Y \times _ S S'$, then $U' = U \times _ S S'$.

Proof. By Morphisms, Lemma 29.21.11 the morphism $f$ is locally of finite presentation. Hence $U$ is open by Theorem 37.15.1. Because we have assumed that $\mathcal{F}$ is flat over $S$ we see that Theorem 37.16.2 implies

$U = \{ x \in X \mid \mathcal{F}_ s \text{ flat at }x \text{ over }Y_ s\} .$

where $s$ always denotes the image of $x$ in $S$. (This description also works trivially when $\mathcal{F}_ x = 0$.) Moreover, the assumptions of the lemma remain in force for the morphism $f' : X' \to Y'$ and the sheaf $\mathcal{F}'$. Hence $U'$ has a similar description. In other words, it suffices to prove that given $s' \in S'$ mapping to $s \in S$ we have

$\{ x' \in X'_{s'} \mid \mathcal{F}'_{s'} \text{ flat at }x' \text{ over }Y'_{s'}\}$

is the inverse image of the corresponding locus in $X_ s$. This is true by Lemma 37.15.2 because in the cartesian diagram

$\xymatrix{ X'_{s'} \ar[d] \ar[r] & X_ s \ar[d] \\ Y'_{s'} \ar[r] & Y_ s }$

the horizontal morphisms are flat as they are base changes by the flat morphism $\mathop{\mathrm{Spec}}(\kappa (s')) \to \mathop{\mathrm{Spec}}(\kappa (s))$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).