Lemma 37.52.7. Let $X \to S$ be a flat proper morphism of finite presentation. Let $n_{X/S}$ be the function on $S$ counting the numbers of geometric connected components of fibres of $f$ introduced in Lemma 37.27.3. Then $n_{X/S}$ is lower semi-continuous.

Proof. Let $s \in S$. Set $n = n_{X/S}(s)$. Note that $n < \infty$ as the geometric fibre of $X \to S$ at $s$ is a proper scheme over a field, hence Noetherian, hence has a finite number of connected components. We have to find an open neighbourhood $V$ of $s$ such that $n_{X/S}|_ V \geq n$. Let $X \to S' \to S$ be the Stein factorization as in Theorem 37.52.5. By Lemma 37.52.2 there are finitely many points $s'_1, \ldots , s'_ m \in S'$ lying over $s$ and the extensions $\kappa (s'_ i)/\kappa (s)$ are finite. Then Lemma 37.41.1 tells us that after replacing $S$ by an étale neighbourhood of $s$ we may assume $S' = V_1 \amalg \ldots \amalg V_ m$ as a scheme with $s'_ i \in V_ i$ and $\kappa (s'_ i)/\kappa (s)$ purely inseparable. Then the schemes $X_{s_ i'}$ are geometrically connected over $\kappa (s)$, hence $m = n$. The schemes $X_ i = (f')^{-1}(V_ i)$, $i = 1, \ldots , n$ are flat and of finite presentation over $S$. Hence the image of $X_ i \to S$ is open (Morphisms, Lemma 29.25.10). Thus in a neighbourhood of $s$ we see that $n_{X/S}$ is at least $n$. $\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).