Although this is an old question, I thought it was worth mentioning a recent paper by Heinrich that corrects the statements in EGA$0_{\text{IV}}$ mentioned in the comments.
Let us start with some definitions (following [Heinrich, Def. 1.2, Prop. 4.1]):
Definition. Let $X$ be a topological space which is $T_0$, noetherian, and finite dimensional.
- The space $X$ is biequidimensional if all maximal chains of irreducible closed subsets of $X$ have the same length.
- The space $X$ is weakly biequidimensional if it is equidimensional, equicodimensional, and catenary.
The often cited result from EGA$0_{\text{IV}}$ is the following:
Claim [EGA$0_{\text{IV}}$, Prop. 14.3.3]. Let $X$ be a topological space which is $T_0$, noetherian, and finite dimensional. The following are equivalent:
- The space $X$ is biequidimensional.
- The space $X$ is weakly biequidimensional.
- The space $X$ is equicodimensional and for every inclusion of irreducible closed subsets $Y \subseteq Z$ in $X$, we have
$$\dim(Z) = \dim(Y) + \operatorname{codim}(Y,Z).$$
- The space $X$ is equicodimensional and for every inclusion of irreducible closed subsets $Y \subseteq Z$ in $X$, we have
$$\operatorname{codim}(Y,X) = \operatorname{codim}(Y,Z) + \operatorname{codim}(Z,X).$$
This is not quite correct, as was found independently by Gabber and by Chen (see [ILO, Exp. XV, §2.4, footnote (i) on p. 196]), and also by Heinrich [Heinrich].
Gabber and Heinrich both noted that (1), (3), and (4) are equivalent (see [Heinrich, Lem. 2.3] for a proof), and Heinrich showed that these conditions imply (2) [Heinrich, Lem. 2.1]. Gabber and Heinrich both gave examples where (2) does not imply (3); we reproduce Heinrich's here:
Example [Heinrich, Ex. 3.7]. The ring $A$ obtained by localizing the ring
$$\frac{k[v, w, x, y]}{(vy, wy)}$$
away from the union $(v,w,x,y-1) \cup (v,w,y)$ is weakly biequidimensional but does not satisfy (3): setting $Y = V(v,w,x,y-1) \subsetneq V(v,w) = Z$, we have
$$\dim(Z) = 2 > 0 + 1 = \dim(Y) + \operatorname{codim}(Y,Z).$$
See [Heinrich, Ex. 3.7] for details.
A preprint by Emerton and Gee gives a correct variant of the Claim above; see [Emerton and Gee, Lem. 2.32]. The basic difference is that the Claim is true if $X$ is assumed to be irreducible. Gabber also gives a variant where (2) is replaced by "$X$ is catenary and equidimensional and its irreducible components are equicodimensional" [ILO, Exp. XV, §2.4, footnote (i) on p. 196].