hcju/stacksqa huggingface dataset:
Choose a maximal chain $$ 0 = M_0 \subset M_1 \subset M_2 \subset \ldots \subset M_m = M $$ by $B$-submodules as in Lemma \ref{lemma-simple-pieces}. Then each quotient $M_j/M_{j - 1}$ is isomorphic to $\kappa(\mathfrak m_{i(j)})$ for some $i(j) \in \{1, \ldots, n\}$. Moreover $\text{length}_A(\kappa(\mathfrak m_i)) = [\kappa(\mathfrak m_i) : \kappa(\mathfrak m)]$ by Lemma \ref{lemma-dimension-is-length}. The lemma follows by additivity of lengths (Lemma \ref{lemma-length-additive}).
The ring map $A \to B$ is faithfully flat by Lemma \ref{lemma-local-flat-ff}. Hence if $0 = M_0 \subset M_1 \subset \ldots \subset M_n = M$ is a chain of length $n$ in $M$, then the corresponding chain $0 = M_0 \otimes_A B \subset M_1 \otimes_A B \subset \ldots \subset M_n \otimes_A B = M \otimes_A B$ has length $n$ also. This proves $\text{length}_A(M) = \infty \Rightarrow \text{length}_B(M \otimes_A B) = \infty$. Next, assume $\text{length}_A(M) < \infty$. In this case we see that $M$ has a filtration of length $\ell = \text{length}_A(M)$ whose quotients are $A/\mathfrak m_A$. Arguing as above we see that $M \otimes_A B$ has a filtration of length $\ell$ whose quotients are isomorphic to $B \otimes_A A/\mathfrak m_A =  B/\mathfrak m_AB$. Thus the lemma follows.
Let $I \subset R$ be the Jacobson radical. Note that $I \supset I^2 \supset I^3 \supset \ldots$ is a descending sequence. Thus $I^n = I^{n + 1}$ for some $n$. Set $J = \{ x\in R \mid xI^n = 0\}$. We have to show $J = R$. If not, choose an ideal $J' \not = J$, $J \subset J'$ minimal (possible by the Artinian property). Then $J' = J + Rx$ for some $x \in R$. By NAK, Lemma \ref{lemma-NAK}, we have $IJ' \subset J$. Hence $xI^{n + 1} \subset xI \cdot I^n \subset J \cdot I^n = 0$. Since $I^{n + 1} = I^n$ we conclude $x\in J$. Contradiction.
Let $R$ be a ring with finitely many maximal ideals $\mathfrak m_1, \ldots, \mathfrak m_n$. Let $I = \bigcap_{i = 1}^n \mathfrak m_i$ be the Jacobson radical of $R$. Assume $I$ is locally nilpotent. Let $\mathfrak p$ be a prime ideal of $R$. Since every prime contains every nilpotent element of $R$ we see $ \mathfrak p \supset \mathfrak m_1 \cap \ldots \cap \mathfrak m_n$. Since $\mathfrak m_1 \cap \ldots \cap \mathfrak m_n \supset \mathfrak m_1 \ldots \mathfrak m_n$ we conclude $\mathfrak p \supset \mathfrak m_1 \ldots \mathfrak m_n$. Hence $\mathfrak p \supset \mathfrak m_i$ for some $i$, and so $\mathfrak p = \mathfrak m_i$. By the Chinese remainder theorem (Lemma \ref{lemma-chinese-remainder}) we have $R/I \cong \bigoplus R/\mathfrak m_i$ which is a product of fields. Hence by Lemma \ref{lemma-lift-idempotents} there are idempotents $e_i$, $i = 1, \ldots, n$ with $e_i \bmod \mathfrak m_j = \delta_{ij}$. Hence $R = \prod Re_i$, and each $Re_i$ is a ring with exactly one maximal ideal.
If $R$ has finite length over itself then it satisfies both the ascending chain condition and the descending chain condition for ideals. Hence it is both Noetherian and Artinian. Any Artinian ring is equal to product of its localizations at maximal ideals by Lemmas \ref{lemma-artinian-finite-nr-max}, \ref{lemma-artinian-radical-nilpotent}, and \ref{lemma-product-local}. \medskip\noindent Suppose that $R$ is Artinian. We will show $R$ has finite length over itself. It suffices to exhibit a chain of submodules whose successive quotients have finite length. By what we said above we may assume that $R$ is local, with maximal ideal $\mathfrak m$. By Lemma \ref{lemma-artinian-radical-nilpotent} we have $\mathfrak m^n =0$ for some $n$. Consider the sequence $0 = \mathfrak m^n \subset \mathfrak m^{n-1} \subset \ldots \subset \mathfrak m \subset R$. By Lemma \ref{lemma-dimension-is-length} the length of each subquotient $\mathfrak m^j/\mathfrak m^{j + 1}$ is the dimension of this as a vector space over $\kappa(\mathfrak m)$. This has to be finite since otherwise we would have an infinite descending chain of sub vector spaces which would correspond to an infinite descending chain of ideals in $R$.
If $R \to S$ is finite, then $R \to S/\mathfrak m$ is finite by Lemma \ref{lemma-finite-transitive}. Conversely, assume $R \to S/\mathfrak m$ is finite. As $S$ has finite length over itself (Lemma \ref{lemma-artinian-finite-length}) we can choose a filtration $$ 0 \subset I_1 \subset \ldots \subset I_n = S $$ by ideals such that $I_i/I_{i - 1} \cong S/\mathfrak m$ as $S$-modules. Thus $S$ has a filtration by $R$-submodules $I_i$ such that each successive quotient is a finite $R$-module. Thus $S$ is a finite $R$-module by Lemma \ref{lemma-extension}. \medskip\noindent If $R \to S$ is of finite type, then $R \to S/\mathfrak m$ is of finite type by Lemma \ref{lemma-compose-finite-type}. Conversely, assume that $R \to S/\mathfrak m$ is of finite type. Choose $f_1, \ldots, f_n \in S$ which map to generators of $S/\mathfrak m$. Then $A = R[x_1, \ldots, x_n] \to S$, $x_i \mapsto f_i$ is a ring map such that $A \to S/\mathfrak m$ is surjective (in particular finite). Hence $A \to S$ is finite by part (1) and we see that $R \to S$ is of finite type by Lemma \ref{lemma-compose-finite-type}. \medskip\noindent If $R \to S$ is essentially of finite type, then $R \to S/\mathfrak m$ is essentially of finite type by Lemma \ref{lemma-composition-essentially-of-finite-type}. Conversely, assume that $R \to S/\mathfrak m$ is essentially of finite type. Suppose $S/\mathfrak m$ is the localization of $R[x_1, \ldots, x_n]/I$. Choose $f_1, \ldots, f_n \in S$ whose congruence classes modulo $\mathfrak m$ correspond to the congruence classes of $x_1, \ldots, x_n$ modulo $I$. Consider the map $R[x_1, \ldots, x_n] \to S$, $x_i \mapsto f_i$ with kernel $J$. Set $A = R[x_1, \ldots, x_n]/J \subset S$ and $\mathfrak p = A \cap \mathfrak m$. Note that $A/\mathfrak p \subset S/\mathfrak m$ is equal to the image of $R[x_1, \ldots, x_n]/I$ in $S/\mathfrak m$. Hence $\kappa(\mathfrak p) = S/\mathfrak m$. Thus $A_\mathfrak p \to S$ is finite by part (1). We conclude that $S$ is essentially of finite type by Lemma \ref{lemma-composition-essentially-of-finite-type}.
We can write $S$ as a localization of a quotient of $R[x_1, \ldots, x_n]$. Hence it suffices to prove the lemma in case $S = R[x_1, \ldots, x_n]_\mathfrak q$ for some prime $\mathfrak q \subset R[x_1, \ldots, x_n]$. If $\mathfrak q + \mathfrak m_R R[x_1, \ldots, x_n] \not = R[x_1, \ldots, x_n]$ then we can find a maximal ideal $\mathfrak m$ as in the statement of the lemma with $\mathfrak q \subset \mathfrak m$ and the result is clear. \medskip\noindent Choose a valuation ring $A \subset \kappa(\mathfrak q)$ which dominates the image of $R \to \kappa(\mathfrak q)$ (Lemma \ref{lemma-dominate}). If the image $\lambda_i \in \kappa(\mathfrak q)$ of $x_i$ is contained in $A$, then $\mathfrak q$ is contained in the inverse image of $\mathfrak m_A$ via $R[x_1, \ldots, x_n] \to A$ which means we are back in the preceding case. Hence there exists an $i$ such that $\lambda_i^{-1} \in A$ and such that $\lambda_j/\lambda_i \in A$ for all $j = 1, \ldots, n$ (because the value group of $A$ is totally ordered, see Lemma \ref{lemma-valuation-group}). Then we consider the map $$ R[y_0, y_1, \ldots, \hat{y_i}, \ldots, y_n] \to R[x_1, \ldots, x_n]_\mathfrak q,\quad y_0 \mapsto 1/x_i,\quad y_j \mapsto x_j/x_i $$ Let $\mathfrak q' \subset R[y_0, \ldots, \hat{y_i}, \ldots, y_n]$ be the inverse image of $\mathfrak q$. Since $y_0 \not \in \mathfrak q'$ it is easy to see that the displayed arrow defines an isomorphism on localizations. On the other hand, the result of the first paragraph applies to $R[y_0, \ldots, \hat{y_i}, \ldots, y_n]$ because $y_j$ maps to an element of $A$. This finishes the proof.
Let $P$ be a finite projective $R$-module. Choose elements $x_1, \ldots, x_n \in P$ which map to a basis of $P/\mathfrak m P$. By Nakayama's Lemma \ref{lemma-NAK} these elements generate $P$. The corresponding surjection $u : R^{\oplus n} \to P$ has a splitting as $P$ is projective. Hence $R^{\oplus n} = P \oplus Q$ with $Q = \Ker(u)$. It follows that $Q/\mathfrak m Q = 0$, hence $Q$ is zero by Nakayama's lemma. In this way we see that every finite projective $R$-module is finite free. A finite free module has a well defined rank by Lemma \ref{lemma-rank}. Given a short exact sequence of finite free $R$-modules $$ 0 \to M' \to M \to M'' \to 0 $$ we have $\text{rank}(M) = \text{rank}(M') + \text{rank}(M'')$ because we have $M \cong M' \oplus M'$ in this case (for example we have a splitting by Lemma \ref{lemma-lift-map}). We conclude $K_0(R) = \mathbf{Z}$.
Let $P$ be a finite projective $R$-module. We have to show that $\text{length}_R(P) = \text{rank}_R(P) \text{length}_R(R)$. By Lemma \ref{lemma-K0-local} the module $P$ is finite free. So $P \cong R^{\oplus n}$ for some $n \geq 0$. Then $\text{rank}_R(P) = n$ and $\text{length}_R(R^{\oplus n}) = n \text{length}_R(R)$ by additivity of lenghts (Lemma \ref{lemma-length-additive}). Thus the result holds.
We have to show the following: If $s = s_n + s_{n + 1} + \ldots + s_m \in S'$, then each homogeneous part $s_j \in S'$. We will prove this by induction on $m - n$ over all homomorphisms $R \to S$ of graded rings. First note that it is immediate that $s_0$ is integral over $R_0$ (hence over $R$) as there is a ring map $S \to S_0$ compatible with the ring map $R \to R_0$. Thus, after replacing $s$ by $s - s_0$, we may assume $n > 0$. Consider the extension of graded rings $R[t, t^{-1}] \to S[t, t^{-1}]$ where $t$ has degree $0$. There is a commutative diagram $$ \xymatrix{ S[t, t^{-1}] \ar[rr]_{s \mapsto t^{\deg(s)}s} & & S[t, t^{-1}] \\ R[t, t^{-1}] \ar[u] \ar[rr]^{r \mapsto t^{\deg(r)}r} & &  R[t, t^{-1}] \ar[u] } $$ where the horizontal maps are ring automorphisms. Hence the integral closure $C$ of $S[t, t^{-1}]$ over $R[t, t^{-1}]$ maps into itself. Thus we see that $$ t^m(s_n + s_{n + 1} + \ldots + s_m) - (t^ns_n + t^{n + 1}s_{n + 1} + \ldots + t^ms_m) \in C $$ which implies by induction hypothesis that each $(t^m - t^i)s_i \in C$ for $i = n, \ldots, m - 1$. Note that for any ring $A$ and $m > i \geq n > 0$ we have $A[t, t^{-1}]/(t^m - t^i - 1) \cong A[t]/(t^m - t^i - 1) \supset A$ because $t(t^{m - 1} - t^{i - 1}) = 1$ in $A[t]/(t^m - t^i - 1)$. Since $t^m - t^i$ maps to $1$ we see the image of $s_i$ in the ring $S[t]/(t^m - t^i - 1)$ is integral over $R[t]/(t^m - t^i - 1)$ for $i = n, \ldots, m - 1$. Since $R \to R[t]/(t^m - t^i - 1)$ is finite we see that $s_i$ is integral over $R$ by transitivity, see Lemma \ref{lemma-integral-transitive}. Finally, we also conclude that $s_m = s - \sum_{i = n, \ldots, m - 1} s_i$ is integral over $R$.
It is clear that if $S$ is Noetherian then $S_0 = S/S_{+}$ is Noetherian and $S_{+}$ is finitely generated. Conversely, assume $S_0$ is Noetherian and $S_{+}$ finitely generated as an ideal of $S$. Pick generators $S_{+} = (f_1, \ldots, f_n)$. By decomposing the $f_i$ into homogeneous pieces we may assume each $f_i$ is homogeneous. By Lemma \ref{lemma-S-plus-generated} we see that $S_0[X_1, \ldots X_n] \to S$ sending $X_i$ to $f_i$ is surjective. Thus $S$ is Noetherian by Lemma \ref{lemma-Noetherian-permanence}.
Note that $M/I^nM \to M''/I^nM''$ is surjective with kernel $M' / M' \cap I^nM$. By the Artin-Rees Lemma \ref{lemma-Artin-Rees} there exists a constant $c$ such that $M' \cap I^nM = I^{n - c}(M' \cap I^cM)$. Denote $N = M' \cap I^cM$. Note that $I^c M' \subset N \subset M'$. Hence $\text{length}_R(M' / M' \cap I^nM) = \text{length}_R(M'/N) + \text{length}_R(N/I^{n - c}N)$ for $n \geq c$. From the short exact sequence $$ 0 \to M' / M' \cap I^nM \to M/I^nM \to M''/I^nM'' \to 0 $$ and additivity of lengths (Lemma \ref{lemma-length-additive}) we obtain the equality $$ \chi_{I, M}(n - 1) = \chi_{I, M''}(n - 1) + \chi_{I, N}(n - c - 1) + \text{length}_R(M'/N) $$ for $n \geq c$. We have $\varphi_{I, M}(n) = \chi_{I, M}(n) - \chi_{I, M}(n - 1)$ and similarly for the modules $M''$ and $N$. Hence we get $\varphi_{I, M}(n) = \varphi_{I, M''}(n) + \varphi_{I, N}(n-c)$ for $n \geq c$.
We first prove (1). Let $N \subset M'$ be as in Lemma \ref{lemma-hilbert-ses}. By Lemma \ref{lemma-differ-finite-chi} the numerical polynomial $\chi_{I, M'} - \chi_{I, N}$ has degree $<$ the common degree of $\chi_{I, M'}$ and $\chi_{I, N}$. By Lemma \ref{lemma-hilbert-ses} the difference $$ \chi_{I, M}(n) - \chi_{I, M''}(n) - \chi_{I, N}(n - c) $$ is constant for $n \gg 0$. By elementary calculus the difference $\chi_{I, N}(n) - \chi_{I, N}(n - c)$ has degree $<$ the degree of $\chi_{I, N}$ which is bigger than zero (see above). Putting everything together we obtain (1). \medskip\noindent Note that the leading coefficients of $\chi_{I, M'}$ and $\chi_{I, M''}$ are nonnegative. Thus the degree of $\chi_{I, M'} + \chi_{I, M''}$ is equal to the maximum of the degrees. Thus if $M'$ does not have finite length, then (2) follows from (1). If $M'$ does have finite length, then $I^nM \to I^nM''$ is an isomorphism for all $n \gg 0$ by Artin-Rees (Lemma \ref{lemma-Artin-Rees}). Thus $M/I^nM \to M''/I^nM''$ is a surjection with kernel $M'$ for $n \gg 0$ and we see that $\chi_{I, M}(n) - \chi_{I, M''}(n) = \text{length}(M')$ for all $n \gg 0$. Thus (2) holds in this case also. \medskip\noindent Proof of (3). This follows from (2) except if one of $M$, $M'$, or $M''$ is zero. We omit the proof in these special cases.
By Lemma \ref{lemma-Noetherian-topology} the space $\Spec(R)$ is Noetherian. By Topology, Lemma \ref{topology-lemma-Noetherian} we see that $\Spec(R)$ has finitely many irreducible components, say $\Spec(R) = Z_1 \cup \ldots Z_r$. According to Lemma \ref{lemma-irreducible}, each $Z_i = V(\mathfrak p_i)$ with $\mathfrak p_i$ a minimal ideal. Since the dimension is $0$ these $\mathfrak p_i$ are also maximal. Thus $\Spec(R)$ is the discrete topological space with elements $\mathfrak p_i$. All elements $f$ of the Jacobson radical $I = \cap \mathfrak p_i$ are nilpotent since otherwise $R_f$ would not be the zero ring and we would have another prime. Since $I$ is finitely generated we conclude that $I$ is nilpotent, Lemma \ref{lemma-Noetherian-power}. By Lemma \ref{lemma-product-local} $R$ is the product of its local rings. By Lemma \ref{lemma-length-finite} each of these has finite length over $R$. Hence we conclude that $R$ is Artinian by Lemma \ref{lemma-artinian-finite-length}. \medskip\noindent If $R$ is Artinian then by Lemma \ref{lemma-artinian-finite-length} it is Noetherian. All of its primes are maximal by a combination of Lemmas \ref{lemma-artinian-finite-nr-max}, \ref{lemma-artinian-radical-nilpotent} and \ref{lemma-product-local}.
First, assume that $\dim(R) = 1$. Let $\mathfrak p_i$ be the minimal primes of $R$. Because the dimension is $1$ the only other prime of $R$ is $\mathfrak m$. According to Lemma \ref{lemma-Noetherian-irreducible-components} there are finitely many. Hence we can find $x \in \mathfrak m$, $x \not \in \mathfrak p_i$, see Lemma \ref{lemma-silly}. Thus the only prime containing $x$ is $\mathfrak m$ and hence (\ref{item-Vx}). \medskip\noindent If (\ref{item-Vx}) then $\mathfrak m = \sqrt{(x)}$ by Lemma \ref{lemma-Zariski-topology}, and hence (\ref{item-x}). The converse is clear as well. The equivalence of (\ref{item-x}) and (\ref{item-ideal-1}) follows from directly the definitions. \medskip\noindent Assume (\ref{item-ideal-1}). Let $I = (x)$ be an ideal of definition. Note that $I^n/I^{n + 1}$ is a quotient of $R/I$ via multiplication by $x^n$ and hence $\text{length}_R(I^n/I^{n + 1})$ is bounded. Thus $d(R) = 0$ or $d(R) = 1$, but $d(R) = 0$ is excluded by the assumption that $0$ is not an ideal of definition. \medskip\noindent Assume (\ref{item-d-1}). To get a contradiction, assume there exist primes $\mathfrak p \subset \mathfrak q \subset \mathfrak m$, with both inclusions strict. Pick some ideal of definition $I \subset R$. We will repeatedly use Lemma \ref{lemma-hilbert-ses-chi}. First of all it implies, via the exact sequence $0 \to \mathfrak p \to R \to R/\mathfrak p \to 0$, that $d(R/\mathfrak p) \leq 1$. But it clearly cannot be zero. Pick $x\in \mathfrak q$, $x\not \in \mathfrak p$. Consider the short exact sequence $$ 0 \to R/\mathfrak p \to R/\mathfrak p \to R/(xR + \mathfrak p) \to 0. $$ This implies that $\chi_{I, R/\mathfrak p} - \chi_{I, R/\mathfrak p} - \chi_{I, R/(xR + \mathfrak p)} = - \chi_{I, R/(xR + \mathfrak p)}$ has degree $ < 1$. In other words, $d(R/(xR + \mathfrak p) = 0$, and hence $\dim(R/(xR + \mathfrak p)) = 0$, by Lemma \ref{lemma-dimension-0-d-0}. But $R/(xR + \mathfrak p)$ has the distinct primes $\mathfrak q/(xR + \mathfrak p)$ and $\mathfrak m/(xR + \mathfrak p)$ which gives the desired contradiction.
Proof of (1). If $\mathfrak p$ is minimal over $x$, then the only prime ideal of $R_\mathfrak p$ containing $x$ is the maximal ideal $\mathfrak p R_\mathfrak p$. This is true because the primes of $R_\mathfrak p$ correspond $1$-to-$1$ with the primes of $R$ contained in $\mathfrak p$, see Lemma \ref{lemma-spec-localization}. Hence Lemma \ref{lemma-height-1} shows $\dim(R_\mathfrak p) = 1$ if $x$ is not nilpotent in $R_\mathfrak p$. Of course, if $x$ is nilpotent in $R_\mathfrak p$ the argument gives that $\mathfrak pR_\mathfrak p$ is the only prime ideal and we see that the height is $0$. \medskip\noindent Proof of (2). By part (1) we see that $\mathfrak q/\mathfrak p$ is a prime of height $1$ or $0$ in $R/\mathfrak p$. This immediately implies there cannot be a prime strictly between $\mathfrak p$ and $\mathfrak q$.
Proof of (1). If $\mathfrak p$ is minimal over $f_1, \ldots, f_r$, then the only prime ideal of $R_\mathfrak p$ containing $f_1, \ldots, f_r$ is the maximal ideal $\mathfrak p R_\mathfrak p$. This is true because the primes of $R_\mathfrak p$ correspond $1$-to-$1$ with the primes of $R$ contained in $\mathfrak p$, see Lemma \ref{lemma-spec-localization}. Hence Proposition \ref{proposition-dimension} shows $\dim(R_\mathfrak p) \leq r$. \medskip\noindent Proof of (2). By part (1) we see that $\mathfrak q/\mathfrak p$ is a prime of height $\leq r$. This immediately implies the statement about chains of primes between $\mathfrak p$ and $\mathfrak q$.
If $x_1, \ldots, x_{\dim R/xR} \in R$ map to elements of $R/xR$ which generate an ideal of definition for $R/xR$, then $x, x_1, \ldots, x_{\dim R/xR}$ generate an ideal of definition for $R$. Hence the inequality by Proposition \ref{proposition-dimension}. On the other hand, if $x$ is not contained in any minimal prime of $R$, then the chains of primes in $R/xR$ all give rise to chains in $R$ which are at least one step away from being maximal.
To get a contradiction, assume that $U \subset \Spec(R)$ is finite. In this case $(0) \in U$ and $\{(0)\}$ is an open subset of $U$ (because the complement of $\{(0)\}$ is the union of the closures of the other points). Thus we may assume $U = \{(0)\}$. Let $\mathfrak m \subset R$ be the maximal ideal. We can find an $x \in \mathfrak m$, $x \not = 0$ such that $V(x) \cup U = \Spec(R)$. In other words we see that $D(x) = \{(0)\}$. In particular we see that $\dim(R/xR) = \dim(R) - 1 \geq 1$, see Lemma \ref{lemma-one-equation}. Let $\overline{y}_2, \ldots, \overline{y}_{\dim(R)} \in R/xR$ generate an ideal of definition of $R/xR$, see Proposition \ref{proposition-dimension}. Choose lifts $y_2, \ldots, y_{\dim(R)} \in R$, so that $x, y_2, \ldots, y_{\dim(R)}$ generate an ideal of definition in $R$. This implies that $\dim(R/(y_2)) = \dim(R) - 1$ and $\dim(R/(y_2, x)) = \dim(R) - 2$, see Lemma \ref{lemma-elements-generate-ideal-definition}. Hence there exists a prime $\mathfrak p$ containing $y_2$ but not $x$. This contradicts the fact that $D(x) = \{(0)\}$.
Let $R$ be a Noetherian ring with finitely many primes. If $R$ is a local domain, then the lemma follows from Lemma \ref{lemma-Noetherian-local-domain-dim-2-infinite-opens}. If $R$ is a domain, then $R_\mathfrak m$ has dimension $\leq 1$ for all maximal ideals $\mathfrak m$ by the local case. Hence $\dim(R) \leq 1$ by Lemma \ref{lemma-dimension-height}. If $R$ is general, then $\dim(R/\mathfrak q) \leq 1$ for every minimal prime $\mathfrak q$ of $R$. Since every prime contains a minimal prime (Lemma \ref{lemma-Zariski-topology}), this implies $\dim(R) \leq 1$.
Recall that $\Spec(S)$ is sober, Noetherian, and Jacobson, see Lemmas \ref{lemma-spec-spectral}, \ref{lemma-Noetherian-topology}, \ref{lemma-finite-type-field-Jacobson}, and \ref{lemma-jacobson}. If it has dimension $0$, then every point defines an irreducible component and there are only a finite number of irreducible components (Topology, Lemma \ref{topology-lemma-Noetherian}). Conversely, if $\Spec(S)$ is finite, then it is discrete by Topology, Lemma \ref{topology-lemma-finite-jacobson} and hence the dimension is $0$.
Part (1) is a reformulation of Lemma \ref{lemma-pid-jacobson}. \medskip\noindent Let $R$ be a Noetherian ring such that every non-maximal prime $\mathfrak p$ is contained in infinitely many prime ideals. Assume $\Spec(R)$ is not Jacobson to get a contradiction. By Lemmas \ref{lemma-irreducible} and \ref{lemma-Noetherian-topology} we see that $\Spec(R)$ is a sober, Noetherian topological space. By Topology, Lemma \ref{topology-lemma-non-jacobson-Noetherian-characterize} we see that there exists a non-maximal ideal $\mathfrak p \subset R$ such that $\{\mathfrak p\}$ is a locally closed subset of $\Spec(R)$. In other words, $\mathfrak p$ is not maximal and $\{\mathfrak p\}$ is an open subset of $V(\mathfrak p)$. Consider a prime $\mathfrak q \subset R$ with $\mathfrak p \subset \mathfrak q$. Recall that the topology on the spectrum of $(R/\mathfrak p)_{\mathfrak q} = R_{\mathfrak q}/\mathfrak pR_{\mathfrak q}$ is induced from that of $\Spec(R)$, see Lemmas \ref{lemma-spec-localization} and \ref{lemma-spec-closed}. Hence we see that $\{(0)\}$ is a locally closed subset of $\Spec((R/\mathfrak p)_{\mathfrak q})$. By Lemma \ref{lemma-Noetherian-local-domain-dim-2-infinite-opens} we conclude that $\dim((R/\mathfrak p)_{\mathfrak q}) = 1$. Since this holds for every $\mathfrak q \supset \mathfrak p$ we conclude that $\dim(R/\mathfrak p) = 1$. At this point we use the assumption that $\mathfrak p$ is contained in infinitely many primes to see that $\Spec(R/\mathfrak p)$ is infinite. Hence by part (1) of the lemma we see that $V(\mathfrak p) \cong \Spec(R/\mathfrak p)$ is the closure of its closed points. This is the desired contradiction since it means that $\{\mathfrak p\} \subset V(\mathfrak p)$ cannot be open.
[First proof] By Lemma \ref{lemma-trivial-filter-finite-module} it suffices to do the case $M = R/I$ for some ideal $I$. Consider the set $S$ of ideals $J$ such that the lemma does not hold for the module $R/J$, and order it by inclusion. To arrive at a contradiction, assume that $S$ is not empty. Because $R$ is Noetherian, $S$ has a maximal element $J$. By definition of $S$, the ideal $J$ cannot be prime. Pick $a, b\in R$ such that $ab \in J$, but neither $a \in J$ nor $b\in J$. Consider the filtration $0 \subset aR/(J \cap aR) \subset R/J$. Note that $aR/(J \cap aR)$ is a quotient of $R/(J + bR)$ and the second quotient equals $R/(aR + J)$. Hence by maximality of $J$, each of these has a filtration as above and hence so does $R/J$. Contradiction.
Assume that $\text{Supp}(M) = \{ \mathfrak m\}$. It suffices to show that all the primes $\mathfrak p_i$ in the filtration of Lemma \ref{lemma-filter-Noetherian-module} are the maximal ideal. This is clear by Lemma \ref{lemma-filter-primes-in-support}. \medskip\noindent Suppose that $M$ has finite length over $R$. Then $\mathfrak m^n M = 0$ by Lemma \ref{lemma-length-infinite}. Since some element of $\mathfrak m$ maps to a unit in $R_{\mathfrak p}$ for any prime $\mathfrak p \not = \mathfrak m$ in $R$ we see $M_{\mathfrak p} = 0$.
It is clear that $I^nM = 0$ for some $n \geq 0$ implies $\text{Supp}(M) \subset V(I)$. Suppose that $\text{Supp}(M) \subset V(I)$. Choose a filtration $0 = M_0 \subset M_1 \subset \ldots \subset M_n = M$ as in Lemma \ref{lemma-filter-Noetherian-module}. Each of the primes $\mathfrak p_i$ is contained in $V(I)$ by Lemma \ref{lemma-filter-primes-in-support}. Hence $I \subset \mathfrak p_i$ and $I$ annihilates $M_i/M_{i - 1}$. Hence $I^n$ annihilates $M$.