The following is an exercise (#6) of Eisenbud's commutative algebra, chapter 10:
Exercise. We mentioned that if $P$ is a prime ideal in a regular local ring $R$ and if $R\to S$ is a map of local rings, then $\operatorname{codim} PS\leq \operatorname{codim} P$. $(\cdots)$
I can't see where the author mentioned this before this exercise. How can we prove this?
We can reduce the question to the case when $S$ is a local integral domain. Let $Q\subset S$ be a minimal prime over $PS$ such that $\mathrm{ht}(Q)=\mathrm{ht}(PS)$. Let $Q_0\subset Q$ be a minimal prime such that $\mathrm{ht}(Q/Q_0)=\mathrm{ht}(Q)$. Now we may replace $S$ by $S/Q_0$, which is an integral domain.
If $S$ is an integral domain and $R\to S$ is surjective, then we can write $S=R/P'$, with $P'\subset R$ a prime ideal, and we have $PS=(P+P')/P'$. Now use Serre's Intersection Theorem (Serre, Local Algebra, Theorem 3, page 110) and get $$\mathrm{ht}(PS)=\mathrm{ht}((P+P')/P')=\mathrm{ht}(P+P')-\mathrm{ht}(P')\le \mathrm{ht}(P).$$
Then we use the Cohen Factorization; see Theorem (1.1) from L.L. Avramov, H.-B. Foxby, and B. Herzog, Structure of Local Homomorphisms, Journal of Algebra, 164(1994), 124–145.
Theorem (Cohen factorization). Let $\tau:R\to S$ be a local morphism between noetherian local rings. Then there exists a complete local ring $R'$ and two local morphisms $\varphi:R\to R'$ and $\varphi':R'\to S$ such that
(i) $\tau=\varphi'\circ\varphi$ and $\varphi'$ is surjective;
(ii) $\varphi$ is flat and $R'/\mathfrak m_RR'$ is regular, where $m_R$ denotes the maximal ideal of $R$.
Since $R\to R'$ is (faithfully) flat, we have $\mathrm{ht}(PR')\le\mathrm{ht}(P)$. Let $Q\subset R'$ be a minimal prime over $PR'$ such that $\mathrm{ht}(Q)=\mathrm{ht}(PR')$. Since flat morphisms satisfy going-down, we have $Q\cap R=P$, and then $R_P\to R'_Q$ is a local morphism and $\dim R'_Q\le\dim R_P+\dim R'_Q/PR'_Q$. But $\dim R'_Q/PR'_Q=0$, so we get $\mathrm{ht}(Q)\le \mathrm{ht}(P)$.