Equivalent definitions of Codimension of closed subscheme

539 Views Asked by At

Here I have encountered two definitions of Codimension of closed subset $Z$ of $X$.

  1. If $W$ is an irreducible closed subset of $X$, then define $codim(W,X)$ is the supremum of integers $n$ such that there exist a chain: $W = W_{0} < W_{1} < ... < W_{n}$ of distinct irreducible closed subset of $X$. Then define $codim(Z,X) = inf_{W \subset Z}codim(W, X)$, where the infimum is taken over all closed irreducible subsets of $Z$

  2. Define $codim(Z,X) = inf_{z \in Z}(dim O_{X,z})$.

I have verified these both definitions agree if $X$ is affine scheme, but unable to verify for general scheme. Any suggestion or reference would be helpful.