Noetherian ring with infinite Krull dimension (Nagata's example). I just started to read about the Krull dimension (definition and basic theory), at first when I thought about the Krull dimension of a noetherian ring my idea was that it must be finite, however this turned out to be wrong. 

I am looking for an example of a commutative noetherian ring that has infinite Krull dimension. 

I read that there is a famous example due to Nagata, but I was unable to find it.
 A: Take a polynomial ring $A$ in infinitely many variables over a field, and consider the infinite family of prime ideals formed by disjoint subsets of the variables, the number of variables increasing in lenght. Then localise $A$ by the complement of the union of these prime ideals. Thanks who ? Thanks Nagata ! ;-)
A: The example of Nagata:

Let $A=k[x_{\mathbf N}]$ be the polynomial ring over a field $k$ in countably many indeterminates. Let $m_1,m_2,\ldots$ be an increasing sequence of positive integers such that $m_{i+1}-m_i>m_i-m_{i-1}\forall i>1$. Let $\mathfrak p_i=(x_{m_i+1},\ldots,x_{m_{i+1}})$ and let $S$ be the complement in $A$ of the union of the ideals $\mathfrak p_i$. Each $\mathfrak p_i$ is a prime ideal and so $S$ is multiplicatively closed. Each $S^{-1}\mathfrak p_i$ has height equal to $m_{i+1}-m_i$, hence $\operatorname{dim} S^{-1}A=\infty$.

Claim. $S^{-1}A$ is noetherian.
Lemma. Let $A$ be a ring such that
(1) for each maximal ideal $\mathfrak m$ of $A$, the local ring $A_{\mathfrak m}$ is noetherian;
(2) for each $0\ne x\in A$, the set of maximal ideals of $A$ which contain $x$ is finite.
Then $A$ is noetherian. (Proof e.g. in Atiyah-Macdonald ex. 7.9).
The claim will be deduced from the following remarks.
Remark 1. The $S^{-1}\mathfrak p_i$ are maximal.
Proof. Suppose $\alpha\in S^{-1}A$, $\alpha\not\in S^{-1}\mathfrak p_i$ and $\alpha\not\in k$. Then $\alpha$ includes a monomial not including any of the generators of $\mathfrak p_i$ as a factor (we may assume $\alpha\in A$ after clearing denominators). Removing monomials in $\alpha$ belonging to $\mathfrak p_i$, we may assume $\alpha$ contains no monomial such as $x_{m_i+1}$ with nonzero coefficient; then $\alpha+x_{m_i+1}\in S$ hence is a unit.
Remark 2. Any $0\ne x\in A$ can be in only finitely many $S^{-1}\mathfrak p_i$.
Proof. Can be checked for $x\in k[x_{\mathbf N}]$, where it is obvious.
Remark 3. (generalized prime avoidance) Any ideal $I\subset k[x_{\mathbf N}]$ contained in $\bigcup_i\mathfrak p_i$ is contained in $\mathfrak p_i$ for some $i$.
Note that Remark 3 and 1 show that the maximal ideals of $S^{-1}A$ are precisely the $S^{-1}\mathfrak p_i$. Remark 2 then satisfies condition (2) of the lemma. To see that $S^{-1}A_{S^{-1}\mathfrak p_i}$ is noetherian, note that it coincides with $A_{\mathfrak p_i}\cong k(x_j)[x_{m_i+1},\ldots,x_{m_{i+1}}]_{(x_{m_i+1},\ldots,x_{m_{i+1}})}$, a localization of a noetherian ring, where the index $j$ runs over all $\mathbf N$ except for $m_i+1,\ldots,m_{i+1}$. This will satisfy (1), meaning it suffices to prove Remark 3.
Proof of Remark 3. Suppose $I\subset A$, $I\subset\bigcup_{i\in L}\mathfrak p_i$. If $|L|<\infty$, the result follows from usual (finite) prime avoidance. Hence assume $|L|=|\mathbf N|$ and that $I$ is not contained in $\bigcup_{k\in K}\mathfrak p_k$ for $K\subset\mathbf N$ finite. For $f\in A$, put
$$D(f):=\{i\in\mathbf N \text{ s.t. } S^{-1}\mathfrak p_i\ni f\}.$$
Let $f\in I$, then if $\nexists g\in I$ s.t. $D(f)\cap D(g)\neq\emptyset$, then $I\subset\bigcup_{i\in D(f)}\mathfrak p_i$, and $D(f)$ is a finite set. Hence $\exists g\in I$ s.t. $D(f)\cap D(g)=\emptyset$. Note that if $D(f)=\emptyset$ or $D(g)=\emptyset$ then one or the other lies outside of $\bigcup_i\mathfrak p_i$, contradicting $I\subset\bigcup_{i\in L}\mathfrak p_i$. Hence we may assume $D(f)\ne\emptyset\ne D(g)$. Let $\sigma\in D(g)$, $d:=\deg f$. Then the claim is that $D(f+x_{m_\sigma+1}^{d+1}g)=\emptyset$, providing a contradiction. Clearly $D(x_{m_\sigma+1}^{d+1}g)=D(g)$, and since $D(f)\cap D(g)=\emptyset$, $f+x_{m_\sigma+1}^{d+1}g$ is not contained in any $\mathfrak p_\ell$ for $\ell\in D(f)\cup D(g)$. At the same time, since the term of lowest degree of $x_{m_\sigma+1}^{d+1}g$ is of greater degree than the term of highest degree of $f$, there can be no cancellation among the monomials, so, fixing an index $\ell$, if $f\not\in\mathfrak p_\ell$, $f$ has a nonzero monomial not in $\mathfrak p_\ell$, and that monomial persists with the same nonzero coefficient in $f+x_{m_\sigma+1}^{d+1}g$, hence $f+x_{m_\sigma+1}^{d+1}g$ cannot lie in $\mathfrak p_\ell$, since for a pol. to lie in $\mathfrak p_\ell$, every monomial with nonzero coefficient must lie in $(x_{m_\ell+1},\ldots,x_{m_{\ell+1}})$. This proves Remark 3.
