Remark 31.22.5. The codimension of a relative quasi-regular immersion, if it is constant, does not change after a base change. In fact, if we have a ring map $A \to B$ and a quasi-regular sequence $f_1, \ldots , f_ r \in B$ such that $B/(f_1, \ldots , f_ r)$ is flat over $A$, then for any ring map $A \to A'$ we have a quasi-regular sequence $f_1 \otimes 1, \ldots , f_ r \otimes 1$ in $B' = B \otimes _ A A'$ by More on Algebra, Lemma 15.31.4 (which was used in the proof of Lemma 31.22.1 above). Now the proof of Lemma 31.22.4 shows that if $A \to B$ is flat and locally of finite presentation, then for every prime ideal $\mathfrak q' \subset B'$ the sequence $f_1 \otimes 1, \ldots , f_ r \otimes 1$ is even a regular sequence in the local ring $B'_{\mathfrak q'}$.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).