Dimension of a Noetherian topological spaces We know that the definition of (Krull) dimension of a Noetherian topological spaces $X$ is the following:
$$
\dim X=\max\{n\in\mathbb{N}\mid\emptyset=Z_{-1}\subsetneqq Z_0\subsetneqq\dots\subsetneqq Z_n\subseteq X\,\text{is an ascending chain of closed irreducible sets}\}
$$
But I can also consider a chain of such kind which is "maximal", in the sense that it's not possible to enlarge it. A chain with maximal length is necessarily maximal.
The question is:
Prove or find a counterexample for the converse.
I don't know how to prove it, but at the same time a counterexample should be very strange, because in the case of the varieties it seems to be true.
 A: Consider $X = \{0,1,2\}$, with the topology $\tau = \{\emptyset, \{0,1\}, \{0\}, \{2\}, \{0,2\}, X\}$. Then the closed sets are $\{\emptyset, \{2\}, \{1,2\}, \{0,1\},\{1\}, X\}$. Then $\emptyset \subseteq \{2\}$ is a maximal chain (there is no irreducible closed set containing $2$). But $\emptyset\subseteq \{1\} \subseteq \{0,1\}$ is a longer chain.
A: Here is a rather natural example, which however requires elementary scheme theory:
Let $R$ be a discrete valuation ring with uniformizing parameter $\pi$.
 Then the ring of polynomials $R[T]$ has dimension $\dim R[T]=\dim R+1=1+1=2$,  as illustrated by the chain of prime ideals $  \{0\}\subsetneq (\pi)\subsetneq (\pi,T)$.
However the chain $(0)\subsetneq (\pi T-1)$ of prime ideals in $R[T]$ has length only $1$ but is nevertheless maximal.   
Algebro-geometrical explanation
We are considering the projection morphism $$f:\mathbb A^1_R\to \operatorname {Spec}(R)=\{\eta=(0), M=(\pi)\}$$ The morphism $f$ has a closed fiber,  $f^{-1}(M)\subset \mathbb A^1_R$,  and an open fiber $f^{-1}(\eta)\subset \mathbb A^1_R$.
The strange phenomenon displayed is caused by two facts:   
A) The point $P=(\pi T-1)\in\mathbb A^1_R$, which is quite unsurprizingly closed in $f^{-1}(\eta)$,  is surprizingly also closed in $\mathbb A^1_R$ and the ideal $(\pi T-1)$ is thus maximal.
Indeed  its closure $\overline {\{P\}}$ is disjoint from the closed fiber $f^{-1}(M)$: this is because  the intersection $\overline {\{P\}}\cap f^{-1}(M)$    is given by the ideal  $(\pi T-1, \pi)=R[T]$, which defines the empty subscheme.  
B) The only generization of the point $P$ is the generic point $(0)$ of $\mathbb A^1_R$.
Indeed another point $Q\neq (0), P$ of the open fibre $f^{-1}(\eta)$ is closed in that fibre and thus does not have $P$ in its closure.
And a point of the closed fibre $f^{-1}(M)$ has a closure which is included in that closed fibre and thus will not contain $P$ either.
Thus the only prime ideal of $R[T]$ strictly included in $(\pi T-1)$ is $(0)$.
