Let $S$ be a finite type $k$-algebra and $X=Spec(S)$ it's corresponding spectrum. Fothermore et $p \subset S$ be a prime ideal and $x \in X$ be the corresponding point.
I have a question about a step in the proof of Lemma 10.113.5 from https://stacks.math.columbia.edu/tag/00OO:
If $Z$ is a irreducible component of $X$ and $W$ is an arbitrary open subset of $Z$ containing $x$, obviously we have $\dim (W) \leq \dim (Z)$.
The proof in another direction isn't clear to me. Indeed $W$ has always closed points but why then lemma 10.113.4 in this case imply already that there exist a chain of irreducible closed subsets of length equal to $dim(Z)$ in the open $W$.
Can anybody explain how this argument works?
$Z$ is a closed subscheme of the affine scheme $X$, so it is $\operatorname{Spec} S/I$ for some ideal $I$. Since $Z$ is irreducible, $S/I$ is an integral domain; since $S$ is finite type over a field, $S/I$ is as well, and we may apply Lemma 10.113.4 to $S/I$. By the correspondence between prime ideals and irreducible closed subsets, we have found a chain as was requested.