Why $\operatorname{dim}_vX_{f(v)}= \operatorname{sup}_i\operatorname{dim}(X_i \cap X_{\eta})$ in the proof of Gortz's Theorem 10.97? I'm reading the Gortz's Algebraic Geometry, Theorem 10.97 and stuck at final statement :


(Errata : For the last paragraph of the proof, we should replace all $\xi$ by $\eta$. Moreover, if $U$ is the non-empty open subset of $S$ which we are considering, the last equation holds for $v∈V :=Y \cap f^{−1}(U)$ (not all $Y$). )
Why the first equality in the underlined statement is true? As the first paragraph,
$$\operatorname{dim}_vX_{f(v)} = \operatorname{sup}_{Z\in I_v}\operatorname{dim}Z $$
, where $I_v$ is the set of irreducible components of $X_{f(v)}$ that contains $v$.
I'm struggling with this equality now and can't find breakthrough yet.
Can anyone help?
Furthur progress : Fix $v \in V:= Y \cap  f^{-1}(U)$. Then since $Y\subseteq \bigcap_{i}X_i$, $v\in X_i \cap X_{f(v)}$ for all $i$.
For each $i$, let $Z_{i,v}$ be an irreducible component of $X_i \cap X_{f(v)}$ containing the $v$. Then by the final paragraph, $\operatorname{dim}Z_{i,v} = \operatorname{dim}(X_i \cap X_\eta)$ for all $i$.
Since irreducible subset of closed subset is irreducible in the ambient space(?), $Z_{i,v}$ is irreducible set in $X_{f(v)}$. So there is an irreducible component $Z'$ of $X_{f(v)}$ containing $Z_{i,v}$. Then, since $v\in Z_{i,v} \subseteq Z'$,
$$\operatorname{dim}Z_{i,v} \le \operatorname{dim}Z' \le \operatorname{sup}_{Z\in I_v}\operatorname{dim}Z $$
Since $i$ is arbitrary, $\operatorname{sup}_{i \in I}\operatorname{dim}Z_{i,v} \le \operatorname{sup}_{Z\in I_v} \operatorname{dim}Z$.
So, $\operatorname{sup}_{i \in I} \operatorname{dim}(X_i \cap X_{\eta}) \le \operatorname{dim}_v X_{f(v)}$.
And it remains to show the inverse inequality. Can we show that? If so, how?
Perhaps.. next is true? Fix $Z \in I_v$. Then

*

*$ v \in Z \cap X_i $ is an irreducible component of $X_i \cap X_{f(v)}$ ?


*$\operatorname{dim}Z = \operatorname{dim}(Z \cap X_i)$ ? For this statement, my first strategy is using next theorem (Gortz's Theorem 5.22.)

(From $Z \hookrightarrow X_{f(v)} \to \operatorname{Spec}(k(f(v)))$, the inclusion $Z\cap X_i \hookrightarrow Z$ is a morphism of $k(f(v))$-shcmes of locally finite type).
If $Z \cap X_i$ contains the generic point of $Z$, then by the theorem the equality of dimensions holds. And is it true?
Anyway, if these are true, then we may show the inverse inequality.
Can anyone help?
 A: Edited: the original lemma was false as stated (consider the spectrum of a Noetherian local ring, without the maximal ideal), although the result was true in the situation where it was applied. This has been corrected.

There’s a hypothesis missing: we obviously need $v \in f^{-1}(S’) \cap Y$, where $S’ \subset S$ is the open subset from the previous paragraph. Then $X_{f(v)}$ is the reunion of the (finitely many) closed subsets $X_i \cap X_{f(v)}$, all of which contain $v$ and are pure of dimension that of $X_i \cap X_{\eta}$.
We conclude with the following (applied to the closed subsets $X_i \cap X_{f(v)} \subset X_{f(v)}$ and the point $v$) results:
Lemma 1: let $X$ be an irreducible scheme of finite type over a field, and $U \subset X$ be a nonempty open subset. Then $U$ and $X$ have the same dimension.
Proof: first note that we can assume $X$ reduced, hence $U,X$ integral. $X$ has a finite cover by affine open subsets $V$, and the dimension of $X$ is the maximum of these dimensions (the dimension of the topological space underlying a scheme is the maximal length of a sequence $(x_0,\ldots,x_n)$ where $x_{i+1}$ is a specialization of $x_i$). For the same reason, the dimension of $U$ is the maximum of the dimensions of the $U \cap V$, so we can reduce to the case where $X$ is affine. Then there is a principal open subset $V \subset U \subset X$ and $\dim{V} \leq \dim{U} \leq \dim{X}$, so we may assume that $X,V$ are affine. Since $X$ is integral, it is enough to show that the function field of $X$ determines $\dim{X}$ (since $X$ and $V$ have the same fraction field).
Now, if $d=\dim{X}$, then $X$ is finite over $\mathbb{A}^d$ (by Noether normalization), so that the fraction field of $X$ is a finite extension of $k(x_1,\ldots,x_d)$ so has transcendence degree $d$ over $k$.
Lemma: let $Z_1,\ldots,Z_r$ be closed subsets of a topological space $X$, which is the underlying space of a scheme of finite type over a field. Assume furthermore that every $Z_i$ is equidimensional of dimension $d_i$ and that $X=\bigcup_{i=1}^r{Z_i}$. Then if $x \in \bigcap_{i=1}^n{Z_i}$, $\dim_x{X}$ is the maximum $\delta$ of the $d_i$.
Proof: Let $x \in U$ be an open subset of $X$. Then the irreducible components of $Z_i \cap U$ (which is nonempty since it contains $x$) are exactly the nonempty $Z’ \cap U$, where $Z’ \subset Z_i$ is an irreducible component. But for such $Z’$, $Z’ \cap U$ is a dense open subset of $Z’$, so it is irreducible of dimension $d_i$ (because $Z’$ is the topological space underlying a scheme of finite type over a field), thus $Z_i \cap U$ is pure of dimension $d_i$.
As $U$ is the reunion of the closed $Z_i \cap U$, $\dim{U}$ is thus $\delta$, QED.
