Let $X$ be an irreducible scheme. A point $p\in X$ is said to have codimension $n\in\mathbb{Z}_{\geq 0}\cup \{\infty\}$ if $\overline{\{p\}}$ has codimension $n$. Is it true that any point of positive codimension lies in the closure of a point of codimension 1?
2 Answers
This is false, already for spectra of valuation rings. Recall that ideals in a valuation ring $R$ correspond to ideals in the value group $\Gamma$, which can be any totally ordered abelian group. Moreover, since the ideals are totally ordered, so are the prime ideals, so it suffices to construct a totally ordered abelian group that does not have a height $1$ prime. This is easy:
Example. Let $\Gamma$ be the group $\mathbf Z[x]$, with the ordering defined by $f \geq g$ if and only if $f(n) \geq g(n)$ for $n \gg 0$. This is equivalent to the lexicographic ordering with $1 < x < x^2 < \ldots$.
Suppose $I \subseteq \Gamma$ is a height $1$ prime ideal, i.e. $I+\Gamma_{\geq 0} \subseteq I$, if $i + j \in I$ then $i \in I$ or $j \in I$, and if $J \subsetneq I$ is another prime ideal, then $J = 0$. Let $f \in I$ be a nonzero element, and assume $\deg f = n$. Then $x^{n+1} > f$, so $(x^{n+1}) = x^{n+1} + \Gamma_{\geq 0} \subsetneq I$ is a strictly smaller nonzero prime ideal inside $I$, contradicting the height $1$ hypothesis. $\square$
Remark. An example of a valuation ring with this value group can be constructed as follows: let $K = k(x_0, x_1, \ldots)$ be a rational function field in (countably) infinitely many variables. It has a valuation $K \to \mathbf Z[x]$ defined on monomials in $k[x_0,\ldots]$ by $$\prod_i x_i^{n_i} \mapsto \sum_i n_ix^i,$$ then on polynomials by mapping to the leading term (with respect to the lexicographic ordering with $x_0 < x_1 < \ldots$), and finally on $K$ by extending multiplicatively. Then one may take $R$ to be the value ring for this valuation.
Remark. Obviously the result is true if every point has finite height; for example if $X$ is Noetherian.
Let $p \in X$ have codimension $n \geq 1$ (edit: with $n$ finite). There is a maximal chain of irreducible closed subsets $\overline{\{p\}} = C_n \subsetneq \dotsb \subsetneq C_1 \subsetneq C_0 = X$. Each $C_i$ has codimension $i$; in particular $C_1$ is an irreducible closed subset of codimension $1$. Let $q$ be the generic point of $C_1$, i.e., the unique point so that $C_1 = \overline{\{q\}}$ (see, for example, https://math.stackexchange.com/questions/1155342/irreducible-closed-subsets-of-a-scheme-corresponds-to-points). Then $q$ is a point of codimension $1$ and $p$ lies in the closure of $q$.
(Edit: This can fail if $n=\infty$, as in R. van Dobben de Bruyn's answer.)