Krull Dimension of a scheme
Can someone give a hint or a solution for showing that a scheme has Krull dimension $d$ if and only if there is an affine open cover of the scheme such that the Krull dimension of each affine scheme is at most $d$, with equality for at least one affine scheme in the cover?
If $X$ is a topological space and $X=\bigcup_{i\in I}U_i$ is an open cover, then the Krull dimension of $X$ is equal to the supremum of the Krull dimensions of the $U_i$. Call the latter number (which might be $\infty$) $s$. Since $\dim(U_i)\leq\dim(X)$ for all $i$, $s\leq\dim(X)$. For the reverse, let $Z_0\subsetneq Z_1\subsetneq\cdots\subsetneq Z_n$ be a chain of irreducible closed subsets of $X$. Then $Z_0$ must meet some $U_{i_0}$ (because an irreducible space is non-empty), and intersecting with that $U_{i_0}$ gives a chain $Z_0\cap U_{i_0}\subsetneq Z_1\cap U_{i_0}\subsetneq\cdots\subsetneq Z_n\cap U_{i_0}$ of irreducible closed subsets of $U_{i_0}$. The reason the inclusions remain strict is because $Z_j\cap U_{i_0}$ is dense in $Z_j$, so if $Z_j\cap U_{i_0}=Z_{j+1}\cap U_{i_0}$, then taking closures in $X$ gives $Z_j=Z_{j+1}$, which is not the case. Thus $s\geq\dim(U_{i_0})\geq n$, so $s\geq\dim(X)$.
Actually the situation is better than that: for any covering of the scheme $X$ by affine open schemes $X_i$ we have $dim(X)= sup_i (dim(X_i))$ .
Wait, it is even better : actually this has nothing to do with schemes!
Given a topological space $T$ and any open covering $(T_i)_{i\in I}$ of $T$ we have for the Krull dimensions $$dim(T)= sup_{i\in I} (dim(T_i))$$
This basically follows from the fact that dimension is a "local property"; have a look at Lemma 10.2 of this Chapter of the Stacks Project.