Solution (source code)

= Solution

The height $\operatorname{ht}\mathfrak p$ is the supremum of lengths of strict chains of primes ending at $\mathfrak p$. The <Krull principal ideal theorem> says that in a Noetherian ring every prime minimal over a principal proper ideal has height at most one.

Induct on $n$. If $\mathfrak p$ is minimal over $I=(x_1,\ldots,x_n)$, choose a prime $\mathfrak q\subseteq\mathfrak p$ minimal over $(x_1,\ldots,x_{n-1})$ and localize appropriately. In $R/\mathfrak q$, the prime $\mathfrak p/\mathfrak q$ is minimal over the principal ideal generated by $x_n$, so its relative height is at most one. Induction gives $\operatorname{ht}\mathfrak q\leq n-1$, hence
$$
\boxed{\operatorname{ht}\mathfrak p\leq n.}
$$