Following this answer, let us make the following definition:
Definition: We say a comm ring $R$ has the "DIM property" iff for every prime ideal $p \subset R$, we have $$ \mathrm{dim}(R_p) + \mathrm{dim}(R/p) = \mathrm{dim}(R)\,. $$
The answer linked above says that $R$ of the following kinds of rings have the DIM property:
integral domains which are also algebra-finitely-generated over a field (or $\mathbb{Z}$; see this bachelor's thesis, page 1, (i) in the 2nd Theorem);
and, local Cohen-Macaulay rings.
(For completeness: the author of the 1st link above also cautions that catenary, even universally catenary, rings generally need not have the DIM property.)
I was wondering if anyone could suggest a source which discusses the details of the proofs of the above statements about the mentioned algebra-fin-gen domains, and local Cohen-Macaulay rings, having the DIM property?
Edit: Thanks to the comments below for providing these two references.
However, does anyone have a reference which specifically shows the DIM property for finite-gen algebras over $\mathbb{Z}$, not just fields?
Note: my motivation in considering this is Exercise 11.1.I of Vakil's Foundations of Algebraic Geometry; if I'm not mistaken this DIM property must be enforced on the values of the structure sheaf of $X$ on open sets.
For reference, the exercise is to prove:
If $X$ is a scheme, and $Y\subset X$ is an irreducible closed subset, and $\eta$ is the generic point corresponding to $Y$, then the codimension of $Y$ in $X$ equals the dimension of the stalk / local ring of $X$ at $\eta$.