\input{preamble} % AMS symbols required by the reviewed strict-inclusion correction. \usepackage{amssymb} \providecommand{\Supp}{\operatorname{Supp}} % OK, start here. % \begin{document} \title{Commutative Algebra} \maketitle % BEGIN ALGEBRA EDITORIAL COMPANION NOTICE \noindent\textit{Editorial companion.} Source-linked conceptual errata and complete supplementary proofs accompany this chapter. \href{algebra-editorial.pdf}{Open the editorial companion}. Editorial material is identified separately from the source exposition. \medskip % END ALGEBRA EDITORIAL COMPANION NOTICE \phantomsection \label{section-phantom} \tableofcontents \section{Introduction} \label{section-introduction} \noindent Basic commutative algebra will be explained in this document. A reference is \cite{MatCA}. \section{Conventions} \label{section-conventions} \noindent A ring is commutative with $1$. The zero ring is a ring. In fact it is the only ring that does not have a prime ideal. The Kronecker symbol $\delta_{ij}$ will be used. If $R \to S$ is a ring map and $\mathfrak q$ a prime of $S$, then we use the notation ``$\mathfrak p = R \cap \mathfrak q$'' to indicate the prime which is the inverse image of $\mathfrak q$ under $R \to S$ even if $R$ is not a subring of $S$ and even if $R \to S$ is not injective. \section{Basic notions} \label{section-rings-basic} \noindent The following is a list of basic notions in commutative algebra. Some of these notions are discussed in more detail in the text that follows and some are defined in the list, but others are considered basic and will not be defined. If you are not familiar with most of the italicized concepts, then we suggest looking at an introductory text on algebra before continuing. \begin{enumerate} \item $R$ is a {\it ring}, \label{item-ring} \item $x\in R$ is {\it nilpotent}, \label{item-ring-element-nilpotent} \item $x\in R$ is a {\it zerodivisor}, \label{item-ring-element-zerodivisor} \item $x\in R$ is a {\it unit}, \label{item-ring-element-unit} \item $e \in R$ is an {\it idempotent}, \label{item-ring-element-idempotent} \item an idempotent $e \in R$ is called {\it trivial} if $e = 1$ or $e = 0$, \label{item-idempotent-trivial} \item $\varphi : R_1 \to R_2$ is a {\it ring homomorphism}, \label{item-ring-homomorphism} \item \label{item-ring-homomorphism-finite-presentation} $\varphi : R_1 \to R_2$ is {\it of finite presentation}, or {\it $R_2$ is a finitely presented $R_1$-algebra}, see Definition \ref{definition-finite-type}, \item \label{item-ring-homomorphism-finite-type} $\varphi : R_1 \to R_2$ is {\it of finite type}, or {\it $R_2$ is a finite type $R_1$-algebra}, see Definition \ref{definition-finite-type}, \item \label{item-ring-homomorphism-finite} $\varphi : R_1 \to R_2$ is {\it finite}, or {\it $R_2$ is a finite $R_1$-algebra}, \item $R$ is a {\it (integral) domain}, \label{item-ring-domain} \item $R$ is {\it reduced}, \label{item-ring-reduced} \item $R$ is {\it Noetherian}, \label{item-ring-Noetherian} \item $R$ is a {\it principal ideal domain} or a {\it PID}, \label{item-ring-PID} \item $R$ is a {\it Euclidean domain}, \label{item-ring-Euclidean} \item $R$ is a {\it unique factorization domain} or a {\it UFD}, \label{item-ring-UFD} \item $R$ is a {\it discrete valuation ring} or a {\it dvr}, \label{item-ring-dvr} \item $K$ is a {\it field}, \label{item-field} \item $L/K$ is a {\it field extension}, \label{item-field-extension} \item $L/K$ is an {\it algebraic field extension}, \label{item-field-extension-algebraic} \item $\{t_i\}_{i\in I}$ is a {\it transcendence basis} for $L$ over $K$, \label{item-transcendence-basis} \item the {\it transcendence degree} $\text{trdeg}(L/K)$ of $L$ over $K$, \label{item-transcendence-degree} \item the field $k$ is {\it algebraically closed}, \label{item-algebraically-closed} \item \label{item-extend-into-algebraically-closed} if $L/K$ is algebraic, and $\Omega/K$ an extension with $\Omega$ algebraically closed, then there exists a ring map $L \to \Omega$ extending the map on $K$, \item $I \subset R$ is an {\it ideal}, \label{item-ideal} \item $I \subset R$ is {\it radical}, \label{item-ideal-radical} \item if $I$ is an ideal then we have its {\it radical} $\sqrt{I}$, \label{item-radical-ideal} \item \label{item-ideal-nilpotent} $I \subset R$ is {\it nilpotent} means that $I^n = 0$ for some $n \in \mathbf{N}$, \item \label{item-ideal-locally-nilpotent} $I \subset R$ is {\it locally nilpotent} means that every element of $I$ is nilpotent, \item $\mathfrak p \subset R$ is a {\it prime ideal}, \label{item-prime-ideal} \item \label{item-prime-product-ideals} if $\mathfrak p \subset R$ is prime and if $I, J \subset R$ are ideals, and if $IJ\subset \mathfrak p$, then $I \subset \mathfrak p$ or $J \subset \mathfrak p$. \item $\mathfrak m \subset R$ is a {\it maximal ideal}, \label{item-maximal-ideal} \item any nonzero ring has a maximal ideal, \label{item-exists-maximal-ideal} \item \label{item-jacobson-radical} the {\it Jacobson radical} of $R$ is $\text{rad}(R) = \bigcap_{\mathfrak m \subset R} \mathfrak m$ the intersection of all the maximal ideals of $R$, \item the ideal $(T)$ {\it generated} by a subset $T \subset R$, \label{item-ideal-generated-by} \item the {\it quotient ring} $R/I$, \label{item-quotient-ring} \item an ideal $I$ in the ring $R$ is prime if and only if $R/I$ is a domain, \label{item-characterize-prime-ideal} \item \label{item-characterize-maximal-ideal} an ideal $I$ in the ring $R$ is maximal if and only if the ring $R/I$ is a field, \item \label{item-inverse-image-ideal} if $\varphi : R_1 \to R_2$ is a ring homomorphism, and if $I \subset R_2$ is an ideal, then $\varphi^{-1}(I)$ is an ideal of $R_1$, \item \label{item-image-ideal} if $\varphi : R_1 \to R_2$ is a ring homomorphism, and if $I \subset R_1$ is an ideal, then $\varphi(I) \cdot R_2$ (sometimes denoted $I \cdot R_2$, or $IR_2$) is the ideal of $R_2$ generated by $\varphi(I)$, \item \label{item-inverse-image-prime} if $\varphi : R_1 \to R_2$ is a ring homomorphism, and if $\mathfrak p \subset R_2$ is a prime ideal, then $\varphi^{-1}(\mathfrak p)$ is a prime ideal of $R_1$, \item $M$ is an {\it $R$-module}, \label{item-module} \item \label{item-annihilator} for $m \in M$ the {\it annihilator} $I = \{f \in R \mid fm = 0\}$ of $m$ in $R$, \item $N \subset M$ is an {\it $R$-submodule}, \label{item-submodule} \item $M$ is a {\it Noetherian $R$-module}, \label{item-Noetherian-module} \item $M$ is a {\it finite $R$-module}, \label{item-finite-module} \item $M$ is a {\it finitely generated $R$-module}, \label{item-finitely-generated-module} \item $M$ is a {\it finitely presented $R$-module}, \label{item-finitely-presented-module} \item $M$ is a {\it free $R$-module}, \label{item-free-module} \item \label{item-extension-free} if $0 \to K \to L \to M \to 0$ is a short exact sequence of $R$-modules and $K$, $M$ are free, then $L$ is free, \item if $N \subset M \subset L$ are $R$-modules, then $L/M = (L/N)/(M/N)$, \label{item-isomorphism-theorem} \item $S$ is a {\it multiplicative subset of $R$}, \label{item-multiplicative-subset} \item the {\it localization} $R \to S^{-1}R$ of $R$, \label{item-localization-ring} \item \label{item-localization-zero} if $R$ is a ring and $S$ is a multiplicative subset of $R$ then $S^{-1}R$ is the zero ring if and only if $S$ contains $0$, \item \label{item-localize-nonzerodivisors} if $R$ is a ring and if the multiplicative subset $S$ consists completely of nonzerodivisors, then $R \to S^{-1}R$ is injective, \item if $\varphi : R_1 \to R_2$ is a ring homomorphism, and $S$ is a multiplicative subset of $R_1$, then $\varphi(S)$ is a multiplicative subset of $R_2$, \item \label{item-products-multiplicative-subsets} if $S$, $S'$ are multiplicative subsets of $R$, and if $SS'$ denotes the set of products $SS' = \{r \in R \mid \exists s\in S, \exists s' \in S', r = ss'\}$ then $SS'$ is a multiplicative subset of $R$, \item \label{item-localization-localization} if $S$, $S'$ are multiplicative subsets of $R$, and if $\overline{S}$ denotes the image of $S$ in $(S')^{-1}R$, then $(SS')^{-1}R = \overline{S}^{-1}((S')^{-1}R)$, \item the {\it localization} $S^{-1}M$ of the $R$-module $M$, \label{item-localization-module} \item \label{item-localization-exact} the functor $M \mapsto S^{-1}M$ preserves injective maps, surjective maps, and exactness, \item \label{item-localization-localization-module} if $S$, $S'$ are multiplicative subsets of $R$, and if $M$ is an $R$-module, then $(SS')^{-1}M = S^{-1}((S')^{-1}M)$, \item \label{item-localize-ideal} if $R$ is a ring, $I$ an ideal of $R$, and $S$ a multiplicative subset of $R$, then $S^{-1}I$ is an ideal of $S^{-1}R$, and we have $S^{-1}R/S^{-1}I = \overline{S}^{-1}(R/I)$, where $\overline{S}$ is the image of $S$ in $R/I$, \item \label{item-ideal-in-localization} if $R$ is a ring, and $S$ a multiplicative subset of $R$, then any ideal $I'$ of $S^{-1}R$ is of the form $S^{-1}I$, where one can take $I$ to be the inverse image of $I'$ in $R$, \item \label{item-submodule-in-localization} if $R$ is a ring, $M$ an $R$-module, and $S$ a multiplicative subset of $R$, then any submodule $N'$ of $S^{-1}M$ is of the form $S^{-1}N$ for some submodule $N \subset M$, where one can take $N$ to be the inverse image of $N'$ in $M$, \item if $S = \{1, f, f^2, \ldots\}$ then $R_f = S^{-1}R$ and $M_f = S^{-1}M$, \label{item-localize-f} \item \label{item-localize-p} if $S = R \setminus \mathfrak p = \{x\in R \mid x\not\in \mathfrak p\}$ for some prime ideal $\mathfrak p$, then it is customary to denote $R_{\mathfrak p} = S^{-1}R$ and $M_{\mathfrak p} = S^{-1}M$, \item a {\it local ring} is a ring with exactly one maximal ideal, \label{item-local-ring} \item a {\it semi-local ring} is a ring with finitely many maximal ideals, \label{item-semi-local-ring} \item \label{item-localize-p-local-ring} if $\mathfrak p$ is a prime in $R$, then $R_{\mathfrak p}$ is a local ring with maximal ideal $\mathfrak p R_{\mathfrak p}$, \item \label{item-residue-field} the {\it residue field}, denoted $\kappa(\mathfrak p)$, of the prime $\mathfrak p$ in the ring $R$ is the field of fractions of the domain $R/\mathfrak p$; it is equal to $R_\mathfrak p/\mathfrak pR_\mathfrak p = (R \setminus \mathfrak p)^{-1}R/\mathfrak p$, \item given $R$ and $M_1$, $M_2$ the {\it tensor product} $M_1 \otimes_R M_2$, \label{item-tensor-product} \item \label{item-cauchy-binet} given matrices $A$ and $B$ in a ring $R$ of sizes $m \times n$ and $n \times m$ we have $\det(AB) = \sum \det(A_S)\det({}_SB)$ in $R$ where the sum is over subsets $S \subset \{1, \ldots, n\}$ of size $m$ and $A_S$ is the $m \times m$ submatrix of $A$ with columns corresponding to $S$ and ${}_SB$ is the $m \times m$ submatrix of $B$ with rows corresponding to $S$, \item etc. \end{enumerate} \section{Snake lemma} \label{section-snake} \noindent The snake lemma and its variants are discussed in the setting of abelian categories in Homology, Section \ref{homology-section-abelian-categories}. \begin{lemma} \label{lemma-snake} \begin{reference} \cite[III, Lemma 3.3]{Cartan-Eilenberg} \end{reference} Given a commutative diagram $$ \xymatrix{ & X \ar[r] \ar[d]^\alpha & Y \ar[r] \ar[d]^\beta & Z \ar[r] \ar[d]^\gamma & 0 \\ 0 \ar[r] & U \ar[r] & V \ar[r] & W } $$ of abelian groups with exact rows, there is a canonical exact sequence $$ \Ker(\alpha) \to \Ker(\beta) \to \Ker(\gamma) \to \Coker(\alpha) \to \Coker(\beta) \to \Coker(\gamma) $$ Moreover: if $X \to Y$ is injective, then the first map is injective; if $V \to W$ is surjective, then the last map is surjective. \end{lemma} \begin{proof} The map $\partial : \Ker(\gamma) \to \Coker(\alpha)$ is defined as follows. Take $z \in \Ker(\gamma)$. Choose $y \in Y$ mapping to $z$. Then $\beta(y) \in V$ maps to zero in $W$. Hence $\beta(y)$ is the image of some $u \in U$. Set $\partial z = \overline{u}$, the class of $u$ in the cokernel of $\alpha$. Proof of exactness is omitted. \end{proof} \section{Finite modules and finitely presented modules} \label{section-module-finite-type} \noindent Just some basic notation and lemmas. \begin{definition} \label{definition-module-finite-type} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item We say $M$ is a {\it finite $R$-module}, or a {\it finitely generated $R$-module} if there exist $n \in \mathbf{N}$ and $x_1, \ldots, x_n \in M$ such that every element of $M$ is an $R$-linear combination of the $x_i$. Equivalently, this means there exists a surjection $R^{\oplus n} \to M$ for some $n \in \mathbf{N}$. \item We say $M$ is a {\it finitely presented $R$-module} or an {\it $R$-module of finite presentation} if there exist integers $n, m \in \mathbf{N}$ and an exact sequence $$ R^{\oplus m} \longrightarrow R^{\oplus n} \longrightarrow M \longrightarrow 0 $$ \end{enumerate} \end{definition} \noindent Informally, $M$ is a finitely presented $R$-module if and only if it is finitely generated and the module of relations among these generators is finitely generated as well. A choice of an exact sequence as in the definition is called a {\it presentation} of $M$. \begin{lemma} \label{lemma-lift-map} Let $R$ be a ring. Let $\alpha : R^{\oplus n} \to M$ and $\beta : N \to M$ be module maps. If $\Im(\alpha) \subset \Im(\beta)$, then there exists an $R$-module map $\gamma : R^{\oplus n} \to N$ such that $\alpha = \beta \circ \gamma$. \end{lemma} \begin{proof} Let $e_i = (0, \ldots, 0, 1, 0, \ldots, 0)$ be the $i$th basis vector of $R^{\oplus n}$. Let $x_i \in N$ be an element with $\alpha(e_i) = \beta(x_i)$ which exists by assumption. Set $\gamma(a_1, \ldots, a_n) = \sum a_i x_i$. By construction $\alpha = \beta \circ \gamma$. \end{proof} \begin{lemma} \label{lemma-extension} Let $R$ be a ring. Let $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ be a short exact sequence of $R$-modules. \begin{enumerate} \item If $M_1$ and $M_3$ are finite $R$-modules, then $M_2$ is a finite $R$-module. \item If $M_1$ and $M_3$ are finitely presented $R$-modules, then $M_2$ is a finitely presented $R$-module. \item If $M_2$ is a finite $R$-module, then $M_3$ is a finite $R$-module. \item If $M_2$ is a finitely presented $R$-module and $M_1$ is a finite $R$-module, then $M_3$ is a finitely presented $R$-module. \item If $M_3$ is a finitely presented $R$-module and $M_2$ is a finite $R$-module, then $M_1$ is a finite $R$-module. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). If $x_1, \ldots, x_n$ are generators of $M_1$ and $y_1, \ldots, y_m \in M_2$ are elements whose images in $M_3$ are generators of $M_3$, then $x_1, \ldots, x_n, y_1, \ldots, y_m$ generate $M_2$. \medskip\noindent Part (3) is immediate from the definition. \medskip\noindent Proof of (5). Assume $M_3$ is finitely presented and $M_2$ finite. Choose a presentation $$ R^{\oplus m} \to R^{\oplus n} \to M_3 \to 0 $$ By Lemma \ref{lemma-lift-map} there exists a map $R^{\oplus n} \to M_2$ such that the solid diagram $$ \xymatrix{ & R^{\oplus m} \ar[r] \ar@{..>}[d] & R^{\oplus n} \ar[r] \ar[d] & M_3 \ar[r] \ar[d]^{\text{id}} & 0 \\ 0 \ar[r] & M_1 \ar[r] & M_2 \ar[r] & M_3 \ar[r] & 0 } $$ commutes. This produces the dotted arrow. By the snake lemma (Lemma \ref{lemma-snake}) we see that we get an isomorphism $$ \Coker(R^{\oplus m} \to M_1) \cong \Coker(R^{\oplus n} \to M_2) $$ In particular we conclude that $\Coker(R^{\oplus m} \to M_1)$ is a finite $R$-module. Since $\Im(R^{\oplus m} \to M_1)$ is finite by (3), we see that $M_1$ is finite by part (1). \medskip\noindent Proof of (4). Assume $M_2$ is finitely presented and $M_1$ is finite. Choose a presentation $R^{\oplus m} \to R^{\oplus n} \to M_2 \to 0$. Choose a surjection $R^{\oplus k} \to M_1$. By Lemma \ref{lemma-lift-map} there exists a factorization $R^{\oplus k} \to R^{\oplus n} \to M_2$ of the composition $R^{\oplus k} \to M_1 \to M_2$. Then $R^{\oplus k + m} \to R^{\oplus n} \to M_3 \to 0$ is a presentation. \medskip\noindent Proof of (2). Assume that $M_1$ and $M_3$ are finitely presented. The argument in the proof of part (1) produces a commutative diagram $$ \xymatrix{ 0 \ar[r] & R^{\oplus n} \ar[d] \ar[r] & R^{\oplus n + m} \ar[d] \ar[r] & R^{\oplus m} \ar[d] \ar[r] & 0 \\ 0 \ar[r] & M_1 \ar[r] & M_2 \ar[r] & M_3 \ar[r] & 0 } $$ with surjective vertical arrows. By the snake lemma we obtain a short exact sequence $$ 0 \to \Ker(R^{\oplus n} \to M_1) \to \Ker(R^{\oplus n + m} \to M_2) \to \Ker(R^{\oplus m} \to M_3) \to 0 $$ By part (5) we see that the outer two modules are finite. Hence the middle one is finite too. By (4) we see that $M_2$ is of finite presentation. \end{proof} \begin{lemma} \label{lemma-trivial-filter-finite-module} \begin{slogan} Finite modules have filtrations such that successive quotients are cyclic modules. \end{slogan} Let $R$ be a ring, and let $M$ be a finite $R$-module. There exists a filtration by finite $R$-submodules $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M $$ such that each quotient $M_i/M_{i - 1}$ is isomorphic to $R/I_i$ for some ideal $I_i$ of $R$. \end{lemma} \begin{proof} By induction on the number of generators of $M$. Let $x_1, \ldots, x_r \in M$ be generators. Let $M' = Rx_1 \subset M$. Then $M/M'$ has $r - 1$ generators and the induction hypothesis applies. And clearly $M' \cong R/I_1$ with $I_1 = \{f \in R \mid fx_1 = 0\}$. \end{proof} \begin{lemma} \label{lemma-finite-over-subring} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. If $M$ is finite as an $R$-module, then $M$ is finite as an $S$-module. \end{lemma} \begin{proof} In fact, any $R$-generating set of $M$ is also an $S$-generating set of $M$, since the $R$-module structure is induced by the image of $R$ in $S$. \end{proof} \section{Ring maps of finite type and of finite presentation} \label{section-finite-type} \begin{definition} \label{definition-finite-type} Let $R \to S$ be a ring map. \begin{enumerate} \item We say $R \to S$ is of {\it finite type}, or that {\it $S$ is a finite type $R$-algebra} if there exist an $n \in \mathbf{N}$ and a surjection of $R$-algebras $R[x_1, \ldots, x_n] \to S$. \item We say $R \to S$ is of {\it finite presentation} if there exist integers $n, m \in \mathbf{N}$ and polynomials $f_1, \ldots, f_m \in R[x_1, \ldots, x_n]$ and an isomorphism of $R$-algebras $R[x_1, \ldots, x_n]/(f_1, \ldots, f_m) \cong S$. \end{enumerate} \end{definition} \noindent Informally, $R \to S$ is of finite presentation if and only if $S$ is finitely generated as an $R$-algebra and the ideal of relations among the generators is finitely generated. A choice of a surjection $R[x_1, \ldots, x_n] \to S$ as in the definition is sometimes called a {\it presentation} of $S$. \begin{lemma} \label{lemma-compose-finite-type} The notions finite type and finite presentation have the following permanence properties. \begin{enumerate} \item A composition of ring maps of finite type is of finite type. \item A composition of ring maps of finite presentation is of finite presentation. \item Given $R \to S' \to S$ with $R \to S$ of finite type, then $S' \to S$ is of finite type. \item Given $R \to S' \to S$, with $R \to S$ of finite presentation, and $R \to S'$ of finite type, then $S' \to S$ is of finite presentation. \end{enumerate} \end{lemma} \begin{proof} We only prove the last assertion. Write $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$ and $S' = R[y_1, \ldots, y_a]/I$. Say that the class $\bar y_i$ of $y_i$ maps to $h_i \bmod (f_1, \ldots, f_m)$ in $S$. Then it is clear that $S = S'[x_1, \ldots, x_n]/(f_1, \ldots, f_m, h_1 - \bar y_1, \ldots, h_a - \bar y_a)$. \end{proof} \begin{lemma} \label{lemma-finite-presentation-independent} Let $R \to S$ be a ring map of finite presentation. For any surjection $\alpha : R[x_1, \ldots, x_n] \to S$ the kernel of $\alpha$ is a finitely generated ideal in $R[x_1, \ldots, x_n]$. \end{lemma} \begin{proof} Write $S = R[y_1, \ldots, y_m]/(f_1, \ldots, f_k)$. Choose $g_i \in R[y_1, \ldots, y_m]$ which are lifts of $\alpha(x_i)$. Then we see that $S = R[x_i, y_j]/(f_l, x_i - g_i)$. Choose $h_j \in R[x_1, \ldots, x_n]$ such that $\alpha(h_j)$ corresponds to $y_j \bmod (f_1, \ldots, f_k)$. Consider the map $\psi : R[x_i, y_j] \to R[x_i]$, $x_i \mapsto x_i$, $y_j \mapsto h_j$. Then the kernel of $\alpha$ is the image of $(f_l, x_i - g_i)$ under $\psi$ and we win. \end{proof} \begin{lemma} \label{lemma-finitely-presented-over-subring} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume $R \to S$ is of finite type and $M$ is finitely presented as an $R$-module. Then $M$ is finitely presented as an $S$-module. \end{lemma} \begin{proof} This is similar to the proof of part (4) of Lemma \ref{lemma-compose-finite-type}. We may assume $S = R[x_1, \ldots, x_n]/J$. Choose $y_1, \ldots, y_m \in M$ which generate $M$ as an $R$-module and choose relations $\sum a_{ij} y_j = 0$, $i = 1, \ldots, t$ which generate the kernel of $R^{\oplus m} \to M$. For any $i = 1, \ldots, n$ and $j = 1, \ldots, m$ write $$ x_i y_j = \sum a_{ijk} y_k $$ for some $a_{ijk} \in R$. Consider the $S$-module $N$ generated by $y_1, \ldots, y_m$ subject to the relations $\sum a_{ij} y_j = 0$, $i = 1, \ldots, t$ and $x_i y_j = \sum a_{ijk} y_k$, $i = 1, \ldots, n$ and $j = 1, \ldots, m$. Then $N$ has a presentation $$ S^{\oplus nm + t} \longrightarrow S^{\oplus m} \longrightarrow N \longrightarrow 0 $$ By construction there is a surjective map $\varphi : N \to M$. To finish the proof we show $\varphi$ is injective. Suppose $z = \sum b_j y_j \in N$ for some $b_j \in S$. We may think of $b_j$ as a polynomial in $x_1, \ldots, x_n$ with coefficients in $R$. By applying the relations of the form $x_i y_j = \sum a_{ijk} y_k$ we can inductively lower the degree of the polynomials. Hence we see that $z = \sum c_j y_j$ for some $c_j \in R$. Hence if $\varphi(z) = 0$ then the vector $(c_1, \ldots, c_m)$ is an $R$-linear combination of the vectors $(a_{i1}, \ldots, a_{im})$ and we conclude that $z = 0$ as desired. \end{proof} \section{Finite ring maps} \label{section-finite} \noindent Here is the definition. \begin{definition} \label{definition-finite-ring-map} Let $\varphi : R \to S$ be a ring map. We say $\varphi : R \to S$ is {\it finite} if $S$ is finite as an $R$-module. \end{definition} \begin{lemma} \label{lemma-finite-module-over-finite-extension} Let $R \to S$ be a finite ring map. Let $M$ be an $S$-module. Then $M$ is finite as an $R$-module if and only if $M$ is finite as an $S$-module. \end{lemma} \begin{proof} One of the implications follows from Lemma \ref{lemma-finite-over-subring}. To see the other assume that $M$ is finite as an $S$-module. Pick $x_1, \ldots, x_n \in S$ which generate $S$ as an $R$-module. Pick $y_1, \ldots, y_m \in M$ which generate $M$ as an $S$-module. Then $x_i y_j$ generate $M$ as an $R$-module. \end{proof} \begin{lemma} \label{lemma-finite-transitive} Suppose that $R \to S$ and $S \to T$ are finite ring maps. Then $R \to T$ is finite. \end{lemma} \begin{proof} If $t_i$ generate $T$ as an $S$-module and $s_j$ generate $S$ as an $R$-module, then $t_i s_j$ generate $T$ as an $R$-module. (Also follows from Lemma \ref{lemma-finite-module-over-finite-extension}.) \end{proof} \begin{lemma} \label{lemma-finite-finite-type} Let $\varphi : R \to S$ be a ring map. \begin{enumerate} \item If $\varphi$ is finite, then $\varphi$ is of finite type. \item If $S$ is of finite presentation as an $R$-module, then $\varphi$ is of finite presentation. \end{enumerate} \end{lemma} \begin{proof} For (1) if $x_1, \ldots, x_n \in S$ generate $S$ as an $R$-module, then $x_1, \ldots, x_n$ generate $S$ as an $R$-algebra. For (2), suppose that $\sum r_j^ix_i = 0$, $j = 1, \ldots, m$ is a set of generators of the relations among the $x_i$ when viewed as $R$-module generators of $S$. Furthermore, write $1 = \sum r_ix_i$ for some $r_i \in R$ and $x_ix_j = \sum r_{ij}^k x_k$ for some $r_{ij}^k \in R$. Then $$ S = R[t_1, \ldots, t_n]/ (\sum r_j^it_i,\ 1 - \sum r_it_i,\ t_it_j - \sum r_{ij}^k t_k) $$ as an $R$-algebra which proves (2). \end{proof} \noindent For more information on finite ring maps, please see Section \ref{section-finite-ring-extensions}. \section{Colimits} \label{section-colimits} % BEGIN ALGEBRA EDITORIAL ROUTE section-colimits \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-colimits}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-colimits \noindent Some of the material in this section overlaps with the general discussion on colimits in Categories, Sections \ref{categories-section-limits} -- \ref{categories-section-posets-limits}. The notion of a preordered set is defined in Categories, Definition \ref{categories-definition-directed-set}. It is a slightly weaker notion than a partially ordered set. \begin{definition} \label{definition-directed-system} Let $(I, \leq)$ be a preordered set. A {\it system $(M_i, \mu_{ij})$ of $R$-modules over $I$} consists of a family of $R$-modules $\{M_i\}_{i\in I}$ indexed by $I$ and a family of $R$-module maps $\{\mu_{ij} : M_i \to M_j\}_{i \leq j}$ such that for all $i \leq j \leq k$ $$ \mu_{ii} = \text{id}_{M_i}\quad \mu_{ik} = \mu_{jk}\circ \mu_{ij} $$ We say $(M_i, \mu_{ij})$ is a {\it directed system} if $I$ is a directed set. \end{definition} \noindent This is the same as the notion defined in Categories, Definition \ref{categories-definition-system-over-poset} and Section \ref{categories-section-posets-limits}. We refer to Categories, Definition \ref{categories-definition-colimit} for the definition of a colimit of a diagram/system in any category. \begin{lemma} \label{lemma-colimit} Let $(M_i, \mu_{ij})$ be a system of $R$-modules over the preordered set $I$. The colimit of the system $(M_i, \mu_{ij})$ is the quotient $R$-module $(\bigoplus_{i\in I} M_i) /Q$ where $Q$ is the $R$-submodule generated by all elements $$ \iota_i(x_i) - \iota_j(\mu_{ij}(x_i)) $$ where $\iota_i : M_i \to \bigoplus_{i\in I} M_i$ is the natural inclusion. We denote the colimit $M = \colim_i M_i$. We denote $\pi : \bigoplus_{i\in I} M_i \to M$ the projection map and $\phi_i = \pi \circ \iota_i : M_i \to M$. \end{lemma} \begin{proof} This lemma is a special case of Categories, Lemma \ref{categories-lemma-colimits-coproducts-coequalizers} but we will also prove it directly in this case. Namely, note that $\phi_i = \phi_j\circ \mu_{ij}$ in the above construction. To show the pair $(M, \phi_i)$ is the colimit we have to show it satisfies the universal property: for any other such pair $(Y, \psi_i)$ with $\psi_i : M_i \to Y$, $\psi_i = \psi_j\circ \mu_{ij}$, there is a unique $R$-module homomorphism $g : M \to Y$ such that the following diagram commutes: $$ \xymatrix{ M_i \ar[rr]^{\mu_{ij}} \ar[dr]^{\phi_i} \ar[ddr]_{\psi_i} & & M_j\ar[dl]_{\phi_j} \ar[ddl]^{\psi_j} \\ & M \ar[d]^{g}\\ & Y } $$ And this is clear because we can define $g$ by taking the map $\psi_i$ on the summand $M_i$ in the direct sum $\bigoplus M_i$. \end{proof} \begin{lemma} \label{lemma-directed-colimit} Let $(M_i, \mu_{ij})$ be a system of $R$-modules over the preordered set $I$. Assume that $I$ is directed. The colimit of the system $(M_i, \mu_{ij})$ is canonically isomorphic to the module $M$ defined as follows: \begin{enumerate} \item as a set let $$ M = \left(\coprod\nolimits_{i \in I} M_i\right)/\sim $$ where for $m \in M_i$ and $m' \in M_{i'}$ we have $$ m \sim m' \Leftrightarrow \mu_{ij}(m) = \mu_{i'j}(m')\text{ for some }j \geq i, i' $$ \item as an abelian group for $m \in M_i$ and $m' \in M_{i'}$ we define the sum of the classes of $m$ and $m'$ in $M$ to be the class of $\mu_{ij}(m) + \mu_{i'j}(m')$ where $j \in I$ is any index with $i \leq j$ and $i' \leq j$, and \item as an $R$-module define for $m \in M_i$ and $x \in R$ the product of $x$ and the class of $m$ in $M$ to be the class of $xm$ in $M$. \end{enumerate} The canonical maps $\phi_i : M_i \to M$ are induced by the canonical maps $M_i \to \coprod_{i \in I} M_i$. \end{lemma} \begin{proof} Omitted. Compare with Categories, Section \ref{categories-section-directed-colimits}. \end{proof} \begin{lemma} \label{lemma-zero-directed-limit} Let $(M_i, \mu_{ij})$ be a directed system. Let $M = \colim M_i$ with $\mu_i : M_i \to M$. Then, $\mu_i(x_i) = 0$ for $x_i \in M_i$ if and only if there exists $j \geq i$ such that $\mu_{ij}(x_i) = 0$. \end{lemma} \begin{proof} This is clear from the description of the directed colimit in Lemma \ref{lemma-directed-colimit}. \end{proof} \begin{example} \label{example-zero-colimit-different} Consider the partially ordered set $I = \{a, b, c\}$ with $a < b$ and $a < c$ and no other strict inequalities. A system $(M_a, M_b, M_c, \mu_{ab}, \mu_{ac})$ over $I$ consists of three $R$-modules $M_a, M_b, M_c$ and two $R$-module homomorphisms $\mu_{ab} : M_a \to M_b$ and $\mu_{ac} : M_a \to M_c$. The colimit of the system is just $$ M := \colim_{i \in I} M_i = \Coker(M_a \to M_b \oplus M_c) $$ where the map is $\mu_{ab} \oplus -\mu_{ac}$. Thus the kernel of the canonical map $M_a \to M$ is $\Ker(\mu_{ab}) + \Ker(\mu_{ac})$. And the kernel of the canonical map $M_b \to M$ is the image of $\Ker(\mu_{ac})$ under the map $\mu_{ab}$. Hence clearly the result of Lemma \ref{lemma-zero-directed-limit} is false for general systems. \end{example} \begin{definition} \label{definition-homomorphism-directed-systems} Let $(M_i, \mu_{ij})$, $(N_i, \nu_{ij})$ be systems of $R$-modules over the same preordered set $I$. A {\it homomorphism of systems} $\Phi$ from $(M_i, \mu_{ij})$ to $(N_i, \nu_{ij})$ is by definition a family of $R$-module homomorphisms $\phi_i : M_i \to N_i$ such that $\phi_j \circ \mu_{ij} = \nu_{ij} \circ \phi_i$ for all $i \leq j$. \end{definition} \noindent This is the same notion as a transformation of functors between the associated diagrams $M : I \to \text{Mod}_R$ and $N : I \to \text{Mod}_R$, in the language of categories. The following lemma is a special case of Categories, Lemma \ref{categories-lemma-functorial-colimit}. \begin{lemma} \label{lemma-homomorphism-limit} Let $(M_i, \mu_{ij})$, $(N_i, \nu_{ij})$ be systems of $R$-modules over the same preordered set. A morphism of systems $\Phi = (\phi_i)$ from $(M_i, \mu_{ij})$ to $(N_i, \nu_{ij})$ induces a unique homomorphism $$ \colim \phi_i : \colim M_i \longrightarrow \colim N_i $$ such that $$ \xymatrix{ M_i \ar[r] \ar[d]_{\phi_i} & \colim M_i \ar[d]^{\colim \phi_i} \\ N_i \ar[r] & \colim N_i } $$ commutes for all $i \in I$. \end{lemma} \begin{proof} Write $M = \colim M_i$ and $N = \colim N_i$ and $\phi = \colim \phi_i$ (as yet to be constructed). We will use the explicit description of $M$ and $N$ in Lemma \ref{lemma-colimit} without further mention. The condition of the lemma is equivalent to the condition that $$ \xymatrix{ \bigoplus_{i\in I} M_i \ar[r] \ar[d]_{\bigoplus\phi_i} & M \ar[d]^\phi \\ \bigoplus_{i\in I} N_i \ar[r] & N } $$ commutes. Hence it is clear that if $\phi$ exists, then it is unique. To see that $\phi$ exists, it suffices to show that the kernel of the upper horizontal arrow is mapped by $\bigoplus \phi_i$ to the kernel of the lower horizontal arrow. To see this, let $j \leq k$ and $x_j \in M_j$. Then $$ (\bigoplus \phi_i)(x_j - \mu_{jk}(x_j)) = \phi_j(x_j) - \phi_k(\mu_{jk}(x_j)) = \phi_j(x_j) - \nu_{jk}(\phi_j(x_j)) $$ which is in the kernel of the lower horizontal arrow as required. \end{proof} \begin{lemma} \label{lemma-directed-colimit-exact} \begin{slogan} Filtered colimits are exact. Directed colimits are exact. \end{slogan} Let $I$ be a directed set. Let $(L_i, \lambda_{ij})$, $(M_i, \mu_{ij})$, and $(N_i, \nu_{ij})$ be systems of $R$-modules over $I$. Let $\varphi_i : L_i \to M_i$ and $\psi_i : M_i \to N_i$ be morphisms of systems over $I$. Assume that for all $i \in I$ the sequence of $R$-modules $$ \xymatrix{ L_i \ar[r]^{\varphi_i} & M_i \ar[r]^{\psi_i} & N_i } $$ is a complex with homology $H_i$. Then the $R$-modules $H_i$ form a system over $I$, the sequence of $R$-modules $$ \xymatrix{ \colim_i L_i \ar[r]^\varphi & \colim_i M_i \ar[r]^\psi & \colim_i N_i } $$ is a complex as well, and denoting $H$ its homology we have $$ H = \colim_i H_i. $$ \end{lemma} \begin{proof} It is clear that $ \xymatrix{ \colim_i L_i \ar[r]^\varphi & \colim_i M_i \ar[r]^\psi & \colim_i N_i } $ is a complex. For each $i \in I$, there is a canonical $R$-module morphism $H_i \to H$ (sending each $[m] \in H_i = \Ker(\psi_i) / \Im(\varphi_i)$ to the residue class in $H = \Ker(\psi) / \Im(\varphi)$ of the image of $m$ in $\colim_i M_i$). These give rise to a morphism $\colim_i H_i \to H$. It remains to show that this morphism is surjective and injective. \medskip\noindent We are going to repeatedly use the description of colimits over $I$ as in Lemma \ref{lemma-directed-colimit} without further mention. Let $h \in H$. Since $H = \Ker(\psi)/\Im(\varphi)$ we see that $h$ is the class mod $\Im(\varphi)$ of an element $[m]$ in $\Ker(\psi) \subset \colim_i M_i$. Choose an $i$ such that $[m]$ comes from an element $m \in M_i$. Choose a $j \geq i$ such that $\nu_{ij}(\psi_i(m)) = 0$ which is possible since $[m] \in \Ker(\psi)$. After replacing $i$ by $j$ and $m$ by $\mu_{ij}(m)$ we see that we may assume $m \in \Ker(\psi_i)$. This shows that the map $\colim_i H_i \to H$ is surjective. \medskip\noindent Suppose that $h_i \in H_i$ has image zero in $H$. Since $H_i = \Ker(\psi_i)/\Im(\varphi_i)$ we may represent $h_i$ by an element $m \in \Ker(\psi_i) \subset M_i$. The assumption on the vanishing of $h_i$ in $H$ means that the class of $m$ in $\colim_i M_i$ lies in the image of $\varphi$. Hence there exists a $j \geq i$ and an $l \in L_j$ such that $\varphi_j(l) = \mu_{ij}(m)$. Clearly this shows that the image of $h_i$ in $H_j$ is zero. This proves the injectivity of $\colim_i H_i \to H$. \end{proof} \begin{example} \label{example-colimit-not-exact} Taking colimits is not exact in general. Consider the partially ordered set $I = \{a, b, c\}$ with $a < b$ and $a < c$ and no other strict inequalities, as in Example \ref{example-zero-colimit-different}. Consider the map of systems $(0, \mathbf{Z}, \mathbf{Z}, 0, 0) \to (\mathbf{Z}, \mathbf{Z}, \mathbf{Z}, 1, 1)$. From the description of the colimit in Example \ref{example-zero-colimit-different} we see that the associated map of colimits is not injective, even though the map of systems is injective on each object. Hence the result of Lemma \ref{lemma-directed-colimit-exact} is false for general systems. \end{example} \begin{lemma} \label{lemma-almost-directed-colimit-exact} Let $\mathcal{I}$ be an index category satisfying the assumptions of Categories, Lemma \ref{categories-lemma-split-into-directed}. Then taking colimits of diagrams of abelian groups over $\mathcal{I}$ is exact (i.e., the analogue of Lemma \ref{lemma-directed-colimit-exact} holds in this situation). \end{lemma} \begin{proof} By Categories, Lemma \ref{categories-lemma-split-into-directed} we may write $\mathcal{I} = \coprod_{j \in J} \mathcal{I}_j$ with each $\mathcal{I}_j$ a filtered category, and $J$ possibly empty. By Categories, Lemma \ref{categories-lemma-directed-category-system} taking colimits over the index categories $\mathcal{I}_j$ is the same as taking the colimit over some directed set. Hence Lemma \ref{lemma-directed-colimit-exact} applies to these colimits. This reduces the problem to showing that coproducts in the category of $R$-modules over the set $J$ are exact. In other words, given exact sequences $L_j \to M_j \to N_j$ of $R$-modules, we have to show that $$ \bigoplus\nolimits_{j \in J} L_j \longrightarrow \bigoplus\nolimits_{j \in J} M_j \longrightarrow \bigoplus\nolimits_{j \in J} N_j $$ is exact. This can be verified by hand, and holds even if $J$ is empty. \end{proof} \section{Localization} \label{section-localization} % BEGIN ALGEBRA EDITORIAL ROUTE section-localization \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-localization}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-localization \begin{definition} \label{definition-multiplicative-subset} Let $R$ be a ring, $S$ a subset of $R$. We say $S$ is a {\it multiplicative subset of $R$} if $1\in S$ and $S$ is closed under multiplication, i.e., $s, s' \in S \Rightarrow ss' \in S$. \end{definition} \noindent Given a ring $A$ and a multiplicative subset $S$, we define a relation on $A \times S$ as follows: $$ (x, s) \sim (y, t) \Leftrightarrow \exists u \in S \text{ such that } (xt-ys)u = 0 $$ It is easily checked that this is an equivalence relation. Let $x/s$ (or $\frac{x}{s}$) be the equivalence class of $(x, s)$ and $S^{-1}A$ be the set of all equivalence classes. Define addition and multiplication in $S^{-1}A$ as follows: $$ x/s + y/t = (xt + ys)/st, \quad x/s \cdot y/t = xy/st $$ One can check that $S^{-1}A$ becomes a ring under these operations. \begin{definition} \label{definition-localization} This ring is called the {\it localization of $A$ with respect to $S$}. \end{definition} \noindent We have a natural ring map from $A$ to its localization $S^{-1}A$, $$ A \longrightarrow S^{-1}A, \quad x \longmapsto x/1 $$ which is sometimes called the {\it localization map}. In general the localization map is not injective, unless $S$ contains no zerodivisors. For, if $x/1 = 0$, then there is a $u\in S$ such that $xu = 0$ in $A$ and hence $x = 0$ since there are no zerodivisors in $S$. The localization of a ring has the following universal property. \begin{proposition} \label{proposition-universal-property-localization} Let $f : A \to B$ be a ring map that sends every element in $S$ to a unit of $B$. Then there is a unique homomorphism $g : S^{-1}A \to B$ such that the following diagram commutes. $$ \xymatrix{ A \ar[rr]^{f} \ar[dr] & & B \\ & S^{-1}A \ar[ur]_g } $$ \end{proposition} \begin{proof} Existence. We define a map $g$ as follows. For $x/s\in S^{-1}A$, let $g(x/s) = f(x)f(s)^{-1}\in B$. It is easily checked from the definition that this is a well-defined ring map. And it is also clear that this makes the diagram commutative. \medskip\noindent Uniqueness. We now show that if $g' : S^{-1}A \to B$ satisfies $g'(x/1) = f(x)$, then $g = g'$. Hence $f(s) = g'(s/1)$ for $s \in S$ by the commutativity of the diagram. But then $g'(1/s)f(s) = 1$ in $B$, which implies that $g'(1/s) = f(s)^{-1}$ and hence $g'(x/s) = g'(x/1)g'(1/s) = f(x)f(s)^{-1} = g(x/s)$. \end{proof} \begin{lemma} \label{lemma-localization-zero} The localization $S^{-1}A$ is the zero ring if and only if $0\in S$. \end{lemma} \begin{proof} If $0\in S$, any pair $(a, s)\sim (0, 1)$ by definition. If $0\not \in S$, then clearly $1/1 \neq 0/1$ in $S^{-1}A$. \end{proof} \begin{lemma} \label{lemma-localization-and-modules} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. The category of $S^{-1}R$-modules is equivalent to the category of $R$-modules $N$ with the property that every $s \in S$ acts as an automorphism on $N$. \end{lemma} \begin{proof} The functor which defines the equivalence associates to an $S^{-1}R$-module $M$ the same module but now viewed as an $R$-module via the localization map $R \to S^{-1}R$. Conversely, if $N$ is an $R$-module, such that every $s \in S$ acts via an automorphism $s_N$, then we can think of $N$ as an $S^{-1}R$-module by letting $x/s$ act via $x_N \circ s_N^{-1}$. We omit the verification that these two functors are quasi-inverse to each other. \end{proof} \noindent The notion of localization of a ring can be generalized to the localization of a module. Let $A$ be a ring, $S$ a multiplicative subset of $A$ and $M$ an $A$-module. We define a relation on $M \times S$ as follows $$ (m, s) \sim (n, t) \Leftrightarrow \exists u\in S \text{ such that } (mt-ns)u = 0 $$ This is clearly an equivalence relation. Denote by $m/s$ (or $\frac{m}{s}$) the equivalence class of $(m, s)$ and by $S^{-1}M$ the set of all equivalence classes. For $a \in A$, $m, n \in M$, and $s, t \in S$, define addition and scalar multiplication by $$ m/s + n/t = (mt + ns)/st,\quad (a/s)\cdot(m/t) = am/st $$ It is clear that this makes $S^{-1}M$ an $S^{-1}A$-module. \begin{definition} \label{definition-localization-module} The $S^{-1}A$-module $S^{-1}M$ is called the {\it localization} of $M$ with respect to $S$. \end{definition} \noindent Note that there is an $A$-module map $M \to S^{-1}M$, $m \mapsto m/1$ which is sometimes called the {\it localization map}. It satisfies the following universal property. \begin{lemma} \label{lemma-universal-property-localization-module} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. Let $M$, $N$ be $R$-modules. Assume all the elements of $S$ act as automorphisms on $N$. Then the canonical map $$ \Hom_R(S^{-1}M, N) \longrightarrow \Hom_R(M, N) $$ induced by the localization map, is an isomorphism. \end{lemma} \begin{proof} It is clear that the map is well-defined and $R$-linear. Injectivity: Let $\alpha \in \Hom_R(S^{-1}M, N)$ and take an arbitrary element $m/s \in S^{-1}M$. Then, since $s \cdot \alpha(m/s) = \alpha(m/1)$, we have $ \alpha(m/s) =s^{-1}(\alpha (m/1))$, so $\alpha$ is completely determined by what it does on the image of $M$ in $S^{-1}M$. Surjectivity: Let $\beta : M \rightarrow N$ be a given $R$-linear map. We need to show that it can be "extended" to $S^{-1}M$. Define a map of sets $$ M \times S \rightarrow N,\quad (m,s) \mapsto s^{-1}\beta(m) $$ Clearly, this map respects the equivalence relation from above, so it descends to a well-defined map $\alpha : S^{-1}M \rightarrow N$. It remains to show that this map is $R$-linear, so take $r, r' \in R$ as well as $s, s' \in S$ and $m, m' \in M$. Then \begin{align*} \alpha(r \cdot m/s + r' \cdot m' /s') & = \alpha((r \cdot s' \cdot m + r' \cdot s \cdot m') /(ss')) \\ & = (ss')^{-1}\beta(r \cdot s' \cdot m + r' \cdot s \cdot m') \\ & = (ss')^{-1} (r \cdot s' \beta (m) + r' \cdot s \beta (m')) \\ & = r \alpha (m/s) + r' \alpha (m' /s') \end{align*} and we win. \end{proof} \begin{example} \label{example-localize-at-prime} Let $A$ be a ring and let $M$ be an $A$-module. Here are some important examples of localizations. \begin{enumerate} \item Given $\mathfrak p$ a prime ideal of $A$ consider $S = A\setminus\mathfrak p$. It is immediately checked that $S$ is a multiplicative set. In this case we denote $A_\mathfrak p$ and $M_\mathfrak p$ the localization of $A$ and $M$ with respect to $S$ respectively. These are called the {\it localization of $A$, resp.\ $M$ at $\mathfrak p$}. \item Let $f\in A$. Consider $S = \{1, f, f^2, \ldots\}$. This is clearly a multiplicative subset of $A$. In this case we denote $A_f$ (resp. $M_f$) the localization $S^{-1}A$ (resp. $S^{-1}M$). This is called the {\it localization of $A$, resp.\ $M$ with respect to $f$}. Note that $A_f = 0$ if and only if $f$ is nilpotent in $A$. \item Let $S = \{f \in A \mid f \text{ is not a zerodivisor in }A\}$. This is a multiplicative subset of $A$. In this case the ring $Q(A) = S^{-1}A$ is called either the {\it total quotient ring}, or the {\it total ring of fractions} of $A$. \item If $A$ is a domain, then the total quotient ring $Q(A)$ is the field of fractions of $A$. Please see Fields, Example \ref{fields-example-quotient-field}. \end{enumerate} \end{example} \begin{lemma} \label{lemma-localization-colimit} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. Let $M$ be an $R$-module. Then $$ S^{-1}M = \colim_{f \in S} M_f $$ where the preorder on $S$ is given by $f \geq f' \Leftrightarrow f = f'f''$ for some $f'' \in R$ in which case the map $M_{f'} \to M_f$ is given by $m/(f')^e \mapsto m(f'')^e/f^e$. \end{lemma} \begin{proof} Omitted. Hint: Use the universal property of Lemma \ref{lemma-universal-property-localization-module}. \end{proof} \noindent In the following paragraph, let $A$ denote a ring, and $M, N$ denote modules over $A$. \medskip\noindent If $S$ and $S'$ are multiplicative sets of $A$, then it is clear that $$ SS' = \{ss' : s\in S, \ s'\in S'\} $$ is also a multiplicative set of $A$. Then the following holds. \begin{proposition} \label{proposition-localize-twice} Let $\overline{S}$ be the image of $S$ in $S'^{-1}A$, then $(SS')^{-1}A$ is isomorphic to $\overline{S}^{-1}(S'^{-1}A)$. \end{proposition} \begin{proof} The map sending $x\in A$ to $x/1\in (SS')^{-1}A$ induces a map sending $x/s\in S'^{-1}A$ to $x/s \in (SS')^{-1}A$, by universal property. The image of the elements in $\overline{S}$ are invertible in $(SS')^{-1}A$. By the universal property we get a map $f : \overline{S}^{-1}(S'^{-1}A) \to (SS')^{-1}A$ which maps $(x/s')/(s/1)$ to $x/ss'$. \medskip\noindent On the other hand, the map from $A$ to $\overline{S}^{-1}(S'^{-1}A)$ sending $x\in A$ to $(x/1)/(1/1)$ also induces a map $g : (SS')^{-1}A \to \overline{S}^{-1}(S'^{-1}A)$ which sends $x/ss'$ to $(x/s')/(s/1)$, by the universal property again. It is immediately checked that $f$ and $g$ are inverse to each other, hence they are both isomorphisms. \end{proof} \noindent For the module $M$ we have \begin{proposition} \label{proposition-localize-twice-module} View $S'^{-1}M$ as an $A$-module, then $S^{-1}(S'^{-1}M)$ is isomorphic to $(SS')^{-1}M$. \end{proposition} \begin{proof} Note that given an $A$-module $M$, the universal property of Lemma \ref{lemma-universal-property-localization-module} is available. We give an explicit construction of the isomorphism. \medskip\noindent We define the maps as follows \begin{align*} & f : S^{-1}(S'^{-1}M) \longrightarrow (SS')^{-1}M, \quad \frac{x/s'}{s}\mapsto x/ss'\\ & g : (SS')^{-1}M \longrightarrow S^{-1}(S'^{-1}M), \quad x/t\mapsto \frac{x/s'}{s}\ \text{for some }s\in S, s'\in S', \text{ and } t = ss' \end{align*} We have to check that these homomorphisms are well-defined, that is, independent of the choice of the fraction. This is easily checked and it is also straightforward to show that they are inverse to each other. \end{proof} \noindent If $u : M \to N$ is an $A$-module homomorphism, then the localization indeed induces a well-defined $S^{-1}A$ homomorphism $S^{-1}u : S^{-1}M \to S^{-1}N$ which sends $x/s$ to $u(x)/s$. It is immediately checked that this construction is functorial, so that $S^{-1}$ is actually a functor from the category of $A$-modules to the category of $S^{-1}A$-modules. Moreover this functor is exact, as we show in the following proposition. \begin{proposition} \label{proposition-localization-exact} \begin{reference} \cite[Chapter II, \S 4, no. 48, Lemma 1, p. 241]{FAC} \end{reference} \begin{history} The cited proof constructs the localized module from fractions, identifies $S^{-1}A \otimes_A M$ with $S^{-1}M$, and checks exactness directly. It assumes $0 \notin S$; the formulation below also includes the zero-ring localization when $0 \in S$. \end{history} \begin{slogan} Localization is exact. \end{slogan} Let $L\xrightarrow{u} M\xrightarrow{v} N$ be an exact sequence of $A$-modules. Then $S^{-1}L \to S^{-1}M \to S^{-1}N$ is also exact. \end{proposition} \begin{proof} First it is clear that $S^{-1}L \to S^{-1}M \to S^{-1}N$ is a complex since localization is a functor. Next suppose that $x/s$ maps to zero in $S^{-1}N$ for some $x/s \in S^{-1}M$. Then by definition there is a $t\in S$ such that $v(xt) = v(x)t = 0$ in $N$, which means $xt \in \Ker(v)$. By the exactness of $L \to M \to N$ we have $xt = u(y)$ for some $y$ in $L$. Then $x/s$ is the image of $y/st$. This proves the exactness. \end{proof} \begin{lemma} \label{lemma-localize-quotient-modules} Localization respects quotients, i.e. if $N$ is a submodule of $M$, then $S^{-1}(M/N)\simeq (S^{-1}M)/(S^{-1}N)$. \end{lemma} \begin{proof} From the exact sequence $$ 0 \longrightarrow N \longrightarrow M \longrightarrow M/N \longrightarrow 0 $$ we have $$ 0 \longrightarrow S^{-1}N \longrightarrow S^{-1}M \longrightarrow S^{-1}(M/N) \longrightarrow 0 $$ The lemma then follows. \end{proof} \noindent If, in the preceding Lemma, we take $N = I$ and $M = A$ for an ideal $I$ of $A$, we see that $S^{-1}A/S^{-1}I \simeq S^{-1}(A/I)$ as $A$-modules. The next proposition shows that they are isomorphic as rings. \begin{proposition} \label{proposition-localize-quotient} Let $I$ be an ideal of $A$, $S$ a multiplicative set of $A$. Then $S^{-1}I$ is an ideal of $S^{-1}A$ and $\overline{S}^{-1}(A/I)$ is isomorphic to $S^{-1}A/S^{-1}I$, where $\overline{S}$ is the image of $S$ in $A/I$. \end{proposition} \begin{proof} The fact that $S^{-1}I$ is an ideal is clear since $I$ itself is an ideal. Define $$ f : S^{-1}A\longrightarrow \overline{S}^{-1}(A/I), \quad x/s\mapsto \overline{x}/\overline{s} $$ where $\overline{x}$ and $\overline{s}$ are the images of $x$ and $s$ in $A/I$. We shall keep similar notations in this proof. This map is well-defined by the universal property of $S^{-1}A$, and $S^{-1}I$ is contained in the kernel of it, therefore it induces a map $$ \overline{f} : S^{-1}A/S^{-1}I \longrightarrow \overline{S}^{-1}(A/I), \quad \overline{x/s}\mapsto \overline{x}/\overline{s} $$ \medskip\noindent On the other hand, the map $A \to S^{-1}A/S^{-1}I$ sending $x$ to $\overline{x/1}$ induces a map $A/I \to S^{-1}A/S^{-1}I$ sending $\overline{x}$ to $\overline{x/1}$. The image of $\overline{S}$ is invertible in $S^{-1}A/S^{-1}I$, thus induces a map $$ g : \overline{S}^{-1}(A/I) \longrightarrow S^{-1}A/S^{-1}I, \quad \frac{\overline{x}}{\overline{s}}\mapsto \overline{x/s} $$ by the universal property. It is then clear that $\overline{f}$ and $g$ are inverse to each other, hence are both isomorphisms. \end{proof} \noindent We now consider how submodules behave in localization. \begin{lemma} \label{lemma-submodule-localization} Any submodule $N'$ of $S^{-1}M$ is of the form $S^{-1}N$ for some $N\subset M$. Indeed one can take $N$ to be the inverse image of $N'$ in $M$. \end{lemma} \begin{proof} Let $N$ be the inverse image of $N'$ in $M$. Then one can see that $S^{-1}N\supset N'$. To show they are equal, take $x/s$ in $S^{-1}N$, where $s\in S$ and $x\in N$. This yields that $x/1\in N'$. Since $N'$ is an $S^{-1}A$-submodule we have $x/s = x/1\cdot 1/s\in N'$. This finishes the proof. \end{proof} \noindent Taking $M = A$ and $N = I$ an ideal of $A$, we have the following corollary, which can be viewed as a converse of the first part of Proposition \ref{proposition-localize-quotient}. \begin{lemma} \label{lemma-ideal-in-localization} \begin{slogan} Ideals in the localization of a ring are localizations of ideals. \end{slogan} Each ideal $I'$ of $S^{-1}A$ takes the form $S^{-1}I$, where one can take $I$ to be the inverse image of $I'$ in $A$. \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-submodule-localization}. \end{proof} \section{Internal Hom} \label{section-hom} \noindent If $R$ is a ring, and $M$, $N$ are $R$-modules, then $$ \Hom_R(M, N) = \{ \varphi : M \to N\} $$ is the set of $R$-linear maps from $M$ to $N$. This set comes with the structure of an abelian group by setting $(\varphi + \psi)(m) = \varphi(m) + \psi(m)$, as usual. In fact, $\Hom_R(M, N)$ is also an $R$-module via the rule $(x \varphi)(m) = x \varphi(m) = \varphi(xm)$. \medskip\noindent Given maps $a : M \to M'$ and $b : N \to N'$ of $R$-modules, we can pre-compose and post-compose homomorphisms by $a$ and $b$. This leads to the following commutative diagram $$ \xymatrix{ \Hom_R(M', N) \ar[d]_{- \circ a} \ar[r]_{b \circ -} & \Hom_R(M', N') \ar[d]^{- \circ a} \\ \Hom_R(M, N) \ar[r]^{b \circ -} & \Hom_R(M, N') } $$ In fact, the maps in this diagram are $R$-module maps. Thus $\Hom_R$ defines an additive functor $$ \text{Mod}_R^{opp} \times \text{Mod}_R \longrightarrow \text{Mod}_R, \quad (M, N) \longmapsto \Hom_R(M, N) $$ \begin{lemma} \label{lemma-hom-exact} Exactness and $\Hom_R$. Let $R$ be a ring. Let $M_1$, $M_2$, $M_3$ be $R$-modules. Let $M_1 \to M_2$ and $M_2 \to M_3$ be $R$-module maps. \begin{enumerate} \item $M_1 \to M_2 \to M_3 \to 0$ is exact if and only if $0 \to \Hom_R(M_3, N) \to \Hom_R(M_2, N) \to \Hom_R(M_1, N)$ is exact for all $R$-modules $N$. \item $0 \to M_1 \to M_2 \to M_3$ is exact if and only if $0 \to \Hom_R(N, M_1) \to \Hom_R(N, M_2) \to \Hom_R(N, M_3)$ is exact for all $R$-modules $N$. \end{enumerate} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-hom-from-finitely-presented} Let $R$ be a ring. Let $M$ be a finitely presented $R$-module. Let $N$ be an $R$-module. \begin{enumerate} \item For $f \in R$ we have $\Hom_R(M, N)_f = \Hom_{R_f}(M_f, N_f) = \Hom_R(M_f, N_f)$, \item for a multiplicative subset $S$ of $R$ we have $$ S^{-1}\Hom_R(M, N) = \Hom_{S^{-1}R}(S^{-1}M, S^{-1}N) = \Hom_R(S^{-1}M, S^{-1}N). $$ \end{enumerate} \end{lemma} \begin{proof} Part (1) is a special case of part (2). The second equality in (2) follows from Lemma \ref{lemma-localization-and-modules}. Choose a presentation $$ \bigoplus\nolimits_{j = 1, \ldots, m} R \longrightarrow \bigoplus\nolimits_{i = 1, \ldots, n} R \to M \to 0. $$ By Lemma \ref{lemma-hom-exact} this gives an exact sequence $$ 0 \to \Hom_R(M, N) \to \bigoplus\nolimits_{i = 1, \ldots, n} N \longrightarrow \bigoplus\nolimits_{j = 1, \ldots, m} N. $$ Inverting $S$ and using Proposition \ref{proposition-localization-exact} we get an exact sequence $$ 0 \to S^{-1}\Hom_R(M, N) \to \bigoplus\nolimits_{i = 1, \ldots, n} S^{-1}N \longrightarrow \bigoplus\nolimits_{j = 1, \ldots, m} S^{-1}N $$ and the result follows since $S^{-1}M$ sits in an exact sequence $$ \bigoplus\nolimits_{j = 1, \ldots, m} S^{-1}R \longrightarrow \bigoplus\nolimits_{i = 1, \ldots, n} S^{-1}R \to S^{-1}M \to 0 $$ which induces (by Lemma \ref{lemma-hom-exact}) the exact sequence $$ 0 \to \Hom_{S^{-1}R}(S^{-1}M, S^{-1}N) \to \bigoplus\nolimits_{i = 1, \ldots, n} S^{-1}N \longrightarrow \bigoplus\nolimits_{j = 1, \ldots, m} S^{-1}N $$ which is the same as the one above. \end{proof} \section{Characterizing finite and finitely presented modules} \label{section-colim-and-hom} % BEGIN ALGEBRA EDITORIAL ROUTE section-colim-and-hom \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-colim-and-hom}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-colim-and-hom \noindent Given a module $N$ over a ring $R$, you can characterize whether or not $N$ is a finite module or a finitely presented module in terms of the functor $\Hom_R(N, -)$. \begin{lemma} \label{lemma-characterize-finite-module-hom} Let $R$ be a ring. Let $N$ be an $R$-module. The following are equivalent \begin{enumerate} \item $N$ is a finite $R$-module, \item for any filtered colimit $M = \colim M_i$ of $R$-modules the map $\colim \Hom_R(N, M_i) \to \Hom_R(N, M)$ is injective. \end{enumerate} \end{lemma} \begin{proof} Assume (1) and choose generators $x_1, \ldots, x_m$ for $N$. If $N \to M_i$ is a module map and the composition $N \to M_i \to M$ is zero, then because $M = \colim_{i' \geq i} M_{i'}$ for each $j \in \{1, \ldots, m\}$ we can find an $i' \geq i$ such that $x_j$ maps to zero in $M_{i'}$. Since there are finitely many $x_j$ we can find a single $i'$ which works for all of them. Then the composition $N \to M_i \to M_{i'}$ is zero and we conclude the map is injective, i.e., part (2) holds. \medskip\noindent Assume (2). For a finite subset $E \subset N$ denote $N_E \subset N$ the $R$-submodule generated by the elements of $E$. Then $0 = \colim N/N_E$ is a filtered colimit. Hence we see that $\text{id} : N \to N$ maps into $N_E$ for some $E$, i.e., $N$ is finitely generated. \end{proof} \noindent For purposes of reference, we define what it means to have a relation between elements of a module. \begin{definition} \label{definition-relation} Let $R$ be a ring. Let $M$ be an $R$-module. Let $n \geq 0$ and $x_i \in M$ for $i = 1, \ldots, n$. A {\it relation} between $x_1, \ldots, x_n$ in $M$ is a sequence of elements $f_1, \ldots, f_n \in R$ such that $\sum_{i = 1, \ldots, n} f_i x_i = 0$. \end{definition} \begin{lemma} \label{lemma-module-colimit-fp} Let $R$ be a ring and let $M$ be an $R$-module. Then $M$ is the colimit of a directed system $(M_i, \mu_{ij})$ of $R$-modules with all $M_i$ finitely presented $R$-modules. \end{lemma} \begin{proof} Consider any finite subset $S \subset M$ and any finite collection of relations $E$ among the elements of $S$. So each $s \in S$ corresponds to $x_s \in M$ and each $e \in E$ consists of a vector of elements $f_{e, s} \in R$ such that $\sum f_{e, s} x_s = 0$. Let $M_{S, E}$ be the cokernel of the map $$ R^{\# E} \longrightarrow R^{\# S}, \quad (g_e)_{e\in E} \longmapsto (\sum g_e f_{e, s})_{s\in S}. $$ There are canonical maps $M_{S, E} \to M$. If $S \subset S'$ and if the elements of $E$ correspond, via this map, to relations in $E'$, then there is an obvious map $M_{S, E} \to M_{S', E'}$ commuting with the maps to $M$. Let $I$ be the set of pairs $(S, E)$ with ordering by inclusion as above. It is clear that the colimit of this directed system is $M$. \end{proof} \begin{lemma} \label{lemma-characterize-finitely-presented-module-hom} Let $R$ be a ring. Let $N$ be an $R$-module. The following are equivalent \begin{enumerate} \item $N$ is a finitely presented $R$-module, \item for any filtered colimit $M = \colim M_i$ of $R$-modules the map $\colim \Hom_R(N, M_i) \to \Hom_R(N, M)$ is bijective. \end{enumerate} \end{lemma} \begin{proof} Assume (1) and choose an exact sequence $F_{-1} \to F_0 \to N \to 0$ with $F_i$ finite free. Then we have an exact sequence $$ 0 \to \Hom_R(N, M) \to \Hom_R(F_0, M) \to \Hom_R(F_{-1}, M) $$ functorial in the $R$-module $M$. The functors $\Hom_R(F_i, M)$ commute with filtered colimits as $\Hom_R(R^{\oplus n}, M) = M^{\oplus n}$. Since filtered colimits are exact (Lemma \ref{lemma-directed-colimit-exact}) we see that (2) holds. \medskip\noindent Assume (2). By Lemma \ref{lemma-module-colimit-fp} we can write $N = \colim N_i$ as a filtered colimit such that $N_i$ is of finite presentation for all $i$. Thus $\text{id}_N$ factors through $N_i$ for some $i$. This means that $N$ is a direct summand of a finitely presented $R$-module (namely $N_i$) and hence finitely presented. \end{proof} \section{Tensor products} \label{section-tensor-product} % BEGIN ALGEBRA EDITORIAL ROUTE section-tensor-product \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-tensor-product}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-tensor-product \begin{definition} \label{definition-bilinear} Let $R$ be a ring, $M, N, P$ be three $R$-modules. A mapping $f : M \times N \to P$ (where $M \times N$ is viewed only as Cartesian product of two $R$-modules) is said to be {\it $R$-bilinear} if for each $x \in M$ the mapping $y\mapsto f(x, y)$ of $N$ into $P$ is $R$-linear, and for each $y\in N$ the mapping $x\mapsto f(x, y)$ is also $R$-linear. \end{definition} \begin{lemma} \label{lemma-tensor-product} Let $M, N$ be $R$-modules. Then there exists a pair $(T, g)$ where $T$ is an $R$-module, and $g : M \times N \to T$ an $R$-bilinear mapping, with the following universal property: For any $R$-module $P$ and any $R$-bilinear mapping $f : M \times N \to P$, there exists a unique $R$-linear mapping $\tilde{f} : T \to P$ such that $f = \tilde{f} \circ g$. In other words, the following diagram commutes: $$ \xymatrix{ M \times N \ar[rr]^f \ar[dr]_g & & P\\ & T \ar[ur]_{\tilde f} } $$ Moreover, if $(T, g)$ and $(T', g')$ are two pairs with this property, then there exists a unique isomorphism $j : T \to T'$ such that $j\circ g = g'$. \end{lemma} \noindent The $R$-module $T$ which satisfies the above universal property is called the {\it tensor product} of $R$-modules $M$ and $N$, denoted as $M \otimes_R N$. \begin{proof} We first prove the existence of such $R$-module $T$. Let $M, N$ be $R$-modules. Let $T$ be the quotient module $P/Q$, where $P$ is the free $R$-module $R^{(M \times N)}$ and $Q$ is the $R$-module generated by all elements of the following types: ($x\in M, y\in N$) \begin{align*} (x + x', y) - (x, y) - (x', y), \\ (x, y + y') - (x, y) - (x, y'), \\ (ax, y) - a(x, y), \\ (x, ay) - a(x, y) \end{align*} Let $\pi : M \times N \to T$ denote the natural map. This map is $R$-bilinear, as implied by the above relations when we check the bilinearity conditions. Denote the image by $\pi(x, y) = x \otimes y$. Then these elements generate $T$. Now let $f : M \times N \to P$ be an $R$-bilinear map, then we can define $f' : T \to P$ by extending the mapping $f'(x \otimes y) = f(x, y)$. Clearly $f = f'\circ \pi$. Moreover, $f'$ is uniquely determined by the value on the generating sets $\{x \otimes y : x\in M, y\in N\}$. Suppose there is another pair $(T', g')$ satisfying the same properties. Then there is a unique $j : T \to T'$ and also $j' : T' \to T$ such that $g' = j\circ g$, $g = j'\circ g'$. But then both the maps $(j'\circ j) \circ g$ and $g$ satisfy the universal properties, so by uniqueness they are equal, and hence $j'\circ j$ is identity on $T$. Similarly $(j\circ j') \circ g' = g'$ and $j\circ j'$ is identity on $T'$. So $j$ is an isomorphism. \end{proof} \begin{lemma} \label{lemma-flip-tensor-product} Let $M, N, P$ be $R$-modules, then the bilinear maps \begin{align*} (x, y) & \mapsto y \otimes x\\ (x + y, z) & \mapsto x \otimes z + y \otimes z\\ (r, x) & \mapsto rx \end{align*} induce unique isomorphisms \begin{align*} M \otimes_R N & \to N \otimes_R M, \\ (M\oplus N)\otimes_R P & \to (M \otimes_R P)\oplus(N \otimes_R P), \\ R \otimes_R M & \to M \end{align*} \end{lemma} \begin{proof} Omitted. \end{proof} \noindent We may generalize the tensor product of two $R$-modules to finitely many $R$-modules, and set up a correspondence between the multi-tensor product with multilinear mappings. Using almost the same construction one can prove that: \begin{lemma} \label{lemma-multilinear} Let $M_1, \ldots, M_r$ be $R$-modules. Then there exists a pair $(T, g)$ consisting of an $R$-module $T$ and an $R$-multilinear mapping $g : M_1\times \ldots \times M_r \to T$ with the universal property: For any $R$-multilinear mapping $f : M_1\times \ldots \times M_r \to P$ there exists a unique $R$-module homomorphism $f' : T \to P$ such that $f'\circ g = f$. Such a module $T$ is unique up to unique isomorphism. We denote it $M_1\otimes_R \ldots \otimes_R M_r$ and we denote the universal multilinear map $(m_1, \ldots, m_r) \mapsto m_1 \otimes \ldots \otimes m_r$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-transitive} The homomorphisms $$ (M \otimes_R N)\otimes_R P \to M \otimes_R N \otimes_R P \to M \otimes_R (N \otimes_R P) $$ such that $f((x \otimes y)\otimes z) = x \otimes y \otimes z$ and $g(x \otimes y \otimes z) = x \otimes (y \otimes z)$, $x\in M, y\in N, z\in P$ are well-defined and are isomorphisms. \end{lemma} \begin{proof} We shall prove $f$ is well-defined and is an isomorphism, and this proof carries analogously to $g$. Fix any $z\in P$, then the mapping $(x, y)\mapsto x \otimes y \otimes z$, $x\in M, y\in N$, is $R$-bilinear in $x$ and $y$, and hence induces homomorphism $f_z : M \otimes N \to M \otimes N \otimes P$ which sends $f_z(x \otimes y) = x \otimes y \otimes z$. Then consider $(M \otimes N)\times P \to M \otimes N \otimes P$ given by $(w, z)\mapsto f_z(w)$. The map is $R$-bilinear and thus induces $f : (M \otimes_R N)\otimes_R P \to M \otimes_R N \otimes_R P$ and $f((x \otimes y)\otimes z) = x \otimes y \otimes z$. To construct the inverse, we note that the map $\pi : M \times N \times P \to (M \otimes N)\otimes P$ is $R$-trilinear. Therefore, it induces an $R$-linear map $h : M \otimes N \otimes P \to (M \otimes N)\otimes P$ which agrees with the universal property. Here we see that $h(x \otimes y \otimes z) = (x \otimes y)\otimes z$. From the explicit expression of $f$ and $h$, $f\circ h$ and $h\circ f$ are identity maps of $M \otimes N \otimes P$ and $(M \otimes N)\otimes P$ respectively, hence $f$ is our desired isomorphism. \end{proof} \noindent Doing induction we see that this extends to multi-tensor products. Combined with Lemma \ref{lemma-flip-tensor-product} we see that the tensor product operation on the category of $R$-modules is associative, commutative and distributive. \begin{definition} \label{definition-bimodule} An abelian group $N$ is called an {\it $(A, B)$-bimodule} if it is both an $A$-module and a $B$-module and for all $a \in A$ and $b \in B$ the multiplication by $a$ and $b$ commute, so $b(an) = a(bn)$ for all $n \in N$. In this situation we usually write the $B$-action on the right: so for $b \in B$ and $n \in N$ the result of multiplying $n$ by $b$ is denoted $nb$. With this convention the compatibility above is that $(ax)b = a(xb)$ for all $a\in A, b\in B, x\in N$. The shorthand $_AN_B$ is used to denote an $(A, B)$-bimodule $N$. \end{definition} \begin{lemma} \label{lemma-tensor-with-bimodule} For $A$-module $M$, $B$-module $P$ and $(A, B)$-bimodule $N$, the modules $(M \otimes_A N)\otimes_B P$ and $M \otimes_A(N \otimes_B P)$ can both be given $(A, B)$-bimodule structure, and moreover $$ (M \otimes_A N)\otimes_B P \cong M \otimes_A(N \otimes_B P). $$ \end{lemma} \begin{proof} A priori $M \otimes_A N$ is an $A$-module, but we can give it a $B$-module structure by letting $$ (x \otimes y)b = x \otimes yb, \quad x\in M, y\in N, b\in B $$ Thus $M \otimes_A N$ becomes an $(A, B)$-bimodule. Similarly for $N \otimes_B P$, and thus for $(M \otimes_A N)\otimes_B P$ and $M \otimes_A(N \otimes_B P)$. By Lemma \ref{lemma-transitive}, these two modules are isomorphic both as $A$-modules and as $B$-modules via the same mapping. \end{proof} \begin{lemma} \label{lemma-hom-from-tensor-product} For any three $R$-modules $M, N, P$, $$ \Hom_R(M \otimes_R N, P) \cong \Hom_R(M, \Hom_R(N, P)) $$ \end{lemma} \begin{proof} An $R$-linear map $\hat{f}\in \Hom_R(M \otimes_R N, P)$ corresponds to an $R$-bilinear map $f : M \times N \to P$. For each $x\in M$ the mapping $y\mapsto f(x, y)$ is $R$-linear by the universal property. Thus $f$ corresponds to a map $\phi_f : M \to \Hom_R(N, P)$. This map is $R$-linear since $$ \phi_f(ax + y)(z) = f(ax + y, z) = af(x, z)+f(y, z) = (a\phi_f(x)+\phi_f(y))(z), $$ for all $a \in R$, $x \in M$, $y \in M$ and $z \in N$. Conversely, any $f \in \Hom_R(M, \Hom_R(N, P))$ defines an $R$-bilinear map $M \times N \to P$, namely $(x, y)\mapsto f(x)(y)$. So this is a natural one-to-one correspondence between the two modules $\Hom_R(M \otimes_R N, P)$ and $\Hom_R(M, \Hom_R(N, P))$. \end{proof} \begin{lemma}[Tensor products commute with colimits] \label{lemma-tensor-products-commute-with-limits} Let $(M_i, \mu_{ij})$ be a system over the preordered set $I$. Let $N$ be an $R$-module. Then $$ \colim (M_i \otimes N) \cong (\colim M_i)\otimes N. $$ Moreover, the isomorphism is induced by the homomorphisms $\mu_i \otimes 1: M_i \otimes N \to M \otimes N$ where $M = \colim_i M_i$ with natural maps $\mu_i : M_i \to M$. \end{lemma} \begin{proof} First proof. The functor $M' \mapsto M' \otimes_R N$ is left adjoint to the functor $N' \mapsto \Hom_R(N, N')$ by Lemma \ref{lemma-hom-from-tensor-product}. Thus $M' \mapsto M' \otimes_R N$ commutes with all colimits, see Categories, Lemma \ref{categories-lemma-adjoint-exact}. \medskip\noindent Second direct proof. Let $P = \colim (M_i \otimes N)$ with coprojections $\lambda_i : M_i \otimes N \to P$. Let $M = \colim M_i$ with coprojections $\mu_i : M_i \to M$. Then for all $i\leq j$, the following diagram commutes: $$ \xymatrix{ M_i \otimes N \ar[r]_{\mu_i \otimes 1} \ar[d]_{\mu_{ij} \otimes 1} & M \otimes N \ar[d]^{\text{id}} \\ M_j \otimes N \ar[r]^{\mu_j \otimes 1} & M \otimes N } $$ By Lemma \ref{lemma-homomorphism-limit} these maps induce a unique homomorphism $\psi : P \to M \otimes N$ such that $\mu_i \otimes 1 = \psi \circ \lambda_i$. \medskip\noindent To construct the inverse map, for each $i\in I$, there is the canonical $R$-bilinear mapping $g_i : M_i \times N \to M_i \otimes N$. This induces a unique mapping $\widehat{\phi} : M \times N \to P$ such that $\widehat{\phi} \circ (\mu_i \times 1) = \lambda_i \circ g_i$. It is $R$-bilinear. Thus it induces an $R$-linear mapping $\phi : M \otimes N \to P$. From the commutative diagram below: $$ \xymatrix{ M_i \times N \ar[r]^{g_i} \ar[d]^{\mu_i \times \text{id}} & M_i \otimes N\ar[r]_{\text{id}} \ar[d]_{\lambda_i} & M_i \otimes N \ar[d]_{\mu_i \otimes \text{id}} \ar[rd]^{\lambda_i} \\ M \times N \ar[r]^{\widehat{\phi}} & P \ar[r]^{\psi} & M \otimes N \ar[r]^{\phi} & P } $$ we see that $\psi\circ\widehat{\phi} = g$, the canonical $R$-bilinear mapping $g : M \times N \to M \otimes N$. So $\psi\circ\phi$ is identity on $M \otimes N$. From the right-hand square and triangle, $\phi\circ\psi$ is also identity on $P$. \end{proof} \begin{lemma} \label{lemma-tensor-product-exact} Let \begin{align*} M_1\xrightarrow{f} M_2\xrightarrow{g} M_3 \to 0 \end{align*} be an exact sequence of $R$-modules and homomorphisms, and let $N$ be any $R$-module. Then the sequence \begin{equation} \label{equation-2ndex} M_1\otimes N\xrightarrow{f \otimes 1} M_2\otimes N \xrightarrow{g \otimes 1} M_3\otimes N \to 0 \end{equation} is exact. In other words, the functor $- \otimes_R N$ is {\it right exact}, in the sense that tensoring each term in the original right exact sequence preserves the exactness. \end{lemma} \begin{proof} For every $R$-module $P$ we apply the functor $\Hom(-, \Hom(N, P))$ to the first exact sequence. We obtain $$ 0 \to \Hom(M_3, \Hom(N, P)) \to \Hom(M_2, \Hom(N, P)) \to \Hom(M_1, \Hom(N, P)) $$ which is exact by Lemma \ref{lemma-hom-exact} (1). By Lemma \ref{lemma-hom-from-tensor-product} this becomes the sequence $$ 0 \to \Hom(M_3 \otimes N, P) \to \Hom(M_2 \otimes N, P) \to \Hom(M_1 \otimes N, P) $$ which is therefore also exact. Then using Lemma \ref{lemma-hom-exact} (1) again, we arrive at the desired exact sequence. \end{proof} \begin{remark} \label{remark-tensor-product-not-exact} However, tensor product does NOT preserve exact sequences in general. In other words, if $M_1 \to M_2 \to M_3$ is exact, then it is not necessarily true that $M_1 \otimes N \to M_2 \otimes N \to M_3 \otimes N$ is exact for arbitrary $R$-module $N$. \end{remark} \begin{example} \label{example-tensor-product-not-exact} Consider the injective map $2 : \mathbf{Z}\to \mathbf{Z}$ viewed as a map of $\mathbf{Z}$-modules. Let $N = \mathbf{Z}/2$. Then the induced map $\mathbf{Z} \otimes \mathbf{Z}/2 \to \mathbf{Z} \otimes \mathbf{Z}/2$ is NOT injective. This is because for $x \otimes y\in \mathbf{Z} \otimes \mathbf{Z}/2$, $$ (2 \otimes 1)(x \otimes y) = 2x \otimes y = x \otimes 2y = x \otimes 0 = 0 $$ Therefore the induced map is the zero map while $\mathbf{Z} \otimes N\neq 0$. \end{example} \begin{remark} \label{remark-flat-module} For $R$-modules $N$, if the functor $-\otimes_R N$ is exact, i.e. tensoring with $N$ preserves all exact sequences, then $N$ is said to be a {\it flat} $R$-module. We will discuss this later in Section \ref{section-flat}. \end{remark} \begin{lemma} \label{lemma-tensor-finiteness} Let $R$ be a ring. Let $M$ and $N$ be $R$-modules. \begin{enumerate} \item If $N$ and $M$ are finite, then so is $M \otimes_R N$. \item If $N$ and $M$ are finitely presented, then so is $M \otimes_R N$. \end{enumerate} \end{lemma} \begin{proof} Suppose $M$ is finite. Then choose a presentation $0 \to K \to R^{\oplus n} \to M \to 0$. This gives an exact sequence $K \otimes_R N \to N^{\oplus n} \to M \otimes_R N \to 0$ by Lemma \ref{lemma-tensor-product-exact}. We conclude that if $N$ is finite too then $M \otimes_R N$ is a quotient of a finite module, hence finite, see Lemma \ref{lemma-extension}. Similarly, if both $N$ and $M$ are finitely presented, then we see that $K$ is finite and that $M \otimes_R N$ is a quotient of the finitely presented module $N^{\oplus n}$ by a finite module, namely $K \otimes_R N$, and hence finitely presented, see Lemma \ref{lemma-extension}. \end{proof} \begin{lemma} \label{lemma-tensor-localization} Let $M$ be an $R$-module. Then the $S^{-1}R$-modules $S^{-1}M$ and $S^{-1}R \otimes_R M$ are canonically isomorphic, and the canonical isomorphism $f : S^{-1}R \otimes_R M \to S^{-1}M$ is given by $$ f((a/s) \otimes m) = am/s, \forall a \in R, m \in M, s \in S $$ \end{lemma} \begin{proof} Obviously, the map $f' : S^{-1}R \times M \to S^{-1}M$ given by $f'(a/s, m) = am/s$ is bilinear, and thus by the universal property, this map induces a unique $S^{-1}R$-module homomorphism $f : S^{-1}R \otimes_R M \to S^{-1}M$ as in the statement of the lemma. Actually every element in $S^{-1}M$ is of the form $m/s$, $m\in M, s\in S$ and every element in $S^{-1}R \otimes_R M$ is of the form $1/s \otimes m$. To see the latter fact, write an element in $S^{-1}R \otimes_R M$ as $$ \sum_k \frac{a_k}{s_k} \otimes m_k = \sum_k \frac{a_k t_k}{s} \otimes m_k = \frac{1}{s} \otimes \sum_k {a_k t_k}m_k = \frac{1}{s} \otimes m $$ Here $m = \sum_k {a_k t_k}m_k$. Then it is obvious that $f$ is surjective, and if $f(\frac{1}{s} \otimes m) = m/s = 0$ then there exists $t \in S$ with $tm = 0$ in $M$. Then we have $$ \frac{1}{s} \otimes m = \frac{1}{st} \otimes tm = \frac{1}{st} \otimes 0 = 0 $$ Therefore $f$ is injective. \end{proof} \begin{lemma} \label{lemma-tensor-product-localization} Let $M, N$ be $R$-modules, then there is a canonical $S^{-1}R$-module isomorphism $f : S^{-1}M \otimes_{S^{-1}R}S^{-1}N \to S^{-1}(M \otimes_R N)$, given by $$ f((m/s)\otimes(n/t)) = (m \otimes n)/st $$ \end{lemma} \begin{proof} We may use Lemma \ref{lemma-tensor-with-bimodule} and Lemma \ref{lemma-tensor-localization} repeatedly to see that these two $S^{-1}R$-modules are isomorphic, noting that $S^{-1}R$ is an $(R, S^{-1}R)$-bimodule: \begin{align*} S^{-1}(M \otimes_R N) & \cong S^{-1}R \otimes_R (M \otimes_R N)\\ & \cong S^{-1}M \otimes_R N\\ & \cong (S^{-1}M \otimes_{S^{-1}R}S^{-1}R)\otimes_R N\\ & \cong S^{-1}M \otimes_{S^{-1}R}(S^{-1}R \otimes_R N)\\ & \cong S^{-1}M \otimes_{S^{-1}R}S^{-1}N \end{align*} This isomorphism is easily seen to be the one stated in the lemma. \end{proof} \section{Tensor algebra} \label{section-tensor-algebra} % BEGIN ALGEBRA EDITORIAL ROUTE section-tensor-algebra \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-tensor-algebra}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-tensor-algebra \noindent Let $R$ be a ring. Let $M$ be an $R$-module. We define the {\it tensor algebra of $M$ over $R$} to be the noncommutative $R$-algebra $$ \text{T}(M) = \text{T}_R(M) = \bigoplus\nolimits_{n \geq 0} \text{T}^n(M) $$ with $\text{T}^0(M) = R$, $\text{T}^1(M) = M$, $\text{T}^2(M) = M \otimes_R M$, $\text{T}^3(M) = M \otimes_R M \otimes_R M$, and so on. Multiplication is defined by the rule that on pure tensors we have $$ (x_1 \otimes x_2 \otimes \ldots \otimes x_n) \cdot (y_1 \otimes y_2 \otimes \ldots \otimes y_m) = x_1 \otimes x_2 \otimes \ldots \otimes x_n \otimes y_1 \otimes y_2 \otimes \ldots \otimes y_m $$ and we extend this by linearity. \medskip\noindent We define the {\it exterior algebra $\wedge(M)$ of $M$ over $R$} to be the quotient of $\text{T}(M)$ by the two sided ideal generated by the elements $x \otimes x \in \text{T}^2(M)$. The image of a pure tensor $x_1 \otimes \ldots \otimes x_n$ in $\wedge^n(M)$ is denoted $x_1 \wedge \ldots \wedge x_n$. These elements generate $\wedge^n(M)$, they are $R$-linear in each $x_i$ and they are zero when two of the $x_i$ are equal (i.e., they are alternating as functions of $x_1, x_2, \ldots, x_n$). The multiplication on $\wedge(M)$ is graded commutative, i.e., every $x \in M$ and $y \in M$ satisfy $x \wedge y = - y \wedge x$. \medskip\noindent An example of this is when $M = Rx_1 \oplus \ldots \oplus Rx_n$ is a finite free module. In this case $\wedge(M)$ is free over $R$ with basis the elements $$ x_{i_1} \wedge \ldots \wedge x_{i_r} $$ with $0 \leq r \leq n$ and $1 \leq i_1 < i_2 < \ldots < i_r \leq n$. \medskip\noindent We define the {\it symmetric algebra $\text{Sym}(M)$ of $M$ over $R$} to be the quotient of $\text{T}(M)$ by the two sided ideal generated by the elements $x \otimes y - y \otimes x \in \text{T}^2(M)$. The image of a pure tensor $x_1 \otimes \ldots \otimes x_n$ in $\text{Sym}^n(M)$ is denoted just $x_1 \ldots x_n$. These elements generate $\text{Sym}^n(M)$, these are $R$-linear in each $x_i$ and $x_1 \ldots x_n = x_1' \ldots x_n'$ if the sequence of elements $x_1, \ldots, x_n$ is a permutation of the sequence $x_1', \ldots, x_n'$. Thus we see that $\text{Sym}(M)$ is commutative. \medskip\noindent An example of this is when $M = Rx_1 \oplus \ldots \oplus Rx_n$ is a finite free module. In this case $\text{Sym}(M) = R[x_1, \ldots, x_n]$ is a polynomial algebra. \begin{lemma} \label{lemma-free-tensor-algebra} Let $R$ be a ring. Let $M$ be an $R$-module. If $M$ is a free $R$-module, so is each symmetric and exterior power. \end{lemma} \begin{proof} Omitted, but see above for the finite free case. \end{proof} \begin{lemma} \label{lemma-presentation-sym-exterior} Let $R$ be a ring. Let $M_2 \to M_1 \to M \to 0$ be an exact sequence of $R$-modules. There are exact sequences $$ M_2 \otimes_R \text{Sym}^{n - 1}(M_1) \to \text{Sym}^n(M_1) \to \text{Sym}^n(M) \to 0 $$ and similarly $$ M_2 \otimes_R \wedge^{n - 1}(M_1) \to \wedge^n(M_1) \to \wedge^n(M) \to 0 $$ \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-present-sym-wedge} Let $R$ be a ring. Let $M$ be an $R$-module. Let $x_i$, $i \in I$ be a given system of generators of $M$ as an $R$-module. Let $n \geq 2$. There exists a canonical exact sequence $$ \bigoplus_{1 \leq j_1 < j_2 \leq n} \bigoplus_{i_1, i_2 \in I} \text{T}^{n - 2}(M) \oplus \bigoplus_{1 \leq j_1 < j_2 \leq n} \bigoplus_{i \in I} \text{T}^{n - 2}(M) \to \text{T}^n(M) \to \wedge^n(M) \to 0 $$ where the pure tensor $m_1 \otimes \ldots \otimes m_{n - 2}$ in the first summand maps to \begin{align*} \underbrace{ m_1 \otimes \ldots \otimes x_{i_1} \otimes \ldots \otimes x_{i_2} \otimes \ldots \otimes m_{n - 2} }_{\text{with } x_{i_1} \text{ and } x_{i_2} \text{ occupying slots } j_1 \text{ and } j_2 \text{ in the tensor}} \\ + \underbrace{ m_1 \otimes \ldots \otimes x_{i_2} \otimes \ldots \otimes x_{i_1} \otimes \ldots \otimes m_{n - 2} }_{\text{with } x_{i_2} \text{ and } x_{i_1} \text{ occupying slots } j_1 \text{ and } j_2 \text{ in the tensor}} \end{align*} and $m_1 \otimes \ldots \otimes m_{n - 2}$ in the second summand maps to $$ \underbrace{ m_1 \otimes \ldots \otimes x_i \otimes \ldots \otimes x_i \otimes \ldots \otimes m_{n - 2} }_{\text{with } x_{i} \text{ and } x_{i} \text{ occupying slots } j_1 \text{ and } j_2 \text{ in the tensor}} $$ There is also a canonical exact sequence $$ \bigoplus_{1 \leq j_1 < j_2 \leq n} \bigoplus_{i_1, i_2 \in I} \text{T}^{n - 2}(M) \to \text{T}^n(M) \to \text{Sym}^n(M) \to 0 $$ where the pure tensor $m_1 \otimes \ldots \otimes m_{n - 2}$ maps to \begin{align*} \underbrace{ m_1 \otimes \ldots \otimes x_{i_1} \otimes \ldots \otimes x_{i_2} \otimes \ldots \otimes m_{n - 2} }_{\text{with } x_{i_1} \text{ and } x_{i_2} \text{ occupying slots } j_1 \text{ and } j_2 \text{ in the tensor}} \\ - \underbrace{ m_1 \otimes \ldots \otimes x_{i_2} \otimes \ldots \otimes x_{i_1} \otimes \ldots \otimes m_{n - 2} }_{\text{with } x_{i_2} \text{ and } x_{i_1} \text{ occupying slots } j_1 \text{ and } j_2 \text{ in the tensor}} \end{align*} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-present-wedge} Let $A \to B$ be a ring map. Let $M$ be a $B$-module. Let $n > 1$. The kernel of the $A$-linear map $M \otimes_A \ldots \otimes_A M \to \wedge^n_B(M)$ is generated as an $A$-module by the elements $m_1 \otimes \ldots \otimes m_n$ with $m_i = m_j$ for $i \not = j$, $m_1, \ldots, m_n \in M$ and the elements $m_1 \otimes \ldots \otimes bm_i \otimes \ldots \otimes m_n - m_1 \otimes \ldots \otimes bm_j \otimes \ldots \otimes m_n$ for $i \not = j$, $m_1, \ldots, m_n \in M$, and $b \in B$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-colimit-tensor-algebra} \begin{slogan} Taking tensor algebras commutes with filtered colimits. \end{slogan} Let $R$ be a ring. Let $M_i$ be a directed system of $R$-modules. Then $\colim_i \text{T}(M_i) = \text{T}(\colim_i M_i)$ and similarly for the symmetric and exterior algebras. \end{lemma} \begin{proof} Omitted. Hint: Apply Lemma \ref{lemma-tensor-products-commute-with-limits}. \end{proof} \begin{lemma} \label{lemma-tensor-algebra-localization} Let $R$ be a ring and let $S \subset R$ be a multiplicative subset. Then $S^{-1}\text{T}_R(M) = \text{T}_{S^{-1}R}(S^{-1}M)$ for any $R$-module $M$. Similarly for symmetric and exterior algebras. \end{lemma} \begin{proof} Omitted. Hint: Apply Lemma \ref{lemma-tensor-product-localization}. \end{proof} \section{Base change} \label{section-base-change} \noindent We formally introduce base change in algebra as follows. \begin{definition} \label{definition-base-change} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Let $R \to R'$ be any ring map. The {\it base change} of $\varphi$ by $R \to R'$ is the ring map $R' \to S \otimes_R R'$. In this situation we often write $S' = S \otimes_R R'$. The {\it base change} of the $S$-module $M$ is the $S'$-module $M \otimes_R R'$. \end{definition} \noindent If $S = R[x_i]/(f_j)$ for some collection of variables $x_i$, $i \in I$ and some collection of polynomials $f_j \in R[x_i]$, $j \in J$, then $S \otimes_R R' = R'[x_i]/(f'_j)$, where $f'_j \in R'[x_i]$ is the image of $f_j$ under the map $R[x_i] \to R'[x_i]$ induced by $R \to R'$. This simple remark is the key to understanding base change. \begin{lemma} \label{lemma-base-change-finiteness} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Let $R \to R'$ be a ring map and let $S' = S \otimes_R R'$ and $M' = M \otimes_R R'$ be the base changes. \begin{enumerate} \item If $M$ is a finite $S$-module, then the base change $M'$ is a finite $S'$-module. \item If $M$ is an $S$-module of finite presentation, then the base change $M'$ is an $S'$-module of finite presentation. \item If $R \to S$ is of finite type, then the base change $R' \to S'$ is of finite type. \item If $R \to S$ is of finite presentation, then the base change $R' \to S'$ is of finite presentation. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Take a surjective, $S$-linear map $S^{\oplus n} \to M \to 0$. By Lemma \ref{lemma-flip-tensor-product} and \ref{lemma-tensor-product-exact} the result after tensoring with $R^\prime$ is a surjection ${S^\prime}^{\oplus n} \to M^\prime \rightarrow 0$, so $M^\prime$ is a finitely generated $S^\prime$-module. Proof of (2). Take a presentation $S^{\oplus m} \to S^{\oplus n} \to M \to 0$. By Lemma \ref{lemma-flip-tensor-product} and \ref{lemma-tensor-product-exact} the result after tensoring with $R^\prime$ gives a finite presentation ${S^\prime}^{\oplus m} \to {S^\prime}^{\oplus n} \to M^\prime \to 0$, of the $S^\prime$-module $M^\prime$. Proof of (3). This follows by the remark preceding the lemma as we can take $I$ to be finite by assumption. Proof of (4). This follows by the remark preceding the lemma as we can take $I$ and $J$ to be finite by assumption. \end{proof} \noindent Let $\varphi : R \to S$ be a ring map. Given an $S$-module $N$ we obtain an $R$-module $N_R$ by the rule $r \cdot n = \varphi(r)n$. This is sometimes called the {\it restriction} of $N$ to $R$. \begin{lemma} \label{lemma-adjoint-tensor-restrict} Let $R \to S$ be a ring map. The functors $\text{Mod}_S \to \text{Mod}_R$, $N \mapsto N_R$ (restriction) and $\text{Mod}_R \to \text{Mod}_S$, $M \mapsto M \otimes_R S$ (base change) are adjoint functors. In a formula $$ \Hom_R(M, N_R) = \Hom_S(M \otimes_R S, N) $$ \end{lemma} \begin{proof} If $\alpha : M \to N_R$ is an $R$-module map, then we define $\alpha' : M \otimes_R S \to N$ by the rule $\alpha'(m \otimes s) = s\alpha(m)$. If $\beta : M \otimes_R S \to N$ is an $S$-module map, we define $\beta' : M \to N_R$ by the rule $\beta'(m) = \beta(m \otimes 1)$. We omit the verification that these constructions are mutually inverse. \end{proof} \noindent The lemma above tells us that restriction has a left adjoint, namely base change. It also has a right adjoint. \begin{lemma} \label{lemma-adjoint-hom-restrict} Let $R \to S$ be a ring map. The functors $\text{Mod}_S \to \text{Mod}_R$, $N \mapsto N_R$ (restriction) and $\text{Mod}_R \to \text{Mod}_S$, $M \mapsto \Hom_R(S, M)$ are adjoint functors. In a formula $$ \Hom_R(N_R, M) = \Hom_S(N, \Hom_R(S, M)) $$ \end{lemma} \begin{proof} If $\alpha : N_R \to M$ is an $R$-module map, then we define $\alpha' : N \to \Hom_R(S, M)$ by the rule $\alpha'(n) = (s \mapsto \alpha(sn))$. If $\beta : N \to \Hom_R(S, M)$ is an $S$-module map, we define $\beta' : N_R \to M$ by the rule $\beta'(n) = \beta(n)(1)$. We omit the verification that these constructions are mutually inverse. \end{proof} \begin{lemma} \label{lemma-hom-from-tensor-product-variant} Let $R \to S$ be a ring map. Given $S$-modules $M, N$ and an $R$-module $P$ we have $$ \Hom_R(M \otimes_S N, P) = \Hom_S(M, \Hom_R(N, P)) $$ \end{lemma} \begin{proof} This can be proved directly, but it is also a consequence of Lemmas \ref{lemma-adjoint-hom-restrict} and \ref{lemma-hom-from-tensor-product}. Namely, we have \begin{align*} \Hom_R(M \otimes_S N, P) & = \Hom_S(M \otimes_S N, \Hom_R(S, P)) \\ & = \Hom_S(M, \Hom_S(N, \Hom_R(S, P))) \\ & = \Hom_S(M, \Hom_R(N, P)) \end{align*} as desired. \end{proof} \section{Miscellany} \label{section-miscellany} \noindent The proofs in this section should not refer to any results except those from the section on basic notions, Section \ref{section-rings-basic}. \begin{lemma} \label{lemma-product-ideals-in-prime} Let $R$ be a ring, $I$ and $J$ two ideals and $\mathfrak p$ a prime ideal containing the product $IJ$. Then $\mathfrak{p}$ contains $I$ or $J$. \end{lemma} \begin{proof} Assume the contrary and take $x \in I \setminus \mathfrak p$ and $y \in J \setminus \mathfrak p$. Their product is an element of $IJ \subset \mathfrak p$, which contradicts the assumption that $\mathfrak p$ was prime. \end{proof} \begin{lemma}[Prime avoidance] \label{lemma-silly} \begin{slogan} 1. In an affine scheme if a finite number of points are contained in an open subset then they are contained in a smaller principal open subset. 2. Affine opens are cofinal among the neighborhoods of a given finite set of an affine scheme \end{slogan} Let $R$ be a ring. Let $I_i \subset R$, $i = 1, \ldots, r$, and $J \subset R$ be ideals. Assume \begin{enumerate} \item $J \not\subset I_i$ for $i = 1, \ldots, r$, and \item all but two of $I_i$ are prime ideals. \end{enumerate} Then there exists an $x \in J$, $x\not\in I_i$ for all $i$. \end{lemma} \begin{proof} The result is true for $r = 1$. If $r = 2$, then let $x, y \in J$ with $x \not \in I_1$ and $y \not \in I_2$. We are done unless $x \in I_2$ and $y \in I_1$. Then the element $x + y$ cannot be in $I_1$ (since that would mean $x + y - y \in I_1$) and it also cannot be in $I_2$. \medskip\noindent For $r \geq 3$, assume the result holds for $r - 1$. After renumbering we may assume that $I_r$ is prime. We may also assume there are no inclusions among the $I_i$. Pick $x \in J$, $x \not \in I_i$ for all $i = 1, \ldots, r - 1$. If $x \not\in I_r$ we are done. So assume $x \in I_r$. If $J I_1 \ldots I_{r - 1} \subset I_r$ then $J \subset I_r$ (by Lemma \ref{lemma-product-ideals-in-prime}) a contradiction. Pick $y \in J I_1 \ldots I_{r - 1}$, $y \not \in I_r$. Then $x + y$ works. \end{proof} \begin{lemma} \label{lemma-silly-silly} Let $R$ be a ring. Let $x \in R$, $I \subset R$ an ideal, and $\mathfrak p_i$, $i = 1, \ldots, r$ be prime ideals. Suppose that $x + I \not \subset \mathfrak p_i$ for $i = 1, \ldots, r$. Then there exists a $y \in I$ such that $x + y \not \in \mathfrak p_i$ for all $i$. \end{lemma} \begin{proof} We may assume there are no inclusions among the $\mathfrak p_i$. After reordering we may assume $x \not \in \mathfrak p_i$ for $i < s$ and $x \in \mathfrak p_i$ for $i \geq s$. If $s = r + 1$ then we are done. If not, then we can find $y \in I$ with $y \not \in \mathfrak p_s$. Choose $f \in \bigcap_{i < s} \mathfrak p_i$ with $f \not \in \mathfrak p_s$. Then $x + fy$ does not belong to any of $\mathfrak p_1, \ldots, \mathfrak p_s$. Thus we win by induction on $s$. \end{proof} \begin{lemma}[Chinese remainder] \label{lemma-chinese-remainder} Let $R$ be a ring. \begin{enumerate} \item If $I_1, \ldots, I_r$ are ideals such that $I_a + I_b = R$ when $a \not = b$, then $I_1 \cap \ldots \cap I_r = I_1I_2\ldots I_r$ and $R/(I_1I_2\ldots I_r) \cong R/I_1 \times \ldots \times R/I_r$. \item If $\mathfrak m_1, \ldots, \mathfrak m_r$ are pairwise distinct maximal ideals then $\mathfrak m_a + \mathfrak m_b = R$ for $a \not = b$ and the above applies. \end{enumerate} \end{lemma} \begin{proof} Let us first prove $I_1 \cap \ldots \cap I_r = I_1 \ldots I_r$ as this will also imply the injectivity of the induced ring homomorphism $R/(I_1 \ldots I_r) \rightarrow R/I_1 \times \ldots \times R/I_r$. The inclusion $I_1 \cap \ldots \cap I_r \supset I_1 \ldots I_r$ is always fulfilled since ideals are closed under multiplication with arbitrary ring elements. To prove the other inclusion, we claim that the ideals $$ I_1 \ldots \hat I_i \ldots I_r,\quad i = 1, \ldots, r $$ generate the ring $R$. We prove this by induction on $r$. It holds when $r = 2$. If $r > 2$, then we see that $R$ is the sum of the ideals $I_1 \ldots \hat I_i \ldots I_{r - 1}$, $i = 1, \ldots, r - 1$. Hence $I_r$ is the sum of the ideals $I_1 \ldots \hat I_i \ldots I_r$, $i = 1, \ldots, r - 1$. Applying the same argument with the reverse ordering on the ideals we see that $I_1$ is the sum of the ideals $I_1 \ldots \hat I_i \ldots I_r$, $i = 2, \ldots, r$. Since $R = I_1 + I_r$ by assumption we see that $R$ is the sum of the ideals displayed above. Therefore we can find elements $a_i \in I_1 \ldots \hat I_i \ldots I_r$ such that their sum is one. Multiplying this equation by an element of $I_1 \cap \ldots \cap I_r$ gives the other inclusion. It remains to show that the canonical map $R/(I_1 \ldots I_r) \rightarrow R/I_1 \times \ldots \times R/I_r$ is surjective. For this, consider its action on the equation $1 = \sum_{i=1}^r a_i$ we derived above. On the one hand, a ring morphism sends 1 to 1 and on the other hand, the image of any $a_i$ is zero in $R/I_j$ for $j \neq i$. Therefore, the image of $a_i$ in $R/I_i$ is the identity. So given any element $(\bar{b_1}, \ldots, \bar{b_r}) \in R/I_1 \times \ldots \times R/I_r$, the element $\sum_{i=1}^r a_i \cdot b_i$ is an inverse image in $R$. \medskip\noindent To see (2), by the very definition of being distinct maximal ideals, we have $\mathfrak{m}_a + \mathfrak{m}_b = R$ for $a \neq b$ and so the above applies. \end{proof} \begin{lemma} \label{lemma-matrix-left-inverse} Let $R$ be a ring. Let $n \geq m$. Let $A$ be an $n \times m$ matrix with coefficients in $R$. Let $J \subset R$ be the ideal generated by the $m \times m$ minors of $A$. \begin{enumerate} \item For any $f \in J$ there exists a $m \times n$ matrix $B$ such that $BA = f 1_{m \times m}$. \item If $f \in R$ and $BA = f 1_{m \times m}$ for some $m \times n$ matrix $B$, then $f^m \in J$. \end{enumerate} \end{lemma} \begin{proof} For $I \subset \{1, \ldots, n\}$ with $|I| = m$, we denote by $E_I$ the $m \times n$ matrix of the projection $$ R^{\oplus n} = \bigoplus\nolimits_{i \in \{1, \ldots, n\}} R \longrightarrow \bigoplus\nolimits_{i \in I} R $$ and set $A_I = E_I A$, i.e., $A_I$ is the $m \times m$ matrix whose rows are the rows of $A$ with indices in $I$. Let $B_I$ be the adjugate (transpose of cofactor) matrix to $A_I$, i.e., such that $A_I B_I = B_I A_I = \det(A_I) 1_{m \times m}$. The $m \times m$ minors of $A$ are the determinants $\det A_I$ for all the $I \subset \{1, \ldots, n\}$ with $|I| = m$. If $f \in J$ then we can write $f = \sum c_I \det(A_I)$ for some $c_I \in R$. Set $B = \sum c_I B_I E_I$ to see that (1) holds. \medskip\noindent If $f 1_{m \times m} = BA$ then by the Cauchy-Binet formula (\ref{item-cauchy-binet}) we have $f^m = \sum b_I \det(A_I)$ where $b_I$ is the determinant of the $m \times m$ matrix whose columns are the columns of $B$ with indices in $I$. \end{proof} \begin{lemma} \label{lemma-matrix-right-inverse} Let $R$ be a ring. Let $n \geq m$. Let $A = (a_{ij})$ be an $n \times m$ matrix with coefficients in $R$, written in block form as $$ A = \left( \begin{matrix} A_1 \\ A_2 \end{matrix} \right) $$ where $A_1$ has size $m \times m$. Let $B$ be the adjugate (transpose of cofactor) matrix to $A_1$. Then $$ AB = \left( \begin{matrix} f 1_{m \times m} \\ C \end{matrix} \right) $$ where $f = \det(A_1)$ and $c_{ij}$ is (up to sign) the determinant of the $m \times m$ minor of $A$ corresponding to the rows $1, \ldots, \hat j, \ldots, m, i$. \end{lemma} \begin{proof} Since the adjugate has the property $A_1B = B A_1 = fI_m$ the first block of the expression for $AB$ is correct. Note that $$ c_{ij} = \sum\nolimits_k a_{ik}b_{kj} = \sum (-1)^{j + k}a_{ik} \det(A_1^{jk}) $$ where $A_1^{jk}$ means $A_1$ with the $j$th row and $k$th column removed. This last expression is the row expansion of the determinant of the matrix in the statement of the lemma. \end{proof} \begin{lemma} \label{lemma-map-cannot-be-injective} \begin{slogan} A map of finite free modules cannot be injective if the source has rank bigger than the target. \end{slogan} Let $R$ be a nonzero ring. Let $n \geq 1$. Let $M$ be an $R$-module generated by $< n$ elements. Then any $R$-module map $f : R^{\oplus n} \to M$ has a nonzero kernel. \end{lemma} \begin{proof} Choose a surjection $R^{\oplus n - 1} \to M$. We may lift the map $f$ to a map $f' : R^{\oplus n} \to R^{\oplus n - 1}$ (Lemma \ref{lemma-lift-map}). It suffices to prove $f'$ has a nonzero kernel. The map $f' : R^{\oplus n} \to R^{\oplus n - 1}$ is given by a matrix $A = (a_{ij})$. If one of the $a_{ij}$ is not nilpotent, say $a = a_{ij}$ is not, then we can replace $R$ by the localization $R_a$ and we may assume $a_{ij}$ is a unit. Since if we find a nonzero kernel after localization then there was a nonzero kernel to start with as localization is exact, see Proposition \ref{proposition-localization-exact}. In this case we can make a change of basis in both $R^{\oplus n}$ and $R^{\oplus n - 1}$ and reduce to the case where $$ A = \left( \begin{matrix} 1 & 0 & 0 & \ldots \\ 0 & a_{22} & a_{23} & \ldots \\ 0 & a_{32} & \ldots \\ \ldots & \ldots \end{matrix} \right) $$ Hence in this case we win by induction on $n$. If not then each $a_{ij}$ is nilpotent. Set $I = (a_{ij}) \subset R$. Note that $I^{m + 1} = 0$ for some $m \geq 0$. Let $m$ be the largest integer such that $I^m \not = 0$. Then we see that $(I^m)^{\oplus n}$ is contained in the kernel of the map and we win. \end{proof} \begin{lemma} \label{lemma-rank} \begin{slogan} The rank of a finite free module is well defined. \end{slogan} Let $R$ be a nonzero ring. Let $n, m \geq 0$ be integers. If $R^{\oplus n}$ is isomorphic to $R^{\oplus m}$ as $R$-modules, then $n = m$. \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-map-cannot-be-injective}. \end{proof} \section{Cayley-Hamilton} \label{section-cayley-hamilton} % BEGIN ALGEBRA EDITORIAL ROUTE section-cayley-hamilton \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-cayley-hamilton}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-cayley-hamilton \begin{lemma} \label{lemma-charpoly} Let $R$ be a ring. Let $A = (a_{ij})$ be an $n \times n$ matrix with coefficients in $R$. Let $P(x) \in R[x]$ be the characteristic polynomial of $A$ (defined as $\det(x\text{id}_{n \times n} - A)$). Then $P(A) = 0$ in $\text{Mat}(n \times n, R)$. \end{lemma} \begin{proof} We reduce the question to the well-known Cayley-Hamilton theorem from linear algebra in several steps: \begin{enumerate} \item If $\phi :S \rightarrow R$ is a ring morphism and $b_{ij}$ are inverse images of the $a_{ij}$ under this map, then it suffices to show the statement for $S$ and $(b_{ij})$ since $\phi$ is a ring morphism. \item If $\psi :R \hookrightarrow S$ is an injective ring morphism, it clearly suffices to show the result for $S$ and the $a_{ij}$ considered as elements of $S$. \item Thus we may first reduce to the case $R = \mathbf{Z}[X_{ij}]$, $a_{ij} = X_{ij}$ of a polynomial ring and then further to the case $R = \mathbf{Q}(X_{ij})$ where we may finally apply Cayley-Hamilton. \end{enumerate} \end{proof} \begin{lemma} \label{lemma-charpoly-module} Let $R$ be a ring. Let $M$ be a finite $R$-module. Let $\varphi : M \to M$ be an endomorphism. Then there exists a monic polynomial $P \in R[T]$ such that $P(\varphi) = 0$ as an endomorphism of $M$. \end{lemma} \begin{proof} Choose a surjective $R$-module map $R^{\oplus n} \to M$, given by $(a_1, \ldots, a_n) \mapsto \sum a_ix_i$ for some generators $x_i \in M$. Choose $(a_{i1}, \ldots, a_{in}) \in R^{\oplus n}$ such that $\varphi(x_i) = \sum a_{ij} x_j$. In other words the diagram $$ \xymatrix{ R^{\oplus n} \ar[d]_A \ar[r] & M \ar[d]^\varphi \\ R^{\oplus n} \ar[r] & M } $$ is commutative where $A = (a_{ij})$. By Lemma \ref{lemma-charpoly} there exists a monic polynomial $P$ such that $P(A) = 0$. Then it follows that $P(\varphi) = 0$. \end{proof} \begin{lemma} \label{lemma-charpoly-module-ideal} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be a finite $R$-module. Let $\varphi : M \to M$ be an endomorphism such that $\varphi(M) \subset IM$. Then there exists a monic polynomial $P = T^n + a_1 T^{n - 1} + \ldots + a_n \in R[T]$ such that $a_j \in I^j$ and $P(\varphi) = 0$ as an endomorphism of $M$. \end{lemma} \begin{proof} Choose a surjective $R$-module map $R^{\oplus n} \to M$, given by $(a_1, \ldots, a_n) \mapsto \sum a_ix_i$ for some generators $x_i \in M$. Choose $(a_{i1}, \ldots, a_{in}) \in I^{\oplus n}$ such that $\varphi(x_i) = \sum a_{ij} x_j$. In other words the diagram $$ \xymatrix{ R^{\oplus n} \ar[d]_A \ar[r] & M \ar[d]^\varphi \\ I^{\oplus n} \ar[r] & M } $$ is commutative where $A = (a_{ij})$. By Lemma \ref{lemma-charpoly} the polynomial $P(t) = \det(t\text{id}_{n \times n} - A)$ has all the desired properties. \end{proof} \noindent As a fun example application we prove the following surprising lemma. \begin{lemma} \label{lemma-fun} Let $R$ be a ring. Let $M$ be a finite $R$-module. Let $\varphi : M \to M$ be a surjective $R$-module map. Then $\varphi$ is an isomorphism. \end{lemma} \begin{proof}[First proof] Write $R' = R[x]$ and think of $M$ as a finite $R'$-module with $x$ acting via $\varphi$. Set $I = (x) \subset R'$. By our assumption that $\varphi$ is surjective we have $IM = M$. Hence we may apply Lemma \ref{lemma-charpoly-module-ideal} to $M$ as an $R'$-module, the ideal $I$ and the endomorphism $\text{id}_M$. We conclude that $(1 + a_1 + \ldots + a_n)\text{id}_M = 0$ with $a_j \in I$. Write $a_j = b_j(x)x$ for some $b_j(x) \in R[x]$. Translating back into $\varphi$ we see that $\text{id}_M = -(\sum_{j = 1}^{n} b_j(\varphi)) \varphi$, and hence $\varphi$ is invertible. \end{proof} \begin{proof}[Second proof] We perform induction on the number of generators of $M$ over $R$. If $M$ is generated by one element, then $M \cong R/I$ for some ideal $I \subset R$. In this case we may replace $R$ by $R/I$ so that $M = R$. In this case $\varphi : R \to R$ is given by multiplication on $M$ by an element $r \in R$. The surjectivity of $\varphi$ forces $r$ invertible, since $\varphi$ must hit $1$, which implies that $\varphi$ is invertible. \medskip\noindent Now assume that we have proven the lemma in the case of modules generated by $n - 1$ elements, and are examining a module $M$ generated by $n$ elements. Let $A$ mean the ring $R[t]$, and regard the module $M$ as an $A$-module by letting $t$ act via $\varphi$; since $M$ is finite over $R$, it is finite over $R[t]$ as well, and since we're trying to prove $\varphi$ injective, a set-theoretic property, we might as well prove the endomorphism $t : M \to M$ over $A$ injective. We have reduced our problem to the case our endomorphism is multiplication by an element of the ground ring. Let $M' \subset M$ denote the sub-$A$-module generated by the first $n - 1$ of the generators of $M$, and consider the diagram $$ \xymatrix{ 0 \ar[r] & M' \ar[r]\ar[d]^{\varphi\mid_{M'}} & M\ar[d]^\varphi \ar[r] & M/M' \ar[d]^{\varphi \bmod M'} \ar[r] & 0 \\ 0 \ar[r] & M' \ar[r] & M \ar[r] & M/M' \ar[r] & 0, } $$ where the restriction of $\varphi$ to $M'$ and the map induced by $\varphi$ on the quotient $M/M'$ are well-defined since $\varphi$ is multiplication by an element in the base, and $M'$ and $M/M'$ are $A$-modules in their own right. By the case $n = 1$ the map $M/M' \to M/M'$ is an isomorphism. A diagram chase implies that $\varphi|_{M'}$ is surjective hence by induction $\varphi|_{M'}$ is an isomorphism. This forces the middle column to be an isomorphism by the snake lemma. \end{proof} \section{The spectrum of a ring} \label{section-spectrum-ring} % BEGIN ALGEBRA EDITORIAL ROUTE section-spectrum-ring \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-spectrum-ring}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-spectrum-ring \noindent We arbitrarily decide that the spectrum of a ring as a topological space is part of the algebra chapter, whereas an affine scheme is part of the chapter on schemes. \begin{definition} \label{definition-spectrum-ring} Let $R$ be a ring. \begin{enumerate} \item The {\it spectrum} of $R$ is the set of prime ideals of $R$. It is usually denoted $\Spec(R)$. \item Given a subset $T \subset R$ we let $V(T) \subset \Spec(R)$ be the set of primes containing $T$, i.e., $V(T) = \{ \mathfrak p \in \Spec(R) \mid \forall f\in T, f\in \mathfrak p\}$. \item Given an element $f \in R$ we let $D(f) \subset \Spec(R)$ be the set of primes not containing $f$. \end{enumerate} \end{definition} \begin{lemma} \label{lemma-Zariski-topology} Let $R$ be a ring. \begin{enumerate} \item The spectrum of a ring $R$ is empty if and only if $R$ is the zero ring. \item Every nonzero ring has a maximal ideal. \item Every nonzero ring has a minimal prime ideal. \item Given an ideal $I \subset R$ and a prime ideal $I \subset \mathfrak p$ there exists a prime $I \subset \mathfrak q \subset \mathfrak p$ such that $\mathfrak q$ is minimal over $I$. \item If $T \subset R$, and if $(T)$ is the ideal generated by $T$ in $R$, then $V((T)) = V(T)$. \item If $I$ is an ideal and $\sqrt{I}$ is its radical, see basic notion (\ref{item-radical-ideal}), then $V(I) = V(\sqrt{I})$. \item Given an ideal $I$ of $R$ we have $\sqrt{I} = \bigcap_{I \subset \mathfrak p} \mathfrak p$. \item If $I$ is an ideal then $V(I) = \emptyset$ if and only if $I$ is the unit ideal. \item If $I$, $J$ are ideals of $R$ then $V(I) \cup V(J) = V(I \cap J)$. \item If $(I_a)_{a\in A}$ is a set of ideals of $R$ then $\bigcap_{a\in A} V(I_a) = V(\bigcup_{a\in A} I_a)$. \item If $f \in R$, then $D(f) \amalg V(f) = \Spec(R)$. \item If $f \in R$ then $D(f) = \emptyset$ if and only if $f$ is nilpotent. \item If $f = u f'$ for some unit $u \in R$, then $D(f) = D(f')$. \item If $I \subset R$ is an ideal, and $\mathfrak p$ is a prime of $R$ with $\mathfrak p \not\in V(I)$, then there exists an $f \in R$ such that $\mathfrak p \in D(f)$, and $D(f) \cap V(I) = \emptyset$. \item If $f, g \in R$, then $D(fg) = D(f) \cap D(g)$. \item If $f_i \in R$ for $i \in I$, then $\bigcup_{i\in I} D(f_i)$ is the complement of $V(\{f_i \}_{i\in I})$ in $\Spec(R)$. \item If $f \in R$ and $D(f) = \Spec(R)$, then $f$ is a unit. \end{enumerate} \end{lemma} \begin{proof} We address each part in the corresponding item below. \begin{enumerate} \item This is a direct consequence of (2) or (3). \item Let $\mathfrak{A}$ be the set of all proper ideals of $R$. This set is ordered by inclusion and is non-empty, since $(0) \in \mathfrak{A}$ is a proper ideal. Let $A$ be a totally ordered subset of $\mathfrak A$. Then $\bigcup_{I \in A} I$ is in fact an ideal. Since $1 \notin I$ for all $I \in A$, the union does not contain $1$ and thus is proper. Hence $\bigcup_{I \in A} I$ is in $\mathfrak{A}$ and is an upper bound for the set $A$. Thus by Zorn's lemma $\mathfrak{A}$ has a maximal element, which is the sought-after maximal ideal. \item Since $R$ is nonzero, it contains a maximal ideal which is a prime ideal. Thus the set $\mathfrak{A}$ of all prime ideals of $R$ is nonempty. $\mathfrak{A}$ is ordered by reverse-inclusion. Let $A$ be a totally ordered subset of $\mathfrak{A}$. It's pretty clear that $J = \bigcap_{I \in A} I$ is in fact an ideal. Not so clear, however, is that it is prime. Let $xy \in J$. Then $xy \in I$ for all $I \in A$. Now let $B = \{I \in A | y \in I\}$. Let $K = \bigcap_{I \in B} I$. Since $A$ is totally ordered, either $K = J$ (and we're done, since then $y \in J$) or $K \supset J$ and for all $I \in A$ such that $I$ is properly contained in $K$, we have $y \notin I$. But that means that for all those $I, x \in I$, since they are prime. Hence $x \in J$. In either case, $J$ is prime as desired. Hence by Zorn's lemma we get a maximal element which in this case is a minimal prime ideal. \item This is the same exact argument as (3) except you only consider prime ideals contained in $\mathfrak{p}$ and containing $I$. \item $(T)$ is the smallest ideal containing $T$. Hence if $T \subset I$, some ideal, then $(T) \subset I$ as well. Hence if $I \in V(T)$, then $I \in V((T))$ as well. The other inclusion is obvious. \item Since $I \subset \sqrt{I}, V(\sqrt{I}) \subset V(I)$. Now let $\mathfrak{p} \in V(I)$. Let $x \in \sqrt{I}$. Then $x^n \in I$ for some $n$. Hence $x^n \in \mathfrak{p}$. But since $\mathfrak{p}$ is prime, a boring induction argument gets you that $x \in \mathfrak{p}$. Hence $\sqrt{I} \subset \mathfrak{p}$ and $\mathfrak{p} \in V(\sqrt{I})$. \item Let $f \in R \setminus \sqrt{I}$. Then $f^n \notin I$ for all $n$. Hence $S = \{1, f, f^2, \ldots\}$ is a multiplicative subset, not containing $0$. Take a prime ideal $\bar{\mathfrak{p}} \subset S^{-1}R$ containing $S^{-1}I$. Then the pull-back $\mathfrak{p}$ in $R$ of $\bar{\mathfrak{p}}$ is a prime ideal containing $I$ that does not intersect $S$. This shows that $\bigcap_{I \subset \mathfrak p} \mathfrak p \subset \sqrt{I}$. Now if $a \in \sqrt{I}$, then $a^n \in I$ for some $n$. Hence if $I \subset \mathfrak{p}$, then $a^n \in \mathfrak{p}$. But since $\mathfrak{p}$ is prime, we have $a \in \mathfrak{p}$. Thus the equality is shown. \item $I$ is not the unit ideal if and only if $I$ is contained in some maximal ideal (to see this, apply (2) to the ring $R/I$) which is therefore prime. \item If $\mathfrak{p} \in V(I) \cup V(J)$, then $I \subset \mathfrak{p}$ or $J \subset \mathfrak{p}$ which means that $I \cap J \subset \mathfrak{p}$. Now if $I \cap J \subset \mathfrak{p}$, then $IJ \subset \mathfrak{p}$ and hence either $I \subset \mathfrak{p}$ or $J \subset \mathfrak{p}$, since $\mathfrak{p}$ is prime. \item $\mathfrak{p} \in \bigcap_{a \in A} V(I_a) \Leftrightarrow I_a \subset \mathfrak{p}, \forall a \in A \Leftrightarrow \mathfrak{p} \in V(\bigcup_{a\in A} I_a)$ \item If $\mathfrak{p}$ is a prime ideal and $f \in R$, then either $f \in \mathfrak{p}$ or $f \notin \mathfrak{p}$ (strictly) which is what the disjoint union says. \item If $a \in R$ is nilpotent, then $a^n = 0$ for some $n$. Hence $a^n \in \mathfrak{p}$ for any prime ideal. Thus $a \in \mathfrak{p}$ as can be shown by induction and $D(a) = \emptyset$. Now, as shown in (7), if $a \in R$ is not nilpotent, then there is a prime ideal that does not contain it. \item $f \in \mathfrak{p} \Leftrightarrow uf \in \mathfrak{p}$, since $u$ is invertible. \item If $\mathfrak{p} \notin V(I)$, then $\exists f \in I \setminus \mathfrak{p}$. Then $f \notin \mathfrak{p}$ so $\mathfrak{p} \in D(f)$. Also if $\mathfrak{q} \in D(f)$, then $f \notin \mathfrak{q}$ and thus $I$ is not contained in $\mathfrak{q}$. Thus $D(f) \cap V(I) = \emptyset$. \item If $fg \in \mathfrak{p}$, then $f \in \mathfrak{p}$ or $g \in \mathfrak{p}$. Hence if $f \notin \mathfrak{p}$ and $g \notin \mathfrak{p}$, then $fg \notin \mathfrak{p}$. Since $\mathfrak{p}$ is an ideal, if $fg \notin \mathfrak{p}$, then $f \notin \mathfrak{p}$ and $g \notin \mathfrak{p}$. \item $\mathfrak{p} \in \bigcup_{i \in I} D(f_i) \Leftrightarrow \exists i \in I, f_i \notin \mathfrak{p} \Leftrightarrow \mathfrak{p} \in \Spec(R) \setminus V(\{f_i\}_{i \in I})$ \item If $D(f) = \Spec(R)$, then $V(f) = \emptyset$ and hence $fR = R$, so $f$ is a unit. \end{enumerate} \end{proof} \noindent The lemma implies that the subsets $V(T)$ from Definition \ref{definition-spectrum-ring} form the closed subsets of a topology on $\Spec(R)$. And it also shows that the sets $D(f)$ are open and form a basis for this topology. \begin{definition} \label{definition-Zariski-topology} Let $R$ be a ring. The topology on $\Spec(R)$ whose closed sets are the sets $V(T)$ is called the {\it Zariski} topology. The open subsets $D(f)$ are called the {\it standard opens} of $\Spec(R)$. \end{definition} \noindent It should be clear from context whether we consider $\Spec(R)$ just as a set or as a topological space. \begin{lemma} \label{lemma-spec-functorial} \begin{slogan} Functoriality of the spectrum \end{slogan} Suppose that $\varphi : R \to R'$ is a ring homomorphism. The induced map $$ \Spec(\varphi) : \Spec(R') \longrightarrow \Spec(R), \quad \mathfrak p' \longmapsto \varphi^{-1}(\mathfrak p') $$ is continuous for the Zariski topologies. In fact, for any element $f \in R$ we have $\Spec(\varphi)^{-1}(D(f)) = D(\varphi(f))$. \end{lemma} \begin{proof} It is basic notion (\ref{item-inverse-image-prime}) that $\mathfrak p := \varphi^{-1}(\mathfrak p')$ is indeed a prime ideal of $R$. The last assertion of the lemma follows directly from the definitions, and implies the first. \end{proof} \noindent If $\varphi' : R' \to R''$ is a second ring homomorphism then the composition $$ \Spec(R'') \longrightarrow \Spec(R') \longrightarrow \Spec(R) $$ equals $\Spec(\varphi' \circ \varphi)$. In other words, $\Spec$ is a contravariant functor from the category of rings to the category of topological spaces. \begin{lemma} \label{lemma-spec-homeomorphism-onto-image-units} \begin{reference} \cite[Corollary 1.2.4]{EGA1} \end{reference} Let $\varphi : R \to S$ be a ring map. Assume that every $g \in S$ can be written as $g = u\varphi(f)$ for some $f \in R$ and some unit $u \in S$. Then $$ \Spec(S) \longrightarrow \Spec(R) $$ is a homeomorphism onto its image. \end{lemma} \begin{proof} The map is continuous by Lemma \ref{lemma-spec-functorial}. If $\mathfrak q$ and $\mathfrak q'$ have the same inverse image in $R$, then the assumption shows that every $g \in S$ is in $\mathfrak q$ if and only if it is in $\mathfrak q'$. Thus the map is injective. Finally, if $g = u\varphi(f)$ as in the statement, then $$ D(g) = \Spec(\varphi)^{-1}(D(f)). $$ Since the standard opens form a basis, the map is a homeomorphism onto its image. \end{proof} \begin{lemma} \label{lemma-spec-localization} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. The map $R \to S^{-1}R$ induces via the functoriality of $\Spec$ a homeomorphism $$ \Spec(S^{-1}R) \longrightarrow \{\mathfrak p \in \Spec(R) \mid S \cap \mathfrak p = \emptyset \} $$ where the topology on the right hand side is that induced from the Zariski topology on $\Spec(R)$. The inverse map is given by $\mathfrak p \mapsto S^{-1}\mathfrak p = \mathfrak p(S^{-1}R)$. \end{lemma} \begin{proof} Denote the right hand side of the arrow of the lemma by $D$. Choose a prime $\mathfrak p' \subset S^{-1}R$ and let $\mathfrak p$ be the inverse image of $\mathfrak p'$ in $R$. Since $\mathfrak p'$ does not contain $1$ we see that $\mathfrak p$ does not contain any element of $S$. Hence $\mathfrak p \in D$ and we see that the image is contained in $D$. Let $\mathfrak p \in D$. By assumption the image $\overline{S}$ does not contain $0$. By basic notion (\ref{item-localization-zero}) $\overline{S}^{-1}(R/\mathfrak p)$ is not the zero ring. By basic notion (\ref{item-localize-ideal}) we see $S^{-1}R / S^{-1}\mathfrak p = \overline{S}^{-1}(R/\mathfrak p)$ is a domain, and hence $S^{-1}\mathfrak p$ is a prime. The equality of rings also shows that the inverse image of $S^{-1}\mathfrak p$ in $R$ is equal to $\mathfrak p$, because $R/\mathfrak p \to \overline{S}^{-1}(R/\mathfrak p)$ is injective by basic notion (\ref{item-localize-nonzerodivisors}). This proves that the map $\Spec(S^{-1}R) \to \Spec(R)$ is bijective onto $D$ with inverse as given. Every element of $S^{-1}R$ is a unit times the image of an element of $R$. Hence the map is a homeomorphism onto its image by Lemma \ref{lemma-spec-homeomorphism-onto-image-units}. \end{proof} \begin{lemma} \label{lemma-standard-open} Let $R$ be a ring. Let $f \in R$. The map $R \to R_f$ induces via the functoriality of $\Spec$ a homeomorphism $$ \Spec(R_f) \longrightarrow D(f) \subset \Spec(R). $$ The inverse is given by $\mathfrak p \mapsto \mathfrak p \cdot R_f$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-spec-localization}. \end{proof} \noindent It is not the case that every ``affine open'' of a spectrum is a standard open. See Example \ref{example-affine-open-not-standard}. \begin{lemma} \label{lemma-spec-closed} Let $R$ be a ring. Let $I \subset R$ be an ideal. The map $R \to R/I$ induces via the functoriality of $\Spec$ a homeomorphism $$ \Spec(R/I) \longrightarrow V(I) \subset \Spec(R). $$ The inverse is given by $\mathfrak p \mapsto \mathfrak p / I$. \end{lemma} \begin{proof} It is immediate that the image is contained in $V(I)$. On the other hand, if $\mathfrak p \in V(I)$ then $\mathfrak p \supset I$ and we may consider the ideal $\mathfrak p /I \subset R/I$. Using basic notion (\ref{item-isomorphism-theorem}) we see that $(R/I)/(\mathfrak p/I) = R/\mathfrak p$ is a domain and hence $\mathfrak p/I$ is a prime ideal. From this and Lemma \ref{lemma-spec-homeomorphism-onto-image-units}, applied to the surjection $R \to R/I$, the result follows. \end{proof} \begin{lemma} \label{lemma-quasi-compact} \begin{slogan} The spectrum of a ring is quasi-compact \end{slogan} Let $R$ be a ring. The space $\Spec(R)$ is quasi-compact. \end{lemma} \begin{proof} It suffices to prove that any covering of $\Spec(R)$ by standard opens can be refined by a finite covering. Thus suppose that $\Spec(R) = \cup D(f_i)$ for a set of elements $\{f_i\}_{i\in I}$ of $R$. This means that $\cap V(f_i) = \emptyset$. According to Lemma \ref{lemma-Zariski-topology} this means that $V(\{f_i \}) = \emptyset$. According to the same lemma this means that the ideal generated by the $f_i$ is the unit ideal of $R$. This means that we can write $1$ as a {\it finite} sum: $1 = \sum_{i \in J} r_i f_i$ with $J \subset I$ finite. And then it follows that $\Spec(R) = \cup_{i \in J} D(f_i)$. \end{proof} \begin{lemma} \label{lemma-topology-spec} \begin{reference} \cite[Chapter II, \S 3, no. 42, Proposition 3, p. 234]{FAC} \end{reference} \begin{history} For a closed classical subvariety $V$ of affine space and a closed subset $F \subset V$, the cited proposition obtains a basis of $V \setminus F$ from the loci $V_P$ for polynomials $P$ vanishing on $F$. The standard-open basis below gives the intrinsic spectrum version, including nonclosed prime points and arbitrary rings. \end{history} Let $R$ be a ring. The topology on $X = \Spec(R)$ has the following properties: \begin{enumerate} \item $X$ is quasi-compact, \item $X$ has a basis for the topology consisting of quasi-compact opens, and \item the intersection of any two quasi-compact opens is quasi-compact. \end{enumerate} \end{lemma} \begin{proof} The spectrum of a ring is quasi-compact, see Lemma \ref{lemma-quasi-compact}. It has a basis for the topology consisting of the standard opens $D(f) = \Spec(R_f)$ (Lemma \ref{lemma-standard-open}) which are quasi-compact by the first remark. The intersection of two standard opens is quasi-compact as $D(f) \cap D(g) = D(fg)$. Given any two quasi-compact opens $U, V \subset X$ we may write $U = D(f_1) \cup \ldots \cup D(f_n)$ and $V = D(g_1) \cup \ldots \cup D(g_m)$. Then $U \cap V = \bigcup_{1 \leq i \leq n,\ 1 \leq j \leq m} D(f_i g_j)$ which is quasi-compact. \end{proof} \section{Local rings} \label{section-local-rings} % BEGIN ALGEBRA EDITORIAL ROUTE section-local-rings \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-local-rings}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-local-rings \noindent Local rings are the bread and butter of algebraic geometry. \begin{definition} \label{definition-local-ring} A {\it local ring} is a ring with exactly one maximal ideal. If $R$ is a local ring, then the maximal ideal is often denoted $\mathfrak m_R$ and the field $R/\mathfrak m_R$ is called the {\it residue field} of the local ring $R$. We often say ``let $(R, \mathfrak m)$ be a local ring'' or ``let $(R, \mathfrak m, \kappa)$ be a local ring'' to indicate that $R$ is local, $\mathfrak m$ is its unique maximal ideal and $\kappa = R/\mathfrak m$ is its residue field. A {\it local homomorphism of local rings} is a ring map $\varphi : R \to S$ such that $R$ and $S$ are local rings and such that $\varphi(\mathfrak m_R) \subset \mathfrak m_S$. If it is given that $R$ and $S$ are local rings, then the phrase ``{\it local ring map $\varphi : R \to S$}'' means that $\varphi$ is a local homomorphism of local rings. \end{definition} \noindent A field is a local ring. Any ring map between fields is a local homomorphism of local rings. \medskip\noindent The localization $R_\mathfrak p$ of a ring $R$ at a prime $\mathfrak p$ is a local ring with maximal ideal $\mathfrak p R_\mathfrak p$. Namely, by Lemma \ref{lemma-spec-localization} every prime ideal of $R_\mathfrak p$ is contained in the prime ideal $\mathfrak p R_\mathfrak p$ (hence this is a maximal ideal and the only maximal ideal of $R_\mathfrak p$). The residue field of $R_\mathfrak p$ is denoted $\kappa(\mathfrak p)$; we call it the {\it residue field of $\mathfrak p$}; by Proposition \ref{proposition-localize-quotient} we may identify $\kappa(\mathfrak p)$ with the field of fractions of the domain $R/\mathfrak p$. Via the composition $$ \Spec(\kappa(\mathfrak p)) \to \Spec(R_\mathfrak p) \to \Spec(R) $$ the unique point of the source maps to the point $\mathfrak p$ of the target. \medskip\noindent Let $\varphi : R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime and consider the prime $\mathfrak p = \varphi^{-1}(\mathfrak q)$ of $R$. Since $\varphi(\mathfrak p) \subset \mathfrak q$ the induced ring map $$ R_\mathfrak p \to S_\mathfrak q,\quad r/g \mapsto \varphi(r)/\varphi(g) $$ is a local ring map and we obtain an induced map of residue fields $\kappa(\mathfrak p) \to \kappa(\mathfrak q)$. \begin{example} \label{example-not-local} If $R$ is a local ring and $\mathfrak p \subset R$ is a non-maximal prime ideal, then $R \to R_\mathfrak p$ is not a local homomorphism. \end{example} \begin{lemma} \label{lemma-characterize-local-ring} Let $R$ be a ring. The following are equivalent: \begin{enumerate} \item $R$ is a local ring, \item $\Spec(R)$ has exactly one closed point, \item $R$ has a maximal ideal $\mathfrak m$ and every element of $R \setminus \mathfrak m$ is a unit, and \item $R$ is not the zero ring and for every $x \in R$ either $x$ or $1 - x$ is invertible or both. \end{enumerate} \end{lemma} \begin{proof} Let $R$ be a ring, and $\mathfrak m$ a maximal ideal. If $x \in R \setminus \mathfrak m$, and $x$ is not a unit then there is a maximal ideal $\mathfrak m'$ containing $x$. Hence $R$ has at least two maximal ideals. Conversely, if $\mathfrak m'$ is another maximal ideal, then choose $x \in \mathfrak m'$, $x \not \in \mathfrak m$. Clearly $x$ is not a unit. This proves the equivalence of (1) and (3). The equivalence of (1) and (2) is tautological. If $R$ is local then (4) holds since $x$ is either in $\mathfrak m$ or not. If (4) holds, and $\mathfrak m$, $\mathfrak m'$ are distinct maximal ideals then we may choose $x \in R$ such that $x \bmod \mathfrak m' = 0$ and $x \bmod \mathfrak m = 1$ by the Chinese remainder theorem (Lemma \ref{lemma-chinese-remainder}). This element $x$ is not invertible and neither is $1 - x$ which is a contradiction. Thus (4) and (1) are equivalent. \end{proof} \begin{lemma} \label{lemma-characterize-local-ring-map} Let $\varphi : R \to S$ be a ring map. Assume $R$ and $S$ are local rings. The following are equivalent: \begin{enumerate} \item $\varphi$ is a local ring map, \item $\varphi(\mathfrak m_R) \subset \mathfrak m_S$, \item $\varphi^{-1}(\mathfrak m_S) = \mathfrak m_R$, and \item for any $x \in R$, if $\varphi(x)$ is invertible in $S$, then $x$ is invertible in $R$. \end{enumerate} \end{lemma} \begin{proof} Conditions (1) and (2) are equivalent by definition. If (3) holds then (2) holds. Conversely, if (2) holds, then $\varphi^{-1}(\mathfrak m_S)$ is a prime ideal containing the maximal ideal $\mathfrak m_R$, hence $\varphi^{-1}(\mathfrak m_S) = \mathfrak m_R$. Finally, (4) is the contrapositive of (2) by Lemma \ref{lemma-characterize-local-ring}. \end{proof} \begin{remark} \label{remark-fundamental-diagram} A fundamental commutative diagram associated to a ring map $\varphi : R \to S$ and a prime $\mathfrak p \subset R$ is the following $$ \xymatrix{ \kappa(\mathfrak p) \otimes_R S = S_{\mathfrak p}/{\mathfrak p}S_{\mathfrak p} & S_{\mathfrak p} \ar[l] & S \ar[r] \ar[l] & S/\mathfrak pS \ar[r] & (R \setminus \mathfrak p)^{-1}S/\mathfrak pS \\ \kappa(\mathfrak p) = R_{\mathfrak p}/{\mathfrak p}R_{\mathfrak p} \ar[u] & R_{\mathfrak p} \ar[u] \ar[l] & R \ar[u] \ar[r] \ar[l] & R/\mathfrak p \ar[u] \ar[r] & \kappa(\mathfrak p) \ar[u] } $$ In this diagram the outer left and outer right columns are identical. On spectra the horizontal maps induce homeomorphisms onto their images and the squares induce fibre squares of topological spaces (see Lemmas \ref{lemma-spec-localization} and \ref{lemma-spec-closed}). This shows that $\mathfrak p$ is in the image of the map on Spec if and only if $S \otimes_R \kappa(\mathfrak p)$ is not the zero ring. If there does exist a prime $\mathfrak q \subset S$ lying over $\mathfrak p$, i.e., with $\mathfrak p = \varphi^{-1}(\mathfrak q)$ then we can extend the diagram to the following diagram $$ \xymatrix{ \kappa(\mathfrak q) = S_{\mathfrak q}/{\mathfrak q}S_{\mathfrak q} & S_{\mathfrak q} \ar[l] & S \ar[r] \ar[l] & S/\mathfrak q \ar[r] & \kappa(\mathfrak q) \\ \kappa(\mathfrak p) \otimes_R S = S_{\mathfrak p}/{\mathfrak p}S_{\mathfrak p} \ar[u] & S_{\mathfrak p} \ar[u] \ar[l] & S \ar[u] \ar[r] \ar[l] & S/\mathfrak pS \ar[u] \ar[r] & (R \setminus \mathfrak p)^{-1}S/\mathfrak pS \ar[u] \\ \kappa(\mathfrak p) = R_{\mathfrak p}/{\mathfrak p}R_{\mathfrak p} \ar[u] & R_{\mathfrak p} \ar[u] \ar[l] & R \ar[u] \ar[r] \ar[l] & R/\mathfrak p \ar[u] \ar[r] & \kappa(\mathfrak p) \ar[u] } $$ In this diagram it is still the case that the outer left and outer right columns are identical and that on spectra the horizontal maps induce homeomorphisms onto their image. \end{remark} \begin{lemma} \label{lemma-in-image} Let $\varphi : R \to S$ be a ring map. Let $\mathfrak p$ be a prime of $R$. The following are equivalent \begin{enumerate} \item $\mathfrak p$ is in the image of $\Spec(S) \to \Spec(R)$, \item $S \otimes_R \kappa(\mathfrak p) \not = 0$, \item $S_{\mathfrak p}/\mathfrak p S_{\mathfrak p} \not = 0$, \item $(S/\mathfrak pS)_{\mathfrak p} \not = 0$, and \item $\mathfrak p = \varphi^{-1}(\mathfrak pS)$. \end{enumerate} \end{lemma} \begin{proof} We have already seen the equivalence of the first two in Remark \ref{remark-fundamental-diagram}. The others are just reformulations of this. \end{proof} \begin{remark} \label{remark-local-ring-fibre} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime ideal of $S$ lying over the prime ideal $\mathfrak p$ of $R$. According to Remark \ref{remark-fundamental-diagram} the prime $\mathfrak q$ corresponds to a unique prime $\overline{\mathfrak q}$ of the fibre ring $F = S \otimes_R \kappa(\mathfrak p)$. Then we have $$ F_{\overline{\mathfrak q}} \cong S_\mathfrak q \otimes_{R_\mathfrak p} \kappa(\mathfrak p) \cong S_\mathfrak q/\mathfrak p S_\mathfrak q $$ Namely, there is an obvious ring map $F \to S_\mathfrak q \otimes_{R_\mathfrak p} \kappa(\mathfrak p)$ which, under the displayed isomorphism, identifies with $F \to F_{\overline{\mathfrak q}}$. The second isomorphism follows from the fact that $\kappa(\mathfrak p)$ is the quotient of $R_\mathfrak p$ by $\mathfrak pR_\mathfrak p$. \end{remark} \section{The Jacobson radical of a ring} \label{section-radical} % BEGIN ALGEBRA EDITORIAL ROUTE section-radical \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-radical}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-radical \noindent We recall that the {\it Jacobson radical} $\text{rad}(R)$ of a ring $R$ is the intersection of all maximal ideals of $R$. If $R$ is local then $\text{rad}(R)$ is the maximal ideal of $R$. \begin{lemma} \label{lemma-contained-in-radical} Let $R$ be a ring with Jacobson radical $\text{rad}(R)$. Let $I \subset R$ be an ideal. The following are equivalent \begin{enumerate} \item $I \subset \text{rad}(R)$, and \item every element of $1 + I$ is a unit in $R$. \end{enumerate} In this case every element of $R$ which maps to a unit of $R/I$ is a unit. \end{lemma} \begin{proof} If $f \in \text{rad}(R)$, then $f \in \mathfrak m$ for all maximal ideals $\mathfrak m$ of $R$. Hence $1 + f \not \in \mathfrak m$ for all maximal ideals $\mathfrak m$ of $R$. Thus the closed subset $V(1 + f)$ of $\Spec(R)$ is empty. This implies that $1 + f$ is a unit, see Lemma \ref{lemma-Zariski-topology}. \medskip\noindent Conversely, assume that $1 + f$ is a unit for all $f \in I$. If $\mathfrak m$ is a maximal ideal and $I \not \subset \mathfrak m$, then $I + \mathfrak m = R$. Hence $1 = f + g$ for some $g \in \mathfrak m$ and $f \in I$. Then $g = 1 + (-f)$ is not a unit, contradiction. \medskip\noindent For the final statement let $f \in R$ map to a unit in $R/I$. Then we can find $g \in R$ mapping to the multiplicative inverse of $f \bmod I$. Then $fg = 1 \bmod I$. Hence $fg$ is a unit of $R$ by (2) which implies that $f$ is a unit. \end{proof} \begin{lemma} \label{lemma-open-containing-vanishing-jacobson-radical} \begin{reference} \cite[Proposition 1.1.15]{EGA1} \end{reference} Let $R$ be a ring and let $I \subset R$ be an ideal contained in the Jacobson radical of $R$. If $U \subset \Spec(R)$ is an open subset and $V(I) \subset U$, then $U = \Spec(R)$. \end{lemma} \begin{proof} Suppose that $Z = \Spec(R) \setminus U$ is nonempty. Write $Z = V(J)$ for an ideal $J \subset R$. Then $J$ is a proper ideal, so it is contained in a maximal ideal $\mathfrak m$. Since $I$ is contained in every maximal ideal, we have $\mathfrak m \in V(I) \cap V(J)$. This contradicts $V(I) \subset U$. \end{proof} \begin{lemma} \label{lemma-surjective-on-spec-units} Let $\varphi : R \to S$ be a ring map such that the induced map $\Spec(S) \to \Spec(R)$ is surjective. Then an element $x \in R$ is a unit if and only if $\varphi(x) \in S$ is a unit. \end{lemma} \begin{proof} If $x$ is a unit, then so is $\varphi(x)$. Conversely, if $\varphi(x)$ is a unit, then $\varphi(x) \not \in \mathfrak q$ for all $\mathfrak q \in \Spec(S)$. Hence $x \not \in \varphi^{-1}(\mathfrak q) = \Spec(\varphi)(\mathfrak q)$ for all $\mathfrak q \in \Spec(S)$. Since $\Spec(\varphi)$ is surjective we conclude that $x$ is a unit by part (17) of Lemma \ref{lemma-Zariski-topology}. \end{proof} \section{Nakayama's lemma} \label{section-nakayama} % BEGIN ALGEBRA EDITORIAL ROUTE section-nakayama \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-nakayama}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-nakayama \noindent We quote from \cite{MatCA}: ``This simple but important lemma is due to T.~Nakayama, G.~Azumaya and W.~Krull. Priority is obscure, and although it is usually called the Lemma of Nakayama, late Prof.~Nakayama did not like the name.'' \begin{lemma}[Nakayama's lemma] \label{lemma-NAK} \begin{reference} \cite[1.M Lemma (NAK) page 11]{MatCA} \end{reference} \begin{history} We quote from \cite{MatCA}: ``This simple but important lemma is due to T.~Nakayama, G.~Azumaya and W.~Krull. Priority is obscure, and although it is usually called the Lemma of Nakayama, late Prof.~Nakayama did not like the name.'' \end{history} Let $R$ be a ring with Jacobson radical $\text{rad}(R)$. Let $M$ be an $R$-module. Let $I \subset R$ be an ideal. \begin{enumerate} \item \label{item-nakayama} If $IM = M$ and $M$ is finite, then there exists an $f \in 1 + I$ such that $fM = 0$. \item If $IM = M$, $M$ is finite, and $I \subset \text{rad}(R)$, then $M = 0$. \item If $N, N' \subset M$, $M = N + IN'$, and $N'$ is finite, then there exists an $f \in 1 + I$ such that $fM \subset N$ and $M_f = N_f$. \item If $N, N' \subset M$, $M = N + IN'$, $N'$ is finite, and $I \subset \text{rad}(R)$, then $M = N$. \item If $N \to M$ is a module map, $N/IN \to M/IM$ is surjective, and $M$ is finite, then there exists an $f \in 1 + I$ such that $N_f \to M_f$ is surjective. \item If $N \to M$ is a module map, $N/IN \to M/IM$ is surjective, $M$ is finite, and $I \subset \text{rad}(R)$, then $N \to M$ is surjective. \item If $x_1, \ldots, x_n \in M$ generate $M/IM$ and $M$ is finite, then there exists an $f \in 1 + I$ such that $x_1, \ldots, x_n$ generate $M_f$ over $R_f$. \item If $x_1, \ldots, x_n \in M$ generate $M/IM$, $M$ is finite, and $I \subset \text{rad}(R)$, then $M$ is generated by $x_1, \ldots, x_n$. \item If $IM = M$, $I$ is nilpotent, then $M = 0$. \item If $N, N' \subset M$, $M = N + IN'$, and $I$ is nilpotent then $M = N$. \item If $N \to M$ is a module map, $I$ is nilpotent, and $N/IN \to M/IM$ is surjective, then $N \to M$ is surjective. \item If $\{x_\alpha\}_{\alpha \in A}$ is a set of elements of $M$ which generate $M/IM$ and $I$ is nilpotent, then $M$ is generated by the $x_\alpha$. \end{enumerate} \end{lemma} \begin{proof} Proof of (\ref{item-nakayama}). Choose generators $y_1, \ldots, y_m$ of $M$ over $R$. For each $i$ we can write $y_i = \sum z_{ij} y_j$ with $z_{ij} \in I$ (since $M = IM$). In other words $\sum_j (\delta_{ij} - z_{ij})y_j = 0$. Let $f$ be the determinant of the $m \times m$ matrix $A = (\delta_{ij} - z_{ij})$. Note that $f \in 1 + I$ (since the matrix $A$ is entrywise congruent to the $m \times m$ identity matrix modulo $I$). By Lemma \ref{lemma-matrix-left-inverse} (1), there exists an $m \times m$ matrix $B$ such that $BA = f 1_{m \times m}$. Writing out we see that $\sum_{i} b_{hi} a_{ij} = f \delta_{hj}$ for all $h$ and $j$; hence, $\sum_{i, j} b_{hi} a_{ij} y_j = \sum_{j} f \delta_{hj} y_j = f y_h$ for every $h$. In other words, $0 = f y_h$ for every $h$ (since each $i$ satisfies $\sum_j a_{ij} y_j = 0$). This implies that $f$ annihilates $M$. \medskip\noindent By Lemma \ref{lemma-contained-in-radical} an element of $1 + \text{rad}(R)$ is an invertible element of $R$. Hence we see that (\ref{item-nakayama}) implies (2). We obtain (3) by applying (1) to $M/N$ which is finite as $N'$ is finite. We obtain (4) by applying (2) to $M/N$ which is finite as $N'$ is finite. We obtain (5) by applying (3) to $M$ and the submodules $\Im(N \to M)$ and $M$. We obtain (6) by applying (4) to $M$ and the submodules $\Im(N \to M)$ and $M$. We obtain (7) by applying (5) to the map $R^{\oplus n} \to M$, $(a_1, \ldots, a_n) \mapsto a_1x_1 + \ldots + a_nx_n$. We obtain (8) by applying (6) to the map $R^{\oplus n} \to M$, $(a_1, \ldots, a_n) \mapsto a_1x_1 + \ldots + a_nx_n$. \medskip\noindent Part (9) holds because if $M = IM$ then $M = I^nM$ for all $n \geq 0$ and $I$ being nilpotent means $I^n = 0$ for some $n \gg 0$. Parts (10), (11), and (12) follow from (9) by the arguments used above. \end{proof} \begin{lemma} \label{lemma-NAK-localization} Let $R$ be a ring, let $S \subset R$ be a multiplicative subset, let $I \subset R$ be an ideal, and let $M$ be a finite $R$-module. If $x_1, \ldots, x_r \in M$ generate $S^{-1}(M/IM)$ as an $S^{-1}(R/I)$-module, then there exists an $f \in S + I$ such that $x_1, \ldots, x_r$ generate $M_f$ as an $R_f$-module.\footnote{Special cases: (I) $I = 0$. The lemma says if $x_1, \ldots, x_r$ generate $S^{-1}M$, then $x_1, \ldots, x_r$ generate $M_f$ for some $f \in S$. (II) $I = \mathfrak p$ is a prime ideal and $S = R \setminus \mathfrak p$. The lemma says if $x_1, \ldots, x_r$ generate $M \otimes_R \kappa(\mathfrak p)$ then $x_1, \ldots, x_r$ generate $M_f$ for some $f \in R$, $f \not \in \mathfrak p$.} \end{lemma} \begin{proof} Special case $I = 0$. Let $y_1, \ldots, y_s$ be generators for $M$ over $R$. Since $S^{-1}M$ is generated by $x_1, \ldots, x_r$, for each $i$ we can write $y_i = \sum (a_{ij}/s_{ij})x_j$ in $S^{-1}M$ for some $a_{ij} \in R$ and $s_{ij} \in S$. Multiplying by the product $s \in S$ of the $s_{ij}$ we see that $sy_i = \sum a'_{ij}x_j$ in $S^{-1}M$ for some $a'_{ij} \in R$. This in turn means there exist $t_i \in S$ such that $t_isy_i = \sum t_ia'_{ij}x_j$ in $M$. Thus if $t \in S$ is the product of the $t_i$, then we see that $y_i$ is in the $R_{st}$-submodule generated by $x_1, \ldots, x_r$ of $M_{st}$. Hence $x_1, \ldots, x_r$ generate $M_{st}$. \medskip\noindent General case. By the special case, we can find an $s \in S$ such that $x_1, \ldots, x_r$ generate $(M/IM)_s$ over $(R/I)_s$. By Lemma \ref{lemma-NAK} we can find a $g \in 1 + I_s \subset R_s$ such that $x_1, \ldots, x_r$ generate $(M_s)_g$ over $(R_s)_g$. Write $g = 1 + i/s'$. Then $f = ss' + is$ works; details omitted. \end{proof} \begin{lemma} \label{lemma-when-surjective-local} Let $A \to B$ be a local homomorphism of local rings. Assume \begin{enumerate} \item $B$ is finite as an $A$-module, \item $\mathfrak m_B$ is a finitely generated ideal, \item $A \to B$ induces an isomorphism on residue fields, and \item $\mathfrak m_A/\mathfrak m_A^2 \to \mathfrak m_B/\mathfrak m_B^2$ is surjective. \end{enumerate} Then $A \to B$ is surjective. \end{lemma} \begin{proof} To show that $A \to B$ is surjective, we view it as a map of $A$-modules and apply Lemma \ref{lemma-NAK} (6). We conclude it suffices to show that $A/\mathfrak m_A \to B/\mathfrak m_AB$ is surjective. As $A/\mathfrak m_A = B/\mathfrak m_B$ it suffices to show that $\mathfrak m_AB \to \mathfrak m_B$ is surjective. View $\mathfrak m_AB \to \mathfrak m_B$ as a map of $B$-modules and apply Lemma \ref{lemma-NAK} (6). We conclude it suffices to see that $\mathfrak m_AB/\mathfrak m_A\mathfrak m_B \to \mathfrak m_B/\mathfrak m_B^2$ is surjective. This follows from assumption (4). \end{proof} \section{Open and closed subsets of spectra} \label{section-open-and-closed} \noindent It turns out that open and closed subsets of a spectrum correspond to idempotents of the ring. \begin{lemma} \label{lemma-idempotent-spec} Let $R$ be a ring. Let $e \in R$ be an idempotent. In this case $$ \Spec(R) = D(e) \amalg D(1-e). $$ \end{lemma} \begin{proof} Note that an idempotent $e$ of a domain is either $1$ or $0$. Hence we see that \begin{eqnarray*} D(e) & = & \{ \mathfrak p \in \Spec(R) \mid e \not\in \mathfrak p \} \\ & = & \{ \mathfrak p \in \Spec(R) \mid e \not = 0\text{ in }\kappa(\mathfrak p) \} \\ & = & \{ \mathfrak p \in \Spec(R) \mid e = 1\text{ in }\kappa(\mathfrak p) \} \end{eqnarray*} Similarly we have \begin{eqnarray*} D(1-e) & = & \{ \mathfrak p \in \Spec(R) \mid 1 - e \not\in \mathfrak p \} \\ & = & \{ \mathfrak p \in \Spec(R) \mid e \not = 1\text{ in }\kappa(\mathfrak p) \} \\ & = & \{ \mathfrak p \in \Spec(R) \mid e = 0\text{ in }\kappa(\mathfrak p) \} \end{eqnarray*} Since the image of $e$ in any residue field is either $1$ or $0$ we deduce that $D(e)$ and $D(1-e)$ cover all of $\Spec(R)$. \end{proof} \begin{lemma} \label{lemma-spec-product} Let $R_1$ and $R_2$ be rings. Let $R = R_1 \times R_2$. The maps $R \to R_1$, $(x, y) \mapsto x$ and $R \to R_2$, $(x, y) \mapsto y$ induce continuous maps $\Spec(R_1) \to \Spec(R)$ and $\Spec(R_2) \to \Spec(R)$. The induced map $$ \Spec(R_1) \amalg \Spec(R_2) \longrightarrow \Spec(R) $$ is a homeomorphism. In other words, the spectrum of $R = R_1\times R_2$ is the disjoint union of the spectrum of $R_1$ and the spectrum of $R_2$. \end{lemma} \begin{proof} Write $1 = e_1 + e_2$ with $e_1 = (1, 0)$ and $e_2 = (0, 1)$. Note that $e_1$ and $e_2 = 1 - e_1$ are idempotents. We leave it to the reader to show that $R_1 = R_{e_1}$ is the localization of $R$ at $e_1$. Similarly for $e_2$. Thus the statement of the lemma follows from Lemma \ref{lemma-idempotent-spec} combined with Lemma \ref{lemma-standard-open}. \end{proof} \noindent We reprove the following lemma later after introducing a glueing lemma for functions. See Section \ref{section-tilde-module-sheaf}. \begin{lemma} \label{lemma-disjoint-decomposition} Let $R$ be a ring. For each $U \subset \Spec(R)$ which is open and closed there exists a unique idempotent $e \in R$ such that $U = D(e)$. This induces a 1-1 correspondence between open and closed subsets $U \subset \Spec(R)$ and idempotents $e \in R$. \end{lemma} \begin{proof} Let $U \subset \Spec(R)$ be open and closed. Since $U$ is closed it is quasi-compact by Lemma \ref{lemma-quasi-compact}, and similarly for its complement. Write $U = \bigcup_{i = 1}^n D(f_i)$ as a finite union of standard opens. Similarly, write $\Spec(R) \setminus U = \bigcup_{j = 1}^m D(g_j)$ as a finite union of standard opens. Since $\emptyset = D(f_i) \cap D(g_j) = D(f_i g_j)$ we see that $f_i g_j$ is nilpotent by Lemma \ref{lemma-Zariski-topology}. Let $I = (f_1, \ldots, f_n) \subset R$ and let $J = (g_1, \ldots, g_m) \subset R$. Note that $V(J)$ equals $U$, that $V(I)$ equals the complement of $U$, so $\Spec(R) = V(I) \amalg V(J)$. By the remark on nilpotency above, we see that $(IJ)^N = (0)$ for some sufficiently large integer $N$. Since $\bigcup D(f_i) \cup \bigcup D(g_j) = \Spec(R)$ we see that $I + J = R$, see Lemma \ref{lemma-Zariski-topology}. By raising this equation to the $2N$th power we conclude that $I^N + J^N = R$. Write $1 = x + y$ with $x \in I^N$ and $y \in J^N$. Then $0 = xy = x(1 - x)$ as $I^N J^N = (0)$. Thus $x = x^2$ is idempotent and contained in $I^N \subset I$. The idempotent $y = 1 - x$ is contained in $J^N \subset J$. This shows that the idempotent $x$ maps to $1$ in every residue field $\kappa(\mathfrak p)$ for $\mathfrak p \in V(J)$ and that $x$ maps to $0$ in $\kappa(\mathfrak p)$ for every $\mathfrak p \in V(I)$. \medskip\noindent To see uniqueness suppose that $e_1, e_2$ are distinct idempotents in $R$. We have to show there exists a prime $\mathfrak p$ such that $e_1 \in \mathfrak p$ and $e_2 \not \in \mathfrak p$, or conversely. Write $e_i' = 1 - e_i$. If $e_1 \not = e_2$, then $0 \not = e_1 - e_2 = e_1(e_2 + e_2') - (e_1 + e_1')e_2 = e_1 e_2' - e_1' e_2$. Hence either the idempotent $e_1 e_2' \not = 0$ or $e_1' e_2 \not = 0$. A nonzero idempotent is not nilpotent, and hence we find a prime $\mathfrak p$ such that either $e_1e_2' \not \in \mathfrak p$ or $e_1'e_2 \not \in \mathfrak p$, by Lemma \ref{lemma-Zariski-topology}. It is easy to see this gives the desired prime. \end{proof} \begin{lemma} \label{lemma-characterize-spec-connected} Let $R$ be a nonzero ring. Then $\Spec(R)$ is connected if and only if $R$ has no nontrivial idempotents. \end{lemma} \begin{proof} Obvious from Lemma \ref{lemma-disjoint-decomposition} and the definition of a connected topological space. \end{proof} \begin{lemma} \label{lemma-ideal-is-squared-union-connected} Let $I \subset R$ be a finitely generated ideal of a ring $R$ such that $I = I^2$. Then \begin{enumerate} \item there exists an idempotent $e \in R$ such that $I = (e)$, \item $R/I \cong R_{e'}$ for the idempotent $e' = 1 - e \in R$, and \item $V(I)$ is open and closed in $\Spec(R)$. \end{enumerate} \end{lemma} \begin{proof} By Nakayama's Lemma \ref{lemma-NAK} there exists an element $f = 1 + i$, $i \in I$ such that $fI = 0$. Then $f^2 = f + fi = f$ is an idempotent. Consider the idempotent $e = 1 - f = -i \in I$. For $j \in I$ we have $ej = j - fj = j$ hence $I = (e)$. This proves (1). \medskip\noindent Parts (2) and (3) follow from (1). Namely, we have $V(I) = V(e) = \Spec(R) \setminus D(e)$ which is open and closed by either Lemma \ref{lemma-idempotent-spec} or Lemma \ref{lemma-disjoint-decomposition}. This proves (3). For (2) observe that the map $R \to R_{e'}$ is surjective since $x/(e')^n = x/e' = xe'/(e')^2 = xe'/e' = x/1$ in $R_{e'}$. The kernel of the map $R \to R_{e'}$ is the set of elements of $R$ annihilated by a positive power of $e'$. Since $e'$ is idempotent this is the ideal of elements annihilated by $e'$ which is the ideal $I = (e)$ as $e + e' = 1$ is a pair of orthogonal idempotents. This proves (2). \end{proof} \section{Connected components of spectra} \label{section-connected-components} % BEGIN ALGEBRA EDITORIAL ROUTE section-connected-components \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-connected-components}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-connected-components \noindent Connected components of spectra are not as easy to understand as one may think at first. This is because we are used to the topology of locally connected spaces, but the spectrum of a ring is in general not locally connected. \begin{lemma} \label{lemma-closed-union-connected-components} Let $R$ be a ring. Let $T \subset \Spec(R)$ be a subset of the spectrum. The following are equivalent \begin{enumerate} \item $T$ is closed and is a union of connected components of $\Spec(R)$, \item $T$ is an intersection of open and closed subsets of $\Spec(R)$, and \item $T = V(I)$ where $I \subset R$ is an ideal generated by idempotents. \end{enumerate} Moreover, the ideal in (3) if it exists is unique. \end{lemma} \begin{proof} By Lemma \ref{lemma-topology-spec} and Topology, Lemma \ref{topology-lemma-closed-union-connected-components} we see that (1) and (2) are equivalent. Assume (2) and write $T = \bigcap U_\alpha$ with $U_\alpha \subset \Spec(R)$ open and closed. Then $U_\alpha = D(e_\alpha)$ for some idempotent $e_\alpha \in R$ by Lemma \ref{lemma-disjoint-decomposition}. Then setting $I = (1 - e_\alpha)$ we see that $T = V(I)$, i.e., (3) holds. Finally, assume (3). Write $T = V(I)$ and $I = (e_\alpha)$ for some collection of idempotents $e_\alpha$. Then it is clear that $T = \bigcap V(e_\alpha) = \bigcap D(1 - e_\alpha)$. \medskip\noindent Suppose that $I$ is an ideal generated by idempotents. Let $e \in R$ be an idempotent such that $V(I) \subset V(e)$. Then by Lemma \ref{lemma-Zariski-topology} we see that $e^n \in I$ for some $n \geq 1$. As $e$ is an idempotent this means that $e \in I$. Hence we see that $I$ is generated by exactly those idempotents $e$ such that $T \subset V(e)$. In other words, the ideal $I$ is completely determined by the closed subset $T$ which proves uniqueness. \end{proof} \begin{lemma} \label{lemma-connected-component} Let $R$ be a ring. A connected component of $\Spec(R)$ is of the form $V(I)$, where $I$ is an ideal generated by idempotents such that every idempotent of $R$ either maps to $0$ or $1$ in $R/I$. \end{lemma} \begin{proof} Let $\mathfrak p$ be a prime of $R$. By Lemma \ref{lemma-topology-spec} we see that the hypotheses of Topology, Lemma \ref{topology-lemma-connected-component-intersection} are satisfied for the topological space $\Spec(R)$. Hence the connected component of $\mathfrak p$ in $\Spec(R)$ is the intersection of open and closed subsets of $\Spec(R)$ containing $\mathfrak p$. Hence it equals $V(I)$ where $I$ is generated by the idempotents $e \in R$ such that $e$ maps to $0$ in $\kappa(\mathfrak p)$, see Lemma \ref{lemma-disjoint-decomposition}. Any idempotent $e$ which is not in this collection clearly maps to $1$ in $R/I$. \end{proof} \section{Glueing properties} \label{section-more-glueing} % BEGIN ALGEBRA EDITORIAL ROUTE section-more-glueing \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-more-glueing}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-more-glueing \noindent In this section we put a number of standard results of the form: if something is true for all members of a standard open covering then it is true. In fact, it often suffices to check things on the level of local rings as in the following lemma. \begin{lemma} \label{lemma-characterize-zero-local} Let $R$ be a ring. \begin{enumerate} \item For an element $x$ of an $R$-module $M$ the following are equivalent \begin{enumerate} \item $x = 0$, \item $x$ maps to zero in $M_\mathfrak p$ for all $\mathfrak p \in \Spec(R)$, \item $x$ maps to zero in $M_{\mathfrak m}$ for all maximal ideals $\mathfrak m$ of $R$. \end{enumerate} In other words, the map $M \to \prod_{\mathfrak m} M_{\mathfrak m}$ is injective. \item Given an $R$-module $M$ the following are equivalent \begin{enumerate} \item $M$ is zero, \item $M_{\mathfrak p}$ is zero for all $\mathfrak p \in \Spec(R)$, \item $M_{\mathfrak m}$ is zero for all maximal ideals $\mathfrak m$ of $R$. \end{enumerate} \item Given a complex $M_1 \to M_2 \to M_3$ of $R$-modules the following are equivalent \begin{enumerate} \item $M_1 \to M_2 \to M_3$ is exact, \item for every prime $\mathfrak p$ of $R$ the localization $M_{1, \mathfrak p} \to M_{2, \mathfrak p} \to M_{3, \mathfrak p}$ is exact, \item for every maximal ideal $\mathfrak m$ of $R$ the localization $M_{1, \mathfrak m} \to M_{2, \mathfrak m} \to M_{3, \mathfrak m}$ is exact. \end{enumerate} \item Given a map $f : M \to M'$ of $R$-modules the following are equivalent \begin{enumerate} \item $f$ is injective, \item $f_{\mathfrak p} : M_\mathfrak p \to M'_\mathfrak p$ is injective for all primes $\mathfrak p$ of $R$, \item $f_{\mathfrak m} : M_\mathfrak m \to M'_\mathfrak m$ is injective for all maximal ideals $\mathfrak m$ of $R$. \end{enumerate} \item Given a map $f : M \to M'$ of $R$-modules the following are equivalent \begin{enumerate} \item $f$ is surjective, \item $f_{\mathfrak p} : M_\mathfrak p \to M'_\mathfrak p$ is surjective for all primes $\mathfrak p$ of $R$, \item $f_{\mathfrak m} : M_\mathfrak m \to M'_\mathfrak m$ is surjective for all maximal ideals $\mathfrak m$ of $R$. \end{enumerate} \item Given a map $f : M \to M'$ of $R$-modules the following are equivalent \begin{enumerate} \item $f$ is bijective, \item $f_{\mathfrak p} : M_\mathfrak p \to M'_\mathfrak p$ is bijective for all primes $\mathfrak p$ of $R$, \item $f_{\mathfrak m} : M_\mathfrak m \to M'_\mathfrak m$ is bijective for all maximal ideals $\mathfrak m$ of $R$. \end{enumerate} \end{enumerate} \end{lemma} \begin{proof} Let $x \in M$ as in (1). Let $I = \{f \in R \mid fx = 0\}$. It is easy to see that $I$ is an ideal (it is the annihilator of $x$). Condition (1)(c) means that for all maximal ideals $\mathfrak m$ there exists an $f \in R \setminus \mathfrak m$ such that $fx =0$. In other words, $V(I)$ does not contain a closed point. By Lemma \ref{lemma-Zariski-topology} we see $I$ is the unit ideal. Hence $x$ is zero, i.e., (1)(a) holds. This proves (1). \medskip\noindent Part (2) follows by applying (1) to all elements of $M$ simultaneously. \medskip\noindent Proof of (3). Let $H$ be the homology of the sequence, i.e., $H = \Ker(M_2 \to M_3)/\Im(M_1 \to M_2)$. By Proposition \ref{proposition-localization-exact} we have that $H_\mathfrak p$ is the homology of the sequence $M_{1, \mathfrak p} \to M_{2, \mathfrak p} \to M_{3, \mathfrak p}$. Hence (3) is a consequence of (2). \medskip\noindent Parts (4) and (5) are special cases of (3). Part (6) follows formally on combining (4) and (5). \end{proof} \begin{lemma} \label{lemma-cover} \begin{slogan} Zariski-local properties of modules and algebras \end{slogan} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S$ be an $R$-algebra. Suppose that $f_1, \ldots, f_n$ is a finite list of elements of $R$ such that $\bigcup D(f_i) = \Spec(R)$, in other words $(f_1, \ldots, f_n) = R$. \begin{enumerate} \item If each $M_{f_i} = 0$ then $M = 0$. \item If each $M_{f_i}$ is a finite $R_{f_i}$-module, then $M$ is a finite $R$-module. \item If each $M_{f_i}$ is a finitely presented $R_{f_i}$-module, then $M$ is a finitely presented $R$-module. \item Let $M \to N$ be a map of $R$-modules. If $M_{f_i} \to N_{f_i}$ is an isomorphism for each $i$ then $M \to N$ is an isomorphism. \item Let $0 \to M'' \to M \to M' \to 0$ be a complex of $R$-modules. If $0 \to M''_{f_i} \to M_{f_i} \to M'_{f_i} \to 0$ is exact for each $i$, then $0 \to M'' \to M \to M' \to 0$ is exact. \item If each $R_{f_i}$ is Noetherian, then $R$ is Noetherian. \item If each $S_{f_i}$ is a finite type $R_{f_i}$-algebra, then $S$ is a finite type $R$-algebra. \item If each $S_{f_i}$ is of finite presentation over $R_{f_i}$, then $S$ is a finitely presented $R$-algebra. \end{enumerate} \end{lemma} \begin{proof} We prove each of the parts in turn. \begin{enumerate} \item By Proposition \ref{proposition-localize-twice} this implies $M_\mathfrak p = 0$ for all $\mathfrak p \in \Spec(R)$, so we conclude by Lemma \ref{lemma-characterize-zero-local}. \item For each $i$ take a finite generating set $X_i$ of $M_{f_i}$. Without loss of generality, we may assume that the elements of $X_i$ are in the image of the localization map $M \rightarrow M_{f_i}$, so we take a finite set $Y_i$ of preimages of the elements of $X_i$ in $M$. Let $Y$ be the union of these sets. This is still a finite set. Consider the obvious $R$-linear map $R^Y \rightarrow M$ sending the basis element $e_y$ to $y$. By assumption this map is surjective after localizing at an arbitrary prime ideal $\mathfrak p$ of $R$, so it is surjective by Lemma \ref{lemma-characterize-zero-local} and $M$ is finitely generated. \item By (2) we have a short exact sequence $$ 0 \rightarrow K \rightarrow R^m \rightarrow M \rightarrow 0 $$ Since localization is an exact functor and $M_{f_i}$ is finitely presented we see that $K_{f_i}$ is finitely generated for all $1 \leq i \leq n$ by Lemma \ref{lemma-extension}. By (2) this implies that $K$ is a finite $R$-module and therefore $M$ is finitely presented. \item By Proposition \ref{proposition-localize-twice} the assumption implies that the induced morphism on localizations at all prime ideals is an isomorphism, so we conclude by Lemma \ref{lemma-characterize-zero-local}. \item By Proposition \ref{proposition-localize-twice} the assumption implies that the induced sequence of localizations at all prime ideals is short exact, so we conclude by Lemma \ref{lemma-characterize-zero-local}. \item We will show that every ideal of $R$ has a finite generating set: For this, let $I \subset R$ be an arbitrary ideal. By Proposition \ref{proposition-localization-exact} each $I_{f_i} \subset R_{f_i}$ is an ideal. These are all finitely generated by assumption, so we conclude by (2). \item For each $i$ take a finite generating set $X_i$ of $S_{f_i}$. Without loss of generality, we may assume that the elements of $X_i$ are in the image of the localization map $S \rightarrow S_{f_i}$, so we take a finite set $Y_i$ of preimages of the elements of $X_i$ in $S$. Let $Y$ be the union of these sets. This is still a finite set. Consider the algebra homomorphism $R[X_y]_{y \in Y} \rightarrow S$ induced by $Y$. Since it is an algebra homomorphism, the image $T$ is an $R$-submodule of the $R$-module $S$, so we can consider the quotient module $S/T$. By assumption, this is zero if we localize at the $f_i$, so it is zero by (1) and therefore $S$ is an $R$-algebra of finite type. \item By the previous item, there exists a surjective $R$-algebra homomorphism $R[X_1, \ldots, X_n] \rightarrow S$. Let $K$ be the kernel of this map. This is an ideal in $R[X_1, \ldots, X_n]$, finitely generated in each localization at $f_i$. Since the $f_i$ generate the unit ideal in $R$, they also generate the unit ideal in $R[X_1, \ldots, X_n]$, so an application of (2) finishes the proof. \end{enumerate} \end{proof} \begin{lemma} \label{lemma-cover-upstairs} Let $R \to S$ be a ring map. Suppose that $g_1, \ldots, g_n$ is a finite list of elements of $S$ such that $\bigcup D(g_i) = \Spec(S)$ in other words $(g_1, \ldots, g_n) = S$. \begin{enumerate} \item If each $S_{g_i}$ is of finite type over $R$, then $S$ is of finite type over $R$. \item If each $S_{g_i}$ is of finite presentation over $R$, then $S$ is of finite presentation over $R$. \end{enumerate} \end{lemma} \begin{proof} Choose $h_1, \ldots, h_n \in S$ such that $\sum h_i g_i = 1$. \medskip\noindent Proof of (1). For each $i$ choose a finite list of elements $x_{i, j} \in S_{g_i}$, $j = 1, \ldots, m_i$ which generate $S_{g_i}$ as an $R$-algebra. Write $x_{i, j} = y_{i, j}/g_i^{n_{i, j}}$ for some $y_{i, j} \in S$ and some $n_{i, j} \ge 0$. Consider the $R$-subalgebra $S' \subset S$ generated by $g_1, \ldots, g_n$, $h_1, \ldots, h_n$ and $y_{i, j}$, $i = 1, \ldots, n$, $j = 1, \ldots, m_i$. Since localization is exact (Proposition \ref{proposition-localization-exact}), we see that $S'_{g_i} \to S_{g_i}$ is injective. On the other hand, it is surjective by our choice of $y_{i, j}$. The elements $g_1, \ldots, g_n$ generate the unit ideal in $S'$ as $h_1, \ldots, h_n \in S'$. Thus $S' \to S$ viewed as an $S'$-module map is an isomorphism by Lemma \ref{lemma-cover}. \medskip\noindent Proof of (2). We already know that $S$ is of finite type. Write $S = R[x_1, \ldots, x_m]/J$ for some ideal $J$. For each $i$ choose a lift $g'_i \in R[x_1, \ldots, x_m]$ of $g_i$ and we choose a lift $h'_i \in R[x_1, \ldots, x_m]$ of $h_i$. Then we see that $$ S_{g_i} = R[x_1, \ldots, x_m, y_i]/(J_i + (1 - y_ig'_i)) $$ where $J_i$ is the ideal of $R[x_1, \ldots, x_m, y_i]$ generated by $J$. Small detail omitted. By Lemma \ref{lemma-finite-presentation-independent} we may choose a finite list of elements $f_{i, j} \in J$, $j = 1, \ldots, m_i$ such that the images of $f_{i, j}$ in $J_i$ and $1 - y_ig'_i$ generate the ideal $J_i + (1 - y_ig'_i)$. Set $$ S' = R[x_1, \ldots, x_m]/\left(\sum h'_ig'_i - 1, f_{i, j}; i = 1, \ldots, n, j = 1, \ldots, m_i\right) $$ There is a surjective $R$-algebra map $S' \to S$. The classes of the elements $g'_1, \ldots, g'_n$ in $S'$ generate the unit ideal and by construction the maps $S'_{g'_i} \to S_{g_i}$ are injective. Thus we conclude as in part (1). \end{proof} \section{Glueing functions} \label{section-tilde-module-sheaf} % BEGIN ALGEBRA EDITORIAL ROUTE section-tilde-module-sheaf \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-tilde-module-sheaf}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-tilde-module-sheaf \noindent In this section we show that given an open covering $$ \Spec(R) = \bigcup\nolimits_{i = 1}^n D(f_i) $$ by standard opens, and given an element $h_i \in R_{f_i}$ for each $i$ such that $h_i = h_j$ as elements of $R_{f_i f_j}$ then there exists a unique $h \in R$ such that the image of $h$ in $R_{f_i}$ is $h_i$. This result can be interpreted in two ways: \begin{enumerate} \item The rule $D(f) \mapsto R_f$ is a sheaf of rings on the standard opens, see Sheaves, Section \ref{sheaves-section-bases}. \item If we think of elements of $R_f$ as the ``algebraic'' or ``regular'' functions on $D(f)$, then these glue as would continuous, resp.\ differentiable functions on a topological, resp.\ differentiable manifold. \end{enumerate} \begin{lemma} \label{lemma-cover-module} Let $R$ be a ring. Let $f_1, \ldots, f_n$ be elements of $R$ generating the unit ideal. Let $M$ be an $R$-module. The sequence $$ 0 \to M \xrightarrow{\alpha} \bigoplus\nolimits_{i = 1}^n M_{f_i} \xrightarrow{\beta} \bigoplus\nolimits_{i, j = 1}^n M_{f_i f_j} $$ is exact, where $\alpha(m) = (m/1, \ldots, m/1)$ and $\beta(m_1/f_1^{e_1}, \ldots, m_n/f_n^{e_n}) = (m_i/f_i^{e_i} - m_j/f_j^{e_j})_{(i, j)}$. \end{lemma} \begin{proof} It suffices to show that the localization of the sequence at any maximal ideal $\mathfrak m$ is exact, see Lemma \ref{lemma-characterize-zero-local}. Since $f_1, \ldots, f_n$ generate the unit ideal, there is an $i$ such that $f_i \not \in \mathfrak m$. After renumbering we may assume $i = 1$. Note that $(M_{f_i})_\mathfrak m = (M_\mathfrak m)_{f_i}$ and $(M_{f_if_j})_\mathfrak m = (M_\mathfrak m)_{f_if_j}$, see Proposition \ref{proposition-localize-twice-module}. In particular $(M_{f_1})_\mathfrak m = M_\mathfrak m$ and $(M_{f_1 f_i})_\mathfrak m = (M_\mathfrak m)_{f_i}$, because $f_1$ is a unit. Note that the maps in the sequence are the canonical ones coming from Lemma \ref{lemma-universal-property-localization-module} and the identity map on $M$. Having said all of this, after replacing $R$ by $R_\mathfrak m$, $M$ by $M_\mathfrak m$, and $f_i$ by their image in $R_\mathfrak m$, and $f_1$ by $1 \in R_\mathfrak m$, we reduce to the case where $f_1 = 1$. \medskip\noindent Assume $f_1 = 1$. Injectivity of $\alpha$ is now trivial. Let $m = (m_i) \in \bigoplus_{i = 1}^n M_{f_i}$ be in the kernel of $\beta$. Then $m_1 \in M_{f_1} = M$. Moreover, $\beta(m) = 0$ implies that $m_1$ and $m_i$ map to the same element of $M_{f_1f_i} = M_{f_i}$. Thus $\alpha(m_1) = m$ and the proof is complete. \end{proof} \begin{lemma} \label{lemma-standard-covering} Let $R$ be a ring, and let $f_1, f_2, \ldots, f_n \in R$ generate the unit ideal in $R$. Then the following sequence is exact: $$ 0 \longrightarrow R \longrightarrow \bigoplus\nolimits_i R_{f_i} \longrightarrow \bigoplus\nolimits_{i, j}R_{f_if_j} $$ where the maps $\alpha : R \longrightarrow \bigoplus_i R_{f_i}$ and $\beta : \bigoplus_i R_{f_i} \longrightarrow \bigoplus_{i, j} R_{f_if_j}$ are defined as $$ \alpha(x) = \left(\frac{x}{1}, \ldots, \frac{x}{1}\right) \text{ and } \beta\left(\frac{x_1}{f_1^{r_1}}, \ldots, \frac{x_n}{f_n^{r_n}}\right) = \left(\frac{x_i}{f_i^{r_i}}-\frac{x_j}{f_j^{r_j}}~\text{in}~R_{f_if_j}\right). $$ \end{lemma} \begin{proof} Special case of Lemma \ref{lemma-cover-module}. \end{proof} \noindent The following we have already seen above, but we state it explicitly here for convenience. \begin{lemma} \label{lemma-disjoint-implies-product} Let $R$ be a ring. If $\Spec(R) = U \amalg V$ with both $U$ and $V$ open then $R \cong R_1 \times R_2$ with $U \cong \Spec(R_1)$ and $V \cong \Spec(R_2)$ via the maps in Lemma \ref{lemma-spec-product}. Moreover, both $R_1$ and $R_2$ are localizations as well as quotients of the ring $R$. \end{lemma} \begin{proof} By Lemma \ref{lemma-disjoint-decomposition} we have $U = D(e)$ and $V = D(1-e)$ for some idempotent $e$. By Lemma \ref{lemma-standard-covering} we see that $R \cong R_e \times R_{1 - e}$ (since clearly $R_{e(1-e)} = 0$ so the glueing condition is trivial; of course it is trivial to prove the product decomposition directly in this case). The lemma follows. \end{proof} \begin{lemma} \label{lemma-when-injective-covering} Let $R$ be a ring. Let $f_1, \ldots, f_n \in R$. Let $M$ be an $R$-module. Then $M \to \bigoplus M_{f_i}$ is injective if and only if $$ M \longrightarrow \bigoplus\nolimits_{i = 1, \ldots, n} M, \quad m \longmapsto (f_1m, \ldots, f_nm) $$ is injective. \end{lemma} \begin{proof} The map $M \to \bigoplus M_{f_i}$ is injective if and only if for all $m \in M$ and $e_1, \ldots, e_n \geq 1$ such that $f_i^{e_i}m = 0$, $i = 1, \ldots, n$ we have $m = 0$. This clearly implies the displayed map is injective. Conversely, suppose the displayed map is injective and $m \in M$ and $e_1, \ldots, e_n \geq 1$ are such that $f_i^{e_i}m = 0$, $i = 1, \ldots, n$. If $e_i = 1$ for all $i$, then we immediately conclude that $m = 0$ from the injectivity of the displayed map. Next, we prove this holds for any such data by induction on $e = \sum e_i$. The base case is $e = n$, and we have just dealt with this. If some $e_i > 1$, then set $m' = f_im$. By induction we see that $m' = 0$. Hence we see that $f_i m = 0$, i.e., we may take $e_i = 1$ which decreases $e$ and we win. \end{proof} \noindent The following lemma is better stated and proved in the more general context of flat descent. However, it makes sense to state it here since it fits well with the above. \begin{lemma} \label{lemma-glue-modules} Let $R$ be a ring. Let $f_1, \ldots, f_n \in R$. Suppose we are given the following data: \begin{enumerate} \item For each $i$ an $R_{f_i}$-module $M_i$. \item For each pair $i, j$ an $R_{f_if_j}$-module isomorphism $\psi_{ij} : (M_i)_{f_j} \to (M_j)_{f_i}$. \end{enumerate} which satisfy the ``cocycle condition'' that all the diagrams $$ \xymatrix{ (M_i)_{f_jf_k} \ar[rd]_{\psi_{ij}} \ar[rr]^{\psi_{ik}} & & (M_k)_{f_if_j} \\ & (M_j)_{f_if_k} \ar[ru]_{\psi_{jk}} } $$ commute (for all triples $i, j, k$). Given this data define $$ M = \Ker\left( \bigoplus\nolimits_{1 \leq i \leq n} M_i \longrightarrow \bigoplus\nolimits_{1 \leq i, j \leq n} (M_i)_{f_j} \right) $$ where $(m_1, \ldots, m_n)$ maps to the element whose $(i, j)$th entry is $m_i/1 - \psi_{ji}(m_j/1)$. Then the natural map $M \to M_i$ induces an isomorphism $M_{f_i} \to M_i$. Moreover $\psi_{ij}(m/1) = m/1$ for all $m \in M$ (with obvious notation). \end{lemma} \begin{proof} To show that $M_{f_1} \to M_1$ is an isomorphism, it suffices to show that its localization at every prime $\mathfrak p'$ of $R_{f_1}$ is an isomorphism, see Lemma \ref{lemma-characterize-zero-local}. Write $\mathfrak p' = \mathfrak p R_{f_1}$ for some prime $\mathfrak p \subset R$, $f_1 \not \in \mathfrak p$, see Lemma \ref{lemma-standard-open}. Since localization is exact (Proposition \ref{proposition-localization-exact}), we see that \begin{align*} (M_{f_1})_{\mathfrak p'} & = M_\mathfrak p \\ & = \Ker\left( \bigoplus\nolimits_{1 \leq i \leq n} M_{i, \mathfrak p} \longrightarrow \bigoplus\nolimits_{1 \leq i, j \leq n} ((M_i)_{f_j})_\mathfrak p \right) \\ & = \Ker\left( \bigoplus\nolimits_{1 \leq i \leq n} M_{i, \mathfrak p} \longrightarrow \bigoplus\nolimits_{1 \leq i, j \leq n} (M_{i, \mathfrak p})_{f_j} \right) \end{align*} Here we also used Proposition \ref{proposition-localize-twice-module}. Since $f_1$ is a unit in $R_\mathfrak p$, this reduces us to the case where $f_1 = 1$ by replacing $R$ by $R_\mathfrak p$, $f_i$ by the image of $f_i$ in $R_\mathfrak p$, $M$ by $M_\mathfrak p$, and $f_1$ by $1$. \medskip\noindent Assume $f_1 = 1$. Then $\psi_{1j} : (M_1)_{f_j} \to M_j$ is an isomorphism for $j = 2, \ldots, n$. If we use these isomorphisms to identify $M_j = (M_1)_{f_j}$, then we see that $\psi_{ij} : (M_1)_{f_if_j} \to (M_1)_{f_if_j}$ is the canonical identification. Thus the complex $$ 0 \to M_1 \to \bigoplus\nolimits_{1 \leq i \leq n} (M_1)_{f_i} \longrightarrow \bigoplus\nolimits_{1 \leq i, j \leq n} (M_1)_{f_if_j} $$ is exact by Lemma \ref{lemma-cover-module}. Thus the first map identifies $M_1$ with $M$ in this case and everything is clear. \end{proof} \section{Zerodivisors and total rings of fractions} \label{section-total-quotient-ring} % BEGIN ALGEBRA EDITORIAL ROUTE section-total-quotient-ring \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-total-quotient-ring}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-total-quotient-ring \noindent The local ring at a minimal prime has the following properties. \begin{lemma} \label{lemma-minimal-prime-reduced-ring} Let $\mathfrak p$ be a minimal prime of a ring $R$. Every element of the maximal ideal of $R_{\mathfrak p}$ is nilpotent. If $R$ is reduced then $R_{\mathfrak p}$ is a field. \end{lemma} \begin{proof} If some element $x$ of ${\mathfrak p}R_{\mathfrak p}$ is not nilpotent, then $D(x) \not = \emptyset$, see Lemma \ref{lemma-Zariski-topology}. This contradicts the minimality of $\mathfrak p$. If $R$ is reduced, then ${\mathfrak p}R_{\mathfrak p} = 0$ and hence $R_{\mathfrak p}$ is a field. \end{proof} \begin{lemma} \label{lemma-reduced-ring-sub-product-fields} Let $R$ be a reduced ring. Then \begin{enumerate} \item $R$ is a subring of a product of fields, \item $R \to \prod_{\mathfrak p\text{ minimal}} R_{\mathfrak p}$ is an embedding into a product of fields, \item $\bigcup_{\mathfrak p\text{ minimal}} \mathfrak p$ is the set of zerodivisors of $R$. \end{enumerate} \end{lemma} \begin{proof} By Lemma \ref{lemma-minimal-prime-reduced-ring} each of the rings $R_\mathfrak p$ is a field. In particular, the kernel of the ring map $R \to R_\mathfrak p$ is $\mathfrak p$. By Lemma \ref{lemma-Zariski-topology} we have $\bigcap_{\mathfrak p} \mathfrak p = (0)$. Hence (2) and (1) are true. If $x y = 0$ and $y \not = 0$, then $y \not \in \mathfrak p$ for some minimal prime $\mathfrak p$. Hence $x \in \mathfrak p$. Thus every zerodivisor of $R$ is contained in $\bigcup_{\mathfrak p\text{ minimal}} \mathfrak p$. Conversely, suppose that $x \in \mathfrak p$ for some minimal prime $\mathfrak p$. Then $x$ maps to zero in $R_\mathfrak p$, hence there exists $y \in R$, $y \not \in \mathfrak p$ such that $xy = 0$. In other words, $x$ is a zerodivisor. This finishes the proof of (3) and the lemma. \end{proof} \noindent The total ring of fractions $Q(R)$ of a ring $R$ was introduced in Example \ref{example-localize-at-prime}. \begin{lemma} \label{lemma-total-ring-fractions} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset consisting of nonzerodivisors. Then $Q(R) \cong Q(S^{-1}R)$. In particular $Q(R) \cong Q(Q(R))$. \end{lemma} \begin{proof} If $x \in S^{-1}R$ is a nonzerodivisor, and $x = r/f$ for some $r \in R$, $f \in S$, then $r$ is a nonzerodivisor in $R$. Whence the lemma. \end{proof} \noindent We can apply glueing results to prove something about total rings of fractions $Q(R)$ which we introduced in Example \ref{example-localize-at-prime}. \begin{lemma} \label{lemma-total-ring-fractions-no-embedded-points} Let $R$ be a ring. Assume that $R$ has finitely many minimal primes $\mathfrak q_1, \ldots, \mathfrak q_t$, and that $\mathfrak q_1 \cup \ldots \cup \mathfrak q_t$ is the set of zerodivisors of $R$. Then the total ring of fractions $Q(R)$ is equal to $R_{\mathfrak q_1} \times \ldots \times R_{\mathfrak q_t}$. \end{lemma} \begin{proof} There are natural maps $Q(R) \to R_{\mathfrak q_i}$ since any nonzerodivisor lies in $R \setminus \mathfrak q_i$. Hence a natural map $Q(R) \to R_{\mathfrak q_1} \times \ldots \times R_{\mathfrak q_t}$. For any nonminimal prime $\mathfrak p \subset R$ we see that $\mathfrak p \not \subset \mathfrak q_1 \cup \ldots \cup \mathfrak q_t$ by Lemma \ref{lemma-silly}. Hence $\Spec(Q(R)) = \{\mathfrak q_1, \ldots, \mathfrak q_t\}$ (as subsets of $\Spec(R)$, see Lemma \ref{lemma-spec-localization}). Therefore $\Spec(Q(R))$ is a finite discrete set and it follows that $Q(R) = A_1 \times \ldots \times A_t$ with $\Spec(A_i) = \{\mathfrak{q}_i\}$, see Lemma \ref{lemma-disjoint-implies-product}. Moreover $A_i$ is a local ring, which is a localization of $R$. Hence $A_i \cong R_{\mathfrak q_i}$. \end{proof} \section{Irreducible components of spectra} \label{section-irreducible} % BEGIN ALGEBRA EDITORIAL ROUTE section-irreducible \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-irreducible}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-irreducible \noindent We show that irreducible components of the spectrum of a ring correspond to the minimal primes in the ring. \begin{lemma} \label{lemma-irreducible} Let $R$ be a ring. \begin{enumerate} \item For a prime $\mathfrak p \subset R$ the closure of $\{\mathfrak p\}$ in the Zariski topology is $V(\mathfrak p)$. In a formula $\overline{\{\mathfrak p\}} = V(\mathfrak p)$. \item The irreducible closed subsets of $\Spec(R)$ are exactly the subsets $V(\mathfrak p)$, with $\mathfrak p \subset R$ a prime. \item The irreducible components (see Topology, Definition \ref{topology-definition-irreducible-components}) of $\Spec(R)$ are exactly the subsets $V(\mathfrak p)$, with $\mathfrak p \subset R$ a minimal prime. \end{enumerate} \end{lemma} \begin{proof} Note that if $ \mathfrak p \in V(I)$, then $I \subset \mathfrak p$. Hence, clearly $\overline{\{\mathfrak p\}} = V(\mathfrak p)$. In particular $V(\mathfrak p)$ is the closure of a singleton and hence irreducible. The second assertion implies the third. To show the second, let $V(I) \subset \Spec(R)$ with $I$ a radical ideal. If $I$ is not prime, then choose $a, b\in R$, $a, b\not \in I$ with $ab\in I$. In this case $V(I, a) \cup V(I, b) = V(I)$, but neither $V(I, b) = V(I)$ nor $V(I, a) = V(I)$, by Lemma \ref{lemma-Zariski-topology}. Hence $V(I)$ is not irreducible. \end{proof} \noindent In other words, this lemma shows that every irreducible closed subset of $\Spec(R)$ is of the form $V(\mathfrak p)$ for some prime $\mathfrak p$. Since $V(\mathfrak p) = \overline{\{\mathfrak p\}}$ we see that each irreducible closed subset has a unique generic point, see Topology, Definition \ref{topology-definition-generic-point}. In particular, $\Spec(R)$ is a sober topological space. We record this fact in the following lemma. \begin{lemma} \label{lemma-spec-spectral} The spectrum of a ring is a spectral space, see Topology, Definition \ref{topology-definition-spectral-space}. \end{lemma} \begin{proof} Formally this follows from Lemma \ref{lemma-irreducible} and Lemma \ref{lemma-topology-spec}. See also discussion above. \end{proof} \begin{lemma} \label{lemma-irreducible-components-containing-x} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime. \begin{enumerate} \item the set of irreducible closed subsets of $\Spec(R)$ passing through $\mathfrak p$ is in one-to-one correspondence with primes $\mathfrak q \subset R_{\mathfrak p}$. \item The set of irreducible components of $\Spec(R)$ passing through $\mathfrak p$ is in one-to-one correspondence with minimal primes $\mathfrak q \subset R_{\mathfrak p}$. \end{enumerate} \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-irreducible} and the description of $\Spec(R_\mathfrak p)$ in Lemma \ref{lemma-spec-localization} which shows that $\Spec(R_\mathfrak p)$ corresponds to primes $\mathfrak q$ in $R$ with $\mathfrak q \subset \mathfrak p$. \end{proof} \begin{lemma} \label{lemma-standard-open-containing-maximal-point} Let $R$ be a ring. Let $\mathfrak p$ be a minimal prime of $R$. Let $W \subset \Spec(R)$ be a quasi-compact open not containing the point $\mathfrak p$. Then there exists an $f \in R$, $f \not \in \mathfrak p$ such that $D(f) \cap W = \emptyset$. \end{lemma} \begin{proof} Since $W$ is quasi-compact we may write it as a finite union of standard affine opens $D(g_i)$, $i = 1, \ldots, n$. Since $\mathfrak p \not \in W$ we have $g_i \in \mathfrak p$ for all $i$. By Lemma \ref{lemma-minimal-prime-reduced-ring} each $g_i$ is nilpotent in $R_{\mathfrak p}$. Hence we can find an $f \in R$, $f \not \in \mathfrak p$ such that for all $i$ we have $f g_i^{n_i} = 0$ for some $n_i > 0$. Then $D(f)$ works. \end{proof} \begin{lemma} \label{lemma-ring-with-only-minimal-primes} Let $R$ be a ring. Let $X = \Spec(R)$ as a topological space. The following are equivalent \begin{enumerate} \item $X$ is profinite, \item $X$ is Hausdorff, \item $X$ is totally disconnected. \item every quasi-compact open of $X$ is closed, \item there are no nontrivial inclusions between its prime ideals, \item every prime ideal is a maximal ideal, \item every prime ideal is minimal, \item every standard open $D(f) \subset X$ is closed. \end{enumerate} \end{lemma} \begin{proof} First proof. It is clear that (5), (6), and (7) are equivalent. It is clear that (4) and (8) are equivalent as every quasi-compact open is a finite union of standard opens. The implication (7) $\Rightarrow$ (4) follows from Lemma \ref{lemma-standard-open-containing-maximal-point}. Assume (4) holds. Let $\mathfrak p, \mathfrak p'$ be distinct primes of $R$. Choose an $f \in \mathfrak p'$, $f \not \in \mathfrak p$ (if needed switch $\mathfrak p$ with $\mathfrak p'$). Then $\mathfrak p' \not \in D(f)$ and $\mathfrak p \in D(f)$. By (4) the open $D(f)$ is also closed. Hence $\mathfrak p$ and $\mathfrak p'$ are in disjoint open neighbourhoods whose union is $X$. Thus $X$ is Hausdorff and totally disconnected. Thus (4) $\Rightarrow$ (2) and (3). If (3) holds then there cannot be any specializations between points of $\Spec(R)$ and we see that (5) holds. If $X$ is Hausdorff then every point is closed, so (2) implies (6). Thus (2), (3), (4), (5), (6), (7) and (8) are equivalent. Any profinite space is Hausdorff, so (1) implies (2). If $X$ satisfies (2) and (3), then $X$ (being quasi-compact by Lemma \ref{lemma-quasi-compact}) is profinite by Topology, Lemma \ref{topology-lemma-profinite}. \medskip\noindent Second proof. Besides the equivalence of (4) and (8) this follows from Lemma \ref{lemma-spec-spectral} and purely topological facts, see Topology, Lemma \ref{topology-lemma-characterize-profinite-spectral}. \end{proof} \section{Examples of spectra of rings} \label{section-examples-spectra} % BEGIN ALGEBRA EDITORIAL ROUTE section-examples-spectra \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-examples-spectra}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-examples-spectra \noindent In this section we put some examples of spectra. \begin{example} \label{example-spec-Zxmodx2minus4} In this example we describe $X = \Spec(\mathbf{Z}[x]/(x^2 - 4))$. Let $\mathfrak{p}$ be an arbitrary prime in $X$. Let $\phi : \mathbf{Z} \to \mathbf{Z}[x]/(x^2 - 4)$ be the natural ring map. Then, $ \phi^{-1}(\mathfrak p)$ is a prime in $\mathbf{Z}$. If $ \phi^{-1}(\mathfrak p) = (2)$, then since $\mathfrak p$ contains $2$, it corresponds to a prime ideal in $\mathbf{Z}[x]/(x^2 - 4, 2) \cong (\mathbf{Z}/2\mathbf{Z})[x]/(x^2)$ via the map $ \mathbf{Z}[x]/(x^2 - 4) \to \mathbf{Z}[x]/(x^2 - 4, 2)$. Any prime in $(\mathbf{Z}/2\mathbf{Z})[x]/(x^2)$ corresponds to a prime in $(\mathbf{Z}/2\mathbf{Z})[x]$ containing $(x^2)$. Such primes will then contain $x$. Since $(\mathbf{Z}/2\mathbf{Z}) \cong (\mathbf{Z}/2\mathbf{Z})[x]/(x)$ is a field, $(x)$ is a maximal ideal. Since any prime contains $(x)$ and $(x)$ is maximal, the ring contains only one prime $(x)$. Thus, in this case, $\mathfrak p = (2, x)$. Now, if $ \phi^{-1}(\mathfrak p) = (q)$ for $q > 2$, then since $\mathfrak p$ contains $q$, it corresponds to a prime ideal in $\mathbf{Z}[x]/(x^2 - 4, q) \cong (\mathbf{Z}/q\mathbf{Z})[x]/(x^2 - 4)$ via the map $ \mathbf{Z}[x]/(x^2 - 4) \to \mathbf{Z}[x]/(x^2 - 4, q)$. Any prime in $(\mathbf{Z}/q\mathbf{Z})[x]/(x^2 - 4)$ corresponds to a prime in $(\mathbf{Z}/q\mathbf{Z})[x]$ containing $(x^2 - 4) = (x -2)(x + 2)$. Hence, these primes must contain either $x -2$ or $x + 2$. Since $(\mathbf{Z}/q\mathbf{Z})[x]$ is a PID, all nonzero primes are maximal, and so there are precisely 2 primes in $(\mathbf{Z}/q\mathbf{Z})[x]$ containing $(x-2)(x + 2)$, namely $(x-2)$ and $(x + 2)$. In conclusion, there exist two primes $(q, x-2)$ and $(q, x + 2)$ since $2 \neq -2 \in \mathbf{Z}/(q)$. Finally, we treat the case where $\phi^{-1}(\mathfrak p) = (0)$. Notice that $\mathfrak p$ corresponds to a prime ideal in $\mathbf{Z}[x]$ that contains $(x^2 - 4) = (x -2)(x + 2)$. Hence, $\mathfrak p$ contains either $(x-2)$ or $(x + 2)$. Hence, $\mathfrak p$ corresponds to a prime in $\mathbf{Z}[x]/(x - 2)$ or one in $\mathbf{Z}[x]/(x + 2)$ that intersects $\mathbf{Z}$ only at $0$, by assumption. Since $\mathbf{Z}[x]/(x - 2) \cong \mathbf{Z}$ and $\mathbf{Z}[x]/(x + 2) \cong \mathbf{Z}$, this means that $\mathfrak p$ must correspond to $0$ in one of these rings. Thus, $\mathfrak p = (x - 2)$ or $\mathfrak p = (x + 2)$ in the original ring. \end{example} \begin{example} \label{example-spec-Zx} In this example we describe $X = \Spec(\mathbf{Z}[x])$. Fix $\mathfrak p \in X$. Let $\phi : \mathbf{Z} \to \mathbf{Z}[x]$ and notice that $\phi^{-1}(\mathfrak p) \in \Spec(\mathbf{Z})$. If $\phi^{-1}(\mathfrak p) = (q)$ for $q$ a prime number $q > 0$, then $\mathfrak p$ corresponds to a prime in $(\mathbf{Z}/(q))[x]$, which must be generated by a polynomial that is irreducible in $(\mathbf{Z}/(q))[x]$. If we choose a representative of this polynomial with minimal degree, then it will also be irreducible in $\mathbf{Z}[x]$. Hence, in this case $\mathfrak p = (q, f_q)$ where $f_q$ is an irreducible polynomial in $\mathbf{Z}[x]$ that is irreducible when viewed in $(\mathbf{Z}/(q) [x])$. Now, assume that $\phi^{-1}(\mathfrak p) = (0)$. In this case, if $\mathfrak p = (0)$ there is nothing more to prove. Otherwise, $\mathfrak p$ contains nonconstant polynomials which, since $\mathfrak p$ is prime, may be assumed to be irreducible in $\mathbf{Z}[x]$. By Gauss' lemma, these polynomials are also irreducible in $\mathbf{Q}[x]$. Since $\mathbf{Q}[x]$ is a Euclidean domain, if there are at least two distinct irreducibles $f, g$ generating $\mathfrak p$, then $1 = af + bg$ for $a, b \in \mathbf{Q}[x]$. Multiplying through by a common denominator, we see that $m = \bar{a}f + \bar{b} g$ for $\bar{a}, \bar{b} \in \mathbf{Z}[x]$ and nonzero $m \in \mathbf{Z}$. This is a contradiction. Hence, $\mathfrak p$ is generated by one irreducible polynomial in $\mathbf{Z}[x]$. \end{example} \begin{example} \label{example-spec-kxy} In this example we describe $X = \Spec(k[x, y])$ when $k$ is an arbitrary field. Clearly $(0)$ is prime, and any principal ideal generated by an irreducible polynomial will also be a prime since $k[x, y]$ is a unique factorization domain. Now assume $\mathfrak p$ is an element of $X$ that is not principal. Since $k[x, y]$ is a Noetherian UFD, the prime ideal $\mathfrak p$ can be generated by a finite number of irreducible polynomials $(f_1, \ldots, f_n)$. Now, I claim that if $f, g$ are irreducible polynomials in $k[x, y]$ that are not associates, then $(f, g) \cap k[x] \neq 0$. To do this, it is enough to show that $f$ and $g$ are relatively prime when viewed in $k(x)[y]$. In this case, $k(x)[y]$ is a Euclidean domain, so by applying the Euclidean algorithm and clearing denominators, we obtain $p = af + bg$ for $0 \ne p \in k[x]$ and $a, b \in k[x, y]$. Thus, assume this is not the case, that is, that some nonunit $h \in k(x)[y]$ divides both $f$ and $g$. Then, by Gauss's lemma, for some $a, b \in k(x)$ we have $ah | f$ and $bh | g$ for $ah, bh \in k[x, y]$. By irreducibility, $ah = f$ and $bh = g$ (since $h \notin k(x)$). So, back in $k(x)[y]$, $f, g $ are associates, as $\frac{a}{b} g = f$. Since $k(x)$ is the fraction field of $k[x]$, we can write $g = \frac{r}{s} f $ for elements $r , s \in k[x]$ sharing no common factors. This implies that $sg = rf$ in $k[x, y]$ and so $s$ must divide $f$ since $k[x, y]$ is a UFD. Hence, $s = 1$ or $s = f$. If $s = f$, then $r = g$, implying $f, g \in k[x]$ and thus must be units in $k(x)$ and relatively prime in $k(x)[y]$, contradicting our hypothesis. If $s = 1$, then $g = rf$, another contradiction. Thus, we must have $f, g$ relatively prime in $k(x)[y]$, a Euclidean domain. Thus, we have reduced to the case $\mathfrak p$ contains some irreducible polynomial $p \in k[x] \subset k[x, y]$. By the above, $\mathfrak p$ corresponds to a prime in the ring $k[x, y]/(p) = k(\alpha)[y]$, where $\alpha$ is an element algebraic over $k$ with minimum polynomial $p$. This is a PID, and so any prime ideal corresponds to $(0)$ or an irreducible polynomial in $k(\alpha)[y]$. Thus, $\mathfrak p$ is of the form $(p)$ or $(p, f)$ where $f$ is a polynomial in $k[x, y]$ that is irreducible in the quotient $k[x, y]/(p)$. \end{example} \begin{example} \label{example-affine-open-not-standard} Consider the ring $$ R = \{ f \in \mathbf{Q}[z]\text{ with }f(0) = f(1) \}. $$ Consider the map $$ \varphi : \mathbf{Q}[A, B] \to R $$ defined by $\varphi(A) = z^2-z$ and $\varphi(B) = z^3-z^2$. It is easily checked that $(A^3 - B^2 + AB) \subset \Ker(\varphi)$ and that $A^3 - B^2 + AB$ is irreducible. Assume that $\varphi$ is surjective; then since $R$ is an integral domain (it is a subring of an integral domain), $\Ker(\varphi)$ must be a prime ideal of $\mathbf{Q}[A, B]$. The prime ideals which contain $(A^3-B^2 + AB)$ are $(A^3-B^2 + AB)$ itself and any maximal ideal $(f, g)$ with $f, g\in\mathbf{Q}[A, B]$ such that $f$ is irreducible mod $g$. But $R$ is not a field, so the kernel must be $(A^3-B^2 + AB)$; hence $\varphi$ gives an isomorphism $R \to \mathbf{Q}[A, B]/(A^3-B^2 + AB)$. \medskip\noindent To see that $\varphi$ is surjective, we must express any $f\in R$ as a $\mathbf{Q}$-coefficient polynomial in $A(z) = z^2-z$ and $B(z) = z^3-z^2$. Note the relation $zA(z) = B(z)$. Let $a = f(0) = f(1)$. Then $z(z-1)$ must divide $f(z)-a$, so we can write $f(z) = z(z-1)g(z)+a = A(z)g(z)+a$. If $\deg(g) < 2$, then $g(z) = c_1z + c_0$ and $f(z) = A(z)(c_1z + c_0)+a = c_1B(z)+c_0A(z)+a$, so we are done. If $\deg(g)\geq 2$, then by the polynomial division algorithm, we can write $g(z) = A(z)h(z)+b_1z + b_0$ ($\deg(h)\leq\deg(g)-2$), so $f(z) = A(z)^2h(z)+b_1B(z)+b_0A(z)+a$. Applying division to $h(z)$ and iterating, we obtain an expression for $f(z)$ as a polynomial in $A(z)$ and $B(z)$; hence $\varphi$ is surjective. \medskip\noindent Now let $a \in \mathbf{Q}$, $a \neq 0, \frac{1}{2}, 1$ and consider $$ R_a = \{ f \in \mathbf{Q}[z, \frac{1}{z-a}]\text{ with }f(0) = f(1) \}. $$ This is a finitely generated $\mathbf{Q}$-algebra as well: it is easy to check that the functions $z^2-z$, $z^3-z$, and $\frac{a^2-a}{z-a}+z$ generate $R_a$ as an $\mathbf{Q}$-algebra. We have the following inclusions: $$ R\subset R_a\subset\mathbf{Q}[z, \frac{1}{z-a}], \quad R\subset\mathbf{Q}[z]\subset\mathbf{Q}[z, \frac{1}{z-a}]. $$ Recall (Lemma \ref{lemma-spec-localization}) that for a ring $T$ and a multiplicative subset $S\subset T$, the ring map $T \to S^{-1}T$ induces a map on spectra $\Spec(S^{-1}T) \to \Spec(T)$ which is a homeomorphism onto the subset $$ \{\mathfrak p \in \Spec(T) \mid S \cap \mathfrak p = \emptyset\} \subset \Spec(T). $$ When $S = \{ 1, f, f^2, \ldots\}$ for some $f\in T$, this is the open set $D(f)\subset \Spec(T)$. We now verify a corresponding property for the ring map $R \to R_a$: we will show that the map $\theta : \Spec(R_a) \to \Spec(R)$ induced by inclusion $R\subset R_a$ is a homeomorphism onto an open subset of $\Spec(R)$ by verifying that $\theta$ is an injective local homeomorphism. We do so with respect to an open cover of $\Spec(R_a)$ by two distinguished opens, as we now describe. For any $r\in\mathbf{Q}$, let $\text{ev}_r : R \to \mathbf{Q}$ be the homomorphism given by evaluation at $r$. Note that for $r = 0$ and $r = 1-a$, this can be extended to a homomorphism $\text{ev}_r' : R_a \to \mathbf{Q}$ (the latter because $\frac{1}{z-a}$ is well-defined at $z = 1-a$, since $a\neq\frac{1}{2}$). However, $\text{ev}_a$ does not extend to $R_a$. Write $\mathfrak{m}_r = \Ker(\text{ev}_r)$. We have $$ \mathfrak{m}_0 = (z^2-z, z^3-z), $$ $$ \mathfrak{m}_a = ((z-1 + a)(z-a), (z^2-1 + a)(z-a)), \text{ and} $$ $$ \mathfrak{m}_{1-a} = ((z-1 + a)(z-a), (z-1 + a)(z^2-a)). $$ To verify this, note that the right-hand sides are clearly contained in the left-hand sides. Then check that the right-hand sides are maximal ideals by writing the generators in terms of $A$ and $B$, and viewing $R$ as $\mathbf{Q}[A, B]/(A^3-B^2 + AB)$. Note that $\mathfrak{m}_a$ is not in the image of $\theta$: we have $$ (z^2 - z)^2(z - a)\left(\frac{a^2 - a}{z - a} + z\right) = (z^2 - z)^2(a^2 - a) + (z^2 - z)^2(z - a)z $$ The left hand side is in $\mathfrak m_a R_a$ because $(z^2 - z)(z - a)$ is in $\mathfrak m_a$ and because $(z^2 - z)(\frac{a^2 - a}{z - a} + z)$ is in $R_a$. Similarly the element $(z^2 - z)^2(z - a)z$ is in $\mathfrak m_a R_a$ because $(z^2 - z)$ is in $R_a$ and $(z^2 - z)(z - a)$ is in $\mathfrak m_a$. As $a \not \in \{0, 1\}$ we conclude that $(z^2 - z)^2 \in \mathfrak m_a R_a$. Hence no ideal $I$ of $R_a$ can satisfy $I \cap R = \mathfrak m_a$, as such an $I$ would have to contain $(z^2 - z)^2$, which is in $R$ but not in $\mathfrak m_a$. The distinguished open set $D((z-1 + a)(z-a))\subset\Spec(R)$ is equal to the complement of the closed set $\{\mathfrak{m}_a, \mathfrak{m}_{1-a}\}$. Then check that $R_{(z-1 + a)(z-a)} = (R_a)_{(z-1 + a)(z-a)}$; calling this localized ring $R'$, then, it follows that the map $R \to R'$ factors as $R \to R_a \to R'$. By Lemma \ref{lemma-spec-localization}, then, these maps express $\Spec(R') \subset \Spec(R_a)$ and $\Spec(R') \subset \Spec(R)$ as open subsets; hence $\theta : \Spec(R_a) \to \Spec(R)$, when restricted to $D((z-1 + a)(z-a))$, is a homeomorphism onto an open subset. Similarly, $\theta$ restricted to $D((z^2 + z + 2a-2)(z-a)) \subset \Spec(R_a)$ is a homeomorphism onto the open subset $D((z^2 + z + 2a-2)(z-a)) \subset \Spec(R)$. Depending on whether $z^2 + z + 2a-2$ is irreducible or not over $\mathbf{Q}$, this former distinguished open set has complement equal to one or two closed points along with the closed point $\mathfrak{m}_a$. Furthermore, the ideal in $R_a$ generated by the elements $(z^2 + z + 2a-2)(z-a)$ and $(z-1 + a)(z-a)$ is all of $R_a$, so these two distinguished open sets cover $\Spec(R_a)$. Hence in order to show that $\theta$ is a homeomorphism onto $\Spec(R)-\{\mathfrak{m}_a\}$, it suffices to show that these one or two points can never equal $\mathfrak{m}_{1-a}$. And this is indeed the case, since $1-a$ is a root of $z^2 + z + 2a-2$ if and only if $a = 0$ or $a = 1$, both of which do not occur. \medskip\noindent Despite this homeomorphism which mimics the behavior of a localization at an element of $R$, while $\mathbf{Q}[z, \frac{1}{z-a}]$ is the localization of $\mathbf{Q}[z]$ at the element $z-a$, the ring $R_a$ is {\it not} a localization of $R$: Any proper localization $S^{-1}R$ results in more units than the original ring $R$. The units of $R$ are $\mathbf{Q}^\times$, the units of $\mathbf{Q}$. In fact, it is easy to see that the units of $R_a$ are $\mathbf{Q}^*$. Namely, the units of $\mathbf{Q}[z, \frac{1}{z - a}]$ are $c (z - a)^n$ for $c \in \mathbf{Q}^*$ and $n \in \mathbf{Z}$ and it is clear that these are in $R_a$ only if $n = 0$. Hence $R_a$ has no more units than $R$ does, and thus cannot be a localization of $R$. \medskip\noindent We used the fact that $a\neq 0, 1$ to ensure that $\frac{1}{z-a}$ makes sense at $z = 0, 1$. We used the fact that $a\neq 1/2$ in a few places: (1) In order to be able to talk about the kernel of $\text{ev}_{1-a}$ on $R_a$, which ensures that $\mathfrak{m}_{1-a}$ is a point of $R_a$ (i.e., that $R_a$ is missing just one point of $R$). (2) At the end in order to conclude that $(z-a)^n$ can belong to $R_a$ only for $n = 0$; indeed, if $a = 1/2$, then it belongs to $R_a$ whenever $n$ is even. Hence there would indeed be more units in $R_a$ than in $R$, and $R_a$ could possibly be a localization of $R$. \end{example} \section{A meta-observation about prime ideals} \label{section-oka-families} % BEGIN ALGEBRA EDITORIAL ROUTE section-oka-families \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-oka-families}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-oka-families \noindent This section is taken from the CRing project. Let $R$ be a ring and let $S \subset R$ be a multiplicative subset. A consequence of Lemma \ref{lemma-spec-localization} is that an ideal $I \subset R$ maximal with respect to the property of not intersecting $S$ is prime. The reason is that $I = R \cap \mathfrak m$ for some maximal ideal $\mathfrak m$ of the ring $S^{-1}R$. It turns out that for many properties of ideals, the maximal ones are prime. A general method of seeing this was developed in \cite{Lam-Reyes}. In this section, we digress to explain this phenomenon. \medskip\noindent Let $R$ be a ring. If $I$ is an ideal of $R$ and $a \in R$, we define $$ (I : a) = \left\{ x \in R \mid xa \in I\right\}. $$ More generally, if $J \subset R$ is an ideal, we define $$ (I : J) = \left\{ x \in R \mid xJ \subset I\right\}. $$ \begin{lemma} \label{lemma-colon} Let $R$ be a ring. For a principal ideal $J \subset R$, and for any ideal $I \subset J$ we have $I = J (I : J)$. \end{lemma} \begin{proof} Say $J = (a)$. Then $(I : J) = (I : a)$. Since $I \subset J$ we see that any $y \in I$ is of the form $y = xa$ for some $x \in (I : a)$. Hence $I \subset J (I : J)$. Conversely, if $x \in (I : a)$, then $xJ = (xa) \subset I$, which proves the other inclusion. \end{proof} \noindent Let $\mathcal{F}$ be a collection of ideals of $R$. We are interested in conditions that will guarantee that the maximal elements in the complement of $\mathcal{F}$ are prime. \begin{definition} \label{definition-oka-family} Let $R$ be a ring. Let $\mathcal{F}$ be a set of ideals of $R$. We say $\mathcal{F}$ is an {\it Oka family} if $R \in \mathcal{F}$ and whenever $I \subset R$ is an ideal and $(I : a), (I, a) \in \mathcal{F}$ for some $a \in R$, then $I \in \mathcal{F}$. \end{definition} \noindent Let us give some examples of Oka families. The first example is the basic example discussed in the introduction to this section. \begin{example} \label{example-oka-family-not-meet-multiplicative-set} Let $R$ be a ring and let $S$ be a multiplicative subset of $R$. We claim that $\mathcal{F} = \{I \subset R \mid I \cap S \not = \emptyset\}$ is an Oka family. Namely, suppose that $(I : a), (I, a) \in \mathcal{F}$ for some $a \in R$. Then pick $s \in (I, a) \cap S$ and $s' \in (I : a) \cap S$. Then $ss' \in I \cap S$ and hence $I \in \mathcal{F}$. Thus $\mathcal{F}$ is an Oka family. \end{example} \begin{example} \label{example-oka-family-finitely-generated} Let $R$ be a ring, $I \subset R$ an ideal, and $a \in R$. If $(I : a)$ is generated by $a_1, \ldots, a_n$ and $(I, a)$ is generated by $a, b_1, \ldots, b_m$ with $b_1, \ldots, b_m \in I$, then $I$ is generated by $aa_1, \ldots, aa_n, b_1, \ldots, b_m$. To see this, note that if $x \in I$, then $x \in (I, a)$ is a linear combination of $a, b_1, \ldots, b_m$, but the coefficient of $a$ must lie in $(I:a)$. As a result, we deduce that the family of finitely generated ideals is an Oka family. \end{example} \begin{example} \label{example-oka-family-principal} Let us show that the family of principal ideals of a ring $R$ is an Oka family. Indeed, suppose $I \subset R$ is an ideal, $a \in R$, and $(I, a)$ and $(I : a)$ are principal. Note that $(I : a) = (I : (I, a))$. Setting $J = (I, a)$, we find that $J$ is principal and $(I : J)$ is too. By Lemma \ref{lemma-colon} we have $I = J (I : J)$. Thus we find in our situation that since $J = (I, a)$ and $(I : J)$ are principal, $I$ is principal. \end{example} \begin{example} \label{example-oka-family-bound-cardinality} Let $R$ be a ring. Let $\kappa$ be an infinite cardinal. The family of ideals which can be generated by at most $\kappa$ elements is an Oka family. The argument is analogous to the argument in Example \ref{example-oka-family-finitely-generated} and is omitted. \end{example} \begin{example} \label{example-oka-family-property-modules} Let $A$ be a ring, $I \subset A$ an ideal, and $a \in A$ an element. There is a short exact sequence $0 \to A/(I : a) \to A/I \to A/(I, a) \to 0$ where the first arrow is given by multiplication by $a$. Thus if $P$ is a property of $A$-modules that is stable under extensions and holds for $0$, then the family of ideals $I$ such that $A/I$ has $P$ is an Oka family. \end{example} \begin{proposition} \label{proposition-oka} If $\mathcal{F}$ is an Oka family of ideals, then any maximal element of the complement of $\mathcal{F}$ is prime. \end{proposition} \begin{proof} Suppose $I \not \in \mathcal{F}$ is maximal with respect to not being in $\mathcal{F}$ but $I$ is not prime. Note that $I \not = R$ because $R \in \mathcal{F}$. Since $I$ is not prime we can find $a, b \in R - I$ with $ab \in I$. It follows that $(I, a) \neq I$ and $(I : a)$ contains $b \not \in I$ so also $(I : a) \neq I$. Thus $(I : a), (I, a)$ both strictly contain $I$, so they must belong to $\mathcal{F}$. By the Oka condition, we have $I \in \mathcal{F}$, a contradiction. \end{proof} \noindent At this point we are able to turn most of the examples above into a lemma about prime ideals in a ring. \begin{lemma} \label{lemma-simple} Let $R$ be a ring. Let $S$ be a multiplicative subset of $R$. An ideal $I \subset R$ which is maximal with respect to the property that $I \cap S = \emptyset$ is prime. \end{lemma} \begin{proof} This is the example discussed in the introduction to this section. For an alternative proof, combine Example \ref{example-oka-family-not-meet-multiplicative-set} with Proposition \ref{proposition-oka}. \end{proof} \begin{lemma} \label{lemma-cohen} Let $R$ be a ring. \begin{enumerate} \item An ideal $I \subset R$ maximal with respect to not being finitely generated is prime. \item If every prime ideal of $R$ is finitely generated, then every ideal of $R$ is finitely generated\footnote{Later we will say that $R$ is Noetherian.}. \end{enumerate} \end{lemma} \begin{proof} The first assertion is an immediate consequence of Example \ref{example-oka-family-finitely-generated} and Proposition \ref{proposition-oka}. For the second, suppose that there exists an ideal $I \subset R$ which is not finitely generated. The union of a totally ordered chain $\left\{I_\alpha\right\}$ of ideals that are not finitely generated is not finitely generated; indeed, if $I = \bigcup I_\alpha$ were generated by $a_1, \ldots, a_n$, then all the generators would belong to some $I_\alpha $ and would consequently generate it. By Zorn's lemma, there is an ideal maximal with respect to being not finitely generated. By the first part this ideal is prime. \end{proof} \begin{lemma} \label{lemma-primes-principal} Let $R$ be a ring. \begin{enumerate} \item An ideal $I \subset R$ maximal with respect to not being principal is prime. \item If every prime ideal of $R$ is principal, then every ideal of $R$ is principal. \end{enumerate} \end{lemma} \begin{proof} The first part follows from Example \ref{example-oka-family-principal} and Proposition \ref{proposition-oka}. For the second, suppose that there exists an ideal $I \subset R$ which is not principal. The union of a totally ordered chain $\left\{I_\alpha\right\}$ of ideals that are not principal is not principal; indeed, if $I = \bigcup I_\alpha$ were generated by $a$, then $a$ would belong to some $I_\alpha $ and $a$ would generate it. By Zorn's lemma, there is an ideal maximal with respect to not being principal. This ideal is necessarily prime by the first part. \end{proof} \begin{lemma} \label{lemma-characterize-domain} Let $R$ be a ring. \begin{enumerate} \item An ideal maximal among the ideals which do not contain a nonzerodivisor is prime. \item If $R$ is nonzero and every nonzero prime ideal in $R$ contains a nonzerodivisor, then $R$ is a domain. \end{enumerate} \end{lemma} \begin{proof} Consider the set $S$ of nonzerodivisors. It is a multiplicative subset of $R$. Hence any ideal maximal with respect to not intersecting $S$ is prime, see Lemma \ref{lemma-simple}. Thus, if every nonzero prime ideal contains a nonzerodivisor, then $(0)$ is prime, i.e., $R$ is a domain. \end{proof} \begin{remark} \label{remark-cohen-bound-cardinality} Let $R$ be a ring. Let $\kappa$ be an infinite cardinal. By applying Example \ref{example-oka-family-bound-cardinality} and Proposition \ref{proposition-oka} we see that any ideal maximal with respect to the property of not being generated by $\kappa$ elements is prime. This result is not so useful because there exists a ring for which every prime ideal of $R$ can be generated by $\aleph_0$ elements, but some ideal cannot. Namely, let $k$ be a field, let $T$ be a set whose cardinality is greater than $\aleph_0$ and let $$ R = k[\{x_n\}_{n \geq 1}, \{z_{t, n}\}_{t \in T, n \geq 0}]/ (x_n^2, z_{t, n}^2, x_n z_{t, n} - z_{t, n - 1}) $$ This is a local ring with unique prime ideal $\mathfrak m = (x_n)$. But the ideal $(z_{t, n})$ cannot be generated by countably many elements. \end{remark} \begin{example} \label{example-noetherian-topology-on-spec} \begin{reference} Comment by Lukas Heger of November 12, 2020. \end{reference} Let $R$ be a ring and $X = \Spec(R)$. Since closed subsets of $X$ correspond to radical ideals of $R$ (Lemma \ref{lemma-Zariski-topology}) we see that $X$ is a Noetherian topological space if and only if we have ACC for radical ideals. This holds if and only if every radical ideal is the radical of a finitely generated ideal (details omitted). Let $$ \mathcal{F} = \{I \subset R \mid \sqrt{I} = \sqrt{(f_1, \ldots, f_n)}\text{ for some }n \text{ and }f_1, \ldots, f_n \in R\}. $$ The reader can show that $\mathcal{F}$ is an Oka family by using the identity $$ \sqrt{I} = \sqrt{(I, a)(I : a)} $$ which holds for any ideal $I \subset R$ and any element $a \in R$. On the other hand, if we have a totally ordered chain of ideals $\{I_\alpha\}$ none of which are in $\mathcal{F}$, then the union $I = \bigcup I_\alpha$ cannot be in $\mathcal{F}$ either. Otherwise $\sqrt{I} = \sqrt{(f_1, \ldots, f_n)}$, then $f_i^e \in I$ for some $e$, then $f_i^e \in I_\alpha$ for some $\alpha$ independent of $i$, then $\sqrt{I_\alpha} = \sqrt{(f_1, \ldots, f_n)}$, contradiction. Thus if the set of ideals not in $\mathcal{F}$ is nonempty, then it has maximal elements and exactly as in Lemma \ref{lemma-cohen} we conclude that $X$ is a Noetherian topological space if and only if every prime ideal of $R$ is equal to $\sqrt{(f_1, \ldots, f_n)}$ for some $f_1, \ldots, f_n \in R$. If we ever need this result we will carefully state and prove this result here. \end{example} \section{Images of ring maps of finite presentation} \label{section-images-finite-presentation} % BEGIN ALGEBRA EDITORIAL ROUTE section-images-finite-presentation \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-images-finite-presentation}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-images-finite-presentation \noindent In this section we prove some results on the topology of maps $\Spec(S) \to \Spec(R)$ induced by ring maps $R \to S$, mainly Chevalley's Theorem. In order to do this we will use the notions of constructible sets, quasi-compact sets, retrocompact sets, and so on which are defined in Topology, Section \ref{topology-section-constructible}. \begin{lemma} \label{lemma-qc-open} Let $U \subset \Spec(R)$ be open. The following are equivalent: \begin{enumerate} \item $U$ is retrocompact in $\Spec(R)$, \item $U$ is quasi-compact, \item $U$ is a finite union of standard opens, and \item there exists a finitely generated ideal $I \subset R$ such that $\Spec(R) \setminus V(I) = U$. \end{enumerate} \end{lemma} \begin{proof} We have (1) $\Rightarrow$ (2) because $\Spec(R)$ is quasi-compact, see Lemma \ref{lemma-quasi-compact}. We have (2) $\Rightarrow$ (3) because standard opens form a basis for the topology. Proof of (3) $\Rightarrow$ (1). Let $U = \bigcup_{i = 1\ldots n} D(f_i)$. To show that $U$ is retrocompact in $\Spec(R)$ it suffices to show that $U \cap V$ is quasi-compact for any quasi-compact open $V$ of $\Spec(R)$. Write $V = \bigcup_{j = 1\ldots m} D(g_j)$ which is possible by (2) $\Rightarrow$ (3). Each standard open is homeomorphic to the spectrum of a ring and hence quasi-compact, see Lemmas \ref{lemma-standard-open} and \ref{lemma-quasi-compact}. Thus $U \cap V = (\bigcup_{i = 1\ldots n} D(f_i)) \cap (\bigcup_{j = 1\ldots m} D(g_j)) = \bigcup_{i, j} D(f_i g_j)$ is a finite union of quasi-compact opens hence quasi-compact. To finish the proof note that (4) is equivalent to (3) by Lemma \ref{lemma-Zariski-topology}. \end{proof} \begin{lemma} \label{lemma-affine-map-quasi-compact} Let $\varphi : R \to S$ be a ring map. The induced continuous map $f : \Spec(S) \to \Spec(R)$ is quasi-compact. For any constructible set $E \subset \Spec(R)$ the inverse image $f^{-1}(E)$ is constructible in $\Spec(S)$. \end{lemma} \begin{proof} We first show that the inverse image of any quasi-compact open $U \subset \Spec(R)$ is quasi-compact. By Lemma \ref{lemma-qc-open} we may write $U$ as a finite union of standard opens. Thus by Lemma \ref{lemma-spec-functorial} we see that $f^{-1}(U)$ is a finite union of standard opens. Hence $f^{-1}(U)$ is quasi-compact by Lemma \ref{lemma-qc-open} again. The second assertion now follows from Topology, Lemma \ref{topology-lemma-inverse-images-constructibles}. \end{proof} \begin{lemma} \label{lemma-constructible} Let $R$ be a ring. A subset of $\Spec(R)$ is constructible if and only if it can be written as a finite union of subsets of the form $D(f) \cap V(g_1, \ldots, g_m)$ for $f, g_1, \ldots, g_m \in R$. \end{lemma} \begin{proof} By Lemma \ref{lemma-qc-open} the subset $D(f)$ and the complement of $V(g_1, \ldots, g_m)$ are retro-compact open. Hence $D(f) \cap V(g_1, \ldots, g_m)$ is a constructible subset and so is any finite union of such. Conversely, let $T \subset \Spec(R)$ be constructible. By Topology, Definition \ref{topology-definition-constructible}, we may assume that $T = U \cap V^c$, where $U, V \subset \Spec(R)$ are retrocompact open. By Lemma \ref{lemma-qc-open} we may write $U = \bigcup_{i = 1, \ldots, n} D(f_i)$ and $V = \bigcup_{j = 1, \ldots, m} D(g_j)$. Then $T = \bigcup_{i = 1, \ldots, n} \big(D(f_i) \cap V(g_1, \ldots, g_m)\big)$. \end{proof} \begin{lemma} \label{lemma-constructible-is-image} Let $R$ be a ring and let $T \subset \Spec(R)$ be constructible. Then there exists a ring map $R \to S$ of finite presentation such that $T$ is the image of $\Spec(S)$ in $\Spec(R)$. \end{lemma} \begin{proof} The spectrum of a finite product of rings is the disjoint union of the spectra, see Lemma \ref{lemma-spec-product}. Hence if $T = T_1 \cup T_2$ and the result holds for $T_1$ and $T_2$, then the result holds for $T$. By Lemma \ref{lemma-constructible} we may assume that $T = D(f) \cap V(g_1, \ldots, g_m)$. In this case $T$ is the image of the map $\Spec((R/(g_1, \ldots, g_m))_f) \to \Spec(R)$, see Lemmas \ref{lemma-standard-open} and \ref{lemma-spec-closed}. \end{proof} \begin{lemma} \label{lemma-open-fp} Let $R$ be a ring. Let $f$ be an element of $R$. Let $S = R_f$. Then the image of a constructible subset of $\Spec(S)$ is constructible in $\Spec(R)$. \end{lemma} \begin{proof} We repeatedly use Lemma \ref{lemma-qc-open} without mention. Let $U, V$ be quasi-compact open in $\Spec(S)$. We will show that the image of $U \cap V^c$ is constructible. Under the identification $\Spec(S) = D(f)$ of Lemma \ref{lemma-standard-open} the sets $U, V$ correspond to quasi-compact opens $U', V'$ of $\Spec(R)$. Hence it suffices to show that $U' \cap (V')^c$ is constructible in $\Spec(R)$ which is clear. \end{proof} \begin{lemma} \label{lemma-closed-fp} Let $R$ be a ring. Let $I$ be a finitely generated ideal of $R$. Let $S = R/I$. Then the image of a constructible subset of $\Spec(S)$ is constructible in $\Spec(R)$. \end{lemma} \begin{proof} If $I = (f_1, \ldots, f_m)$, then we see that $V(I)$ is the complement of $\bigcup D(f_i)$, see Lemma \ref{lemma-Zariski-topology}. Hence it is constructible, by Lemma \ref{lemma-qc-open}. Denote the map $R \to S$ by $f \mapsto \overline{f}$. We have to show that if $\overline{U}, \overline{V}$ are retrocompact opens of $\Spec(S)$, then the image of $\overline{U} \cap \overline{V}^c$ in $\Spec(R)$ is constructible. By Lemma \ref{lemma-qc-open} we may write $\overline{U} = \bigcup D(\overline{g_i})$. Setting $U = \bigcup D({g_i})$ we see $\overline{U}$ has image $U \cap V(I)$ which is constructible in $\Spec(R)$. Similarly the image of $\overline{V}$ equals $V \cap V(I)$ for some retrocompact open $V$ of $\Spec(R)$. Hence the image of $\overline{U} \cap \overline{V}^c$ equals $U \cap V(I) \cap V^c$ as desired. \end{proof} \begin{lemma} \label{lemma-affineline-open} Let $R$ be a ring. The map $\Spec(R[x]) \to \Spec(R)$ is open, and the image of any standard open is a quasi-compact open. \end{lemma} \begin{proof} It suffices to show that the image of a standard open $D(f)$, $f\in R[x]$ is quasi-compact open. The image of $D(f)$ is the image of $\Spec(R[x]_f) \to \Spec(R)$. Let $\mathfrak p \subset R$ be a prime ideal. Let $\overline{f}$ be the image of $f$ in $\kappa(\mathfrak p)[x]$. Recall, see Lemma \ref{lemma-in-image}, that $\mathfrak p$ is in the image if and only if $R[x]_f \otimes_R \kappa(\mathfrak p) = \kappa(\mathfrak p)[x]_{\overline{f}}$ is not the zero ring. This is exactly the condition that $f$ does not map to zero in $\kappa(\mathfrak p)[x]$, in other words, that some coefficient of $f$ is not in $\mathfrak p$. Hence we see: if $f = a_d x^d + \ldots + a_0$, then the image of $D(f)$ is $D(a_d) \cup \ldots \cup D(a_0)$. \end{proof} \noindent We prove a property of characteristic polynomials which will be used below. \begin{lemma} \label{lemma-characteristic-polynomial-prime} Let $R \to A$ be a ring homomorphism. Assume $A \cong R^{\oplus n}$ as an $R$-module. Let $f \in A$. The multiplication map $m_f: A \to A$ is $R$-linear and hence has a characteristic polynomial $P(T) = T^n + r_{n-1}T^{n-1} + \ldots + r_0 \in R[T]$. For any prime $\mathfrak{p} \in \Spec(R)$, $f$ acts nilpotently on $A \otimes_R \kappa(\mathfrak{p})$ if and only if $\mathfrak p \in V(r_0, \ldots, r_{n-1})$. \end{lemma} \begin{proof} This follows quite easily once we prove that the characteristic polynomial $\bar P(T) \in \kappa(\mathfrak p)[T]$ of the multiplication map $m_{\bar f}: A \otimes_R \kappa(\mathfrak p) \to A \otimes_R \kappa(\mathfrak p)$ which multiplies elements of $A \otimes_R \kappa(\mathfrak p)$ by $\bar f$, the image of $f$ viewed in $A\otimes_R\kappa(\mathfrak p)$, is just the image of $P(T)$ in $\kappa(\mathfrak p)[T]$. Let $(a_{ij})$ be the matrix of the map $m_f$ with entries in $R$, using a basis $e_1, \ldots, e_n$ of $A$ as an $R$-module. Then, $A \otimes_R \kappa(\mathfrak p) \cong (R \otimes_R \kappa(\mathfrak p))^{\oplus n} = \kappa(\mathfrak p)^n$, which is an $n$-dimensional vector space over $\kappa(\mathfrak p)$ with basis $e_1 \otimes 1, \ldots, e_n \otimes 1$. The image $\bar f = f \otimes 1$, and so the multiplication map $m_{\bar f}$ has matrix $(a_{ij} \otimes 1)$. Thus, the characteristic polynomial is precisely the image of $P(T)$. \medskip\noindent From linear algebra, we know that a linear transformation acts nilpotently on an $n$-dimensional vector space if and only if the characteristic polynomial is $T^n$ (since the characteristic polynomial divides some power of the minimal polynomial). Hence, $f$ acts nilpotently on $A \otimes_R \kappa(\mathfrak p)$ if and only if $\bar P(T) = T^n$. This occurs if and only if $r_i \in \mathfrak p$ for all $0 \leq i \leq n - 1$, that is when $\mathfrak p \in V(r_0, \ldots, r_{n - 1}).$ \end{proof} \begin{lemma} \label{lemma-affineline-special} Let $R$ be a ring. Let $f, g \in R[x]$ be polynomials. Assume the leading coefficient of $g$ is a unit of $R$. There exist elements $r_i\in R$, $i = 1\ldots, n$ such that the image of $D(f) \cap V(g)$ in $\Spec(R)$ is $\bigcup_{i = 1, \ldots, n} D(r_i)$. \end{lemma} \begin{proof} Write $g = ux^d + a_{d-1}x^{d-1} + \ldots + a_0$, where $d$ is the degree of $g$, and hence $u \in R^*$. Consider the ring $A = R[x]/(g)$. It is, as an $R$-module, finite free with basis the images of $1, x, \ldots, x^{d-1}$. Consider multiplication by (the image of) $f$ on $A$. This is an $R$-module map. Hence we can let $P(T) \in R[T]$ be the characteristic polynomial of this map. Write $P(T) = T^d + r_{d-1} T^{d-1} + \ldots + r_0$. We claim that $r_0, \ldots, r_{d-1}$ have the desired property. We will use below the property of characteristic polynomials that $$ \mathfrak p \in V(r_0, \ldots, r_{d-1}) \Leftrightarrow \text{multiplication by }f\text{ is nilpotent on } A \otimes_R \kappa(\mathfrak p). $$ This was proved in Lemma \ref{lemma-characteristic-polynomial-prime}. \medskip\noindent Suppose $\mathfrak q\in D(f) \cap V(g)$, and let $\mathfrak p = \mathfrak q \cap R$. Then there is a nonzero map $A \otimes_R \kappa(\mathfrak p) \to \kappa(\mathfrak q)$ which is compatible with multiplication by $f$. And $f$ acts as a unit on $\kappa(\mathfrak q)$. Thus we conclude $\mathfrak p \not \in V(r_0, \ldots, r_{d-1})$. \medskip\noindent On the other hand, suppose that $r_i \not\in \mathfrak p$ for some prime $\mathfrak p$ of $R$ and some $0 \leq i \leq d - 1$. Then multiplication by $f$ is not nilpotent on the algebra $A \otimes_R \kappa(\mathfrak p)$. Hence there exists a prime ideal $\overline{\mathfrak q} \subset A \otimes_R \kappa(\mathfrak p)$ not containing the image of $f$. The inverse image of $\overline{\mathfrak q}$ in $R[x]$ is an element of $D(f) \cap V(g)$ mapping to $\mathfrak p$. \end{proof} \begin{theorem}[Chevalley's Theorem] \label{theorem-chevalley} Suppose that $R \to S$ is of finite presentation. The image of a constructible subset of $\Spec(S)$ in $\Spec(R)$ is constructible. \end{theorem} \begin{proof} Write $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$. We may factor $R \to S$ as $R \to R[x_1] \to R[x_1, x_2] \to \ldots \to R[x_1, \ldots, x_{n-1}] \to S$. Hence we may assume that $S = R[x]/(f_1, \ldots, f_m)$. In this case we factor the map as $R \to R[x] \to S$, and by Lemma \ref{lemma-closed-fp} we reduce to the case $S = R[x]$. By Lemma \ref{lemma-constructible} it suffices to show that if $T = (\bigcup_{i = 1\ldots n} D(f_i)) \cap V(g_1, \ldots, g_m)$ for $f_i , g_j \in R[x]$ then the image in $\Spec(R)$ is constructible. Since finite unions of constructible sets are constructible, it suffices to deal with the case $n = 1$, i.e., when $T = D(f) \cap V(g_1, \ldots, g_m)$. \medskip\noindent Note that if $c \in R$, then we have $$ \Spec(R) = V(c) \amalg D(c) = \Spec(R/(c)) \amalg \Spec(R_c), $$ and correspondingly $\Spec(R[x]) = V(c) \amalg D(c) = \Spec(R/(c)[x]) \amalg \Spec(R_c[x])$. The intersection of $T = D(f) \cap V(g_1, \ldots, g_m)$ with each part still has the same shape, with $f$, $g_i$ replaced by their images in $R/(c)[x]$, respectively $R_c[x]$. Note that the image of $T$ in $\Spec(R)$ is the union of the image of $T \cap V(c)$ and $T \cap D(c)$. Using Lemmas \ref{lemma-open-fp} and \ref{lemma-closed-fp} it suffices to prove the images of both parts are constructible in $\Spec(R/(c))$, respectively $\Spec(R_c)$. \medskip\noindent Let us assume we have $T = D(f) \cap V(g_1, \ldots, g_m)$ as above, with $\deg(g_1) \leq \deg(g_2) \leq \ldots \leq \deg(g_m)$. We are going to use induction on $m$, and on the degrees of the $g_i$. Let $d_1 = \deg(g_1)$, i.e., $g_1 = c x^{d_1} + l.o.t$ with $c \in R$ not zero. Cutting $R$ up into the pieces $R/(c)$ and $R_c$ we either lower the degree of $g_1$ (and this is covered by induction) or we reduce to the case where $c$ is invertible. If $c$ is invertible, and $m > 1$, then write $g_2 = c' x^{d_2} + l.o.t$. In this case consider $g_2' = g_2 - (c'/c) x^{d_2 - d_1} g_1$. Since the ideals $(g_1, g_2, \ldots, g_m)$ and $(g_1, g_2', g_3, \ldots, g_m)$ are equal we see that $T = D(f) \cap V(g_1, g_2', g_3\ldots, g_m)$. But here the degree of $g_2'$ is strictly less than the degree of $g_2$ and hence this case is covered by induction. \medskip\noindent The bases case for the induction above are the cases (a) $T = D(f) \cap V(g)$ where the leading coefficient of $g$ is invertible, and (b) $T = D(f)$. These two cases are dealt with in Lemmas \ref{lemma-affineline-special} and \ref{lemma-affineline-open}. \end{proof} \section{More on images} \label{section-more-images} % BEGIN ALGEBRA EDITORIAL ROUTE section-more-images \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-more-images}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-more-images \noindent In this section we collect a few additional lemmas concerning the image on $\Spec$ for ring maps. See also Section \ref{section-going-up} for example. \begin{lemma} \label{lemma-generic-finite-presentation} Let $R \subset S$ be an inclusion of domains. Assume that $R \to S$ is of finite type. There exists a nonzero $f \in R$, and a nonzero $g \in S$ such that $R_f \to S_{fg}$ is of finite presentation. \end{lemma} \begin{proof} By induction on the number of generators of $S$ over $R$. During the proof we may replace $R$ by $R_f$ and $S$ by $S_f$ for some nonzero $f \in R$. \medskip\noindent Suppose that $S$ is generated by a single element over $R$. Then $S = R[x]/\mathfrak q$ for some prime ideal $\mathfrak q \subset R[x]$. If $\mathfrak q = (0)$ there is nothing to prove. If $\mathfrak q \not = (0)$, then let $h \in \mathfrak q$ be a nonzero element with minimal degree in $x$. Write $h = f x^d + a_{d - 1} x^{d - 1} + \ldots + a_0$ with $a_i \in R$ and $f \not = 0$. After inverting $f$ in $R$ and $S$ we may assume that $h$ is monic. We obtain a surjective $R$-algebra map $R[x]/(h) \to S$. We have $R[x]/(h) = R \oplus Rx \oplus \ldots \oplus Rx^{d - 1}$ as an $R$-module and by minimality of $d$ we see that $R[x]/(h)$ maps injectively into $S$. Thus $R[x]/(h) \cong S$ is finitely presented over $R$. \medskip\noindent Suppose that $S$ is generated by $n > 1$ elements over $R$. Say $x_1, \ldots, x_n \in S$ generate $S$. Denote $S' \subset S$ the $R$-subalgebra generated by $x_1, \ldots, x_{n-1}$. By induction hypothesis we see that there exist $f\in R$ and $g \in S'$ nonzero such that $R_f \to S'_{fg}$ is of finite presentation. Next we apply the induction hypothesis to $S'_{fg} \to S_{fg}$ to see that there exist $f' \in S'_{fg}$ and $g' \in S_{fg}$ such that $S'_{fgf'} \to S_{fgf'g'}$ is of finite presentation. We leave it to the reader to conclude. \end{proof} \begin{lemma} \label{lemma-characterize-image-finite-type} Let $R \to S$ be a finite type ring map. Denote $X = \Spec(R)$ and $Y = \Spec(S)$. Write $f : Y \to X$ for the induced map of spectra. Let $E \subset Y = \Spec(S)$ be a constructible set. If a point $\xi \in X$ is in $f(E)$, then $\overline{\{\xi\}} \cap f(E)$ contains an open dense subset of $\overline{\{\xi\}}$. \end{lemma} \begin{proof} Let $\xi \in X$ be a point of $f(E)$. Choose a point $\eta \in E$ mapping to $\xi$. Let $\mathfrak p \subset R$ be the prime corresponding to $\xi$ and let $\mathfrak q \subset S$ be the prime corresponding to $\eta$. Consider the diagram $$ \xymatrix{ \eta \ar[r] \ar@{|->}[d] & E \cap Y' \ar[r] \ar[d] & Y' = \Spec(S/\mathfrak q) \ar[r] \ar[d] & Y \ar[d] \\ \xi \ar[r] & f(E) \cap X' \ar[r] & X' = \Spec(R/\mathfrak p) \ar[r] & X } $$ By Lemma \ref{lemma-affine-map-quasi-compact} the set $E \cap Y'$ is constructible in $Y'$. It follows that we may replace $X$ by $X'$ and $Y$ by $Y'$. Hence we may assume that $R \subset S$ is an inclusion of domains, $\xi$ is the generic point of $X$, and $\eta$ is the generic point of $Y$. By Lemma \ref{lemma-generic-finite-presentation} combined with Chevalley's theorem (Theorem \ref{theorem-chevalley}) we see that there exist dense opens $U \subset X$, $V \subset Y$ such that $f(V) \subset U$ and such that $f : V \to U$ maps constructible sets to constructible sets. Note that $E \cap V$ is constructible in $V$, see Topology, Lemma \ref{topology-lemma-open-immersion-constructible-inverse-image}. Hence $f(E \cap V)$ is constructible in $U$ and contains $\xi$. By Topology, Lemma \ref{topology-lemma-generic-point-in-constructible} we see that $f(E \cap V)$ contains a dense open $U' \subset U$. \end{proof} \noindent At the end of this section we present a few more results on images of maps on Spectra that have nothing to do with constructible sets. \begin{lemma} \label{lemma-surjective-spec-radical-ideal} Let $\varphi : R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item The map $\Spec(S) \to \Spec(R)$ is surjective. \item For any ideal $I \subset R$ the inverse image of $\sqrt{IS}$ in $R$ is equal to $\sqrt{I}$. \item For any radical ideal $I \subset R$ the inverse image of $IS$ in $R$ is equal to $I$. \item For every prime $\mathfrak p$ of $R$ the inverse image of $\mathfrak p S$ in $R$ is $\mathfrak p$. \end{enumerate} In this case the same is true after any base change: Given a ring map $R \to R'$ the ring map $R' \to R' \otimes_R S$ has the equivalent properties (1), (2), (3) as well. \end{lemma} \begin{proof} If $J \subset S$ is an ideal, then $\sqrt{\varphi^{-1}(J)} = \varphi^{-1}(\sqrt{J})$. This shows that (2) and (3) are equivalent. The implication (3) $\Rightarrow$ (4) is immediate. If $I \subset R$ is a radical ideal, then Lemma \ref{lemma-Zariski-topology} guarantees that $I = \bigcap_{I \subset \mathfrak p} \mathfrak p$. Hence (4) $\Rightarrow$ (2). By Lemma \ref{lemma-in-image} we have $\mathfrak p = \varphi^{-1}(\mathfrak p S)$ if and only if $\mathfrak p$ is in the image. Hence (1) $\Leftrightarrow$ (4). Thus (1), (2), (3), and (4) are equivalent. \medskip\noindent Assume (1) holds. Let $R \to R'$ be a ring map. Let $\mathfrak p' \subset R'$ be a prime ideal lying over the prime $\mathfrak p$ of $R$. To see that $\mathfrak p'$ is in the image of $\Spec(R' \otimes_R S) \to \Spec(R')$ we have to show that $(R' \otimes_R S) \otimes_{R'} \kappa(\mathfrak p')$ is not zero, see Lemma \ref{lemma-in-image}. But we have $$ (R' \otimes_R S) \otimes_{R'} \kappa(\mathfrak p') = S \otimes_R \kappa(\mathfrak p) \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p') $$ which is not zero as $S \otimes_R \kappa(\mathfrak p)$ is not zero by assumption and $\kappa(\mathfrak p) \to \kappa(\mathfrak p')$ is an extension of fields. \end{proof} \begin{lemma} \label{lemma-domain-image-dense-set-points-generic-point} Let $R$ be a domain. Let $\varphi : R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item The ring map $R \to S$ is injective. \item The image $\Spec(S) \to \Spec(R)$ contains a dense set of points. \item There exists a prime ideal $\mathfrak q \subset S$ whose inverse image in $R$ is $(0)$. \end{enumerate} \end{lemma} \begin{proof} Let $K$ be the field of fractions of the domain $R$. Assume that $R \to S$ is injective. Since localization is exact we see that $K \to S \otimes_R K$ is injective. Hence there is a prime mapping to $(0)$ by Lemma \ref{lemma-in-image}. \medskip\noindent Note that $(0)$ is dense in $\Spec(R)$, so that the last condition implies the second. \medskip\noindent Suppose the second condition holds. Let $f \in R$, $f \not = 0$. As $R$ is a domain we see that $V(f)$ is a proper closed subset of $\Spec(R)$. By assumption there exists a prime $\mathfrak q$ of $S$ such that $\varphi(f) \not \in \mathfrak q$. Hence $\varphi(f) \not = 0$. Hence $R \to S$ is injective. \end{proof} \begin{lemma} \label{lemma-injective-minimal-primes-in-image} Let $R \subset S$ be an injective ring map. Then $\Spec(S) \to \Spec(R)$ hits all the minimal primes. \end{lemma} \begin{proof} Let $\mathfrak p \subset R$ be a minimal prime. In this case $R_{\mathfrak p}$ has a unique prime ideal. Hence it suffices to show that $S_{\mathfrak p}$ is not zero. And this follows from the fact that localization is exact, see Proposition \ref{proposition-localization-exact}. \end{proof} \begin{lemma} \label{lemma-image-dense-generic-points} Let $R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item The kernel of $R \to S$ consists of nilpotent elements. \item The minimal primes of $R$ are in the image of $\Spec(S) \to \Spec(R)$. \item The image of $\Spec(S) \to \Spec(R)$ is dense in $\Spec(R)$. \end{enumerate} \end{lemma} \begin{proof} Let $I = \Ker(R \to S)$. Note that $\sqrt{(0)} = \bigcap_{\mathfrak q \subset S} \mathfrak q$, see Lemma \ref{lemma-Zariski-topology}. Hence $\sqrt{I} = \bigcap_{\mathfrak q \subset S} R \cap \mathfrak q$. Thus $V(I) = V(\sqrt{I})$ is the closure of the image of $\Spec(S) \to \Spec(R)$. This shows that (1) is equivalent to (3). It is clear that (2) implies (3). Finally, assume (1). We may replace $R$ by $R/I$ and $S$ by $S/IS$ without affecting the topology of the spectra and the map. Hence the implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-injective-minimal-primes-in-image}. \end{proof} \begin{lemma} \label{lemma-minimal-prime-image-minimal-prime} Let $R \to S$ be a ring map. If a minimal prime $\mathfrak p \subset R$ is in the image of $\Spec(S) \to \Spec(R)$, then it is the image of a minimal prime. \end{lemma} \begin{proof} Say $\mathfrak p = \mathfrak q \cap R$. Then choose a minimal prime $\mathfrak r \subset S$ with $\mathfrak r \subset \mathfrak q$, see Lemma \ref{lemma-Zariski-topology}. By minimality of $\mathfrak p$ we see that $\mathfrak p = \mathfrak r \cap R$. \end{proof} \begin{lemma} \label{lemma-intersection-not-zero} Let $A \subset B$ be an inclusion of domains inducing an algebraic extension of fraction fields. If $J \subset B$ is a nonzero ideal, then $A \cap J$ is nonzero too. Thus the image of a proper closed subset of $\Spec(B)$ is not dense in $\Spec(A)$. \end{lemma} \begin{proof} Let $x \in J$ be a nonzero element. Since $x$ is algebraic over the fraction field of $A$, there exists a $d \geq 1$ and $a_0, \ldots, a_d \in A$ with $a_0, a_d \not = 0$ such that $a_d x^d + a_{d - 1} x^{d - 1} + \ldots + a_0 = 0$ in $B$. Then $a_0 \in A \cap J$. \end{proof} \section{Noetherian rings} \label{section-Noetherian} % BEGIN ALGEBRA EDITORIAL ROUTE section-Noetherian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Noetherian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Noetherian \noindent A ring $R$ is {\it Noetherian} if any ideal of $R$ is finitely generated. This is clearly equivalent to the ascending chain condition for ideals of $R$. By Lemma \ref{lemma-cohen} it suffices to check that every prime ideal of $R$ is finitely generated. \begin{lemma} \label{lemma-Noetherian-permanence} \begin{slogan} Noetherian property is stable by passage to finite type extension and localization. \end{slogan} Any finitely generated ring over a Noetherian ring is Noetherian. Any localization of a Noetherian ring is Noetherian. \end{lemma} \begin{proof} The statement on localizations follows from the fact that any ideal $J \subset S^{-1}R$ is of the form $I \cdot S^{-1}R$. Any quotient $R/I$ of a Noetherian ring $R$ is Noetherian because any ideal $\overline{J} \subset R/I$ is of the form $J/I$ for some ideal $I \subset J \subset R$. Thus it suffices to show that if $R$ is Noetherian so is $R[X]$. Suppose $J_1 \subset J_2 \subset \ldots$ is an ascending chain of ideals in $R[X]$. Consider the ideals $I_{i, d}$ defined as the ideal of elements of $R$ which occur as leading coefficients of degree $d$ polynomials in $J_i$. Clearly $I_{i, d} \subset I_{i', d'}$ whenever $i \leq i'$ and $d \leq d'$. By the ascending chain condition in $R$ there are at most finitely many distinct ideals among all of the $I_{i, d}$. (Hint: Any infinite set of elements of $\mathbf{N} \times \mathbf{N}$ contains an increasing infinite sequence.) Take $i_0$ so large that $I_{i, d} = I_{i_0, d}$ for all $i \geq i_0$ and all $d$. Suppose $f \in J_i$ for some $i \geq i_0$. By induction on the degree $d = \deg(f)$ we show that $f \in J_{i_0}$. Namely, there exists a $g\in J_{i_0}$ whose degree is $d$ and which has the same leading coefficient as $f$. By induction $f - g \in J_{i_0}$ and we win. \end{proof} \begin{lemma} \label{lemma-Noetherian-power-series} If $R$ is a Noetherian ring, then so is the formal power series ring $R[[x_1, \ldots, x_n]]$. \end{lemma} \begin{proof} Since $R[[x_1, \ldots, x_{n + 1}]] \cong R[[x_1, \ldots, x_n]][[x_{n + 1}]]$ it suffices to prove the statement that $R[[x]]$ is Noetherian if $R$ is Noetherian. Let $I \subset R[[x]]$ be an ideal. We have to show that $I$ is a finitely generated ideal. For each nonnegative integer $d$ denote $I_d = \{a \in R \mid ax^d + \text{h.o.t.} \in I\}$. Then we see that $I_0 \subset I_1 \subset \ldots$ stabilizes as $R$ is Noetherian. Choose $d_0$ such that $I_{d_0} = I_{d_0 + 1} = \ldots$. For each $d \leq d_0$ choose elements $f_{d, j} \in I \cap (x^d)$, $j = 1, \ldots, n_d$ such that if we write $f_{d, j} = a_{d, j}x^d + \text{h.o.t}$ then $I_d = (a_{d, j})$. Denote $I' = (\{f_{d, j}\}_{d = 0, \ldots, d_0, j = 1, \ldots, n_d})$. Then it is clear that $I' \subset I$. Pick $f \in I$. First we may choose $c_{d, i} \in R$ such that $$ f - \sum c_{d, i} f_{d, i} \in (x^{d_0 + 1}) \cap I. $$ Next, we can choose $c_{i, 1} \in R$, $i = 1, \ldots, n_{d_0}$ such that $$ f - \sum c_{d, i} f_{d, i} - \sum c_{i, 1}xf_{d_0, i} \in (x^{d_0 + 2}) \cap I. $$ Next, we can choose $c_{i, 2} \in R$, $i = 1, \ldots, n_{d_0}$ such that $$ f - \sum c_{d, i} f_{d, i} - \sum c_{i, 1}xf_{d_0, i} - \sum c_{i, 2}x^2f_{d_0, i} \in (x^{d_0 + 3}) \cap I. $$ And so on. In the end we see that $$ f = \sum c_{d, i} f_{d, i} + \sum\nolimits_i (\sum\nolimits_e c_{i, e} x^e)f_{d_0, i} $$ is contained in $I'$ as desired. \end{proof} \noindent The following lemma, although easy, is useful because finite type $\mathbf{Z}$-algebras come up quite often in a technique called ``absolute Noetherian reduction''. \begin{lemma} \label{lemma-obvious-Noetherian} Any finite type algebra over a field is Noetherian. Any finite type algebra over $\mathbf{Z}$ is Noetherian. \end{lemma} \begin{proof} This is immediate from Lemma \ref{lemma-Noetherian-permanence} and the fact that fields are Noetherian rings and that $\mathbf{Z}$ is a Noetherian ring (because it is a principal ideal domain). \end{proof} \begin{lemma} \label{lemma-Noetherian-finite-type-is-finite-presentation} Let $R$ be a Noetherian ring. \begin{enumerate} \item Any finite $R$-module is of finite presentation. \item Any submodule of a finite $R$-module is finite. \item Any finite type $R$-algebra is of finite presentation over $R$. \end{enumerate} \end{lemma} \begin{proof} Let $M$ be a finite $R$-module. By Lemma \ref{lemma-trivial-filter-finite-module} we can find a finite filtration of $M$ whose successive quotients are of the form $R/I$. Since any ideal is finitely generated, each of the quotients $R/I$ is finitely presented. Hence $M$ is finitely presented by Lemma \ref{lemma-extension}. This proves (1). \medskip\noindent Let $N \subset M$ be a submodule. As $M$ is finite, the quotient $M/N$ is finite. Thus $M/N$ is of finite presentation by part (1). Thus we see that $N$ is finite by Lemma \ref{lemma-extension} part (5). This proves part (2). \medskip\noindent To see (3) note that any ideal of $R[x_1, \ldots, x_n]$ is finitely generated by Lemma \ref{lemma-Noetherian-permanence}. \end{proof} \begin{lemma} \label{lemma-Noetherian-topology} If $R$ is a Noetherian ring then $\Spec(R)$ is a Noetherian topological space, see Topology, Definition \ref{topology-definition-noetherian}. \end{lemma} \begin{proof} This is because any closed subset of $\Spec(R)$ is uniquely of the form $V(I)$ with $I$ a radical ideal, see Lemma \ref{lemma-Zariski-topology}. And this correspondence is inclusion reversing. Thus the result follows from the definitions. \end{proof} \begin{lemma} \label{lemma-Noetherian-irreducible-components} \begin{slogan} A Noetherian affine scheme has finitely many generic points. \end{slogan} If $R$ is a Noetherian ring then $\Spec(R)$ has finitely many irreducible components. In other words $R$ has finitely many minimal primes. \end{lemma} \begin{proof} By Lemma \ref{lemma-Noetherian-topology} and Topology, Lemma \ref{topology-lemma-Noetherian} we see there are finitely many irreducible components. By Lemma \ref{lemma-irreducible} these correspond to minimal primes of $R$. \end{proof} \begin{lemma} \label{lemma-Noetherian-base-change-finite-type} Let $R \to S$ be a ring map. Let $R \to R'$ be of finite type. If $S$ is Noetherian, then the base change $S' = R' \otimes_R S$ is Noetherian. \end{lemma} \begin{proof} By Lemma \ref{lemma-base-change-finiteness} finite type is stable under base change. Thus $S \to S'$ is of finite type. Since $S$ is Noetherian we can apply Lemma \ref{lemma-Noetherian-permanence}. \end{proof} \begin{lemma} \label{lemma-Noetherian-field-extension} Let $k$ be a field and let $R$ be a Noetherian $k$-algebra. If $K/k$ is a finitely generated field extension then $K \otimes_k R$ is Noetherian. \end{lemma} \begin{proof} Since $K/k$ is a finitely generated field extension, there exists a finitely generated $k$-algebra $B \subset K$ such that $K$ is the fraction field of $B$. In other words, $K = S^{-1}B$ with $S = B \setminus \{0\}$. Then $K \otimes_k R = S^{-1}(B \otimes_k R)$. Then $B \otimes_k R$ is Noetherian by Lemma \ref{lemma-Noetherian-base-change-finite-type}. Finally, $K \otimes_k R = S^{-1}(B \otimes_k R)$ is Noetherian by Lemma \ref{lemma-Noetherian-permanence}. \end{proof} \noindent Here are some fun lemmas that are sometimes useful. \begin{lemma} \label{lemma-subring-of-local-ring} Let $R$ be a ring and $\mathfrak p \subset R$ be a prime. There exists an $f \in R$, $f \not \in \mathfrak p$ such that $R_f \to R_\mathfrak p$ is injective in each of the following cases \begin{enumerate} \item $R$ is a domain, \item $R$ is Noetherian, or \item $R$ is reduced and has finitely many minimal primes. \end{enumerate} \end{lemma} \begin{proof} If $R$ is a domain, then $R \subset R_\mathfrak p$, hence $f = 1$ works. If $R$ is Noetherian, then the kernel $I$ of $R \to R_\mathfrak p$ is a finitely generated ideal and we can find $f \in R$, $f \not \in \mathfrak p$ such that $IR_f = 0$. For this $f$ the map $R_f \to R_\mathfrak p$ is injective and $f$ works. If $R$ is reduced with finitely many minimal primes $\mathfrak p_1, \ldots, \mathfrak p_n$, then we can choose $f \in \bigcap_{\mathfrak p_i \not \subset \mathfrak p} \mathfrak p_i$, $f \not \in \mathfrak p$. Indeed, if $\mathfrak{p}_i\not\subset \mathfrak{p}$ then there exist $f_i \in \mathfrak{p}_i$, $f_i \not\in \mathfrak{p}$ and $f = \prod f_i$ works. For this $f$ we have $R_f \subset R_\mathfrak p$ because the minimal primes of $R_f$ correspond to minimal primes of $R_\mathfrak p$ and we can apply Lemma \ref{lemma-reduced-ring-sub-product-fields} (some details omitted). \end{proof} \begin{lemma} \label{lemma-surjective-endo-noetherian-ring-is-iso} Any surjective endomorphism of a Noetherian ring is an isomorphism. \end{lemma} \begin{proof} If $f : R \to R$ were such an endomorphism but not injective, then $$ \Ker(f) \subset \Ker(f \circ f) \subset \Ker(f \circ f \circ f) \subset \ldots $$ would be a strictly increasing chain of ideals. \end{proof} \section{Locally nilpotent ideals} \label{section-locally-nilpotent} % BEGIN ALGEBRA EDITORIAL ROUTE section-locally-nilpotent \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-locally-nilpotent}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-locally-nilpotent \noindent Here is the definition. \begin{definition} \label{definition-locally-nilpotent-ideal} Let $R$ be a ring. Let $I \subset R$ be an ideal. We say $I$ is {\it locally nilpotent} if for every $x \in I$ there exists an $n \in \mathbf{N}$ such that $x^n = 0$. We say $I$ is {\it nilpotent} if there exists an $n \in \mathbf{N}$ such that $I^n = 0$. \end{definition} \begin{example} \label{example-locally-nilpotent-not-nilpotent} Let $R = k[x_n | n \in \mathbf{N}]$ be the polynomial ring in infinitely many variables over a field $k$. Let $I$ be the ideal generated by the elements $x_n^n$ for $n \in \mathbf{N}$ and $S = R/I$. Then the ideal $J \subset S$ generated by the images of $x_n$, $n \in \mathbf{N}$ is locally nilpotent, but not nilpotent. Indeed, since $S$-linear combinations of nilpotents are nilpotent, to prove that $J$ is locally nilpotent it is enough to observe that all its generators are nilpotent (which they obviously are). On the other hand, for each $n \in \mathbf{N}$ it holds that $x_{n + 1}^n \not \in I$, so that $J^n \not = 0$. It follows that $J$ is not nilpotent. \end{example} \begin{lemma} \label{lemma-locally-nilpotent} Let $R \to R'$ be a ring map and let $I \subset R$ be a locally nilpotent ideal. Then $IR'$ is a locally nilpotent ideal of $R'$. \end{lemma} \begin{proof} This follows from the fact that if $x, y \in R'$ are nilpotent, then $x + y$ is nilpotent too. Namely, if $x^n = 0$ and $y^m = 0$, then $(x + y)^{n + m - 1} = 0$. \end{proof} \begin{lemma} \label{lemma-locally-nilpotent-unit} Let $R$ be a ring and let $I \subset R$ be a locally nilpotent ideal. An element $x$ of $R$ is a unit if and only if the image of $x$ in $R/I$ is a unit. \end{lemma} \begin{proof} If $x$ is a unit in $R$, then its image is clearly a unit in $R/I$. It remains to prove the converse. Assume the image of $y \in R$ in $R/I$ is the inverse of the image of $x$. Then $xy = 1 - z$ for some $z \in I$. This means that $1\equiv z$ modulo $xR$. Since $z$ lies in the locally nilpotent ideal $I$, we have $z^N = 0$ for some sufficiently large $N$. It follows that $1 = 1^N \equiv z^N = 0$ modulo $xR$. In other words, $x$ divides $1$ and is hence a unit. \end{proof} \begin{lemma} \label{lemma-Noetherian-power} \begin{slogan} An ideal in a Noetherian ring is nilpotent if each element of the ideal is nilpotent. \end{slogan} Let $R$ be a Noetherian ring. Let $I, J$ be ideals of $R$. Suppose $J \subset \sqrt{I}$. Then $J^n \subset I$ for some $n$. In particular, in a Noetherian ring the notions of ``locally nilpotent ideal'' and ``nilpotent ideal'' coincide. \end{lemma} \begin{proof} Say $J = (f_1, \ldots, f_s)$. By assumption $f_i^{d_i} \in I$. Take $n = d_1 + d_2 + \ldots + d_s + 1$. \end{proof} \begin{lemma} \label{lemma-lift-idempotents} Let $R$ be a ring. Let $I \subset R$ be a locally nilpotent ideal. Then $R \to R/I$ induces a bijection on idempotents. \end{lemma} \begin{proof}[First proof of Lemma \ref{lemma-lift-idempotents}] As $I$ is locally nilpotent it is contained in every prime ideal. Hence $\Spec(R/I) = V(I) = \Spec(R)$. Hence the lemma follows from Lemma \ref{lemma-disjoint-decomposition}. \end{proof} \begin{proof}[Second proof of Lemma \ref{lemma-lift-idempotents}] Suppose $\overline{e} \in R/I$ is an idempotent. We have to lift $\overline{e}$ to an idempotent of $R$. \medskip\noindent First, choose any lift $f \in R$ of $\overline{e}$, and set $x = f^2 - f$. Then, $x \in I$, so $x$ is nilpotent (since $I$ is locally nilpotent). Let now $J$ be the ideal of $R$ generated by $x$. Then, $J$ is nilpotent (not just locally nilpotent), since it is generated by the nilpotent $x$. \medskip\noindent Now, assume that we have found a lift $e \in R$ of $\overline{e}$ such that $e^2 - e \in J^k$ for some $k \geq 1$. Let $e' = e - (2e - 1)(e^2 - e) = 3e^2 - 2e^3$, which is another lift of $\overline{e}$ (since the idempotency of $\overline{e}$ yields $e^2 - e \in I$). Then $$ (e')^2 - e' = (4e^2 - 4e - 3)(e^2 - e)^2 \in J^{2k} $$ by a simple computation. \medskip\noindent We thus have started with a lift $e$ of $\overline{e}$ such that $e^2 - e \in J^k$, and obtained a lift $e'$ of $\overline{e}$ such that $(e')^2 - e' \in J^{2k}$. This way we can successively improve the approximation (starting with $e = f$, which fits the bill for $k = 1$). Eventually, we reach a stage where $J^k = 0$, and at that stage we have a lift $e$ of $\overline{e}$ such that $e^2 - e \in J^k = 0$, that is, this $e$ is idempotent. \medskip\noindent We thus have seen that if $\overline{e} \in R/I$ is any idempotent, then there exists a lift of $\overline{e}$ which is an idempotent of $R$. It remains to prove that this lift is unique. Indeed, let $e_1$ and $e_2$ be two such lifts. We need to show that $e_1 = e_2$. \medskip\noindent By definition of $e_1$ and $e_2$, we have $e_1 \equiv e_2 \mod I$, and both $e_1$ and $e_2$ are idempotent. From $e_1 \equiv e_2 \mod I$, we see that $e_1 - e_2 \in I$, so that $e_1 - e_2$ is nilpotent (since $I$ is locally nilpotent). A straightforward computation (using the idempotency of $e_1$ and $e_2$) reveals that $(e_1 - e_2)^3 = e_1 - e_2$. Using this and induction, we obtain $(e_1 - e_2)^k = e_1 - e_2$ for any positive odd integer $k$. Since all high enough $k$ satisfy $(e_1 - e_2)^k = 0$ (since $e_1 - e_2$ is nilpotent), this shows $e_1 - e_2 = 0$, so that $e_1 = e_2$, which completes our proof. \end{proof} \begin{lemma} \label{lemma-lift-idempotents-noncommutative} Let $A$ be a possibly noncommutative algebra. Let $e \in A$ be an element such that $x = e^2 - e$ is nilpotent. Then there exists an idempotent of the form $e' = e + x(\sum a_{i, j}e^ix^j) \in A$ with $a_{i, j} \in \mathbf{Z}$. \end{lemma} \begin{proof} Consider the ring $R_n = \mathbf{Z}[e]/((e^2 - e)^n)$. It is clear that if we can prove the result for each $R_n$ then the lemma follows. In $R_n$ consider the ideal $I = (e^2 - e)$ and apply Lemma \ref{lemma-lift-idempotents}. \end{proof} \begin{lemma} \label{lemma-lift-nth-roots} Let $R$ be a ring. Let $I \subset R$ be a locally nilpotent ideal. Let $n \geq 1$ be an integer which is invertible in $R/I$. Then \begin{enumerate} \item the $n$th power map $1 + I \to 1 + I$, $1 + x \mapsto (1 + x)^n$ is a bijection, \item a unit of $R$ is an $n$th power if and only if its image in $R/I$ is an $n$th power. \end{enumerate} \end{lemma} \begin{proof} Let $a \in R$ be a unit whose image in $R/I$ is the same as the image of $b^n$ with $b \in R$. Then $b$ is a unit (Lemma \ref{lemma-locally-nilpotent-unit}) and $ab^{-n} = 1 + x$ for some $x \in I$. Hence $ab^{-n} = c^n$ by part (1). Thus (2) follows from (1). \medskip\noindent Proof of (1). This is true because there is an inverse to the map $1 + x \mapsto (1 + x)^n$. Namely, we can consider the map which sends $1 + x$ to \begin{align*} (1 + x)^{1/n} & = 1 + {1/n \choose 1}x + {1/n \choose 2}x^2 + {1/n \choose 3}x^3 + \ldots \\ & = 1 + \frac{1}{n} x + \frac{1 - n}{2n^2}x^2 + \frac{(1 - n)(1 - 2n)}{6n^3}x^3 + \ldots \end{align*} as in elementary calculus. This makes sense because the series is finite as $x^k = 0$ for all $k \gg 0$ and each coefficient ${1/n \choose k} \in \mathbf{Z}[1/n]$ (details omitted; observe that $n$ is invertible in $R$ by Lemma \ref{lemma-locally-nilpotent-unit}). \end{proof} \section{Curiosity} \label{section-curiosity} % BEGIN ALGEBRA EDITORIAL ROUTE section-curiosity \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-curiosity}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-curiosity \noindent Lemma \ref{lemma-disjoint-implies-product} explains what happens if $V(I)$ is open for some ideal $I \subset R$. But what if $\Spec(S^{-1}R)$ is closed in $\Spec(R)$? The next two lemmas give a partial answer. For more information see Section \ref{section-pure-ideals}. \begin{lemma} \label{lemma-invert-closed-quotient} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. Assume the image of the map $\Spec(S^{-1}R) \to \Spec(R)$ is closed. Then $S^{-1}R \cong R/I$ for some ideal $I \subset R$. \end{lemma} \begin{proof} Let $I = \Ker(R \to S^{-1}R)$ so that $V(I)$ contains the image. Say the image is the closed subset $V(I') \subset \Spec(R)$ for some ideal $I' \subset R$. So $V(I') \subset V(I)$. For $f \in I'$ we see that $f/1 \in S^{-1}R$ is contained in every prime ideal. Hence $f^n$ maps to zero in $S^{-1}R$ for some $n \geq 1$ (Lemma \ref{lemma-Zariski-topology}). Hence $V(I') = V(I)$. Then this implies every $g \in S$ is invertible mod $I$. Hence we get ring maps $R/I \to S^{-1}R$ and $S^{-1}R \to R/I$. The first map is injective by choice of $I$. The second is the map $S^{-1}R \to S^{-1}(R/I) = R/I$ which has kernel $S^{-1}I$ because localization is exact. Since $S^{-1}I = 0$ we see also the second map is injective. Hence $S^{-1}R \cong R/I$. \end{proof} \begin{lemma} \label{lemma-invert-closed-split} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. Assume the image of the map $\Spec(S^{-1}R) \to \Spec(R)$ is closed. If $R$ is Noetherian, or $\Spec(R)$ is a Noetherian topological space, or $S$ is finitely generated as a monoid, then $R \cong S^{-1}R \times R'$ for some ring $R'$. \end{lemma} \begin{proof} By Lemma \ref{lemma-invert-closed-quotient} we have $S^{-1}R \cong R/I$ for some ideal $I \subset R$. By Lemma \ref{lemma-disjoint-implies-product} it suffices to show that $V(I)$ is open. If $R$ is Noetherian then $\Spec(R)$ is a Noetherian topological space, see Lemma \ref{lemma-Noetherian-topology}. If $\Spec(R)$ is a Noetherian topological space, then the complement $\Spec(R) \setminus V(I)$ is quasi-compact, see Topology, Lemma \ref{topology-lemma-Noetherian-quasi-compact}. Hence there exist finitely many $f_1, \ldots, f_n \in I$ such that $V(I) = V(f_1, \ldots, f_n)$. Since each $f_i$ maps to zero in $S^{-1}R$ there exists a $g \in S$ such that $gf_i = 0$ for $i = 1, \ldots, n$. Hence $D(g) = V(I)$ as desired. In case $S$ is finitely generated as a monoid, say $S$ is generated by $g_1, \ldots, g_m$, then $S^{-1}R \cong R_{g_1 \ldots g_m}$ and we conclude that $V(I) = D(g_1 \ldots g_m)$. \end{proof} \section{Hilbert Nullstellensatz} \label{section-nullstellensatz} % BEGIN ALGEBRA EDITORIAL ROUTE section-nullstellensatz \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-nullstellensatz}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-nullstellensatz \begin{theorem}[Hilbert Nullstellensatz] \label{theorem-nullstellensatz} Let $k$ be a field. \begin{enumerate} \item \label{item-finite-kappa} For any maximal ideal $\mathfrak m \subset k[x_1, \ldots, x_n]$ the field extension $\kappa(\mathfrak m)/k$ is finite. \item \label{item-polynomial-ring-Jacobson} Any radical ideal $I \subset k[x_1, \ldots, x_n]$ is the intersection of maximal ideals containing it. \end{enumerate} The same is true in any finite type $k$-algebra. \end{theorem} \begin{proof} It is enough to prove part (\ref{item-finite-kappa}) of the theorem for the case of a polynomial algebra $k[x_1, \ldots, x_n]$, because any finitely generated $k$-algebra is a quotient of such a polynomial algebra. We prove this by induction on $n$. The case $n = 0$ is clear. Suppose that $\mathfrak m$ is a maximal ideal in $k[x_1, \ldots, x_n]$. Let $\mathfrak p \subset k[x_n]$ be the intersection of $\mathfrak m$ with $k[x_n]$. \medskip\noindent If $\mathfrak p \not = (0)$, then $\mathfrak p$ is maximal and generated by an irreducible monic polynomial $P$ (because of the Euclidean algorithm in $k[x_n]$). Then $k' = k[x_n]/\mathfrak p$ is a finite field extension of $k$ and contained in $\kappa(\mathfrak m)$. In this case we get a surjection $$ k'[x_1, \ldots, x_{n-1}] \to k'[x_1, \ldots, x_n] = k' \otimes_k k[x_1, \ldots, x_n] \longrightarrow \kappa(\mathfrak m) $$ and hence we see that $\kappa(\mathfrak m)$ is a finite extension of $k'$ by induction hypothesis. Thus $\kappa(\mathfrak m)$ is finite over $k$ as well. \medskip\noindent If $\mathfrak p = (0)$ we consider the ring extension $k[x_n] \subset k[x_1, \ldots, x_n]/\mathfrak m$. This is a finitely generated ring extension, hence of finite presentation by Lemmas \ref{lemma-obvious-Noetherian} and \ref{lemma-Noetherian-finite-type-is-finite-presentation}. Thus the image of $\Spec(k[x_1, \ldots, x_n]/\mathfrak m)$ in $\Spec(k[x_n])$ is constructible by Theorem \ref{theorem-chevalley}. Since the image contains $(0)$ we conclude that it contains a standard open $D(f)$ for some $f\in k[x_n]$ nonzero. Since clearly $D(f)$ is infinite we get a contradiction with the assumption that $k[x_1, \ldots, x_n]/\mathfrak m$ is a field (and hence has a spectrum consisting of one point). \medskip\noindent Proof of (\ref{item-polynomial-ring-Jacobson}). Let $I \subset R$ be a radical ideal, with $R$ of finite type over $k$. Let $f \in R$, $f \not \in I$. We have to find a maximal ideal $\mathfrak m \subset R$ with $I \subset \mathfrak m$ and $f \not \in \mathfrak m$. The ring $(R/I)_f$ is nonzero, since $1 = 0$ in this ring would mean $f^n \in I$ and since $I$ is radical this would mean $f \in I$ contrary to our assumption on $f$. Thus we may choose a maximal ideal $\mathfrak m'$ in $(R/I)_f$, see Lemma \ref{lemma-Zariski-topology}. Let $\mathfrak m \subset R$ be the inverse image of $\mathfrak m'$ in $R$. We see that $I \subset \mathfrak m$ and $f \not \in \mathfrak m$. If we show that $\mathfrak m$ is a maximal ideal of $R$, then we are done. We clearly have $$ k \subset R/\mathfrak m \subset \kappa(\mathfrak m'). $$ By part (\ref{item-finite-kappa}) the field extension $\kappa(\mathfrak m')/k$ is finite. Hence $R/\mathfrak m$ is a field by Fields, Lemma \ref{fields-lemma-subalgebra-algebraic-extension-field}. Thus $\mathfrak m$ is maximal and the proof is complete. \end{proof} \begin{lemma} \label{lemma-field-finite-type-over-domain} Let $R$ be a ring. Let $K$ be a field. If $R \subset K$ and $K$ is of finite type over $R$, then there exists an $f \in R$ such that $R_f$ is a field, and $K/R_f$ is a finite field extension. \end{lemma} \begin{proof} By Lemma \ref{lemma-characterize-image-finite-type} there exist a nonempty open $U \subset \Spec(R)$ contained in the image $\{(0)\}$ of $\Spec(K) \to \Spec(R)$. Choose $f \in R$, $f \not = 0$ such that $D(f) \subset U$, i.e., $D(f) = \{(0)\}$. Then $R_f$ is a domain whose spectrum has exactly one point and $R_f$ is a field. Then $K$ is a finitely generated algebra over the field $R_f$ and hence a finite field extension of $R_f$ by the Hilbert Nullstellensatz (Theorem \ref{theorem-nullstellensatz}). \end{proof} \section{Jacobson rings} \label{section-ring-jacobson} % BEGIN ALGEBRA EDITORIAL ROUTE section-ring-jacobson \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ring-jacobson}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ring-jacobson \noindent Let $R$ be a ring. The closed points of $\Spec(R)$ are the maximal ideals of $R$. Often rings which occur naturally in algebraic geometry have lots of maximal ideals. For example finite type algebras over a field or over $\mathbf{Z}$. We will show that these are examples of Jacobson rings. \begin{definition} \label{definition-ring-jacobson} Let $R$ be a ring. We say that $R$ is a {\it Jacobson ring} if every radical ideal $I$ is the intersection of the maximal ideals containing it. \end{definition} \begin{lemma} \label{lemma-finite-type-field-Jacobson} Any algebra of finite type over a field is Jacobson. \end{lemma} \begin{proof} This follows from Theorem \ref{theorem-nullstellensatz} and Definition \ref{definition-ring-jacobson}. \end{proof} \begin{lemma} \label{lemma-jacobson-prime} Let $R$ be a ring. If every prime ideal of $R$ is the intersection of the maximal ideals containing it, then $R$ is Jacobson. \end{lemma} \begin{proof} This is immediately clear from the fact that every radical ideal $I \subset R$ is the intersection of the primes containing it. See Lemma \ref{lemma-Zariski-topology}. \end{proof} \begin{lemma} \label{lemma-jacobson} A ring $R$ is Jacobson if and only if $\Spec(R)$ is Jacobson, see Topology, Definition \ref{topology-definition-space-jacobson}. \end{lemma} \begin{proof} Suppose $R$ is Jacobson. Let $Z \subset \Spec(R)$ be a closed subset. We have to show that the set of closed points in $Z$ is dense in $Z$. Let $U \subset \Spec(R)$ be an open such that $U \cap Z$ is nonempty. We have to show $Z \cap U$ contains a closed point of $\Spec(R)$. We may assume $U = D(f)$ as standard opens form a basis for the topology on $\Spec(R)$. According to Lemma \ref{lemma-Zariski-topology} we may assume that $Z = V(I)$, where $I$ is a radical ideal. We see also that $f \not \in I$. By assumption, there exists a maximal ideal $\mathfrak m \subset R$ such that $I \subset \mathfrak m$ but $f \not\in \mathfrak m$. Hence $\mathfrak m \in D(f) \cap V(I) = U \cap Z$ as desired. \medskip\noindent Conversely, suppose that $\Spec(R)$ is Jacobson. Let $I \subset R$ be a radical ideal. Let $J = \cap_{I \subset \mathfrak m} \mathfrak m$ be the intersection of the maximal ideals containing $I$. Clearly $J$ is a radical ideal, $V(J) \subset V(I)$, and $V(J)$ is the smallest closed subset of $V(I)$ containing all the closed points of $V(I)$. By assumption we see that $V(J) = V(I)$. But Lemma \ref{lemma-Zariski-topology} shows there is a bijection between Zariski closed sets and radical ideals, hence $I = J$ as desired. \end{proof} \begin{lemma} \label{lemma-characterize-jacobson} Let $R$ be a ring. If $R$ is not Jacobson there exist a prime $\mathfrak p \subset R$, an element $f \in R$ such that the following hold \begin{enumerate} \item $\mathfrak p$ is not a maximal ideal, \item $f \not \in \mathfrak p$, \item $V(\mathfrak p) \cap D(f) = \{\mathfrak p\}$, and \item $(R/\mathfrak p)_f$ is a field. \end{enumerate} On the other hand, if $R$ is Jacobson, then for any pair $(\mathfrak p, f)$ such that (1) and (2) hold the set $V(\mathfrak p) \cap D(f)$ is infinite. \end{lemma} \begin{proof} Assume $R$ is not Jacobson. By Lemma \ref{lemma-jacobson} this means there exists an closed subset $T \subset \Spec(R)$ whose set $T_0 \subset T$ of closed points is not dense in $T$. Choose an $f \in R$ such that $T_0 \subset V(f)$ but $T \not \subset V(f)$. Note that $T \cap D(f)$ is homeomorphic to $\Spec((R/I)_f)$ if $T = V(I)$, see Lemmas \ref{lemma-spec-closed} and \ref{lemma-standard-open}. As any ring has a maximal ideal (Lemma \ref{lemma-Zariski-topology}) we can choose a closed point $t$ of space $T \cap D(f)$. Then $t$ corresponds to a prime ideal $\mathfrak p \subset R$ which is not maximal (as $t \not \in T_0$). Thus (1) holds. By construction $f \not \in \mathfrak p$, hence (2). As $t$ is a closed point of $T \cap D(f)$ we see that $V(\mathfrak p) \cap D(f) = \{\mathfrak p\}$, i.e., (3) holds. Hence we conclude that $(R/\mathfrak p)_f$ is a domain whose spectrum has one point, hence (4) holds (for example combine Lemmas \ref{lemma-characterize-local-ring} and \ref{lemma-minimal-prime-reduced-ring}). \medskip\noindent Conversely, suppose that $R$ is Jacobson and $(\mathfrak p, f)$ satisfy (1) and (2). If $V(\mathfrak p) \cap D(f) = \{\mathfrak p, \mathfrak q_1, \ldots, \mathfrak q_t\}$ then $\mathfrak p \not = \mathfrak q_i$ implies there exists an element $g \in R$ such that $g \not \in \mathfrak p$ but $g \in \mathfrak q_i$ for all $i$. Hence $V(\mathfrak p) \cap D(fg) = \{\mathfrak p\}$ which is impossible since each locally closed subset of $\Spec(R)$ contains at least one closed point as $\Spec(R)$ is a Jacobson topological space. \end{proof} \begin{lemma} \label{lemma-pid-jacobson} The ring $\mathbf{Z}$ is a Jacobson ring. More generally, let $R$ be a ring such that \begin{enumerate} \item $R$ is a domain, \item $R$ is Noetherian, \item any nonzero prime ideal is a maximal ideal, and \item $R$ has infinitely many maximal ideals. \end{enumerate} Then $R$ is a Jacobson ring. \end{lemma} \begin{proof} Let $R$ satisfy (1), (2), (3) and (4). The statement means that $(0) = \bigcap_{\mathfrak m \subset R} \mathfrak m$. Since $R$ has infinitely many maximal ideals it suffices to show that any nonzero $x \in R$ is contained in at most finitely many maximal ideals, in other words that $V(x)$ is finite. By Lemma \ref{lemma-spec-closed} we see that $V(x)$ is homeomorphic to $\Spec(R/xR)$. By assumption (3) every prime of $R/xR$ is minimal and hence corresponds to an irreducible component of $\Spec(R/xR)$ (Lemma \ref{lemma-irreducible}). As $R/xR$ is Noetherian, the topological space $\Spec(R/xR)$ is Noetherian (Lemma \ref{lemma-Noetherian-topology}) and has finitely many irreducible components (Topology, Lemma \ref{topology-lemma-Noetherian}). Thus $V(x)$ is finite as desired. \end{proof} \begin{example} \label{example-infinite-product-fields-jacobson} Let $A$ be an infinite set. For each $\alpha \in A$, let $k_\alpha$ be a field. We claim that $R = \prod_{\alpha\in A} k_\alpha$ is Jacobson. First, note that any element $f \in R$ has the form $f = ue$, with $u \in R$ a unit and $e\in R$ an idempotent (left to the reader). Hence $D(f) = D(e)$, and $R_f = R_e = R/(1-e)$ is a quotient of $R$. Actually, any ring with this property is Jacobson. Namely, say $\mathfrak p \subset R$ is a prime ideal and $f \in R$, $f \not \in \mathfrak p$. We have to find a maximal ideal $\mathfrak m$ of $R$ such that $\mathfrak p \subset \mathfrak m$ and $f \not\in \mathfrak m$. Because $R_f$ is a quotient of $R$ we see that any maximal ideal of $R_f$ corresponds to a maximal ideal of $R$ not containing $f$. Hence the result follows by choosing a maximal ideal of $R_f$ containing $\mathfrak p R_f$. \end{example} \begin{example} \label{example-not-jacobson} A domain $R$ with finitely many maximal ideals $\mathfrak m_i$, $i = 1, \ldots, n$ is not a Jacobson ring, except when it is a field. Namely, in this case $(0)$ is not the intersection of the maximal ideals $(0) \not = \mathfrak m_1 \cap \mathfrak m_2 \cap \ldots \cap \mathfrak m_n \supset \mathfrak m_1 \cdot \mathfrak m_2 \cdot \ldots \cdot \mathfrak m_n \not = 0$. In particular a discrete valuation ring, or any local ring with at least two prime ideals is not a Jacobson ring. \end{example} \begin{lemma} \label{lemma-finite-residue-extension-closed} Let $R \to S$ be a ring map. Let $\mathfrak m \subset R$ be a maximal ideal. Let $\mathfrak q \subset S$ be a prime ideal lying over $\mathfrak m$ such that $\kappa(\mathfrak q)/\kappa(\mathfrak m)$ is an algebraic field extension. Then $\mathfrak q$ is a maximal ideal of $S$. \end{lemma} \begin{proof} Consider the diagram $$ \xymatrix{ S \ar[r] & S/\mathfrak q \ar[r] & \kappa(\mathfrak q) \\ R \ar[r] \ar[u] & R/\mathfrak m \ar[u] } $$ We see that $\kappa(\mathfrak m) \subset S/\mathfrak q \subset \kappa(\mathfrak q)$. Because the field extension $\kappa(\mathfrak m) \subset \kappa(\mathfrak q)$ is algebraic, any ring between $\kappa(\mathfrak m)$ and $\kappa(\mathfrak q)$ is a field (Fields, Lemma \ref{fields-lemma-subalgebra-algebraic-extension-field}). Thus $S/\mathfrak q$ is a field, and a posteriori equal to $\kappa(\mathfrak q)$. \end{proof} \begin{lemma} \label{lemma-dimension} Suppose that $k$ is a field and suppose that $V$ is a nonzero vector space over $k$. Assume the dimension of $V$ (which is a cardinal number) is smaller than the cardinality of $k$. Then for any linear operator $T : V \to V$ there exists some monic polynomial $P(t) \in k[t]$ such that $P(T)$ is not invertible. \end{lemma} \begin{proof} If not then $V$ inherits the structure of a vector space over the field $k(t)$. But the dimension of $k(t)$ over $k$ is at least the cardinality of $k$ for example due to the fact that the elements $\frac{1}{t - \lambda}$ are $k$-linearly independent. \end{proof} \noindent Here is another version of Hilbert's Nullstellensatz. \begin{theorem} \label{theorem-uncountable-nullstellensatz} Let $k$ be a field. Let $S$ be a $k$-algebra generated over $k$ by the elements $\{x_i\}_{i \in I}$. Assume the cardinality of $I$ is smaller than the cardinality of $k$. Then \begin{enumerate} \item for all maximal ideals $\mathfrak m \subset S$ the field extension $\kappa(\mathfrak m)/k$ is algebraic, and \item $S$ is a Jacobson ring. \end{enumerate} \end{theorem} \begin{proof} If $I$ is finite then the result follows from the Hilbert Nullstellensatz, Theorem \ref{theorem-nullstellensatz}. In the rest of the proof we assume $I$ is infinite. It suffices to prove the result for $\mathfrak m \subset k[\{x_i\}_{i \in I}]$ maximal in the polynomial ring on variables $x_i$, since $S$ is a quotient of this. As $I$ is infinite the set of monomials $x_{i_1}^{e_1} \ldots x_{i_r}^{e_r}$, $i_1, \ldots, i_r \in I$ and $e_1, \ldots, e_r \geq 0$ has cardinality at most equal to the cardinality of $I$. Because the cardinality of $I \times \ldots \times I$ is the cardinality of $I$, and also the cardinality of $\bigcup_{n \geq 0} I^n$ has the same cardinality. (If $I$ is finite, then this is not true and in that case this proof only works if $k$ is uncountable.) \medskip\noindent To arrive at a contradiction pick $T \in \kappa(\mathfrak m)$ transcendental over $k$. Note that the $k$-linear map $T : \kappa(\mathfrak m) \to \kappa(\mathfrak m)$ given by multiplication by $T$ has the property that $P(T)$ is invertible for all monic polynomials $P(t) \in k[t]$. Also, $\kappa(\mathfrak m)$ has dimension at most the cardinality of $I$ over $k$ since it is a quotient of the vector space $k[\{x_i\}_{i \in I}]$ over $k$ (whose dimension is $\# I$ as we saw above). This is impossible by Lemma \ref{lemma-dimension}. \medskip\noindent To show that $S$ is Jacobson we argue as follows. If not then there exists a prime $\mathfrak q \subset S$ and an element $f \in S$, $f \not \in \mathfrak q$ such that $\mathfrak q$ is not maximal and $(S/\mathfrak q)_f$ is a field, see Lemma \ref{lemma-characterize-jacobson}. But note that $(S/\mathfrak q)_f$ is generated by at most $\# I + 1$ elements. Hence the field extension $(S/\mathfrak q)_f/k$ is algebraic (by the first part of the proof). This implies that $\kappa(\mathfrak q)$ is an algebraic extension of $k$ hence $\mathfrak q$ is maximal by Lemma \ref{lemma-finite-residue-extension-closed}. This contradiction finishes the proof. \end{proof} \begin{lemma} \label{lemma-base-change-Jacobson} Let $k$ be a field. Let $S$ be a $k$-algebra. For any field extension $K/k$ whose cardinality is larger than the cardinality of $S$ we have \begin{enumerate} \item for every maximal ideal $\mathfrak m$ of $S_K$ the field $\kappa(\mathfrak m)$ is algebraic over $K$, and \item $S_K$ is a Jacobson ring. \end{enumerate} \end{lemma} \begin{proof} Choose $k \subset K$ such that the cardinality of $K$ is greater than the cardinality of $S$. Since the elements of $S$ generate the $K$-algebra $S_K$ we see that Theorem \ref{theorem-uncountable-nullstellensatz} applies. \end{proof} \begin{example} \label{example-countable-trick-does-not-work} The trick in the proof of Theorem \ref{theorem-uncountable-nullstellensatz} really does not work if $k$ is a countable field and $I$ is countable too. Let $k$ be a countable field. Let $x$ be a variable, and let $k(x)$ be the field of rational functions in $x$. Consider the polynomial algebra $R = k[x, \{x_f\}_{f \in k[x]-\{0\}}]$. Let $I = (\{fx_f - 1\}_{f\in k[x] - \{0\}})$. Note that $I$ is a proper ideal in $R$. Choose a maximal ideal $I \subset \mathfrak m$. Then $k \subset R/\mathfrak m$ is isomorphic to $k(x)$, and is not algebraic over $k$. \end{example} \begin{lemma} \label{lemma-Jacobson-invert-element} Let $R$ be a Jacobson ring. Let $f \in R$. The ring $R_f$ is Jacobson and maximal ideals of $R_f$ correspond to maximal ideals of $R$ not containing $f$. \end{lemma} \begin{proof} By Topology, Lemma \ref{topology-lemma-jacobson-inherited} we see that $D(f) = \Spec(R_f)$ is Jacobson and that closed points of $D(f)$ correspond to closed points in $\Spec(R)$ which happen to lie in $D(f)$. Thus $R_f$ is Jacobson by Lemma \ref{lemma-jacobson}. \end{proof} \begin{example} \label{example-localize-not-preserve-closed-points} Here is a simple example that shows Lemma \ref{lemma-Jacobson-invert-element} to be false if $R$ is not Jacobson. Consider the ring $R = \mathbf{Z}_{(2)}$, i.e., the localization of $\mathbf{Z}$ at the prime $(2)$. The localization of $R$ at the element $2$ is isomorphic to $\mathbf{Q}$, in a formula: $R_2 \cong \mathbf{Q}$. Clearly the map $R \to R_2$ maps the closed point of $\Spec(\mathbf{Q})$ to the generic point of $\Spec(R)$. \end{example} \begin{example} \label{example-infinite-localize-not-preserve-closed-points} Here is a simple example that shows Lemma \ref{lemma-Jacobson-invert-element} is false if $R$ is Jacobson but we localize at infinitely many elements. Namely, let $R = \mathbf{Z}$ and consider the localization $(R \setminus \{0\})^{-1}R \cong \mathbf{Q}$ of $R$ at the set of all nonzero elements. Clearly the map $\mathbf{Z} \to \mathbf{Q}$ maps the closed point of $\Spec(\mathbf{Q})$ to the generic point of $\Spec(\mathbf{Z})$. \end{example} \begin{lemma} \label{lemma-Jacobson-mod-ideal} Let $R$ be a Jacobson ring. Let $I \subset R$ be an ideal. The ring $R/I$ is Jacobson and maximal ideals of $R/I$ correspond to maximal ideals of $R$ containing $I$. \end{lemma} \begin{proof} The proof is the same as the proof of Lemma \ref{lemma-Jacobson-invert-element}. \end{proof} \begin{lemma} \label{lemma-silly-jacobson} Let $R$ be a Jacobson ring and let $K$ be a field. Assume $R\subset K$ and that $K$ is of finite type over $R$. Then $R$ is a field and $K/R$ is a finite field extension. \end{lemma} \begin{proof} First note that $R$ is a domain. By Lemma \ref{lemma-field-finite-type-over-domain} we see that $R_f$ is a field and $K/R_f$ is a finite field extension for some nonzero $f \in R$. Hence $(0)$ is a maximal ideal of $R_f$ and by Lemma \ref{lemma-Jacobson-invert-element} we conclude $(0)$ is a maximal ideal of $R$. \end{proof} \begin{proposition} \label{proposition-Jacobson-permanence} Let $R$ be a Jacobson ring. Let $R \to S$ be a ring map of finite type. Then \begin{enumerate} \item The ring $S$ is Jacobson. \item The map $\Spec(S) \to \Spec(R)$ transforms closed points to closed points. \item For $\mathfrak m' \subset S$ maximal lying over $\mathfrak m \subset R$ the field extension $\kappa(\mathfrak m')/\kappa(\mathfrak m)$ is finite. \end{enumerate} \end{proposition} \begin{proof} Let $\mathfrak m' \subset S$ be a maximal ideal and $R \cap \mathfrak m' = \mathfrak m$. Then $R/\mathfrak m \to S/\mathfrak m'$ satisfies the conditions of Lemma \ref{lemma-silly-jacobson} by Lemma \ref{lemma-Jacobson-mod-ideal}. Hence $R/\mathfrak m$ is a field and $\mathfrak m$ a maximal ideal and the induced residue field extension is finite. This proves (2) and (3). \medskip\noindent If $S$ is not Jacobson, then by Lemma \ref{lemma-characterize-jacobson} there exists a non-maximal prime ideal $\mathfrak q$ of $S$ and an $g \in S$, $g \not\in \mathfrak q$ such that $(S/\mathfrak q)_g$ is a field. To arrive at a contradiction we show that $\mathfrak q$ is a maximal ideal. Let $\mathfrak p = \mathfrak q \cap R$. Then $R/\mathfrak p \to (S/\mathfrak q)_g$ satisfies the conditions of Lemma \ref{lemma-silly-jacobson} by Lemma \ref{lemma-Jacobson-mod-ideal}. Hence $R/\mathfrak p$ is a field and the field extension $\kappa(\mathfrak p) \to (S/\mathfrak q)_g = \kappa(\mathfrak q)$ is finite, thus algebraic. Then $\mathfrak q$ is a maximal ideal of $S$ by Lemma \ref{lemma-finite-residue-extension-closed}. Contradiction. \end{proof} \begin{lemma} \label{lemma-corollary-jacobson} Any finite type algebra over $\mathbf{Z}$ is Jacobson. \end{lemma} \begin{proof} Combine Lemma \ref{lemma-pid-jacobson} and Proposition \ref{proposition-Jacobson-permanence}. \end{proof} \begin{lemma} \label{lemma-image-finite-type-map-Jacobson-rings} Let $R \to S$ be a finite type ring map of Jacobson rings. Denote $X = \Spec(R)$ and $Y = \Spec(S)$. Write $f : Y \to X$ for the induced map of spectra. Let $E \subset Y = \Spec(S)$ be a constructible set. Denote with a subscript ${}_0$ the set of closed points of a topological space. \begin{enumerate} \item We have $f(E)_0 = f(E_0) = X_0 \cap f(E)$. \item A point $\xi \in X$ is in $f(E)$ if and only if $\overline{\{\xi\}} \cap f(E_0)$ is dense in $\overline{\{\xi\}}$. \end{enumerate} \end{lemma} \begin{proof} We have a commutative diagram of continuous maps $$ \xymatrix{ E \ar[r] \ar[d] & Y \ar[d] \\ f(E) \ar[r] & X } $$ Suppose $x \in f(E)$ is closed in $f(E)$. Then $f^{-1}(\{x\})\cap E$ is nonempty and closed in $E$. Applying Topology, Lemma \ref{topology-lemma-jacobson-inherited} to both inclusions $$ f^{-1}(\{x\}) \cap E \subset E \subset Y $$ we find there exists a point $y \in f^{-1}(\{x\}) \cap E$ which is closed in $Y$. In other words, there exists $y \in Y_0$ and $y \in E_0$ mapping to $x$. Hence $x \in f(E_0)$. This proves that $f(E)_0 \subset f(E_0)$. Proposition \ref{proposition-Jacobson-permanence} implies that $f(E_0) \subset X_0 \cap f(E)$. The inclusion $X_0 \cap f(E) \subset f(E)_0$ is trivial. This proves the first assertion. \medskip\noindent Suppose that $\xi \in f(E)$. According to Lemma \ref{lemma-characterize-image-finite-type} the set $f(E) \cap \overline{\{\xi\}}$ contains a dense open subset of $\overline{\{\xi\}}$. Since $X$ is Jacobson we conclude that $f(E) \cap \overline{\{\xi\}}$ contains a dense set of closed points, see Topology, Lemma \ref{topology-lemma-jacobson-inherited}. We conclude by part (1) of the lemma. \medskip\noindent On the other hand, suppose that $\overline{\{\xi\}} \cap f(E_0)$ is dense in $\overline{\{\xi\}}$. By Lemma \ref{lemma-constructible-is-image} there exists a ring map $S \to S'$ of finite presentation such that $E$ is the image of $Y' := \Spec(S') \to Y$. Then $E_0$ is the image of $Y'_0$ by the first part of the lemma applied to the ring map $S \to S'$. Thus we may assume that $E = Y$ by replacing $S$ by $S'$. Suppose $\xi$ corresponds to $\mathfrak p \subset R$. Consider the diagram $$ \xymatrix{ S \ar[r] & S/\mathfrak p S \\ R \ar[r] \ar[u] & R/\mathfrak p \ar[u] } $$ This diagram and the density of $f(Y_0) \cap V(\mathfrak p)$ in $V(\mathfrak p)$ shows that the morphism $R/\mathfrak p \to S/\mathfrak p S$ satisfies condition (2) of Lemma \ref{lemma-domain-image-dense-set-points-generic-point}. Hence we conclude there exists a prime $\overline{\mathfrak q} \subset S/\mathfrak pS$ mapping to $(0)$. In other words the inverse image $\mathfrak q$ of $\overline{\mathfrak q}$ in $S$ maps to $\mathfrak p$ as desired. \end{proof} \noindent The conclusion of the lemma above is that we can read off the image of $f$ from the set of closed points of the image. This is a little nicer in case the map is of finite presentation because then we know that the image of a constructible set is constructible. Before we state it we introduce some notation. Denote by $\text{Constr}(X)$ the set of constructible sets. Let $R \to S$ be a ring map. Denote $X = \Spec(R)$ and $Y = \Spec(S)$. Write $f : Y \to X$ for the induced map of spectra. Denote with a subscript ${}_0$ the set of closed points of a topological space. \begin{lemma} \label{lemma-conclude-jacobson-Noetherian} With notation as above, assume that $R$ is a Noetherian Jacobson ring. Further assume $R \to S$ is of finite type. There is a commutative diagram $$ \xymatrix{ \text{Constr}(Y) \ar[r]^{E \mapsto E_0} \ar[d]^{E \mapsto f(E)} & \text{Constr}(Y_0) \ar[d]^{E \mapsto f(E)} \\ \text{Constr}(X) \ar[r]^{E \mapsto E_0} & \text{Constr}(X_0) } $$ where the horizontal arrows are the bijections from Topology, Lemma \ref{topology-lemma-jacobson-equivalent-constructible}. \end{lemma} \begin{proof} Since $R \to S$ is of finite type, it is of finite presentation, see Lemma \ref{lemma-Noetherian-finite-type-is-finite-presentation}. Thus the image of a constructible set in $X$ is constructible in $Y$ by Chevalley's theorem (Theorem \ref{theorem-chevalley}). Combined with Lemma \ref{lemma-image-finite-type-map-Jacobson-rings} the lemma follows. \end{proof} \noindent To illustrate the use of Jacobson rings, we give the following two examples. \begin{example} \label{example-product-matrices-zero} Let $k$ be a field. The space $\Spec(k[x, y]/(xy))$ has two irreducible components: namely the $x$-axis and the $y$-axis. As a generalization, let $$ R = k[x_{11}, x_{12}, x_{21}, x_{22}, y_{11}, y_{12}, y_{21}, y_{22}]/ \mathfrak a, $$ where $\mathfrak a$ is the ideal in $k[x_{11}, x_{12}, x_{21}, x_{22}, y_{11}, y_{12}, y_{21}, y_{22}]$ generated by the entries of the $2 \times 2$ product matrix $$ \left( \begin{matrix} x_{11} & x_{12}\\ x_{21} & x_{22} \end{matrix} \right) \left( \begin{matrix} y_{11} & y_{12}\\ y_{21} & y_{22} \end{matrix} \right). $$ In this example we will describe $\Spec(R)$. \medskip\noindent To prove the statement about $\Spec(k[x, y]/(xy))$ we argue as follows. If $\mathfrak p \subset k[x, y]$ is any prime ideal containing $xy$, then either $x$ or $y$ would be contained in $\mathfrak p$. Hence the minimal such prime ideals are just $(x)$ and $(y)$. In case $k$ is algebraically closed, the $\text{max-Spec}$ of these components can then be visualized as the point sets of $y$- and $x$-axis. \medskip\noindent For the generalization, note that we may identify the closed points of the spectrum of $k[x_{11}, x_{12}, x_{21}, x_{22}, y_{11}, y_{12}, y_{21}, y_{22}]$ with the space of matrices $$ \left\{ (X, Y) \in \text{Mat}(2, k)\times \text{Mat}(2, k) \mid X = \left( \begin{matrix} x_{11} & x_{12}\\ x_{21} & x_{22} \end{matrix} \right), Y= \left( \begin{matrix} y_{11} & y_{12}\\ y_{21} & y_{22} \end{matrix} \right) \right\} $$ at least if $k$ is algebraically closed. Now define a group action of $\text{GL}(2, k)\times \text{GL}(2, k)\times \text{GL}(2, k)$ on the space of matrices $\{(X, Y)\}$ by $$ (g_1, g_2, g_3) \times (X, Y) \mapsto ((g_1Xg_2^{-1}, g_2Yg_3^{-1})). $$ Here, also observe that the algebraic set $$ \text{GL}(2, k)\times \text{GL}(2, k)\times \text{GL}(2, k) \subset \text{Mat}(2, k)\times \text{Mat}(2, k) \times \text{Mat}(2, k) $$ is irreducible since it is the max spectrum of the domain $$ k[x_{11}, x_{12}, \ldots, z_{21}, z_{22}, (x_{11}x_{22}-x_{12}x_{21})^{-1} , (y_{11}y_{22}-y_{12}y_{21})^{-1}, (z_{11}z_{22}-z_{12}z_{21})^{-1}]. $$ Since the image of an irreducible algebraic set is still irreducible, it suffices to classify the orbits of the set $\{(X, Y)\in \text{Mat}(2, k)\times \text{Mat}(2, k)|XY = 0\}$ and take their closures. From standard linear algebra, we are reduced to the following three cases: \begin{enumerate} \item $\exists (g_1, g_2)$ such that $g_1Xg_2^{-1} = I_{2\times 2}$. Then $Y$ is necessarily $0$, which as an algebraic set is invariant under the group action. It follows that this orbit is contained in the irreducible algebraic set defined by the prime ideal $(y_{11}, y_{12}, y_{21}, y_{22})$. Taking the closure, we see that $(y_{11}, y_{12}, y_{21}, y_{22})$ is actually a component. \item $\exists (g_1, g_2)$ such that $$ g_1Xg_2^{-1} = \left( \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right). $$ This case occurs if and only if $X$ is a rank 1 matrix, and furthermore, $Y$ is killed by such an $X$ if and only if $$ x_{11}y_{11}+x_{12}y_{21} = 0; \quad x_{11}y_{12}+x_{12}y_{22} = 0; $$ $$ x_{21}y_{11}+x_{22}y_{21} = 0; \quad x_{21}y_{12}+x_{22}y_{22} = 0. $$ Fix a rank 1 $X$, such non zero $Y$'s satisfying the above equations form an irreducible algebraic set for the following reason($Y = 0$ is contained the previous case): $0 = g_1Xg_2^{-1}g_2Y$ implies that $$ g_2Y = \left( \begin{matrix} 0 & 0 \\ y_{21}' & y_{22}' \end{matrix} \right). $$ With a further $\text{GL}(2, k)$-action on the right by $g_3$, $g_2Y$ can be brought into $$ g_2Yg_3^{-1} = \left( \begin{matrix} 0 & 0 \\ 0 & 1 \end{matrix} \right), $$ and thus such $Y$'s form an irreducible algebraic set isomorphic to the image of $\text{GL}(2, k)$ under this action. Finally, notice that the ``rank 1" condition for $X$'s forms an open dense subset of the irreducible algebraic set $\det X = x_{11}x_{22} - x_{12}x_{21} = 0$. It now follows that all the five equations define an irreducible component $(x_{11}y_{11}+x_{12}y_{21}, x_{11}y_{12}+x_{12}y_{22}, x_{21}y_{11} +x_{22}y_{21}, x_{21}y_{12}+x_{22}y_{22}, x_{11}x_{22}-x_{12}x_{21})$ in the open subset of the space of pairs of nonzero matrices. It can be shown that the pair of equations $\det X = 0$, $\det Y = 0$ cuts $\Spec(R)$ in an irreducible component with the above locus an open dense subset. \item $\exists (g_1, g_2)$ such that $g_1Xg_2^{-1} = 0$, or equivalently, $X = 0$. Then $Y$ can be arbitrary and this component is thus defined by $(x_{11}, x_{12}, x_{21}, x_{22})$. \end{enumerate} \end{example} \begin{example} \label{example-idempotent-matrices} For another example, consider $R = k[\{t_{ij}\}_{i, j = 1}^{n}]/\mathfrak a$, where $\mathfrak a$ is the ideal generated by the entries of the product matrix $T^2-T$, $T = (t_{ij})$. From linear algebra, we know that under the $GL(n, k)$-action defined by $g, T \mapsto gTg^{-1}$, $T$ is classified by its rank and each $T$ is conjugate to some $\text{diag}(1, \ldots, 1, 0, \ldots, 0)$, which has $r$ 1's and $n-r$ 0's. Thus each orbit of such a $\text{diag}(1, \ldots, 1, 0, \ldots, 0)$ under the group action forms an irreducible component and every idempotent matrix is contained in one such orbit. Next we will show that any two different orbits are necessarily disjoint. For this purpose we only need to cook up polynomial functions that take different values on different orbits. In characteristic 0 cases, such a function can be taken to be $f(t_{ij}) = trace(T) = \sum_{i = 1}^nt_{ii}$. In positive characteristic cases, things are slightly more tricky since we might have $trace(T) = 0$ even if $T \neq 0$. For instance, if $k$ has characteristic $3$, $$ trace\left( \begin{matrix} 1 & & \\ & 1 & \\ & & 1 \end{matrix} \right) = 3 = 0 $$ Anyway, these components can be separated using other functions. For instance, in the characteristic 3 case, $tr(\wedge^3T)$ takes value 1 on the components corresponding to $diag(1, 1, 1)$ and 0 on other components. \end{example} \section{Finite and integral ring extensions} \label{section-finite-ring-extensions} % BEGIN ALGEBRA EDITORIAL ROUTE section-finite-ring-extensions \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-finite-ring-extensions}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-finite-ring-extensions \noindent Trivial lemmas concerning finite and integral ring maps. We recall the definition. \begin{definition} \label{definition-integral-ring-map} Let $\varphi : R \to S$ be a ring map. \begin{enumerate} \item An element $s \in S$ is {\it integral over $R$} if there exists a monic polynomial $P(x) \in R[x]$ such that $P^\varphi(s) = 0$, where $P^\varphi(x) \in S[x]$ is the image of $P$ under $\varphi : R[x] \to S[x]$. \item The ring map $\varphi$ is {\it integral} if every $s \in S$ is integral over $R$. \end{enumerate} \end{definition} \begin{lemma} \label{lemma-characterize-integral-element} Let $\varphi : R \to S$ be a ring map. Let $y \in S$. If there exists a finite $R$-submodule $M$ of $S$ such that $1 \in M$ and $yM \subset M$, then $y$ is integral over $R$. \end{lemma} \begin{proof} Consider the map $\varphi : M \to M$, $x \mapsto y \cdot x$. By Lemma \ref{lemma-charpoly-module} there exists a monic polynomial $P \in R[T]$ with $P(\varphi) = 0$. In the ring $S$ we get $P(y) = P(y) \cdot 1 = P(\varphi)(1) = 0$. \end{proof} \begin{lemma} \label{lemma-finite-is-integral} A finite ring map is integral. \end{lemma} \begin{proof} Let $R \to S$ be finite. Let $y \in S$. Apply Lemma \ref{lemma-characterize-integral-element} to $M = S$ to see that $y$ is integral over $R$. \end{proof} \begin{lemma} \label{lemma-characterize-integral} Let $\varphi : R \to S$ be a ring map. Let $s_1, \ldots, s_n$ be a finite set of elements of $S$. In this case $s_i$ is integral over $R$ for all $i = 1, \ldots, n$ if and only if there exists an $R$-subalgebra $S' \subset S$ finite over $R$ containing all of the $s_i$. \end{lemma} \begin{proof} If each $s_i$ is integral, then the subalgebra generated by $\varphi(R)$ and the $s_i$ is finite over $R$. Namely, if $s_i$ satisfies a monic equation of degree $d_i$ over $R$, then this subalgebra is generated as an $R$-module by the elements $s_1^{e_1} \ldots s_n^{e_n}$ with $0 \leq e_i \leq d_i - 1$. Conversely, suppose given a finite $R$-subalgebra $S'$ containing all the $s_i$. Then all of the $s_i$ are integral by Lemma \ref{lemma-finite-is-integral}. \end{proof} \begin{lemma} \label{lemma-characterize-finite-in-terms-of-integral} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is finite, \item $R \to S$ is integral and of finite type, and \item there exist $x_1, \ldots, x_n \in S$ which generate $S$ as an algebra over $R$ such that each $x_i$ is integral over $R$. \end{enumerate} \end{lemma} \begin{proof} Clear from Lemma \ref{lemma-characterize-integral}. \end{proof} \begin{lemma} \label{lemma-integral-transitive} \begin{slogan} A composition of integral ring maps is integral \end{slogan} Suppose that $R \to S$ and $S \to T$ are integral ring maps. Then $R \to T$ is integral. \end{lemma} \begin{proof} Let $t \in T$. Let $P(x) \in S[x]$ be a monic polynomial such that $P(t) = 0$. Apply Lemma \ref{lemma-characterize-integral} to the finite set of coefficients of $P$. Hence $t$ is integral over some subalgebra $S' \subset S$ finite over $R$. Apply Lemma \ref{lemma-characterize-integral} again to find a subalgebra $T' \subset T$ finite over $S'$ and containing $t$. Lemma \ref{lemma-finite-transitive} applied to $R \to S' \to T'$ shows that $T'$ is finite over $R$. The integrality of $t$ over $R$ now follows from Lemma \ref{lemma-finite-is-integral}. \end{proof} \begin{lemma} \label{lemma-integral-closure-is-ring} Let $R \to S$ be a ring homomorphism. The set $$ S' = \{s \in S \mid s\text{ is integral over }R\} $$ is an $R$-subalgebra of $S$. \end{lemma} \begin{proof} This is clear from Lemmas \ref{lemma-characterize-integral} and \ref{lemma-finite-is-integral}. \end{proof} \begin{lemma} \label{lemma-finite-product-integral} Let $R_i\to S_i$ be ring maps $i = 1, \ldots, n$. Let $R$ and $S$ denote the product of the $R_i$ and $S_i$ respectively. Then an element $s = (s_1, \ldots, s_n) \in S$ is integral over $R$ if and only if each $s_i$ is integral over $R_i$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{definition} \label{definition-integral-closure} Let $R \to S$ be a ring map. The ring $S' \subset S$ of elements integral over $R$, see Lemma \ref{lemma-integral-closure-is-ring}, is called the {\it integral closure} of $R$ in $S$. If $R \subset S$ we say that $R$ is {\it integrally closed} in $S$ if $R = S'$. \end{definition} \noindent In particular, we see that $R \to S$ is integral if and only if the integral closure of $R$ in $S$ is all of $S$. \begin{lemma} \label{lemma-finite-product-integral-closure} Let $R_i\to S_i$ be ring maps $i = 1, \ldots, n$. Denote the integral closure of $R_i$ in $S_i$ by $S'_i$. Further let $R$ and $S$ denote the product of the $R_i$ and $S_i$ respectively. Then the integral closure of $R$ in $S$ is the product of the $S'_i$. In particular $R \to S$ is integrally closed if and only if each $R_i \to S_i$ is integrally closed. \end{lemma} \begin{proof} This follows immediately from Lemma \ref{lemma-finite-product-integral}. \end{proof} \begin{lemma} \label{lemma-integral-closure-localize} Integral closure commutes with localization: If $A \to B$ is a ring map, and $S \subset A$ is a multiplicative subset, then the integral closure of $S^{-1}A$ in $S^{-1}B$ is $S^{-1}B'$, where $B' \subset B$ is the integral closure of $A$ in $B$. \end{lemma} \begin{proof} Since localization is exact we see that $S^{-1}B' \subset S^{-1}B$. Suppose $x \in B'$ and $f \in S$. Then $x^d + \sum_{i = 1, \ldots, d} a_i x^{d - i} = 0$ in $B$ for some $a_i \in A$. Hence also $$ (x/f)^d + \sum\nolimits_{i = 1, \ldots, d} a_i/f^i (x/f)^{d - i} = 0 $$ in $S^{-1}B$. In this way we see that $S^{-1}B'$ is contained in the integral closure of $S^{-1}A$ in $S^{-1}B$. Conversely, suppose that $x/f \in S^{-1}B$ is integral over $S^{-1}A$. Then we have $$ (x/f)^d + \sum\nolimits_{i = 1, \ldots, d} (a_i/f_i) (x/f)^{d - i} = 0 $$ in $S^{-1}B$ for some $a_i \in A$ and $f_i \in S$. This means that $$ (f'f_1 \ldots f_d x)^d + \sum\nolimits_{i = 1, \ldots, d} f^i(f')^if_1^i \ldots f_i^{i - 1} \ldots f_d^i a_i (f'f_1 \ldots f_dx)^{d - i} = 0 $$ for a suitable $f' \in S$. Hence $f'f_1\ldots f_dx \in B'$ and thus $x/f \in S^{-1}B'$ as desired. \end{proof} \begin{lemma} \label{lemma-integral-closure-stalks} \begin{slogan} An element of an algebra over a ring is integral over the ring if and only if it is locally integral at every prime ideal of the ring. \end{slogan} Let $\varphi : R \to S$ be a ring map. Let $x \in S$. The following are equivalent: \begin{enumerate} \item $x$ is integral over $R$, and \item for every prime ideal $\mathfrak p \subset R$ the element $x \in S_{\mathfrak p}$ is integral over $R_{\mathfrak p}$. \end{enumerate} \end{lemma} \begin{proof} It is clear that (1) implies (2). Assume (2). Consider the $R$-algebra $S' \subset S$ generated by $\varphi(R)$ and $x$. Let $\mathfrak p$ be a prime ideal of $R$. Then we know that $x^d + \sum_{i = 1, \ldots, d} \varphi(a_i) x^{d - i} = 0$ in $S_{\mathfrak p}$ for some $a_i \in R_{\mathfrak p}$. Hence we see, by looking at which denominators occur, that for some $f \in R$, $f \not \in \mathfrak p$ we have $a_i \in R_f$ and $x^d + \sum_{i = 1, \ldots, d} \varphi(a_i) x^{d - i} = 0$ in $S_f$. This implies that $S'_f$ is finite over $R_f$. Since $\mathfrak p$ was arbitrary and $\Spec(R)$ is quasi-compact (Lemma \ref{lemma-quasi-compact}) we can find finitely many elements $f_1, \ldots, f_n \in R$ which generate the unit ideal of $R$ such that $S'_{f_i}$ is finite over $R_{f_i}$. Hence we conclude from Lemma \ref{lemma-cover} that $S'$ is finite over $R$. Hence $x$ is integral over $R$ by Lemma \ref{lemma-characterize-integral}. \end{proof} \begin{lemma} \label{lemma-base-change-integral} \begin{slogan} Integrality and finiteness are preserved under base change. \end{slogan} Let $R \to S$ and $R \to R'$ be ring maps. Set $S' = R' \otimes_R S$. \begin{enumerate} \item If $R \to S$ is integral so is $R' \to S'$. \item If $R \to S$ is finite so is $R' \to S'$. \end{enumerate} \end{lemma} \begin{proof} We prove (1). Let $s_i \in S$ be generators for $S$ over $R$. Each of these satisfies a monic polynomial equation $P_i$ over $R$. Hence the elements $1 \otimes s_i \in S'$ generate $S'$ over $R'$ and satisfy the corresponding polynomial $P_i'$ over $R'$. Since these elements generate $S'$ over $R'$ we see that $S'$ is integral over $R'$. Proof of (2) omitted. \end{proof} \begin{lemma} \label{lemma-integral-local} Let $R \to S$ be a ring map. Let $f_1, \ldots, f_n \in R$ generate the unit ideal. \begin{enumerate} \item If each $R_{f_i} \to S_{f_i}$ is integral, so is $R \to S$. \item If each $R_{f_i} \to S_{f_i}$ is finite, so is $R \to S$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Let $s \in S$. Consider the ideal $I \subset R[x]$ of polynomials $P$ such that $P(s) = 0$. Let $J \subset R$ denote the ideal (!) of leading coefficients of elements of $I$. By assumption and clearing denominators we see that $f_i^{n_i} \in J$ for all $i$ and certain $n_i \geq 0$. Hence $J$ contains $1$ and we see $s$ is integral over $R$. Proof of (2) omitted. \end{proof} \begin{lemma} \label{lemma-integral-permanence} Let $A \to B \to C$ be ring maps. \begin{enumerate} \item If $A \to C$ is integral so is $B \to C$. \item If $A \to C$ is finite so is $B \to C$. \end{enumerate} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-integral-closure-transitive} Let $A \to B \to C$ be ring maps. Let $B'$ be the integral closure of $A$ in $B$, let $C'$ be the integral closure of $B'$ in $C$. Then $C'$ is the integral closure of $A$ in $C$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-integral-overring-surjective} Suppose that $R \to S$ is an integral ring extension with $R \subset S$. Then $\varphi : \Spec(S) \to \Spec(R)$ is surjective. \end{lemma} \begin{proof} Let $\mathfrak p \subset R$ be a prime ideal. We have to show $\mathfrak pS_{\mathfrak p} \not = S_{\mathfrak p}$, see Lemma \ref{lemma-in-image}. The localization $R_{\mathfrak p} \to S_{\mathfrak p}$ is injective (as localization is exact) and integral by Lemma \ref{lemma-integral-closure-localize} or \ref{lemma-base-change-integral}. Hence we may replace $R$, $S$ by $R_{\mathfrak p}$, $S_{\mathfrak p}$ and we may assume $R$ is local with maximal ideal $\mathfrak m$ and it suffices to show that $\mathfrak mS \not = S$. Suppose $1 = \sum f_i s_i$ with $f_i \in \mathfrak m$ and $s_i \in S$ in order to get a contradiction. Let $R \subset S' \subset S$ be such that $R \to S'$ is finite and $s_i \in S'$, see Lemma \ref{lemma-characterize-integral}. The equation $1 = \sum f_i s_i$ implies that the finite $R$-module $S'$ satisfies $S' = \mathfrak m S'$. Hence by Nakayama's Lemma \ref{lemma-NAK} we see $S' = 0$. Contradiction. \end{proof} \begin{lemma} \label{lemma-integral-under-field} Let $R$ be a ring. Let $K$ be a field. If $R \subset K$ and $K$ is integral over $R$, then $R$ is a field and $K$ is an algebraic extension. If $R \subset K$ and $K$ is finite over $R$, then $R$ is a field and $K$ is a finite algebraic extension. \end{lemma} \begin{proof} Assume that $R \subset K$ is integral. By Lemma \ref{lemma-integral-overring-surjective} we see that $\Spec(R)$ has $1$ point. Since clearly $R$ is a domain we see that $R = R_{(0)}$ is a field (Lemma \ref{lemma-minimal-prime-reduced-ring}). The other assertions are immediate from this. \end{proof} \begin{lemma} \label{lemma-integral-over-field} Let $k$ be a field. Let $S$ be a $k$-algebra over $k$. \begin{enumerate} \item If $S$ is a domain and finite dimensional over $k$, then $S$ is a field. \item If $S$ is integral over $k$ and a domain, then $S$ is a field. \item If $S$ is integral over $k$ then every prime of $S$ is a maximal ideal (see Lemma \ref{lemma-ring-with-only-minimal-primes} for more consequences). \end{enumerate} \end{lemma} \begin{proof} The statement on primes follows from the statement ``integral $+$ domain $\Rightarrow$ field''. Let $S$ be integral over $k$ and assume $S$ is a domain. Take a nonzero $s\in S$. By Lemma \ref{lemma-characterize-integral} we may find a finite dimensional $k$-subalgebra $k \subset S' \subset S$ containing $s$. Hence $S$ is a field if we can prove the first statement. Assume $S$ finite dimensional over $k$ and a domain. Pick $s\in S$. Since $S$ is a domain the multiplication map $s : S \to S$ is surjective by dimension reasons. Hence there exists an element $s_1 \in S$ such that $ss_1 = 1$. So $S$ is a field. \end{proof} \begin{lemma} \label{lemma-integral-no-inclusion} Suppose $R \to S$ is integral. Let $\mathfrak q, \mathfrak q' \in \Spec(S)$ be distinct primes having the same image in $\Spec(R)$. Then neither $\mathfrak q \subset \mathfrak q'$ nor $\mathfrak q' \subset \mathfrak q$. \end{lemma} \begin{proof} Let $\mathfrak p \subset R$ be the image. By Remark \ref{remark-fundamental-diagram} the primes $\mathfrak q, \mathfrak q'$ correspond to ideals in $S \otimes_R \kappa(\mathfrak p)$. Thus the lemma follows from Lemma \ref{lemma-integral-over-field}. \end{proof} \begin{lemma} \label{lemma-finite-finite-fibres} Suppose $R \to S$ is finite. Then the fibres of $\Spec(S) \to \Spec(R)$ are finite. \end{lemma} \begin{proof} By the discussion in Remark \ref{remark-fundamental-diagram} the fibres are the spectra of the rings $S \otimes_R \kappa(\mathfrak p)$. As $R \to S$ is finite, these fibre rings are finite over $\kappa(\mathfrak p)$ hence Noetherian by Lemma \ref{lemma-Noetherian-permanence}. By Lemma \ref{lemma-integral-no-inclusion} every prime of $S \otimes_R \kappa(\mathfrak p)$ is a minimal prime. Hence by Lemma \ref{lemma-Noetherian-irreducible-components} there are at most finitely many. \end{proof} \begin{lemma} \label{lemma-integral-going-up} Let $R \to S$ be a ring map such that $S$ is integral over $R$. Let $\mathfrak p \subset \mathfrak p' \subset R$ be primes. Let $\mathfrak q$ be a prime of $S$ mapping to $\mathfrak p$. Then there exists a prime $\mathfrak q'$ with $\mathfrak q \subset \mathfrak q'$ mapping to $\mathfrak p'$. \end{lemma} \begin{proof} We may replace $R$ by $R/\mathfrak p$ and $S$ by $S/\mathfrak q$. This reduces us to the situation of having an integral extension of domains $R \subset S$ and a prime $\mathfrak p' \subset R$. By Lemma \ref{lemma-integral-overring-surjective} we win. \end{proof} \noindent The property expressed in the lemma above is called the ``going up property'' for the ring map $R \to S$, see Definition \ref{definition-going-up-down}. \begin{lemma} \label{lemma-finite-finitely-presented-extension} Let $R \to S$ be a finite and finitely presented ring map. Let $M$ be an $S$-module. Then $M$ is finitely presented as an $R$-module if and only if $M$ is finitely presented as an $S$-module. \end{lemma} \begin{proof} One of the implications follows from Lemma \ref{lemma-finitely-presented-over-subring}. To see the other assume that $M$ is finitely presented as an $S$-module. Pick a presentation $$ S^{\oplus m} \longrightarrow S^{\oplus n} \longrightarrow M \longrightarrow 0 $$ As $S$ is finite as an $R$-module, the kernel of $S^{\oplus n} \to M$ is a finite $R$-module. Thus from Lemma \ref{lemma-extension} we see that it suffices to prove that $S$ is finitely presented as an $R$-module. \medskip\noindent Pick $y_1, \ldots, y_n \in S$ such that $y_1, \ldots, y_n$ generate $S$ as an $R$-module. By Lemma \ref{lemma-characterize-integral-element} each $y_i$ is integral over $R$. Choose monic polynomials $P_i(x) \in R[x]$ with $P_i(y_i) = 0$. Consider the ring $$ S' = R[x_1, \ldots, x_n]/(P_1(x_1), \ldots, P_n(x_n)) $$ Then we see that $S$ is of finite presentation as an $S'$-algebra by Lemma \ref{lemma-compose-finite-type}. Since $S' \to S$ is surjective, the kernel $J = \Ker(S' \to S)$ is finitely generated as an ideal by Lemma \ref{lemma-finite-presentation-independent}. Hence $J$ is a finite $S'$-module (immediate from the definitions). Thus $S = \Coker(J \to S')$ is of finite presentation as an $S'$-module by Lemma \ref{lemma-extension}. Hence, arguing as in the first paragraph, it suffices to show that $S'$ is of finite presentation as an $R$-module. Actually, $S'$ is free as an $R$-module with basis the monomials $x_1^{e_1} \ldots x_n^{e_n}$ for $0 \leq e_i < \deg(P_i)$. Namely, write $R \to S'$ as the composition $$ R \to R[x_1]/(P_1(x_1)) \to R[x_1, x_2]/(P_1(x_1), P_2(x_2)) \to \ldots \to S' $$ This shows that the $i$th ring in this sequence is free as a module over the $(i - 1)$st one with basis $1, x_i, \ldots, x_i^{\deg(P_i) - 1}$. The result follows easily from this by induction. Some details omitted. \end{proof} \begin{lemma} \label{lemma-silly-normal} Let $R$ be a ring. Let $x, y \in R$ be nonzerodivisors. Let $R[x/y] \subset R_{xy}$ be the $R$-subalgebra generated by $x/y$, and similarly for the subalgebras $R[y/x]$ and $R[x/y, y/x]$. If $R$ is integrally closed in $R_x$ or $R_y$, then the sequence $$ 0 \to R \xrightarrow{(-1, 1)} R[x/y] \oplus R[y/x] \xrightarrow{(1, 1)} R[x/y, y/x] \to 0 $$ is a short exact sequence of $R$-modules. \end{lemma} \begin{proof} Since $x/y \cdot y/x = 1$ it is clear that the map $R[x/y] \oplus R[y/x] \to R[x/y, y/x]$ is surjective. Let $\alpha \in R[x/y] \cap R[y/x]$. To show exactness in the middle we have to prove that $\alpha \in R$. By assumption we may write $$ \alpha = a_0 + a_1 x/y + \ldots + a_n (x/y)^n = b_0 + b_1 y/x + \ldots + b_m(y/x)^m $$ for some $n, m \geq 0$ and $a_i, b_j \in R$. Pick some $N > \max(n, m)$. Consider the finite $R$-submodule $M$ of $R_{xy}$ generated by the elements $$ (x/y)^N, (x/y)^{N - 1}, \ldots, x/y, 1, y/x, \ldots, (y/x)^{N - 1}, (y/x)^N $$ We claim that $\alpha M \subset M$. Namely, it is clear that $(x/y)^i (b_0 + b_1 y/x + \ldots + b_m(y/x)^m) \in M$ for $0 \leq i \leq N$ and that $(y/x)^i (a_0 + a_1 x/y + \ldots + a_n(x/y)^n) \in M$ for $0 \leq i \leq N$. Hence $\alpha$ is integral over $R$ by Lemma \ref{lemma-characterize-integral-element}. Note that $\alpha \in R_x$, so if $R$ is integrally closed in $R_x$ then $\alpha \in R$ as desired. \end{proof} \section{Normal rings} \label{section-normal-rings} % BEGIN ALGEBRA EDITORIAL ROUTE section-normal-rings \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-normal-rings}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-normal-rings \noindent We first introduce the notion of a normal domain, and then we introduce the (very general) notion of a normal ring. \begin{definition} \label{definition-domain-normal} A domain $R$ is called {\it normal} if it is integrally closed in its field of fractions. \end{definition} \begin{lemma} \label{lemma-integral-closure-in-normal} Let $R \to S$ be a ring map. If $S$ is a normal domain, then the integral closure of $R$ in $S$ is a normal domain. \end{lemma} \begin{proof} Omitted. \end{proof} \noindent The following notion is occasionally useful when studying normality. \begin{definition} \label{definition-almost-integral} Let $R$ be a domain. \begin{enumerate} \item An element $g$ of the fraction field of $R$ is called {\it almost integral over $R$} if there exists an element $r \in R$, $r\not = 0$ such that $rg^n \in R$ for all $n \geq 0$. \item The domain $R$ is called {\it completely normal} if every almost integral element of the fraction field of $R$ is contained in $R$. \end{enumerate} \end{definition} \noindent The following lemma shows that a Noetherian domain is normal if and only if it is completely normal. \begin{lemma} \label{lemma-almost-integral} Let $R$ be a domain with fraction field $K$. If $u, v \in K$ are almost integral over $R$, then so are $u + v$ and $uv$. Any element $g \in K$ which is integral over $R$ is almost integral over $R$. If $R$ is Noetherian then the converse holds as well. \end{lemma} \begin{proof} If $ru^n \in R$ for all $n \geq 0$ and $v^nr' \in R$ for all $n \geq 0$, then $(uv)^nrr'$ and $(u + v)^nrr'$ are in $R$ for all $n \geq 0$. Hence the first assertion. Suppose $g \in K$ is integral over $R$. In this case there exists a $d > 0$ such that the ring $R[g]$ is generated by $1, g, \ldots, g^d$ as an $R$-module. Let $r \in R$ be a common denominator of the elements $1, g, \ldots, g^d \in K$. It follows that $rR[g] \subset R$, and hence $g$ is almost integral over $R$. \medskip\noindent Suppose $R$ is Noetherian and $g \in K$ is almost integral over $R$. Let $r \in R$, $r\not = 0$ be as in the definition. Then $R[g] \subset \frac{1}{r}R$ as an $R$-module. Since $R$ is Noetherian this implies that $R[g]$ is finite over $R$. Hence $g$ is integral over $R$, see Lemma \ref{lemma-finite-is-integral}. \end{proof} \begin{lemma} \label{lemma-localize-normal-domain} Any localization of a normal domain is normal. \end{lemma} \begin{proof} Let $R$ be a normal domain, and let $S \subset R$ be a multiplicative subset. Suppose $g$ is an element of the fraction field of $R$ which is integral over $S^{-1}R$. Let $P = x^d + \sum_{j < d} a_j x^j$ be a polynomial with $a_i \in S^{-1}R$ such that $P(g) = 0$. Choose $s \in S$ such that $sa_i \in R$ for all $i$. Then $sg$ satisfies the monic polynomial $x^d + \sum_{j < d} s^{d-j}a_j x^j$ which has coefficients $s^{d-j}a_j$ in $R$. Hence $sg \in R$ because $R$ is normal. Hence $g \in S^{-1}R$. \end{proof} \begin{lemma} \label{lemma-PID-normal} A principal ideal domain is normal. \end{lemma} \begin{proof} Let $R$ be a principal ideal domain. Let $g = a/b$ be an element of the fraction field of $R$ integral over $R$. Because $R$ is a principal ideal domain we may divide out a common factor of $a$ and $b$ and assume $(a, b) = R$. In this case, any equation $(a/b)^n + r_{n-1} (a/b)^{n-1} + \ldots + r_0 = 0$ with $r_i \in R$ would imply $a^n \in (b)$. This contradicts $(a, b) = R$ unless $b$ is a unit in $R$. \end{proof} \begin{lemma} \label{lemma-prepare-polynomial-ring-normal} Let $R$ be a domain with fraction field $K$. Suppose $f = \sum \alpha_i x^i$ is an element of $K[x]$. \begin{enumerate} \item If $f$ is integral over $R[x]$ then all $\alpha_i$ are integral over $R$, and \item If $f$ is almost integral over $R[x]$ then all $\alpha_i$ are almost integral over $R$. \end{enumerate} \end{lemma} \begin{proof} We first prove the second statement. Write $f = \alpha_0 + \alpha_1 x + \ldots + \alpha_r x^r$ with $\alpha_r \not = 0$. By assumption there exists $h = b_0 + b_1 x + \ldots + b_s x^s \in R[x]$, $b_s \not = 0$ such that $f^n h \in R[x]$ for all $n \geq 0$. This implies that $b_s \alpha_r^n \in R$ for all $n \geq 0$. Hence $\alpha_r$ is almost integral over $R$. Since the set of almost integral elements forms a subring (Lemma \ref{lemma-almost-integral}) we deduce that $f - \alpha_r x^r = \alpha_0 + \alpha_1 x + \ldots + \alpha_{r - 1} x^{r - 1}$ is almost integral over $R[x]$. By induction on $r$ we win. \medskip\noindent In order to prove the first statement we will use absolute Noetherian reduction. Namely, write $\alpha_i = a_i / b_i$ and let $P(t) = t^d + \sum_{j < d} f_j t^j$ be a polynomial with coefficients $f_j \in R[x]$ such that $P(f) = 0$. Let $f_j = \sum f_{ji}x^i$. Consider the subring $R_0 \subset R$ generated by the finite list of elements $a_i, b_i, f_{ji}$ of $R$. It is a domain; let $K_0$ be its field of fractions. Since $R_0$ is a finite type $\mathbf{Z}$-algebra it is Noetherian, see Lemma \ref{lemma-obvious-Noetherian}. It is still the case that $f \in K_0[x]$ is integral over $R_0[x]$, because all the identities in $R$ among the elements $a_i, b_i, f_{ji}$ also hold in $R_0$. By Lemma \ref{lemma-almost-integral} the element $f$ is almost integral over $R_0[x]$. By the second statement of the lemma, the elements $\alpha_i$ are almost integral over $R_0$. And since $R_0$ is Noetherian, they are integral over $R_0$, see Lemma \ref{lemma-almost-integral}. Of course, then they are integral over $R$. \end{proof} \begin{lemma} \label{lemma-polynomial-domain-normal} Let $R$ be a normal domain. Then $R[x]$ is a normal domain. \end{lemma} \begin{proof} The result is true if $R$ is a field $K$ because $K[x]$ is a euclidean domain and hence a principal ideal domain and hence normal by Lemma \ref{lemma-PID-normal}. Let $g$ be an element of the fraction field of $R[x]$ which is integral over $R[x]$. Because $g$ is integral over $K[x]$ where $K$ is the fraction field of $R$ we may write $g = \alpha_d x^d + \alpha_{d-1}x^{d-1} + \ldots + \alpha_0$ with $\alpha_i \in K$. By Lemma \ref{lemma-prepare-polynomial-ring-normal} the elements $\alpha_i$ are integral over $R$ and hence are in $R$. \end{proof} \begin{lemma} \label{lemma-power-series-over-Noetherian-normal-domain} Let $R$ be a Noetherian normal domain. Then $R[[x]]$ is a Noetherian normal domain. \end{lemma} \begin{proof} The power series ring is Noetherian by Lemma \ref{lemma-Noetherian-power-series}. Let $f, g \in R[[x]]$ be nonzero elements such that $w = f/g$ is integral over $R[[x]]$. Let $K$ be the fraction field of $R$. Since the ring of Laurent series $K((x)) = K[[x]][1/x]$ is a field, we can write $w = a_n x^n + a_{n + 1} x^{n + 1} + \ldots$ for some $n \in \mathbf{Z}$, $a_i \in K$, and $a_n \not = 0$. By Lemma \ref{lemma-almost-integral} we see there exists a nonzero element $h = b_m x^m + b_{m + 1} x^{m + 1} + \ldots$ in $R[[x]]$ with $b_m \not = 0$ such that $w^e h \in R[[x]]$ for all $e \geq 1$. We conclude that $n \geq 0$ and that $b_m a_n^e \in R$ for all $e \geq 1$. Since $R$ is Noetherian this implies that $a_n \in R$ by the same lemma. Now, if $a_n, a_{n + 1}, \ldots, a_{N - 1} \in R$, then we can apply the same argument to $w - a_n x^n - \ldots - a_{N - 1} x^{N - 1} = a_N x^N + \ldots$. In this way we see that all $a_i \in R$ and the lemma is proved. \end{proof} \begin{lemma} \label{lemma-normality-is-local} Let $R$ be a domain. The following are equivalent: \begin{enumerate} \item The domain $R$ is a normal domain, \item for every prime $\mathfrak p \subset R$ the local ring $R_{\mathfrak p}$ is a normal domain, and \item for every maximal ideal $\mathfrak m$ the ring $R_{\mathfrak m}$ is a normal domain. \end{enumerate} \end{lemma} \begin{proof} We deduce (1) $\Rightarrow$ (2) from Lemma \ref{lemma-localize-normal-domain}. The implication (2) $\Rightarrow$ (3) is immediate. The implication (3) $\Rightarrow$ (1) follows from the fact that for any domain $R$ we have $$ R = \bigcap\nolimits_{\mathfrak m} R_{\mathfrak m} $$ inside the fraction field of $R$. Namely, if $g$ is an element of the right hand side then the ideal $I = \{x \in R \mid xg \in R\}$ is not contained in any maximal ideal $\mathfrak m$, whence $I = R$. \end{proof} \noindent Lemma \ref{lemma-normality-is-local} shows that the following definition is compatible with Definition \ref{definition-domain-normal}. (It is the definition from EGA -- see \cite[IV, 5.13.5 and 0, 4.1.4]{EGA}.) \begin{definition} \label{definition-ring-normal} A ring $R$ is called {\it normal} if for every prime $\mathfrak p \subset R$ the localization $R_{\mathfrak p}$ is a normal domain (see Definition \ref{definition-domain-normal}). \end{definition} \noindent Note that a normal ring is a reduced ring, as $R$ is a subring of the product of its localizations at all primes (see for example Lemma \ref{lemma-characterize-zero-local}). \begin{lemma} \label{lemma-normal-ring-integrally-closed} A normal ring is integrally closed in its total ring of fractions. \end{lemma} \begin{proof} Let $R$ be a normal ring. Let $x \in Q(R)$ be an element of the total ring of fractions of $R$ integral over $R$. Set $I = \{f \in R, fx \in R\}$. Let $\mathfrak p \subset R$ be a prime. As $R \to R_{\mathfrak p}$ is flat we see that $R_{\mathfrak p} \subset Q(R) \otimes_R R_{\mathfrak p}$. As $R_{\mathfrak p}$ is a normal domain we see that $x \otimes 1$ is an element of $R_{\mathfrak p}$. Hence we can find $a, f \in R$, $f \not \in \mathfrak p$ such that $x \otimes 1 = a \otimes 1/f$. This means that $fx - a$ maps to zero in $Q(R) \otimes_R R_{\mathfrak p} = Q(R)_{\mathfrak p}$, which in turn means that there exists an $f' \in R$, $f' \not \in \mathfrak p$ such that $f'fx = f'a$ in $R$. In other words, $ff' \in I$. Thus $I$ is an ideal which isn't contained in any of the prime ideals of $R$, i.e., $I = R$ and $x \in R$. \end{proof} \begin{lemma} \label{lemma-localization-normal-ring} A localization of a normal ring is a normal ring. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-polynomial-ring-normal} Let $R$ be a normal ring. Then $R[x]$ is a normal ring. \end{lemma} \begin{proof} Let $\mathfrak q$ be a prime of $R[x]$. Set $\mathfrak p = R \cap \mathfrak q$. Then we see that $R_{\mathfrak p}[x]$ is a normal domain by Lemma \ref{lemma-polynomial-domain-normal}. Hence $(R[x])_{\mathfrak q}$ is a normal domain by Lemma \ref{lemma-localize-normal-domain}. \end{proof} \begin{lemma} \label{lemma-finite-product-normal} A finite product of normal rings is normal. \end{lemma} \begin{proof} It suffices to show that the product of two normal rings, say $R$ and $S$, is normal. By Lemma \ref{lemma-disjoint-decomposition} the prime ideals of $R\times S$ are of the form $\mathfrak{p}\times S$ and $R\times \mathfrak{q}$, where $\mathfrak{p}$ and $\mathfrak{q}$ are primes of $R$ and $S$ respectively. Localization yields $(R\times S)_{\mathfrak{p}\times S}=R_{\mathfrak{p}}$ which is a normal domain by assumption. Similarly for $S$. \end{proof} \begin{lemma} \label{lemma-characterize-reduced-ring-normal} Let $R$ be a ring. Assume $R$ is reduced and has finitely many minimal primes. Then the following are equivalent: \begin{enumerate} \item $R$ is a normal ring, \item $R$ is integrally closed in its total ring of fractions, and \item $R$ is a finite product of normal domains. \end{enumerate} \end{lemma} \begin{proof} The implications (1) $\Rightarrow$ (2) and (3) $\Rightarrow$ (1) hold in general, see Lemmas \ref{lemma-normal-ring-integrally-closed} and \ref{lemma-finite-product-normal}. \medskip\noindent Let $\mathfrak p_1, \ldots, \mathfrak p_n$ be the minimal primes of $R$. By Lemmas \ref{lemma-reduced-ring-sub-product-fields} and \ref{lemma-total-ring-fractions-no-embedded-points} we have $Q(R) = R_{\mathfrak p_1} \times \ldots \times R_{\mathfrak p_n}$, and by Lemma \ref{lemma-minimal-prime-reduced-ring} each factor is a field. Let $e_i = (0, \ldots, 0, 1, 0, \ldots, 0)$ be the $i$th idempotent of $Q(R)$. \medskip\noindent If $R$ is integrally closed in $Q(R)$, then it contains in particular the idempotents $e_i$, and we see that $R$ is a product of $n$ domains (see Sections \ref{section-connected-components} and \ref{section-tilde-module-sheaf}). Each factor is of the form $R/\mathfrak p_i$ with field of fractions $R_{\mathfrak p_i}$. By Lemma \ref{lemma-finite-product-integral-closure} each map $R/\mathfrak p_i \to R_{\mathfrak p_i}$ is integrally closed. Hence $R$ is a finite product of normal domains. \end{proof} \begin{lemma} \label{lemma-colimit-normal-ring} Let $(R_i, \varphi_{ii'})$ be a directed system (Categories, Definition \ref{definition-directed-system}) of rings. If each $R_i$ is a normal ring so is $R = \colim_i R_i$. \end{lemma} \begin{proof} Let $\mathfrak p \subset R$ be a prime ideal. Set $\mathfrak p_i = R_i \cap \mathfrak p$ (usual abuse of notation). Then we see that $R_{\mathfrak p} = \colim_i (R_i)_{\mathfrak p_i}$. Since each $(R_i)_{\mathfrak p_i}$ is a normal domain we reduce to proving the statement of the lemma for normal domains. If $a, b \in R$ and $a/b$ satisfies a monic polynomial $P(T) \in R[T]$, then we can find a (sufficiently large) $i \in I$ such that $a, b$ come from objects $a_i, b_i$ over $R_i$, $P$ comes from a monic polynomial $P_i\in R_i[T]$ and $P_i(a_i/b_i)=0$. Since $R_i$ is normal we see $a_i/b_i \in R_i$ and hence also $a/b \in R$. \end{proof} \section{Going down for integral over normal} \label{section-going-down-integral-over-normal} % BEGIN ALGEBRA EDITORIAL ROUTE section-going-down-integral-over-normal \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-going-down-integral-over-normal}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-going-down-integral-over-normal \noindent We first play around a little bit with the notion of elements integral over an ideal, and then we prove the theorem referred to in the section title. \begin{definition} \label{definition-integral-over-ideal} Let $\varphi : R \to S$ be a ring map. Let $I \subset R$ be an ideal. We say an element $g \in S$ is {\it integral over $I$} if there exists a monic polynomial $P = x^d + \sum_{j < d} a_j x^j$ with coefficients $a_j \in I^{d-j}$ such that $P^\varphi(g) = 0$ in $S$. \end{definition} \noindent This is mostly used when $\varphi = \text{id}_R : R \to R$. In this case the set $I'$ of elements integral over $I$ is called the {\it integral closure of $I$}. We will see that $I'$ is an ideal of $R$ (and of course $I \subset I'$). \begin{lemma} \label{lemma-characterize-integral-ideal} Let $\varphi : R \to S$ be a ring map. Let $I \subset R$ be an ideal. Let $A = \sum I^nt^n \subset R[t]$ be the subring of the polynomial ring generated by $R \oplus It \subset R[t]$. An element $s \in S$ is integral over $I$ if and only if the element $st \in S[t]$ is integral over $A$. \end{lemma} \begin{proof} Suppose $st$ is integral over $A$. Let $P = x^d + \sum_{j < d} a_j x^j$ be a monic polynomial with coefficients in $A$ such that $P^\varphi(st) = 0$. Let $a_j' \in A$ be the degree $d-j$ part of $a_j$, in other words $a_j' = a_j'' t^{d-j}$ with $a_j'' \in I^{d-j}$. For degree reasons we still have $(st)^d + \sum_{j < d} \varphi(a_j'') t^{d-j} (st)^j = 0$. Hence $s^d + \sum_{j < d} \varphi(a_j'') s^j = 0$ and we see that $s$ is integral over $I$. \medskip\noindent Suppose that $s$ is integral over $I$. Say $P = x^d + \sum_{j < d} a_j x^j$ with $a_j \in I^{d-j}$. Then we immediately find a polynomial $Q = x^d + \sum_{j < d} (a_j t^{d-j}) x^j$ with coefficients in $A$ which proves that $st$ is integral over $A$. \end{proof} \begin{lemma} \label{lemma-integral-over-ideal-is-submodule} Let $\varphi : R \to S$ be a ring map. Let $I \subset R$ be an ideal. The set of elements of $S$ which are integral over $I$ forms an $R$-submodule of $S$. Furthermore, if $s \in S$ is integral over $R$, and $s'$ is integral over $I$, then $ss'$ is integral over $I$. \end{lemma} \begin{proof} We will use Lemma \ref{lemma-integral-closure-is-ring} without further mention. Closure under addition is clear from the characterization of Lemma \ref{lemma-characterize-integral-ideal} whose notation we adopt. Any element $s \in S$ which is integral over $R$ corresponds to the degree $0$ element $s$ of $S[t]$ which is integral over $A$ (because $R \subset A$). Hence we see that multiplication by $s$ on $S[t]$ preserves the property of being integral over $A$, \end{proof} \begin{lemma} \label{lemma-integral-integral-over-ideal} Suppose $\varphi : R \to S$ is integral. Suppose $I \subset R$ is an ideal. Then every element of $IS$ is integral over $I$. \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-integral-over-ideal-is-submodule}. \end{proof} \begin{lemma} \label{lemma-polynomials-divide} Let $K$ be a field. Let $n, m \in \mathbf{N}$ and $a_0, \ldots, a_{n - 1}, b_0, \ldots, b_{m - 1} \in K$. If the polynomial $x^n + a_{n - 1}x^{n - 1} + \ldots + a_0$ divides the polynomial $x^m + b_{m - 1} x^{m - 1} + \ldots + b_0$ in $K[x]$ then \begin{enumerate} \item $a_0, \ldots, a_{n - 1}$ are integral over any subring $R_0$ of $K$ containing the elements $b_0, \ldots, b_{m - 1}$, and \item each $a_i$ lies in $\sqrt{(b_0, \ldots, b_{m-1})R}$ for any subring $R \subset K$ containing the elements $a_0, \ldots, a_{n - 1}, b_0, \ldots, b_{m - 1}$. \end{enumerate} \end{lemma} \begin{proof} Let $L/K$ be a field extension such that we can write $x^m + b_{m - 1} x^{m - 1} + \ldots + b_0 = \prod_{i = 1}^m (x - \beta_i)$ with $\beta_i \in L$. See Fields, Section \ref{fields-section-splitting-fieds}. Each $\beta_i$ is integral over $R_0$. Since each $a_i$ is a homogeneous polynomial in $\beta_1, \ldots, \beta_m$ we deduce the same for the $a_i$ (use Lemma \ref{lemma-integral-closure-is-ring}). This proves (1). \medskip\noindent Let $R$ be as in (2). Choose $c_0, \ldots, c_{m - n - 1} \in K$ such that $$ \begin{matrix} x^m + b_{m - 1} x^{m - 1} + \ldots + b_0 = \\ (x^n + a_{n - 1}x^{n - 1} + \ldots + a_0) (x^{m - n} + c_{m - n - 1}x^{m - n - 1}+ \ldots + c_0). \end{matrix} $$ This equation implies \begin{align*} c_{m - n - 1} & = b_{m - 1} - a_{n - 1}, \\ c_{m - n - 2} & = b_{m - 2} - a_{n - 2} - a_{n - 1}c_{m - n - 1}, \\ \ldots \end{align*} Thus $c_j \in R$ for all $j$. Dividing out the radical $\sqrt{(b_0, \ldots, b_{m - 1})}$ we get a reduced ring $\overline{R}$. We have to show that the images $\overline{a}_i \in \overline{R}$ are zero. And in $\overline{R}[x]$ we have the relation $$ \begin{matrix} x^m = x^m + \overline{b}_{m - 1} x^{m - 1} + \ldots + \overline{b}_0 = \\ (x^n + \overline{a}_{n - 1}x^{n - 1} + \ldots + \overline{a}_0) (x^{m - n} + \overline{c}_{m - n - 1}x^{m - n - 1}+ \ldots + \overline{c}_0). \end{matrix} $$ It is easy to see that this implies $\overline{a}_i = 0$ for all $i$. Indeed by Lemma \ref{lemma-minimal-prime-reduced-ring} the localization of $\overline{R}$ at a minimal prime $\mathfrak{p}$ is a field and $\overline{R}_{\mathfrak p}[x]$ a UFD. Thus $f = x^n + \sum \overline{a}_i x^i$ is associated to $x^n$ and since $f$ is monic $f = x^n$ in $\overline{R}_{\mathfrak p}[x]$. Then there exists an $s \in \overline{R}$, $s \not\in \mathfrak p$ such that $s(f - x^n) = 0$. Therefore all $\overline{a}_i$ lie in $\mathfrak p$ and we conclude by Lemma \ref{lemma-reduced-ring-sub-product-fields}. \end{proof} \begin{lemma} \label{lemma-minimal-polynomial-normal-domain} Let $R \subset S$ be an inclusion of domains. Assume $R$ is normal. Let $g \in S$ be integral over $R$. Then the minimal polynomial of $g$ has coefficients in $R$. \end{lemma} \begin{proof} Let $P = x^m + b_{m-1} x^{m-1} + \ldots + b_0$ be a polynomial with coefficients in $R$ such that $P(g) = 0$. Let $Q = x^n + a_{n-1}x^{n-1} + \ldots + a_0$ be the minimal polynomial for $g$ over the fraction field $K$ of $R$. Then $Q$ divides $P$ in $K[x]$. By Lemma \ref{lemma-polynomials-divide} we see the $a_i$ are integral over $R$. Since $R$ is normal this means they are in $R$. \end{proof} \begin{proposition} \label{proposition-going-down-normal-integral} Let $R \subset S$ be an inclusion of domains. Assume $R$ is normal and $S$ integral over $R$. Let $\mathfrak p \subset \mathfrak p' \subset R$ be primes. Let $\mathfrak q'$ be a prime of $S$ with $\mathfrak p' = R \cap \mathfrak q'$. Then there exists a prime $\mathfrak q$ with $\mathfrak q \subset \mathfrak q'$ such that $\mathfrak p = R \cap \mathfrak q$. In other words: the going down property holds for $R \to S$, see Definition \ref{definition-going-up-down}. \end{proposition} \begin{proof} Let $\mathfrak p$, $\mathfrak p'$ and $\mathfrak q'$ be as in the statement. We have to show there is a prime $\mathfrak q$, with $\mathfrak q \subset \mathfrak q'$ and $R \cap \mathfrak q = \mathfrak p$. This is the same as finding a prime of $S_{\mathfrak q'}$ mapping to $\mathfrak p$. According to Lemma \ref{lemma-in-image} we have to show that $\mathfrak p S_{\mathfrak q'} \cap R = \mathfrak p$. Pick $z \in \mathfrak p S_{\mathfrak q'} \cap R$. We may write $z = y/g$ with $y \in \mathfrak pS$ and $g \in S$, $g \not\in \mathfrak q'$. Written differently we have $zg = y$. \medskip\noindent By Lemma \ref{lemma-integral-integral-over-ideal} there exists a monic polynomial $P = x^m + b_{m-1} x^{m-1} + \ldots + b_0$ with $b_i \in \mathfrak p$ such that $P(y) = 0$. \medskip\noindent By Lemma \ref{lemma-minimal-polynomial-normal-domain} the minimal polynomial of $g$ over $K$ has coefficients in $R$. Write it as $Q = x^n + a_{n-1} x^{n-1} + \ldots + a_0$. Note that not all $a_i$, $i = n-1, \ldots, 0$ are in $\mathfrak p$ since that would imply $g^n = \sum_{j < n} a_j g^j \in \mathfrak pS \subset \mathfrak p'S \subset \mathfrak q'$ which is a contradiction. \medskip\noindent Since $y = zg$ we see immediately from the above that $Q' = x^n + za_{n-1} x^{n-1} + \ldots + z^{n}a_0$ is the minimal polynomial for $y$. Hence $Q'$ divides $P$ and by Lemma \ref{lemma-polynomials-divide} we see that $z^ja_{n - j} \in \sqrt{(b_0, \ldots, b_{m-1})} \subset \mathfrak p$, $j = 1, \ldots, n$. Because not all $a_i$, $i = n-1, \ldots, 0$ are in $\mathfrak p$ we conclude $z \in \mathfrak p$ as desired. \end{proof} \section{Flat modules and flat ring maps} \label{section-flat} % BEGIN ALGEBRA EDITORIAL ROUTE section-flat \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-flat}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-flat \noindent One often used result is that if $M = \colim_{i\in \mathcal{I}} M_i$ is a colimit of $R$-modules and if $N$ is an $R$-module then $$ M \otimes N = \colim_{i\in \mathcal{I}} M_i \otimes_R N, $$ see Lemma \ref{lemma-tensor-products-commute-with-limits}. This property is usually expressed by saying that {\it $\otimes$ commutes with colimits}. Another often used result is that if $0 \to N_1 \to N_2 \to N_3 \to 0$ is an exact sequence and if $M$ is any $R$-module, then $$ M \otimes_R N_1 \to M \otimes_R N_2 \to M \otimes_R N_3 \to 0 $$ is still exact, see Lemma \ref{lemma-tensor-product-exact}. Both of these properties tell us that the functor $N \mapsto M \otimes_R N$ {\it is right exact}. See Categories, Section \ref{categories-section-exact-functor} and Homology, Section \ref{homology-section-functors}. An $R$-module $M$ is flat if $N \mapsto N \otimes_R M$ is also left exact, i.e., if it is exact. Here is the precise definition. \begin{definition} \label{definition-flat} Let $R$ be a ring. \begin{enumerate} \item An $R$-module $M$ is called {\it flat} if whenever $N_1 \to N_2 \to N_3$ is an exact sequence of $R$-modules the sequence $M \otimes_R N_1 \to M \otimes_R N_2 \to M \otimes_R N_3$ is exact as well. \item An $R$-module $M$ is called {\it faithfully flat} if the complex of $R$-modules $N_1 \to N_2 \to N_3$ is exact if and only if the sequence $M \otimes_R N_1 \to M \otimes_R N_2 \to M \otimes_R N_3$ is exact. \item A ring map $R \to S$ is called {\it flat} if $S$ is flat as an $R$-module. \item A ring map $R \to S$ is called {\it faithfully flat} if $S$ is faithfully flat as an $R$-module. \end{enumerate} \end{definition} \noindent Here is an example of how you can use the flatness condition. \begin{lemma} \label{lemma-flat-intersect-ideals} Let $R$ be a ring. Let $I, J \subset R$ be ideals. Let $M$ be a flat $R$-module. Then $IM \cap JM = (I \cap J)M$. \end{lemma} \begin{proof} Consider the exact sequence $0 \to I \cap J \to R \to R/I \oplus R/J$. Tensoring with the flat module $M$ we obtain an exact sequence $$ 0 \to (I \cap J) \otimes_R M \to M \to M/IM \oplus M/JM $$ Since the kernel of $M \to M/IM \oplus M/JM$ is equal to $IM \cap JM$ we conclude. \end{proof} \begin{lemma} \label{lemma-colimit-flat} Let $R$ be a ring. Let $\{M_i, \varphi_{ii'}\}$ be a directed system of flat $R$-modules. Then $\colim_i M_i$ is a flat $R$-module. \end{lemma} \begin{proof} This follows as $\otimes$ commutes with colimits and because directed colimits are exact, see Lemma \ref{lemma-directed-colimit-exact}. \end{proof} \begin{lemma} \label{lemma-composition-flat} A composition of (faithfully) flat ring maps is (faithfully) flat. If $R \to R'$ is (faithfully) flat, and $M'$ is a (faithfully) flat $R'$-module, then $M'$ is a (faithfully) flat $R$-module. \end{lemma} \begin{proof} The first statement of the lemma is a particular case of the second, so it is clearly enough to prove the latter. Let $R \to R'$ be a flat ring map, and $M'$ a flat $R'$-module. We need to prove that $M'$ is a flat $R$-module. Let $N_1 \to N_2 \to N_3$ be an exact complex of $R$-modules. Then, the complex $R' \otimes_R N_1 \to R' \otimes_R N_2 \to R' \otimes_R N_3$ is exact (since $R'$ is flat as an $R$-module), and so the complex $M' \otimes_{R'} \left(R' \otimes_R N_1\right) \to M' \otimes_{R'} \left(R' \otimes_R N_2\right) \to M' \otimes_{R'} \left(R' \otimes_R N_3\right)$ is exact (since $M'$ is a flat $R'$-module). Since $M' \otimes_{R'} \left(R' \otimes_R N\right) \cong \left(M' \otimes_{R'} R'\right) \otimes_R N \cong M' \otimes_R N$ for any $R$-module $N$ functorially (by Lemmas \ref{lemma-tensor-with-bimodule} and \ref{lemma-flip-tensor-product}), this complex is isomorphic to the complex $M' \otimes_R N_1 \to M' \otimes_R N_2 \to M' \otimes_R N_3$, which is therefore also exact. This shows that $M'$ is a flat $R$-module. Tracing this argument backwards, we can show that if $R \to R'$ is faithfully flat, and if $M'$ is faithfully flat as an $R'$-module, then $M'$ is faithfully flat as an $R$-module. \end{proof} \begin{lemma} \label{lemma-flat} Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item \label{item-flat} $M$ is flat over $R$. \item \label{item-injective} for every injection of $R$-modules $N \subset N'$ the map $N \otimes_R M \to N'\otimes_R M$ is injective. \item \label{item-f-ideal} for every ideal $I \subset R$ the map $I \otimes_R M \to R \otimes_R M = M$ is injective. \item \label{item-ffg-ideal} for every finitely generated ideal $I \subset R$ the map $I \otimes_R M \to R \otimes_R M = M$ is injective. \end{enumerate} \end{lemma} \begin{proof} The implications (\ref{item-flat}) implies (\ref{item-injective}) implies (\ref{item-f-ideal}) implies (\ref{item-ffg-ideal}) are all trivial. Thus we prove (\ref{item-ffg-ideal}) implies (\ref{item-flat}). Suppose that $N_1 \to N_2 \to N_3$ is exact. Let $K = \Ker(N_2 \to N_3)$ and $Q = \Im(N_2 \to N_3)$. Then we get maps $$ N_1 \otimes_R M \to K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to N_3 \otimes_R M $$ Observe that the first and third arrows are surjective. Thus if we show that the second and fourth arrows are injective, then we are done\footnote{Here is the argument in more detail: Assume that we know that the second and fourth arrows are injective. Lemma \ref{lemma-tensor-product-exact} (applied to the exact sequence $K \to N_2 \to Q \to 0$) yields that the sequence $K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to 0$ is exact. Hence, $\Ker \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \Im \left(K \otimes_R M \to N_2 \otimes_R M\right)$. Since $\Im \left(K \otimes_R M \to N_2 \otimes_R M\right) = \Im \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$ (due to the surjectivity of $N_1 \otimes_R M \to K \otimes_R M$) and $\Ker \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \Ker \left(N_2 \otimes_R M \to N_3 \otimes_R M\right)$ (due to the injectivity of $Q \otimes_R M \to N_3 \otimes_R M$), this becomes $\Ker \left(N_2 \otimes_R M \to N_3 \otimes_R M\right) = \Im \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$, which shows that the functor $- \otimes_R M$ is exact, whence $M$ is flat.}. Hence it suffices to show that $- \otimes_R M$ transforms injective $R$-module maps into injective $R$-module maps. \medskip\noindent Assume $K \to N$ is an injective $R$-module map and let $x \in \Ker(K \otimes_R M \to N \otimes_R M)$. We have to show that $x$ is zero. The $R$-module $K$ is the union of its finite $R$-submodules; hence, $K \otimes_R M$ is the colimit of $R$-modules of the form $K_i \otimes_R M$ where $K_i$ runs over all finite $R$-submodules of $K$ (because tensor product commutes with colimits). Thus, for some $i$ our $x$ comes from an element $x_i \in K_i \otimes_R M$. Thus we may assume that $K$ is a finite $R$-module. Assume this. We regard the injection $K \to N$ as an inclusion, so that $K \subset N$. \medskip\noindent The $R$-module $N$ is the union of its finite $R$-submodules that contain $K$. Hence, $N \otimes_R M$ is the colimit of $R$-modules of the form $N_i \otimes_R M$ where $N_i$ runs over all finite $R$-submodules of $N$ that contain $K$ (again since tensor product commutes with colimits). Notice that this is a colimit over a directed system (since the sum of two finite submodules of $N$ is again finite). Hence, (by Lemma \ref{lemma-zero-directed-limit}) the element $x \in K \otimes_R M$ maps to zero in at least one of these $R$-modules $N_i \otimes_R M$ (since $x$ maps to zero in $N \otimes_R M$). Thus we may assume $N$ is a finite $R$-module. \medskip\noindent Assume $N$ is a finite $R$-module. Write $N = R^{\oplus n}/L$ and $K = L'/L$ for some $L \subset L' \subset R^{\oplus n}$. For any $R$-submodule $G \subset R^{\oplus n}$, we have a canonical map $G \otimes_R M \to M^{\oplus n}$ obtained by composing $G \otimes_R M \to R^n \otimes_R M = M^{\oplus n}$. It suffices to prove that $L \otimes_R M \to M^{\oplus n}$ and $L' \otimes_R M \to M^{\oplus n}$ are injective. Namely, if so, then we see that $K \otimes_R M = L' \otimes_R M/L \otimes_R M \to M^{\oplus n}/L \otimes_R M$ is injective too\footnote{This becomes obvious if we identify $L' \otimes_R M$ and $L \otimes_R M$ with submodules of $M^{\oplus n}$ (which is legitimate since the maps $L \otimes_R M \to M^{\oplus n}$ and $L' \otimes_R M \to M^{\oplus n}$ are injective and commute with the obvious map $L' \otimes_R M \to L \otimes_R M$).}. \medskip\noindent Thus it suffices to show that $L \otimes_R M \to M^{\oplus n}$ is injective when $L \subset R^{\oplus n}$ is an $R$-submodule. We do this by induction on $n$. The base case $n = 1$ we handle below. For the induction step assume $n > 1$ and set $L' = L \cap R \oplus 0^{\oplus n - 1}$. Then $L'' = L/L'$ is a submodule of $R^{\oplus n - 1}$. We obtain a diagram $$ \xymatrix{ & L' \otimes_R M \ar[r] \ar[d] & L \otimes_R M \ar[r] \ar[d] & L'' \otimes_R M \ar[r] \ar[d] & 0 \\ 0 \ar[r] & M \ar[r] & M^{\oplus n} \ar[r] & M^{\oplus n - 1} \ar[r] & 0 } $$ By induction hypothesis and the base case the left and right vertical arrows are injective. The rows are exact. It follows that the middle vertical arrow is injective too. \medskip\noindent The base case of the induction above is when $L \subset R$ is an ideal. In other words, we have to show that $I \otimes_R M \to M$ is injective for any ideal $I$ of $R$. We know this is true when $I$ is finitely generated. However, $I = \bigcup I_\alpha$ is the union of the finitely generated ideals $I_\alpha$ contained in it. In other words, $I = \colim I_\alpha$. Since $\otimes$ commutes with colimits we see that $I \otimes_R M = \colim I_\alpha \otimes_R M$ and since all the morphisms $I_\alpha \otimes_R M \to M$ are injective by assumption, the same is true for $I \otimes_R M \to M$. \end{proof} \begin{lemma} \label{lemma-colimit-rings-flat} Let $\{R_i, \varphi_{ii'}\}$ be a system of rings over the directed set $I$. Let $R = \colim_i R_i$. \begin{enumerate} \item If $M$ is an $R$-module such that $M$ is flat as an $R_i$-module for all $i$, then $M$ is flat as an $R$-module. \item For $i \in I$ let $M_i$ be a flat $R_i$-module and for $i' \geq i$ let $f_{ii'} : M_i \to M_{i'}$ be a $\varphi_{ii'}$-linear map such that $f_{i' i''} \circ f_{i i'} = f_{i i''}$. Then $M = \colim_{i \in I} M_i$ is a flat $R$-module. \end{enumerate} \end{lemma} \begin{proof} Part (1) is a special case of part (2) with $M_i = M$ for all $i$ and $f_{i i'} = \text{id}_M$. Proof of (2). Let $\mathfrak a \subset R$ be a finitely generated ideal. By Lemma \ref{lemma-flat} it suffices to show that $\mathfrak a \otimes_R M \to M$ is injective. We can find an $i \in I$ and a finitely generated ideal $\mathfrak a' \subset R_i$ such that $\mathfrak a = \mathfrak a'R$. Then $\mathfrak a = \colim_{i' \geq i} \mathfrak a'R_{i'}$. Since $\otimes$ commutes with colimits the map $\mathfrak a \otimes_R M \to M$ is the colimit of the maps $$ \mathfrak a'R_{i'} \otimes_{R_{i'}} M_{i'} \longrightarrow M_{i'} $$ These maps are all injective by assumption. Since colimits over $I$ are exact by Lemma \ref{lemma-directed-colimit-exact} we win. \end{proof} \begin{lemma} \label{lemma-flat-base-change} Suppose that $M$ is (faithfully) flat over $R$, and that $R \to R'$ is a ring map. Then $M \otimes_R R'$ is (faithfully) flat over $R'$. \end{lemma} \begin{proof} For any $R'$-module $N$ we have a canonical isomorphism $N \otimes_{R'} (R'\otimes_R M) = N \otimes_R M$. Hence the desired exactness properties of the functor $-\otimes_{R'}(R'\otimes_R M)$ follow from the corresponding exactness properties of the functor $-\otimes_R M$. \end{proof} \begin{lemma} \label{lemma-flatness-descends} Let $R \to R'$ be a faithfully flat ring map. Let $M$ be a module over $R$, and set $M' = R' \otimes_R M$. Then $M$ is flat over $R$ if and only if $M'$ is flat over $R'$. \end{lemma} \begin{proof} By Lemma \ref{lemma-flat-base-change} we see that if $M$ is flat then $M'$ is flat. For the converse, suppose that $M'$ is flat. Let $N_1 \to N_2 \to N_3$ be an exact sequence of $R$-modules. We want to show that $N_1 \otimes_R M \to N_2 \otimes_R M \to N_3 \otimes_R M$ is exact. We know that $N_1 \otimes_R R' \to N_2 \otimes_R R' \to N_3 \otimes_R R'$ is exact, because $R \to R'$ is flat. Flatness of $M'$ implies that $N_1 \otimes_R R' \otimes_{R'} M' \to N_2 \otimes_R R' \otimes_{R'} M' \to N_3 \otimes_R R' \otimes_{R'} M'$ is exact. We may write this as $N_1 \otimes_R M \otimes_R R' \to N_2 \otimes_R M \otimes_R R' \to N_3 \otimes_R M \otimes_R R'$. Finally, faithful flatness implies that $N_1 \otimes_R M \to N_2 \otimes_R M \to N_3 \otimes_R M$ is exact. \end{proof} \begin{lemma} \label{lemma-flatness-descends-more-general} Let $R$ be a ring. Let $S \to S'$ be a flat map of $R$-algebras. Let $M$ be a module over $S$, and set $M' = S' \otimes_S M$. \begin{enumerate} \item If $M$ is flat over $R$, then $M'$ is flat over $R$. \item If $S \to S'$ is faithfully flat, then $M$ is flat over $R$ if and only if $M'$ is flat over $R$. \end{enumerate} \end{lemma} \begin{proof} Let $N \to N'$ be an injection of $R$-modules. By the flatness of $S \to S'$ we have $$ \Ker(N \otimes_R M \to N' \otimes_R M) \otimes_S S' = \Ker(N \otimes_R M' \to N' \otimes_R M') $$ If $M$ is flat over $R$, then the left hand side is zero and we find that $M'$ is flat over $R$ by the second characterization of flatness in Lemma \ref{lemma-flat}. If $M'$ is flat over $R$ then we have the vanishing of the right hand side and if in addition $S \to S'$ is faithfully flat, this implies that $\Ker(N \otimes_R M \to N' \otimes_R M)$ is zero which in turn shows that $M$ is flat over $R$. \end{proof} \begin{lemma} \label{lemma-flat-permanence} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. If $M$ is flat as an $R$-module and faithfully flat as an $S$-module, then $R \to S$ is flat. \end{lemma} \begin{proof} Let $N_1 \to N_2 \to N_3$ be an exact sequence of $R$-modules. By assumption $N_1 \otimes_R M \to N_2 \otimes_R M \to N_3 \otimes_R M$ is exact. We may write this as $$ N_1 \otimes_R S \otimes_S M \to N_2 \otimes_R S \otimes_S M \to N_3 \otimes_R S \otimes_S M. $$ By faithful flatness of $M$ over $S$ we conclude that $N_1 \otimes_R S \to N_2 \otimes_R S \to N_3 \otimes_R S$ is exact. Hence $R \to S$ is flat. \end{proof} \noindent Let $R$ be a ring. Let $M$ be an $R$-module. Let $\sum f_i x_i = 0$ be a relation in $M$. We say the relation $\sum f_i x_i$ is {\it trivial} if there exist an integer $m \geq 0$, elements $y_j \in M$, $j = 1, \ldots, m$, and elements $a_{ij} \in R$, $i = 1, \ldots, n$, $j = 1, \ldots, m$ such that $$ x_i = \sum\nolimits_j a_{ij} y_j, \forall i, \quad\text{and}\quad 0 = \sum\nolimits_i f_ia_{ij}, \forall j. $$ \begin{lemma}[Equational criterion of flatness] \label{lemma-flat-eq} A module $M$ over $R$ is flat if and only if every relation in $M$ is trivial. \end{lemma} \begin{proof} Assume $M$ is flat and let $\sum f_i x_i = 0$ be a relation in $M$. Let $I = (f_1, \ldots, f_n)$, and let $K = \Ker(R^n \to I, (a_1, \ldots, a_n) \mapsto \sum_i a_i f_i)$. So we have the short exact sequence $0 \to K \to R^n \to I \to 0$. Then $\sum f_i \otimes x_i$ is an element of $I \otimes_R M$ which maps to zero in $R \otimes_R M = M$. By flatness $\sum f_i \otimes x_i$ is zero in $I \otimes_R M$. Thus there exists an element of $K \otimes_R M$ mapping to $\sum e_i \otimes x_i \in R^n \otimes_R M$ where $e_i$ is the $i$th basis element of $R^n$. Write this element as $\sum k_j \otimes y_j$ and then write the image of $k_j$ in $R^n$ as $\sum a_{ij} e_i$ to get the result. \medskip\noindent Assume every relation is trivial, let $I$ be a finitely generated ideal, and let $x = \sum f_i \otimes x_i$ be an element of $I \otimes_R M$ mapping to zero in $R \otimes_R M = M$. This just means exactly that $\sum f_i x_i$ is a relation in $M$. And the fact that it is trivial implies easily that $x$ is zero, because $$ x = \sum f_i \otimes x_i = \sum f_i \otimes \left(\sum a_{ij}y_j\right) = \sum \left(\sum f_i a_{ij}\right) \otimes y_j = 0 $$ \end{proof} \begin{lemma} \label{lemma-flat-tor-zero} Suppose that $R$ is a ring, that $0\to M''\to M'\to M\to0$ is a short exact sequence, and that $N$ is an $R$-module. If $M$ is flat then $N \otimes_R M'' \to N \otimes_R M'$ is injective, i.e., the sequence $$ 0 \to N \otimes_R M'' \to N \otimes_R M' \to N \otimes_R M \to 0 $$ is a short exact sequence. \end{lemma} \begin{proof} Let $R^{(I)} \to N$ be a surjection from a free module onto $N$ with kernel $K$. The result follows from the snake lemma applied to the following diagram $$ \begin{matrix} & & 0 & & 0 & & 0 & & \\ & & \uparrow & & \uparrow & & \uparrow & & \\ & & M''\otimes_R N & \to & M' \otimes_R N & \to & M \otimes_R N & \to & 0 \\ & & \uparrow & & \uparrow & & \uparrow & & \\ 0 & \to & (M'')^{(I)} & \to & (M')^{(I)} & \to & M^{(I)} & \to & 0 \\ & & \uparrow & & \uparrow & & \uparrow & & \\ & & M''\otimes_R K & \to & M' \otimes_R K & \to & M \otimes_R K & \to & 0 \\ & & & & & & \uparrow & & \\ & & & & & & 0 & & \end{matrix} $$ with exact rows and columns. The middle row is exact because tensoring with the free module $R^{(I)}$ is exact. \end{proof} \begin{lemma} \label{lemma-flat-ses} Suppose that $0 \to M' \to M \to M'' \to 0$ is a short exact sequence of $R$-modules. If $M'$ and $M''$ are flat so is $M$. If $M$ and $M''$ are flat so is $M'$. \end{lemma} \begin{proof} We will use the criterion that a module $N$ is flat if for every ideal $I \subset R$ the map $N \otimes_R I \to N$ is injective, see Lemma \ref{lemma-flat}. Consider an ideal $I \subset R$. Consider the diagram $$ \begin{matrix} 0 & \to & M' & \to & M & \to & M'' & \to & 0 \\ & & \uparrow & & \uparrow & & \uparrow & & \\ & & M'\otimes_R I & \to & M \otimes_R I & \to & M''\otimes_R I & \to & 0 \end{matrix} $$ with exact rows. This immediately proves the first assertion. The second follows because if $M''$ is flat then the lower left horizontal arrow is injective by Lemma \ref{lemma-flat-tor-zero}. \end{proof} \begin{lemma} \label{lemma-easy-ff} Let $R$ be a ring. Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is faithfully flat, and \item $M$ is flat and for all $R$-module homomorphisms $\alpha : N \to N'$ we have $\alpha = 0$ if and only if $\alpha \otimes \text{id}_M = 0$. \end{enumerate} \end{lemma} \begin{proof} If $M$ is faithfully flat, then $0 \to \Ker(\alpha) \to N \to N'$ is exact if and only if the same holds after tensoring with $M$. This proves (1) implies (2). For the other, assume (2). Let $N_1 \to N_2 \to N_3$ be a complex, and assume the complex $N_1 \otimes_R M \to N_2 \otimes_R M \to N_3\otimes_R M$ is exact. Take $x \in \Ker(N_2 \to N_3)$, and consider the map $\alpha : R \to N_2/\Im(N_1)$, $r \mapsto rx + \Im(N_1)$. By the exactness of the complex $-\otimes_R M$ we see that $\alpha \otimes \text{id}_M$ is zero. By assumption we get that $\alpha$ is zero. Hence $x $ is in the image of $N_1 \to N_2$. \end{proof} \begin{lemma} \label{lemma-ff} \begin{slogan} A flat module is faithfully flat if and only if it has nonzero fibers. \end{slogan} Let $M$ be a flat $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is faithfully flat, \item for every nonzero $R$-module $N$, the tensor product $M \otimes_R N$ is nonzero, \item for all $\mathfrak p \in \Spec(R)$ the tensor product $M \otimes_R \kappa(\mathfrak p)$ is nonzero, and \item for all maximal ideals $\mathfrak m$ of $R$ the tensor product $M \otimes_R \kappa(\mathfrak m) = M/{\mathfrak m}M$ is nonzero. \end{enumerate} \end{lemma} \begin{proof} Assume $M$ faithfully flat and $N \not = 0$. By Lemma \ref{lemma-easy-ff} the nonzero map $1 : N \to N$ induces a nonzero map $M \otimes_R N \to M \otimes_R N$, so $M \otimes_R N \not = 0$. Thus (1) implies (2). The implications (2) $\Rightarrow$ (3) $\Rightarrow$ (4) are immediate. \medskip\noindent Assume (4). Suppose that $N_1 \to N_2 \to N_3$ is a complex and suppose that $N_1 \otimes_R M \to N_2\otimes_R M \to N_3\otimes_R M$ is exact. Let $H$ be the cohomology of the complex, so $H = \Ker(N_2 \to N_3)/\Im(N_1 \to N_2)$. To finish the proof we will show $H = 0$. By flatness we see that $H \otimes_R M = 0$. Take $x \in H$ and let $I = \{f \in R \mid fx = 0 \}$ be its annihilator. Since $R/I \subset H$ we get $M/IM \subset H \otimes_R M = 0$ by flatness of $M$. If $I \not = R$ we may choose a maximal ideal $I \subset \mathfrak m \subset R$. This immediately gives a contradiction. \end{proof} \begin{lemma} \label{lemma-ff-rings} Let $R \to S$ be a flat ring map. The following are equivalent: \begin{enumerate} \item $R \to S$ is faithfully flat, \item the induced map on $\Spec$ is surjective, and \item any closed point $x \in \Spec(R)$ is in the image of the map $\Spec(S) \to \Spec(R)$. \end{enumerate} \end{lemma} \begin{proof} This follows quickly from Lemma \ref{lemma-ff}, because we saw in Remark \ref{remark-fundamental-diagram} that $\mathfrak p$ is in the image if and only if the ring $S \otimes_R \kappa(\mathfrak p)$ is nonzero. \end{proof} \begin{lemma} \label{lemma-local-flat-ff} A flat local ring homomorphism of local rings is faithfully flat. \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-ff-rings}. \end{proof} \noindent Flatness meshes well with localization. \begin{lemma} \label{lemma-flat-localization} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. \begin{enumerate} \item The localization $S^{-1}R$ is a flat $R$-algebra. \item If $M$ is an $S^{-1}R$-module, then $M$ is a flat $R$-module if and only if $M$ is a flat $S^{-1}R$-module. \item Suppose $M$ is an $R$-module. Then $M$ is a flat $R$-module if and only if $M_{\mathfrak p}$ is a flat $R_{\mathfrak p}$-module for all primes $\mathfrak p$ of $R$. \item Suppose $M$ is an $R$-module. Then $M$ is a flat $R$-module if and only if $M_{\mathfrak m}$ is a flat $R_{\mathfrak m}$-module for all maximal ideals $\mathfrak m$ of $R$. \item Suppose $R \to A$ is a ring map, $M$ is an $A$-module, and $g_1, \ldots, g_m \in A$ are elements generating the unit ideal of $A$. Then $M$ is flat over $R$ if and only if each localization $M_{g_i}$ is flat over $R$. \item Suppose $R \to A$ is a ring map, and $M$ is an $A$-module. Then $M$ is a flat $R$-module if and only if the localization $M_{\mathfrak q}$ is a flat $R_{\mathfrak p}$-module (with $\mathfrak p$ the prime of $R$ lying under $\mathfrak q$) for all primes $\mathfrak q$ of $A$. \item Suppose $R \to A$ is a ring map, and $M$ is an $A$-module. Then $M$ is a flat $R$-module if and only if the localization $M_{\mathfrak m}$ is a flat $R_{\mathfrak p}$-module (with $\mathfrak p = R \cap \mathfrak m$) for all maximal ideals $\mathfrak m$ of $A$. \end{enumerate} \end{lemma} \begin{proof} Let us prove the last statement of the lemma. In the proof we will use repeatedly that localization is exact and commutes with tensor product, see Sections \ref{section-localization} and \ref{section-tensor-product}. \medskip\noindent Suppose $R \to A$ is a ring map, and $M$ is an $A$-module. Assume that $M_{\mathfrak m}$ is a flat $R_{\mathfrak p}$-module for all maximal ideals $\mathfrak m$ of $A$ (with $\mathfrak p = R \cap \mathfrak m$). Let $I \subset R$ be an ideal. We have to show the map $I \otimes_R M \to M$ is injective. We can think of this as a map of $A$-modules. By assumption the localization $(I \otimes_R M)_{\mathfrak m} \to M_{\mathfrak m}$ is injective because $(I \otimes_R M)_{\mathfrak m} = I_{\mathfrak p} \otimes_{R_{\mathfrak p}} M_{\mathfrak m}$. Hence the kernel of $I \otimes_R M \to M$ is zero by Lemma \ref{lemma-characterize-zero-local}. Hence $M$ is flat over $R$. \medskip\noindent Conversely, assume $M$ is flat over $R$. Pick a prime $\mathfrak q$ of $A$ lying over the prime $\mathfrak p$ of $R$. Suppose that $I \subset R_{\mathfrak p}$ is an ideal. We have to show that $I \otimes_{R_{\mathfrak p}} M_{\mathfrak q} \to M_{\mathfrak q}$ is injective. We can write $I = J_{\mathfrak p}$ for some ideal $J \subset R$. Then the map $I \otimes_{R_{\mathfrak p}} M_{\mathfrak q} \to M_{\mathfrak q}$ is just the localization (at $\mathfrak q$) of the map $J \otimes_R M \to M$ which is injective. Since localization is exact we see that $M_{\mathfrak q}$ is a flat $R_{\mathfrak p}$-module. \medskip\noindent This proves (7) and (6). The other statements follow in a straightforward way from the last statement (proofs omitted). \end{proof} \begin{lemma} \label{lemma-flat-going-down} Let $R \to S$ be flat. Let $\mathfrak p \subset \mathfrak p'$ be primes of $R$. Let $\mathfrak q' \subset S$ be a prime of $S$ mapping to $\mathfrak p'$. Then there exists a prime $\mathfrak q \subset \mathfrak q'$ mapping to $\mathfrak p$. \end{lemma} \begin{proof} By Lemma \ref{lemma-flat-localization} the local ring map $R_{\mathfrak p'} \to S_{\mathfrak q'}$ is flat. By Lemma \ref{lemma-local-flat-ff} this local ring map is faithfully flat. By Lemma \ref{lemma-ff-rings} there is a prime mapping to $\mathfrak p R_{\mathfrak p'}$. The inverse image of this prime in $S$ does the job. \end{proof} \noindent The property of $R \to S$ described in the lemma is called the ``going down property''. See Definition \ref{definition-going-up-down}. \begin{lemma} \label{lemma-colimit-faithfully-flat} Let $R$ be a ring. Let $\{S_i, \varphi_{ii'}\}$ be a directed system of faithfully flat $R$-algebras. Then $S = \colim_i S_i$ is a faithfully flat $R$-algebra. \end{lemma} \begin{proof} By Lemma \ref{lemma-colimit-flat} we see that $S$ is flat. Let $\mathfrak m \subset R$ be a maximal ideal. By Lemma \ref{lemma-ff-rings} none of the rings $S_i/\mathfrak m S_i$ is zero. Hence $S/\mathfrak mS = \colim S_i/\mathfrak mS_i$ is nonzero as well because $1$ is not equal to zero. Thus the image of $\Spec(S) \to \Spec(R)$ contains $\mathfrak m$ and we see that $R \to S$ is faithfully flat by Lemma \ref{lemma-ff-rings}. \end{proof} \section{Supports and annihilators} \label{section-supp-and-ann} % BEGIN ALGEBRA EDITORIAL ROUTE section-supp-and-ann \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-supp-and-ann}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-supp-and-ann \noindent Some very basic definitions and lemmas. \begin{definition} \label{definition-support-module} Let $R$ be a ring and let $M$ be an $R$-module. The {\it support of $M$} is the set $$ \text{Supp}(M) = \{ \mathfrak p \in \Spec(R) \mid M_{\mathfrak p} \not = 0 \} $$ \end{definition} \begin{lemma} \label{lemma-support-zero} \begin{slogan} A module over a ring has empty support if and only if it is the trivial module. \end{slogan} Let $R$ be a ring. Let $M$ be an $R$-module. Then $$ M = (0) \Leftrightarrow \text{Supp}(M) = \emptyset. $$ \end{lemma} \begin{proof} Actually, Lemma \ref{lemma-characterize-zero-local} even shows that $\text{Supp}(M)$ always contains a maximal ideal if $M$ is not zero. \end{proof} \begin{definition} \label{definition-annihilator} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item Given an element $m \in M$ the {\it annihilator of $m$} is the ideal $$ \text{Ann}_R(m) = \text{Ann}(m) = \{f \in R \mid fm = 0\}. $$ \item The {\it annihilator of $M$} is the ideal $$ \text{Ann}_R(M) = \text{Ann}(M) = \{f \in R \mid fm = 0\ \forall m \in M\}. $$ \end{enumerate} \end{definition} \begin{lemma} \label{lemma-annihilator-flat-base-change} Let $R \to S$ be a flat ring map. Let $M$ be an $R$-module and $m \in M$. Then $\text{Ann}_R(m) S = \text{Ann}_S(m \otimes 1)$. If $M$ is a finite $R$-module, then $\text{Ann}_R(M) S = \text{Ann}_S(M \otimes_R S)$. \end{lemma} \begin{proof} Set $I = \text{Ann}_R(m)$. By definition there is an exact sequence $0 \to I \to R \to M$ where the map $R \to M$ sends $f$ to $fm$. Using flatness we obtain an exact sequence $0 \to I \otimes_R S \to S \to M \otimes_R S$ which proves the first assertion. If $m_1, \ldots, m_n$ is a set of generators of $M$ then $\text{Ann}_R(M) = \bigcap \text{Ann}_R(m_i)$. Similarly $\text{Ann}_S(M \otimes_R S) = \bigcap \text{Ann}_S(m_i \otimes 1)$. Set $I_i = \text{Ann}_R(m_i)$. Then it suffices to show that $\bigcap_{i = 1, \ldots, n} (I_i S) = (\bigcap_{i = 1, \ldots, n} I_i)S$. This is Lemma \ref{lemma-flat-intersect-ideals}. \end{proof} \begin{lemma} \label{lemma-support-closed} Let $R$ be a ring and let $M$ be an $R$-module. If $M$ is finite, then $\text{Supp}(M)$ is closed. More precisely, if $I = \text{Ann}(M)$ is the annihilator of $M$, then $V(I) = \text{Supp}(M)$. \end{lemma} \begin{proof} We will show that $V(I) = \text{Supp}(M)$. \medskip\noindent Suppose $\mathfrak p \in \text{Supp}(M)$. Then $M_{\mathfrak p} \not = 0$. Choose an element $m \in M$ whose image in $M_\mathfrak p$ is nonzero. Then the annihilator of $m$ is contained in $\mathfrak p$ by construction of the localization $M_\mathfrak p$. Hence a fortiori $I = \text{Ann}(M)$ must be contained in $\mathfrak p$. \medskip\noindent Conversely, suppose that $\mathfrak p \not \in \text{Supp}(M)$. Then $M_{\mathfrak p} = 0$. Let $x_1, \ldots, x_r \in M$ be generators. By Lemma \ref{lemma-localization-colimit} there exists an $f \in R$, $f\not\in \mathfrak p$ such that $x_i/1 = 0$ in $M_f$. Hence $f^{n_i} x_i = 0$ for some $n_i \geq 1$. Hence $f^nM = 0$ for $n = \max\{n_i\}$ as desired. \end{proof} \begin{lemma} \label{lemma-support-base-change} Let $R \to R'$ be a ring map and let $M$ be a finite $R$-module. Then $\text{Supp}(M \otimes_R R')$ is the inverse image of $\text{Supp}(M)$. \end{lemma} \begin{proof} Let $\mathfrak p \in \text{Supp}(M)$. By Nakayama's lemma (Lemma \ref{lemma-NAK}) we see that $$ M \otimes_R \kappa(\mathfrak p) = M_\mathfrak p/\mathfrak p M_\mathfrak p $$ is a nonzero $\kappa(\mathfrak p)$ vector space. Hence for every prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$ we see that $$ (M \otimes_R R')_{\mathfrak p'}/\mathfrak p' (M \otimes_R R')_{\mathfrak p'} = (M \otimes_R R') \otimes_{R'} \kappa(\mathfrak p') = M \otimes_R \kappa(\mathfrak p) \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p') $$ is nonzero. This implies $\mathfrak p' \in \text{Supp}(M \otimes_R R')$. For the converse, if $\mathfrak p' \subset R'$ is a prime lying over an arbitrary prime $\mathfrak p \subset R$, then $$ (M \otimes_R R')_{\mathfrak p'} = M_\mathfrak p \otimes_{R_\mathfrak p} R'_{\mathfrak p'}. $$ Hence if $\mathfrak p' \in \text{Supp}(M \otimes_R R')$ lies over the prime $\mathfrak p \subset R$, then $\mathfrak p \in \text{Supp}(M)$. \end{proof} \begin{lemma} \label{lemma-support-element} Let $R$ be a ring, let $M$ be an $R$-module, and let $m \in M$. Then $\mathfrak p \in V(\text{Ann}(m))$ if and only if $m$ does not map to zero in $M_\mathfrak p$. \end{lemma} \begin{proof} We may replace $M$ by $Rm \subset M$. Then (1) $\text{Ann}(m) = \text{Ann}(M)$ and (2) $m$ does not map to zero in $M_\mathfrak p$ if and only if $\mathfrak p \in \text{Supp}(M)$. The result now follows from Lemma \ref{lemma-support-closed}. \end{proof} \begin{lemma} \label{lemma-support-finite-presentation-constructible} Let $R$ be a ring and let $M$ be an $R$-module. If $M$ is a finitely presented $R$-module, then $\text{Supp}(M)$ is a closed subset of $\Spec(R)$ whose complement is quasi-compact. \end{lemma} \begin{proof} Choose a presentation $$ R^{\oplus m} \longrightarrow R^{\oplus n} \longrightarrow M \to 0 $$ Let $A \in \text{Mat}(n \times m, R)$ be the matrix of the first map. By Nakayama's Lemma \ref{lemma-NAK} we see that $$ M_{\mathfrak p} \not = 0 \Leftrightarrow M \otimes \kappa(\mathfrak p) \not = 0 \Leftrightarrow \text{rank}(A \bmod \mathfrak p) < n. $$ Hence, if $I$ is the ideal of $R$ generated by the $n \times n$ minors of $A$, then $\text{Supp}(M) = V(I)$. Since $I$ is finitely generated, say $I = (f_1, \ldots, f_t)$, we see that $\Spec(R) \setminus V(I)$ is a finite union of the standard opens $D(f_i)$, hence quasi-compact. \end{proof} \begin{lemma} \label{lemma-support-quotient} Let $R$ be a ring and let $M$ be an $R$-module. \begin{enumerate} \item If $M$ is finite then the support of $M/IM$ is $\text{Supp}(M) \cap V(I)$. \item If $N \subset M$, then $\text{Supp}(N) \subset \text{Supp}(M)$. \item If $Q$ is a quotient module of $M$ then $\text{Supp}(Q) \subset \text{Supp}(M)$. \item If $0 \to N \to M \to Q \to 0$ is a short exact sequence then $\text{Supp}(M) = \text{Supp}(Q) \cup \text{Supp}(N)$. \end{enumerate} \end{lemma} \begin{proof} The functors $M \mapsto M_{\mathfrak p}$ are exact. This immediately implies all but the first assertion. For the first assertion we need to show that $M_\mathfrak p \not = 0$ and $I \subset \mathfrak p$ implies $(M/IM)_{\mathfrak p} = M_\mathfrak p/IM_\mathfrak p \not = 0$. This follows from Nakayama's Lemma \ref{lemma-NAK}. \end{proof} \section{Going up and going down} \label{section-going-up} % BEGIN ALGEBRA EDITORIAL ROUTE section-going-up \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-going-up}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-going-up \noindent Suppose $\mathfrak p$, $\mathfrak p'$ are primes of the ring $R$. Let $X = \Spec(R)$ with the Zariski topology. Let $x\in X$ be the point corresponding to $\mathfrak p$ and $x'\in X$ the point corresponding to $\mathfrak p'$. Then we have: $$ x' \leadsto x \Leftrightarrow \mathfrak p' \subset \mathfrak p. $$ In words: $x$ is a specialization of $x'$ if and only if $\mathfrak p' \subset \mathfrak p$. See Topology, Section \ref{topology-section-specialization} for terminology and notation. \begin{definition} \label{definition-going-up-down} Let $\varphi : R \to S$ be a ring map. \begin{enumerate} \item We say $\varphi : R \to S$ satisfies {\it going up} if given primes $\mathfrak p \subset \mathfrak p'$ in $R$ and a prime $\mathfrak q$ in $S$ lying over $\mathfrak p$ there exists a prime $\mathfrak q'$ of $S$ such that (a) $\mathfrak q \subset \mathfrak q'$, and (b) $\mathfrak q'$ lies over $\mathfrak p'$. \item We say $\varphi : R \to S$ satisfies {\it going down} if given primes $\mathfrak p \subset \mathfrak p'$ in $R$ and a prime $\mathfrak q'$ in $S$ lying over $\mathfrak p'$ there exists a prime $\mathfrak q$ of $S$ such that (a) $\mathfrak q \subset \mathfrak q'$, and (b) $\mathfrak q$ lies over $\mathfrak p$. \end{enumerate} \end{definition} \noindent So far we have seen the following cases of this: \begin{enumerate} \item An integral ring map satisfies going up, see Lemma \ref{lemma-integral-going-up}. \item As a special case finite ring maps satisfy going up. \item As a special case quotient maps $R \to R/I$ satisfy going up. \item A flat ring map satisfies going down, see Lemma \ref{lemma-flat-going-down}. \item As a special case any localization satisfies going down. \item An extension $R \subset S$ of domains, with $R$ normal and $S$ integral over $R$ satisfies going down, see Proposition \ref{proposition-going-down-normal-integral}. \end{enumerate} Here is another case where going down holds. \begin{lemma} \label{lemma-open-going-down} Let $R \to S$ be a ring map. If the induced map $\varphi : \Spec(S) \to \Spec(R)$ is open, then $R \to S$ satisfies going down. \end{lemma} \begin{proof} Suppose that $\mathfrak p \subset \mathfrak p' \subset R$ and $\mathfrak q' \subset S$ lies over $\mathfrak p'$. As $\varphi$ is open, for every $g \in S$, $g \not \in \mathfrak q'$ we see that $\mathfrak p$ is in the image of $D(g) \subset \Spec(S)$. In other words $S_g \otimes_R \kappa(\mathfrak p)$ is not zero. Since $S_{\mathfrak q'}$ is the directed colimit of these $S_g$ this implies that $S_{\mathfrak q'} \otimes_R \kappa(\mathfrak p)$ is not zero, see Lemmas \ref{lemma-localization-colimit} and \ref{lemma-tensor-products-commute-with-limits}. Hence $\mathfrak p$ is in the image of $\Spec(S_{\mathfrak q'}) \to \Spec(R)$ as desired. \end{proof} \begin{lemma} \label{lemma-going-up-down-specialization} Let $R \to S$ be a ring map. \begin{enumerate} \item $R \to S$ satisfies going down if and only if generalizations lift along the map $\Spec(S) \to \Spec(R)$, see Topology, Definition \ref{topology-definition-lift-specializations}. \item $R \to S$ satisfies going up if and only if specializations lift along the map $\Spec(S) \to \Spec(R)$, see Topology, Definition \ref{topology-definition-lift-specializations}. \end{enumerate} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-going-up-down-composition} Suppose $R \to S$ and $S \to T$ are ring maps satisfying going down. Then so does $R \to T$. Similarly for going up. \end{lemma} \begin{proof} According to Lemma \ref{lemma-going-up-down-specialization} this follows from Topology, Lemma \ref{topology-lemma-lift-specialization-composition} \end{proof} \begin{lemma} \label{lemma-image-stable-specialization-closed} Let $R \to S$ be a ring map. Let $T \subset \Spec(R)$ be the image of $\Spec(S)$. If $T$ is stable under specialization, then $T$ is closed. \end{lemma} \begin{proof} We give two proofs. \medskip\noindent First proof. Let $\mathfrak p \subset R$ be a prime ideal such that the corresponding point of $\Spec(R)$ is in the closure of $T$. This means that for every $f \in R$, $f \not \in \mathfrak p$ we have $D(f) \cap T \not = \emptyset$. Note that $D(f) \cap T$ is the image of $\Spec(S_f)$ in $\Spec(R)$. Hence we conclude that $S_f \not = 0$. In other words, $1 \not = 0$ in the ring $S_f$. Since $S_{\mathfrak p}$ is the directed colimit of the rings $S_f$ we conclude that $1 \not = 0$ in $S_{\mathfrak p}$. In other words, $S_{\mathfrak p} \not = 0$ and considering the image of $\Spec(S_{\mathfrak p}) \to \Spec(S) \to \Spec(R)$ we see there exists a $\mathfrak p' \in T$ with $\mathfrak p' \subset \mathfrak p$. As we assumed $T$ closed under specialization we conclude $\mathfrak p$ is a point of $T$ as desired. \medskip\noindent Second proof. Let $I = \Ker(R \to S)$. We may replace $R$ by $R/I$. In this case the ring map $R \to S$ is injective. By Lemma \ref{lemma-injective-minimal-primes-in-image} all the minimal primes of $R$ are contained in the image $T$. Hence if $T$ is stable under specialization then it contains all primes. \end{proof} \begin{lemma} \label{lemma-going-up-closed} Let $R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item Going up holds for $R \to S$, and \item the map $\Spec(S) \to \Spec(R)$ is closed. \end{enumerate} \end{lemma} \begin{proof} It is a general fact that specializations lift along a closed map of topological spaces, see Topology, Lemma \ref{topology-lemma-closed-open-map-specialization}. Hence the second condition implies the first. \medskip\noindent Assume that going up holds for $R \to S$. Let $V(I) \subset \Spec(S)$ be a closed set. We want to show that the image of $V(I)$ in $\Spec(R)$ is closed. The ring map $S \to S/I$ obviously satisfies going up. Hence $R \to S \to S/I$ satisfies going up, by Lemma \ref{lemma-going-up-down-composition}. Replacing $S$ by $S/I$ it suffices to show the image $T$ of $\Spec(S)$ in $\Spec(R)$ is closed. By Topology, Lemmas \ref{topology-lemma-open-closed-specialization} and \ref{topology-lemma-lift-specializations-images} this image is stable under specialization. Thus the result follows from Lemma \ref{lemma-image-stable-specialization-closed}. \end{proof} \begin{lemma} \label{lemma-constructible-stable-specialization-closed} Let $R$ be a ring. Let $E \subset \Spec(R)$ be a constructible subset. \begin{enumerate} \item If $E$ is stable under specialization, then $E$ is closed. \item If $E$ is stable under generalization, then $E$ is open. \end{enumerate} \end{lemma} \begin{proof} First proof. The first assertion follows from Lemma \ref{lemma-image-stable-specialization-closed} combined with Lemma \ref{lemma-constructible-is-image}. The second follows because the complement of a constructible set is constructible (see Topology, Lemma \ref{topology-lemma-constructible}), the first part of the lemma and Topology, Lemma \ref{topology-lemma-open-closed-specialization}. \medskip\noindent Second proof. Since $\Spec(R)$ is a spectral space by Lemma \ref{lemma-spec-spectral} this is a special case of Topology, Lemma \ref{topology-lemma-constructible-stable-specialization-closed}. \end{proof} \begin{proposition} \label{proposition-fppf-open} Let $R \to S$ be flat and of finite presentation. Then $\Spec(S) \to \Spec(R)$ is open. More generally this holds for any ring map $R \to S$ of finite presentation which satisfies going down. \end{proposition} \begin{proof} If $R \to S$ is flat, then $R \to S$ satisfies going down by Lemma \ref{lemma-flat-going-down}. Thus to prove the lemma we may assume that $R \to S$ has finite presentation and satisfies going down. \medskip\noindent Since the standard opens $D(g) \subset \Spec(S)$, $g \in S$ form a basis for the topology, it suffices to prove that the image of $D(g)$ is open. Recall that $\Spec(S_g) \to \Spec(S)$ is a homeomorphism of $\Spec(S_g)$ onto $D(g)$ (Lemma \ref{lemma-standard-open}). Since $S \to S_g$ satisfies going down (see above), we see that $R \to S_g$ satisfies going down by Lemma \ref{lemma-going-up-down-composition}. Thus after replacing $S$ by $S_g$ we see it suffices to prove the image is open. By Chevalley's theorem (Theorem \ref{theorem-chevalley}) the image is a constructible set $E$. And $E$ is stable under generalization because $R \to S$ satisfies going down, see Topology, Lemmas \ref{topology-lemma-open-closed-specialization} and \ref{topology-lemma-lift-specializations-images}. Hence $E$ is open by Lemma \ref{lemma-constructible-stable-specialization-closed}. \end{proof} \begin{lemma} \label{lemma-same-image} Let $k$ be a field, and let $R$, $S$ be $k$-algebras. Let $S' \subset S$ be a sub $k$-algebra, and let $f \in S' \otimes_k R$. In the commutative diagram $$ \xymatrix{ \Spec((S \otimes_k R)_f) \ar[rd] \ar[rr] & & \Spec((S' \otimes_k R)_f) \ar[ld] \\ & \Spec(R) & } $$ the images of the diagonal arrows are the same. \end{lemma} \begin{proof} Let $\mathfrak p \subset R$ be in the image of the south-west arrow. This means (Lemma \ref{lemma-in-image}) that $$ (S' \otimes_k R)_f \otimes_R \kappa(\mathfrak p) = (S' \otimes_k \kappa(\mathfrak p))_f $$ is not the zero ring, i.e., $S' \otimes_k \kappa(\mathfrak p)$ is not the zero ring and the image of $f$ in it is not nilpotent. The ring map $S' \otimes_k \kappa(\mathfrak p) \to S \otimes_k \kappa(\mathfrak p)$ is injective. Hence also $S \otimes_k \kappa(\mathfrak p)$ is not the zero ring and the image of $f$ in it is not nilpotent. Hence $(S \otimes_k R)_f \otimes_R \kappa(\mathfrak p)$ is not the zero ring. Thus (Lemma \ref{lemma-in-image}) we see that $\mathfrak p$ is in the image of the south-east arrow as desired. \end{proof} \begin{lemma} \label{lemma-map-into-tensor-algebra-open} Let $k$ be a field. Let $R$ and $S$ be $k$-algebras. The map $\Spec(S \otimes_k R) \to \Spec(R)$ is open. \end{lemma} \begin{proof} Let $f \in S \otimes_k R$. It suffices to prove that the image of the standard open $D(f)$ is open. Let $S' \subset S$ be a finite type $k$-subalgebra such that $f \in S' \otimes_k R$. The map $R \to S' \otimes_k R$ is flat and of finite presentation, hence the image $U$ of $\Spec((S' \otimes_k R)_f) \to \Spec(R)$ is open by Proposition \ref{proposition-fppf-open}. By Lemma \ref{lemma-same-image} this is also the image of $D(f)$ and we win. \end{proof} \noindent Here is a tricky lemma that is sometimes useful. \begin{lemma} \label{lemma-unique-prime-over-localize-below} Let $R \to S$ be a ring map. Let $\mathfrak p \subset R$ be a prime. Assume that \begin{enumerate} \item there exists a unique prime $\mathfrak q \subset S$ lying over $\mathfrak p$, and \item either \begin{enumerate} \item going up holds for $R \to S$, or \item going down holds for $R \to S$ and there is at most one prime of $S$ above every prime of $R$. \end{enumerate} \end{enumerate} Then $S_{\mathfrak p} = S_{\mathfrak q}$. \end{lemma} \begin{proof} Consider any prime $\mathfrak q' \subset S$ which corresponds to a point of $\Spec(S_{\mathfrak p})$. This means that $\mathfrak p' = R \cap \mathfrak q'$ is contained in $\mathfrak p$. Here is a picture $$ \xymatrix{ \mathfrak q' \ar@{-}[d] \ar@{-}[r] & ? \ar@{-}[r] \ar@{-}[d] & S \ar@{-}[d] \\ \mathfrak p' \ar@{-}[r] & \mathfrak p \ar@{-}[r] & R } $$ Assume (1) and (2)(a). By going up there exists a prime $\mathfrak q'' \subset S$ with $\mathfrak q' \subset \mathfrak q''$ and $\mathfrak q''$ lying over $\mathfrak p$. By the uniqueness of $\mathfrak q$ we conclude that $\mathfrak q'' = \mathfrak q$. In other words $\mathfrak q'$ defines a point of $\Spec(S_{\mathfrak q})$. \medskip\noindent Assume (1) and (2)(b). By going down there exists a prime $\mathfrak q'' \subset \mathfrak q$ lying over $\mathfrak p'$. By the uniqueness of primes lying over $\mathfrak p'$ we see that $\mathfrak q' = \mathfrak q''$. In other words $\mathfrak q'$ defines a point of $\Spec(S_{\mathfrak q})$. \medskip\noindent In both cases we conclude that the map $\Spec(S_{\mathfrak q}) \to \Spec(S_{\mathfrak p})$ is bijective. Clearly this means all the elements of $S - \mathfrak q$ are all invertible in $S_{\mathfrak p}$, in other words $S_{\mathfrak p} = S_{\mathfrak q}$. \end{proof} \noindent The following lemma is a generalization of going down for flat ring maps. \begin{lemma} \label{lemma-going-down-flat-module} Let $R \to S$ be a ring map. Let $N$ be a finite $S$-module flat over $R$. Endow $\text{Supp}(N) \subset \Spec(S)$ with the induced topology. Then generalizations lift along $\text{Supp}(N) \to \Spec(R)$. \end{lemma} \begin{proof} The meaning of the statement is as follows. Let $\mathfrak p \subset \mathfrak p' \subset R$ be primes. Let $\mathfrak q' \subset S$ be a prime $\mathfrak q' \in \text{Supp}(N)$ Then there exists a prime $\mathfrak q \subset \mathfrak q'$, $\mathfrak q \in \text{Supp}(N)$ lying over $\mathfrak p$. As $N$ is flat over $R$ we see that $N_{\mathfrak q'}$ is flat over $R_{\mathfrak p'}$, see Lemma \ref{lemma-flat-localization}. As $N_{\mathfrak q'}$ is finite over $S_{\mathfrak q'}$ and not zero since $\mathfrak q' \in \text{Supp}(N)$ we see that $N_{\mathfrak q'} \otimes_{S_{\mathfrak q'}} \kappa(\mathfrak q')$ is nonzero by Nakayama's Lemma \ref{lemma-NAK}. Thus $N_{\mathfrak q'} \otimes_{R_{\mathfrak p'}} \kappa(\mathfrak p')$ is also not zero. We conclude from Lemma \ref{lemma-ff} that $N_{\mathfrak q'} \otimes_{R_{\mathfrak p'}} \kappa(\mathfrak p)$ is nonzero. Let $J \subset S_{\mathfrak q'} \otimes_{R_{\mathfrak p'}} \kappa(\mathfrak p)$ be the annihilator of the finite nonzero module $N_{\mathfrak q'} \otimes_{R_{\mathfrak p'}} \kappa(\mathfrak p)$. Since $J$ is a proper ideal we can choose a prime $\mathfrak q \subset S$ which corresponds to a prime of $S_{\mathfrak q'} \otimes_{R_{\mathfrak p'}} \kappa(\mathfrak p)/J$. This prime is in the support of $N$, lies over $\mathfrak p$, and is contained in $\mathfrak q'$ as desired. \end{proof} \section{Separable extensions} \label{section-separability} % BEGIN ALGEBRA EDITORIAL ROUTE section-separability \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-separability}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-separability \noindent In this section we talk about separability for nonalgebraic field extensions. This is closely related to the concept of geometrically reduced algebras, see Definition \ref{definition-geometrically-reduced}. \begin{definition} \label{definition-separable-field-extension} Let $K/k$ be a field extension. \begin{enumerate} \item We say $K$ is {\it separably generated over $k$} if there exists a transcendence basis $\{x_i; i \in I\}$ of $K/k$ such that the extension $K/k(x_i; i \in I)$ is a separable algebraic extension. \item We say $K$ is {\it separable over $k$} if for every subextension $k \subset K' \subset K$ with $K'$ finitely generated over $k$, the extension $K'/k$ is separably generated. \end{enumerate} \end{definition} \noindent With this awkward definition it is not clear that a separably generated field extension is itself separable. It will turn out that this is the case, see Lemma \ref{lemma-separably-generated-separable}. \begin{lemma} \label{lemma-subextensions-are-separable} Let $K/k$ be a separable field extension. For any subextension $K/K'/k$ the field extension $K'/k$ is separable. \end{lemma} \begin{proof} This is direct from the definition. \end{proof} \begin{lemma} \label{lemma-generating-finitely-generated-separable-field-extensions} Let $K/k$ be a separably generated, and finitely generated field extension. Set $r = \text{trdeg}_k(K)$. Then there exist elements $x_1, \ldots, x_{r + 1}$ of $K$ such that \begin{enumerate} \item $x_1, \ldots, x_r$ is a transcendence basis of $K$ over $k$, \item $K = k(x_1, \ldots, x_{r + 1})$, and \item $x_{r + 1}$ is separable over $k(x_1, \ldots, x_r)$. \end{enumerate} \end{lemma} \begin{proof} Combine the definition with Fields, Lemma \ref{fields-lemma-primitive-element}. \end{proof} \begin{lemma} \label{lemma-make-separably-generated} Let $K/k$ be a finitely generated field extension. There exists a diagram $$ \xymatrix{ K \ar[r] & K' \\ k \ar[u] \ar[r] & k' \ar[u] } $$ where $k'/k$, $K'/K$ are finite purely inseparable field extensions such that $K'/k'$ is a separably generated field extension. \end{lemma} \begin{proof} This lemma is only interesting when the characteristic of $k$ is $p > 0$. Choose $x_1, \ldots, x_r$ a transcendence basis of $K$ over $k$. As $K$ is finitely generated over $k$ the extension $k(x_1, \ldots, x_r) \subset K$ is finite. Let $K/K_{sep}/k(x_1, \ldots, x_r)$ be the subextension found in Fields, Lemma \ref{fields-lemma-separable-first}. If $K = K_{sep}$ then we are done. We will use induction on $d = [K : K_{sep}]$. \medskip\noindent Assume that $d > 1$. Choose a $\beta \in K$ with $\alpha = \beta^p \in K_{sep}$ and $\beta \not \in K_{sep}$. Let $P = T^n + a_1T^{n - 1} + \ldots + a_n$ be the minimal polynomial of $\alpha$ over $k(x_1, \ldots, x_r)$. Let $k'/k$ be a finite purely inseparable extension obtained by adjoining $p$th roots such that each $a_i$ is a $p$th power in $k'(x_1^{1/p}, \ldots, x_r^{1/p})$. Such an extension exists; details omitted. Let $L$ be a field fitting into the diagram $$ \xymatrix{ K \ar[r] & L \\ k(x_1, \ldots, x_r) \ar[u] \ar[r] & k'(x_1^{1/p}, \ldots, x_r^{1/p}) \ar[u] } $$ We may and do assume $L$ is the compositum of $K$ and $k'(x_1^{1/p}, \ldots, x_r^{1/p})$. Let $L/L_{sep}/k'(x_1^{1/p}, \ldots, x_r^{1/p})$ be the subextension found in Fields, Lemma \ref{fields-lemma-separable-first}. Then $L_{sep}$ is the compositum of $K_{sep}$ and $k'(x_1^{1/p}, \ldots, x_r^{1/p})$. The element $\alpha \in L_{sep}$ is a zero of the polynomial $P$ all of whose coefficients are $p$th powers in $k'(x_1^{1/p}, \ldots, x_r^{1/p})$ and whose roots are pairwise distinct. By Fields, Lemma \ref{fields-lemma-pth-root} we see that $\alpha = (\alpha')^p$ for some $\alpha' \in L_{sep}$. Clearly, this means that $\beta$ maps to $\alpha' \in L_{sep}$. In other words, we get the tower of fields $$ \xymatrix{ K \ar[r] & L \\ K_{sep}(\beta) \ar[r] \ar[u] & L_{sep} \ar[u] \\ K_{sep} \ar[r] \ar[u] & L_{sep} \ar@{=}[u] \\ k(x_1, \ldots, x_r) \ar[u] \ar[r] & k'(x_1^{1/p}, \ldots, x_r^{1/p}) \ar[u] \\ k \ar[r] \ar[u] & k' \ar[u] } $$ Thus this construction leads to a new situation with $[L : L_{sep}] < [K : K_{sep}]$. By induction we can find $k' \subset k''$ and $L \subset L'$ as in the lemma for the extension $L/k'$. Then the extensions $k''/k$ and $L'/K$ work for the extension $K/k$. This proves the lemma. \end{proof} \section{Geometrically reduced algebras} \label{section-geometrically-reduced} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-reduced \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-reduced}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-reduced \noindent The main result on geometrically reduced algebras is Lemma \ref{lemma-geometrically-reduced-finite-purely-inseparable-extension}. We suggest the reader skip to the lemma after reading the definition. \begin{definition} \label{definition-geometrically-reduced} Let $k$ be a field. Let $S$ be a $k$-algebra. We say $S$ is {\it geometrically reduced over $k$} if for every field extension $K/k$ the $K$-algebra $K \otimes_k S$ is reduced. \end{definition} \noindent Let $k$ be a field and let $S$ be a reduced $k$-algebra. To check that $S$ is geometrically reduced it will suffice to check that $\overline{k} \otimes_k S$ is reduced (where $\overline{k}$ denotes the algebraic closure of $k$). In fact it is enough to check this for finite purely inseparable field extensions $k'/k$. See Lemma \ref{lemma-geometrically-reduced-finite-purely-inseparable-extension}. \begin{lemma} \label{lemma-subalgebra-separable} Elementary properties of geometrically reduced algebras. Let $k$ be a field. Let $S$ be a $k$-algebra. \begin{enumerate} \item If $S$ is geometrically reduced over $k$ so is every $k$-subalgebra. \item If all finitely generated $k$-subalgebras of $S$ are geometrically reduced, then $S$ is geometrically reduced. \item A directed colimit of geometrically reduced $k$-algebras is geometrically reduced. \item If $S$ is geometrically reduced over $k$, then any localization of $S$ is geometrically reduced over $k$. \end{enumerate} \end{lemma} \begin{proof} Omitted. The second and third property follow from the fact that tensor product commutes with colimits. \end{proof} \begin{lemma} \label{lemma-geometrically-reduced-permanence} Let $k$ be a field. If $R$ is geometrically reduced over $k$, and $S \subset R$ is a multiplicative subset, then the localization $S^{-1}R$ is geometrically reduced over $k$. If $R$ is geometrically reduced over $k$, then $R[x]$ is geometrically reduced over $k$. \end{lemma} \begin{proof} Omitted. Hints: A localization of a reduced ring is reduced, and localization commutes with tensor products. \end{proof} \noindent In the proofs of the following lemmas we will repeatedly use the following observation: Suppose that $R' \subset R$ and $S' \subset S$ are inclusions of $k$-algebras. Then the map $R' \otimes_k S' \to R \otimes_k S$ is injective. \begin{lemma} \label{lemma-limit-argument} Let $k$ be a field. Let $R$, $S$ be $k$-algebras. \begin{enumerate} \item If $R \otimes_k S$ is nonreduced, then there exist finitely generated subalgebras $R' \subset R$, $S' \subset S$ such that $R' \otimes_k S'$ is not reduced. \item If $R \otimes_k S$ contains a nonzero zerodivisor, then there exist finitely generated subalgebras $R' \subset R$, $S' \subset S$ such that $R' \otimes_k S'$ contains a nonzero zerodivisor. \item If $R \otimes_k S$ contains a nontrivial idempotent, then there exist finitely generated subalgebras $R' \subset R$, $S' \subset S$ such that $R' \otimes_k S'$ contains a nontrivial idempotent. \end{enumerate} \end{lemma} \begin{proof} Suppose $z \in R \otimes_k S$ is nilpotent. We may write $z = \sum_{i = 1, \ldots, n} x_i \otimes y_i$. Thus we may take $R'$ the $k$-subalgebra generated by the $x_i$ and $S'$ the $k$-subalgebra generated by the $y_i$. The second and third statements are proved in the same way. \end{proof} \begin{lemma} \label{lemma-geometrically-reduced-any-reduced-base-change} Let $k$ be a field. Let $S$ be a geometrically reduced $k$-algebra. Let $R$ be any reduced $k$-algebra. Then $R \otimes_k S$ is reduced. \end{lemma} \begin{proof} By Lemma \ref{lemma-limit-argument} we may assume that $R$ is of finite type over $k$. Then $R$, as a reduced Noetherian ring, embeds into a finite product of fields (see Lemmas \ref{lemma-total-ring-fractions-no-embedded-points}, \ref{lemma-Noetherian-irreducible-components}, and \ref{lemma-minimal-prime-reduced-ring}). Hence we may assume $R$ is a finite product of fields. In this case it follows from Definition \ref{definition-geometrically-reduced} that $R \otimes_k S$ is reduced. \end{proof} \begin{lemma} \label{lemma-separable-extension-preserves-reducedness} Let $k$ be a field. Let $S$ be a reduced $k$-algebra. Let $K/k$ be either a separable field extension, or a separably generated field extension. Then $K \otimes_k S$ is reduced. \end{lemma} \begin{proof} Assume $k \subset K$ is separable. By Lemma \ref{lemma-limit-argument} we may assume that $S$ is of finite type over $k$ and $K$ is finitely generated over $k$. Then $S$ embeds into a finite product of fields, namely its total ring of fractions (see Lemmas \ref{lemma-minimal-prime-reduced-ring} and \ref{lemma-total-ring-fractions-no-embedded-points}). Hence we may actually assume that $S$ is a domain. We choose $x_1, \ldots, x_{r + 1} \in K$ as in Lemma \ref{lemma-generating-finitely-generated-separable-field-extensions}. Let $P \in k(x_1, \ldots, x_r)[T]$ be the minimal polynomial of $x_{r + 1}$. It is a separable polynomial. It is easy to see that $k[x_1, \ldots, x_r] \otimes_k S = S[x_1, \ldots, x_r]$ is a domain. This implies $k(x_1, \ldots, x_r) \otimes_k S$ is a domain as it is a localization of $S[x_1, \ldots, x_r]$. The ring extension $k(x_1, \ldots, x_r) \otimes_k S \subset K \otimes_k S$ is generated by a single element $x_{r + 1}$ with a single equation, namely $P$. Hence $K \otimes_k S$ embeds into $F[T]/(P)$ where $F$ is the fraction field of $k(x_1, \ldots, x_r) \otimes_k S$. Since $P$ is separable this is a finite product of fields and we win. \medskip\noindent At this point we do not yet know that a separably generated field extension is separable, so we have to prove the lemma in this case also. To do this suppose that $\{x_i\}_{i \in I}$ is a separating transcendence basis for $K$ over $k$. For any finite set of elements $\lambda_j \in K$ there exists a finite subset $T \subset I$ such that $k(\{x_i\}_{i\in T}) \subset k(\{x_i\}_{i \in T} \cup \{\lambda_j\})$ is finite separable. Hence we see that $K$ is a directed colimit of finitely generated and separably generated extensions of $k$. Thus the argument of the preceding paragraph applies to this case as well. \end{proof} \begin{lemma} \label{lemma-generic-points-geometrically-reduced} Let $k$ be a field and let $S$ be a $k$-algebra. Assume that $S$ is reduced and that $S_{\mathfrak p}$ is geometrically reduced for every minimal prime $\mathfrak p$ of $S$. Then $S$ is geometrically reduced. \end{lemma} \begin{proof} Since $S$ is reduced the map $S \to \prod_{\mathfrak p\text{ minimal}} S_{\mathfrak p}$ is injective, see Lemma \ref{lemma-reduced-ring-sub-product-fields}. If $K/k$ is a field extension, then the maps $$ S \otimes_k K \to (\prod S_\mathfrak p) \otimes_k K \to \prod S_\mathfrak p \otimes_k K $$ are injective: the first as $k \to K$ is flat and the second by inspection because $K$ is a free $k$-module. As $S_\mathfrak p$ is geometrically reduced the ring on the right is reduced. Thus we see that $S \otimes_k K$ is reduced as a subring of a reduced ring. \end{proof} \begin{lemma} \label{lemma-separable-algebraic-diagonal} Let $k'/k$ be a separable algebraic extension. Then there exists a multiplicative subset $S \subset k' \otimes_k k'$ such that the multiplication map $k' \otimes_k k' \to k'$ is identified with $k' \otimes_k k' \to S^{-1}(k' \otimes_k k')$. \end{lemma} \begin{proof} First assume $k'/k$ is finite separable. Then $k' = k(\alpha)$, see Fields, Lemma \ref{fields-lemma-primitive-element}. Let $P \in k[x]$ be the minimal polynomial of $\alpha$ over $k$. Then $P$ is an irreducible, separable, monic polynomial, see Fields, Section \ref{fields-section-separable-extensions}. Then $k'[x]/(P) \to k' \otimes_k k'$, $\sum \alpha_i x^i \mapsto \alpha_i \otimes \alpha^i$ is an isomorphism. We can factor $P = (x - \alpha) Q$ in $k'[x]$ and since $P$ is separable we see that $Q(\alpha) \not = 0$. Then it is clear that the multiplicative set $S'$ generated by $Q$ in $k'[x]/(P)$ works, i.e., that $k' = (S')^{-1}(k'[x]/(P))$. By transport of structure the image $S$ of $S'$ in $k' \otimes_k k'$ works. \medskip\noindent In the general case we write $k' = \bigcup k_i$ as the union of its finite subfield extensions over $k$. For each $i$ there is a multiplicative subset $S_i \subset k_i \otimes_k k_i$ such that $k_i = S_i^{-1}(k_i \otimes_k k_i)$. Let $S$ be the multiplicative closure of $\bigcup S_i \subset k' \otimes_k k'$. Clearly, the multiplication maps sends every element of $S$ to an invertible element of $k'$. Using that $k' \otimes_k k'$ is the union of the rings $k_i \otimes_k k_i$ we see that every element in the kernel of the multiplication map is mapped to zero in $S^{-1}(k' \otimes_k k')$. Using exactness of localization the result follows. \end{proof} \begin{lemma} \label{lemma-geometrically-reduced-over-separable-algebraic} Let $k'/k$ be a separable algebraic field extension. Let $A$ be an algebra over $k'$. Then $A$ is geometrically reduced over $k$ if and only if it is geometrically reduced over $k'$. \end{lemma} \begin{proof} Assume $A$ is geometrically reduced over $k'$. Let $K/k$ be a field extension. Then $K \otimes_k k'$ is a reduced ring by Lemma \ref{lemma-separable-extension-preserves-reducedness}. Hence by Lemma \ref{lemma-geometrically-reduced-any-reduced-base-change} we find that $K \otimes_k A = (K \otimes_k k') \otimes_{k'} A$ is reduced. \medskip\noindent Assume $A$ is geometrically reduced over $k$. Let $K/k'$ be a field extension. Then $$ K \otimes_{k'} A = (K \otimes_k A) \otimes_{(k' \otimes_k k')} k' $$ Since $k' \otimes_k k' \to k'$ is a localization by Lemma \ref{lemma-separable-algebraic-diagonal}, we see that $K \otimes_{k'} A$ is a localization of a reduced algebra, hence reduced. \end{proof} \section{Separable extensions, continued} \label{section-separability-continued} % BEGIN ALGEBRA EDITORIAL ROUTE section-separability-continued \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-separability-continued}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-separability-continued \noindent In this section we continue the discussion started in Section \ref{section-separability}. \begin{lemma} \label{lemma-mini-separability} Let $k$ be a field of characteristic $p > 1$. Let $K/k$ be a field extension generated by $x_1, \ldots, x_{n + 1} \in K$ such that \begin{enumerate} \item $\{x_1, \ldots, x_n\}$ is a transcendence base of $K/k$, \item for every $k$-linearly independent subset $\{a_1, \ldots, a_m\}$ of $K$ the set $\{a^p_1, \ldots, a_m^p\}$ is $k$-linearly independent. \end{enumerate} Then there is $1 \leq j \leq n+1$ such that $\{ x_1, \ldots, \widehat{x}_j, \ldots, x_{n+1}\}$ is a separating transcendence base for $K / k$. \end{lemma} \begin{proof} By assumption $x_{n + 1}$ is algebraic over $k(x_1, \ldots, x_n)$ so there exists a non-zero polynomial $F \in k[X_1, \ldots, X_{n + 1}]$ such that $F(x_1, \ldots, x_{n+1}) = 0$. Choose $F$ of minimal total degree. Then $F$ is irreducible, because at least one irreducible factor must also have the same property. \medskip\noindent We claim that, for some $i$, not all powers of $X_i$ appearing in $F$ are multiples of $p$. Suppose for a contradiction that all the exponents appearing in $F$ were multiples of $p$, then the set $$ \{x_1^{\alpha_1} \ldots x^{\alpha_{n+1}}_{n+1} \mid \lambda_\alpha \neq 0\} \subset K $$ is $k$-linearly dependent where $\lambda_\alpha$ are the coefficients of $F$. By assumption (2) we conclude the set $$ \{x_1^{\alpha_1 / p} \ldots x^{\alpha_{n+1} / p}_{n+1} \mid \lambda_\alpha \neq 0 \} $$ is also $k$-linearly dependent, contradicting minimality of $\deg(F)$. \medskip\noindent Choose $i$ for which a non-$p$th power of $X_i$ appears in $F$. Then we see that $x_i$ is algebraic over $L = k(x_1, \ldots, x_{i - 1}, x_{i + 1}, \ldots, x_{n+1})$. By Fields, Lemma \ref{fields-lemma-transcendence-degree} we see that $x_1, \ldots, x_{i - 1}, x_{i + 1}, \ldots, x_{n+1}$ is a transcendence base of $K/k$. Thus $L$ is the fraction field of the polynomial ring over $k$ in $x_1, \ldots, x_{i - 1}, x_{i + 1}, \ldots, x_{n + 1}$. By Gauss' Lemma we conclude that $$ P(T) = F(x_1, \ldots, x_{i - 1}, T, x_{i + 1}, \ldots, x_{n + 1}) \in L[T] $$ is irreducible. By construction $P(T)$ is not contained in $L[T^p]$. Hence $K/L$ is separable as required. \end{proof} \noindent Let $p$ be a prime number and let $k$ be a field of characteristic $p$. In this case we write $k^{1/p}$ for the extension of $k$ gotten by adjoining $p$th roots of all the elements of $k$ to $k$. (In other words it is the subfield of an algebraic closure of $k$ generated by the $p$th roots of elements of $k$.) \begin{lemma} \label{lemma-characterize-separable-field-extensions} Let $k$ be a field of characteristic $p > 0$. Let $K/k$ be a field extension. The following are equivalent: \begin{enumerate} \item $K$ is separable over $k$, \item for every $k$-linearly independent subset $\{a_1, \ldots, a_m\}$ of $K$ the set $\{a^p_1, \ldots, a_m^p\}$ is $k$-linearly independent, \item the ring $K \otimes_k k^{1/p}$ is reduced, and \item $K$ is geometrically reduced over $k$. \end{enumerate} \end{lemma} \begin{proof} The implication (1) $\Rightarrow$ (4) follows from Lemma \ref{lemma-separable-extension-preserves-reducedness}. The implication (4) $\Rightarrow$ (3) is immediate. \medskip\noindent Assume (3). Consider the ring homomorphism $m : K \otimes_k k^{1/p} \rightarrow K$ given by $$ \lambda \otimes \mu \rightarrow \lambda^p \mu^p $$ Note that $x^p = m(x) \otimes 1$ for all $x \in K \otimes_k k^{1/p}$. Since $K \otimes_k k^{1/p}$ is reduced we see $m$ is injective. If $\{a_1, \ldots, a_m\} \subset K$ is $k$-linearly independent, then $\{a_1 \otimes 1, \ldots, a_m \otimes 1\}$ is $k^{1/p}$-linearly independent. By injectivity of $m$ we deduce that no nontrivial $k$-linear combination of $a_1^p, \ldots, a_m^p$ is is zero. Hence (3) implies (2). \medskip\noindent Assume (2). To prove (1) we may assume that $K$ is finitely generated over $k$ and we have to prove that $K$ is separably generated over $k$. Let $\{x_1, \ldots, x_d\}$ be a transcendence base of $K/k$. By Fields, Lemma \ref{fields-lemma-algebraic-finitely-generated} we have $[K : K'] < \infty$ where $K' = k(x_1, \ldots, x_d)$. Choose the transcendence base such that the degree of inseparability $[K : K']_i$ is minimal. If $K / K'$ is separable then we win. Assume this is not the case to get a contradiction. Then there exists $x_{d + 1} \in K$ which is not separable over $K'$, and in particular $[K'(x_{d+1}) : K']_i > 1$. Then by Lemma \ref{lemma-mini-separability} there is $1 \leq j \leq n + 1$ such that $K'' = k(x_1, \ldots, \widehat{x}_j, \ldots, x_{d+1})$ satisfies $[K'(x_{d+1}) : K'']_i = 1$. By multiplicativity $[K : K'']_i < [K : K']_i$ and we obtain the contradiction. \end{proof} \begin{lemma} \label{lemma-separably-generated-separable} A separably generated field extension is separable. \end{lemma} \begin{proof} Combine Lemma \ref{lemma-separable-extension-preserves-reducedness} with Lemma \ref{lemma-characterize-separable-field-extensions}. \end{proof} \noindent In the following lemma we will use the notion of the perfect closure which is defined in Definition \ref{definition-perfection}. \begin{lemma} \label{lemma-geometrically-reduced-finite-purely-inseparable-extension} Let $k$ be a field. Let $S$ be a $k$-algebra. The following are equivalent: \begin{enumerate} \item $k' \otimes_k S$ is reduced for every finite purely inseparable extension $k'$ of $k$, \item if $\operatorname{char}(k)=p>0$, then $k^{1/p}\otimes_k S$ is reduced; if $\operatorname{char}(k)=0$, then $S$ is reduced, \item $k^{perf} \otimes_k S$ is reduced, where $k^{perf}$ is the perfect closure of $k$, \item $\overline{k} \otimes_k S$ is reduced, where $\overline{k}$ is the algebraic closure of $k$, and \item $S$ is geometrically reduced over $k$. \end{enumerate} \end{lemma} \begin{proof} Note that any finite purely inseparable extension $k'/k$ embeds in $k^{perf}$. Moreover, $k^{1/p}$ embeds into $k^{perf}$ which embeds into $\overline{k}$. Thus it is clear that (5) $\Rightarrow$ (4) $\Rightarrow$ (3) $\Rightarrow$ (2) and that (3) $\Rightarrow$ (1). \medskip\noindent We prove that (1) $\Rightarrow$ (5). Assume $k' \otimes_k S$ is reduced for every finite purely inseparable extension $k'$ of $k$. Let $K/k$ be an extension of fields. We have to show that $K \otimes_k S$ is reduced. By Lemma \ref{lemma-limit-argument} we reduce to the case where $K/k$ is a finitely generated field extension. Choose a diagram $$ \xymatrix{ K \ar[r] & K' \\ k \ar[u] \ar[r] & k' \ar[u] } $$ as in Lemma \ref{lemma-make-separably-generated}. By assumption $k' \otimes_k S$ is reduced. By Lemma \ref{lemma-separable-extension-preserves-reducedness} it follows that $K' \otimes_k S$ is reduced. Hence we conclude that $K \otimes_k S$ is reduced as desired. \medskip\noindent Finally we prove that (2) $\Rightarrow$ (5). Assume $k^{1/p} \otimes_k S$ is reduced. Then $S$ is reduced. Moreover, for each localization $S_{\mathfrak p}$ at a minimal prime $\mathfrak p$, the ring $k^{1/p}\otimes_k S_{\mathfrak p}$ is a localization of $k^{1/p} \otimes_k S$ hence is reduced. But $S_{\mathfrak p}$ is a field by Lemma \ref{lemma-minimal-prime-reduced-ring}, hence $S_{\mathfrak p}$ is geometrically reduced by Lemma \ref{lemma-characterize-separable-field-extensions}. It follows from Lemma \ref{lemma-generic-points-geometrically-reduced} that $S$ is geometrically reduced. \end{proof} \section{Perfect fields} \label{section-perfect-fields} % BEGIN ALGEBRA EDITORIAL ROUTE section-perfect-fields \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-perfect-fields}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-perfect-fields \noindent Here is the definition. \begin{definition} \label{definition-perfect} Let $k$ be a field. We say $k$ is {\it perfect} if every field extension of $k$ is separable over $k$. \end{definition} \begin{lemma} \label{lemma-perfect} A field $k$ is perfect if and only if it is a field of characteristic $0$ or a field of characteristic $p > 0$ such that every element has a $p$th root. \end{lemma} \begin{proof} The characteristic zero case is clear. Assume the characteristic of $k$ is $p > 0$. If $k$ is perfect, then all the field extensions where we adjoin a $p$th root of an element of $k$ have to be trivial, hence every element of $k$ has a $p$th root. Conversely if every element has a $p$th root, then $k = k^{1/p}$ and every field extension of $k$ is separable by Lemma \ref{lemma-characterize-separable-field-extensions}. \end{proof} \begin{lemma} \label{lemma-make-separable} Let $K/k$ be a finitely generated field extension. There exists a diagram $$ \xymatrix{ K \ar[r] & K' \\ k \ar[u] \ar[r] & k' \ar[u] } $$ where $k'/k$, $K'/K$ are finite purely inseparable field extensions such that $K'/k'$ is a separable field extension. In this situation we can assume that $K' = k'K$ is the compositum, and also that $K' = (k' \otimes_k K)_{red}$. \end{lemma} \begin{proof} By Lemma \ref{lemma-make-separably-generated} we can find such a diagram with $K'/k'$ separably generated. By Lemma \ref{lemma-separably-generated-separable} this implies that $K'$ is separable over $k'$. The compositum $k'K$ is a subextension of $K'/k'$ and hence $k' \subset k'K$ is separable by Lemma \ref{lemma-subextensions-are-separable}. The ring $(k' \otimes_k K)_{red}$ is a domain as for some $n \gg 0$ the map $x \mapsto x^{p^n}$ maps it into $K$. Hence it is a field by Lemma \ref{lemma-integral-over-field}. Thus $(k' \otimes_k K)_{red} \to K'$ maps it isomorphically onto $k'K$. \end{proof} \begin{lemma} \label{lemma-perfection} \begin{slogan} Every field has a unique perfect closure. \end{slogan} For every field $k$ there exists a purely inseparable extension $k'/k$ such that $k'$ is perfect. The field extension $k'/k$ is unique up to unique isomorphism. \end{lemma} \begin{proof} If the characteristic of $k$ is zero, then $k' = k$ is the unique choice. Assume the characteristic of $k$ is $p > 0$. For every $n > 0$ there exists a unique algebraic extension $k \subset k^{1/p^n}$ such that (a) every element $\lambda \in k$ has a $p^n$th root in $k^{1/p^n}$ and (b) for every element $\mu \in k^{1/p^n}$ we have $\mu^{p^n} \in k$. Namely, consider the ring map $k \to k^{1/p^n} = k$, $x \mapsto x^{p^n}$. This is injective and satisfies (a) and (b). It is clear that $k^{1/p^n} \subset k^{1/p^{n + 1}}$ as extensions of $k$ via the map $y \mapsto y^p$. Then we can take $k' = \bigcup k^{1/p^n}$. Some details omitted. \end{proof} \begin{definition} \label{definition-perfection} Let $k$ be a field. The field extension $k'/k$ of Lemma \ref{lemma-perfection} is called the {\it perfect closure} of $k$. Notation $k^{perf}/k$. \end{definition} \noindent Note that if $k'/k$ is any algebraic purely inseparable extension, then $k'$ is a subextension of $k^{perf}$, i.e., $k^{perf}/k'/k$. Namely, $(k')^{perf}$ is isomorphic to $k^{perf}$ by the uniqueness of Lemma \ref{lemma-perfection}. \begin{lemma} \label{lemma-perfect-reduced} Let $k$ be a perfect field. Any reduced $k$ algebra is geometrically reduced over $k$. Let $R$, $S$ be $k$-algebras. Assume both $R$ and $S$ are reduced. Then the $k$-algebra $R \otimes_k S$ is reduced. \end{lemma} \begin{proof} The first statement follows from Lemma \ref{lemma-geometrically-reduced-finite-purely-inseparable-extension}. For the second statement use the first statement and Lemma \ref{lemma-geometrically-reduced-any-reduced-base-change}. \end{proof} \section{Universal homeomorphisms} \label{section-universal-homeomorphism} % BEGIN ALGEBRA EDITORIAL ROUTE section-universal-homeomorphism \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-universal-homeomorphism}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-universal-homeomorphism \noindent Let $k'/k$ be an algebraic purely inseparable field extension. Then for any $k$-algebra $R$ the ring map $R \to k' \otimes_k R$ induces a homeomorphism of spectra. The reason for this is the slightly more general Lemma \ref{lemma-p-ring-map} below. \begin{lemma} \label{lemma-surjective-locally-nilpotent-kernel} Let $\varphi : R \to S$ be a surjective map with locally nilpotent kernel. Then $\varphi$ induces a homeomorphism of spectra and isomorphisms on residue fields. For any ring map $R \to R'$ the ring map $R' \to R' \otimes_R S$ is surjective with locally nilpotent kernel. \end{lemma} \begin{proof} By Lemma \ref{lemma-spec-closed} the map $\Spec(S) \to \Spec(R)$ is a homeomorphism onto the closed subset $V(\Ker(\varphi))$. Of course $V(\Ker(\varphi)) = \Spec(R)$ because every prime ideal of $R$ contains every nilpotent element of $R$. This also implies the statement on residue fields. By right exactness of tensor product we see that $\Ker(\varphi)R'$ is the kernel of the surjective map $R' \to R' \otimes_R S$. Hence the final statement by Lemma \ref{lemma-locally-nilpotent}. \end{proof} \begin{lemma} \label{lemma-powers-field} \begin{reference} \cite[Lemma 3.1.6]{Alper-adequate} \end{reference} Let $k'/k$ be a field extension. The following are equivalent \begin{enumerate} \item for each $x \in k'$ there exists an $n > 0$ such that $x^n \in k$, and \item $k' = k$ or $k$ and $k'$ have characteristic $p > 0$ and either $k'/k$ is a purely inseparable extension or $k$ and $k'$ are algebraic extensions of $\mathbf{F}_p$. \end{enumerate} \end{lemma} \begin{proof} Observe that each of the possibilities listed in (2) satisfies (1). Thus we assume $k'/k$ satisfies (1) and we prove that we are in one of the cases of (2). Discarding the case $k = k'$ we may assume $k' \not = k$. It is clear that $k'/k$ is algebraic. Hence we may assume that $k'/k$ is a nontrivial finite extension. Let $k'/k'_{sep}/k$ be the separable subextension found in Fields, Lemma \ref{fields-lemma-separable-first}. We have to show that $k = k'_{sep}$ or that $k$ is an algebraic over $\mathbf{F}_p$. Thus we may assume that $k'/k$ is a nontrivial finite separable extension and we have to show $k$ is algebraic over $\mathbf{F}_p$. \medskip\noindent Pick $x \in k'$, $x \not \in k$. Pick $n, m > 0$ such that $x^n \in k$ and $(x + 1)^m \in k$. Let $\overline{k}$ be an algebraic closure of $k$. We can choose embeddings $\sigma, \tau : k' \to \overline{k}$ with $\sigma(x) \not = \tau(x)$. This follows from the discussion in Fields, Section \ref{fields-section-separable-extensions} (more precisely, after replacing $k'$ by the $k$-extension generated by $x$ it follows from Fields, Lemma \ref{fields-lemma-count-embeddings}). Then we see that $\sigma(x) = \zeta \tau(x)$ for some $n$th root of unity $\zeta$ in $\overline{k}$. Similarly, we see that $\sigma(x + 1) = \zeta' \tau(x + 1)$ for some $m$th root of unity $\zeta' \in \overline{k}$. Since $\sigma(x + 1) \not = \tau(x + 1)$ we see $\zeta' \not = 1$. Then $$ \zeta' (\tau(x) + 1) = \zeta' \tau(x + 1) = \sigma(x + 1) = \sigma(x) + 1 = \zeta \tau(x) + 1 $$ implies that $$ \tau(x) (\zeta' - \zeta) = 1 - \zeta' $$ hence $\zeta' \not = \zeta$ and $$ \tau(x) = (1 - \zeta')/(\zeta' - \zeta) $$ Hence every element of $k'$ which is not in $k$ is algebraic over the prime subfield. Since $k'$ is generated over the prime subfield by the elements of $k'$ which are not in $k$, we conclude that $k'$ (and hence $k$) is algebraic over the prime subfield. \medskip\noindent Finally, if the characteristic of $k$ is $0$, the above leads to a contradiction as follows (we encourage the reader to find their own proof). For every rational number $y$ we similarly get a root of unity $\zeta_y$ such that $\sigma(x + y) = \zeta_y\tau(x + y)$. Then we find $$ \zeta \tau(x) + y = \zeta_y(\tau(x) + y) $$ and by our formula for $\tau(x)$ above we conclude $\zeta_y \in \mathbf{Q}(\zeta, \zeta')$. Since the number field $\mathbf{Q}(\zeta, \zeta')$ contains only a finite number of roots of unity we find two distinct rational numbers $y, y'$ with $\zeta_y = \zeta_{y'}$. Then we conclude that $$ y - y' = \sigma(x + y) - \sigma(x + y') = \zeta_y(\tau(x + y)) - \zeta_{y'}\tau(x + y') = \zeta_y(y - y') $$ which implies $\zeta_y = 1$ a contradiction. \end{proof} \begin{lemma} \label{lemma-powers} Let $\varphi : R \to S$ be a ring map. If \begin{enumerate} \item for any $x \in S$ there exists $n > 0$ such that $x^n$ is in the image of $\varphi$, and \item $\Ker(\varphi)$ is locally nilpotent, \end{enumerate} then $\varphi$ induces a homeomorphism on spectra and induces residue field extensions satisfying the equivalent conditions of Lemma \ref{lemma-powers-field}. \end{lemma} \begin{proof} Assume (1) and (2). Let $\mathfrak q, \mathfrak q'$ be primes of $S$ lying over the same prime ideal $\mathfrak p$ of $R$. Suppose $x \in S$ with $x \in \mathfrak q$, $x \not \in \mathfrak q'$. Then $x^n \in \mathfrak q$ and $x^n \not \in \mathfrak q'$ for all $n > 0$. If $x^n = \varphi(y)$ with $y \in R$ for some $n > 0$ then $$ x^n \in \mathfrak q \Rightarrow y \in \mathfrak p \Rightarrow x^n \in \mathfrak q' $$ which is a contradiction. Hence there does not exist an $x$ as above and we conclude that $\mathfrak q = \mathfrak q'$, i.e., the map on spectra is injective. By assumption (2) the kernel $I = \Ker(\varphi)$ is contained in every prime, hence $\Spec(R) = \Spec(R/I)$ as topological spaces. As the induced map $R/I \to S$ is integral by assumption (1) Lemma \ref{lemma-integral-overring-surjective} shows that $\Spec(S) \to \Spec(R/I)$ is surjective. Combining the above we see that $\Spec(S) \to \Spec(R)$ is bijective. If $x \in S$ is arbitrary, and we pick $y \in R$ such that $\varphi(y) = x^n$ for some $n > 0$, then we see that the open $D(x) \subset \Spec(S)$ corresponds to the open $D(y) \subset \Spec(R)$ via the bijection above. Hence we see that the map $\Spec(S) \to \Spec(R)$ is a homeomorphism. \medskip\noindent To see the statement on residue fields, let $\mathfrak q \subset S$ be a prime lying over a prime ideal $\mathfrak p \subset R$. Let $x \in \kappa(\mathfrak q)$. If we think of $\kappa(\mathfrak q)$ as the residue field of the local ring $S_\mathfrak q$, then we see that $x$ is the image of some $y/z \in S_\mathfrak q$ with $y \in S$, $z \in S$, $z \not \in \mathfrak q$. Choose $n, m > 0$ such that $y^n, z^m$ are in the image of $\varphi$. Then $x^{nm}$ is the residue of $(y/z)^{nm} = (y^n)^m/(z^m)^n$ which is in the image of $R_\mathfrak p \to S_\mathfrak q$. Hence $x^{nm}$ is in the image of $\kappa(\mathfrak p) \to \kappa(\mathfrak q)$. \end{proof} \begin{lemma} \label{lemma-2-3-ring-map} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item[(a)] $S$ is generated as an $R$-algebra by elements $x$ such that $x^2, x^3 \in \varphi(R)$, and \item[(b)] $\Ker(\varphi)$ is locally nilpotent, \end{enumerate} Then $\varphi$ induces isomorphisms on residue fields and a homeomorphism of spectra. For any ring map $R \to R'$ the ring map $R' \to R' \otimes_R S$ also satisfies (a) and (b). \end{lemma} \begin{proof} Assume (a) and (b). The map on spectra is closed as $S$ is integral over $R$, see Lemmas \ref{lemma-going-up-closed} and \ref{lemma-integral-going-up}. The image is dense by Lemma \ref{lemma-image-dense-generic-points}. Thus $\Spec(S) \to \Spec(R)$ is surjective. If $\mathfrak q \subset S$ is a prime lying over $\mathfrak p \subset R$ then the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is generated by elements $\alpha \in \kappa(\mathfrak q)$ whose square and cube are in $\kappa(\mathfrak p)$. Thus clearly $\alpha \in \kappa(\mathfrak p)$ and we find that $\kappa(\mathfrak q) = \kappa(\mathfrak p)$. If $\mathfrak q, \mathfrak q'$ were two distinct primes lying over $\mathfrak p$, then at least one of the generators $x$ of $S$ as in (a) would have distinct images in $\kappa(\mathfrak q) = \kappa(\mathfrak p)$ and $\kappa(\mathfrak q') = \kappa(\mathfrak p)$. This would contradict the fact that both $x^2$ and $x^3$ do have the same image. This proves that $\Spec(S) \to \Spec(R)$ is injective hence a homeomorphism (by what was already shown). \medskip\noindent Since $\varphi$ induces a homeomorphism on spectra, it is in particular surjective on spectra which is a property preserved under any base change, see Lemma \ref{lemma-surjective-spec-radical-ideal}. Therefore for any $R \to R'$ the kernel of the ring map $R' \to R' \otimes_R S$ consists of nilpotent elements, see Lemma \ref{lemma-image-dense-generic-points}, in other words (b) holds for $R' \to R' \otimes_R S$. It is clear that (a) is preserved under base change. \end{proof} \begin{lemma} \label{lemma-help-with-powers} Let $p$ be a prime number. Let $n, m > 0$ be two integers. There exists an integer $a$ such that $(x + y)^{p^a}, p^a(x + y) \in \mathbf{Z}[x^{p^n}, p^nx, y^{p^m}, p^my]$. \end{lemma} \begin{proof} This is clear for $p^a(x + y)$ as soon as $a \geq n, m$. In fact, pick $a \gg n, m$. Write $$ (x + y)^{p^a} = \sum\nolimits_{i, j \geq 0, i + j = p^a} {p^a \choose i, j} x^iy^j $$ For every $i, j \geq 0$ with $i + j = p^a$ write $i = q p^n + r$ with $r \in \{0, \ldots, p^n - 1\}$ and $j = q' p^m + r'$ with $r' \in \{0, \ldots, p^m - 1\}$. The condition $(x + y)^{p^a} \in \mathbf{Z}[x^{p^n}, p^nx, y^{p^m}, p^my]$ holds if $$ p^{nr + mr'} \text{ divides } {p^a \choose i, j} $$ If $r = r' = 0$ then the divisibility holds. If $r \not = 0$, then we write $$ {p^a \choose i, j} = \frac{p^a}{i} {p^a - 1 \choose i - 1, j} $$ Since $r \not = 0$ the rational number $p^a/i$ has $p$-adic valuation at least $a - (n - 1)$ (because $i$ is not divisible by $p^n$). Thus ${p^a \choose i, j}$ is divisible by $p^{a - n + 1}$ in this case. Similarly, we see that if $r' \not = 0$, then ${p^a \choose i, j}$ is divisible by $p^{a - m + 1}$. Picking $a = np^n + mp^m + n + m$ will work. \end{proof} \begin{lemma} \label{lemma-p-ring-map-field} Let $k'/k$ be a field extension. Let $p$ be a prime number. The following are equivalent \begin{enumerate} \item $k'$ is generated as a field extension of $k$ by elements $x$ such that there exists an $n > 0$ with $x^{p^n} \in k$ and $p^nx \in k$, and \item $k = k'$ or the characteristic of $k$ and $k'$ is $p$ and $k'/k$ is purely inseparable. \end{enumerate} \end{lemma} \begin{proof} Let $x \in k'$. If there exists an $n > 0$ with $x^{p^n} \in k$ and $p^nx \in k$ and if the characteristic is not $p$, then $x \in k$. If the characteristic is $p$, then we find $x^{p^n} \in k$ and hence $x$ is purely inseparable over $k$. \end{proof} \begin{lemma} \label{lemma-p-ring-map} Let $\varphi : R \to S$ be a ring map. Let $p$ be a prime number. Assume \begin{enumerate} \item[(a)] $S$ is generated as an $R$-algebra by elements $x$ such that there exists an $n > 0$ with $x^{p^n} \in \varphi(R)$ and $p^nx \in \varphi(R)$, and \item[(b)] $\Ker(\varphi)$ is locally nilpotent, \end{enumerate} Then $\varphi$ induces a homeomorphism of spectra and induces residue field extensions satisfying the equivalent conditions of Lemma \ref{lemma-p-ring-map-field}. For any ring map $R \to R'$ the ring map $R' \to R' \otimes_R S$ also satisfies (a) and (b). \end{lemma} \begin{proof} Assume (a) and (b). Note that (b) is equivalent to condition (2) of Lemma \ref{lemma-powers}. Let $T \subset S$ be the set of elements $x \in S$ such that there exists an integer $n > 0$ such that $x^{p^n} , p^n x \in \varphi(R)$. We claim that $T = S$. This will prove that condition (1) of Lemma \ref{lemma-powers} holds and hence $\varphi$ induces a homeomorphism on spectra. By assumption (a) it suffices to show that $T \subset S$ is an $R$-sub algebra. If $x \in T$ and $y \in R$, then it is clear that $yx \in T$. Suppose $x, y \in T$ and $n, m > 0$ such that $x^{p^n}, y^{p^m}, p^n x, p^m y \in \varphi(R)$. Then $(xy)^{p^{n + m}}, p^{n + m}xy \in \varphi(R)$ hence $xy \in T$. We have $x + y \in T$ by Lemma \ref{lemma-help-with-powers} and the claim is proved. \medskip\noindent Since $\varphi$ induces a homeomorphism on spectra, it is in particular surjective on spectra which is a property preserved under any base change, see Lemma \ref{lemma-surjective-spec-radical-ideal}. Therefore for any $R \to R'$ the kernel of the ring map $R' \to R' \otimes_R S$ consists of nilpotent elements, see Lemma \ref{lemma-image-dense-generic-points}, in other words (b) holds for $R' \to R' \otimes_R S$. It is clear that (a) is preserved under base change. Finally, the condition on residue fields follows from (a) as generators for $S$ as an $R$-algebra map to generators for the residue field extensions. \end{proof} \begin{lemma} \label{lemma-radicial} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ induces an injective map of spectra, \item $\varphi$ induces purely inseparable residue field extensions. \end{enumerate} Then for any ring map $R \to R'$ properties (1) and (2) are true for $R' \to R' \otimes_R S$. \end{lemma} \begin{proof} Set $S' = R' \otimes_R S$ so that we have a commutative diagram of continuous maps of spectra of rings $$ \xymatrix{ \Spec(S') \ar[r] \ar[d] & \Spec(S) \ar[d] \\ \Spec(R') \ar[r] & \Spec(R) } $$ Let $\mathfrak p' \subset R'$ be a prime ideal lying over $\mathfrak p \subset R$. If there is no prime ideal of $S$ lying over $\mathfrak p$, then there is no prime ideal of $S'$ lying over $\mathfrak p'$. Otherwise, by Remark \ref{remark-fundamental-diagram} there is a unique prime ideal $\mathfrak r$ of $F = S \otimes_R \kappa(\mathfrak p)$ whose residue field is purely inseparable over $\kappa(\mathfrak p)$. Consider the ring maps $$ \kappa(\mathfrak p) \to F \to \kappa(\mathfrak r) $$ By Lemma \ref{lemma-minimal-prime-reduced-ring} the ideal $\mathfrak r \subset F$ is locally nilpotent, hence we may apply Lemma \ref{lemma-surjective-locally-nilpotent-kernel} to the ring map $F \to \kappa(\mathfrak r)$. We may apply Lemma \ref{lemma-p-ring-map} to the ring map $\kappa(\mathfrak p) \to \kappa(\mathfrak r)$. Hence the composition and the second arrow in the maps $$ \kappa(\mathfrak p') \to \kappa(\mathfrak p') \otimes_{\kappa(\mathfrak p)} F \to \kappa(\mathfrak p') \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak r) $$ induces bijections on spectra and purely inseparable residue field extensions. This implies the same thing for the first map. Since $$ \kappa(\mathfrak p') \otimes_{\kappa(\mathfrak p)} F = \kappa(\mathfrak p') \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p) \otimes_R S = \kappa(\mathfrak p') \otimes_R S = \kappa(\mathfrak p') \otimes_{R'} R' \otimes_R S $$ we conclude by the discussion in Remark \ref{remark-fundamental-diagram}. \end{proof} \begin{lemma} \label{lemma-radicial-integral} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ is integral, \item $\varphi$ induces an injective map of spectra, \item $\varphi$ induces purely inseparable residue field extensions. \end{enumerate} Then $\varphi$ induces a homeomorphism from $\Spec(S)$ onto a closed subset of $\Spec(R)$ and for any ring map $R \to R'$ properties (1), (2), (3) are true for $R' \to R' \otimes_R S$. \end{lemma} \begin{proof} The map on spectra is closed by Lemmas \ref{lemma-going-up-closed} and \ref{lemma-integral-going-up}. The properties are preserved under base change by Lemmas \ref{lemma-radicial} and \ref{lemma-base-change-integral}. \end{proof} \begin{lemma} \label{lemma-radicial-integral-bijective} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ is integral, \item $\varphi$ induces an bijective map of spectra, \item $\varphi$ induces purely inseparable residue field extensions. \end{enumerate} Then $\varphi$ induces a homeomorphism on spectra and for any ring map $R \to R'$ properties (1), (2), (3) are true for $R' \to R' \otimes_R S$. \end{lemma} \begin{proof} Follows from Lemmas \ref{lemma-radicial-integral} and \ref{lemma-surjective-spec-radical-ideal}. \end{proof} \begin{lemma} \label{lemma-universally-bijective} Let $\varphi : R \to S$ be a ring map such that \begin{enumerate} \item the kernel of $\varphi$ is locally nilpotent, and \item $S$ is generated as an $R$-algebra by elements $x$ such that there exist $n > 0$ and a polynomial $P(T) \in R[T]$ whose image in $S[T]$ is $(T - x)^n$. \end{enumerate} Then $\Spec(S) \to \Spec(R)$ is a homeomorphism and $R \to S$ induces purely inseparable extensions of residue fields. Moreover, conditions (1) and (2) remain true on arbitrary base change. \end{lemma} \begin{proof} We may replace $R$ by $R/\Ker(\varphi)$, see Lemma \ref{lemma-surjective-locally-nilpotent-kernel}. Assumption (2) implies $S$ is generated over $R$ by elements which are integral over $R$. Hence $R \subset S$ is integral (Lemma \ref{lemma-integral-closure-is-ring}). In particular $\Spec(S) \to \Spec(R)$ is surjective and closed (Lemmas \ref{lemma-integral-overring-surjective}, \ref{lemma-going-up-closed}, and \ref{lemma-integral-going-up}). \medskip\noindent Let $x \in S$ be one of the generators in (2), i.e., there exists an $n > 0$ be such that $(T - x)^n \in R[T]$. Let $\mathfrak p \subset R$ be a prime. The $\kappa(\mathfrak p) \otimes_R S$ ring is nonzero by the above and Lemma \ref{lemma-in-image}. If the characteristic of $\kappa(\mathfrak p)$ is zero then we see that $nx \in R$ implies $1 \otimes x$ is in the image of $\kappa(\mathfrak p) \to \kappa(\mathfrak p) \otimes_R S$. Hence $\kappa(\mathfrak p) \to \kappa(\mathfrak p) \otimes_R S$ is an isomorphism. If the characteristic of $\kappa(\mathfrak p)$ is $p > 0$, then write $n = p^k m$ with $m$ prime to $p$. In $\kappa(\mathfrak p) \otimes_R S[T]$ we have $$ (T - 1 \otimes x)^n = ((T - 1 \otimes x)^{p^k})^m = (T^{p^k} - 1 \otimes x^{p^k})^m $$ and we see that $mx^{p^k} \in R$. This implies that $1 \otimes x^{p^k}$ is in the image of $\kappa(\mathfrak p) \to \kappa(\mathfrak p) \otimes_R S$. Hence Lemma \ref{lemma-p-ring-map} applies to $\kappa(\mathfrak p) \to \kappa(\mathfrak p) \otimes_R S$. In both cases we conclude that $\kappa(\mathfrak p) \otimes_R S$ has a unique prime ideal with residue field purely inseparable over $\kappa(\mathfrak p)$. By Remark \ref{remark-fundamental-diagram} we conclude that $\varphi$ is bijective on spectra. \medskip\noindent The statement on base change is immediate. \end{proof} \section{Geometrically irreducible algebras} \label{section-algebras-over-fields} % BEGIN ALGEBRA EDITORIAL ROUTE section-algebras-over-fields \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-algebras-over-fields}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-algebras-over-fields \noindent An algebra $S$ over a field $k$ is geometrically irreducible if the algebra $S \otimes_k k'$ has a unique minimal prime for every field extension $k'/k$. In this section we develop a bit of theory relevant to this notion. \begin{lemma} \label{lemma-flat-fibres-irreducible} Let $R \to S$ be a ring map. Assume \begin{enumerate} \item[(a)] $\Spec(R)$ is irreducible, \item[(b)] $R \to S$ is flat, \item[(c)] $R \to S$ is of finite presentation, \item[(d)] the fibre rings $S \otimes_R \kappa(\mathfrak p)$ have irreducible spectra for a dense collection of primes $\mathfrak p$ of $R$. \end{enumerate} Then $\Spec(S)$ is irreducible. This is true more generally with (b) $+$ (c) replaced by ``the map $\Spec(S) \to \Spec(R)$ is open''. \end{lemma} \begin{proof} The assumptions (b) and (c) imply that the map on spectra is open, see Proposition \ref{proposition-fppf-open}. Hence the lemma follows from Topology, Lemma \ref{topology-lemma-irreducible-on-top}. \end{proof} \begin{lemma} \label{lemma-separably-closed-irreducible} Let $k$ be a separably closed field. Let $R$, $S$ be $k$-algebras. If $R$, $S$ have a unique minimal prime, so does $R \otimes_k S$. \end{lemma} \begin{proof} Let $k \subset \overline{k}$ be a perfect closure, see Definition \ref{definition-perfection}. By assumption $\overline{k}$ is algebraically closed. The ring maps $R \to R \otimes_k \overline{k}$ and $S \to S \otimes_k \overline{k}$ and $R \otimes_k S \to (R \otimes_k S) \otimes_k \overline{k} = (R \otimes_k \overline{k}) \otimes_{\overline{k}} (S \otimes_k \overline{k})$ satisfy the assumptions of Lemma \ref{lemma-p-ring-map}. Hence we may assume $k$ is algebraically closed. \medskip\noindent We may replace $R$ and $S$ by their reductions. Hence we may assume that $R$ and $S$ are domains. By Lemma \ref{lemma-perfect-reduced} we see that $R \otimes_k S$ is reduced. Hence its spectrum is reducible if and only if it contains a nonzero zerodivisor. By Lemma \ref{lemma-limit-argument} we reduce to the case where $R$ and $S$ are domains of finite type over $k$ algebraically closed. \medskip\noindent Note that the ring map $R \to R \otimes_k S$ is of finite presentation and flat. Moreover, for every maximal ideal $\mathfrak m$ of $R$ we have $(R \otimes_k S) \otimes_R R/\mathfrak m \cong S$ because $k \cong R/\mathfrak m$ by the Hilbert Nullstellensatz Theorem \ref{theorem-nullstellensatz}. Moreover, the set of maximal ideals is dense in the spectrum of $R$ since $\Spec(R)$ is Jacobson, see Lemma \ref{lemma-finite-type-field-Jacobson}. Hence we see that Lemma \ref{lemma-flat-fibres-irreducible} applies to the ring map $R \to R \otimes_k S$ and we conclude that the spectrum of $R \otimes_k S$ is irreducible as desired. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible} Let $k$ be a field. Let $R$ be a $k$-algebra. The following are equivalent \begin{enumerate} \item for every field extension $k'/k$ the spectrum of $R \otimes_k k'$ is irreducible, \item for every finite separable field extension $k'/k$ the spectrum of $R \otimes_k k'$ is irreducible, \item the spectrum of $R \otimes_k \overline{k}$ is irreducible where $\overline{k}$ is the separable algebraic closure of $k$, and \item the spectrum of $R \otimes_k \overline{k}$ is irreducible where $\overline{k}$ is the algebraic closure of $k$. \end{enumerate} \end{lemma} \begin{proof} It is clear that (1) implies (2). \medskip\noindent Assume (2) and let $\overline{k}$ is the separable algebraic closure of $k$. Suppose $\mathfrak q_i \subset R \otimes_k \overline{k}$, $i = 1, 2$ are two minimal prime ideals. For every finite subextension $\overline{k}/k'/k$ the extension $k'/k$ is separable and the ring map $R \otimes_k k' \to R \otimes_k \overline{k}$ is flat. Hence $\mathfrak p_i = (R \otimes_k k') \cap \mathfrak q_i$ are minimal prime ideals (as we have going down for flat ring maps by Lemma \ref{lemma-flat-going-down}). Thus we see that $\mathfrak p_1 = \mathfrak p_2$ by assumption (2). Since $\overline{k} = \bigcup k'$ we conclude $\mathfrak q_1 = \mathfrak q_2$. Hence $\Spec(R \otimes_k \overline{k})$ is irreducible. \medskip\noindent Assume (3) and let $\overline{k}$ be the algebraic closure of $k$. Let $\overline{k}/\overline{k}'/k$ be the corresponding separable algebraic closure of $k$. Then $\overline{k}/\overline{k}'$ is purely inseparable (in positive characteristic) or trivial. Hence $R \otimes_k \overline{k}' \to R \otimes_k \overline{k}$ induces a homeomorphism on spectra, for example by Lemma \ref{lemma-p-ring-map}. Thus we have (4). \medskip\noindent Assume (4). Let $k'/k$ be an arbitrary field extension and let $\overline{k}$ be the algebraic closure of $k$. We may choose a field $F$ such that both $k'$ and $\overline{k}$ are isomorphic to subfields of $F$. Then $$ R \otimes_k F = (R \otimes_k \overline{k}) \otimes_{\overline{k}} F $$ and hence we see from Lemma \ref{lemma-separably-closed-irreducible} that $R \otimes_k F$ has a unique minimal prime. Finally, the ring map $R \otimes_k k' \to R \otimes_k F$ is flat and injective and hence any minimal prime of $R \otimes_k k'$ is the image of a minimal prime of $R \otimes_k F$ (by Lemma \ref{lemma-injective-minimal-primes-in-image} and going down). We conclude that there is only one such minimal prime and the proof is complete. \end{proof} \begin{definition} \label{definition-geometrically-irreducible} Let $k$ be a field. Let $S$ be a $k$-algebra. We say $S$ is {\it geometrically irreducible over $k$} if for every field extension $k'/k$ the spectrum of $S \otimes_k k'$ is irreducible\footnote{An irreducible space is nonempty.}. \end{definition} \noindent By Lemma \ref{lemma-geometrically-irreducible} it suffices to check this for finite separable field extensions $k'/k$ or for $k'$ equal to the separable algebraic closure of $k$. \begin{lemma} \label{lemma-separably-closed-irreducible-implies-geometric} Let $k$ be a field. Let $R$ be a $k$-algebra. If $k$ is separably algebraically closed then $R$ is geometrically irreducible over $k$ if and only if the spectrum of $R$ is irreducible. \end{lemma} \begin{proof} Immediate from the remark following Definition \ref{definition-geometrically-irreducible}. \end{proof} \begin{lemma} \label{lemma-subalgebra-geometrically-irreducible} Let $k$ be a field. Let $S$ be a $k$-algebra. \begin{enumerate} \item If $S$ is geometrically irreducible over $k$ so is every $k$-subalgebra. \item If all finitely generated $k$-subalgebras of $S$ are geometrically irreducible, then $S$ is geometrically irreducible. \item A directed colimit of geometrically irreducible $k$-algebras is geometrically irreducible. \end{enumerate} \end{lemma} \begin{proof} Let $S' \subset S$ be a subalgebra. Then for any extension $k'/k$ the ring map $S' \otimes_k k' \to S \otimes_k k'$ is injective also. Hence (1) follows from Lemma \ref{lemma-injective-minimal-primes-in-image} (and the fact that the image of an irreducible space under a continuous map is irreducible). The second and third property follow from the fact that tensor product commutes with colimits. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible-any-base-change} Let $k$ be a field. Let $S$ be a geometrically irreducible $k$-algebra. Let $R$ be any $k$-algebra. The map $$ \Spec(R \otimes_k S) \longrightarrow \Spec(R) $$ induces a bijection on irreducible components. \end{lemma} \begin{proof} Recall that irreducible components correspond to minimal primes (Lemma \ref{lemma-irreducible}). As $R \to R \otimes_k S$ is flat we see by going down (Lemma \ref{lemma-flat-going-down}) that any minimal prime of $R \otimes_k S$ lies over a minimal prime of $R$. Conversely, if $\mathfrak p \subset R$ is a (minimal) prime then $$ R \otimes_k S/\mathfrak p(R \otimes_k S) = (R/\mathfrak p) \otimes_k S \subset \kappa(\mathfrak p) \otimes_k S $$ by flatness of $R \to R \otimes_k S$. The ring $\kappa(\mathfrak p) \otimes_k S$ has irreducible spectrum by assumption. It follows that $R \otimes_k S/\mathfrak p(R \otimes_k S)$ has a single minimal prime (Lemma \ref{lemma-injective-minimal-primes-in-image}). In other words, the inverse image of the irreducible set $V(\mathfrak p)$ is irreducible. Hence the lemma follows. \end{proof} \noindent Let us make some remarks on the notion of geometrically irreducible field extensions. \begin{lemma} \label{lemma-field-extension-geometrically-irreducible} Let $K/k$ be a field extension. If $k$ is algebraically closed in $K$, then $K$ is geometrically irreducible over $k$. \end{lemma} \begin{proof} Assume $k$ is algebraically closed in $K$. By Definition \ref{definition-geometrically-irreducible} and Lemma \ref{lemma-geometrically-irreducible} it suffices to show that the spectrum of $K \otimes_k k'$ is irreducible for every finite separable extension $k'/k$. Say $k'$ is generated by $\alpha \in k'$ over $k$, see Fields, Lemma \ref{fields-lemma-primitive-element}. Let $P = T^d + a_1 T^{d - 1} + \ldots + a_d \in k[T]$ be the minimal polynomial of $\alpha$. Then $K \otimes_k k' \cong K[T]/(P)$. The only way the spectrum of $K[T]/(P)$ can be reducible is if $P$ is reducible in $K[T]$. Assume $P = P_1 P_2$ is a nontrivial factorization in $K[T]$ to get a contradiction. By Lemma \ref{lemma-polynomials-divide} we see that the coefficients of $P_1$ and $P_2$ are algebraic over $k$. Our assumption implies the coefficients of $P_1$ and $P_2$ are in $k$ which contradicts the fact that $P$ is irreducible over $k$. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible-transitive} Let $K/k$ be a geometrically irreducible field extension. Let $S$ be a geometrically irreducible $K$-algebra. Then $S$ is geometrically irreducible over $k$. \end{lemma} \begin{proof} By Definition \ref{definition-geometrically-irreducible} and Lemma \ref{lemma-geometrically-irreducible} it suffices to show that the spectrum of $S \otimes_k k'$ is irreducible for every finite separable extension $k'/k$. Since $K$ is geometrically irreducible over $k$ we see that $K' = K \otimes_k k'$ is a finite, separable field extension of $K$. Hence the spectrum of $S \otimes_k k' = S \otimes_K K'$ is irreducible as $S$ is assumed geometrically irreducible over $K$. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible-base-change-transcendental} Let $K/k$ be a field extension. The following are equivalent \begin{enumerate} \item $K$ is geometrically irreducible over $k$, and \item the induced extension $K(t)/k(t)$ of purely transcendental extensions is geometrically irreducible. \end{enumerate} \end{lemma} \begin{proof} Assume (1). Denote $\Omega$ an algebraic closure of $k(t)$. By Definition \ref{definition-geometrically-irreducible} we find that the spectrum of $$ K \otimes_k \Omega = K \otimes_k k(t) \otimes_{k(t)} \Omega $$ is irreducible. Since $K(t)$ is a localization of $K \otimes_k k(T)$ we conclude that the spectrum of $K(t) \otimes_{k(t)} \Omega$ is irreducible. Thus by Lemma \ref{lemma-geometrically-irreducible} we find that $K(t)/k(t)$ is geometrically irreducible. \medskip\noindent Assume (2). Let $k'/k$ be a field extension. We have to show that $K \otimes_k k'$ has a unique minimal prime. We know that the spectrum of $$ K(t) \otimes_{k(t)} k'(t) $$ is irreducible, i.e., has a unique minimal prime. Since there is an injective map $K \otimes_k k' \to K(t) \otimes_{k(t)} k'(t)$ (details omitted) we conclude by Lemmas \ref{lemma-injective-minimal-primes-in-image} and \ref{lemma-minimal-prime-image-minimal-prime}. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible-add-transcendental} Let $K/L/M$ be a tower of fields with $L/M$ geometrically irreducible. Let $x \in K$ be transcendental over $L$. Then $L(x)/M(x)$ is geometrically irreducible. \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-geometrically-irreducible-base-change-transcendental} because the fields $L(x)$ and $M(x)$ are purely transcendental extensions of $L$ and $M$. \end{proof} \begin{lemma} \label{lemma-geometrically-irreducible-separable-elements} Let $K/k$ be a field extension. The following are equivalent \begin{enumerate} \item $K/k$ is geometrically irreducible, and \item every element $\alpha \in K$ separably algebraic over $k$ is in $k$. \end{enumerate} \end{lemma} \begin{proof} Assume (1) and let $\alpha \in K$ be separably algebraic over $k$. Then $k' = k(\alpha)$ is a finite separable extension of $k$ contained in $K$. By Lemma \ref{lemma-subalgebra-geometrically-irreducible} the extension $k'/k$ is geometrically irreducible. In particular, we see that the spectrum of $k' \otimes_k \overline{k}$ is irreducible (and hence if it is a product of fields, then there is exactly one factor). By Fields, Lemma \ref{fields-lemma-finite-separable-tensor-alg-closed} it follows that $\Hom_k(k', \overline{k})$ has one element which in turn implies that $k' = k$ by Fields, Lemma \ref{fields-lemma-separable-equality}. Thus (2) holds. \medskip\noindent Assume (2). Let $k' \subset K$ be the subfield consisting of elements algebraic over $k$. By Lemma \ref{lemma-field-extension-geometrically-irreducible} the extension $K/k'$ is geometrically irreducible. By assumption $k'/k$ is a purely inseparable extension. By Lemma \ref{lemma-p-ring-map} the extension $k'/k$ is geometrically irreducible. Hence by Lemma \ref{lemma-geometrically-irreducible-transitive} we see that $K/k$ is geometrically irreducible. \end{proof} \begin{lemma} \label{lemma-make-geometrically-irreducible} Let $K/k$ be a field extension. Consider the subextension $K/k'/k$ consisting of elements separably algebraic over $k$. Then $K$ is geometrically irreducible over $k'$. If $K/k$ is a finitely generated field extension, then $[k' : k] < \infty$. \end{lemma} \begin{proof} The first statement is immediate from Lemma \ref{lemma-geometrically-irreducible-separable-elements} and the fact that elements separably algebraic over $k'$ are in $k'$ by the transitivity of separable algebraic extensions, see Fields, Lemma \ref{fields-lemma-separable-permanence}. If $K/k$ is finitely generated, then $k'$ is finite over $k$ by Fields, Lemma \ref{fields-lemma-algebraic-closure-in-finitely-generated}. \end{proof} \begin{lemma} \label{lemma-Galois-orbit} Let $K/k$ be an extension of fields. Let $\overline{k}/k$ be a separable algebraic closure. Then $\text{Gal}(\overline{k}/k)$ acts transitively on the primes of $\overline{k} \otimes_k K$. \end{lemma} \begin{proof} Let $K/k'/k$ be the subextension found in Lemma \ref{lemma-make-geometrically-irreducible}. Note that as $k \subset \overline{k}$ is integral all the prime ideals of $\overline{k} \otimes_k K$ and $\overline{k} \otimes_k k'$ are maximal, see Lemma \ref{lemma-integral-no-inclusion}. By Lemma \ref{lemma-geometrically-irreducible-any-base-change} the map $$ \Spec(\overline{k} \otimes_k K) \to \Spec(\overline{k} \otimes_k k') $$ is bijective because (1) all primes are minimal primes, (2) $\overline{k} \otimes_k K = (\overline{k} \otimes_k k') \otimes_{k'} K$, and (3) $K$ is geometrically irreducible over $k'$. Hence it suffices to prove the lemma for the action of $\text{Gal}(\overline{k}/k)$ on the primes of $\overline{k} \otimes_k k'$. \medskip\noindent As every prime of $\overline{k} \otimes_k k'$ is maximal, the residue fields are isomorphic to $\overline{k}$. Hence the prime ideals of $\overline{k} \otimes_k k'$ correspond one to one to elements of $\Hom_k(k', \overline{k})$ with $\sigma \in \Hom_k(k', \overline{k})$ corresponding to the kernel $\mathfrak p_\sigma$ of $1 \otimes \sigma : \overline{k} \otimes_k k' \to \overline{k}$. In particular $\text{Gal}(\overline{k}/k)$ acts transitively on this set as desired. \end{proof} \section{Geometrically connected algebras} \label{section-geometrically-connected} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-connected \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-connected}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-connected \begin{lemma} \label{lemma-separably-closed-connected} Let $k$ be a separably closed field. Let $R$, $S$ be $k$-algebras. If $\Spec(R)$, and $\Spec(S)$ are connected, then so is $\Spec(R \otimes_k S)$. \end{lemma} \begin{proof} Recall that $\Spec(R)$ is connected if and only if $R$ has no nontrivial idempotents, see Lemma \ref{lemma-characterize-spec-connected}. Hence, by Lemma \ref{lemma-limit-argument} we may assume $R$ and $S$ are of finite type over $k$. In this case $R$ and $S$ are Noetherian, and have finitely many minimal primes, see Lemma \ref{lemma-Noetherian-irreducible-components}. Thus we may argue by induction on $n + m$ where $n$, resp.\ $m$ is the number of irreducible components of $\Spec(R)$, resp.\ $\Spec(S)$. Of course the case where either $n$ or $m$ is zero is trivial. If $n = m = 1$, i.e., $\Spec(R)$ and $\Spec(S)$ both have one irreducible component, then the result holds by Lemma \ref{lemma-separably-closed-irreducible}. Suppose that $n > 1$. Let $\mathfrak p \subset R$ be a minimal prime corresponding to the irreducible closed subset $T \subset \Spec(R)$. Let $T' \subset \Spec(R)$ be the union of the other $n - 1$ irreducible components. Choose an ideal $I \subset R$ such that $T' = V(I) = \Spec(R/I)$ (Lemma \ref{lemma-spec-closed}). By choosing our minimal prime carefully we may in addition arrange it so that $T'$ is connected, see Topology, Lemma \ref{topology-lemma-remove-irreducible-connected}. Then $T \cup T' = \Spec(R)$ and $T \cap T' = V(\mathfrak p + I) = \Spec(R/(\mathfrak p + I))$ is not empty as $\Spec(R)$ is assumed connected. The inverse image of $T$ in $\Spec(R \otimes_k S)$ is $\Spec(R/\mathfrak p \otimes_k S)$, and the inverse of $T'$ in $\Spec(R \otimes_k S)$ is $\Spec(R/I \otimes_k S)$. By induction these are both connected. The inverse image of $T \cap T'$ is $\Spec(R/(\mathfrak p + I) \otimes_k S)$ which is nonempty. Hence $\Spec(R \otimes_k S)$ is connected. \end{proof} \begin{lemma} \label{lemma-geometrically-connected} Let $k$ be a field. Let $R$ be a $k$-algebra. The following are equivalent \begin{enumerate} \item for every field extension $k'/k$ the spectrum of $R \otimes_k k'$ is connected, and \item for every finite separable field extension $k'/k$ the spectrum of $R \otimes_k k'$ is connected. \end{enumerate} \end{lemma} \begin{proof} For any extension of fields $k'/k$ the connectivity of the spectrum of $R \otimes_k k'$ is equivalent to $R \otimes_k k'$ having no nontrivial idempotents, see Lemma \ref{lemma-characterize-spec-connected}. Assume (2). Let $k \subset \overline{k}$ be a separable algebraic closure of $k$. Using Lemma \ref{lemma-limit-argument} we see that (2) is equivalent to $R \otimes_k \overline{k}$ having no nontrivial idempotents. For any field extension $k'/k$, there exists a field extension $\overline{k}'/\overline{k}$ with $k' \subset \overline{k}'$. By Lemma \ref{lemma-separably-closed-connected} we see that $R \otimes_k \overline{k}'$ has no nontrivial idempotents. If $R \otimes_k k'$ has a nontrivial idempotent, then also $R \otimes_k \overline{k}'$, contradiction. \end{proof} \begin{definition} \label{definition-geometrically-connected} Let $k$ be a field. Let $S$ be a $k$-algebra. We say $S$ is {\it geometrically connected over $k$} if for every field extension $k'/k$ the spectrum of $S \otimes_k k'$ is connected. \end{definition} \noindent By Lemma \ref{lemma-geometrically-connected} it suffices to check this for finite separable field extensions $k'/k$. \begin{lemma} \label{lemma-separably-closed-connected-implies-geometric} Let $k$ be a field. Let $R$ be a $k$-algebra. If $k$ is separably closed then $R$ is geometrically connected over $k$ if and only if the spectrum of $R$ is connected. \end{lemma} \begin{proof} Immediate from the remark following Definition \ref{definition-geometrically-connected}. \end{proof} \begin{lemma} \label{lemma-subalgebra-geometrically-connected} Let $k$ be a field. Let $S$ be a $k$-algebra. \begin{enumerate} \item If $S$ is geometrically connected over $k$ so is every $k$-subalgebra. \item If all finitely generated $k$-subalgebras of $S$ are geometrically connected, then $S$ is geometrically connected. \item A directed colimit of geometrically connected $k$-algebras is geometrically connected. \end{enumerate} \end{lemma} \begin{proof} This follows from the characterization of connectedness in terms of the nonexistence of nontrivial idempotents. The second and third property follow from the fact that tensor product commutes with colimits. \end{proof} \noindent The following lemma will be superseded by the more general Varieties, Lemma \ref{varieties-lemma-bijection-connected-components}. \begin{lemma} \label{lemma-geometrically-connected-any-base-change} Let $k$ be a field. Let $S$ be a geometrically connected $k$-algebra. Let $R$ be any $k$-algebra. The map $$ R \longrightarrow R \otimes_k S $$ induces a bijection on idempotents, and the map $$ \Spec(R \otimes_k S) \longrightarrow \Spec(R) $$ induces a bijection on connected components. \end{lemma} \begin{proof} The second assertion follows from the first combined with Lemma \ref{lemma-connected-component}. By Lemmas \ref{lemma-subalgebra-geometrically-connected} and \ref{lemma-limit-argument} we may assume that $R$ and $S$ are of finite type over $k$. Then we see that also $R \otimes_k S$ is of finite type over $k$. Note that in this case all the rings are Noetherian and hence their spectra have finitely many connected components (since they have finitely many irreducible components, see Lemma \ref{lemma-Noetherian-irreducible-components}). In particular, all connected components in question are open! Hence via Lemma \ref{lemma-disjoint-implies-product} we see that the first statement of the lemma in this case is equivalent to the second. Let's prove this. As the algebra $S$ is geometrically connected and nonzero we see that all fibres of $X = \Spec(R \otimes_k S) \to \Spec(R) = Y$ are connected and nonempty. Also, as $R \to R \otimes_k S$ is flat of finite presentation the map $X \to Y$ is open (Proposition \ref{proposition-fppf-open}). Topology, Lemma \ref{topology-lemma-connected-fibres-connected-components} shows that $X \to Y$ induces bijection on connected components. \end{proof} \section{Geometrically integral algebras} \label{section-geometrically-integral} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-integral \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-integral}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-integral \noindent Here is the definition. \begin{definition} \label{definition-geometrically-integral} Let $k$ be a field. Let $S$ be a $k$-algebra. We say $S$ is {\it geometrically integral over $k$} if for every field extension $k'/k$ the ring $S \otimes_k k'$ is a domain. \end{definition} \noindent Any question about geometrically integral algebras can be translated into a question about geometrically reduced and irreducible algebras. \begin{lemma} \label{lemma-geometrically-integral} Let $k$ be a field. Let $S$ be a $k$-algebra. In this case $S$ is geometrically integral over $k$ if and only if $S$ is geometrically irreducible as well as geometrically reduced over $k$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-characterize-geometrically-integral} Let $k$ be a field. Let $S$ be a $k$-algebra. The following are equivalent \begin{enumerate} \item $S$ is geometrically integral over $k$, \item for every finite extension $k'/k$ of fields the ring $S \otimes_k k'$ is a domain, \item $S \otimes_k \overline{k}$ is a domain where $\overline{k}$ is the algebraic closure of $k$. \end{enumerate} \end{lemma} \begin{proof} Follows from Lemmas \ref{lemma-geometrically-integral}, \ref{lemma-geometrically-reduced-finite-purely-inseparable-extension}, and \ref{lemma-geometrically-irreducible}. \end{proof} \begin{lemma} \label{lemma-geometrically-integral-any-integral-base-change} Let $k$ be a field. Let $S$ be a geometrically integral $k$-algebra. Let $R$ be a $k$-algebra and an integral domain. Then $R \otimes_k S$ is an integral domain. \end{lemma} \begin{proof} By Lemma \ref{lemma-geometrically-reduced-any-reduced-base-change} the ring $R \otimes_k S$ is reduced and by Lemma \ref{lemma-geometrically-irreducible-any-base-change} the ring $R \otimes_k S$ is irreducible (the spectrum has just one irreducible component), so $R \otimes_k S$ is an integral domain. \end{proof} \section{Valuation rings} \label{section-valuation-rings} % BEGIN ALGEBRA EDITORIAL ROUTE section-valuation-rings \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-valuation-rings}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-valuation-rings \noindent Here are some definitions. \begin{definition} \label{definition-valuation-ring} Valuation rings. \begin{enumerate} \item Let $K$ be a field. Let $A$, $B$ be local rings contained in $K$. We say that $B$ {\it dominates} $A$ if $A \subset B$ and $\mathfrak m_A = A \cap \mathfrak m_B$. \item Let $A$ be a ring. We say $A$ is a {\it valuation ring} if $A$ is a local domain and if $A$ is maximal for the relation of domination among local rings contained in the fraction field of $A$. \item Let $A$ be a valuation ring with fraction field $K$. If $R \subset K$ is a subring of $K$, then we say $A$ is {\it centered} on $R$ if $R \subset A$. \end{enumerate} \end{definition} \noindent With this definition a field is a valuation ring. \begin{lemma} \label{lemma-dominate} Let $K$ be a field. Let $A \subset K$ be a local subring. Then there exists a valuation ring with fraction field $K$ dominating $A$. \end{lemma} \begin{proof} We consider the collection of local subrings of $K$ as a partially ordered set using the relation of domination. Suppose that $\{A_i\}_{i \in I}$ is a totally ordered collection of local subrings of $K$. Then $B = \bigcup A_i$ is a local subring which dominates all of the $A_i$. Hence by Zorn's Lemma, it suffices to show that if $A \subset K$ is a local ring whose fraction field is not $K$, then there exists a local ring $B \subset K$, $B \not = A$ dominating $A$. \medskip\noindent Pick $t \in K$ which is not in the fraction field of $A$. If $t$ is transcendental over $A$, then $A[t] \subset K$ and hence $A[t]_{(t, \mathfrak m)} \subset K$ is a local ring distinct from $A$ dominating $A$. Suppose $t$ is algebraic over $A$. Then for some nonzero $a \in A$ the element $at$ is integral over $A$. In this case the subring $A' \subset K$ generated by $A$ and $ta$ is finite over $A$. By Lemma \ref{lemma-integral-overring-surjective} there exists a prime ideal $\mathfrak m' \subset A'$ lying over $\mathfrak m$. Then $A'_{\mathfrak m'}$ dominates $A$. If $A = A'_{\mathfrak m'}$, then $t$ is in the fraction field of $A$ which we assumed not to be the case. Thus $A \not = A'_{\mathfrak m'}$ as desired. \end{proof} \begin{lemma} \label{lemma-valuation-ring-normal} Let $A$ be a valuation ring. Then $A$ is a normal domain. \end{lemma} \begin{proof} Suppose $x$ is in the field of fractions of $A$ and integral over $A$. Let $A'$ denote the subring of $K$ generated by $A$ and $x$. Since $A\subset A'$ is an integral extension, we see by Lemma \ref{lemma-integral-overring-surjective} that there is a prime ideal $\mathfrak m' \subset A'$ lying over $\mathfrak m$. Then $A'_{\mathfrak m'}$ dominates $A$. Since $A$ is a valuation ring we conclude that $A=A'_{\mathfrak m'}$ and therefore that $x\in A$. \end{proof} \begin{lemma} \label{lemma-valuation-ring-x-or-x-inverse} Let $A$ be a valuation ring with maximal ideal $\mathfrak m$ and fraction field $K$. Let $x \in K^*$. Then either $x \in A$ or $x^{-1} \in A$ or both. \end{lemma} \begin{proof} Assume that $x$ is not in $A$. Let $A'$ denote the subring of $K$ generated by $A$ and $x$. Since $A$ is a valuation ring we see that there is no prime of $A'$ lying over $\mathfrak m$. Since $\mathfrak m$ is maximal we see that $V(\mathfrak m A') = \emptyset$. Then $\mathfrak m A' = A'$ by Lemma \ref{lemma-Zariski-topology}. Hence we can write $1 = \sum_{i = 0}^d t_i x^i$ with $t_i \in \mathfrak m$. This implies that $(1 - t_0) (x^{-1})^d - \sum t_i (x^{-1})^{d - i} = 0$. In particular we see that $x^{-1}$ is integral over $A$, and hence $x^{-1} \in A$ by Lemma \ref{lemma-valuation-ring-normal}. \end{proof} \begin{lemma} \label{lemma-x-or-x-inverse-valuation-ring} Let $A \subset K$ be a subring of a field $K$ such that for all $x \in K$ either $x \in A$ or $x^{-1} \in A$ or both. Then $A$ is a valuation ring with fraction field $K$. \end{lemma} \begin{proof} If $A$ is not $K$, then $A$ is not a field and there is a nonzero maximal ideal $\mathfrak m$. If $\mathfrak m'$ is a second maximal ideal, then choose $x, y \in A$ with $x \in \mathfrak m$, $y \not \in \mathfrak m$, $x \not \in \mathfrak m'$, and $y \in \mathfrak m'$. Then neither $x/y \in A$ nor $y/x \in A$ contradicting the assumption of the lemma. Thus we see that $A$ is a local ring. Suppose that $A'$ is a local ring contained in $K$ which dominates $A$. Let $x \in A'$. We have to show that $x \in A$. If not, then $x^{-1} \in A$, and of course $x^{-1} \in \mathfrak m_A$. But then $x^{-1} \in \mathfrak m_{A'}$ which contradicts $x \in A'$. \end{proof} \begin{lemma} \label{lemma-colimit-valuation-rings} \begin{slogan} Valuation rings are stable under filtered direct limits \end{slogan} Let $I$ be a directed set. Let $(A_i, \varphi_{ij})$ be a system of valuation rings over $I$. Then $A = \colim A_i$ is a valuation ring. \end{lemma} \begin{proof} It is clear that $A$ is a domain. Let $a, b \in A$. Lemma \ref{lemma-x-or-x-inverse-valuation-ring} tells us we have to show that either $a | b$ or $b | a$ in $A$. Choose $i$ so large that there exist $a_i, b_i \in A_i$ mapping to $a, b$. Then Lemma \ref{lemma-valuation-ring-x-or-x-inverse} applied to $a_i, b_i$ in $A_i$ implies the result for $a, b$ in $A$. \end{proof} \begin{lemma} \label{lemma-valuation-ring-cap-field} Let $L/K$ be an extension of fields. If $B \subset L$ is a valuation ring, then $A = K \cap B$ is a valuation ring. \end{lemma} \begin{proof} We can replace $L$ by the fraction field $F$ of $B$ and $K$ by $K \cap F$. Then the lemma follows from a combination of Lemmas \ref{lemma-valuation-ring-x-or-x-inverse} and \ref{lemma-x-or-x-inverse-valuation-ring}. \end{proof} \begin{lemma} \label{lemma-valuation-ring-cap-field-finite} Let $L/K$ be an algebraic extension of fields. If $B \subset L$ is a valuation ring with fraction field $L$ and not a field, then $A = K \cap B$ is a valuation ring and not a field. \end{lemma} \begin{proof} By Lemma \ref{lemma-valuation-ring-cap-field} the ring $A$ is a valuation ring. If $A$ is a field, then $A = K$. Then $A = K \subset B$ is an integral extension, hence there are no proper inclusions among the primes of $B$ (Lemma \ref{lemma-integral-no-inclusion}). This contradicts the assumption that $B$ is a local domain and not a field. \end{proof} \begin{lemma} \label{lemma-make-valuation-rings} Let $A$ be a valuation ring. For any prime ideal $\mathfrak p \subset A$ the quotient $A/\mathfrak p$ is a valuation ring. The same is true for the localization $A_\mathfrak p$ and in fact any nonzero localization of $A$. \end{lemma} \begin{proof} Use the characterization of valuation rings given in Lemma \ref{lemma-x-or-x-inverse-valuation-ring}. \end{proof} \begin{lemma} \label{lemma-stack-valuation-rings} Let $A'$ be a valuation ring with residue field $K$. Let $A$ be a valuation ring with fraction field $K$. Then $C = \{\lambda \in A' \mid \lambda \bmod \mathfrak m_{A'} \in A\}$ is a valuation ring. \end{lemma} \begin{proof} Note that $\mathfrak m_{A'} \subset C$ and $C/\mathfrak m_{A'} = A$. In particular, the fraction field of $C$ is equal to the fraction field of $A'$. We will use the criterion of Lemma \ref{lemma-x-or-x-inverse-valuation-ring} to prove the lemma. Let $x$ be an element of the fraction field of $C$. By the lemma we may assume $x \in A'$. If $x \in \mathfrak m_{A'}$, then we see $x \in C$. If not, then $x$ is a unit of $A'$ and we also have $x^{-1} \in A'$. Hence either $x$ or $x^{-1}$ maps to an element of $A$ by the lemma again. \end{proof} \begin{lemma} \label{lemma-find-valuation-rings} Let $A$ be a normal domain with fraction field $K$. \begin{enumerate} \item For every $x \in K$, $x \not \in A$ there exists a valuation ring $A \subset V \subset K$ with fraction field $K$ such that $x \not \in V$. \item If $A$ is local, we can moreover choose $V$ which dominates $A$. \end{enumerate} In other words, $A$ is the intersection of all valuation rings in $K$ containing $A$ and if $A$ is local, then $A$ is the intersection of all valuation rings in $K$ dominating $A$. \end{lemma} \begin{proof} Suppose $x \in K$, $x \not \in A$. Consider $B = A[x^{-1}]$. Then $x \not \in B$. Namely, if $x = a_0 + a_1x^{-1} + \ldots + a_d x^{-d}$ then $x^{d + 1} - a_0x^d - \ldots - a_d = 0$ and $x$ is integral over $A$ in contradiction with the fact that $A$ is normal. Thus $x^{-1}$ is not a unit in $B$. Thus $V(x^{-1}) \subset \Spec(B)$ is not empty (Lemma \ref{lemma-Zariski-topology}), and we can choose a prime $\mathfrak p \subset B$ with $x^{-1} \in \mathfrak p$. Choose a valuation ring $V \subset K$ dominating $B_\mathfrak p$ (Lemma \ref{lemma-dominate}). Then $x \not \in V$ as $x^{-1} \in \mathfrak m_V$. \medskip\noindent If $A$ is local, then we claim that $x^{-1} B + \mathfrak m_A B \not = B$. Namely, if $1 = (a_0 + a_1x^{-1} + \ldots + a_d x^{-d})x^{-1} + a'_0 + \ldots + a'_d x^{-d}$ with $a_i \in A$ and $a'_i \in \mathfrak m_A$, then we'd get $$ (1 - a'_0) x^{d + 1} - (a_0 + a'_1) x^d - \ldots - a_d = 0 $$ Since $a'_0 \in \mathfrak m_A$ we see that $1 - a'_0$ is a unit in $A$ and we conclude that $x$ would be integral over $A$, a contradiction as before. Then choose the prime $\mathfrak p \supset x^{-1} B + \mathfrak m_A B$ we find $V$ dominating $A$. \end{proof} \noindent A {\it totally ordered abelian group} is a pair $(\Gamma, \geq)$ consisting of an abelian group $\Gamma$ endowed with a total ordering $\geq$ such that $\gamma \geq \gamma' \Rightarrow \gamma + \gamma'' \geq \gamma' + \gamma''$ for all $\gamma, \gamma', \gamma'' \in \Gamma$. \begin{lemma} \label{lemma-valuation-group} Let $A$ be a valuation ring with field of fractions $K$. Set $\Gamma = K^*/A^*$ (with group law written additively). For $\gamma, \gamma' \in \Gamma$ define $\gamma \geq \gamma'$ if and only if $\gamma - \gamma'$ is in the image of $A - \{0\} \to \Gamma$. Then $(\Gamma, \geq)$ is a totally ordered abelian group. \end{lemma} \begin{proof} Omitted, but follows easily from Lemma \ref{lemma-valuation-ring-x-or-x-inverse}. Note that in case $A = K$ we obtain the zero group $\Gamma = \{0\}$ endowed with its unique total ordering. \end{proof} \begin{definition} \label{definition-value-group} Let $A$ be a valuation ring. \begin{enumerate} \item The totally ordered abelian group $(\Gamma, \geq)$ of Lemma \ref{lemma-valuation-group} is called the {\it value group} of the valuation ring $A$. \item The map $v : A - \{0\} \to \Gamma$ and also $v : K^* \to \Gamma$ is called the {\it valuation} associated to $A$. \item The valuation ring $A$ is called a {\it discrete valuation ring} if $\Gamma \cong \mathbf{Z}$. \end{enumerate} \end{definition} \noindent Note that if $\Gamma \cong \mathbf{Z}$ then there is a unique such isomorphism such that $1 \geq 0$. If the isomorphism is chosen in this way, then the ordering becomes the usual ordering of the integers. \begin{lemma} \label{lemma-properties-valuation} Let $A$ be a valuation ring. The valuation $v : A -\{0\} \to \Gamma_{\geq 0}$ has the following properties: \begin{enumerate} \item $v(a) = 0 \Leftrightarrow a \in A^*$, \item $v(ab) = v(a) + v(b)$, \item $v(a + b) \geq \min(v(a), v(b))$ provided $a + b \not = 0$. \end{enumerate} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-characterize-valuation-ring} Let $A$ be a ring. The following are equivalent \begin{enumerate} \item $A$ is a valuation ring, \item $A$ is a local domain and every finitely generated ideal of $A$ is principal. \end{enumerate} \end{lemma} \begin{proof} Assume $A$ is a valuation ring and let $f_1, \ldots, f_n \in A$. Choose $i$ such that $v(f_i)$ is minimal among $v(f_j)$. Then $(f_i) = (f_1, \ldots, f_n)$. Conversely, assume $A$ is a local domain and every finitely generated ideal of $A$ is principal. Pick $f, g \in A$ and write $(f, g) = (h)$. Then $f = ah$ and $g = bh$ and $h = cf + dg$ for some $a, b, c, d \in A$. Thus $ac + bd = 1$ and we see that either $a$ or $b$ is a unit, i.e., either $g/f$ or $f/g$ is an element of $A$. This shows $A$ is a valuation ring by Lemma \ref{lemma-x-or-x-inverse-valuation-ring}. \end{proof} \begin{lemma} \label{lemma-valuation-valuation-ring} Let $(\Gamma, \geq)$ be a totally ordered abelian group. Let $K$ be a field. Let $v : K^* \to \Gamma$ be a homomorphism of abelian groups such that $v(a + b) \geq \min(v(a), v(b))$ for $a, b \in K$ with $a, b, a + b$ not zero. Then $$ A = \{ x \in K \mid x = 0 \text{ or } v(x) \geq 0 \} $$ is a valuation ring with value group $\Im(v) \subset \Gamma$, with maximal ideal $$ \mathfrak m = \{ x \in K \mid x = 0 \text{ or } v(x) > 0 \} $$ and with group of units $$ A^* = \{ x \in K^* \mid v(x) = 0 \}. $$ \end{lemma} \begin{proof} Omitted. \end{proof} \noindent Let $(\Gamma, \geq)$ be a totally ordered abelian group. An {\it ideal of $\Gamma$} is a subset $I \subset \Gamma$ such that all elements of $I$ are $\geq 0$ and $\gamma \in I$, $\gamma' \geq \gamma$ implies $\gamma' \in I$. We say that such an ideal is {\it prime} if $0 \not \in I$ and if $\gamma + \gamma' \in I, \gamma, \gamma' \geq 0 \Rightarrow \gamma \in I \text{ or } \gamma' \in I$. \begin{lemma} \label{lemma-ideals-valuation-ring} Let $A$ be a valuation ring. Ideals in $A$ correspond $1 - 1$ with ideals of $\Gamma$. This bijection is inclusion preserving, and maps prime ideals to prime ideals. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-valuation-ring-Noetherian-discrete} A valuation ring is Noetherian if and only if it is a discrete valuation ring or a field. \end{lemma} \begin{proof} Suppose $A$ is a discrete valuation ring with valuation $v : A \setminus \{0\} \to \mathbf{Z}$ normalized so that $\Im(v) = \mathbf{Z}_{\geq 0}$. By Lemma \ref{lemma-ideals-valuation-ring} the ideals of $A$ are the subsets $I_n = \{0\} \cup v^{-1}(\mathbf{Z}_{\geq n})$. It is clear that any element $x \in A$ with $v(x) = n$ generates $I_n$. Hence $A$ is a PID so certainly Noetherian. \medskip\noindent Suppose $A$ is a Noetherian valuation ring with value group $\Gamma$. By Lemma \ref{lemma-ideals-valuation-ring} we see the ascending chain condition holds for ideals in $\Gamma$. We may assume $A$ is not a field, i.e., there is a $\gamma \in \Gamma$ with $\gamma > 0$. Applying the ascending chain condition to the subsets $\gamma + \Gamma_{\geq 0}$ with $\gamma > 0$ we see there exists a smallest element $\gamma_0$ which is bigger than $0$. Let $\gamma \in \Gamma$ be an element $\gamma > 0$. Consider the sequence of elements $\gamma$, $\gamma - \gamma_0$, $\gamma - 2\gamma_0$, etc. By the ascending chain condition these cannot all be $> 0$. Let $\gamma - n \gamma_0$ be the last one $\geq 0$. By minimality of $\gamma_0$ we see that $0 = \gamma - n \gamma_0$. Hence $\Gamma$ is a cyclic group as desired. \end{proof} \section{More Noetherian rings} \label{section-Noetherian-again} % BEGIN ALGEBRA EDITORIAL ROUTE section-Noetherian-again \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Noetherian-again}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Noetherian-again \begin{lemma} \label{lemma-Noetherian-basic} Let $R$ be a Noetherian ring. Any finite $R$-module is of finite presentation. Any submodule of a finite $R$-module is finite. The ascending chain condition holds for $R$-submodules of a finite $R$-module. \end{lemma} \begin{proof} We first show that any submodule $N$ of a finite $R$-module $M$ is finite. We do this by induction on the number of generators of $M$. If this number is $1$, then $N = J/I \subset M = R/I$ for some ideals $I \subset J \subset R$. Thus the definition of Noetherian implies the result. If the number of generators of $M$ is greater than $1$, then we can find a short exact sequence $0 \to M' \to M \to M'' \to 0$ where $M'$ and $M''$ have fewer generators. Note that setting $N' = M' \cap N$ and $N'' = \Im(N \to M'')$ gives a similar short exact sequence for $N$. Hence the result follows from the induction hypothesis since the number of generators of $N$ is at most the number of generators of $N'$ plus the number of generators of $N''$. \medskip\noindent To show that $M$ is finitely presented just apply the previous result to the kernel of a presentation $R^n \to M$. \medskip\noindent It is well known and easy to prove that the ascending chain condition for $R$-submodules of $M$ is equivalent to the condition that every submodule of $M$ is a finite $R$-module. We omit the proof. \end{proof} \begin{lemma}[Artin-Rees] \label{lemma-Artin-Rees} Suppose that $R$ is Noetherian. Let $I \subset R$ be an ideal. Let $N \subset M$ be finite $R$-modules. There exists a constant $c > 0$ such that $I^n M \cap N = I^{n-c}(I^cM \cap N)$ for all $n \geq c$. \end{lemma} \begin{proof} Consider the ring $S = R \oplus I \oplus I^2 \oplus \ldots = \bigoplus_{n \geq 0} I^n$. Convention: $I^0 = R$. Multiplication maps $I^n \times I^m$ into $I^{n + m}$ by multiplication in $R$. Note that if $I = (f_1, \ldots, f_t)$ then $S$ is a quotient of the Noetherian ring $R[X_1, \ldots, X_t]$. The map just sends the monomial $X_1^{e_1}\ldots X_t^{e_t}$ to $f_1^{e_1}\ldots f_t^{e_t}$. Thus $S$ is Noetherian. Similarly, consider the module $M \oplus IM \oplus I^2M \oplus \ldots = \bigoplus_{n \geq 0} I^nM$. This is a finitely generated $S$-module. Namely, if $x_1, \ldots, x_r$ generate $M$ over $R$, then they also generate $\bigoplus_{n \geq 0} I^nM$ over $S$. Next, consider the submodule $\bigoplus_{n \geq 0} I^nM \cap N$. This is an $S$-submodule, as is easily verified. By Lemma \ref{lemma-Noetherian-basic} it is finitely generated as an $S$-module, say by $\xi_j \in \bigoplus_{n \geq 0} I^nM \cap N$, $j = 1, \ldots, s$. We may assume by decomposing each $\xi_j$ into its homogeneous pieces that each $\xi_j \in I^{d_j}M \cap N$ for some $d_j$. Set $c = \max\{d_j\}$. Then for all $n \geq c$ every element in $I^nM \cap N$ is of the form $\sum h_j \xi_j$ with $h_j \in I^{n - d_j}$. The lemma now follows from this and the trivial observation that $I^{n-d_j}(I^{d_j}M \cap N) \subset I^{n-c}(I^cM \cap N)$. \end{proof} \begin{lemma} \label{lemma-map-AR} Suppose that $0 \to K \to M \xrightarrow{f} N$ is an exact sequence of finitely generated modules over a Noetherian ring $R$. Let $I \subset R$ be an ideal. Then there exists a $c$ such that $$ f^{-1}(I^nN) = K + I^{n-c}f^{-1}(I^cN) \quad\text{and}\quad f(M) \cap I^nN \subset f(I^{n - c}M) $$ for all $n \geq c$. \end{lemma} \begin{proof} Apply Lemma \ref{lemma-Artin-Rees} to $\Im(f) \subset N$ and note that $f : I^{n-c}M \to I^{n-c}f(M)$ is surjective. \end{proof} \begin{lemma}[Krull's intersection theorem] \label{lemma-intersect-powers-ideal-module-zero} Let $R$ be a Noetherian local ring. Let $I \subset R$ be a proper ideal. Let $M$ be a finite $R$-module. Then $\bigcap_{n \geq 0} I^nM = 0$. \end{lemma} \begin{proof} Let $N = \bigcap_{n \geq 0} I^nM$. Then $N = I^nM \cap N$ for all $n \geq 0$. By the Artin-Rees Lemma \ref{lemma-Artin-Rees} we see that $N = I^nM \cap N \subset IN$ for some suitably large $n$. By Nakayama's Lemma \ref{lemma-NAK} we see that $N = 0$. \end{proof} \begin{lemma} \label{lemma-intersection-powers-ideal-module} Let $R$ be a Noetherian ring. Let $I \subset R$ be an ideal. Let $M$ be a finite $R$-module. Let $N = \bigcap_n I^n M$. \begin{enumerate} \item For every prime $\mathfrak p$, $I \subset \mathfrak p$ there exists a $f \in R$, $f \not \in \mathfrak p$ such that $N_f = 0$. \item If $I$ is contained in the Jacobson radical of $R$, then $N = 0$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Let $x_1, \ldots, x_n$ be generators for the module $N$, see Lemma \ref{lemma-Noetherian-basic}. For every prime $\mathfrak p$, $I \subset \mathfrak p$ we see that the image of $N$ in the localization $M_{\mathfrak p}$ is zero, by Lemma \ref{lemma-intersect-powers-ideal-module-zero}. Hence we can find $g_i \in R$, $g_i \not \in \mathfrak p$ such that $x_i$ maps to zero in $N_{g_i}$. Thus $N_{g_1g_2\ldots g_n} = 0$. \medskip\noindent Part (2) follows from (1) and Lemma \ref{lemma-characterize-zero-local}. \end{proof} \begin{remark} \label{remark-intersection-powers-ideal} Lemma \ref{lemma-intersect-powers-ideal-module-zero} in particular implies that $\bigcap_n I^n = (0)$ when $I \subset R$ is a non-unit ideal in a Noetherian local ring $R$. More generally, let $R$ be a Noetherian ring and $I \subset R$ an ideal. Suppose that $f \in \bigcap_{n \in \mathbf{N}} I^n$. Then Lemma \ref{lemma-intersection-powers-ideal-module} says that for every prime ideal $I \subset \mathfrak p$ there exists a $g \in R$, $g \not \in \mathfrak p$ such that $f$ maps to zero in $R_g$. In algebraic geometry we express this by saying that ``$f$ is zero in an open neighbourhood of the closed set $V(I)$ of $\Spec(R)$''. \end{remark} \begin{lemma}[Artin-Tate] \label{lemma-Artin-Tate} Let $R$ be a Noetherian ring. Let $S$ be a finitely generated $R$-algebra. If $T \subset S$ is an $R$-subalgebra such that $S$ is finitely generated as a $T$-module, then $T$ is of finite type over $R$. \end{lemma} \begin{proof} Choose elements $x_1, \ldots, x_n \in S$ which generate $S$ as an $R$-algebra. Choose $y_1, \ldots, y_m$ in $S$ which generate $S$ as a $T$-module. Thus there exist $a_{ij} \in T$ such that $x_i = \sum a_{ij} y_j$. There also exist $b_{ijk} \in T$ such that $y_i y_j = \sum b_{ijk} y_k$. Let $T' \subset T$ be the sub $R$-algebra generated by $a_{ij}$ and $b_{ijk}$. This is a finitely generated $R$-algebra, hence Noetherian. Consider the algebra $$ S' = T'[Y_1, \ldots, Y_m]/(Y_i Y_j - \sum b_{ijk} Y_k). $$ Note that $S'$ is finite over $T'$, namely as a $T'$-module it is generated by the classes of $1, Y_1, \ldots, Y_m$. Consider the $T'$-algebra homomorphism $S' \to S$ which maps $Y_i$ to $y_i$. Because $a_{ij} \in T'$ we see that $x_j$ is in the image of this map. Thus $S' \to S$ is surjective. Therefore $S$ is finite over $T'$ as well. Since $T'$ is Noetherian we conclude that $T \subset S$ is finite over $T'$ and we win. \end{proof} \section{Length} \label{section-length} % BEGIN ALGEBRA EDITORIAL ROUTE section-length \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-length}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-length \begin{definition} \label{definition-length} Let $R$ be a ring. For any $R$-module $M$ we define the {\it length} of $M$ over $R$ by the formula $$ \text{length}_R(M) = \sup \{ n \mid \exists\ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M, \text{ }M_i \not = M_{i + 1} \}. $$ \end{definition} \noindent In other words it is the supremum of the lengths of chains of submodules. There is an obvious notion of when a chain of submodules is a refinement of another. This gives a partial ordering on the collection of all chains of submodules, with the smallest chain having the shape $0 = M_0 \subset M_1 = M$ if $M$ is not zero. We note the obvious fact that if the length of $M$ is finite, then every chain can be refined to a maximal chain. But it is not as obvious that all maximal chains have the same length (as we will see later). \begin{lemma} \label{lemma-finite-length-finite} \begin{slogan} Modules of finite length are finite. \end{slogan} Let $R$ be a ring. Let $M$ be an $R$-module. If $\text{length}_R(M) < \infty$ then $M$ is a finite $R$-module. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-length-additive} \begin{slogan} Length is additive in short exact sequences. \end{slogan} If $0 \to M' \to M \to M'' \to 0$ is a short exact sequence of modules over $R$ then the length of $M$ is the sum of the lengths of $M'$ and $M''$. \end{lemma} \begin{proof} Given filtrations of $M'$ and $M''$ of lengths $n', n''$ it is easy to make a corresponding filtration of $M$ of length $n' + n''$. Thus we see that $\text{length}_R M \geq \text{length}_R M' + \text{length}_R M''$. Conversely, given a filtration $M_0 \subset M_1 \subset \ldots \subset M_n$ of $M$ consider the induced filtrations $M_i' = M_i \cap M'$ and $M_i'' = \Im(M_i \to M'')$. Let $n'$ (resp.\ $n''$) be the number of steps in the filtration $\{M'_i\}$ (resp.\ $\{M''_i\}$). If $M_i' = M_{i + 1}'$ and $M_i'' = M_{i + 1}''$ then $M_i = M_{i + 1}$. Hence we conclude that $n' + n'' \geq n$. Combined with the earlier result we win. \end{proof} \begin{lemma} \label{lemma-length-infinite} Let $R$ be a local ring with maximal ideal $\mathfrak m$. If $M$ is an $R$-module and $\mathfrak m^n M \not = 0$ for all $n \geq 0$, then $\text{length}_R(M) = \infty$. In other words, if $M$ has finite length then $\mathfrak m^nM = 0$ for some $n$. \end{lemma} \begin{proof} Assume $\mathfrak m^n M \not = 0$ for all $n\geq 0$. Choose $x \in M$ and $f_1, \ldots, f_n \in \mathfrak m$ such that $f_1f_2 \ldots f_n x \not = 0$. The first $n$ steps in the filtration $$ 0 \subset R f_1 \ldots f_n x \subset R f_1 \ldots f_{n - 1} x \subset \ldots \subset R x \subset M $$ are distinct. For example, if $R f_1 x = R f_1 f_2 x$ , then $f_1 x = g f_1 f_2 x$ for some $g$, hence $(1 - gf_2) f_1 x = 0$ hence $f_1 x = 0$ as $1 - gf_2$ is a unit which is a contradiction with the choice of $x$ and $f_1, \ldots, f_n$. Hence the length is infinite. \end{proof} \begin{lemma} \label{lemma-length-independent} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. We always have $\text{length}_R(M) \geq \text{length}_S(M)$. If $R \to S$ is surjective then equality holds. \end{lemma} \begin{proof} A filtration of $M$ by $S$-submodules gives rise a filtration of $M$ by $R$-submodules. This proves the inequality. And if $R \to S$ is surjective, then any $R$-submodule of $M$ is automatically an $S$-submodule. Hence equality in this case. \end{proof} \begin{lemma} \label{lemma-dimension-is-length} Let $R$ be a ring with maximal ideal $\mathfrak m$. Suppose that $M$ is an $R$-module with $\mathfrak m M = 0$. Then the length of $M$ as an $R$-module agrees with the dimension of $M$ as a $R/\mathfrak m$ vector space. The length is finite if and only if $M$ is a finite $R$-module. \end{lemma} \begin{proof} The first part is a special case of Lemma \ref{lemma-length-independent}. Thus the length is finite if and only if $M$ has a finite basis as a $R/\mathfrak m$-vector space if and only if $M$ has a finite set of generators as an $R$-module. \end{proof} \begin{lemma} \label{lemma-length-localize} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. Then $\text{length}_R(M) \geq \text{length}_{S^{-1}R}(S^{-1}M)$. \end{lemma} \begin{proof} Any submodule $N' \subset S^{-1}M$ is of the form $S^{-1}N$ for some $R$-submodule $N \subset M$, by Lemma \ref{lemma-submodule-localization}. The lemma follows. \end{proof} \begin{lemma} \label{lemma-length-finite} Let $R$ be a ring with finitely generated maximal ideal $\mathfrak m$. (For example $R$ Noetherian.) Suppose that $M$ is a finite $R$-module with $\mathfrak m^n M = 0$ for some $n$. Then $\text{length}_R(M) < \infty$. \end{lemma} \begin{proof} Consider the filtration $0 = \mathfrak m^n M \subset \mathfrak m^{n-1} M \subset \ldots \subset \mathfrak m M \subset M$. All of the subquotients are finitely generated $R$-modules to which Lemma \ref{lemma-dimension-is-length} applies. We conclude by additivity, see Lemma \ref{lemma-length-additive}. \end{proof} \begin{definition} \label{definition-simple-module} Let $R$ be a ring. Let $M$ be an $R$-module. We say $M$ is {\it simple} if $M \not = 0$ and every submodule of $M$ is either equal to $M$ or to $0$. \end{definition} \begin{lemma} \label{lemma-characterize-length-1} Let $R$ be a ring. Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is simple, \item $\text{length}_R(M) = 1$, and \item $M \cong R/\mathfrak m$ for some maximal ideal $\mathfrak m \subset R$. \end{enumerate} \end{lemma} \begin{proof} Let $\mathfrak m$ be a maximal ideal of $R$. By Lemma \ref{lemma-dimension-is-length} the module $R/\mathfrak m$ has length $1$. The equivalence of the first two assertions is tautological. Suppose that $M$ is simple. Choose $x \in M$, $x \not = 0$. As $M$ is simple we have $M = R \cdot x$. Let $I \subset R$ be the annihilator of $x$, i.e., $I = \{f \in R \mid fx = 0\}$. The map $R/I \to M$, $f \bmod I \mapsto fx$ is an isomorphism, hence $R/I$ is a simple $R$-module. Since $R/I \not = 0$ we see $I \not = R$. Let $\mathfrak m$ be a maximal ideal containing $I$. If $I \not = \mathfrak m$, then $\mathfrak m /I \subset R/I$ is a nontrivial submodule contradicting the simplicity of $R/I$. Hence we see $I = \mathfrak m$ as desired. \end{proof} \begin{lemma} \label{lemma-simple-pieces} Let $R$ be a ring. Let $M$ be a finite length $R$-module. Choose any maximal chain of submodules $$ 0 = M_0 \subset M_1 \subset M_2 \subset \ldots \subset M_n = M $$ with $M_i \not = M_{i-1}$, $i = 1, \ldots, n$. Then \begin{enumerate} \item $n = \text{length}_R(M)$, \item each $M_i/M_{i-1}$ is simple, \item each $M_i/M_{i-1}$ is of the form $R/\mathfrak m_i$ for some maximal ideal $\mathfrak m_i$, \item given a maximal ideal $\mathfrak m \subset R$ we have $$ \# \{i \mid \mathfrak m_i = \mathfrak m\} = \text{length}_{R_{\mathfrak m}} (M_{\mathfrak m}). $$ \end{enumerate} \end{lemma} \begin{proof} If $M_i/M_{i-1}$ is not simple then we can refine the filtration and the filtration is not maximal. Thus we see that $M_i/M_{i-1}$ is simple. By Lemma \ref{lemma-characterize-length-1} the modules $M_i/M_{i-1}$ have length $1$ and are of the form $R/\mathfrak m_i$ for some maximal ideals $\mathfrak m_i$. By additivity of length, Lemma \ref{lemma-length-additive}, we see $n = \text{length}_R(M)$. Since localization is exact, we see that $$ 0 = (M_0)_{\mathfrak m} \subset (M_1)_{\mathfrak m} \subset (M_2)_{\mathfrak m} \subset \ldots \subset (M_n)_{\mathfrak m} = M_{\mathfrak m} $$ is a filtration of $M_{\mathfrak m}$ with successive quotients $(M_i/M_{i-1})_{\mathfrak m}$. Thus the last statement follows directly from the fact that given maximal ideals $\mathfrak m$, $\mathfrak m'$ of $R$ we have $$ (R/\mathfrak m')_{\mathfrak m} \cong \left\{ \begin{matrix} 0 & \text{if } \mathfrak m \not = \mathfrak m', \\ R_{\mathfrak m}/\mathfrak m R_{\mathfrak m} & \text{if } \mathfrak m = \mathfrak m' \end{matrix} \right. $$ This we leave to the reader. \end{proof} \begin{lemma} \label{lemma-pushdown-module} Let $A$ be a local ring with maximal ideal $\mathfrak m$. Let $B$ be a semi-local ring with maximal ideals $\mathfrak m_i$, $i = 1, \ldots, n$. Suppose that $A \to B$ is a homomorphism such that each $\mathfrak m_i$ lies over $\mathfrak m$ and such that $$ [\kappa(\mathfrak m_i) : \kappa(\mathfrak m)] < \infty. $$ Let $M$ be a $B$-module of finite length. Then $$ \text{length}_A(M) = \sum\nolimits_{i = 1, \ldots, n} [\kappa(\mathfrak m_i) : \kappa(\mathfrak m)] \text{length}_{B_{\mathfrak m_i}}(M_{\mathfrak m_i}), $$ in particular $\text{length}_A(M) < \infty$. \end{lemma} \begin{proof} 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}). \end{proof} \begin{lemma} \label{lemma-pullback-module} Let $A \to B$ be a flat local homomorphism of local rings. Then for any $A$-module $M$ we have $$ \text{length}_A(M) \text{length}_B(B/\mathfrak m_AB) = \text{length}_B(M \otimes_A B). $$ In particular, if $\text{length}_B(B/\mathfrak m_AB) < \infty$ then $M$ has finite length if and only if $M \otimes_A B$ has finite length. \end{lemma} \begin{proof} 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. \end{proof} \begin{lemma} \label{lemma-pullback-transitive} Let $A \to B \to C$ be flat local homomorphisms of local rings. Then $$ \text{length}_B(B/\mathfrak m_A B) \text{length}_C(C/\mathfrak m_B C) = \text{length}_C(C/\mathfrak m_A C) $$ \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-pullback-module} applied to the ring map $B \to C$ and the $B$-module $M = B/\mathfrak m_A B$ \end{proof} \section{Artinian rings} \label{section-artinian} % BEGIN ALGEBRA EDITORIAL ROUTE section-artinian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-artinian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-artinian \noindent Artinian rings, and especially local Artinian rings, play an important role in algebraic geometry, for example in deformation theory. \begin{definition} \label{definition-artinian} A ring $R$ is {\it Artinian} if it satisfies the descending chain condition for ideals. \end{definition} \begin{lemma} \label{lemma-finite-dimensional-algebra} Suppose $R$ is a finite dimensional algebra over a field. Then $R$ is Artinian. \end{lemma} \begin{proof} The descending chain condition for ideals obviously holds. \end{proof} \begin{lemma} \label{lemma-artinian-finite-nr-max} If $R$ is Artinian then $R$ has only finitely many maximal ideals. \end{lemma} \begin{proof} Suppose that $\mathfrak m_i$, $i = 1, 2, 3, \ldots$ are pairwise distinct maximal ideals. Then $\mathfrak m_1 \supset \mathfrak m_1\cap \mathfrak m_2 \supset \mathfrak m_1 \cap \mathfrak m_2 \cap \mathfrak m_3 \supset \ldots$ is an infinite descending sequence (because by the Chinese remainder theorem all the maps $R \to \oplus_{i = 1}^n R/\mathfrak m_i$ are surjective). \end{proof} \begin{lemma} \label{lemma-artinian-radical-nilpotent} Let $R$ be Artinian. The Jacobson radical of $R$ is a nilpotent ideal. \end{lemma} \begin{proof} 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$ is a simple $R$-module, hence isomorphic to $R/\mathfrak m$ for some maximal ideal $\mathfrak m$, see Lemma \ref{lemma-characterize-length-1}. Then $\mathfrak m I^n$ kills $J'$. Since $I \subset \mathfrak m$ we conclude that $I^{n + 1} = I^n$ kills $J'$. Hence $J' = J$ which is a contradiction. \end{proof} \begin{lemma} \label{lemma-product-local} Any ring with finitely many maximal ideals and locally nilpotent Jacobson radical is the product of its localizations at its maximal ideals. Also, all primes are maximal. \end{lemma} \begin{proof} 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$. Thus the spectrum of $R$ is the discrete topological space $\{\mathfrak m_1, \ldots, \mathfrak m_n\}$. By Lemma \ref{lemma-disjoint-implies-product} applied $n - 1$ times we find that $R = R_1 \times \ldots \times R_n$ where the spectrum of $R_i$ is a singleton for each $i$. Thus $R_i$ is a local ring and since it is a localization of $R$ (by the lemma), it is one of the local rings of $R$ as desired. \end{proof} \begin{lemma} \label{lemma-artinian-finite-length} A ring $R$ is Artinian if and only if it has finite length as a module over itself. Any such ring $R$ is both Artinian and Noetherian, any prime ideal of $R$ is a maximal ideal, and $R$ is equal to the (finite) product of its localizations at its maximal ideals. \end{lemma} \begin{proof} 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 the product of its localizations at its 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 vector subspaces which would correspond to an infinite descending chain of ideals in $R$. \end{proof} \section{Homomorphisms essentially of finite type} \label{section-essentially-of-finite-type} % BEGIN ALGEBRA EDITORIAL ROUTE section-essentially-of-finite-type \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-essentially-of-finite-type}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-essentially-of-finite-type \noindent Some simple remarks on localizations of finite type ring maps. \begin{definition} \label{definition-essentially-finite-p-t} Let $R \to S$ be a ring map. \begin{enumerate} \item We say that $R \to S$ is {\it essentially of finite type} if $S$ is the localization of an $R$-algebra of finite type. \item We say that $R \to S$ is {\it essentially of finite presentation} if $S$ is the localization of an $R$-algebra of finite presentation. \end{enumerate} \end{definition} \begin{lemma} \label{lemma-composition-essentially-of-finite-type} The class of ring maps which are essentially of finite type is preserved under composition. Similarly for essentially of finite presentation. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-base-change-essentially-of-finite-type} The class of ring maps which are essentially of finite type is preserved by base change. Similarly for essentially of finite presentation. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-essentially-of-finite-type-into-artinian-local} Let $R \to S$ be a ring map. Assume $S$ is an Artinian local ring with maximal ideal $\mathfrak m$. Then \begin{enumerate} \item $R \to S$ is finite if and only if $R \to S/\mathfrak m$ is finite, \item $R \to S$ is of finite type if and only if $R \to S/\mathfrak m$ is of finite type. \item $R \to S$ is essentially of finite type if and only if the composition $R \to S/\mathfrak m$ is essentially of finite type. \end{enumerate} \end{lemma} \begin{proof} 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}. \end{proof} \noindent The following lemma can be proven using properness of projective space instead of the algebraic argument we give here. \begin{lemma} \label{lemma-localization-at-closed-point-special-fibre} Let $\varphi : R \to S$ be essentially of finite type with $R$ and $S$ local (but not necessarily $\varphi$ local). Then there exists an $n$ and a maximal ideal $\mathfrak m \subset R[x_1, \ldots, x_n]$ lying over $\mathfrak m_R$ such that $S$ is a localization of a quotient of $R[x_1, \ldots, x_n]_\mathfrak m$. \end{lemma} \begin{proof} 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 every 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. \end{proof} \section{K-groups} \label{section-K-groups} % BEGIN ALGEBRA EDITORIAL ROUTE section-K-groups \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-K-groups}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-K-groups \noindent Let $R$ be a ring. We will introduce two abelian groups associated to $R$. The first of the two is denoted $K'_0(R)$ and has the following properties\footnote{The definition makes sense for any ring but is rarely used unless $R$ is Noetherian.}: \begin{enumerate} \item For every finite $R$-module $M$ there is given an element $[M]$ in $K'_0(R)$, \item for every short exact sequence $0 \to M' \to M \to M'' \to 0$ of finite $R$-modules we have the relation $[M] = [M'] + [M'']$, \item the group $K'_0(R)$ is generated by the elements $[M]$, and \item all relations in $K'_0(R)$ among the generators $[M]$ are $\mathbf{Z}$-linear combinations of the relations coming from exact sequences as above. \end{enumerate} The actual construction is a bit more annoying since one has to take care that the collection of all finitely generated $R$-modules is a proper class. However, this problem can be overcome by taking as set of generators of the group $K'_0(R)$ the elements $[R^n/K]$ where $n$ ranges over all nonnegative integers and $K$ ranges over all submodules $K \subset R^n$. The generators for the subgroup of relations imposed on these elements will be the relations coming from short exact sequences whose terms are of the form $R^n/K$. The element $[M]$ is defined by choosing $n$ and $K$ such that $M \cong R^n/K$ and putting $[M] = [R^n/K]$. Details left to the reader. \begin{lemma} \label{lemma-length-K0} If $R$ is an Artinian local ring then the length function defines a natural abelian group homomorphism $\text{length}_R : K'_0(R) \to \mathbf{Z}$. \end{lemma} \begin{proof} The length of any finite $R$-module is finite, because it is the quotient of $R^n$ which has finite length by Lemma \ref{lemma-artinian-finite-length}. And the length function is additive, see Lemma \ref{lemma-length-additive}. \end{proof} \noindent The second of the two is denoted $K_0(R)$ and has the following properties: \begin{enumerate} \item For every finite projective $R$-module $M$ there is given an element $[M]$ in $K_0(R)$, \item for every short exact sequence $0 \to M' \to M \to M'' \to 0$ of finite projective $R$-modules we have the relation $[M] = [M'] + [M'']$, \item the group $K_0(R)$ is generated by the elements $[M]$, and \item all relations in $K_0(R)$ are $\mathbf{Z}$-linear combinations of the relations coming from exact sequences as above. \end{enumerate} The construction of this group is done as above. \medskip\noindent We note that there is an obvious map $K_0(R) \to K'_0(R)$ which is not an isomorphism in general. \begin{example} \label{example-K0-field} Note that if $R = k$ is a field then we clearly have $K_0(k) = K'_0(k) \cong \mathbf{Z}$ with the isomorphism given by the dimension function (which is also the length function). \end{example} \begin{example} \label{example-K0-PID} Let $R$ be a PID. We claim $K_0(R) = K'_0(R) = \mathbf{Z}$. Namely, any 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 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}$. \medskip\noindent The structure theorem for modules of a PID says that any finitely generated $R$-module is of the form $M = R^{\oplus r} \oplus R/(d_1) \oplus \ldots \oplus R/(d_k)$ with $d_i \ne 0$ for every $i$. Consider the short exact sequence $$ 0 \to (d_i) \to R \to R/(d_i) \to 0 $$ Since the ideal $(d_i)$ is isomorphic to $R$ as a module (it is free with generator $d_i$), in $K'_0(R)$ we have $[(d_i)] = [R]$. Then $[R/(d_i)] = [R]-[(d_i)] = 0$. From this it follows that a torsion module has zero class in $K'_0(R)$. Using the rank of the free part gives an identification $K'_0(R) = \mathbf{Z}$ and the canonical homomorphism from $K_0(R) \to K'_0(R)$ is an isomorphism. \end{example} \begin{example} \label{example-K0-polynomial-ring} Let $k$ be a field. Then $K_0(k[x]) = K'_0(k[x]) = \mathbf{Z}$. This follows from Example \ref{example-K0-PID} as $R = k[x]$ is a PID. \end{example} \begin{example} \label{example-K0-node} Let $k$ be a field. Let $R = \{f \in k[x] \mid f(0) = f(1)\}$, compare Example \ref{example-affine-open-not-standard}. In this case $K_0(R) \cong k^* \oplus \mathbf{Z}$, but $K'_0(R) = \mathbf{Z}$. \end{example} \begin{lemma} \label{lemma-K0-product} Let $R = R_1 \times R_2$. Then $K_0(R) = K_0(R_1) \times K_0(R_2)$ and $K'_0(R) = K'_0(R_1) \times K'_0(R_2)$ \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-K0prime-Artinian} Let $R$ be an Artinian local ring. The map $\text{length}_R : K'_0(R) \to \mathbf{Z}$ of Lemma \ref{lemma-length-K0} is an isomorphism. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-K0-local} Let $(R, \mathfrak m)$ be a local ring. Every finite projective $R$-module is finite free. The map $\text{rank}_R : K_0(R) \to \mathbf{Z}$ defined by $[M] \to \text{rank}_R(M)$ is well defined and an isomorphism. \end{lemma} \begin{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}$. \end{proof} \begin{lemma} \label{lemma-K0-and-K0prime-Artinian-local} Let $R$ be a local Artinian ring. There is a commutative diagram $$ \xymatrix{ K_0(R) \ar[rr] \ar[d]_{\text{rank}_R} & & K'_0(R) \ar[d]^{\text{length}_R} \\ \mathbf{Z} \ar[rr]^{\text{length}_R(R)} & & \mathbf{Z} } $$ where the vertical maps are isomorphisms by Lemmas \ref{lemma-K0prime-Artinian} and \ref{lemma-K0-local}. \end{lemma} \begin{proof} 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 lengths (Lemma \ref{lemma-length-additive}). Thus the result holds. \end{proof} \section{Graded rings} \label{section-graded} % BEGIN ALGEBRA EDITORIAL ROUTE section-graded \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-graded}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-graded \noindent A {\it graded ring} will be for us a ring $S$ endowed with a direct sum decomposition $S = \bigoplus_{d \geq 0} S_d$ of the underlying abelian group such that $S_d \cdot S_e \subset S_{d + e}$. Note that we do not allow nonzero elements in negative degrees. The {\it irrelevant ideal} is the ideal $S_{+} = \bigoplus_{d > 0} S_d$. A {\it graded module} will be an $S$-module $M$ endowed with a direct sum decomposition $M = \bigoplus_{n\in \mathbf{Z}} M_n$ of the underlying abelian group such that $S_d \cdot M_e \subset M_{d + e}$. Note that for modules we do allow nonzero elements in negative degrees. We think of $S$ as a graded $S$-module by setting $S_{-k} = (0)$ for $k > 0$. An element $x$ (resp.\ $f$) of $M$ (resp.\ $S$) is called {\it homogeneous} if $x \in M_d$ (resp.\ $f \in S_d$) for some $d$. A {\it map of graded $S$-modules} is a map of $S$-modules $\varphi : M \to M'$ such that $\varphi(M_d) \subset M'_d$. We do not allow maps to shift degrees. Let us denote $\text{GrHom}_0(M, N)$ the $S_0$-module of homomorphisms of graded modules from $M$ to $N$. \medskip\noindent At this point there are the notions of graded ideal, graded quotient ring, graded submodule, graded quotient module, graded tensor product, etc. We leave it to the reader to find the relevant definitions and lemmas. For example: A short exact sequence of graded modules is short exact in every degree. \medskip\noindent Given a graded ring $S$, a graded $S$-module $M$ and $n \in \mathbf{Z}$ we denote $M(n)$ the graded $S$-module with $M(n)_d = M_{n + d}$. This is called the {\it twist of $M$ by $n$}. In particular we get modules $S(n)$, $n \in \mathbf{Z}$ which will play an important role in the study of projective schemes. There are some obvious functorial isomorphisms such as $(M \oplus N)(n) = M(n) \oplus N(n)$, $(M \otimes_S N)(n) = M \otimes_S N(n) = M(n) \otimes_S N$. In addition we can define a graded $S$-module structure on the $S_0$-module $$ \text{GrHom}(M, N) = \bigoplus\nolimits_{n \in \mathbf{Z}} \text{GrHom}_n(M, N), \quad \text{GrHom}_n(M, N) = \text{GrHom}_0(M, N(n)). $$ We omit the definition of the $S$-action. \begin{remark} \label{remark-FAC-graded-conventions} \begin{reference} \cite[Chapter III, \S 2, no. 56, pp. 248--249]{FAC} \cite[Chapter III, \S 4, no. 68, definition of the graded Hom module, p. 261]{FAC} \end{reference} \begin{history} The cited source introduces these conventions for the standard polynomial ring $K[t_0, \ldots, t_r]$. It calls an $S$-linear map homogeneous of degree $s$ when it sends $M_n$ into $M'_{n + s}$; this is an element of $\text{GrHom}_s(M, M')$ in the notation above, whereas an unqualified map of graded modules here has degree zero. Both conventions use $M(n)_p = M_{n + p}$. Thus a homogeneous basis element of degree $d$ corresponds to a summand $S(-d)$, and the source's graded free modules are precisely direct sums of twists $S(n_i)$ (finite direct sums in the finite free case). The formulation above works over every nonnegatively graded ring, not only a polynomial ring over a field. No. 68 uses the direct sum of these homogeneous-map groups as its internal graded Hom module. It also records the important finiteness boundary: if $M$ is finite, every ungraded $S$-linear map $M\to N$ is a finite sum of homogeneous maps, so $\text{GrHom}(M,N)$ agrees with $\Hom_S(M,N)$ after forgetting the grading. This need not hold when $M$ is not finite. \end{history} With the conventions above, an $S$-linear map homogeneous of degree $s$ is an element of $\text{GrHom}_s(M, M')$. Moreover, a homogeneous basis element of degree $d$ determines a graded free summand $S(-d)$. \end{remark} \begin{lemma} \label{lemma-graded-free-resolutions} \begin{reference} \cite[Chapter III, \S 4, no. 68, construction of a graded free resolution, p. 261]{FAC} \end{reference} \begin{history} The cited source makes this construction for $S=K[t_0,\ldots,t_r]$ and uses degree-zero differentials. The formulation below isolates the categorical input and the Noetherian finiteness condition, so it applies to every nonnegatively graded ring. \end{history} Let $S$ be a graded ring. The category of graded $S$-modules and degree-zero maps is abelian and has enough projectives. More precisely: \begin{enumerate} \item every direct sum of twists $S(n)$ is projective, \item every graded $S$-module has a resolution by direct sums of twists of $S$ with degree-zero differentials, \item if $S$ is Noetherian and $M$ is a finite graded $S$-module, then the resolution of $M$ can be chosen finite graded free in every degree, and \item a degree-zero map of graded modules lifts to a map between any two such resolutions, uniquely up to a degree-zero homotopy. \end{enumerate} \end{lemma} \begin{proof} Kernels and cokernels of degree-zero maps are graded and are computed degreewise. This proves the assertion about the category being abelian. The functor $$ \text{GrHom}_0(S(-d),N)=N_d $$ is exact in $N$. More generally, a degree-zero map from a direct sum of twists to a quotient $N\to N'$ lifts after choosing, in the required degrees, lifts of the images of the homogeneous basis elements. Thus direct sums of twists are projective. For every homogeneous element $m\in M_d$, take one copy of $S(-d)$ and send its degree-$d$ basis element to $m$. The resulting map from a graded free module onto $M$ is surjective. Its kernel is graded, so iteration gives the resolution in (2). If $S$ is Noetherian and $M$ is finite, we may begin with finitely many homogeneous generators. Every successive kernel is a finite graded submodule of a finite graded free module, which proves (3). Finally, the usual comparison argument lifts a map first from the degree-zero projective term and then successively from the kernels. Applied to the difference of two lifts, the same argument constructs a homotopy one degree at a time. Every lift is taken in the category of graded modules, hence has degree zero. This proves (4). \end{proof} \begin{definition} \label{definition-graded-ext} \begin{reference} \cite[Chapter III, \S 4, no. 68, definition of the graded Ext modules, pp. 261--262]{FAC} \end{reference} \begin{history} The cited source writes $\Hom_S(M,N)$ for $\text{GrHom}(M,N)$ and $\Ext^q_S(M,N)$ for the internal graded Ext module defined below. Its footnote warns that these conventions differ from ordinary ungraded Hom and Ext when the first module is not finite. We retain the prefix Gr to keep that distinction visible. \end{history} Let $S$ be a graded ring and let $M,N$ be graded $S$-modules. Choose a graded free resolution $L_\bullet\to M$ as in Lemma \ref{lemma-graded-free-resolutions}. For $q\geq 0$ and $n\in\mathbf Z$ set $$ \text{GrExt}^q_S(M,N)_n= H^q(\text{GrHom}_n(L_\bullet,N)) $$ and set $$ \text{GrExt}^q_S(M,N)= \bigoplus_{n\in\mathbf Z}\text{GrExt}^q_S(M,N)_n. $$ Multiplication by an element of $S_d$ maps the degree-$n$ cochain complex to the degree-$(n+d)$ cochain complex and makes this direct sum a graded $S$-module. Part (4) of Lemma \ref{lemma-graded-free-resolutions} shows that the construction is functorial and independent, up to canonical isomorphism, of the chosen resolution. \end{definition} \begin{lemma} \label{lemma-graded-ext-properties} \begin{reference} \cite[Chapter III, \S 4, no. 68, principal properties and exact sequences of graded Ext, pp. 261--262]{FAC} \cite[Chapter III, \S 4, no. 72, Theorem 1 and Corollary 2, pp. 265--267]{FAC} \cite[Chapter III, \S 5, no. 77, graded Ext twist preceding Proposition 2, p. 271]{FAC} \end{reference} \begin{history} For a polynomial ring in $r+1$ variables over a field, the source combines the graded construction with Hilbert's syzygy theorem to obtain vanishing above degree $r+1$. The proof below separates the internal grading from the ordinary Ext comparison and the global-dimension input. It also records the shift signs and the variance of both exact sequences explicitly. No. 72 applies the contravariant long exact sequence in the first variable to identify internal graded Ext into $S(-r-1)$ with the reversed dual of positive Koszul--{\v C}ech cohomology. It also uses the finiteness assertion for a finite graded representative to deduce finiteness of the positive dual-cohomology modules. More on Algebra, Lemma \ref{more-algebra-lemma-graded-local-duality-polynomial-ring} supplies the complete comparison, including the two exceptional degrees; the present lemma supplies the Ext delta functor and its finite-module boundary. No. 77 uses the shift formula in part (2), with $\Omega=S(-r-1)$, to replace vanishing of $\text{GrExt}^q_S(M,S)$ by vanishing of $\text{GrExt}^q_S(M,\Omega)$. This changes only the internal degree and not the cohomological range. \end{history} Let $S$ be a graded ring and let $M,N$ be graded $S$-modules. \begin{enumerate} \item We have $\text{GrExt}^0_S(M,N)=\text{GrHom}(M,N)$. \item For every $a\in\mathbf Z$ and $q\geq 0$ there are canonical isomorphisms $$ \text{GrExt}^q_S(M(a),N) \cong \text{GrExt}^q_S(M,N(-a)) \cong \text{GrExt}^q_S(M,N)(-a). $$ \item A short exact sequence $0\to N\to N'\to N''\to0$ gives a long exact sequence of graded $S$-modules $$ \begin{matrix} \ldots\to\text{GrExt}^q_S(M,N)\to \text{GrExt}^q_S(M,N')\to\text{GrExt}^q_S(M,N'')\\ \phantom{\ldots}\to\text{GrExt}^{q+1}_S(M,N)\to\ldots. \end{matrix} $$ \item A short exact sequence $0\to M\to M'\to M''\to0$ gives a long exact sequence of graded $S$-modules $$ \begin{matrix} \ldots\to\text{GrExt}^q_S(M'',N)\to \text{GrExt}^q_S(M',N)\to\text{GrExt}^q_S(M,N)\\ \phantom{\ldots}\to\text{GrExt}^{q+1}_S(M'',N)\to\ldots. \end{matrix} $$ \item If $S$ is Noetherian and $M$ is finite, then forgetting the grading gives canonical isomorphisms $$ \text{GrExt}^q_S(M,N)\longrightarrow\Ext^q_S(M,N). $$ If also $N$ is finite, these are finite $S$-modules. \item If $S=K[t_0,\ldots,t_r]$ for a field $K$ and $M$ is finite, then $\text{GrExt}^q_S(M,N)=0$ for $q>r+1$. \end{enumerate} \end{lemma} \begin{proof} Part (1) follows by applying $\text{GrHom}_n(-,N)$ to the beginning of a graded free resolution and taking the kernel, for every $n$. If $L_\bullet\to M$ is a graded free resolution, then $L_\bullet(a)\to M(a)$ is one too, and $$ \text{GrHom}_n(L_i(a),N)= \text{GrHom}_{n-a}(L_i,N)= \text{GrHom}_n(L_i,N(-a)). $$ These identifications commute with the differentials and prove (2). For (3), applying $\text{GrHom}_n(L_i,-)$ to the short exact sequence gives a short exact sequence for every $i$ and $n$, because $L_i$ is projective in the category of graded modules. The long cohomology sequences assemble over $n$ and all connecting maps have degree zero. The proof of the reverse long exact sequence in Lemma \ref{lemma-reverse-long-exact-seq-ext} applies in the same category, using Lemma \ref{lemma-graded-free-resolutions}; this proves (4). Under the hypotheses of (5), choose $L_i$ finite graded free for every $i$. Every ungraded map $L_i\to N$ is then a finite sum of homogeneous maps, so the natural map of cochain complexes $$ \text{GrHom}(L_\bullet,N)\longrightarrow\Hom_S(L_\bullet,N) $$ is an isomorphism. This proves the comparison. Finiteness follows from Lemma \ref{lemma-ext-noetherian}. Finally, a polynomial ring in $r+1$ variables over a field has global dimension $r+1$ by Proposition \ref{proposition-finite-gl-dim-polynomial-ring}. Part (6) follows from the comparison and Lemma \ref{lemma-projective-dimension-ext}. \end{proof} \begin{definition} \label{definition-graded-K-dual} \begin{reference} \cite[Chapter III, \S 4, no. 70, definition of the dual module and the Macaulay inverse-system remark, pp. 263--264]{FAC} \end{reference} \begin{history} The cited source takes $S=K[t_0,\ldots,t_r]$ and writes $M^*$ for the degreewise dual below. Its printed alternative formula has $\operatorname{Hom}_S(M,K)$, with $K=S/(t_0,\ldots,t_r)$. This cannot be correct: for $M=S$ the internal graded $S$-linear Hom is just $K$, whereas the displayed component definition has the dual of every $S_n$. The transposed action printed immediately before that formula instead gives $\text{GrHom}_K(M,K)$, where $K$ is concentrated in degree zero. We record that correction explicitly. The direct sum is essential. Ordinary ungraded $\Hom_K(M,K)$ is generally the product of the dual homogeneous pieces. For a homogeneous ideal $I$ in the polynomial ring, the source calls $(S/I)^\vee$ the inverse system of $I$ in Macaulay's sense; this historical apolarity terminology is distinct from a categorical inverse system indexed by a directed set. \end{history} Let $K$ be a field, let $S$ be a graded $K$-algebra, and let $M$ be a graded $S$-module. The {\it graded $K$-dual} of $M$ is $$ M^\vee=\bigoplus_{n\in\mathbf Z}(M^\vee)_n, \qquad (M^\vee)_n=\Hom_K(M_{-n},K). $$ For $s\in S_d$, $\lambda\in(M^\vee)_n$, and $m\in M_{-n-d}$, its graded $S$-module structure is defined by $$ (s\lambda)(m)=\lambda(sm). $$ Equivalently, if $K$ is viewed as a graded $K$-module concentrated in degree zero, then $$ M^\vee=\text{GrHom}_K(M,K). $$ \end{definition} \begin{lemma} \label{lemma-graded-K-dual} \begin{reference} \cite[Chapter III, \S 4, no. 70, functoriality, exactness, and biduality of the dual module, pp. 263--264]{FAC} \end{reference} Let $K$ be a field and let $S$ be a graded $K$-algebra. \begin{enumerate} \item The construction $M\mapsto M^\vee$ is an exact contravariant functor on the category of graded $S$-modules and degree-zero maps. \item There is a canonical degree-zero $S$-linear evaluation map $M\to M^{\vee\vee}$. It is an isomorphism if every $M_n$ is finite dimensional over $K$. \item For every $a\in\mathbf Z$ there is a canonical isomorphism $(M(a))^\vee\cong M^\vee(-a)$. \item If every $S_n$ is finite dimensional over $K$ and $M$ is a finite graded $S$-module, then $M\to M^{\vee\vee}$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} A degree-zero map $u:M\to N$ restricts to maps $M_n\to N_n$ and hence, by precomposition, gives a degree-zero $S$-linear map $u^\vee:N^\vee\to M^\vee$. If $0\to M\to N\to P\to0$ is a short exact sequence of graded modules, then it is exact in every degree. Dualizing the degree $-n$ sequence over the field $K$ gives $$ 0\longrightarrow(P^\vee)_n\longrightarrow(N^\vee)_n \longrightarrow(M^\vee)_n\longrightarrow0; $$ surjectivity follows by extending a linear functional from a subspace. These sequences assemble into a short exact sequence of graded modules, which proves (1). The usual evaluation maps $M_n\to(M_n')'$ assemble into a degree-zero map $M\to M^{\vee\vee}$. For $s\in S_d$, $m\in M_n$, and $\lambda\in(M^\vee)_{-n-d}$, both evaluation after multiplication and the transposed action send $(s,m,\lambda)$ to $\lambda(sm)$. Thus evaluation is $S$-linear. It is an isomorphism when every $M_n$ is finite dimensional, proving (2). Since $$ ((M(a))^\vee)_n=\Hom_K(M_{a-n},K)=(M^\vee)_{n-a}, $$ we obtain (3). Finally, choose homogeneous generators of $M$ of degrees $d_1,\ldots,d_t$. For every $n$, the vector space $M_n$ is a quotient of $\bigoplus_{i=1}^t S_{n-d_i}$ and is therefore finite dimensional under the hypothesis in (4). Part (2) finishes the proof. \end{proof} \begin{lemma} \label{lemma-graded-NAK} Let $S$ be a graded ring. Let $M$ be a graded $S$-module. \begin{enumerate} \item If $S_+M = M$ and $M$ is finite, then $M = 0$. \item If $N, N' \subset M$ are graded submodules, $M = N + S_+N'$, and $N'$ is finite, then $M = N$. \item If $N \to M$ is a map of graded modules, $N/S_+N \to M/S_+M$ is surjective, and $M$ is finite, then $N \to M$ is surjective. \item If $x_1, \ldots, x_n \in M$ are homogeneous and generate $M/S_+M$ and $M$ is finite, then $x_1, \ldots, x_n$ generate $M$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Choose generators $y_1, \ldots, y_r$ of $M$ over $S$. We may assume that $y_i$ is homogeneous of degree $d_i$. After renumbering we may assume $d_r = \min(d_i)$. Then the condition that $S_+M = M$ implies $y_r = 0$. Hence $M = 0$ by induction on $r$. Part (2) follows by applying (1) to $M/N$. Part (3) follows by applying (2) to the submodules $\Im(N \to M)$ and $M$. Part (4) follows by applying (3) to the module map $\bigoplus S(-d_i) \to M$, $(s_1, \ldots, s_n) \mapsto \sum s_i x_i$. \end{proof} \noindent Let $S$ be a graded ring. Let $d \geq 1$ be an integer. We set $S^{(d)} = \bigoplus_{n \geq 0} S_{nd}$. We think of $S^{(d)}$ as a graded ring with degree $n$ summand $(S^{(d)})_n = S_{nd}$. Given a graded $S$-module $M$ we can similarly consider $M^{(d)} = \bigoplus_{n \in \mathbf{Z}} M_{nd}$ which is a graded $S^{(d)}$-module. \begin{lemma} \label{lemma-uple-generated-degree-1} Let $S$ be a graded ring, which is finitely generated over $S_0$. Then for all sufficiently divisible $d$ the algebra $S^{(d)}$ is generated in degree $1$ over $S_0$. \end{lemma} \begin{proof} Say $S$ is generated by $f_1, \ldots, f_r \in S$ over $S_0$. After replacing $f_i$ by their homogeneous parts, we may assume $f_i$ is homogeneous of degree $d_i > 0$. Then any element of $S_n$ is a linear combination with coefficients in $S_0$ of monomials $f_1^{e_1} \ldots f_r^{e_r}$ with $\sum e_i d_i = n$. Let $m$ be a multiple of $\text{lcm}(d_i)$. For any $N \geq r$ if $$ \sum e_i d_i = N m $$ then for some $i$ we have $e_i \geq m/d_i$ by an elementary argument. Hence every monomial of degree $N m$ is a product of a monomial of degree $m$, namely $f_i^{m/d_i}$, and a monomial of degree $(N - 1)m$. It follows that any monomial of degree $nrm$ with $n \geq 2$ is a product of monomials of degree $rm$. Thus $S^{(rm)}$ is generated in degree $1$ over $S_0$. \end{proof} \begin{lemma} \label{lemma-integral-closure-graded} \begin{reference} \cite[Theorem 2.3.2]{Huneke-Swanson} \end{reference} Let $R \to S$ be a homomorphism of graded rings. Let $S' \subset S$ be the integral closure of $R$ in $S$. Then $$ S' = \bigoplus\nolimits_{d \geq 0} S' \cap S_d, $$ i.e., $S'$ is a graded $R$-subalgebra of $S$. \end{lemma} \begin{proof} 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 $R[t, t^{-1}]$ in $S[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$. \end{proof} \section{Proj of a graded ring} \label{section-proj} % BEGIN ALGEBRA EDITORIAL ROUTE section-proj \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-proj}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-proj \noindent Let $S$ be a graded ring. A {\it homogeneous ideal} is simply an ideal $I \subset S$ which is also a graded submodule of $S$. Equivalently, it is an ideal generated by homogeneous elements. Equivalently, if $f \in I$ and $$ f = f_0 + f_1 + \ldots + f_n $$ is the decomposition of $f$ into homogeneous parts in $S$ then $f_i \in I$ for each $i$. To check that a proper homogeneous ideal $\mathfrak p$ is prime it suffices to check that if $ab \in \mathfrak p$ with $a, b$ homogeneous then either $a \in \mathfrak p$ or $b \in \mathfrak p$. \begin{definition} \label{definition-proj} \begin{reference} \cite[Chapter III, \S 1, no. 51, pp. 243--244]{FAC} \end{reference} \begin{history} The cited source constructs classical projective space as scalar orbits of nonzero vectors and gives it the quotient topology whose closed subsets come from homogeneous cones. The homogeneous-spectrum construction below uses homogeneous prime ideals instead. Over an algebraically closed field the source orbits describe the closed points, whereas $\operatorname{Proj}$ also retains nonclosed scheme points and works for an arbitrary graded ring. \end{history} Let $S$ be a graded ring. We define $\text{Proj}(S)$ to be the set of homogeneous prime ideals $\mathfrak p$ of $S$ such that $S_{+} \not \subset \mathfrak p$. The set $\text{Proj}(S)$ is a subset of $\Spec(S)$ and we endow it with the induced topology. The topological space $\text{Proj}(S)$ is called the {\it homogeneous spectrum} of the graded ring $S$. \end{definition} \noindent Note that by construction there is a continuous map $$ \text{Proj}(S) \longrightarrow \Spec(S_0). $$ \medskip\noindent Let $S = \oplus_{d \geq 0} S_d$ be a graded ring. Let $f\in S_d$ and assume that $d \geq 1$. We define $S_{(f)}$ to be the subring of $S_f$ consisting of elements of the form $r/f^n$ with $r$ homogeneous and $\deg(r) = nd$. If $M$ is a graded $S$-module, then we define the $S_{(f)}$-module $M_{(f)}$ as the submodule of $M_f$ consisting of elements of the form $x/f^n$ with $x$ homogeneous of degree $nd$. \begin{lemma} \label{lemma-Z-graded} Let $S$ be a $\mathbf{Z}$-graded ring containing a homogeneous invertible element of positive degree. Then the set $G \subset \Spec(S)$ of $\mathbf{Z}$-graded primes of $S$ (with induced topology) maps homeomorphically to $\Spec(S_0)$. \end{lemma} \begin{proof} First we show that the map is a bijection by constructing an inverse. Let $f \in S_d$, $d > 0$ be invertible in $S$. If $\mathfrak p_0$ is a prime of $S_0$, then $\mathfrak p_0S$ is a $\mathbf{Z}$-graded ideal of $S$ such that $\mathfrak p_0S \cap S_0 = \mathfrak p_0$. And if $ab \in \mathfrak p_0S$ with $a$, $b$ homogeneous, then $a^db^d/f^{\deg(a) + \deg(b)} \in \mathfrak p_0$. Thus either $a^d/f^{\deg(a)} \in \mathfrak p_0$ or $b^d/f^{\deg(b)} \in \mathfrak p_0$, in other words either $a^d \in \mathfrak p_0S$ or $b^d \in \mathfrak p_0S$. It follows that $\sqrt{\mathfrak p_0S}$ is a $\mathbf{Z}$-graded prime ideal of $S$ whose intersection with $S_0$ is $\mathfrak p_0$. \medskip\noindent To show that the map is a homeomorphism we show that the image of $G \cap D(g)$ is open. If $g = \sum g_i$ with $g_i \in S_i$, then by the above $G \cap D(g)$ maps onto the set $\bigcup D(g_i^d/f^i)$ which is open. \end{proof} \noindent For $f \in S$ homogeneous of degree $> 0$ we define $$ D_{+}(f) = \{ \mathfrak p \in \text{Proj}(S) \mid f \not\in \mathfrak p \}. $$ Finally, for a homogeneous ideal $I \subset S$ we define $$ V_{+}(I) = \{ \mathfrak p \in \text{Proj}(S) \mid I \subset \mathfrak p \}. $$ We will use more generally the notation $V_{+}(E)$ for any set $E$ of homogeneous elements $E \subset S$. \begin{lemma}[Topology on Proj] \label{lemma-topology-proj} Let $S = \oplus_{d \geq 0} S_d$ be a graded ring. \begin{enumerate} \item The sets $D_{+}(f)$ are open in $\text{Proj}(S)$. \item We have $D_{+}(ff') = D_{+}(f) \cap D_{+}(f')$. \item Let $g = g_0 + \ldots + g_m$ be an element of $S$ with $g_i \in S_i$. Then $$ D(g) \cap \text{Proj}(S) = (D(g_0) \cap \text{Proj}(S)) \cup \bigcup\nolimits_{i \geq 1} D_{+}(g_i). $$ \item Let $g_0\in S_0$ be a homogeneous element of degree $0$. Then $$ D(g_0) \cap \text{Proj}(S) = \bigcup\nolimits_{f \in S_d, \ d\geq 1} D_{+}(g_0 f). $$ \item The open sets $D_{+}(f)$ form a basis for the topology of $\text{Proj}(S)$. \item Let $f \in S$ be homogeneous of positive degree. The ring $S_f$ has a natural $\mathbf{Z}$-grading. The ring maps $S \to S_f \leftarrow S_{(f)}$ induce homeomorphisms $$ D_{+}(f) \leftarrow \{\mathbf{Z}\text{-graded primes of }S_f\} \to \Spec(S_{(f)}). $$ \item There exists an $S$ such that $\text{Proj}(S)$ is not quasi-compact. \item The sets $V_{+}(I)$ are closed. \item Any closed subset $T \subset \text{Proj}(S)$ is of the form $V_{+}(I)$ for some homogeneous ideal $I \subset S$. \item For any graded ideal $I \subset S$ we have $V_{+}(I) = \emptyset$ if and only if $S_{+} \subset \sqrt{I}$. \end{enumerate} \end{lemma} \begin{proof} Since $D_{+}(f) = \text{Proj}(S) \cap D(f)$, these sets are open. This proves (1). Also (2) follows as $D(ff') = D(f) \cap D(f')$. Similarly the sets $V_{+}(I) = \text{Proj}(S) \cap V(I)$ are closed. This proves (8). \medskip\noindent Suppose that $T \subset \text{Proj}(S)$ is closed. Then we can write $T = \text{Proj}(S) \cap V(J)$ for some ideal $J \subset S$. By definition of a homogeneous ideal if $g \in J$, $g = g_0 + \ldots + g_m$ with $g_d \in S_d$ then $g_d \in \mathfrak p$ for all $\mathfrak p \in T$. Thus, letting $I \subset S$ be the ideal generated by the homogeneous parts of the elements of $J$ we have $T = V_{+}(I)$. This proves (9). \medskip\noindent The formula for $\text{Proj}(S) \cap D(g)$, with $g \in S$ is direct from the definitions. This proves (3). Consider the formula for $\text{Proj}(S) \cap D(g_0)$. The inclusion of the right hand side in the left hand side is obvious. For the other inclusion, suppose $g_0 \not \in \mathfrak p$ with $\mathfrak p \in \text{Proj}(S)$. If all $g_0f \in \mathfrak p$ for all homogeneous $f$ of positive degree, then we see that $S_{+} \subset \mathfrak p$ which is a contradiction. This gives the other inclusion. This proves (4). \medskip\noindent The collection of opens $D(g) \cap \text{Proj}(S)$ forms a basis for the topology since the standard opens $D(g) \subset \Spec(S)$ form a basis for the topology on $\Spec(S)$. By the formulas above we can express $D(g) \cap \text{Proj}(S)$ as a union of opens $D_{+}(f)$. Hence the collection of opens $D_{+}(f)$ forms a basis for the topology also. This proves (5). \medskip\noindent Proof of (6). First we note that $D_{+}(f)$ may be identified with a subset (with induced topology) of $D(f) = \Spec(S_f)$ via Lemma \ref{lemma-standard-open}. Note that the ring $S_f$ has a $\mathbf{Z}$-grading. The homogeneous elements are of the form $r/f^n$ with $r \in S$ homogeneous and have degree $\deg(r/f^n) = \deg(r) - n\deg(f)$. The subset $D_{+}(f)$ corresponds exactly to those prime ideals $\mathfrak p \subset S_f$ which are $\mathbf{Z}$-graded ideals (i.e., generated by homogeneous elements). Hence we have to show that the set of $\mathbf{Z}$-graded prime ideals of $S_f$ maps homeomorphically to $\Spec(S_{(f)})$. This follows from Lemma \ref{lemma-Z-graded}. \medskip\noindent Let $S = \mathbf{Z}[X_1, X_2, X_3, \ldots]$ with grading such that each $X_i$ has degree $1$. Then it is easy to see that $$ \text{Proj}(S) = \bigcup\nolimits_{i = 1}^\infty D_{+}(X_i) $$ does not have a finite refinement. This proves (7). \medskip\noindent Let $I \subset S$ be a graded ideal. If $\sqrt{I} \supset S_{+}$ then $V_{+}(I) = \emptyset$ since every prime $\mathfrak p \in \text{Proj}(S)$ does not contain $S_{+}$ by definition. Conversely, suppose that $S_{+} \not \subset \sqrt{I}$. Then we can find an element $f \in S_{+}$ such that $f$ is not nilpotent modulo $I$. Clearly this means that one of the homogeneous parts of $f$ is not nilpotent modulo $I$, in other words we may (and do) assume that $f$ is homogeneous. This implies that $I S_f \not = S_f$, in other words that $(S/I)_f$ is not zero. Hence $(S/I)_{(f)} \not = 0$ since it is a ring which maps into $(S/I)_f$. Pick a prime $\mathfrak q \subset (S/I)_{(f)}$. This corresponds to a graded prime of $S/I$, not containing the irrelevant ideal $(S/I)_{+}$. And this in turn corresponds to a graded prime ideal $\mathfrak p$ of $S$, containing $I$ but not containing $S_{+}$ as desired. This proves (10) and finishes the proof. \end{proof} \begin{example} \label{example-proj-polynomial-ring-1-variable} Let $R$ be a ring. If $S = R[X]$ with $\deg(X) = 1$, then the natural map $\text{Proj}(S) \to \Spec(R)$ is a bijection and in fact a homeomorphism. Namely, suppose $\mathfrak p \in \text{Proj}(S)$. Since $S_{+} \not \subset \mathfrak p$ we see that $X \not \in \mathfrak p$. Thus if $aX^n \in \mathfrak p$ with $a \in R$ and $n > 0$, then $a \in \mathfrak p$. It follows that $\mathfrak p = \mathfrak p_0S$ with $\mathfrak p_0 = \mathfrak p \cap R$. \end{example} \noindent If $\mathfrak p \in \text{Proj}(S)$, then we define $S_{(\mathfrak p)}$ to be the ring whose elements are fractions $r/f$ where $r, f \in S$ are homogeneous elements of the same degree such that $f \not\in \mathfrak p$. As usual we say $r/f = r'/f'$ if and only if there exists some $f'' \in S$ homogeneous, $f'' \not \in \mathfrak p$ such that $f''(rf' - r'f) = 0$. Given a graded $S$-module $M$ we let $M_{(\mathfrak p)}$ be the $S_{(\mathfrak p)}$-module whose elements are fractions $x/f$ with $x \in M$ and $f \in S$ homogeneous of the same degree such that $f \not \in \mathfrak p$. We say $x/f = x'/f'$ if and only if there exists some $f'' \in S$ homogeneous, $f'' \not \in \mathfrak p$ such that $f''(xf' - x'f) = 0$. \begin{lemma} \label{lemma-proj-prime} Let $S$ be a graded ring. Let $M$ be a graded $S$-module. Let $\mathfrak p$ be an element of $\text{Proj}(S)$. Let $f \in S$ be a homogeneous element of positive degree such that $f \not \in \mathfrak p$, i.e., $\mathfrak p \in D_{+}(f)$. Let $\mathfrak p' \subset S_{(f)}$ be the element of $\Spec(S_{(f)})$ corresponding to $\mathfrak p$ as in Lemma \ref{lemma-topology-proj}. Then $S_{(\mathfrak p)} = (S_{(f)})_{\mathfrak p'}$ and compatibly $M_{(\mathfrak p)} = (M_{(f)})_{\mathfrak p'}$. \end{lemma} \begin{proof} We define a map $\psi : M_{(\mathfrak p)} \to (M_{(f)})_{\mathfrak p'}$. Let $x/g \in M_{(\mathfrak p)}$. We set $$ \psi(x/g) = (x g^{\deg(f) - 1}/f^{\deg(x)})/(g^{\deg(f)}/f^{\deg(g)}). $$ This makes sense since $\deg(x) = \deg(g)$ and since $g^{\deg(f)}/f^{\deg(g)} \not \in \mathfrak p'$. We omit the verification that $\psi$ is well defined, a module map and an isomorphism. Hint: the inverse sends $(x/f^n)/(g/f^m)$ to $(xf^m)/(g f^n)$. \end{proof} \begin{lemma} \label{lemma-graded-ext-proj-prime} \begin{reference} \cite[Chapter III, \S 5, no. 73, Proposition 1(b) and proof, pp. 267--268]{FAC} \end{reference} \begin{history} The cited source takes $S=K[t_0,\ldots,t_r]$, writes the degree-zero homogeneous localization at a projective point as a subscript $x$, and computes internal graded Ext from a resolution finite graded free in every degree. It localizes the cocycle and coboundary sequences and observes that every localized twist is free over the local ring. The statement below isolates exactly that argument for a Noetherian graded ring generated in degree one and includes all scheme points of $\operatorname{Proj}(S)$. This is not ordinary localization at the homogeneous prime. Both the ring $S_{(\mathfrak p)}$ and every module on the right are the degree-zero parts of homogeneous localizations. The degree-one hypothesis is what makes every graded free twist become free after applying this functor. \end{history} Let $S$ be a Noetherian graded ring generated by $S_1$ over $S_0$. Let $M$ be a finite graded $S$-module and let $N$ be a graded $S$-module. For $\mathfrak p\in\operatorname{Proj}(S)$ and $q\geq0$, the canonical map $$ \left(\text{GrExt}^q_S(M,N)\right)_{(\mathfrak p)} \longrightarrow \Ext^q_{S_{(\mathfrak p)}} \left(M_{(\mathfrak p)},N_{(\mathfrak p)}\right) $$ is an isomorphism. In degree zero it sends a homogeneous fraction $\varphi/g$ to the homomorphism $$ \frac{x}{h}\longmapsto\frac{\varphi(x)}{gh}. $$ \end{lemma} \begin{proof} Choose $f\in S_1\setminus\mathfrak p$; such an $f$ exists because $S$ is generated in degree one and $\mathfrak p$ does not contain $S_+$. Choose a graded free resolution $L_\bullet\to M$ which is finite graded free in every degree, as supplied by Lemma \ref{lemma-graded-free-resolutions}. The functor $P\mapsto P_{(\mathfrak p)}$ is exact. Indeed, after first taking degree-zero localization at $f$, Lemma \ref{lemma-proj-prime} identifies it with ordinary localization at the corresponding prime of $S_{(f)}$. Moreover, each $L_i{}_{(\mathfrak p)}$ is finite free over $S_{(\mathfrak p)}$: in the homogeneous localization $f$ is an invertible element of degree one, so multiplication by a suitable integral power of $f$ identifies the degree-zero part of every twist $S(a)$ with $S_{(\mathfrak p)}$. Set $C^q=\text{GrHom}(L_q,N)$, and let $Z^q$ and $B^q$ be its cocycles and coboundaries. The exact sequences $$ 0\longrightarrow Z^q\longrightarrow C^q\longrightarrow B^{q+1} \longrightarrow0, \qquad 0\longrightarrow B^q\longrightarrow Z^q\longrightarrow \text{GrExt}^q_S(M,N)\longrightarrow0 $$ remain exact after applying $P\mapsto P_{(\mathfrak p)}$. For every finite graded free $L_i$, the canonical map $$ \text{GrHom}(L_i,N)_{(\mathfrak p)} \longrightarrow \Hom_{S_{(\mathfrak p)}} \left(L_i{}_{(\mathfrak p)},N_{(\mathfrak p)}\right) $$ is an isomorphism. This can be checked on one twist, where it is the displayed fraction formula, and then on a finite direct sum. These maps commute with the differentials. The displayed exact sequences identify the cohomology of the complex on the left with $\text{GrExt}^q_S(M,N)_{(\mathfrak p)}$. The localized complex $L_\bullet{}_{(\mathfrak p)}$ is a free resolution of $M_{(\mathfrak p)}$, so the cohomology of the complex on the right is the displayed module Ext group. \end{proof} \noindent Here is a graded variant of Lemma \ref{lemma-silly}. \begin{lemma} \label{lemma-graded-silly} Suppose $S$ is a graded ring, $\mathfrak p_i$, $i = 1, \ldots, r$ homogeneous prime ideals and $I \subset S_{+}$ a graded ideal. Assume $I \not\subset \mathfrak p_i$ for all $i$. Then there exists a homogeneous element $x\in I$ of positive degree such that $x\not\in \mathfrak p_i$ for all $i$. \end{lemma} \begin{proof} We may assume there are no inclusions among the $\mathfrak p_i$. The result is true for $r = 1$. Suppose the result holds for $r - 1$. Pick $x \in I$ homogeneous of positive degree such that $x \not \in \mathfrak p_i$ for all $i = 1, \ldots, r - 1$. If $x \not\in \mathfrak p_r$ we are done. So assume $x \in \mathfrak p_r$. If $I \mathfrak p_1 \ldots \mathfrak p_{r-1} \subset \mathfrak p_r$ then $I \subset \mathfrak p_r$ a contradiction. Pick $y \in I\mathfrak p_1 \ldots \mathfrak p_{r-1}$ homogeneous and $y \not \in \mathfrak p_r$. Then $x^{\deg(y)} + y^{\deg(x)}$ works. \end{proof} \begin{lemma} \label{lemma-smear-out} Let $S$ be a graded ring. Let $\mathfrak p \subset S$ be a prime. Let $\mathfrak q$ be the homogeneous ideal of $S$ generated by the homogeneous elements of $\mathfrak p$. Then $\mathfrak q$ is a prime ideal of $S$. \end{lemma} \begin{proof} To prove that $\mathfrak q$ is prime, it suffices to check that if $f, g \in S$ are homogeneous and $fg \in \mathfrak q$, then either $f$ or $g$ is in $\mathfrak q$. Then $fg \in \mathfrak p$ because $\mathfrak q \subset \mathfrak p$. Since $\mathfrak p$ is prime we see that either $f \in \mathfrak p$ or $g \in \mathfrak p$. Since $f$ and $g$ are homogeneous, it then is clear that either $f \in \mathfrak q$ or $g \in \mathfrak q$. \end{proof} \begin{lemma} \label{lemma-graded-ring-minimal-prime} Let $S$ be a graded ring. \begin{enumerate} \item Any minimal prime of $S$ is a homogeneous ideal of $S$. \item Given a homogeneous ideal $I \subset S$ any minimal prime over $I$ is homogeneous. \end{enumerate} \end{lemma} \begin{proof} The first assertion holds because the prime $\mathfrak q$ constructed in Lemma \ref{lemma-smear-out} satisfies $\mathfrak q \subset \mathfrak p$. The second follows because we may consider $S/I$ and apply the first part. \end{proof} \begin{lemma} \label{lemma-dehomogenize-finite-type} Let $R$ be a ring. Let $S$ be a graded $R$-algebra. Let $f \in S_{+}$ be homogeneous. Assume that $S$ is of finite type over $R$. Then \begin{enumerate} \item the ring $S_{(f)}$ is of finite type over $R$, and \item for any finite graded $S$-module $M$ the module $M_{(f)}$ is a finite $S_{(f)}$-module. \end{enumerate} \end{lemma} \begin{proof} Choose $f_1, \ldots, f_n \in S$ which generate $S$ as an $R$-algebra. We may assume that each $f_i$ is homogeneous (by decomposing each $f_i$ into its homogeneous components). An element of $S_{(f)}$ is a sum of the form $$ \sum\nolimits_{e\deg(f) = \sum e_i\deg(f_i)} \lambda_{e_1 \ldots e_n} f_1^{e_1} \ldots f_n^{e_n}/f^e $$ with $\lambda_{e_1 \ldots e_n} \in R$. Thus $S_{(f)}$ is generated as an $R$-algebra by the $f_1^{e_1} \ldots f_n^{e_n} /f^e$ with the property that $e\deg(f) = \sum e_i\deg(f_i)$. If $e_i \geq \deg(f)$ then we can write this as $$ f_1^{e_1} \ldots f_n^{e_n}/f^e = f_i^{\deg(f)}/f^{\deg(f_i)} \cdot f_1^{e_1} \ldots f_i^{e_i - \deg(f)} \ldots f_n^{e_n}/f^{e - \deg(f_i)} $$ Thus we only need the elements $f_i^{\deg(f)}/f^{\deg(f_i)}$ as well as the elements $f_1^{e_1} \ldots f_n^{e_n} /f^e$ with $e \deg(f) = \sum e_i \deg(f_i)$ and $e_i < \deg(f)$. This is a finite list and we see that (1) is true. \medskip\noindent To see (2) suppose that $M$ is generated by homogeneous elements $x_1, \ldots, x_m$. Then arguing as above we find that $M_{(f)}$ is generated as an $S_{(f)}$-module by the finite list of elements of the form $f_1^{e_1} \ldots f_n^{e_n} x_j /f^e$ with $e \deg(f) = \sum e_i \deg(f_i) + \deg(x_j)$ and $e_i < \deg(f)$; a fraction with $e < 0$ denotes its numerator multiplied by $f^{-e}$. \end{proof} \begin{lemma} \label{lemma-homogenize} Let $R$ be a ring. Let $R'$ be a finite type $R$-algebra, and let $M$ be a finite $R'$-module. There exists a graded $R$-algebra $S$, a graded $S$-module $N$ and an element $f \in S$ homogeneous of degree $1$ such that \begin{enumerate} \item $R' \cong S_{(f)}$ and $M \cong N_{(f)}$ (as modules), \item $S_0 = R$ and $S$ is generated by finitely many elements of degree $1$ over $R$, and \item $N$ is a finite $S$-module. \end{enumerate} \end{lemma} \begin{proof} We may write $R' = R[x_1, \ldots, x_n]/I$ for some ideal $I$. For an element $g \in R[x_1, \ldots, x_n]$ choose a homogeneous polynomial $\tilde g \in R[X_0, \ldots, X_n]$ of a specified positive degree such that $g = \tilde g(1, x_1, \ldots, x_n)$. Let $\tilde I \subset R[X_0, \ldots, X_n]$ be generated by all elements $\tilde g$, $g \in I$. Set $S = R[X_0, \ldots, X_n]/\tilde I$ and denote by $f$ the image of $X_0$ in $S$. By construction we have an isomorphism $$ S_{(f)} \longrightarrow R', \quad X_i/X_0 \longmapsto x_i. $$ To do the same thing with the module $M$ we choose a presentation with $r \geq 1$ $$ M = (R')^{\oplus r}/\sum\nolimits_{j \in J} R'k_j $$ with $k_j = (k_{1j}, \ldots, k_{rj})$. Choose polynomial lifts $h_{ij}$ of the $k_{ij}$ and assign positive degrees $d_{ij}$ to their homogenizations $\tilde h_{ij}$, including zero entries. Set $d_j = \max\{d_{ij}\}$. Set $K_{ij} = X_0^{d_j - d_{ij}}\tilde h_{ij}$ which is homogeneous of degree $d_j$. With this notation we set $$ N = \Coker\Big( \bigoplus\nolimits_{j \in J} S(-d_j) \xrightarrow{(K_{ij})} S^{\oplus r} \Big) $$ which works. Some details omitted. \end{proof} \section{Noetherian graded rings} \label{section-noetherian-graded} % BEGIN ALGEBRA EDITORIAL ROUTE section-noetherian-graded \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-noetherian-graded}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-noetherian-graded \noindent A bit of theory on Noetherian graded rings including some material on Hilbert polynomials. \begin{lemma} \label{lemma-S-plus-generated} Let $S$ be a graded ring. A set of homogeneous elements $f_i \in S_{+}$ generates $S$ as an algebra over $S_0$ if and only if they generate $S_{+}$ as an ideal of $S$. \end{lemma} \begin{proof} If the $f_i$ generate $S$ as an algebra over $S_0$ then every element in $S_{+}$ is a polynomial without constant term in the $f_i$ and hence $S_{+}$ is generated by the $f_i$ as an ideal. Conversely, suppose that $S_{+} = \sum Sf_i$. We will prove that any element $f$ of $S$ can be written as a polynomial in the $f_i$ with coefficients in $S_0$. It suffices to do this for homogeneous elements. Say $f$ has degree $d$. Then we may perform induction on $d$. The case $d = 0$ is immediate. If $d > 0$ then $f \in S_{+}$ hence we can write $f = \sum g_i f_i$ for some $g_i \in S$. As $S$ is graded we can replace $g_i$ by its homogeneous component of degree $d - \deg(f_i)$. By induction we see that each $g_i$ is a polynomial in the $f_i$ and we win. \end{proof} \begin{lemma} \label{lemma-graded-Noetherian} A graded ring $S$ is Noetherian if and only if $S_0$ is Noetherian and $S_{+}$ is finitely generated as an ideal of $S$. \end{lemma} \begin{proof} 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}. \end{proof} \begin{definition} \label{definition-numerical-polynomial} Let $A$ be an abelian group. We say that a function $f : n \mapsto f(n) \in A$ defined for all sufficiently large integers $n$ is a {\it numerical polynomial} if there exists $r \geq 0$, elements $a_0, \ldots, a_r\in A$ such that $$ f(n) = \sum\nolimits_{i = 0}^r \binom{n}{i} a_i $$ for all $n \gg 0$. \end{definition} \noindent The reason for using the binomial coefficients is the elementary fact that any polynomial $P \in \mathbf{Q}[T]$ all of whose values at integer points are integers, is equal to a sum $P(T) = \sum a_i \binom{T}{i}$ with $a_i \in \mathbf{Z}$. Note that in particular the expressions $\binom{T + 1}{i + 1}$ are of this form. \begin{lemma} \label{lemma-numerical-polynomial-functorial} If $A \to A'$ is a homomorphism of abelian groups and if $f : n \mapsto f(n) \in A$ is a numerical polynomial, then so is the composition. \end{lemma} \begin{proof} This is immediate from the definitions. \end{proof} \begin{lemma} \label{lemma-numerical-polynomial} Suppose that $f: n \mapsto f(n) \in A$ is defined for all $n$ sufficiently large and suppose that $n \mapsto f(n) - f(n-1)$ is a numerical polynomial. Then $f$ is a numerical polynomial. \end{lemma} \begin{proof} Let $f(n) - f(n-1) = \sum\nolimits_{i = 0}^r \binom{n}{i} a_i$ for all $n \gg 0$. Set $g(n) = f(n) - \sum\nolimits_{i = 0}^r \binom{n + 1}{i + 1} a_i$. Then $g(n) - g(n-1) = 0$ for all $n \gg 0$. Hence $g$ is eventually constant, say equal to $a_{-1}$. We leave it to the reader to show that $a_{-1} + \sum\nolimits_{i = 0}^r \binom{n + 1}{i + 1} a_i$ has the required shape (see remark above the lemma). \end{proof} \begin{lemma} \label{lemma-graded-module-fg} If $M$ is a finitely generated graded $S$-module, and if $S$ is finitely generated over $S_0$, then each $M_n$ is a finite $S_0$-module. \end{lemma} \begin{proof} Suppose the generators of $M$ are $m_i$ and the generators of $S$ are $f_i$. By taking homogeneous components we may assume that the $m_i$ and the $f_i$ are homogeneous and we may assume $f_i \in S_{+}$. In this case it is clear that each $M_n$ is generated over $S_0$ by the ``monomials'' $\prod f_i^{e_i} m_j$ whose degree is $n$. \end{proof} \begin{proposition} \label{proposition-graded-hilbert-polynomial} Suppose that $S$ is a Noetherian graded ring and $M$ a finite graded $S$-module. Consider the function $$ \mathbf{Z} \longrightarrow K'_0(S_0), \quad n \longmapsto [M_n] $$ see Lemma \ref{lemma-graded-module-fg}. If $S_{+}$ is generated by elements of degree $1$, then this function is a numerical polynomial. \end{proposition} \begin{proof} We prove this by induction on the minimal number of generators of $S_1$. If this number is $0$, then $M_n = 0$ for all $n \gg 0$ and the result holds. To prove the induction step, let $x\in S_1$ be one of a minimal set of generators, such that the induction hypothesis applies to the graded ring $S/(x)$. \medskip\noindent First we show the result holds if $x$ is nilpotent on $M$. This we do by induction on the minimal integer $r$ such that $x^r M = 0$. If $r = 1$, then $M$ is a module over $S/xS$ and the result holds (by the other induction hypothesis). If $r > 1$, then we can find a short exact sequence $0 \to M' \to M \to M'' \to 0$ with $M' = xM$ and $M'' = M/xM$. Their least positive nilpotence exponents satisfy $r' \leq r - 1 < r$ and $r'' = 1 < r$. Thus we know the result for $M''$ and $M'$. Hence we get the result for $M$ because of the relation $ [M_d] = [M'_d] + [M''_d] $ in $K'_0(S_0)$. \medskip\noindent If $x$ is not nilpotent on $M$, let $M' \subset M$ be the largest submodule on which $x$ is nilpotent. Consider the exact sequence $0 \to M' \to M \to M/M' \to 0$ we see again it suffices to prove the result for $M/M'$. In other words we may assume that multiplication by $x$ is injective. \medskip\noindent Let $\overline{M} = M/xM$. Note that the map $x : M \to M$ is {\it not} a map of graded $S$-modules, since it does not map $M_d$ into $M_d$. Namely, for each $d$ we have the following short exact sequence $$ 0 \to M_d \xrightarrow{x} M_{d + 1} \to \overline{M}_{d + 1} \to 0 $$ This proves that $[M_{d + 1}] - [M_d] = [\overline{M}_{d + 1}]$. Hence we win by Lemma \ref{lemma-numerical-polynomial}. \end{proof} \begin{remark} \label{remark-period-polynomial} If $S$ is still Noetherian but $S$ is not generated in degree $1$, then the function associated to a graded $S$-module is a periodic polynomial (i.e., it is a numerical polynomial on the congruence classes of integers modulo $n$ for some $n$). \end{remark} \begin{example} \label{example-hilbert-function} Suppose that $S = k[X_1, \ldots, X_d]$. By Example \ref{example-K0-field} we may identify $K_0(k) = K'_0(k) = \mathbf{Z}$. Hence any finitely generated graded $k[X_1, \ldots, X_d]$-module gives rise to a numerical polynomial $n \mapsto \dim_k(M_n)$. \end{example} \begin{lemma} \label{lemma-quotient-smaller-d} Let $k$ be a field. Suppose that $I \subset k[X_1, \ldots, X_d]$ is a nonzero graded ideal. Let $M = k[X_1, \ldots, X_d]/I$. Then the numerical polynomial $n \mapsto \dim_k(M_n)$ (see Example \ref{example-hilbert-function}) has degree $ < d - 1$ (or is zero if $d = 1$). \end{lemma} \begin{proof} The numerical polynomial associated to the graded module $k[X_1, \ldots, X_d]$ is $n \mapsto \binom{n - 1 + d}{d - 1}$. For any nonzero homogeneous $f \in I$ of degree $e$ and any degree $n \gg e$ we have $I_n \supset f \cdot k[X_1, \ldots, X_d]_{n-e}$ and hence $\dim_k(I_n) \geq \binom{n - e - 1 + d}{d - 1}$. Hence $\dim_k(M_n) \leq \binom{n - 1 + d}{d - 1} - \binom{n - e - 1 + d}{d - 1}$. We win because the last expression has degree $ < d - 1$ (or is zero if $d = 1$). \end{proof} \section{Noetherian local rings} \label{section-Noetherian-local} % BEGIN ALGEBRA EDITORIAL ROUTE section-Noetherian-local \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Noetherian-local}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Noetherian-local \noindent In all of this section $(R, \mathfrak m, \kappa)$ is a Noetherian local ring. We develop some theory on Hilbert functions of modules in this section. Let $M$ be a finite $R$-module. We define the {\it Hilbert function} of $M$ to be the function $$ \varphi_M : n \longmapsto \text{length}_R(\mathfrak m^nM/{\mathfrak m}^{n + 1}M) $$ defined for all integers $n \geq 0$. Another important invariant is the function $$ \chi_M : n \longmapsto \text{length}_R(M/{\mathfrak m}^{n + 1}M) $$ defined for all integers $n \geq 0$. Note that we have by Lemma \ref{lemma-length-additive} that $$ \chi_M(n) = \sum\nolimits_{i = 0}^n \varphi_M(i). $$ There is a variant of this construction which uses an ideal of definition. \begin{definition} \label{definition-ideal-definition} Let $(R, \mathfrak m)$ be a local Noetherian ring. An ideal $I \subset R$ such that $\sqrt{I} = \mathfrak m$ is called {\it an ideal of definition of $R$}. \end{definition} \noindent Let $I \subset R$ be an ideal of definition. Because $R$ is Noetherian this means that $\mathfrak m^r \subset I$ for some $r$, see Lemma \ref{lemma-Noetherian-power}. Hence any finite $R$-module annihilated by a power of $I$ has finite length, see Lemma \ref{lemma-length-finite}. Thus it makes sense to define $$ \varphi_{I, M}(n) = \text{length}_R(I^nM/I^{n + 1}M) \quad\text{and}\quad \chi_{I, M}(n) = \text{length}_R(M/I^{n + 1}M) $$ for all $n \geq 0$. Again we have that $$ \chi_{I, M}(n) = \sum\nolimits_{i = 0}^n \varphi_{I, M}(i). $$ \begin{lemma} \label{lemma-differ-finite} Suppose that $M' \subset M$ are finite $R$-modules with finite length quotient. Then there exist constants $c_1, c_2$ such that for all $n \geq c_2$ we have $$ c_1 + \chi_{I, M'}(n - c_2) \leq \chi_{I, M}(n) \leq c_1 + \chi_{I, M'}(n) $$ \end{lemma} \begin{proof} Since $M/M'$ has finite length there is a $c_2 \geq 0$ such that $I^{c_2}M \subset M'$. Let $c_1 = \text{length}_R(M/M')$. For $n \geq c_2$ we have \begin{eqnarray*} \chi_{I, M}(n) & = & \text{length}_R(M/I^{n + 1}M) \\ & = & c_1 + \text{length}_R(M'/I^{n + 1}M) \\ & \leq & c_1 + \text{length}_R(M'/I^{n + 1}M') \\ & = & c_1 + \chi_{I, M'}(n) \end{eqnarray*} On the other hand, since $I^{c_2}M \subset M'$, we have $I^nM \subset I^{n - c_2}M'$ for $n \geq c_2$. Thus for $n \geq c_2$ we get \begin{eqnarray*} \chi_{I, M}(n) & = & \text{length}_R(M/I^{n + 1}M) \\ & = & c_1 + \text{length}_R(M'/I^{n + 1}M) \\ & \geq & c_1 + \text{length}_R(M'/I^{n + 1 - c_2}M') \\ & = & c_1 + \chi_{I, M'}(n - c_2) \end{eqnarray*} which finishes the proof. \end{proof} \begin{lemma} \label{lemma-hilbert-ses} Suppose that $0 \to M' \to M \to M'' \to 0$ is a short exact sequence of finite $R$-modules. Then there exists a submodule $N \subset M'$ with finite colength $l$ and $c \geq 0$ such that $$ \chi_{I, M}(n) = \chi_{I, M''}(n) + \chi_{I, N}(n - c) + l $$ and $$ \varphi_{I, M}(n) = \varphi_{I, M''}(n) + \varphi_{I, N}(n - c) $$ for all $n \geq c$. \end{lemma} \begin{proof} 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$, with the convention $\chi_{I,Q}(-1)=0$ for any finite $R$-module $Q$. 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$. \end{proof} \begin{lemma} \label{lemma-hilbert-change-I} Suppose that $I$, $I'$ are two ideals of definition for the Noetherian local ring $R$. Let $M$ be a finite $R$-module. There exists a constant $a$ such that $\chi_{I, M}(n) \leq \chi_{I', M}(an)$ for $n \geq 1$. \end{lemma} \begin{proof} There exists an integer $c \geq 1$ such that $(I')^c \subset I$. Hence we get a surjection $M/(I')^{c(n + 1)}M \to M/I^{n + 1}M$. Whence the result with $a = 2c - 1$. \end{proof} \begin{proposition} \label{proposition-hilbert-function-polynomial} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module. Let $I \subset R$ be an ideal of definition. The Hilbert function $\varphi_{I, M}$ and the function $\chi_{I, M}$ are numerical polynomials. \end{proposition} \begin{proof} Consider the graded ring $S = R/I \oplus I/I^2 \oplus I^2/I^3 \oplus \ldots = \bigoplus_{d \geq 0} I^d/I^{d + 1}$. Consider the graded $S$-module $N = M/IM \oplus IM/I^2M \oplus \ldots = \bigoplus_{d \geq 0} I^dM/I^{d + 1}M$. This pair $(S, N)$ satisfies the hypotheses of Proposition \ref{proposition-graded-hilbert-polynomial}. Hence the result for $\varphi_{I, M}$ follows from that proposition and Lemma \ref{lemma-length-K0}. The result for $\chi_{I, M}$ follows from this and Lemma \ref{lemma-numerical-polynomial}. \end{proof} \begin{definition} \label{definition-hilbert-polynomial} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module. The {\it Hilbert polynomial} of $M$ over $R$ is the element $P(t) \in \mathbf{Q}[t]$ such that $P(n) = \varphi_M(n)$ for $n \gg 0$. \end{definition} \noindent By Proposition \ref{proposition-hilbert-function-polynomial} we see that the Hilbert polynomial exists. \begin{lemma} \label{lemma-d-independent} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module. \begin{enumerate} \item The degree of the numerical polynomial $\varphi_{I, M}$ is independent of the ideal of definition $I$. \item The degree of the numerical polynomial $\chi_{I, M}$ is independent of the ideal of definition $I$. \end{enumerate} \end{lemma} \begin{proof} Part (2) follows immediately from Lemma \ref{lemma-hilbert-change-I}. Part (1) follows from (2) because $\varphi_{I, M}(n) = \chi_{I, M}(n) - \chi_{I, M}(n - 1)$ for $n \geq 1$. \end{proof} \begin{definition} \label{definition-d} Let $R$ be a local Noetherian ring and $M$ a finite $R$-module. We denote {\it $d(M)$} the element of $\{-\infty, 0, 1, 2, \ldots \}$ defined as follows: \begin{enumerate} \item If $M = 0$ we set $d(M) = -\infty$, \item if $M \not = 0$ then $d(M)$ is the degree of the numerical polynomial $\chi_M$. \end{enumerate} \end{definition} \noindent If $\mathfrak m^nM \not = 0$ for all $n$, then we see that $d(M)$ is the degree $+1$ of the Hilbert polynomial of $M$. \begin{lemma} \label{lemma-differ-finite-chi} Let $R$ be a Noetherian local ring. Let $I \subset R$ be an ideal of definition. Let $M$ be a finite $R$-module which does not have finite length. If $M' \subset M$ is a submodule with finite colength, then $\chi_{I, M} - \chi_{I, M'}$ is a polynomial of degree $<$ the degree of either polynomial. \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-differ-finite} by elementary calculus. \end{proof} \begin{lemma} \label{lemma-hilbert-ses-chi} Let $R$ be a Noetherian local ring. Let $I \subset R$ be an ideal of definition. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of finite $R$-modules. Then \begin{enumerate} \item if $M'$ does not have finite length, then $\chi_{I, M} - \chi_{I, M''} - \chi_{I, M'}$ is a numerical polynomial of degree $<$ the degree of $\chi_{I, M'}$, \item $\max\{ \deg(\chi_{I, M'}), \deg(\chi_{I, M''}) \} = \deg(\chi_{I, M})$, and \item $\max\{d(M'), d(M'')\} = d(M)$, \end{enumerate} \end{lemma} \begin{proof} 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. \end{proof} \section{Dimension} \label{section-dimension} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension \noindent Please compare with Topology, Section \ref{topology-section-krull-dimension}. \begin{definition} \label{definition-chain-primes} Let $R$ be a ring. A {\it chain of prime ideals} is a sequence $\mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_n$ of prime ideals of $R$ such that $\mathfrak p_i \not = \mathfrak p_{i + 1}$ for $i = 0, \ldots, n - 1$. The {\it length} of this chain of prime ideals is $n$. \end{definition} \noindent Recall that we have an inclusion reversing bijection between prime ideals of a ring $R$ and irreducible closed subsets of $\Spec(R)$, see Lemma \ref{lemma-irreducible}. \begin{definition} \label{definition-Krull} The {\it Krull dimension} of the ring $R$ is the Krull dimension of the topological space $\Spec(R)$, see Topology, Definition \ref{topology-definition-Krull}. In other words it is the supremum of the integers $n\geq 0$ such that $R$ has a chain of prime ideals $$ \mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_n, \quad \mathfrak p_i \not = \mathfrak p_{i + 1} $$ of length $n$. \end{definition} \begin{definition} \label{definition-height} The {\it height} of a prime ideal $\mathfrak p$ of a ring $R$ is the dimension of the local ring $R_{\mathfrak p}$. \end{definition} \begin{lemma} \label{lemma-dimension-height} The Krull dimension of $R$ is the supremum of the heights of its (maximal) primes. \end{lemma} \begin{proof} This is so because we can always add a maximal ideal at the end of a chain of prime ideals. \end{proof} \begin{lemma} \label{lemma-Noetherian-dimension-0} A Noetherian ring of dimension $0$ is Artinian. Conversely, any Artinian ring is Noetherian of dimension at most zero. \end{lemma} \begin{proof} Assume $R$ is a Noetherian ring of dimension $0$. 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 \cup Z_r$. According to Lemma \ref{lemma-irreducible} each $Z_i = V(\mathfrak p_i)$ with $\mathfrak p_i$ a minimal prime 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 $\bigcap \mathfrak p_i$ are nilpotent since otherwise $R_f$ would not be the zero ring and we would have another prime. By Lemma \ref{lemma-product-local} $R$ is equal to $\prod R_{\mathfrak p_i}$. Since $R_{\mathfrak p_i}$ is also Noetherian and dimension $0$, the previous arguments show that its radical $\mathfrak p_iR_{\mathfrak p_i}$ is locally nilpotent. Lemma \ref{lemma-Noetherian-power} gives $\mathfrak p_i^nR_{\mathfrak p_i} = 0$ for some $n \geq 1$. By Lemma \ref{lemma-length-finite} we conclude that $R_{\mathfrak p_i}$ has finite length over $R$. Hence we conclude that $R$ is Artinian by Lemma \ref{lemma-artinian-finite-length}. \medskip\noindent If $R$ is an Artinian ring 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}. \end{proof} \noindent In the following we will use the invariant $d(-)$ defined in Definition \ref{definition-d}. Here is a warm up lemma. \begin{lemma} \label{lemma-dimension-0-d-0} Let $R$ be a Noetherian local ring. Then $\dim(R) = 0 \Leftrightarrow d(R) = 0$. \end{lemma} \begin{proof} This is because $d(R) = 0$ if and only if $R$ has finite length as an $R$-module. See Lemma \ref{lemma-artinian-finite-length}. \end{proof} \begin{proposition} \label{proposition-dimension-zero-ring} Let $R$ be a ring. The following are equivalent: \begin{enumerate} \item $R$ is Artinian, \item $R$ is Noetherian and $\dim(R) \leq 0$, \item $R$ has finite length as a module over itself, \item $R$ is a finite product of Artinian local rings, \item $R$ is Noetherian and $\Spec(R)$ is a finite discrete topological space, \item $R$ is a finite product of Noetherian local rings of dimension $0$, \item $R$ is a finite product of Noetherian local rings $R_i$ with $d(R_i) = 0$, \item $R$ is a finite product of Noetherian local rings $R_i$ whose maximal ideals are nilpotent, \item $R$ is Noetherian, has finitely many maximal ideals and its Jacobson radical ideal is nilpotent, and \item $R$ is Noetherian and there are no strict inclusions among its primes. \end{enumerate} \end{proposition} \begin{proof} This is a combination of Lemmas \ref{lemma-product-local}, \ref{lemma-artinian-finite-length}, \ref{lemma-Noetherian-dimension-0}, and \ref{lemma-dimension-0-d-0}. \end{proof} \begin{lemma} \label{lemma-height-1} Let $R$ be a local Noetherian ring. The following are equivalent: \begin{enumerate} \item \label{item-dim-1} $\dim(R) = 1$, \item \label{item-d-1} $d(R) = 1$, \item \label{item-Vx} there exists an $x \in \mathfrak m$, $x$ not nilpotent such that $V(x) = \{\mathfrak m\}$, \item \label{item-x} there exists an $x \in \mathfrak m$, $x$ not nilpotent such that $\mathfrak m = \sqrt{(x)}$, and \item \label{item-ideal-1} there exists an ideal of definition generated by $1$ element, and no ideal of definition is generated by $0$ elements. \end{enumerate} \end{lemma} \begin{proof} 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 directly from 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 \xrightarrow{x} 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. \end{proof} \begin{proposition} \label{proposition-dimension} Let $R$ be a local Noetherian ring. Let $d \geq 0$ be an integer. The following are equivalent: \begin{enumerate} \item \label{item-dim-d} $\dim(R) = d$, \item \label{item-d-d} $d(R) = d$, \item \label{item-ideal-d} there exists an ideal of definition generated by $d$ elements, and no ideal of definition is generated by fewer than $d$ elements. \end{enumerate} \end{proposition} \begin{proof} This proof is really just the same as the proof of Lemma \ref{lemma-height-1}. We will prove the proposition by induction on $d$. By Lemmas \ref{lemma-dimension-0-d-0} and \ref{lemma-height-1} we may assume that $d > 1$. Denote the minimal number of generators for an ideal of definition of $R$ by $d'(R)$. We will prove the inequalities $\dim(R) \geq d'(R) \geq d(R) \geq \dim(R)$, and hence they are all equal. \medskip\noindent First, assume that $\dim(R) = d$. Let $\mathfrak p_i$ be the minimal primes of $R$. 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}. Note that every maximal chain of primes starts with some $\mathfrak p_i$, hence the dimension of $R/xR$ is at most $d-1$. By induction there are $x_2, \ldots, x_d$ which generate an ideal of definition in $R/xR$. Hence $R$ has an ideal of definition generated by (at most) $d$ elements. \medskip\noindent Assume $d'(R) = d$. Let $I = (x_1, \ldots, x_d)$ be an ideal of definition. Note that $I^n/I^{n + 1}$ is a quotient of a direct sum of $\binom{d + n - 1}{d - 1}$ copies $R/I$ via multiplication by all degree $n$ monomials in $x_1, \ldots, x_d$. Hence $\text{length}_R(I^n/I^{n + 1})$ is bounded by a polynomial of degree $d-1$. Thus $d(R) \leq d$. \medskip\noindent Assume $d(R) = d$. Consider a chain of primes $\mathfrak p \subset \mathfrak q \subset \mathfrak q_2 \subset \ldots \subset \mathfrak q_e = \mathfrak m$, with all inclusions strict, and $e \geq 2$. 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 d$. 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 \xrightarrow{x} 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 $ < d$. In other words, $d(R/(xR + \mathfrak p)) \leq d - 1$, and hence $\dim(R/(xR + \mathfrak p)) \leq d - 1$, by induction. Now $R/(xR + \mathfrak p)$ has the chain of prime ideals $\mathfrak q/(xR + \mathfrak p) \subset \mathfrak q_2/(xR + \mathfrak p) \subset \ldots \subset \mathfrak q_e/(xR + \mathfrak p)$ which gives $e - 1 \leq d - 1$. Since we started with an arbitrary chain of primes this proves that $\dim(R) \leq d(R)$. \medskip\noindent Reading back the reader will see we proved the circular inequalities as desired. \end{proof} \noindent Let $(R, \mathfrak m)$ be a Noetherian local ring. From the above it is clear that $\mathfrak m$ cannot be generated by fewer than $\dim(R)$ elements. By Nakayama's Lemma \ref{lemma-NAK} the minimal number of generators of $\mathfrak m$ equals $\dim_{\kappa(\mathfrak m)} \mathfrak m/\mathfrak m^2$. Hence we have the following fundamental inequality $$ \dim(R) \leq \dim_{\kappa(\mathfrak m)} \mathfrak m/\mathfrak m^2. $$ It turns out that the rings where equality holds have a lot of good properties. They are called regular local rings. \begin{definition} \label{definition-regular-local} Let $(R, \mathfrak m)$ be a Noetherian local ring of dimension $d$. \begin{enumerate} \item A {\it system of parameters of $R$} is a sequence of elements $x_1, \ldots, x_d \in \mathfrak m$ which generates an ideal of definition of $R$, \item if there exist $x_1, \ldots, x_d \in \mathfrak m$ such that $\mathfrak m = (x_1, \ldots, x_d)$ then we call $R$ a {\it regular local ring} and $x_1, \ldots, x_d$ a {\it regular system of parameters}. \end{enumerate} \end{definition} \noindent The following lemmas are clear from the proofs of the lemmas and proposition above, but we spell them out so we have convenient references. \begin{lemma} \label{lemma-minimal-over-1} Let $R$ be a Noetherian ring. Let $x \in R$. \begin{enumerate} \item If $\mathfrak p$ is minimal over $(x)$ then the height of $\mathfrak p$ is $0$ or $1$. \item If $\mathfrak p, \mathfrak q \in \Spec(R)$ and $\mathfrak q$ is minimal over $(\mathfrak p, x)$, then there is no prime strictly between $\mathfrak p$ and $\mathfrak q$. \end{enumerate} \end{lemma} \begin{proof} 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$. \end{proof} \begin{lemma} \label{lemma-minimal-over-r} Let $R$ be a Noetherian ring. Let $f_1, \ldots, f_r \in R$. \begin{enumerate} \item If $\mathfrak p$ is minimal over $(f_1, \ldots, f_r)$ then the height of $\mathfrak p$ is $\leq r$. \item If $\mathfrak p, \mathfrak q \in \Spec(R)$ and $\mathfrak q$ is minimal over $(\mathfrak p, f_1, \ldots, f_r)$, then every chain of primes between $\mathfrak p$ and $\mathfrak q$ has length at most $r$. \end{enumerate} \end{lemma} \begin{proof} 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$. \end{proof} \begin{lemma} \label{lemma-one-equation} Suppose that $R$ is a Noetherian local ring and $x\in \mathfrak m$ an element of its maximal ideal. Then $\dim R \leq \dim R/xR + 1$. If $x$ is not contained in any of the minimal primes of $R$ then equality holds. (For example if $x$ is a nonzerodivisor.) \end{lemma} \begin{proof} 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. \end{proof} \begin{lemma} \label{lemma-elements-generate-ideal-definition} Let $(R, \mathfrak m)$ be a Noetherian local ring. Suppose $x_1, \ldots, x_d \in \mathfrak m$ generate an ideal of definition and $d = \dim(R)$. Then $\dim(R/(x_1, \ldots, x_i)) = d - i$ for all $i = 1, \ldots, d$. \end{lemma} \begin{proof} Follows either from the proof of Proposition \ref{proposition-dimension}, or by using induction on $d$ and Lemma \ref{lemma-one-equation}. \end{proof} \section{Applications of dimension theory} \label{section-applications-dimension-theory} % BEGIN ALGEBRA EDITORIAL ROUTE section-applications-dimension-theory \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-applications-dimension-theory}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-applications-dimension-theory \noindent We can use the results on dimension to prove certain rings have infinite spectra and to produce more Jacobson rings. \begin{lemma} \label{lemma-Noetherian-local-domain-dim-2-infinite-opens} Let $R$ be a Noetherian local domain of dimension $\geq 2$. A nonempty open subset $U \subset \Spec(R)$ is infinite. \end{lemma} \begin{proof} 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)\}$. \end{proof} \noindent The rings $k[[t]]$ where $k$ is a field, or the ring of $p$-adic integers are Noetherian rings of dimension $1$ with finitely many primes. This is the maximum dimension for which this can happen. \begin{lemma} \label{lemma-Noetherian-finite-nr-primes} A Noetherian ring with finitely many primes has dimension $\leq 1$. \end{lemma} \begin{proof} 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$. \end{proof} \begin{lemma} \label{lemma-finite-type-algebra-finite-nr-primes} Let $S$ be a nonzero finite type algebra over a field $k$. The following are equivalent \begin{enumerate} \item $\dim(S) = 0$, \item $S$ has finitely many primes, \item $S$ has finitely many maximal ideals, \item $\Spec(S)$ satisfies one of the equivalent conditions of Lemma \ref{lemma-ring-with-only-minimal-primes}, \item $\dim_k(S) < \infty$, \item $S$ is Artinian, \item $\Spec(S)$ is a discrete topological space, \item[] \textit{Source editorial reminder: add more here.} \end{enumerate} \end{lemma} \begin{proof} It is immediate from the definitions that (1) is equivalent to (4) by looking at part (5) of Lemma \ref{lemma-ring-with-only-minimal-primes}. 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 $S$ 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}). Thus (1) implies (2). Trivially (2) implies (3). If (3) holds, then $\Spec(S)$ is discrete by Topology, Lemma \ref{topology-lemma-finite-jacobson} and hence the dimension of $S$ is $0$. \medskip\noindent At this point we know that (1) -- (4) are equivalent. The implication (5) $\Rightarrow$ (6) is Lemma \ref{lemma-finite-dimensional-algebra}. The implication (6) $\Rightarrow$ (7) follows from Proposition \ref{proposition-dimension-zero-ring}. The implication (7) $\Rightarrow$ (4) is immediate. Conversely, if $S$ satisfies (1) -- (4), then $S$ has finitely many primes $\mathfrak m_1, \ldots, \mathfrak m_r$ all maximal. Note that $\kappa(\mathfrak m_i)$ is a finite extension of $k$ by the Hilbert Nullstellensatz (Theorem \ref{theorem-nullstellensatz}). By Proposition \ref{proposition-dimension-zero-ring} we also see that $S$ is Artinian. Next, Lemma \ref{lemma-artinian-finite-length} tells us that $\text{length}_S(S) < \infty$. Thus $\dim_k(S) < \infty$ by Lemma \ref{lemma-pushdown-module}. We conclude that (1) -- (7) are equivalent. (Note: another and more standard way to prove $\dim(S) = 0 \Rightarrow \dim_k(S) < \infty$ is to use Noether normalization, but we don't have this available to us yet.) \end{proof} \begin{lemma} \label{lemma-noetherian-dim-1-Jacobson} Noetherian Jacobson rings. \begin{enumerate} \item Any Noetherian domain $R$ of dimension $1$ with infinitely many primes is Jacobson. \item Any Noetherian ring such that every prime $\mathfrak p$ is either maximal or contained in infinitely many prime ideals is Jacobson. \end{enumerate} \end{lemma} \begin{proof} 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 prime 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 \subsetneq \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 \supsetneq \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. \end{proof} \section{Support and dimension of modules} \label{section-support} % BEGIN ALGEBRA EDITORIAL ROUTE section-support \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-support}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-support \noindent Some basic results on the support and dimension of modules. \begin{lemma} \label{lemma-filter-Noetherian-module} Let $R$ be a Noetherian ring, and let $M$ be a finite $R$-module. There exists a filtration by $R$-submodules $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M $$ such that each quotient $M_i/M_{i-1}$ is isomorphic to $R/\mathfrak p_i$ for some prime ideal $\mathfrak p_i$ of $R$. \end{lemma} \begin{proof}[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 both the submodule $aR/(J \cap aR)$ and the quotient module $(R/J)/(aR/(J \cap aR))$ are cyclic modules; write them as $R/J'$ and $R/J''$ so we have a short exact sequence $0 \to R/J' \to R/J \to R/J'' \to 0$. The inclusion $J \subset J'$ is strict as $b \in J'$ and the inclusion $J \subset J''$ is strict as $a \in J''$. Hence by maximality of $J$, both $R/J'$ and $R/J''$ have a filtration as above and hence so does $R/J$. Contradiction. \end{proof} \begin{proof}[Second proof] For an $R$-module $M$ we say $P(M)$ holds if there exists a filtration as in the statement of the lemma. Observe that $P$ is stable under extensions and holds for $0$. By Lemma \ref{lemma-trivial-filter-finite-module} it suffices to prove $P(R/I)$ holds for every ideal $I$. If not then because $R$ is Noetherian, there is a maximal counterexample $J$. By Example \ref{example-oka-family-property-modules} and Proposition \ref{proposition-oka} the ideal $J$ is prime which is a contradiction. \end{proof} \begin{lemma} \label{lemma-filter-primes-in-support} \begin{reference} \cite[Chapter III, \S 6, no. 81, support calculation preceding Proposition 6, p. 276]{FAC} \end{reference} \begin{history} The cited source starts from an irredundant homogeneous primary decomposition, localizes it on projective standard opens, and writes the support as the union of the projective varieties defined by the corresponding primes. The lemma below gives the affine module statement using a prime filtration; combined with degree-zero localization on $\operatorname{Proj}$ it also accounts for the source's irrelevant ``improper'' prime, whose projective variety is empty. \end{history} Let $R$, $M$, $M_i$, $\mathfrak p_i$ be as in Lemma \ref{lemma-filter-Noetherian-module}. Then $\text{Supp}(M) = \bigcup V(\mathfrak p_i)$ and in particular $\mathfrak p_i \in \text{Supp}(M)$. \end{lemma} \begin{proof} This follows from Lemmas \ref{lemma-support-closed} and \ref{lemma-support-quotient}. \end{proof} \begin{lemma} \label{lemma-support-point} Suppose that $R$ is a Noetherian local ring with maximal ideal $\mathfrak m$. Let $M$ be a nonzero finite $R$-module. Then $\text{Supp}(M) = \{ \mathfrak m\}$ if and only if $M$ has finite length over $R$. \end{lemma} \begin{proof} 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$. \end{proof} \begin{lemma} \label{lemma-Noetherian-power-ideal-kills-module} Let $R$ be a Noetherian ring. Let $I \subset R$ be an ideal. Let $M$ be a finite $R$-module. Then $I^nM = 0$ for some $n \geq 0$ if and only if $\text{Supp}(M) \subset V(I)$. \end{lemma} \begin{proof} Indeed, $I^nM = 0$ is equivalent to $I^n \subset \text{Ann}(M)$. Since $R$ is Noetherian, this is equivalent to $I \subset \sqrt{\text{Ann}(M)}$, see Lemma \ref{lemma-Noetherian-power}. This in turn is equivalent to $V(I) \supset V(\text{Ann}(M))$, see Lemma \ref{lemma-Zariski-topology}. By Lemma \ref{lemma-support-closed} this is equivalent to $V(I) \supset \text{Supp}(M)$. \end{proof} \begin{lemma} \label{lemma-filter-minimal-primes-in-support} Let $R$, $M$, $M_i$, $\mathfrak p_i$ be as in Lemma \ref{lemma-filter-Noetherian-module}. The minimal elements of the set $\{\mathfrak p_i\}$ are the minimal elements of $\text{Supp}(M)$. The number of times a minimal prime $\mathfrak p$ occurs is $$ \#\{i \mid \mathfrak p_i = \mathfrak p\} = \text{length}_{R_\mathfrak p} M_{\mathfrak p}. $$ \end{lemma} \begin{proof} The first statement follows because $\text{Supp}(M) = \bigcup V(\mathfrak p_i)$, see Lemma \ref{lemma-filter-primes-in-support}. Let $\mathfrak p \in \text{Supp}(M)$ be minimal. The support of $M_{\mathfrak p}$ is the set consisting of the maximal ideal $\mathfrak p R_{\mathfrak p}$. Hence by Lemma \ref{lemma-support-point} the length of $M_{\mathfrak p}$ is finite and $> 0$. Next we note that $M_{\mathfrak p}$ has a filtration with subquotients $ (R/\mathfrak p_i)_{\mathfrak p} = R_{\mathfrak p}/{\mathfrak p_i}R_{\mathfrak p} $. These are zero if $\mathfrak p_i \not \subset \mathfrak p$ and equal to $\kappa(\mathfrak p)$ if $\mathfrak p_i \subset \mathfrak p$ because by minimality of $\mathfrak p$ we have $\mathfrak p_i = \mathfrak p$ in this case. The result follows since $\kappa(\mathfrak p)$ has length $1$. \end{proof} \begin{lemma} \label{lemma-support-dimension-d} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module. Then $d(M) = \dim(\text{Supp}(M))$ where $d(M)$ is as in Definition \ref{definition-d}. \end{lemma} \begin{proof} Let $M_i, \mathfrak p_i$ be as in Lemma \ref{lemma-filter-Noetherian-module}. By Lemma \ref{lemma-hilbert-ses-chi} we obtain the equality $d(M) = \max \{ d(R/\mathfrak p_i) \}$. By Proposition \ref{proposition-dimension} we have $d(R/\mathfrak p_i) = \dim(R/\mathfrak p_i)$. Trivially $\dim(R/\mathfrak p_i) = \dim V(\mathfrak p_i)$. Since all minimal primes of $\text{Supp}(M)$ occur among the $\mathfrak p_i$ (Lemma \ref{lemma-filter-minimal-primes-in-support}) we win. \end{proof} \begin{lemma} \label{lemma-ses-dimension} Let $R$ be a Noetherian ring. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of finite $R$-modules. Then $\max\{\dim(\text{Supp}(M')), \dim(\text{Supp}(M''))\} = \dim(\text{Supp}(M))$. \end{lemma} \begin{proof} If $R$ is local, this follows immediately from Lemmas \ref{lemma-support-dimension-d} and \ref{lemma-hilbert-ses-chi}. A more elementary argument, which works also if $R$ is not local, is to use that $\text{Supp}(M')$, $\text{Supp}(M'')$, and $\text{Supp}(M)$ are closed (Lemma \ref{lemma-support-closed}) and that $\text{Supp}(M) = \text{Supp}(M') \cup \text{Supp}(M'')$ (Lemma \ref{lemma-support-quotient}). \end{proof} \section{Associated primes} \label{section-ass} % BEGIN ALGEBRA EDITORIAL ROUTE section-ass \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ass}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ass \noindent Here is the standard definition. For non-Noetherian rings and non-finite modules it may be more appropriate to use the definition in Section \ref{section-weakly-ass}. \begin{definition} \label{definition-associated} Let $R$ be a ring. Let $M$ be an $R$-module. A prime $\mathfrak p$ of $R$ is {\it associated} to $M$ if there exists an element $m \in M$ whose annihilator is $\mathfrak p$. The set of all such primes is denoted $\text{Ass}_R(M)$ or $\text{Ass}(M)$. \end{definition} \begin{lemma} \label{lemma-ass-support} Let $R$ be a ring. Let $M$ be an $R$-module. Then $\text{Ass}(M) \subset \text{Supp}(M)$. \end{lemma} \begin{proof} If $m \in M$ has annihilator $\mathfrak p$, then in particular no element of $R \setminus \mathfrak p$ annihilates $m$. Hence $m$ is a nonzero element of $M_{\mathfrak p}$, i.e., $\mathfrak p \in \text{Supp}(M)$. \end{proof} \begin{lemma} \label{lemma-ass} Let $R$ be a ring. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of $R$-modules. Then $\text{Ass}(M') \subset \text{Ass}(M)$ and $\text{Ass}(M) \subset \text{Ass}(M') \cup \text{Ass}(M'')$. Also $\text{Ass}(M' \oplus M'') = \text{Ass}(M') \cup \text{Ass}(M'')$. \end{lemma} \begin{proof} If $m' \in M'$, then the annihilator of $m'$ viewed as an element of $M'$ is the same as the annihilator of $m'$ viewed as an element of $M$. Hence the inclusion $\text{Ass}(M') \subset \text{Ass}(M)$. Let $m \in M$ be an element whose annihilator is a prime ideal $\mathfrak p$. If there exists a $g \in R$, $g \not \in \mathfrak p$ such that $m' = gm \in M'$ then the annihilator of $m'$ is $\mathfrak p$. If there does not exist a $g \in R$, $g \not \in \mathfrak p$ such that $gm \in M'$, then the annihilator of the image $m'' \in M''$ of $m$ is $\mathfrak p$. This proves the inclusion $\text{Ass}(M) \subset \text{Ass}(M') \cup \text{Ass}(M'')$. We omit the proof of the final statement. \end{proof} \begin{lemma} \label{lemma-ass-filter} Let $R$ be a ring, and $M$ an $R$-module. Suppose there exists a filtration by $R$-submodules $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M $$ such that each quotient $M_i/M_{i-1}$ is isomorphic to $R/\mathfrak p_i$ for some prime ideal $\mathfrak p_i$ of $R$. Then $\text{Ass}(M) \subset \{\mathfrak p_1, \ldots, \mathfrak p_n\}$. \end{lemma} \begin{proof} By induction on the length $n$ of the filtration $\{ M_i \}$. Pick $m \in M$ whose annihilator is a prime $\mathfrak p$. If $m \in M_{n-1}$ we are done by induction. If not, then $m$ maps to a nonzero element of $M/M_{n-1} \cong R/\mathfrak p_n$. Hence we have $\mathfrak p \subset \mathfrak p_n$. If equality does not hold, then we can find $f \in \mathfrak p_n$, $f \not\in \mathfrak p$. In this case the annihilator of $fm$ is still $\mathfrak p$ and $fm \in M_{n-1}$. Thus we win by induction. \end{proof} \begin{lemma} \label{lemma-finite-ass} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. Then $\text{Ass}(M)$ is finite. \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-ass-filter} and Lemma \ref{lemma-filter-Noetherian-module}. \end{proof} \begin{proposition} \label{proposition-minimal-primes-associated-primes} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. The following sets of primes are the same: \begin{enumerate} \item The minimal primes in the support of $M$. \item The minimal primes in $\text{Ass}(M)$. \item For any filtration $0 = M_0 \subset M_1 \subset \ldots \subset M_{n-1} \subset M_n = M$ with $M_i/M_{i-1} \cong R/\mathfrak p_i$ the minimal primes of the set $\{\mathfrak p_i\}$. \end{enumerate} \end{proposition} \begin{proof} Choose a filtration as in (3). In Lemma \ref{lemma-filter-minimal-primes-in-support} we have seen that the sets in (1) and (3) are equal. \medskip\noindent Let $\mathfrak p$ be a minimal element of the set $\{\mathfrak p_i\}$. Let $i$ be minimal such that $\mathfrak p = \mathfrak p_i$. Pick $m \in M_i$, $m \not \in M_{i-1}$. The annihilator of $m$ is contained in $\mathfrak p_i = \mathfrak p$ and contains $\mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_i$. By our choice of $i$ and $\mathfrak p$ we have $\mathfrak p_j \not \subset \mathfrak p$ for $j < i$ and hence we have $\mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_{i - 1} \not \subset \mathfrak p_i$. Pick $f \in \mathfrak p_1 \mathfrak p_2 \ldots \mathfrak p_{i - 1}$, $f \not \in \mathfrak p$. Then $fm$ has annihilator $\mathfrak p$. In this way we see that $\mathfrak p$ is an associated prime of $M$. By Lemma \ref{lemma-ass-support} we have $\text{Ass}(M) \subset \text{Supp}(M)$ and hence $\mathfrak p$ is minimal in $\text{Ass}(M)$. Thus the set of primes in (1) is contained in the set of primes of (2). \medskip\noindent Let $\mathfrak p$ be a minimal element of $\text{Ass}(M)$. Since $\text{Ass}(M) \subset \text{Supp}(M)$ there is a minimal element $\mathfrak q$ of $\text{Supp}(M)$ with $\mathfrak q \subset \mathfrak p$. We have just shown that $\mathfrak q \in \text{Ass}(M)$. Hence $\mathfrak q = \mathfrak p$ by minimality of $\mathfrak p$. Thus the set of primes in (2) is contained in the set of primes of (1). \end{proof} \begin{lemma} \label{lemma-ass-zero} \begin{slogan} Over a Noetherian ring each nonzero module has an associated prime. \end{slogan} Let $R$ be a Noetherian ring. Let $M$ be an $R$-module. Then $$ M = (0) \Leftrightarrow \text{Ass}(M) = \emptyset. $$ \end{lemma} \begin{proof} If $M = (0)$, then $\text{Ass}(M) = \emptyset$ by definition. If $M \not = 0$, pick any nonzero finitely generated submodule $M' \subset M$, for example a submodule generated by a single nonzero element. By Lemma \ref{lemma-support-zero} we see that $\text{Supp}(M')$ is nonempty. By Proposition \ref{proposition-minimal-primes-associated-primes} this implies that $\text{Ass}(M')$ is nonempty. By Lemma \ref{lemma-ass} this implies $\text{Ass}(M) \not = \emptyset$. \end{proof} \begin{lemma} \label{lemma-ass-minimal-prime-support} Let $R$ be a Noetherian ring. Let $M$ be an $R$-module. Any $\mathfrak p \in \text{Supp}(M)$ which is minimal among the elements of $\text{Supp}(M)$ is an element of $\text{Ass}(M)$. \end{lemma} \begin{proof} If $M$ is a finite $R$-module, then this is a consequence of Proposition \ref{proposition-minimal-primes-associated-primes}. In general write $M = \bigcup M_\lambda$ as the union of its finite submodules, and use that $\text{Supp}(M) = \bigcup \text{Supp}(M_\lambda)$ and $\text{Ass}(M) = \bigcup \text{Ass}(M_\lambda)$. \end{proof} \begin{lemma} \label{lemma-ass-zero-divisors} Let $R$ be a Noetherian ring. Let $M$ be an $R$-module. The union $\bigcup_{\mathfrak q \in \text{Ass}(M)} \mathfrak q$ is the set of elements of $R$ which are zerodivisors on $M$. \end{lemma} \begin{proof} Any element in any associated prime clearly is a zerodivisor on $M$. Conversely, suppose $x \in R$ is a zerodivisor on $M$. Consider the submodule $N = \{m \in M \mid xm = 0\}$. Since $N$ is not zero it has an associated prime $\mathfrak q$ by Lemma \ref{lemma-ass-zero}. Then $x \in \mathfrak q$ and $\mathfrak q$ is an associated prime of $M$ by Lemma \ref{lemma-ass}. \end{proof} \begin{lemma} \label{lemma-one-equation-module} \begin{reference} \cite[Chapter III, \S 6, no. 81, proof of Proposition 6, p. 277]{FAC} \end{reference} \begin{history} The projective hyperplane argument in the cited source chooses a linear form outside the relevant primes, so multiplication is injective and intersecting the support lowers its positive dimension by one. This is the corresponding local module statement. An earlier version of the hypothesis read ``Let $R$ is''; the grammatical error has been corrected. \end{history} Let $R$ be a Noetherian local ring, $M$ a finite $R$-module, and $f \in \mathfrak m$ an element of the maximal ideal of $R$. Then $$ \dim(\text{Supp}(M/fM)) \leq \dim(\text{Supp}(M)) \leq \dim(\text{Supp}(M/fM)) + 1 $$ If $f$ is not in any of the minimal primes of the support of $M$ (for example if $f$ is a nonzerodivisor on $M$), then equality holds for the right inequality. \end{lemma} \begin{proof} (The parenthetical statement follows from Lemma \ref{lemma-ass-zero-divisors}.) The first inequality follows from $\text{Supp}(M/fM) \subset \text{Supp}(M)$, see Lemma \ref{lemma-support-quotient}. For the second inequality, note that $\text{Supp}(M/fM) = \text{Supp}(M) \cap V(f)$, see Lemma \ref{lemma-support-quotient}. It follows, for example by Lemma \ref{lemma-filter-primes-in-support} and elementary properties of dimension, that it suffices to show $\dim V(\mathfrak p) \leq \dim (V(\mathfrak p) \cap V(f)) + 1$ for primes $\mathfrak p$ of $R$. This is a consequence of Lemma \ref{lemma-one-equation}. Finally, if $f$ is not contained in any minimal prime of the support of $M$, then the chains of primes in $\text{Supp}(M/fM)$ all give rise to chains in $\text{Supp}(M)$ which are at least one step away from being maximal. \end{proof} \begin{lemma} \label{lemma-ass-functorial} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Then $\Spec(\varphi)(\text{Ass}_S(M)) \subset \text{Ass}_R(M)$. \end{lemma} \begin{proof} If $\mathfrak q \in \text{Ass}_S(M)$, then there exists an $m$ in $M$ such that the annihilator of $m$ in $S$ is $\mathfrak q$. Then the annihilator of $m$ in $R$ is $\mathfrak q \cap R$. \end{proof} \begin{remark} \label{remark-ass-reverse-functorial} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Then it is not always the case that $\Spec(\varphi)(\text{Ass}_S(M)) \supset \text{Ass}_R(M)$. For example, consider the ring map $R = k \to S = k[x_1, x_2, x_3, \ldots]/(x_i^2)$ and $M = S$. Then $\text{Ass}_R(M)$ is not empty, but $\text{Ass}_S(S)$ is empty. \end{remark} \begin{lemma} \label{lemma-ass-functorial-Noetherian} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. If $S$ is Noetherian, then $\Spec(\varphi)(\text{Ass}_S(M)) = \text{Ass}_R(M)$. \end{lemma} \begin{proof} We have already seen in Lemma \ref{lemma-ass-functorial} that $\Spec(\varphi)(\text{Ass}_S(M)) \subset \text{Ass}_R(M)$. For the converse, choose a prime $\mathfrak p \in \text{Ass}_R(M)$. Let $m \in M$ be an element such that the annihilator of $m$ in $R$ is $\mathfrak p$. Let $I = \{g \in S \mid gm = 0\}$ be the annihilator of $m$ in $S$. Then $R/\mathfrak p \subset S/I$ is injective. Combining Lemmas \ref{lemma-injective-minimal-primes-in-image} and \ref{lemma-minimal-prime-image-minimal-prime} we see that there is a prime $\mathfrak q \subset S$ minimal over $I$ mapping to $\mathfrak p$. By Proposition \ref{proposition-minimal-primes-associated-primes} we see that $\mathfrak q$ is an associated prime of $S/I$, hence $\mathfrak q$ is an associated prime of $M$ by Lemma \ref{lemma-ass} and we win. \end{proof} \begin{lemma} \label{lemma-ass-quotient-ring} Let $R$ be a ring. Let $I$ be an ideal. Let $M$ be an $R/I$-module. Via the canonical injection $\Spec(R/I) \to \Spec(R)$ we have $\text{Ass}_{R/I}(M) = \text{Ass}_R(M)$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-associated-primes-localize} Let $R$ be a ring. Let $M$ be an $R$-module. Let $\mathfrak p \subset R$ be a prime. \begin{enumerate} \item If $\mathfrak p \in \text{Ass}(M)$ then $\mathfrak pR_{\mathfrak p} \in \text{Ass}(M_{\mathfrak p})$. \item If $\mathfrak p$ is finitely generated then the converse holds as well. \end{enumerate} \end{lemma} \begin{proof} If $\mathfrak p \in \text{Ass}(M)$ there exists an element $m \in M$ whose annihilator is $\mathfrak p$. As localization is exact (Proposition \ref{proposition-localization-exact}) we see that the annihilator of $m/1$ in $M_{\mathfrak p}$ is $\mathfrak pR_{\mathfrak p}$ hence (1) holds. Assume $\mathfrak pR_{\mathfrak p} \in \text{Ass}(M_{\mathfrak p})$ and $\mathfrak p = (f_1, \ldots, f_n)$. Let $m/g$ be an element of $M_{\mathfrak p}$ whose annihilator is $\mathfrak pR_{\mathfrak p}$. This implies that the annihilator of $m$ is contained in $\mathfrak p$. As $f_i m/g = 0$ in $M_{\mathfrak p}$ we see there exists a $g_i \in R$, $g_i \not \in \mathfrak p$ such that $g_i f_i m = 0$ in $M$. Combined we see the annihilator of $g_1\ldots g_nm$ is $\mathfrak p$. Hence $\mathfrak p \in \text{Ass}(M)$. \end{proof} \begin{lemma} \label{lemma-localize-ass} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. Via the canonical injection $\Spec(S^{-1}R) \to \Spec(R)$ we have \begin{enumerate} \item $\text{Ass}_R(S^{-1}M) = \text{Ass}_{S^{-1}R}(S^{-1}M)$, \item $\text{Ass}_R(M) \cap \Spec(S^{-1}R) \subset \text{Ass}_R(S^{-1}M)$, and \item if $R$ is Noetherian this inclusion is an equality. \end{enumerate} \end{lemma} \begin{proof} For $m \in S^{-1}M$, let $I \subset R$ and $J \subset S^{-1}R$ be the annihilators of $m$. Then $I$ is the inverse image of $J$ by the map $R \to S^{-1}R$ and $J = S^{-1}I$. The equality in (1) follows by the description of the map $\Spec(S^{-1}R) \to \Spec(R)$ in Lemma \ref{lemma-spec-localization}. For $m \in M$, let $I \subset R$ be the annihilator of $m$ in $R$ and let $J \subset S^{-1}R$ be the annihilator of $m/1 \in S^{-1}M$. We have $J = S^{-1}I$ which implies (2). The equality in the Noetherian case follows from Lemma \ref{lemma-associated-primes-localize} since for $\mathfrak p \in \Spec(R)$ with $S \cap \mathfrak p = \emptyset$ we have $M_{\mathfrak p} = (S^{-1}M)_{S^{-1}\mathfrak p}$. \end{proof} \begin{lemma} \label{lemma-localize-ass-nonzero-divisors} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. Assume that every $s \in S$ is a nonzerodivisor on $M$. Then $$ \text{Ass}_R(M) = \text{Ass}_R(S^{-1}M). $$ \end{lemma} \begin{proof} As $M \subset S^{-1}M$ by assumption we get the inclusion $\text{Ass}(M) \subset \text{Ass}(S^{-1}M)$ from Lemma \ref{lemma-ass}. Conversely, suppose that $n/s \in S^{-1}M$ is an element whose annihilator is a prime ideal $\mathfrak p$. Then the annihilator of $n \in M$ is also $\mathfrak p$. \end{proof} \begin{lemma} \label{lemma-ideal-nonzerodivisor} Let $R$ be a Noetherian local ring with maximal ideal $\mathfrak m$. Let $I \subset \mathfrak m$ be an ideal. Let $M$ be a finite $R$-module. The following are equivalent: \begin{enumerate} \item There exists an $x \in I$ which is not a zerodivisor on $M$. \item We have $I \not \subset \mathfrak q$ for all $\mathfrak q \in \text{Ass}(M)$. \end{enumerate} \end{lemma} \begin{proof} If there exists a nonzerodivisor $x$ in $I$, then $x$ clearly cannot be in any associated prime of $M$. Conversely, suppose $I \not \subset \mathfrak q$ for all $\mathfrak q \in \text{Ass}(M)$. In this case we can choose $x \in I$, $x \not \in \mathfrak q$ for all $\mathfrak q \in \text{Ass}(M)$ by Lemmas \ref{lemma-finite-ass} and \ref{lemma-silly}. By Lemma \ref{lemma-ass-zero-divisors} the element $x$ is not a zerodivisor on $M$. \end{proof} \begin{lemma} \label{lemma-zero-at-ass-zero} Let $R$ be a ring. Let $M$ be an $R$-module. If $R$ is Noetherian the map $$ M \longrightarrow \prod\nolimits_{\mathfrak p \in \text{Ass}(M)} M_{\mathfrak p} $$ is injective. \end{lemma} \begin{proof} Let $x \in M$ be an element of the kernel of the map. Then if $\mathfrak p$ is an associated prime of $Rx \subset M$ we see on the one hand that $\mathfrak p \in \text{Ass}(M)$ (Lemma \ref{lemma-ass}) and on the other hand that $(Rx)_{\mathfrak p} \subset M_{\mathfrak p}$ is not zero. This contradiction shows that $\text{Ass}(Rx) = \emptyset$. Hence $Rx = 0$ by Lemma \ref{lemma-ass-zero}. \end{proof} \noindent \textit{Source editorial note: This lemma should probably be put somewhere else.} \begin{lemma} \label{lemma-dim-not-zero-exists-nonzerodivisor-nonunit} Let $k$ be a field. Let $S$ be a finite type $k$ algebra. If $\dim(S) > 0$, then there exists an element $f \in S$ which is a nonzerodivisor and a nonunit. \end{lemma} \begin{proof} By Lemma \ref{lemma-finite-ass} the ring $S$ has finitely many associated prime ideals. By Lemma \ref{lemma-finite-type-algebra-finite-nr-primes} the ring $S$ has infinitely many maximal ideals. Hence we can choose a maximal ideal $\mathfrak m \subset S$ which is not an associated prime of $S$. By prime avoidance (Lemma \ref{lemma-silly}), we can choose a nonzero $f \in \mathfrak m$ which is not contained in any of the associated primes of $S$. By Lemma \ref{lemma-ass-zero-divisors} the element $f$ is a nonzerodivisor and as $f \in \mathfrak m$ we see that $f$ is not a unit. \end{proof} \section{Symbolic powers} \label{section-symbolic-power} % BEGIN ALGEBRA EDITORIAL ROUTE section-symbolic-power \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-symbolic-power}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-symbolic-power \noindent Here is the definition. \begin{definition} \label{definition-symbolic-power} Let $R$ be a ring. Let $\mathfrak p$ be a prime ideal. For $n \geq 0$ the $n$th {\it symbolic power} of $\mathfrak p$ is the ideal $\mathfrak p^{(n)} = \Ker(R \to R_\mathfrak p/\mathfrak p^nR_\mathfrak p)$. \end{definition} \noindent Note that $\mathfrak p^n \subset \mathfrak p^{(n)}$ but equality does not always hold. \begin{lemma} \label{lemma-symbolic-power-associated} Let $R$ be a Noetherian ring. Let $\mathfrak p$ be a prime ideal. Let $n > 0$. Then $\text{Ass}(R/\mathfrak p^{(n)}) = \{\mathfrak p\}$. \end{lemma} \begin{proof} If $\mathfrak q$ is an associated prime of $R/\mathfrak p^{(n)}$ then clearly $\mathfrak p \subset \mathfrak q$. On the other hand, any element $x \in R$, $x \not \in \mathfrak p$ is a nonzerodivisor on $R/\mathfrak p^{(n)}$. Namely, if $y \in R$ and $xy \in \mathfrak p^{(n)} = R \cap \mathfrak p^nR_{\mathfrak p}$ then $y \in \mathfrak p^nR_{\mathfrak p}$, hence $y \in \mathfrak p^{(n)}$. Hence the lemma follows. \end{proof} \begin{lemma} \label{lemma-symbolic-power-flat-extension} Let $R \to S$ be a flat ring map. Let $\mathfrak p \subset R$ be a prime such that $\mathfrak q = \mathfrak p S$ is a prime of $S$. Then $\mathfrak p^{(n)} S = \mathfrak q^{(n)}$. \end{lemma} \begin{proof} Since $\mathfrak p^{(n)} = \Ker(R \to R_\mathfrak p/\mathfrak p^nR_\mathfrak p)$ we see using flatness that $\mathfrak p^{(n)} S$ is the kernel of the map $S \to S_\mathfrak p/\mathfrak p^nS_\mathfrak p$. On the other hand $\mathfrak q^{(n)}$ is the kernel of the map $S \to S_\mathfrak q/\mathfrak q^nS_\mathfrak q = S_\mathfrak q/\mathfrak p^nS_\mathfrak q$. Hence it suffices to show that $$ S_\mathfrak p/\mathfrak p^nS_\mathfrak p \longrightarrow S_\mathfrak q/\mathfrak p^nS_\mathfrak q $$ is injective. Observe that the right hand module is the localization of the left hand module by elements $f \in S$, $f \not \in \mathfrak q$. Thus it suffices to show these elements are nonzerodivisors on $S_\mathfrak p/\mathfrak p^nS_\mathfrak p$. By flatness, the module $S_\mathfrak p/\mathfrak p^nS_\mathfrak p$ has a finite filtration whose subquotients are $$ \mathfrak p^iS_\mathfrak p/\mathfrak p^{i + 1}S_\mathfrak p \cong \mathfrak p^iR_\mathfrak p/\mathfrak p^{i + 1}R_\mathfrak p \otimes_{R_\mathfrak p} S_\mathfrak p \cong V \otimes_{\kappa(\mathfrak p)} (S/\mathfrak q)_\mathfrak p $$ where $V$ is a $\kappa(\mathfrak p)$ vector space. Thus $f$ acts injectively as desired. \end{proof} \section{Relative assassin} \label{section-relative-assassin} % BEGIN ALGEBRA EDITORIAL ROUTE section-relative-assassin \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-relative-assassin}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-relative-assassin \noindent Discussion of relative assassins. Let $R \to S$ be a ring map. Let $N$ be an $S$-module. In this situation we can introduce the following sets of primes $\mathfrak q$ of $S$: \begin{enumerate} \item $A$: with $\mathfrak p = R \cap \mathfrak q$ we have that $\mathfrak q \in \text{Ass}_S(N \otimes_R \kappa(\mathfrak p))$, \item $A'$: with $\mathfrak p = R \cap \mathfrak q$ we have that $\mathfrak q$ is in the image of $\text{Ass}_{S \otimes_R \kappa(\mathfrak p)}(N \otimes_R \kappa(\mathfrak p))$ under the canonical map $\Spec(S \otimes_R \kappa(\mathfrak p)) \to \Spec(S)$, \item $A_{fin}$: with $\mathfrak p = R \cap \mathfrak q$ we have that $\mathfrak q \in \text{Ass}_S(N/\mathfrak pN)$, \item $A'_{fin}$: for some prime $\mathfrak p' \subset R$ we have $\mathfrak q \in \text{Ass}_S(N/\mathfrak p'N)$, \item $B$: for some $R$-module $M$ we have $\mathfrak q \in \text{Ass}_S(N \otimes_R M)$, and \item $B_{fin}$: for some finite $R$-module $M$ we have $\mathfrak q \in \text{Ass}_S(N \otimes_R M)$. \end{enumerate} Let us determine some of the relations between these sets. \begin{lemma} \label{lemma-compare-relative-assassins} Let $R \to S$ be a ring map. Let $N$ be an $S$-module. Let $A$, $A'$, $A_{fin}$, $A'_{fin}$, $B$, and $B_{fin}$ be the subsets of $\Spec(S)$ introduced above. \begin{enumerate} \item We always have $A = A'$. \item We always have $A_{fin} \subset A$, $B_{fin} \subset B$, $A_{fin} \subset A'_{fin} \subset B_{fin}$ and $A \subset B$. \item If $S$ is Noetherian, then $A = A_{fin}$ and $B = B_{fin}$. \item If $N$ is flat over $R$, then $A = A_{fin} = A'_{fin}$ and $B = B_{fin}$. \item If $R$ is Noetherian and $N$ is flat over $R$, then all of the sets are equal, i.e., $A = A' = A_{fin} = A'_{fin} = B = B_{fin}$. \end{enumerate} \end{lemma} \begin{proof} Some of the arguments in the proof will be repeated in the proofs of later lemmas which are more precise than this one (because they deal with a given module $M$ or a given prime $\mathfrak p$ and not with the collection of all of them). \medskip\noindent Proof of (1). Let $\mathfrak p$ be a prime of $R$. Then we have $$ \text{Ass}_S(N \otimes_R \kappa(\mathfrak p)) = \text{Ass}_{S/\mathfrak pS}(N \otimes_R \kappa(\mathfrak p)) = \text{Ass}_{S \otimes_R \kappa(\mathfrak p)}(N \otimes_R \kappa(\mathfrak p)) $$ the first equality by Lemma \ref{lemma-ass-quotient-ring} and the second by Lemma \ref{lemma-localize-ass} part (1). This proves that $A = A'$. The inclusion $A_{fin} \subset A'_{fin}$ is clear. \medskip\noindent Proof of (2). Each of the inclusions is immediate from the definitions except perhaps $A_{fin} \subset A$ which follows from Lemma \ref{lemma-localize-ass} and the fact that we require $\mathfrak p = R \cap \mathfrak q$ in the formulation of $A_{fin}$. \medskip\noindent Proof of (3). The equality $A = A_{fin}$ follows from Lemma \ref{lemma-localize-ass} part (3) if $S$ is Noetherian. Let $\mathfrak q = (g_1, \ldots, g_m)$ be a finitely generated prime ideal of $S$. Say $z \in N \otimes_R M$ is an element whose annihilator is $\mathfrak q$. We may pick a finite submodule $M' \subset M$ such that $z$ is the image of $z' \in N \otimes_R M'$. Then $\text{Ann}_S(z') \subset \mathfrak q = \text{Ann}_S(z)$. Since $N \otimes_R -$ commutes with colimits and since $M$ is the directed colimit of finite $R$-modules we can find $M' \subset M'' \subset M$ such that the image $z'' \in N \otimes_R M''$ is annihilated by $g_1, \ldots, g_m$. Hence $\text{Ann}_S(z'') = \mathfrak q$. This proves that $B = B_{fin}$ if $S$ is Noetherian. \medskip\noindent Proof of (4). If $N$ is flat, then the functor $N \otimes_R -$ is exact. In particular, if $M' \subset M$, then $N \otimes_R M' \subset N \otimes_R M$. Hence if $z \in N \otimes_R M$ is an element whose annihilator $\mathfrak q = \text{Ann}_S(z)$ is a prime, then we can pick any finite $R$-submodule $M' \subset M$ such that $z \in N \otimes_R M'$ and we see that the annihilator of $z$ as an element of $N \otimes_R M'$ is equal to $\mathfrak q$. Hence $B = B_{fin}$. Let $\mathfrak p'$ be a prime of $R$ and let $\mathfrak q$ be a prime of $S$ which is an associated prime of $N/\mathfrak p'N$. This implies that $\mathfrak p'S \subset \mathfrak q$. As $N$ is flat over $R$ we see that $N/\mathfrak p'N$ is flat over the integral domain $R/\mathfrak p'$. Hence every nonzero element of $R/\mathfrak p'$ is a nonzerodivisor on $N/\mathfrak p'N$. Hence none of these elements can map to an element of $\mathfrak q$ and we conclude that $\mathfrak p' = R \cap \mathfrak q$. Hence $A_{fin} = A'_{fin}$. Finally, by Lemma \ref{lemma-localize-ass-nonzero-divisors} we see that $\text{Ass}_S(N/\mathfrak p'N) = \text{Ass}_S(N \otimes_R \kappa(\mathfrak p'))$, i.e., $A'_{fin} = A$. \medskip\noindent Proof of (5). We only need to prove $A'_{fin} = B_{fin}$ as the other equalities have been proved in (4). To see this let $M$ be a finite $R$-module. By Lemma \ref{lemma-filter-Noetherian-module} there exists a filtration by $R$-submodules $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M $$ such that each quotient $M_i/M_{i-1}$ is isomorphic to $R/\mathfrak p_i$ for some prime ideal $\mathfrak p_i$ of $R$. Since $N$ is flat we obtain a filtration by $S$-submodules $$ 0 = N \otimes_R M_0 \subset N \otimes_R M_1 \subset \ldots \subset N \otimes_R M_n = N \otimes_R M $$ such that each subquotient is isomorphic to $N/\mathfrak p_iN$. By Lemma \ref{lemma-ass} we conclude that $\text{Ass}_S(N \otimes_R M) \subset \bigcup \text{Ass}_S(N/\mathfrak p_iN)$. Hence we see that $B_{fin} \subset A'_{fin}$. Since the other inclusion is part of (2) we win. \end{proof} \noindent We define the relative assassin of $N$ over $S/R$ to be the set $A = A'$ above. As a motivation we point out that it depends only on the fibre modules $N \otimes_R \kappa(\mathfrak p)$ over the fibre rings. As in the case of the assassin of a module we warn the reader that this notion makes most sense when the fibre rings $S \otimes_R \kappa(\mathfrak p)$ are Noetherian, for example if $R \to S$ is of finite type. \begin{definition} \label{definition-relative-assassin} Let $R \to S$ be a ring map. Let $N$ be an $S$-module. The {\it relative assassin of $N$ over $S/R$} is the set $$ \text{Ass}_{S/R}(N) = \{ \mathfrak q \subset S \mid \mathfrak q \in \text{Ass}_S(N \otimes_R \kappa(\mathfrak p)) \text{ with }\mathfrak p = R \cap \mathfrak q\}. $$ This is the set named $A$ in Lemma \ref{lemma-compare-relative-assassins}. \end{definition} \noindent The spirit of the next few results is that they are about the relative assassin, even though this may not be apparent. \begin{lemma} \label{lemma-bourbaki} Let $R \to S$ be a ring map. Let $M$ be an $R$-module, and let $N$ be an $S$-module. If $N$ is flat as an $R$-module, then $$ \text{Ass}_S(M \otimes_R N) \supset \bigcup\nolimits_{\mathfrak p \in \text{Ass}_R(M)} \text{Ass}_S(N/\mathfrak pN) $$ and if $R$ is Noetherian then we have equality. \end{lemma} \begin{proof} If $\mathfrak p \in \text{Ass}_R(M)$ then there exists an injection $R/\mathfrak p \to M$. As $N$ is flat over $R$ we obtain an injection $R/\mathfrak p \otimes_R N \to M \otimes_R N$. Since $R/\mathfrak p \otimes_R N = N/\mathfrak pN$ we conclude that $\text{Ass}_S(N/\mathfrak pN) \subset \text{Ass}_S(M \otimes_R N)$, see Lemma \ref{lemma-ass}. Hence the right hand side is contained in the left hand side. \medskip\noindent Write $M = \bigcup M_\lambda$ as the union of its finitely generated $R$-submodules. Then also $N \otimes_R M = \bigcup N \otimes_R M_\lambda$ (as $N$ is $R$-flat). By definition of associated primes we see that $\text{Ass}_S(N \otimes_R M) = \bigcup \text{Ass}_S(N \otimes_R M_\lambda)$ and $\text{Ass}_R(M) = \bigcup \text{Ass}(M_\lambda)$. Hence we may assume $M$ is finitely generated. \medskip\noindent Let $\mathfrak q \in \text{Ass}_S(M \otimes_R N)$, and assume $R$ is Noetherian and $M$ is a finite $R$-module. To finish the proof we have to show that $\mathfrak q$ is an element of the right hand side. First we observe that $\mathfrak qS_{\mathfrak q} \in \text{Ass}_{S_{\mathfrak q}}((M \otimes_R N)_{\mathfrak q})$, see Lemma \ref{lemma-associated-primes-localize}. Let $\mathfrak p$ be the corresponding prime of $R$. Note that $$ (M \otimes_R N)_{\mathfrak q} = M \otimes_R N_{\mathfrak q} = M_{\mathfrak p} \otimes_{R_{\mathfrak p}} N_{\mathfrak q}. $$ If $\mathfrak pR_{\mathfrak p} \not \in \text{Ass}_{R_{\mathfrak p}}(M_{\mathfrak p})$ then there exists an element $x \in \mathfrak pR_{\mathfrak p}$ which is a nonzerodivisor in $M_{\mathfrak p}$ (see Lemma \ref{lemma-ideal-nonzerodivisor}). Since $N_{\mathfrak q}$ is flat over $R_{\mathfrak p}$ we see that the image of $x$ in $\mathfrak qS_{\mathfrak q}$ is a nonzerodivisor on $(M \otimes_R N)_{\mathfrak q}$. This is a contradiction with the assumption that $\mathfrak qS_{\mathfrak q} \in \text{Ass}_{S_{\mathfrak q}}((M \otimes_R N)_{\mathfrak q})$. Hence we conclude that $\mathfrak p$ is one of the associated primes of $M$. \medskip\noindent Continuing the argument we choose a filtration $$ 0 = M_0 \subset M_1 \subset \ldots \subset M_n = M $$ such that each quotient $M_i/M_{i-1}$ is isomorphic to $R/\mathfrak p_i$ for some prime ideal $\mathfrak p_i$ of $R$, see Lemma \ref{lemma-filter-Noetherian-module}. (By Lemma \ref{lemma-ass-filter} we have $\mathfrak p_i = \mathfrak p$ for at least one $i$.) This gives a filtration $$ 0 = M_0 \otimes_R N \subset M_1 \otimes_R N \subset \ldots \subset M_n \otimes_R N = M \otimes_R N $$ with subquotients isomorphic to $N/\mathfrak p_iN$. If $\mathfrak p_i \not = \mathfrak p$ then $\mathfrak q$ cannot be associated to the module $N/\mathfrak p_iN$ by the result of the preceding paragraph (as $\text{Ass}_R(R/\mathfrak p_i) = \{\mathfrak p_i\}$). Hence we conclude that $\mathfrak q$ is associated to $N/\mathfrak pN$ as desired. \end{proof} \begin{lemma} \label{lemma-post-bourbaki} Let $R \to S$ be a ring map. Let $N$ be an $S$-module. Assume $N$ is flat as an $R$-module and $R$ is a domain with fraction field $K$. Then $$ \text{Ass}_S(N) = \text{Ass}_S(N \otimes_R K) = \text{Ass}_{S \otimes_R K}(N \otimes_R K) $$ via the canonical inclusion $\Spec(S \otimes_R K) \subset \Spec(S)$. \end{lemma} \begin{proof} Note that $S \otimes_R K = (R \setminus \{0\})^{-1}S$ and $N \otimes_R K = (R \setminus \{0\})^{-1}N$. For any nonzero $x \in R$ multiplication by $x$ on $N$ is injective as $N$ is flat over $R$. Hence the lemma follows from Lemma \ref{lemma-localize-ass-nonzero-divisors} combined with Lemma \ref{lemma-localize-ass} part (1). \end{proof} \begin{lemma} \label{lemma-bourbaki-fibres} Let $R \to S$ be a ring map. Let $M$ be an $R$-module, and let $N$ be an $S$-module. Assume $N$ is flat as an $R$-module. Then $$ \text{Ass}_S(M \otimes_R N) \supset \bigcup\nolimits_{\mathfrak p \in \text{Ass}_R(M)} \text{Ass}_{S \otimes_R \kappa(\mathfrak p)}(N \otimes_R \kappa(\mathfrak p)) $$ where we use Remark \ref{remark-fundamental-diagram} to think of the spectra of fibre rings as subsets of $\Spec(S)$. If $R$ is Noetherian then this inclusion is an equality. \end{lemma} \begin{proof} This is equivalent to Lemma \ref{lemma-bourbaki} by Lemmas \ref{lemma-ass-quotient-ring}, \ref{lemma-flat-base-change}, and \ref{lemma-post-bourbaki}. \end{proof} \begin{remark} \label{remark-bourbaki} Let $R \to S$ be a ring map. Let $N$ be an $S$-module. Let $\mathfrak p$ be a prime of $R$. Then $$ \text{Ass}_S(N \otimes_R \kappa(\mathfrak p)) = \text{Ass}_{S/\mathfrak pS}(N \otimes_R \kappa(\mathfrak p)) = \text{Ass}_{S \otimes_R \kappa(\mathfrak p)}(N \otimes_R \kappa(\mathfrak p)). $$ The first equality follows from Lemma \ref{lemma-ass-quotient-ring} and the second from Lemma \ref{lemma-localize-ass} part (1). \end{remark} \section{Weakly associated primes} \label{section-weakly-ass} % BEGIN ALGEBRA EDITORIAL ROUTE section-weakly-ass \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-weakly-ass}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-weakly-ass \noindent This is a variant on the notion of an associated prime that is useful for non-Noetherian rings and non-finite modules. \begin{definition} \label{definition-weakly-associated} Let $R$ be a ring. Let $M$ be an $R$-module. A prime $\mathfrak p$ of $R$ is {\it weakly associated} to $M$ if there exists an element $m \in M$ such that $\mathfrak p$ is minimal among the prime ideals containing the annihilator $\text{Ann}(m) = \{f \in R \mid fm = 0\}$. The set of all such primes is denoted $\text{WeakAss}_R(M)$ or $\text{WeakAss}(M)$. \end{definition} \noindent Thus an associated prime is a weakly associated prime. Here is a characterization in terms of the localization at the prime. \begin{lemma} \label{lemma-weakly-ass-local} Let $R$ be a ring. Let $M$ be an $R$-module. Let $\mathfrak p$ be a prime of $R$. The following are equivalent: \begin{enumerate} \item $\mathfrak p$ is weakly associated to $M$, \item $\mathfrak pR_{\mathfrak p}$ is weakly associated to $M_{\mathfrak p}$, and \item $M_{\mathfrak p}$ contains an element whose annihilator has radical equal to $\mathfrak pR_{\mathfrak p}$. \end{enumerate} \end{lemma} \begin{proof} Assume (1). Then there exists an element $m \in M$ such that $\mathfrak p$ is minimal among the primes containing the annihilator $I = \{x \in R \mid xm = 0\}$ of $m$. As localization is exact, the annihilator of $m$ in $M_{\mathfrak p}$ is $I_{\mathfrak p}$. Hence $\mathfrak pR_{\mathfrak p}$ is a minimal prime of $R_{\mathfrak p}$ containing the annihilator $I_{\mathfrak p}$ of $m$ in $M_{\mathfrak p}$. This implies (2) holds, and also (3) as it implies that $\sqrt{I_{\mathfrak p}} = \mathfrak pR_{\mathfrak p}$. \medskip\noindent Applying the implication (1) $\Rightarrow$ (3) to $M_{\mathfrak p}$ over $R_{\mathfrak p}$ we see that (2) $\Rightarrow$ (3). \medskip\noindent Finally, assume (3). This means there exists an element $m/f \in M_{\mathfrak p}$ whose annihilator has radical equal to $\mathfrak pR_{\mathfrak p}$. Then the annihilator $I = \{x \in R \mid xm = 0\}$ of $m$ in $M$ is such that $\sqrt{I_{\mathfrak p}} = \mathfrak pR_{\mathfrak p}$. Clearly this means that $\mathfrak p$ contains $I$ and is minimal among the primes containing $I$, i.e., (1) holds. \end{proof} \begin{lemma} \label{lemma-reduced-weakly-ass-minimal} For a reduced ring the weakly associated primes of the ring are the minimal primes. \end{lemma} \begin{proof} Let $(R, \mathfrak m)$ be a reduced local ring. Suppose $x \in R$ is an element whose annihilator has radical $\mathfrak m$. If $\mathfrak m \not = 0$, then $x$ cannot be a unit, so $x \in \mathfrak m$. Then in particular $x^{1 + n} = 0$ for some $n \geq 0$. Hence $x = 0$. This contradicts the assumption that the annihilator of $x$ is contained in $\mathfrak m$. Thus we see that $\mathfrak m = 0$, i.e., $R$ is a field. By Lemma \ref{lemma-weakly-ass-local} this implies the statement of the lemma. \end{proof} \begin{lemma} \label{lemma-weakly-ass} Let $R$ be a ring. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of $R$-modules. Then $\text{WeakAss}(M') \subset \text{WeakAss}(M)$ and $\text{WeakAss}(M) \subset \text{WeakAss}(M') \cup \text{WeakAss}(M'')$. \end{lemma} \begin{proof} We will use the characterization of weakly associated primes of Lemma \ref{lemma-weakly-ass-local}. Let $\mathfrak p$ be a prime of $R$. As localization is exact we obtain the short exact sequence $0 \to M'_{\mathfrak p} \to M_{\mathfrak p} \to M''_{\mathfrak p} \to 0$. Suppose that $m \in M_{\mathfrak p}$ is an element whose annihilator has radical $\mathfrak pR_{\mathfrak p}$. Then either the image $\overline{m}$ of $m$ in $M''_{\mathfrak p}$ is zero and $m \in M'_{\mathfrak p}$, or the radical of the annihilator of $\overline{m}$ is $\mathfrak pR_{\mathfrak p}$. This proves that $\text{WeakAss}(M) \subset \text{WeakAss}(M') \cup \text{WeakAss}(M'')$. The inclusion $\text{WeakAss}(M') \subset \text{WeakAss}(M)$ is immediate from the definitions. \end{proof} \begin{lemma} \label{lemma-weakly-ass-zero} \begin{slogan} Every nonzero module has a weakly associated prime. \end{slogan} Let $R$ be a ring. Let $M$ be an $R$-module. Then $$ M = (0) \Leftrightarrow \text{WeakAss}(M) = \emptyset $$ \end{lemma} \begin{proof} If $M = (0)$ then $\text{WeakAss}(M) = \emptyset$ by definition. Conversely, suppose that $M \not = 0$. Pick a nonzero element $m \in M$. Write $I = \{x \in R \mid xm = 0\}$, the annihilator of $m$. Then $R/I \subset M$. Hence $\text{WeakAss}(R/I) \subset \text{WeakAss}(M)$ by Lemma \ref{lemma-weakly-ass}. But as $I \not = R$, $V(I) = \Spec(R/I)$ contains a minimal prime, see Lemmas \ref{lemma-Zariski-topology} and \ref{lemma-spec-closed}, and we win. \end{proof} \begin{lemma} \label{lemma-weakly-ass-support} Let $R$ be a ring. Let $M$ be an $R$-module. Then $$ \text{Ass}(M) \subset \text{WeakAss}(M) \subset \text{Supp}(M). $$ \end{lemma} \begin{proof} The first inclusion is immediate from the definitions. If $\mathfrak p \in \text{WeakAss}(M)$, then by Lemma \ref{lemma-weakly-ass-local} we have $M_{\mathfrak p} \not = 0$, hence $\mathfrak p \in \text{Supp}(M)$. \end{proof} \begin{lemma} \label{lemma-weakly-ass-zero-divisors} Let $R$ be a ring. Let $M$ be an $R$-module. The union $\bigcup_{\mathfrak q \in \text{WeakAss}(M)} \mathfrak q$ is the set of elements of $R$ which are zerodivisors on $M$. \end{lemma} \begin{proof} Suppose $f \in \mathfrak q \in \text{WeakAss}(M)$. Then there exists an element $m \in M$ such that $\mathfrak q$ is minimal over $I = \{x \in R \mid xm = 0\}$. Hence there exists a $g \in R$, $g \not \in \mathfrak q$ and $n > 0$ such that $f^ngm = 0$. Note that $gm \not = 0$ as $g \not \in I$. If we take $n$ minimal as above, then $f (f^{n - 1}gm) = 0$ and $f^{n - 1}gm \not = 0$, so $f$ is a zerodivisor on $M$. Conversely, suppose $f \in R$ is a zerodivisor on $M$. Consider the submodule $N = \{m \in M \mid fm = 0\}$. Since $N$ is not zero it has a weakly associated prime $\mathfrak q$ by Lemma \ref{lemma-weakly-ass-zero}. Clearly $f \in \mathfrak q$ and by Lemma \ref{lemma-weakly-ass} $\mathfrak q$ is a weakly associated prime of $M$. \end{proof} \begin{lemma} \label{lemma-weakly-ass-minimal-prime-support} Let $R$ be a ring. Let $M$ be an $R$-module. Any $\mathfrak p \in \text{Supp}(M)$ which is minimal among the elements of $\text{Supp}(M)$ is an element of $\text{WeakAss}(M)$. \end{lemma} \begin{proof} Note that $\text{Supp}(M_{\mathfrak p}) = \{\mathfrak pR_{\mathfrak p}\}$ in $\Spec(R_{\mathfrak p})$. In particular $M_{\mathfrak p}$ is nonzero, and hence $\text{WeakAss}(M_{\mathfrak p}) \not = \emptyset$ by Lemma \ref{lemma-weakly-ass-zero}. Since $\text{WeakAss}(M_{\mathfrak p}) \subset \text{Supp}(M_{\mathfrak p})$ by Lemma \ref{lemma-weakly-ass-support} we conclude that $\text{WeakAss}(M_{\mathfrak p}) = \{\mathfrak pR_{\mathfrak p}\}$, whence $\mathfrak p \in \text{WeakAss}(M)$ by Lemma \ref{lemma-weakly-ass-local}. \end{proof} \begin{lemma} \label{lemma-ass-weakly-ass} Let $R$ be a ring. Let $M$ be an $R$-module. Let $\mathfrak p$ be a prime ideal of $R$ which is finitely generated. Then $$ \mathfrak p \in \text{Ass}(M) \Leftrightarrow \mathfrak p \in \text{WeakAss}(M). $$ In particular, if $R$ is Noetherian, then $\text{Ass}(M) = \text{WeakAss}(M)$. \end{lemma} \begin{proof} Write $\mathfrak p = (g_1, \ldots, g_n)$ for some $g_i \in R$. It is enough to prove the implication ``$\Leftarrow$'' as the other implication holds in general, see Lemma \ref{lemma-weakly-ass-support}. Assume $\mathfrak p \in \text{WeakAss}(M)$. By Lemma \ref{lemma-weakly-ass-local} there exists an element $m \in M_{\mathfrak p}$ such that $I = \{x \in R_{\mathfrak p} \mid xm = 0\}$ has radical $\mathfrak pR_{\mathfrak p}$. Hence for each $i$ there exists a smallest $e_i > 0$ such that $g_i^{e_i}m = 0$ in $M_{\mathfrak p}$. If $e_i > 1$ for some $i$, then we can replace $m$ by $g_i^{e_i - 1} m \not = 0$ and decrease $\sum e_i$. Hence we may assume that the annihilator of $m \in M_{\mathfrak p}$ is $(g_1, \ldots, g_n)R_{\mathfrak p} = \mathfrak p R_{\mathfrak p}$. By Lemma \ref{lemma-associated-primes-localize} we see that $\mathfrak p \in \text{Ass}(M)$. \end{proof} \begin{remark} \label{remark-weakly-ass-not-functorial} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Then it is not always the case that $\Spec(\varphi)(\text{WeakAss}_S(M)) \subset \text{WeakAss}_R(M)$ contrary to the case of associated primes (see Lemma \ref{lemma-ass-functorial}). An example is to consider the ring map $$ R = k[x_1, x_2, x_3, \ldots] \to S = k[x_1, x_2, x_3, \ldots, y_1, y_2, y_3, \ldots]/ (x_1y_1, x_2y_2, x_3y_3, \ldots) $$ and $M = S$. In this case $\mathfrak q = \sum x_iS$ is a minimal prime of $S$, hence a weakly associated prime of $M = S$ (see Lemma \ref{lemma-weakly-ass-minimal-prime-support}). But on the other hand, for any nonzero element of $S$ the annihilator in $R$ is finitely generated, and hence does not have radical equal to $R \cap \mathfrak q = (x_1, x_2, x_3, \ldots)$ (details omitted). \end{remark} \begin{lemma} \label{lemma-weakly-ass-reverse-functorial} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Then we have $\Spec(\varphi)(\text{WeakAss}_S(M)) \supset \text{WeakAss}_R(M)$. \end{lemma} \begin{proof} Let $\mathfrak p$ be an element of $\text{WeakAss}_R(M)$. Then there exists an $m \in M_{\mathfrak p}$ whose annihilator $I = \{x \in R_{\mathfrak p} \mid xm = 0\}$ has radical $\mathfrak pR_{\mathfrak p}$. Consider the annihilator $J = \{x \in S_{\mathfrak p} \mid xm = 0 \}$ of $m$ in $S_{\mathfrak p}$. As $IS_{\mathfrak p} \subset J$ we see that any minimal prime $\mathfrak q \subset S_{\mathfrak p}$ over $J$ lies over $\mathfrak p$. Moreover such a $\mathfrak q$ corresponds to a weakly associated prime of $M$ for example by Lemma \ref{lemma-weakly-ass-local}. \end{proof} \begin{remark} \label{remark-ass-functorial} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Denote by $f : \Spec(S) \to \Spec(R)$ the associated map on spectra. Then we have $$ f(\text{Ass}_S(M)) \subset \text{Ass}_R(M) \subset \text{WeakAss}_R(M) \subset f(\text{WeakAss}_S(M)) $$ see Lemmas \ref{lemma-ass-functorial}, \ref{lemma-weakly-ass-reverse-functorial}, and \ref{lemma-weakly-ass-support}. In general all of the inclusions may be strict, see Remarks \ref{remark-ass-reverse-functorial} and \ref{remark-weakly-ass-not-functorial}. If $S$ is Noetherian, then all the inclusions are equalities as the outer two are equal by Lemma \ref{lemma-ass-weakly-ass}. \end{remark} \begin{lemma} \label{lemma-weakly-ass-finite-ring-map} Let $\varphi : R \to S$ be a ring map. Let $M$ be an $S$-module. Denote by $f : \Spec(S) \to \Spec(R)$ the associated map on spectra. If $\varphi$ is a finite ring map, then $$ \text{WeakAss}_R(M) = f(\text{WeakAss}_S(M)). $$ \end{lemma} \begin{proof} One of the inclusions has already been proved, see Remark \ref{remark-ass-functorial}. To prove the other assume $\mathfrak q \in \text{WeakAss}_S(M)$ and let $\mathfrak p$ be the corresponding prime of $R$. Let $m \in M$ be an element such that $\mathfrak q$ is a minimal prime over $J = \{g \in S \mid gm = 0\}$. Thus the radical of $JS_{\mathfrak q}$ is $\mathfrak qS_{\mathfrak q}$. As $R \to S$ is finite there are finitely many primes $\mathfrak q = \mathfrak q_1, \mathfrak q_2, \ldots, \mathfrak q_l$ over $\mathfrak p$, see Lemma \ref{lemma-finite-finite-fibres}. Pick $x \in \mathfrak q$ with $x \not \in \mathfrak q_i$ for $i > 1$, see Lemma \ref{lemma-silly}. By the above there exists an element $y \in S$, $y \not \in \mathfrak q$ and an integer $t > 0$ such that $y x^t m = 0$. Thus the element $ym \in M$ is annihilated by $x^t$, hence $ym$ maps to zero in $M_{\mathfrak q_i}$, $i = 2, \ldots, l$. To be sure, $ym$ does not map to zero in $M_{\mathfrak q}$. \medskip\noindent The ring $S_{\mathfrak p}$ is semi-local with maximal ideals $\mathfrak q_i S_{\mathfrak p}$ by going up for finite ring maps, see Lemma \ref{lemma-integral-going-up}. If $f \in \mathfrak pR_{\mathfrak p}$ then some power of $f$ ends up in $JS_{\mathfrak q}$ hence for some $t > 0$ we see that $f^t ym$ maps to zero in $M_{\mathfrak q}$. As $ym$ vanishes at the other maximal ideals of $S_{\mathfrak p}$ we conclude that $f^t ym$ is zero in $M_{\mathfrak p}$, see Lemma \ref{lemma-characterize-zero-local}. In this way we see that $\mathfrak p$ is a minimal prime over the annihilator of $ym$ in $R$ and we win. \end{proof} \begin{lemma} \label{lemma-weakly-ass-quotient-ring} Let $R$ be a ring. Let $I$ be an ideal. Let $M$ be an $R/I$-module. Via the canonical injection $\Spec(R/I) \to \Spec(R)$ we have $\text{WeakAss}_{R/I}(M) = \text{WeakAss}_R(M)$. \end{lemma} \begin{proof} Special case of Lemma \ref{lemma-weakly-ass-finite-ring-map}. \end{proof} \begin{lemma} \label{lemma-localize-weakly-ass} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. Via the canonical injection $\Spec(S^{-1}R) \to \Spec(R)$ we have $\text{WeakAss}_R(S^{-1}M) = \text{WeakAss}_{S^{-1}R}(S^{-1}M)$ and $$ \text{WeakAss}(M) \cap \Spec(S^{-1}R) = \text{WeakAss}(S^{-1}M). $$ \end{lemma} \begin{proof} Suppose that $m \in S^{-1}M$. Let $I = \{x \in R \mid xm = 0\}$ and $I' = \{x' \in S^{-1}R \mid x'm = 0\}$. Then $I' = S^{-1}I$ and $I \cap S = \emptyset$ unless $I = R$ (verifications omitted). Thus primes in $S^{-1}R$ minimal over $I'$ correspond bijectively to primes in $R$ minimal over $I$ and avoiding $S$. This proves the equality $\text{WeakAss}_R(S^{-1}M) = \text{WeakAss}_{S^{-1}R}(S^{-1}M)$. The second equality follows from Lemma \ref{lemma-weakly-ass-local} since for $\mathfrak p \in \Spec(R)$ with $S \cap \mathfrak p = \emptyset$ we have $M_{\mathfrak p} = (S^{-1}M)_{S^{-1}\mathfrak p}$. \end{proof} \begin{lemma} \label{lemma-localize-weakly-ass-nonzero-divisors} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. Assume that every $s \in S$ is a nonzerodivisor on $M$. Then $$ \text{WeakAss}(M) = \text{WeakAss}(S^{-1}M). $$ \end{lemma} \begin{proof} As $M \subset S^{-1}M$ by assumption we obtain $\text{WeakAss}(M) \subset \text{WeakAss}(S^{-1}M)$ from Lemma \ref{lemma-weakly-ass}. Conversely, suppose that $n/s \in S^{-1}M$ is an element with annihilator $I$ and $\mathfrak p$ a prime which is minimal over $I$. Then the annihilator of $n \in M$ is $I$ and $\mathfrak p$ is a prime minimal over $I$. \end{proof} \begin{lemma} \label{lemma-zero-at-weakly-ass-zero} Let $R$ be a ring. Let $M$ be an $R$-module. The map $$ M \longrightarrow \prod\nolimits_{\mathfrak p \in \text{WeakAss}(M)} M_{\mathfrak p} $$ is injective. \end{lemma} \begin{proof} Let $x \in M$ be an element of the kernel of the map. Set $N = Rx \subset M$. If $\mathfrak p$ is a weakly associated prime of $N$ we see on the one hand that $\mathfrak p \in \text{WeakAss}(M)$ (Lemma \ref{lemma-weakly-ass}) and on the other hand that $N_{\mathfrak p} \subset M_{\mathfrak p}$ is not zero. This contradiction shows that $\text{WeakAss}(N) = \emptyset$. Hence $N = 0$, i.e., $x = 0$ by Lemma \ref{lemma-weakly-ass-zero}. \end{proof} \begin{lemma} \label{lemma-weak-post-bourbaki} Let $R \to S$ be a ring map. Let $N$ be an $S$-module. Assume $N$ is flat as an $R$-module and $R$ is a domain with fraction field $K$. Then $$ \text{WeakAss}_S(N) = \text{WeakAss}_{S \otimes_R K}(N \otimes_R K) $$ via the canonical inclusion $\Spec(S \otimes_R K) \subset \Spec(S)$. \end{lemma} \begin{proof} Note that $S \otimes_R K = (R \setminus \{0\})^{-1}S$ and $N \otimes_R K = (R \setminus \{0\})^{-1}N$. For any nonzero $x \in R$ multiplication by $x$ on $N$ is injective as $N$ is flat over $R$. Hence the lemma follows from Lemma \ref{lemma-localize-weakly-ass-nonzero-divisors}. \end{proof} \begin{lemma} \label{lemma-weakly-ass-change-fields} Let $K/k$ be a field extension. Let $R$ be a $k$-algebra. Let $M$ be an $R$-module. Let $\mathfrak q \subset R \otimes_k K$ be a prime lying over $\mathfrak p \subset R$. If $\mathfrak q$ is weakly associated to $M \otimes_k K$, then $\mathfrak p$ is weakly associated to $M$. \end{lemma} \begin{proof} Let $z \in M \otimes_k K$ be an element such that $\mathfrak q$ is minimal over the annihilator $J \subset R \otimes_k K$ of $z$. Choose a finitely generated subextension $K/L/k$ such that $z \in M \otimes_k L$. Since $R \otimes_k L \to R \otimes_k K$ is flat we see that $J = I(R \otimes_k K)$ where $I \subset R \otimes_k L$ is the annihilator of $z$ in the smaller ring (Lemma \ref{lemma-annihilator-flat-base-change}). Thus $\mathfrak q \cap (R \otimes_k L)$ is minimal over $I$ by going down (Lemma \ref{lemma-flat-going-down}). In this way we reduce to the case described in the next paragraph. \medskip\noindent Assume $K/k$ is a finitely generated field extension. Let $x_1, \ldots, x_r \in K$ be a transcendence basis of $K$ over $k$, see Fields, Section \ref{fields-section-transcendence}. Set $L = k(x_1, \ldots, x_r)$. Say $[K : L] = n$. Then $R \otimes_k L \to R \otimes_k K$ is a finite ring map. Hence $\mathfrak q \cap (R \otimes_k L)$ is a weakly associated prime of $M \otimes_k K$ viewed as a $R \otimes_k L$-module by Lemma \ref{lemma-weakly-ass-finite-ring-map}. Since $M \otimes_k K \cong (M \otimes_k L)^{\oplus n}$ as a $R \otimes_k L$-module, we see that $\mathfrak q \cap (R \otimes_k L)$ is a weakly associated prime of $M \otimes_k L$ (for example by using Lemma \ref{lemma-weakly-ass} and induction). In this way we reduce to the case discussed in the next paragraph. \medskip\noindent Assume $K = k(x_1, \ldots, x_r)$ is a purely transcendental field extension. We may replace $R$ by $R_\mathfrak p$, $M$ by $M_\mathfrak p$ and $\mathfrak q$ by $\mathfrak q(R_\mathfrak p \otimes_k K)$. See Lemma \ref{lemma-localize-weakly-ass}. In this way we reduce to the case discussed in the next paragraph. \medskip\noindent Assume $K = k(x_1, \ldots, x_r)$ is a purely transcendental field extension and $R$ is local with maximal ideal $\mathfrak p$. We claim that any $f \in R \otimes_k K$, $f \not \in \mathfrak p(R \otimes_k K)$ is a nonzerodivisor on $M \otimes_k K$. Namely, let $z \in M \otimes_k K$ be a nonzero element. There is a finite $R$-submodule $M' \subset M$ such that $z \in M' \otimes_k K$ and such that $M'$ is minimal with this property: choose a basis $\{t_\alpha\}$ of $K$ as a $k$-vector space, write $z = \sum m_\alpha \otimes t_\alpha$ and let $M'$ be the $R$-submodule generated by the $m_\alpha$. If $z \in \mathfrak p(M' \otimes_k K) = \mathfrak p M' \otimes_k K$, then $\mathfrak pM' = M'$ and $M' = 0$ by Lemma \ref{lemma-NAK}, a contradiction. Thus $z$ has nonzero image $\overline{z}$ in $M'/\mathfrak p M' \otimes_k K$. But $R/\mathfrak p \otimes_k K$ is a domain as a localization of $\kappa(\mathfrak p)[x_1, \ldots, x_r]$ and $M'/\mathfrak p M' \otimes_k K$ is a free module, hence $f\overline{z} \not = 0$. This proves the claim. \medskip\noindent Finally, pick $z \in M \otimes_k K$ such that $\mathfrak q$ is minimal over the annihilator $J \subset R \otimes_k K$ of $z$. For $f \in \mathfrak p$ there exists an $n \geq 1$ and a $g \in R \otimes_k K$, $g \not \in \mathfrak q$ such that $g f^n \in J$, i.e., $g f^n z = 0$. (This holds because $\mathfrak q$ lies over $\mathfrak p$ and $\mathfrak q$ is minimal over $J$.) Above we have seen that $g$ is a nonzerodivisor hence $f^n z = 0$. This means that $\mathfrak p$ is a weakly associated prime of $M \otimes_k K$ viewed as an $R$-module. Since $M \otimes_k K$ is a direct sum of copies of $M$ we conclude that $\mathfrak p$ is a weakly associated prime of $M$ as before. \end{proof} \section{Embedded primes} \label{section-embedded-primes} % BEGIN ALGEBRA EDITORIAL ROUTE section-embedded-primes \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-embedded-primes}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-embedded-primes \noindent Here is the definition. \begin{definition} \label{definition-embedded-primes} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item The associated primes of $M$ which are not minimal among the associated primes of $M$ are called the {\it embedded associated primes} of $M$. \item The {\it embedded primes of $R$} are the embedded associated primes of $R$ as an $R$-module. \end{enumerate} \end{definition} \noindent Here is a way to get rid of these. \begin{lemma} \label{lemma-remove-embedded-primes} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. Consider the set of $R$-submodules $$ \{ K \subset M \mid \text{Supp}(K) \text{ nowhere dense in } \text{Supp}(M) \}. $$ This set has a maximal element $K$ and the quotient $M' = M/K$ has the following properties \begin{enumerate} \item $\text{Supp}(M) = \text{Supp}(M')$, \item $M'$ has no embedded associated primes, \item for any $f \in R$ which is contained in all embedded associated primes of $M$ we have $M_f \cong M'_f$. \end{enumerate} \end{lemma} \begin{proof} We will use Lemma \ref{lemma-finite-ass} and Proposition \ref{proposition-minimal-primes-associated-primes} without further mention. Let $\mathfrak q_1, \ldots, \mathfrak q_t$ denote the minimal primes in the support of $M$. Let $\mathfrak p_1, \ldots, \mathfrak p_s$ denote the embedded associated primes of $M$. Then $\text{Ass}(M) = \{\mathfrak q_j, \mathfrak p_i\}$. Let $$ K = \{m \in M \mid \text{Supp}(Rm) \subset \bigcup V(\mathfrak p_i)\} $$ It is immediately seen to be a submodule. Since $M$ is finite over a Noetherian ring, we know $K$ is finite too. Hence $\text{Supp}(K)$ is nowhere dense in $\text{Supp}(M)$. Let $K' \subset M$ be another submodule with support nowhere dense in $\text{Supp}(M)$. This means that $K'_{\mathfrak q_j} = 0$. Hence if $m \in K'$, then $m$ maps to zero in $M_{\mathfrak q_j}$ which in turn implies $(Rm)_{\mathfrak q_j} = 0$. On the other hand we have $\text{Ass}(Rm) \subset \text{Ass}(M)$. Hence the support of $Rm$ is contained in $\bigcup V(\mathfrak p_i)$. Therefore $m \in K$ and thus $K' \subset K$ as $m$ was arbitrary in $K'$. \medskip\noindent Let $M' = M/K$. Since $K_{\mathfrak q_j}=0$ we know $M'_{\mathfrak q_j} = M_{\mathfrak q_j}$ for all $j$. Hence $M$ and $M'$ have the same support. \medskip\noindent Suppose $\mathfrak q = \text{Ann}(\overline{m}) \in \text{Ass}(M')$ where $\overline{m} \in M'$ is the image of $m \in M$. Then $m \not \in K$ and hence the support of $Rm$ must contain one of the $\mathfrak q_j$. Since $M_{\mathfrak q_j} = M'_{\mathfrak q_j}$, we know $\overline{m}$ does not map to zero in $M'_{\mathfrak q_j}$. Hence $\mathfrak q \subset \mathfrak q_j$ (actually we have equality), which means that all the associated primes of $M'$ are not embedded. \medskip\noindent Let $f$ be an element contained in all $\mathfrak p_i$. Then $D(f) \cap \text{supp}(K) = \emptyset$. Hence $M_f = M'_f$ because $K_f = 0$. \end{proof} \begin{lemma} \label{lemma-remove-embedded-primes-localize} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. For any $f \in R$ we have $(M')_f = (M_f)'$ where $M \to M'$ and $M_f \to (M_f)'$ are the quotients constructed in Lemma \ref{lemma-remove-embedded-primes}. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-no-embedded-primes-endos} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module without embedded associated primes. Let $I = \{x \in R \mid xM = 0\}$. Then the ring $R/I$ has no embedded primes. \end{lemma} \begin{proof} We may replace $R$ by $R/I$. Hence we may assume every nonzero element of $R$ acts nontrivially on $M$. By Lemma \ref{lemma-support-closed} this implies that $\Spec(R)$ equals the support of $M$. Suppose that $\mathfrak p$ is an embedded prime of $R$. Let $x \in R$ be an element whose annihilator is $\mathfrak p$. Consider the nonzero module $N = xM \subset M$. It is annihilated by $\mathfrak p$. Hence any associated prime $\mathfrak q$ of $N$ contains $\mathfrak p$ and is also an associated prime of $M$. Then $\mathfrak q$ would be an embedded associated prime of $M$ which contradicts the assumption of the lemma. \end{proof} \section{Regular sequences} \label{section-regular-sequences} % BEGIN ALGEBRA EDITORIAL ROUTE section-regular-sequences \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-regular-sequences}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-regular-sequences \noindent In this section we develop some basic properties of regular sequences. \begin{definition} \label{definition-regular-sequence} Let $R$ be a ring. Let $M$ be an $R$-module. A sequence of elements $f_1, \ldots, f_r$ of $R$ is called an {\it $M$-regular sequence} if the following conditions hold: \begin{enumerate} \item $f_i$ is a nonzerodivisor on $M/(f_1, \ldots, f_{i - 1})M$ for each $i = 1, \ldots, r$, and \item the module $M/(f_1, \ldots, f_r)M$ is not zero. \end{enumerate} If $I$ is an ideal of $R$ and $f_1, \ldots, f_r \in I$ then we call $f_1, \ldots, f_r$ an {\it $M$-regular sequence in $I$}. If $M = R$, we call $f_1, \ldots, f_r$ simply a {\it regular sequence} (in $I$). \end{definition} \noindent Please pay attention to the fact that the definition depends on the order of the elements $f_1, \ldots, f_r$ (see examples below). Some papers/books drop the requirement that the module $M/(f_1, \ldots, f_r)M$ is nonzero. This has the advantage that being a regular sequence is preserved under localization. However, we will use this definition mainly to define the depth of a module in case $R$ is local; in that case the $f_i$ are required to be in the maximal ideal -- a condition which is not preserved under going from $R$ to a localization $R_\mathfrak p$. \begin{example} \label{example-global-regular} Let $k$ be a field. In the ring $k[x, y, z]$ the sequence $x, y(1-x), z(1-x)$ is regular but the sequence $y(1-x), z(1-x), x$ is not. \end{example} \begin{example} \label{example-local-regular} Let $k$ be a field. Consider the ring $k[x, y, w_0, w_1, w_2, \ldots]/I$ where $I$ is generated by $yw_i$, $i = 0, 1, 2, \ldots$ and $w_i - xw_{i + 1}$, $i = 0, 1, 2, \ldots$. The sequence $x, y$ is regular, but $y$ is a zerodivisor. Moreover you can localize at the maximal ideal $(x, y, w_i)$ and still get an example. \end{example} \begin{lemma} \label{lemma-permute-xi} Let $R$ be a local Noetherian ring. Let $M$ be a finite $R$-module. Let $x_1, \ldots, x_c$ be an $M$-regular sequence. Then any permutation of the $x_i$ is an $M$-regular sequence as well. \end{lemma} \begin{proof} First we do the case $c = 2$. Consider $K \subset M$ the kernel of $x_2 : M \to M$. For any $z \in K$ we know that $z = x_1 z'$ for some $z' \in M$ because $x_2$ is a nonzerodivisor on $M/x_1M$. Because $x_1$ is a nonzerodivisor on $M$ we see that $x_2 z' = 0$ as well. Hence $x_1 : K \to K$ is surjective. Thus $K = 0$ by Nakayama's Lemma \ref{lemma-NAK}. Next, consider multiplication by $x_1$ on $M/x_2M$. If $z \in M$ maps to an element $\overline{z} \in M/x_2M$ in the kernel of this map, then $x_1 z = x_2 y$ for some $y \in M$. But then since $x_1, x_2$ is a regular sequence we see that $y = x_1 y'$ for some $y' \in M$. Hence $x_1 ( z - x_2 y' ) =0$ and hence $z = x_2 y'$ and hence $\overline{z} = 0$ as desired. \medskip\noindent For the general case, observe that any permutation is a composition of transpositions of adjacent indices. Hence it suffices to prove that $$ x_1, \ldots, x_{i-2}, x_i, x_{i-1}, x_{i + 1}, \ldots, x_c $$ is an $M$-regular sequence. This follows from the case we just did applied to the module $M/(x_1, \ldots, x_{i-2})M$ and the length $2$ regular sequence $x_{i-1}, x_i$. \end{proof} \begin{lemma} \label{lemma-flat-increases-depth} \begin{slogan} Flat local ring homomorphisms preserve and reflect regular sequences. \end{slogan} Let $R, S$ be local rings. Let $R \to S$ be a flat local ring homomorphism. Let $x_1, \ldots, x_r$ be a sequence in $R$. Let $M$ be an $R$-module. The following are equivalent \begin{enumerate} \item $x_1, \ldots, x_r$ is an $M$-regular sequence in $R$, and \item the images of $x_1, \ldots, x_r$ in $S$ form a $M \otimes_R S$-regular sequence. \end{enumerate} \end{lemma} \begin{proof} This is so because $R \to S$ is faithfully flat by Lemma \ref{lemma-local-flat-ff}. \end{proof} \begin{lemma} \label{lemma-regular-sequence-in-neighbourhood} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. Let $\mathfrak p$ be a prime. Let $x_1, \ldots, x_r$ be a sequence in $R$ whose image in $R_{\mathfrak p}$ forms an $M_{\mathfrak p}$-regular sequence. Then there exists a $g \in R$, $g \not \in \mathfrak p$ such that the image of $x_1, \ldots, x_r$ in $R_g$ forms an $M_g$-regular sequence. \end{lemma} \begin{proof} Set $$ K_i = \Ker\left(x_i : M/(x_1, \ldots, x_{i - 1})M \to M/(x_1, \ldots, x_{i - 1})M\right). $$ This is a finite $R$-module whose localization at $\mathfrak p$ is zero by assumption. Hence there exists a $g \in R$, $g \not \in \mathfrak p$ such that $(K_i)_g = 0$ for all $i = 1, \ldots, r$. This $g$ works. \end{proof} \begin{lemma} \label{lemma-join-regular-sequences} Let $A$ be a ring. Let $I$ be an ideal generated by a regular sequence $f_1, \ldots, f_n$ in $A$. Let $g_1, \ldots, g_m \in A$ be elements whose images $\overline{g}_1, \ldots, \overline{g}_m$ form a regular sequence in $A/I$. Then $f_1, \ldots, f_n, g_1, \ldots, g_m$ is a regular sequence in $A$. \end{lemma} \begin{proof} This follows immediately from the definitions. \end{proof} \begin{lemma} \label{lemma-regular-sequence-short-exact-sequence} Let $R$ be a ring. Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a short exact sequence of $R$-modules. Let $f_1, \ldots, f_r \in R$. If $f_1, \ldots, f_r$ is $M_1$-regular and $M_3$-regular, then $f_1, \ldots, f_r$ is $M_2$-regular. \end{lemma} \begin{proof} By Lemma \ref{lemma-snake}, if $f_1 : M_1 \to M_1$ and $f_1 : M_3 \to M_3$ are injective, then so is $f_1 : M_2 \to M_2$ and we obtain a short exact sequence $$ 0 \to M_1/f_1M_1 \to M_2/f_1M_2 \to M_3/f_1M_3 \to 0 $$ The lemma follows from this and induction on $r$. Some details omitted. \end{proof} \begin{lemma} \label{lemma-regular-sequence-powers} Let $R$ be a ring. Let $M$ be an $R$-module. Let $f_1, \ldots, f_r \in R$ and $e_1, \ldots, e_r > 0$ integers. Then $f_1, \ldots, f_r$ is an $M$-regular sequence if and only if $f_1^{e_1}, \ldots, f_r^{e_r}$ is an $M$-regular sequence. \end{lemma} \begin{proof} We will prove this by induction on $r$. If $r = 1$ this follows from the following two easy facts: (a) a power of a nonzerodivisor on $M$ is a nonzerodivisor on $M$ and (b) a divisor of a nonzerodivisor on $M$ is a nonzerodivisor on $M$. If $r > 1$, then by induction applied to $M/f_1M$ we have that $f_1, f_2, \ldots, f_r$ is an $M$-regular sequence if and only if $f_1, f_2^{e_2}, \ldots, f_r^{e_r}$ is an $M$-regular sequence. Thus it suffices to show, given $e > 0$, that $f_1^e, f_2, \ldots, f_r$ is an $M$-regular sequence if and only if $f_1, \ldots, f_r$ is an $M$-regular sequence. We will prove this by induction on $e$. The case $e = 1$ is trivial. Since $f_1$ is a nonzerodivisor under both assumptions (by the case $r = 1$) we have a short exact sequence $$ 0 \to M/f_1M \xrightarrow{f_1^{e - 1}} M/f_1^eM \to M/f_1^{e - 1}M \to 0 $$ Suppose that $f_1, f_2, \ldots, f_r$ is an $M$-regular sequence. Then by induction the elements $f_2, \ldots, f_r$ are $M/f_1M$ and $M/f_1^{e - 1}M$-regular sequences. By Lemma \ref{lemma-regular-sequence-short-exact-sequence} $f_2, \ldots, f_r$ is $M/f_1^eM$-regular. Hence $f_1^e, f_2, \ldots, f_r$ is $M$-regular. Conversely, suppose that $f_1^e, f_2, \ldots, f_r$ is an $M$-regular sequence. Then $f_2 : M/f_1^eM \to M/f_1^eM$ is injective, hence $f_2 : M/f_1M \to M/f_1M$ is injective, hence by induction(!) $f_2 : M/f_1^{e - 1}M \to M/f_1^{e - 1}M$ is injective, hence $$ 0 \to M/(f_1, f_2)M \xrightarrow{f_1^{e - 1}} M/(f_1^e, f_2)M \to M/(f_1^{e - 1}, f_2)M \to 0 $$ is a short exact sequence by Lemma \ref{lemma-snake}. This proves the converse for $r = 2$. If $r > 2$, then we have $f_3 : M/(f_1^e, f_2)M \to M/(f_1^e, f_2)M$ is injective, hence $f_3 : M/(f_1, f_2)M \to M/(f_1, f_2)M$ is injective, and so on. Some details omitted. \end{proof} \begin{lemma} \label{lemma-regular-sequence-in-polynomial-ring} Let $R$ be a ring. Let $f_1, \ldots, f_r \in R$ which do not generate the unit ideal. The following are equivalent: \begin{enumerate} \item any permutation of $f_1, \ldots, f_r$ is a regular sequence, \item any subsequence of $f_1, \ldots, f_r$ (in the given order) is a regular sequence, and \item $f_1x_1, \ldots, f_rx_r$ is a regular sequence in the polynomial ring $R[x_1, \ldots, x_r]$. \end{enumerate} \end{lemma} \begin{proof} It is clear that (1) implies (2). We prove (2) implies (1) by induction on $r$. The case $r = 1$ is trivial. The case $r = 2$ says that if $a, b \in R$ are a regular sequence and $b$ is a nonzerodivisor, then $b, a$ is a regular sequence. This is clear because the kernel of $a : R/(b) \to R/(b)$ is isomorphic to the kernel of $b : R/(a) \to R/(a)$ if both $a$ and $b$ are nonzerodivisors. The case $r > 2$. Assume (2) holds and say we want to prove $f_{\sigma(1)}, \ldots, f_{\sigma(r)}$ is a regular sequence for some permutation $\sigma$. We already know that $f_{\sigma(1)}, \ldots, f_{\sigma(r - 1)}$ is a regular sequence by induction. Hence it suffices to show that $f_s$ where $s = \sigma(r)$ is a nonzerodivisor modulo $f_1, \ldots, \hat f_s, \ldots, f_r$. If $s = r$ we are done. If $s < r$, then note that $f_s$ and $f_r$ are both nonzerodivisors in the ring $R/(f_1, \ldots, \hat f_s, \ldots, f_{r - 1})$ (by induction hypothesis again). Since we know $f_s, f_r$ is a regular sequence in that ring we conclude by the case of sequence of length $2$ that $f_r, f_s$ is too. \medskip\noindent Note that $R[x_1, \ldots, x_r]/(f_1x_1, \ldots, f_ix_i)$ as an $R$-module is a direct sum of the modules $$ R/I_E \cdot x_1^{e_1} \ldots x_r^{e_r} $$ indexed by multi-indices $E = (e_1, \ldots, e_r)$ where $I_E$ is the ideal generated by $f_j$ for $1 \leq j \leq i$ with $e_j > 0$. Hence $f_{i + 1}x_{i + 1}$ is a nonzerodivisor on this if and only if $f_{i + 1}$ is a nonzerodivisor on $R/I_E$ for all $E$. Taking $E$ with all positive entries, we see that $f_{i + 1}$ is a nonzerodivisor on $R/(f_1, \ldots, f_i)$. Thus (3) implies (2). Conversely, if (2) holds, then any subsequence of $f_1, \ldots, f_i, f_{i + 1}$ is a regular sequence in particular $f_{i + 1}$ is a nonzerodivisor on all $R/I_E$. In this way we see that (2) implies (3). \end{proof} \section{Quasi-regular sequences} \label{section-quasi-regular} % BEGIN ALGEBRA EDITORIAL ROUTE section-quasi-regular \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-quasi-regular}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-quasi-regular \noindent We introduce the notion of quasi-regular sequence which is slightly weaker than that of a regular sequence and easier to use. Let $R$ be a ring and let $f_1, \ldots, f_c \in R$. Set $J = (f_1, \ldots, f_c)$. Let $M$ be an $R$-module. Then there is a canonical map \begin{equation} \label{equation-quasi-regular} M/JM \otimes_{R/J} R/J[X_1, \ldots, X_c] \longrightarrow \bigoplus\nolimits_{n \geq 0} J^nM/J^{n + 1}M \end{equation} of graded $R/J[X_1, \ldots, X_c]$-modules defined by the rule $$ \overline{m} \otimes X_1^{e_1} \ldots X_c^{e_c} \longmapsto f_1^{e_1} \ldots f_c^{e_c} m \bmod J^{e_1 + \ldots + e_c + 1}M. $$ Note that (\ref{equation-quasi-regular}) is always surjective. \begin{definition} \label{definition-quasi-regular-sequence} Let $R$ be a ring. Let $M$ be an $R$-module. A sequence of elements $f_1, \ldots, f_c$ of $R$ is called {\it $M$-quasi-regular} if (\ref{equation-quasi-regular}) is an isomorphism. If $M = R$, we call $f_1, \ldots, f_c$ simply a {\it quasi-regular sequence}. \end{definition} \noindent So if $f_1, \ldots, f_c$ is a quasi-regular sequence, then $$ R/J[X_1, \ldots, X_c] = \bigoplus\nolimits_{n \geq 0} J^n/J^{n + 1} $$ where $J = (f_1, \ldots, f_c)$. It is clear that being a quasi-regular sequence is independent of the order of $f_1, \ldots, f_c$. \begin{lemma} \label{lemma-regular-quasi-regular} Let $R$ be a ring. \begin{enumerate} \item A regular sequence $f_1, \ldots, f_c$ of $R$ is a quasi-regular sequence. \item Suppose that $M$ is an $R$-module and that $f_1, \ldots, f_c$ is an $M$-regular sequence. Then $f_1, \ldots, f_c$ is an $M$-quasi-regular sequence. \end{enumerate} \end{lemma} \begin{proof} Set $J = (f_1, \ldots, f_c)$. We prove the first assertion by induction on $c$. We have to show that given any relation $\sum_{|I| = n} a_I f^I \in J^{n + 1}$ with $a_I \in R$ we actually have $a_I \in J$ for all multi-indices $I$. Since any element of $J^{n + 1}$ is of the form $\sum_{|I| = n} b_I f^I$ with $b_I \in J$ we may assume, after replacing $a_I$ by $a_I - b_I$, the relation reads $\sum_{|I| = n} a_I f^I = 0$. We can rewrite this as $$ \sum\nolimits_{e = 0}^n \left( \sum\nolimits_{|I'| = n - e} a_{I', e} f^{I'} \right) f_c^e = 0 $$ Here and below the ``primed'' multi-indices $I'$ are required to be of the form $I' = (i_1, \ldots, i_{c - 1}, 0)$. We will show by induction on $l \in \{0, \ldots, n\}$ that if we have a relation $$ \sum\nolimits_{e = 0}^l \left( \sum\nolimits_{|I'| = n - e} a_{I', e} f^{I'} \right) f_c^e = 0 $$ then $a_{I', e} \in J$ for all $I', e$. Set $J' = (f_1, \ldots, f_{c-1})$. For $l = 0$, the induction hypothesis on $c$ gives $a_{I',0} \in J' \subset J$, which proves the assertion. Assume now $l \geq 1$; the sum from $0$ to $l-2$ below is empty when $l=1$. Observe that $\sum\nolimits_{|I'| = n - l} a_{I', l} f^{I'}$ is mapped into $(J')^{n - l + 1}$ by $f_c^{l}$. By induction hypothesis (for the induction on $c$) we see that $f_c^l a_{I', l} \in J'$. Because $f_c$ is not a zerodivisor on $R/J'$ (as $f_1, \ldots, f_c$ is a regular sequence) we conclude that $a_{I', l} \in J'$. This allows us to rewrite the term $(\sum\nolimits_{|I'| = n - l} a_{I', l} f^{I'})f_c^l$ in the form $(\sum\nolimits_{|I'| = n - l + 1} f_c b_{I', l - 1} f^{I'})f_c^{l-1}$. This gives a new relation of the form $$ \left(\sum\nolimits_{|I'| = n - l + 1} (a_{I', l-1} + f_c b_{I', l - 1}) f^{I'}\right)f_c^{l-1} + \sum\nolimits_{e = 0}^{l - 2} \left( \sum\nolimits_{|I'| = n - e} a_{I', e} f^{I'} \right) f_c^e = 0 $$ Now by the induction hypothesis (on $l$ this time) we see that all $a_{I', l-1} + f_c b_{I', l - 1} \in J$ and all $a_{I', e} \in J$ for $e \leq l - 2$. This, combined with $a_{I', l} \in J' \subset J$ seen above, finishes the proof of the induction step. \medskip\noindent The second assertion means that given any formal expression $F = \sum_{|I| = n} m_I X^I$, $m_I \in M$ with $\sum m_I f^I \in J^{n + 1}M$, then all the coefficients $m_I$ are in $JM$. This is proved in exactly the same way as we prove the corresponding result for the first assertion above. \end{proof} \begin{lemma} \label{lemma-flat-base-change-quasi-regular} Let $R \to R'$ be a flat ring map. Let $M$ be an $R$-module. Suppose that $f_1, \ldots, f_r \in R$ form an $M$-quasi-regular sequence. Then the images of $f_1, \ldots, f_r$ in $R'$ form a $M \otimes_R R'$-quasi-regular sequence. \end{lemma} \begin{proof} Set $J = (f_1, \ldots, f_r)$, $J' = JR'$ and $M' = M \otimes_R R'$. We have to show the canonical map $\mu : R'/J'[X_1, \ldots X_r] \otimes_{R'/J'} M'/J'M' \to \bigoplus (J')^nM'/(J')^{n + 1}M'$ is an isomorphism. Because $R \to R'$ is flat the sequences $0 \to J^nM \to M$ and $0 \to J^{n + 1}M \to J^nM \to J^nM/J^{n + 1}M \to 0$ remain exact on tensoring with $R'$. This first implies that $J^nM \otimes_R R' = (J')^nM'$ and then that $(J')^nM'/(J')^{n + 1}M' = J^nM/J^{n + 1}M \otimes_R R'$. Thus $\mu$ is the tensor product of (\ref{equation-quasi-regular}), which is an isomorphism by assumption, with $\text{id}_{R'}$ and we conclude. \end{proof} \begin{lemma} \label{lemma-quasi-regular-sequence-in-neighbourhood} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. Let $\mathfrak p$ be a prime. Let $x_1, \ldots, x_c$ be a sequence in $R$ whose image in $R_{\mathfrak p}$ forms an $M_{\mathfrak p}$-quasi-regular sequence. Then there exists a $g \in R$, $g \not \in \mathfrak p$ such that the image of $x_1, \ldots, x_c$ in $R_g$ forms an $M_g$-quasi-regular sequence. \end{lemma} \begin{proof} Consider the kernel $K$ of the map (\ref{equation-quasi-regular}). As $M/JM \otimes_{R/J} R/J[X_1, \ldots, X_c]$ is a finite $R/J[X_1, \ldots, X_c]$-module and as $R/J[X_1, \ldots, X_c]$ is Noetherian, we see that $K$ is also a finite $R/J[X_1, \ldots, X_c]$-module. Pick homogeneous generators $k_1, \ldots, k_t \in K$. By assumption for each $i = 1, \ldots, t$ there exists a $g_i \in R$, $g_i \not \in \mathfrak p$ such that $g_i k_i = 0$. Hence $g = g_1 \ldots g_t$ works. \end{proof} \begin{lemma} \label{lemma-truncate-quasi-regular} Let $R$ be a ring. Let $M$ be an $R$-module. Let $f_1, \ldots, f_c \in R$ be an $M$-quasi-regular sequence. For any $i$ the sequence $\overline{f}_{i + 1}, \ldots, \overline{f}_c$ of $\overline{R} = R/(f_1, \ldots, f_i)$ is an $\overline{M} = M/(f_1, \ldots, f_i)M$-quasi-regular sequence. \end{lemma} \begin{proof} It suffices to prove this for $i = 1$. Set $\overline{J} = (\overline{f}_2, \ldots, \overline{f}_c) \subset \overline{R}$. Then \begin{align*} \overline{J}^n\overline{M}/\overline{J}^{n + 1}\overline{M} & = (J^nM + f_1M)/(J^{n + 1}M + f_1M) \\ & = J^nM / (J^{n + 1}M + J^nM \cap f_1M). \end{align*} For $n=0$, the displayed quotient is $M/JM$, as required. For $n \geq 1$, it suffices to show that $J^{n + 1}M + J^nM \cap f_1M = J^{n + 1}M + f_1J^{n - 1}M$ because that will show that $\bigoplus_{n \geq 0} \overline{J}^n\overline{M}/\overline{J}^{n + 1}\overline{M}$ is the quotient of $\bigoplus_{n \geq 0} J^nM/J^{n + 1}M \cong M/JM[X_1, \ldots, X_c]$ by $X_1$. Actually, for $n \geq 1$, we have $J^nM \cap f_1M = f_1J^{n - 1}M$. Namely, if $m \not \in J^{n - 1}M$, then $f_1m \not \in J^nM$ because $\bigoplus J^nM/J^{n + 1}M$ is the polynomial module $(M/JM) \otimes_{R/J} (R/J)[X_1, \ldots, X_c]$ by assumption. \end{proof} \begin{lemma} \label{lemma-quasi-regular-regular} Let $(R, \mathfrak m)$ be a local Noetherian ring. Let $M$ be a nonzero finite $R$-module. Let $f_1, \ldots, f_c \in \mathfrak m$ be an $M$-quasi-regular sequence. Then $f_1, \ldots, f_c$ is an $M$-regular sequence. \end{lemma} \begin{proof} Set $J = (f_1, \ldots, f_c)$. Let us show that $f_1$ is a nonzerodivisor on $M$. Suppose $x \in M$ is not zero. By Krull's intersection theorem there exists an integer $r$ such that $x \in J^rM$ but $x \not \in J^{r + 1}M$, see Lemma \ref{lemma-intersect-powers-ideal-module-zero}. Then $f_1 x \in J^{r + 1}M$ is an element whose class in $J^{r + 1}M/J^{r + 2}M$ is nonzero by the assumed structure of $\bigoplus J^nM/J^{n + 1}M$. Whence $f_1x \not = 0$. \medskip\noindent Now we can finish the proof by induction on $c$ using Lemma \ref{lemma-truncate-quasi-regular}. \end{proof} \begin{remark}[Other types of regular sequences] \label{remark-koszul-regular} In the paper \cite{Kabele} the author discusses two more regularity conditions for sequences $x_1, \ldots, x_r$ of elements of a ring $R$. Namely, we say the sequence is {\it Koszul-regular} if $H_i(K_{\bullet}(R, x_{\bullet})) = 0$ for $i \geq 1$ where $K_{\bullet}(R, x_{\bullet})$ is the Koszul complex. The sequence is called {\it $H_1$-regular} if $H_1(K_{\bullet}(R, x_{\bullet})) = 0$. One has the implications regular $\Rightarrow$ Koszul-regular $\Rightarrow$ $H_1$-regular $\Rightarrow$ quasi-regular. By examples the author shows that these implications cannot be reversed in general even if $R$ is a (non-Noetherian) local ring and the sequence generates the maximal ideal of $R$. We introduce these notions in more detail in More on Algebra, Section \ref{more-algebra-section-koszul-regular}. \end{remark} \begin{remark} \label{remark-join-quasi-regular-sequences} Let $k$ be a field. Consider the ring $$ A = k[x, y, w, z_0, z_1, z_2, \ldots]/ (y^2z_0 - wx, z_0 - yz_1, z_1 - yz_2, \ldots) $$ In this ring $x$ is a nonzerodivisor and the image of $y$ in $A/xA$ gives a quasi-regular sequence. But it is not true that $x, y$ is a quasi-regular sequence in $A$ because $(x, y)/(x, y)^2$ isn't free of rank two over $A/(x, y)$ due to the fact that $wx = 0$ in $(x, y)/(x, y)^2$ but $w$ isn't zero in $A/(x, y)$. Hence the analogue of Lemma \ref{lemma-join-regular-sequences} does not hold for quasi-regular sequences. \end{remark} \begin{lemma} \label{lemma-quasi-regular-on-quotient} Let $R$ be a ring. Let $J = (f_1, \ldots, f_r)$ be an ideal of $R$. Let $M$ be an $R$-module. Set $\overline{R} = R/\bigcap_{n \geq 0} J^n$, $\overline{M} = M/\bigcap_{n \geq 0} J^nM$, and denote $\overline{f}_i$ the image of $f_i$ in $\overline{R}$. Then $f_1, \ldots, f_r$ is $M$-quasi-regular if and only if $\overline{f}_1, \ldots, \overline{f}_r$ is $\overline{M}$-quasi-regular. \end{lemma} \begin{proof} Set $\overline{J}=J\overline{R} = (\overline{f}_1, \ldots, \overline{f}_r)$. This is true because $J^nM/J^{n + 1}M \cong \overline{J}^n\overline{M}/\overline{J}^{n + 1}\overline{M}$. \end{proof} \section{Blow up algebras} \label{section-blow-up} % BEGIN ALGEBRA EDITORIAL ROUTE section-blow-up \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-blow-up}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-blow-up \noindent In this section we make some elementary observations about blowing up. \begin{definition} \label{definition-blow-up} Let $R$ be a ring. Let $I \subset R$ be an ideal. \begin{enumerate} \item The {\it blowup algebra}, or the {\it Rees algebra}, associated to the pair $(R, I)$ is the graded $R$-algebra $$ \text{Bl}_I(R) = \bigoplus\nolimits_{n \geq 0} I^n = R \oplus I \oplus I^2 \oplus \ldots $$ where the summand $I^n$ is placed in degree $n$. \item Let $a \in I$ be an element. Denote $a^{(1)}$ the element $a$ seen as an element of degree $1$ in the Rees algebra. Then the {\it affine blowup algebra} $R[\frac{I}{a}]$ is the algebra $(\text{Bl}_I(R))_{(a^{(1)})}$ constructed in Section \ref{section-proj}. \end{enumerate} \end{definition} \noindent In other words, an element of $R[\frac{I}{a}]$ is represented by an expression of the form $x/a^n$ with $x \in I^n$. Two representatives $x/a^n$ and $y/a^m$ define the same element if and only if $a^k(a^mx - a^ny) = 0$ for some $k \geq 0$. \begin{lemma} \label{lemma-affine-blowup} Let $R$ be a ring, $I \subset R$ an ideal, and $a \in I$. Let $R' = R[\frac{I}{a}]$ be the affine blowup algebra. Then \begin{enumerate} \item the image of $a$ in $R'$ is a nonzerodivisor, \item $IR' = aR'$, and \item $(R')_a = R_a$. \end{enumerate} \end{lemma} \begin{proof} Immediate from the description of $R[\frac{I}{a}]$ above. \end{proof} \begin{lemma} \label{lemma-blowup-base-change} Let $R \to S$ be a ring map. Let $I \subset R$ be an ideal and $a \in I$. Set $J = IS$ and let $b \in J$ be the image of $a$. Then $S[\frac{J}{b}]$ is the quotient of $S \otimes_R R[\frac{I}{a}]$ by the ideal of elements annihilated by some power of $b$. \end{lemma} \begin{proof} Let $S'$ be the quotient of $S \otimes_R R[\frac{I}{a}]$ by its $b$-power torsion elements. The ring map $$ S \otimes_R R[\textstyle{\frac{I}{a}}] \longrightarrow S[\textstyle{\frac{J}{b}}] $$ is surjective and annihilates $b$-power torsion as $b$ is a nonzerodivisor in $S[\frac{J}{b}]$. Hence we obtain a surjective map $S' \to S[\frac{J}{b}]$. To see that the kernel is trivial, we construct an inverse map. Namely, let $z = y/b^n$ be an element of $S[\frac{J}{b}]$, i.e., $y \in J^n$. Write $y = \sum x_is_i$ with $x_i \in I^n$ and $s_i \in S$. We map $z$ to the class of $\sum s_i \otimes x_i/a^n$ in $S'$. This is well defined because an element of the kernel of the map $S \otimes_R I^n \to J^n$ is annihilated by $b^n$, hence maps to zero in $S'$. \end{proof} \begin{example} \label{example-rees-algebra-polynomial} Let $R$ be a ring. Let $P = R[t_1, \ldots, t_n]$ be the polynomial algebra. Let $I = (t_1, \ldots, t_n) \subset P$. With notation as in Definition \ref{definition-blow-up} there is an isomorphism $$ P[T_1, \ldots, T_n]/(t_iT_j - t_jT_i) \longrightarrow \text{Bl}_I(P) $$ sending $T_i$ to $t_i^{(1)}$. We leave it to the reader to show that this map is well defined. Since $I$ is generated by $t_1, \ldots, t_n$ we see that our map is surjective. To see that our map is injective one has to show: for each $e \geq 1$ the $P$-module $I^e$ is generated by the monomials $t^E = t_1^{e_1} \ldots t_n^{e_n}$ for multiindices $E = (e_1, \ldots, e_n)$ of degree $|E| = e$ subject only to the relations $t_i t^E = t_j t^{E'}$ when $|E| = |E'| = e$ and $e_a + \delta_{a i} = e'_a + \delta_{a j},\ a = 1, \ldots, n$ (Kronecker delta). We omit the details. \end{example} \begin{example} \label{example-affine-blowup-algebra-polynomial} Let $R$ be a ring. Let $P = R[t_1, \ldots, t_n]$ be the polynomial algebra. Let $I = (t_1, \ldots, t_n) \subset P$. Let $a = t_1$. With notation as in Definition \ref{definition-blow-up} there is an isomorphism $$ P[x_2, \ldots, x_n]/(t_1x_2 - t_2, \ldots, t_1x_n - t_n) \longrightarrow \textstyle{P[\frac{I}{a}] = P[\frac{I}{t_1}]} $$ sending $x_i$ to $t_i/t_1$. We leave it to the reader to show that this map is well defined. Since $I$ is generated by $t_1, \ldots, t_n$ we see that our map is surjective. To see that our map is injective, the reader can argue that the source and target of our map are $t_1$-torsion free and that the map is an isomorphism after inverting $t_1$, see Lemma \ref{lemma-affine-blowup}. Alternatively, the reader can use the description of the Rees algebra in Example \ref{example-rees-algebra-polynomial}. We omit the details. \end{example} \begin{lemma} \label{lemma-affine-blowup-quotient-description} Let $R$ be a ring. Let $I = (a_1, \ldots, a_n)$ be an ideal of $R$. Let $a = a_1$. Then there is a surjection $$ R[x_2, \ldots, x_n]/(a x_2 - a_2, \ldots, a x_n - a_n) \longrightarrow \textstyle{R[\frac{I}{a}]} $$ whose kernel is the $a$-power torsion in the source. \end{lemma} \begin{proof} Consider the ring map $P = \mathbf{Z}[t_1, \ldots, t_n] \to R$ sending $t_i$ to $a_i$. Set $J = (t_1, \ldots, t_n)$. By Example \ref{example-affine-blowup-algebra-polynomial} we have $P[\frac{J}{t_1}] = P[x_2, \ldots, x_n]/(t_1 x_2 - t_2, \ldots, t_1 x_n - t_n)$. Apply Lemma \ref{lemma-blowup-base-change} to the map $P \to R$ to conclude. \end{proof} \begin{lemma} \label{lemma-blowup-in-principal} Let $R$ be a ring, $I \subset R$ an ideal, and $a \in I$. Set $R' = R[\frac{I}{a}]$. If $f \in R$ is such that $V(f) = V(I)$, then $f$ maps to a nonzerodivisor in $R'$ and $R'_f = R'_a = R_a$. \end{lemma} \begin{proof} We will use the results of Lemma \ref{lemma-affine-blowup} without further mention. The assumption $V(f) = V(I)$ implies $V(fR') = V(IR') = V(aR')$. Hence $a^n = fb$ and $f^m = ac$ for some $b, c \in R'$. The lemma follows. \end{proof} \begin{lemma} \label{lemma-blowup-add-principal} Let $R$ be a ring, $I \subset R$ an ideal, $a \in I$, and $f \in R$. Set $R' = R[\frac{I}{a}]$ and $R'' = R[\frac{fI}{fa}]$. Then there is a surjective $R$-algebra map $R' \to R''$ whose kernel is the set of $f$-power torsion elements of $R'$. \end{lemma} \begin{proof} The map is given by sending $x/a^n$ for $x \in I^n$ to $f^nx/(fa)^n$. It is straightforward to check this map is well defined and surjective. Since $af$ is a nonzero divisor in $R''$ (Lemma \ref{lemma-affine-blowup}) we see that the set of $f$-power torsion elements are mapped to zero. Conversely, if $x \in R'$ and $f^n x \not = 0$ for all $n > 0$, then $(af)^n x \not = 0$ for all $n$ as $a$ is a nonzero divisor in $R'$. It follows that the image of $x$ in $R''$ is not zero by the description of $R''$ following Definition \ref{definition-blow-up}. \end{proof} \begin{lemma} \label{lemma-blowup-reduced} \begin{slogan} Being reduced is invariant under blowup \end{slogan} If $R$ is reduced then every (affine) blowup algebra of $R$ is reduced. \end{lemma} \begin{proof} Let $I \subset R$ be an ideal and $a \in I$. Suppose $x/a^n$ with $x \in I^n$ is a nilpotent element of $R[\frac{I}{a}]$. Then $(x/a^n)^m = 0$. Hence $a^N x^m = 0$ in $R$ for some $N \geq 0$. After increasing $N$ if necessary we may assume $N = me$ for some $e \geq 0$. Then $(a^e x)^m = 0$ and since $R$ is reduced we find $a^e x = 0$. This means that $x/a^n = 0$ in $R[\frac{I}{a}]$. \end{proof} \begin{lemma} \label{lemma-blowup-domain} Let $R$ be a domain, $I \subset R$ an ideal, and $a \in I$ a nonzero element. Then the affine blowup algebra $R[\frac{I}{a}]$ is a domain. \end{lemma} \begin{proof} Suppose $x/a^n$, $y/a^m$ with $x \in I^n$, $y \in I^m$ are elements of $R[\frac{I}{a}]$ whose product is zero. Then $a^N x y = 0$ in $R$. Since $R$ is a domain we conclude that either $x = 0$ or $y = 0$. \end{proof} \begin{lemma} \label{lemma-blowup-dominant} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $a \in I$. If $a$ is not contained in any minimal prime of $R$, then $\Spec(R[\frac{I}{a}]) \to \Spec(R)$ has dense image. \end{lemma} \begin{proof} If $a^k x = 0$ for $x \in R$, then $x$ is contained in all the minimal primes of $R$ and hence nilpotent, see Lemma \ref{lemma-Zariski-topology}. Thus the kernel of $R \to R[\frac{I}{a}]$ consists of nilpotent elements. Hence the result follows from Lemma \ref{lemma-image-dense-generic-points}. \end{proof} \begin{lemma} \label{lemma-valuation-ring-colimit-affine-blowups} Let $(R, \mathfrak m)$ be a local domain with fraction field $K$. Let $R \subset A \subset K$ be a valuation ring which dominates $R$. Then $$ A = \colim R[\textstyle{\frac{I}{a}}] $$ is a directed colimit of affine blowups $R \to R[\frac{I}{a}]$ contained in $A$, with the following properties \begin{enumerate} \item $a \in I \subset \mathfrak m$, or $(I,a)=(R,1)$, \item $I$ is finitely generated, and \item the fibre ring of $R \to R[\frac{I}{a}]$ at $\mathfrak m$ is not zero. \end{enumerate} \end{lemma} \begin{proof} If $R$ is a field, then $A=R$ and the identity chart $(I,a)=(R,1)$ gives the result. Assume henceforth that $\mathfrak m\ne0$. Condition (3) forces $a\ne0$. Each chart $R[\frac{I}{a}]$ in the diagram is a domain contained in $K$, see Lemma \ref{lemma-blowup-domain}. The lemma simply says that $A$ is the directed union of those contained in $A$ and having properties (1), (2), (3). If $R[\frac{I}{a}] \subset A$ and $R[\frac{J}{b}] \subset A$, then we have $$ R[\textstyle{\frac{I}{a}}] \cup R[\textstyle{\frac{J}{b}}] \subset R[\textstyle{\frac{IJ}{ab}}] \subset A $$ The first inclusion because $x/a^n = b^nx/(ab)^n$ and the second one because if $z \in (IJ)^n$, then $z = \sum x_iy_i$ with $x_i \in I^n$ and $y_i \in J^n$ and hence $z/(ab)^n = \sum (x_i/a^n)(y_i/b^n)$ is contained in $A$. \medskip\noindent Consider a finite subset $E \subset A$. Say $E = \{e_1, \ldots, e_n\}$. Choose $0\ne d\in R$ such that $de_i\in R$ for all $i$. Choose $0\ne t\in\mathfrak m$ and put $a=td$ and $f_i=ae_i$. Then $a\ne0$, $a,f_i\in\mathfrak m$, and $e_i=f_i/a$. Set $I = (f_1, \ldots, f_n, a)$. We claim that $R[\frac{I}{a}] \subset A$. This is clear as an element of $R[\frac{I}{a}]$ can be represented as a polynomial in the elements $e_i$. The maximal ideal of $A$ contracts to a prime of this chart over $\mathfrak m$, so its fibre at $\mathfrak m$ is nonzero. Thus the constructed chart has all three required properties, proving the lemma. \end{proof} \section{Ext groups} \label{section-ext} % BEGIN ALGEBRA EDITORIAL ROUTE section-ext \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ext}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ext \noindent In this section we do a tiny bit of homological algebra, in order to establish some fundamental properties of depth over Noetherian local rings. \begin{lemma} \label{lemma-resolution-by-finite-free} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item There exists an exact complex $$ \ldots \to F_2 \to F_1 \to F_0 \to M \to 0. $$ with $F_i$ free $R$-modules. \item If $R$ is Noetherian and $M$ finite over $R$, then we can choose the complex such that $F_i$ is finite free. In other words, we can find an exact complex $$ \ldots \to R^{\oplus n_2} \to R^{\oplus n_1} \to R^{\oplus n_0} \to M \to 0. $$ \end{enumerate} \end{lemma} \begin{proof} Let us explain only the Noetherian case. As a first step choose a surjection $R^{n_0} \to M$, and then a surjection $R^{n_1}\to\Ker(R^{n_0}\to M)$. For the subsequent steps take $e\geq1$. Then having constructed an exact complex of length $e$ we simply choose a surjection $R^{n_{e + 1}} \to \Ker(R^{n_e} \to R^{n_{e-1}})$ which is possible because $R$ is Noetherian. \end{proof} \begin{definition} \label{definition-finite-free-resolution} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item A (left) {\it resolution} $F_\bullet \to M$ of $M$ is an exact complex $$ \ldots \to F_2 \to F_1 \to F_0 \to M \to 0 $$ of $R$-modules. \item A {\it resolution of $M$ by free $R$-modules} is a resolution $F_\bullet \to M$ where each $F_i$ is a free $R$-module. \item A {\it resolution of $M$ by finite free $R$-modules} is a resolution $F_\bullet \to M$ where each $F_i$ is a finite free $R$-module. \end{enumerate} \end{definition} \noindent We often use the notation $F_{\bullet}$ to denote a complex of $R$-modules $$ \ldots \to F_i \to F_{i-1} \to \ldots $$ In this case we often use $d_i$ or $d_{F, i}$ to denote the map $F_i \to F_{i-1}$. In this section we are always going to assume that $F_0$ is the last nonzero term in the complex. The {\it $i$th homology group of the complex} $F_{\bullet}$ is the group $H_i = \Ker(d_{F, i})/\Im(d_{F, i + 1})$. A {\it map of complexes $\alpha : F_{\bullet} \to G_{\bullet}$} is given by maps $\alpha_i : F_i \to G_i$ such that $\alpha_{i-1} \circ d_{F, i} = d_{G, i} \circ \alpha_i$. Such a map induces a map on homology $H_i(\alpha) : H_i(F_{\bullet}) \to H_i(G_{\bullet})$. If $\alpha, \beta : F_{\bullet} \to G_{\bullet}$ are maps of complexes, then a {\it homotopy} between $\alpha$ and $\beta$ is given by a collection of maps $h_i : F_i \to G_{i + 1}$ such that $\alpha_i - \beta_i = d_{G, i + 1} \circ h_i + h_{i-1} \circ d_{F, i}$. Two maps $\alpha, \beta : F_{\bullet} \to G_{\bullet}$ are said to be {\it homotopic} if a homotopy between $\alpha$ and $\beta$ exists. \medskip\noindent We will use a very similar notation regarding complexes of the form $F^{\bullet}$ which look like $$ \ldots \to F^i \xrightarrow{d^i} F^{i + 1} \to \ldots $$ There are maps of complexes, homotopies, etc. In this case we set $H^i(F^{\bullet}) = \Ker(d^i)/\Im(d^{i - 1})$ and we call it the {\it $i$th cohomology group}. \begin{lemma} \label{lemma-homotopic-equal-homology} Any two homotopic maps of complexes induce the same maps on (co)homology groups. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-compare-resolutions} Let $R$ be a ring. Let $M \to N$ be a map of $R$-modules. Let $N_\bullet \to N$ be an arbitrary resolution. Let $$ \ldots \to F_2 \to F_1 \to F_0 \to M $$ be a complex of $R$-modules where each $F_i$ is a free $R$-module. Then \begin{enumerate} \item there exists a map of complexes $F_\bullet \to N_\bullet$ such that $$ \xymatrix{ F_0 \ar[r] \ar[d] & M \ar[d] \\ N_0 \ar[r] & N } $$ is commutative, and \item any two maps $\alpha, \beta : F_\bullet \to N_\bullet$ as in (1) are homotopic. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Because $F_0$ is free we can find a map $F_0 \to N_0$ lifting the map $F_0 \to M \to N$. We obtain an induced map $F_1 \to F_0 \to N_0$ which ends up in the image of $N_1 \to N_0$. Since $F_1$ is free we may lift this to a map $F_1 \to N_1$. This in turn induces a map $F_2 \to F_1 \to N_1$ which maps to zero into $N_0$. Since $N_\bullet$ is exact we see that the image of this map is contained in the image of $N_2 \to N_1$. Hence we may lift to get a map $F_2 \to N_2$. Repeat. \medskip\noindent Proof of (2). To show that $\alpha, \beta$ are homotopic it suffices to show the difference $\gamma = \alpha - \beta$ is homotopic to zero. Note that the image of $\gamma_0 : F_0 \to N_0$ is contained in the image of $N_1 \to N_0$. Hence we may lift $\gamma_0$ to a map $h_0 : F_0 \to N_1$. Consider the map $\gamma_1' = \gamma_1 - h_0 \circ d_{F, 1}$. By our choice of $h_0$ we see that the image of $\gamma_1'$ is contained in the kernel of $N_1 \to N_0$. Since $N_\bullet$ is exact we may lift $\gamma_1'$ to a map $h_1 : F_1 \to N_2$. At this point we have $\gamma_1 = h_0 \circ d_{F, 1} + d_{N, 2} \circ h_1$. Repeat. \end{proof} \noindent At this point we are ready to define the groups $\Ext^i_R(M, N)$. Namely, choose a resolution $F_{\bullet}$ of $M$ by free $R$-modules, see Lemma \ref{lemma-resolution-by-finite-free}. Consider the (cohomological) complex $$ \Hom_R(F_\bullet, N) : \Hom_R(F_0, N) \to \Hom_R(F_1, N) \to \Hom_R(F_2, N) \to \ldots $$ We define $\Ext^i_R(M, N)$ for $i \geq 0$ to be the $i$th cohomology group of this complex\footnote{At this point it would perhaps be more appropriate to say ``an'' instead of ``the'' Ext-group.}. For $i < 0$ we set $\Ext^i_R(M, N) = 0$. Before we continue we point out that $$ \Ext^0_R(M, N) = \Ker(\Hom_R(F_0, N) \to \Hom_R(F_1, N)) = \Hom_R(M, N) $$ because we can apply part (1) of Lemma \ref{lemma-hom-exact} to the exact sequence $F_1 \to F_0 \to M \to 0$. The following lemma explains in what sense this is well defined. \begin{lemma} \label{lemma-ext-welldefined} \begin{reference} \cite[Chapter III, \S 4, no. 68, construction and independence of graded Ext, pp. 261--262]{FAC} \end{reference} \begin{history} The cited source applies the same resolution-and-homotopy construction in the category of graded modules, using degree-zero differentials and the internal direct sum of homogeneous Hom groups. Definition \ref{definition-graded-ext} and Lemma \ref{lemma-graded-free-resolutions} retain that graded construction; the lemma below is its ordinary-module prototype. \end{history} Let $R$ be a ring. Let $M_1, M_2, N$ be $R$-modules. Suppose that $F_{\bullet}$ is a free resolution of the module $M_1$, and $G_{\bullet}$ is a free resolution of the module $M_2$. Let $\varphi : M_1 \to M_2$ be a module map. Let $\alpha : F_{\bullet} \to G_{\bullet}$ be a map of complexes inducing $\varphi$ on $M_1 = \Coker(d_{F, 1}) \to M_2 = \Coker(d_{G, 1})$, see Lemma \ref{lemma-compare-resolutions}. Then the induced maps $$ H^i(\alpha) : H^i(\Hom_R(G_{\bullet}, N)) \longrightarrow H^i(\Hom_R(F_{\bullet}, N)) $$ are independent of the choice of $\alpha$. If $\varphi$ is an isomorphism, so are all the maps $H^i(\alpha)$. If $M_1 = M_2$, $F_\bullet = G_\bullet$, and $\varphi$ is the identity, so are all the maps $H^i(\alpha)$. \end{lemma} \begin{proof} Another map $\beta : F_{\bullet} \to G_{\bullet}$ inducing $\varphi$ is homotopic to $\alpha$ by Lemma \ref{lemma-compare-resolutions}. Hence the maps $\Hom_R(G_\bullet, N) \to \Hom_R(F_\bullet, N)$ are homotopic. Hence the independence result follows from Lemma \ref{lemma-homotopic-equal-homology}. \medskip\noindent Suppose that $\varphi$ is an isomorphism. Let $\psi : M_2 \to M_1$ be an inverse. Choose $\beta : G_{\bullet} \to F_{\bullet}$ to be a map inducing $\psi : M_2 = \Coker(d_{G, 1}) \to M_1 = \Coker(d_{F, 1})$, see Lemma \ref{lemma-compare-resolutions}. OK, and now consider the map $H^i(\alpha) \circ H^i(\beta) = H^i(\beta \circ \alpha)$. By the above the map $H^i(\beta \circ \alpha)$ is the {\it same} as the map $H^i(\text{id}_{F_{\bullet}}) = \text{id}$. Similarly for the composition $H^i(\beta) \circ H^i(\alpha)$. Hence $H^i(\alpha)$ and $H^i(\beta)$ are inverses of each other. \end{proof} \begin{lemma} \label{lemma-long-exact-seq-ext} \begin{reference} \cite[Chapter III, \S 4, no. 68, long exact sequence in the second graded-module variable, pp. 261--262]{FAC} \end{reference} \begin{history} The cited sequence is the internal graded analogue: it is obtained in every homogeneous degree and the connecting maps assemble into degree-zero maps. Lemma \ref{lemma-graded-ext-properties} gives that form. The lemma below is the underlying ordinary Ext sequence. \end{history} Let $R$ be a ring. Let $M$ be an $R$-module. Let $0 \to N' \to N \to N'' \to 0$ be a short exact sequence. Then we get a long exact sequence $$ \begin{matrix} 0 \to \Hom_R(M, N') \to \Hom_R(M, N) \to \Hom_R(M, N'') \\ \phantom{0\ } \to \Ext^1_R(M, N') \to \Ext^1_R(M, N) \to \Ext^1_R(M, N'') \to \ldots \end{matrix} $$ \end{lemma} \begin{proof} Pick a free resolution $F_{\bullet} \to M$. Since each of the $F_i$ is free we see that we get a short exact sequence of complexes $$ 0 \to \Hom_R(F_{\bullet}, N') \to \Hom_R(F_{\bullet}, N) \to \Hom_R(F_{\bullet}, N'') \to 0 $$ Thus we get the long exact sequence from the snake lemma applied to this. \end{proof} \begin{lemma} \label{lemma-reverse-long-exact-seq-ext} \begin{reference} \cite[Chapter III, \S 4, no. 68, long exact sequence in the first graded-module variable, p. 262]{FAC} \end{reference} \begin{history} The cited sequence reverses the first short exact sequence because internal graded Ext is contravariant in that variable. The same free-resolution construction below works with graded free modules and degree-zero maps, yielding Lemma \ref{lemma-graded-ext-properties}. \end{history} Let $R$ be a ring. Let $N$ be an $R$-module. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence. Then we get a long exact sequence $$ \begin{matrix} 0 \to \Hom_R(M'', N) \to \Hom_R(M, N) \to \Hom_R(M', N) \\ \phantom{0\ } \to \Ext^1_R(M'', N) \to \Ext^1_R(M, N) \to \Ext^1_R(M', N) \to \ldots \end{matrix} $$ \end{lemma} \begin{proof} Pick sets of generators $\{m'_{i'}\}_{i' \in I'}$ and $\{m''_{i''}\}_{i'' \in I''}$ of $M'$ and $M''$. For each $i'' \in I''$ choose a lift $\tilde m''_{i''} \in M$ of the element $m''_{i''} \in M''$. Set $F' = \bigoplus_{i' \in I'} R$, $F'' = \bigoplus_{i'' \in I''} R$ and $F = F' \oplus F''$. Mapping the generators of these free modules to the corresponding chosen generators gives surjective $R$-module maps $F' \to M'$, $F'' \to M''$, and $F \to M$. We obtain a map of short exact sequences $$ \begin{matrix} 0 & \to & M' & \to & M & \to & M'' & \to & 0 \\ & & \uparrow & & \uparrow & & \uparrow \\ 0 & \to & F' & \to & F & \to & F'' & \to & 0 \\ \end{matrix} $$ By the snake lemma we see that the sequence of kernels $0 \to K' \to K \to K'' \to 0$ is a short exact sequence of $R$-modules. Hence we can continue this process indefinitely. In other words we obtain a short exact sequence of resolutions fitting into the diagram $$ \begin{matrix} 0 & \to & M' & \to & M & \to & M'' & \to & 0 \\ & & \uparrow & & \uparrow & & \uparrow \\ 0 & \to & F_\bullet' & \to & F_\bullet & \to & F_\bullet'' & \to & 0 \\ \end{matrix} $$ Because each of the sequences $0 \to F'_n \to F_n \to F''_n \to 0$ is split exact (by construction) we obtain a short exact sequence of complexes $$ 0 \to \Hom_R(F''_{\bullet}, N) \to \Hom_R(F_{\bullet}, N) \to \Hom_R(F'_{\bullet}, N) \to 0 $$ by applying the $\Hom_R(-, N)$ functor. Thus we get the long exact sequence from the snake lemma applied to this. \end{proof} \begin{lemma} \label{lemma-annihilate-ext} Let $R$ be a ring. Let $M$, $N$ be $R$-modules. Any $x\in R$ such that either $xN = 0$, or $xM = 0$ annihilates each of the modules $\Ext^i_R(M, N)$. \end{lemma} \begin{proof} Pick a free resolution $F_{\bullet}$ of $M$. Since $\Ext^i_R(M, N)$ is defined as the cohomology of the complex $\Hom_R(F_{\bullet}, N)$ the lemma is clear when $xN = 0$. If $xM = 0$, then we see that multiplication by $x$ on $F_{\bullet}$ lifts the zero map on $M$. Hence by Lemma \ref{lemma-ext-welldefined} we see that it induces the same map on Ext groups as the zero map. \end{proof} \begin{lemma} \label{lemma-ext-noetherian} \begin{reference} \cite[Chapter III, \S 4, no. 68, finiteness of graded Ext, p. 261]{FAC} \end{reference} \begin{history} For the source's polynomial ring and finite graded modules, each term of a finite graded free resolution has internal Hom equal to ordinary Hom after forgetting the grading. Thus the cited finiteness assertion reduces to this lemma; Lemma \ref{lemma-graded-ext-properties} records the comparison. \end{history} Let $R$ be a Noetherian ring. Let $M$, $N$ be finite $R$-modules. Then $\Ext^i_R(M, N)$ is a finite $R$-module for all $i$. \end{lemma} \begin{proof} This holds because $\Ext^i_R(M, N)$ is computed as the cohomology groups of a complex $\Hom_R(F_\bullet, N)$ with each $F_n$ a finite free $R$-module, see Lemma \ref{lemma-resolution-by-finite-free}. \end{proof} \section{Depth} \label{section-depth} % BEGIN ALGEBRA EDITORIAL ROUTE section-depth \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-depth}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-depth \noindent Here is our definition. \begin{definition} \label{definition-depth} Let $R$ be a ring, and $I \subset R$ an ideal. Let $M$ be a finite $R$-module. The {\it $I$-depth} of $M$, denoted $\text{depth}_I(M)$, is defined as follows: \begin{enumerate} \item if $IM \not = M$, then $\text{depth}_I(M)$ is the supremum in $\{0, 1, 2, \ldots, \infty\}$ of the lengths of $M$-regular sequences in $I$, \item if $IM = M$ we set $\text{depth}_I(M) = \infty$. \end{enumerate} If $(R, \mathfrak m)$ is local we call $\text{depth}_{\mathfrak m}(M)$ simply the {\it depth} of $M$. \end{definition} \noindent Explanation. By Definition \ref{definition-regular-sequence} the empty sequence is not a regular sequence on the zero module, but for practical purposes it turns out to be convenient to set the depth of the $0$ module equal to $+\infty$. Note that if $I = R$, then $\text{depth}_I(M) = \infty$ for all finite $R$-modules $M$. If $I$ is contained in the Jacobson radical of $R$ (e.g., if $R$ is local and $I \subset \mathfrak m_R$), then $M \not = 0 \Rightarrow IM \not = M$ by Nakayama's lemma. A module $M$ has $I$-depth $0$ if and only if $M$ is nonzero and $I$ does not contain a nonzerodivisor on $M$. \medskip\noindent Example \ref{example-global-regular} shows depth does not behave well even if the ring is Noetherian, and Example \ref{example-local-regular} shows that it does not behave well if the ring is local but non-Noetherian. We will see depth behaves well if the ring is local Noetherian. \begin{lemma} \label{lemma-depth-weak-sequence} Let $R$ be a ring, $I \subset R$ an ideal, and $M$ a finite $R$-module. Then $\text{depth}_I(M)$ is equal to the supremum of the lengths of sequences $f_1, \ldots, f_r \in I$ such that $f_i$ is a nonzerodivisor on $M/(f_1, \ldots, f_{i - 1})M$. \end{lemma} \begin{proof} Suppose that $IM = M$. Then Lemma \ref{lemma-NAK} shows there exists an $f \in I$ such that $f : M \to M$ is $\text{id}_M$. Hence $f, 0, 0, 0, \ldots$ is an infinite sequence of successive nonzerodivisors and we see agreement holds in this case. If $IM \not = M$, then we see that a sequence as in the lemma is an $M$-regular sequence and we conclude that agreement holds as well. \end{proof} \begin{lemma} \label{lemma-bound-depth} Let $(R, \mathfrak m)$ be a Noetherian local ring. Let $M$ be a nonzero finite $R$-module. Then $\dim(\text{Supp}(M)) \geq \text{depth}(M)$. \end{lemma} \begin{proof} The proof is by induction on $\dim(\text{Supp}(M))$. If $\dim(\text{Supp}(M)) = 0$, then $\text{Supp}(M) = \{\mathfrak m\}$, whence $\text{Ass}(M) = \{\mathfrak m\}$ (by Lemmas \ref{lemma-ass-support} and \ref{lemma-ass-zero}), and hence the depth of $M$ is zero for example by Lemma \ref{lemma-ideal-nonzerodivisor}. For the induction step we assume $\dim(\text{Supp}(M)) > 0$. Let $f_1, \ldots, f_d$ be a sequence of elements of $\mathfrak m$ such that $f_i$ is a nonzerodivisor on $M/(f_1, \ldots, f_{i - 1})M$. According to Lemma \ref{lemma-depth-weak-sequence} it suffices to prove $\dim(\text{Supp}(M)) \geq d$. We may assume $d > 0$ otherwise the lemma holds. By Lemma \ref{lemma-one-equation-module} we have $\dim(\text{Supp}(M/f_1M)) = \dim(\text{Supp}(M)) - 1$. By induction we conclude $\dim(\text{Supp}(M/f_1M)) \geq d - 1$ as desired. \end{proof} \begin{lemma} \label{lemma-depth-finite-noetherian} Let $R$ be a Noetherian ring, $I \subset R$ an ideal, and $M$ a finite nonzero $R$-module such that $IM \not = M$. Then $\text{depth}_I(M) < \infty$. \end{lemma} \begin{proof} Since $M/IM$ is nonzero we can choose $\mathfrak p \in \text{Supp}(M/IM)$ by Lemma \ref{lemma-support-zero}. Then $(M/IM)_\mathfrak p \not = 0$ which implies $I \subset \mathfrak p$ and moreover implies $M_\mathfrak p \not = IM_\mathfrak p$ as localization is exact. Let $f_1, \ldots, f_r \in I$ be an $M$-regular sequence. Then $M_\mathfrak p/(f_1, \ldots, f_r)M_\mathfrak p$ is nonzero as $(f_1, \ldots, f_r) \subset I$. As localization is flat we see that the images of $f_1, \ldots, f_r$ form a $M_\mathfrak p$-regular sequence in $I_\mathfrak p$. Since this works for every $M$-regular sequence in $I$ we conclude that $\text{depth}_I(M) \leq \text{depth}_{I_\mathfrak p}(M_\mathfrak p)$. The latter is $\leq \text{depth}(M_\mathfrak p)$ which is $< \infty$ by Lemma \ref{lemma-bound-depth}. \end{proof} \begin{lemma} \label{lemma-depth-ext} Let $R$ be a Noetherian local ring with maximal ideal $\mathfrak m$. Let $M$ be a nonzero finite $R$-module. Then $\text{depth}(M)$ is equal to the smallest integer $i$ such that $\Ext^i_R(R/\mathfrak m, M)$ is nonzero. \end{lemma} \begin{proof} Let $\delta(M)$ denote the depth of $M$ and let $i(M)$ denote the smallest integer $i$ such that $\Ext^i_R(R/\mathfrak m, M)$ is nonzero. We will see in a moment that $i(M) < \infty$. By Lemma \ref{lemma-ideal-nonzerodivisor} we have $\delta(M) = 0$ if and only if $i(M) = 0$, because $\mathfrak m \in \text{Ass}(M)$ exactly means that $i(M) = 0$. Hence if $\delta(M)$ or $i(M)$ is $> 0$, then we may choose $x \in \mathfrak m$ such that (a) $x$ is a nonzerodivisor on $M$, and (b) $\text{depth}(M/xM) = \delta(M) - 1$. Consider the long exact sequence of Ext-groups associated to the short exact sequence $0 \to M \to M \to M/xM \to 0$ by Lemma \ref{lemma-long-exact-seq-ext}: $$ \begin{matrix} 0 \to \Hom_R(\kappa, M) \to \Hom_R(\kappa, M) \to \Hom_R(\kappa, M/xM) \\ \phantom{0\ } \to \Ext^1_R(\kappa, M) \to \Ext^1_R(\kappa, M) \to \Ext^1_R(\kappa, M/xM) \to \ldots \end{matrix} $$ Since $x \in \mathfrak m$ all the maps $\Ext^i_R(\kappa, M) \to \Ext^i_R(\kappa, M)$ are zero, see Lemma \ref{lemma-annihilate-ext}. Thus it is clear that $i(M/xM) = i(M) - 1$. Induction on $\delta(M)$ finishes the proof. \end{proof} \begin{lemma} \label{lemma-depth-in-ses} Let $R$ be a local Noetherian ring. Let $0 \to N' \to N \to N'' \to 0$ be a short exact sequence of nonzero finite $R$-modules. \begin{enumerate} \item $\text{depth}(N) \geq \min\{\text{depth}(N'), \text{depth}(N'')\}$ \item $\text{depth}(N'') \geq \min\{\text{depth}(N), \text{depth}(N') - 1\}$ \item $\text{depth}(N') \geq \min\{\text{depth}(N), \text{depth}(N'') + 1\}$ \end{enumerate} \end{lemma} \begin{proof} Use the characterization of depth using the Ext groups $\Ext^i(\kappa, N)$, see Lemma \ref{lemma-depth-ext}, and use the long exact cohomology sequence $$ \begin{matrix} 0 \to \Hom_R(\kappa, N') \to \Hom_R(\kappa, N) \to \Hom_R(\kappa, N'') \\ \phantom{0\ } \to \Ext^1_R(\kappa, N') \to \Ext^1_R(\kappa, N) \to \Ext^1_R(\kappa, N'') \to \ldots \end{matrix} $$ from Lemma \ref{lemma-long-exact-seq-ext}. \end{proof} \begin{lemma} \label{lemma-depth-drops-by-one} Let $R$ be a local Noetherian ring and $M$ a nonzero finite $R$-module. \begin{enumerate} \item If $x \in \mathfrak m$ is a nonzerodivisor on $M$, then $\text{depth}(M/xM) = \text{depth}(M) - 1$. \item Any $M$-regular sequence $x_1, \ldots, x_r$ can be extended to an $M$-regular sequence of length $\text{depth}(M)$. \end{enumerate} \end{lemma} \begin{proof} Part (2) is a formal consequence of part (1). Let $x \in R$ be as in (1). By the short exact sequence $0 \to M \to M \to M/xM \to 0$ and Lemma \ref{lemma-depth-in-ses} we see that the depth drops by at most 1. On the other hand, if $x_1, \ldots, x_r \in \mathfrak m$ is a regular sequence for $M/xM$, then $x, x_1, \ldots, x_r$ is a regular sequence for $M$. Hence we see that the depth drops by at least 1. \end{proof} \begin{lemma} \label{lemma-inherit-minimal-primes} Let $(R, \mathfrak m)$ be a local Noetherian ring and $M$ a finite $R$-module. Let $x \in \mathfrak m$, $\mathfrak p \in \text{Ass}(M)$, and $\mathfrak q$ minimal over $\mathfrak p + (x)$. Then $\mathfrak q \in \text{Ass}(M/x^nM)$ for some $n \geq 1$. \end{lemma} \begin{proof} Pick a submodule $N \subset M$ with $N \cong R/\mathfrak p$. By the Artin-Rees lemma (Lemma \ref{lemma-Artin-Rees}) we can pick $n > 0$ such that $N \cap x^nM \subset xN$. Let $\overline{N} \subset M/x^nM$ be the image of $N \to M \to M/x^nM$. By Lemma \ref{lemma-ass} it suffices to show $\mathfrak q \in \text{Ass}(\overline{N})$. By our choice of $n$ there is a surjection $\overline{N} \to N/xN = R/(\mathfrak p + (x))$ and hence $\mathfrak q$ is in the support of $\overline{N}$. Since $\overline{N}$ is annihilated by $x^n$ and $\mathfrak p$ we see that $\mathfrak q$ is minimal among the primes in the support of $\overline{N}$. Thus $\mathfrak q$ is an associated prime of $\overline{N}$ by Lemma \ref{lemma-ass-minimal-prime-support}. \end{proof} \begin{lemma} \label{lemma-depth-dim-associated-primes} Let $(R, \mathfrak m)$ be a local Noetherian ring and $M$ a finite $R$-module. For $\mathfrak p \in \text{Ass}(M)$ we have $\dim(R/\mathfrak p) \geq \text{depth}(M)$. \end{lemma} \begin{proof} If $\mathfrak m \in \text{Ass}(M)$ then there is a nonzero element $x \in M$ which is annihilated by all elements of $\mathfrak m$. Thus $\text{depth}(M) = 0$. In particular the lemma holds in this case. \medskip\noindent If $\text{depth}(M) = 1$, then by the first paragraph we find that $\mathfrak m \not \in \text{Ass}(M)$. Hence $\dim(R/\mathfrak p) \geq 1$ for all $\mathfrak p \in \text{Ass}(M)$ and the lemma is true in this case as well. \medskip\noindent We will prove the lemma in general by induction on $\text{depth}(M)$ which we may and do assume to be $> 1$. Pick $x \in \mathfrak m$ which is a nonzerodivisor on $M$. Note $x \not \in \mathfrak p$ (Lemma \ref{lemma-ass-zero-divisors}). By Lemma \ref{lemma-one-equation} we have $\dim(R/(\mathfrak p + (x))) = \dim(R/\mathfrak p) - 1$. Thus there exists a prime $\mathfrak q$ minimal over $\mathfrak p + (x)$ with $\dim(R/\mathfrak q) = \dim(R/\mathfrak p) - 1$ (small argument omitted; hint: the dimension of a Noetherian local ring $A$ is the maximum of the dimensions of $A/\mathfrak r$ taken over the minimal primes $\mathfrak r$ of $A$). Pick $n$ as in Lemma \ref{lemma-inherit-minimal-primes} so that $\mathfrak q$ is an associated prime of $M/x^nM$. We may apply induction hypothesis to $M/x^nM$ and $\mathfrak q$ because $\text{depth}(M/x^nM) = \text{depth}(M) - 1$ by Lemma \ref{lemma-depth-drops-by-one}. We find $\dim(R/\mathfrak q) \geq \text{depth}(M/x^nM)$ and we win. \end{proof} \begin{lemma} \label{lemma-depth-localization} Let $R$ be a local Noetherian ring and $M$ a finite $R$-module. For a prime ideal $\mathfrak p \subset R$ we have $\text{depth}(M_\mathfrak p) + \dim(R/\mathfrak p) \geq \text{depth}(M)$. \end{lemma} \begin{proof} If $M_\mathfrak p = 0$, then $\text{depth}(M_\mathfrak p) = \infty$ and the lemma holds. If $\text{depth}(M) \leq \dim(R/\mathfrak p)$, then the lemma is true. If $\text{depth}(M) > \dim(R/\mathfrak p)$, then $\mathfrak p$ is not contained in any associated prime $\mathfrak q$ of $M$ by Lemma \ref{lemma-depth-dim-associated-primes}. Hence we can find an $x \in \mathfrak p$ not contained in any associated prime of $M$ by Lemma \ref{lemma-silly} and Lemma \ref{lemma-finite-ass}. Then $x$ is a nonzerodivisor on $M$, see Lemma \ref{lemma-ass-zero-divisors}. Hence $\text{depth}(M/xM) = \text{depth}(M) - 1$ and $\text{depth}(M_\mathfrak p / x M_\mathfrak p) = \text{depth}(M_\mathfrak p) - 1$ provided $M_\mathfrak p$ is nonzero, see Lemma \ref{lemma-depth-drops-by-one}. Thus we conclude by induction on $\text{depth}(M)$. \end{proof} \begin{lemma} \label{lemma-depth-goes-down-finite} Let $(R, \mathfrak m)$ be a Noetherian local ring. Let $R \to S$ be a finite ring map. Let $\mathfrak m_1, \ldots, \mathfrak m_n$ be the maximal ideals of $S$. Let $N$ be a finite $S$-module. Then $$ \min\nolimits_{i = 1, \ldots, n} \text{depth}(N_{\mathfrak m_i}) = \text{depth}_\mathfrak m(N) $$ \end{lemma} \begin{proof} Use the convention $\min\varnothing=\infty$. If $N=0$, the equality is immediate, including when $S=0$. Assume $N\ne0$; some maximal localization of $N$ is nonzero and has finite depth, so the minimum used below is finite. By Lemmas \ref{lemma-integral-no-inclusion}, \ref{lemma-integral-going-up}, and Lemma \ref{lemma-finite-finite-fibres} the maximal ideals of $S$ are exactly the primes of $S$ lying over $\mathfrak m$ and there are finitely many of them. Hence the statement of the lemma makes sense. We will prove the lemma by induction on $k = \min\nolimits_{i = 1, \ldots, n} \text{depth}(N_{\mathfrak m_i})$. If $k = 0$, then $\text{depth}(N_{\mathfrak m_i}) = 0$ for some $i$. By Lemma \ref{lemma-depth-ext} this means $\mathfrak m_i S_{\mathfrak m_i}$ is an associated prime of $N_{\mathfrak m_i}$ and hence $\mathfrak m_i$ is an associated prime of $N$ (Lemma \ref{lemma-localize-ass}). By Lemma \ref{lemma-ass-functorial-Noetherian} we see that $\mathfrak m$ is an associated prime of $N$ as an $R$-module. Whence $\text{depth}_\mathfrak m(N) = 0$. This proves the base case. If $k > 0$, then we see that $\mathfrak m_i \not \in \text{Ass}_S(N)$. Hence $\mathfrak m \not \in \text{Ass}_R(N)$, again by Lemma \ref{lemma-ass-functorial-Noetherian}. Thus we can find $f \in \mathfrak m$ which is not a zerodivisor on $N$, see Lemma \ref{lemma-ideal-nonzerodivisor}. By Lemma \ref{lemma-depth-drops-by-one} the depth over $R$ and the depths of the nonzero maximal localizations drop exactly by $1$ when passing from $N$ to $N/fN$. The nonzero localizations remain nonzero by Nakayama's lemma; zero localizations stay zero with infinite depth. Thus the finite minimum drops by $1$, and the induction hypothesis finishes the proof. \end{proof} \section{Functorialities for Ext} \label{section-functoriality-ext} % BEGIN ALGEBRA EDITORIAL ROUTE section-functoriality-ext \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-functoriality-ext}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-functoriality-ext \noindent In this section we briefly discuss the functoriality of $\Ext$ with respect to change of ring, etc. Here is a list of items to work out. \begin{enumerate} \item Given $R \to R'$, an $R$-module $M$ and an $R'$-module $N'$ the $R$-module $\Ext^i_R(M, N')$ has a natural $R'$-module structure. Moreover, there is a canonical $R'$-linear map $\Ext^i_{R'}(M \otimes_R R', N') \to \Ext^i_R(M, N')$. \item Given $R \to R'$ and $R$-modules $M$, $N$ there is a natural $R$-module map $\Ext^i_R(M, N) \to \Ext^i_R(M, N \otimes_R R')$. \end{enumerate} \begin{lemma} \label{lemma-flat-base-change-ext} Given a flat ring map $R \to R'$, an $R$-module $M$, and an $R'$-module $N'$ the natural map $$ \Ext^i_{R'}(M \otimes_R R', N') \to \Ext^i_R(M, N') $$ is an isomorphism for $i \geq 0$. \end{lemma} \begin{proof} Choose a free resolution $F_\bullet$ of $M$. Since $R \to R'$ is flat we see that $F_\bullet \otimes_R R'$ is a free resolution of $M \otimes_R R'$ over $R'$. The statement is that the map $$ \Hom_{R'}(F_\bullet \otimes_R R', N') \to \Hom_R(F_\bullet, N') $$ induces an isomorphism on cohomology groups, which is true because it is an isomorphism of complexes by Lemma \ref{lemma-adjoint-tensor-restrict}. \end{proof} \section{An application of Ext groups} \label{section-ext-application} % BEGIN ALGEBRA EDITORIAL ROUTE section-ext-application \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ext-application}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ext-application \noindent Here it is. \begin{lemma} \label{lemma-split-injection-after-completion} Let $R$ be a Noetherian ring. Let $I \subset R$ be an ideal contained in the Jacobson radical of $R$. Let $N \to M$ be a homomorphism of finite $R$-modules. Suppose that there exists arbitrarily large $n$ such that $N/I^nN \to M/I^nM$ is a split injection. Then $N \to M$ is a split injection. \end{lemma} \begin{proof} Assume $\varphi : N \to M$ satisfies the assumptions of the lemma. Note that this implies that $\Ker(\varphi) \subset I^nN$ for arbitrarily large $n$. Hence by Lemma \ref{lemma-intersection-powers-ideal-module} we see that $\varphi$ is an injection. Let $Q = M/N$ so that we have a short exact sequence $$ 0 \to N \to M \to Q \to 0. $$ Let $$ F_2 \xrightarrow{d_2} F_1 \xrightarrow{d_1} F_0 \to Q \to 0 $$ be a finite free resolution of $Q$. We can choose a map $\alpha : F_0 \to M$ lifting the map $F_0 \to Q$. This induces a map $\beta : F_1 \to N$ such that $\beta \circ d_2 = 0$. The extension above is split if and only if there exists a map $\gamma : F_0 \to N$ such that $\beta = \gamma \circ d_1$. In other words, the class of $\beta$ in $\Ext^1_R(Q, N)$ is the obstruction to splitting the short exact sequence above. \medskip\noindent Suppose $n$ is a large integer such that $N/I^nN \to M/I^nM$ is a split injection. This implies $$ 0 \to N/I^nN \to M/I^nM \to Q/I^nQ \to 0. $$ is still short exact. Also, the sequence $$ F_1/I^nF_1 \xrightarrow{d_1} F_0/I^nF_0 \to Q/I^nQ \to 0 $$ is still exact. Arguing as above we see that the map $\overline{\beta} : F_1/I^nF_1 \to N/I^nN$ induced by $\beta$ is equal to $\overline{\gamma_n} \circ d_1$ for some map $\overline{\gamma_n} : F_0/I^nF_0 \to N/I^nN$. Since $F_0$ is free we can lift $\overline{\gamma_n}$ to a map $\gamma_n : F_0 \to N$ and then we see that $\beta - \gamma_n \circ d_1$ is a map from $F_1$ into $I^nN$. In other words we conclude that $$ \beta \in \Im\Big(\Hom_R(F_0, N) \to \Hom_R(F_1, N)\Big) + I^n\Hom_R(F_1, N). $$ for this $n$. \medskip\noindent Since we have this property for arbitrarily large $n$ by assumption we conclude that the image of $\beta$ in the cokernel of $\Hom_R(F_0, N) \to \Hom_R(F_1, N)$ is zero by Lemma \ref{lemma-intersection-powers-ideal-module}. Hence $\beta$ is in the image of the map $\Hom_R(F_0, N) \to \Hom_R(F_1, N)$ as desired. \end{proof} \section{Tor groups and flatness} \label{section-tor} % BEGIN ALGEBRA EDITORIAL ROUTE section-tor \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-tor}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-tor \noindent In this section we use some of the homological algebra developed in the previous section to explain what Tor groups are. Namely, suppose that $R$ is a ring and that $M$, $N$ are two $R$-modules. Choose a resolution $F_\bullet$ of $M$ by free $R$-modules. See Lemma \ref{lemma-resolution-by-finite-free}. Consider the homological complex $$ F_\bullet \otimes_R N : \ldots \to F_2 \otimes_R N \to F_1 \otimes_R N \to F_0 \otimes_R N $$ We define $\text{Tor}^R_i(M, N)$ to be the $i$th homology group of this complex. The following lemma explains in what sense this is well defined. \begin{lemma} \label{lemma-tor-welldefined} Let $R$ be a ring. Let $M_1, M_2, N$ be $R$-modules. Suppose that $F_\bullet$ is a free resolution of the module $M_1$ and that $G_\bullet$ is a free resolution of the module $M_2$. Let $\varphi : M_1 \to M_2$ be a module map. Let $\alpha : F_\bullet \to G_\bullet$ be a map of complexes inducing $\varphi$ on $M_1 = \Coker(d_{F, 1}) \to M_2 = \Coker(d_{G, 1})$, see Lemma \ref{lemma-compare-resolutions}. Then the induced maps $$ H_i(\alpha) : H_i(F_\bullet \otimes_R N) \longrightarrow H_i(G_\bullet \otimes_R N) $$ are independent of the choice of $\alpha$. If $\varphi$ is an isomorphism, so are all the maps $H_i(\alpha)$. If $M_1 = M_2$, $F_\bullet = G_\bullet$, and $\varphi$ is the identity, so are all the maps $H_i(\alpha)$. \end{lemma} \begin{proof} The proof of this lemma is identical to the proof of Lemma \ref{lemma-ext-welldefined}. \end{proof} \noindent Not only does this lemma imply that the Tor modules are well defined, but it also provides for the functoriality of the constructions $(M, N) \mapsto \text{Tor}_i^R(M, N)$ in the first variable. Of course the functoriality in the second variable is evident. We leave it to the reader to see that each of the $\text{Tor}_i^R$ is in fact a functor $$ \text{Mod}_R \times \text{Mod}_R \to \text{Mod}_R. $$ Here $\text{Mod}_R$ denotes the category of $R$-modules, and for the definition of the product category see Categories, Definition \ref{categories-definition-product-category}. Namely, given morphisms of $R$-modules $M_1 \to M_2$ and $N_1 \to N_2$ we get a commutative diagram $$ \xymatrix{ \text{Tor}_i^R(M_1, N_1) \ar[r] \ar[d] & \text{Tor}_i^R(M_1, N_2) \ar[d] \\ \text{Tor}_i^R(M_2, N_1) \ar[r] & \text{Tor}_i^R(M_2, N_2) \\ } $$ \begin{lemma} \label{lemma-long-exact-sequence-tor} Let $R$ be a ring and let $M$ be an $R$-module. Suppose that $0 \to N' \to N \to N'' \to 0$ is a short exact sequence of $R$-modules. There exists a long exact sequence $$ \text{Tor}_1^R(M, N') \to \text{Tor}_1^R(M, N) \to \text{Tor}_1^R(M, N'') \to M \otimes_R N' \to M \otimes_R N \to M \otimes_R N'' \to 0 $$ \end{lemma} \begin{proof} The proof of this is the same as the proof of Lemma \ref{lemma-long-exact-seq-ext}. \end{proof} \noindent Consider a homological double complex of $R$-modules $$ \xymatrix{ \ldots \ar[r]^d & A_{2, 0} \ar[r]^d & A_{1, 0} \ar[r]^d & A_{0, 0} \\ \ldots \ar[r]^d & A_{2, 1} \ar[r]^d \ar[u]^\delta & A_{1, 1} \ar[r]^d \ar[u]^\delta & A_{0, 1} \ar[u]^\delta \\ \ldots \ar[r]^d & A_{2, 2} \ar[r]^d \ar[u]^\delta & A_{1, 2} \ar[r]^d \ar[u]^\delta & A_{0, 2} \ar[u]^\delta \\ & \ldots \ar[u]^\delta & \ldots \ar[u]^\delta & \ldots \ar[u]^\delta \\ } $$ This means that $d_{i, j} : A_{i, j} \to A_{i-1, j}$ and $\delta_{i, j} : A_{i, j} \to A_{i, j-1}$ have the following properties \begin{enumerate} \item Any composition of two $d_{i, j}$ is zero. In other words the rows of the double complex are complexes. \item Any composition of two $\delta_{i, j}$ is zero. In other words the columns of the double complex are complexes. \item For any pair $(i, j)$ we have $\delta_{i-1, j} \circ d_{i, j} = d_{i, j-1} \circ \delta_{i, j}$. In other words, all the squares commute. \end{enumerate} The correct thing to do is to associate a spectral sequence to any such double complex. However, for the moment we can get away with doing something slightly easier. \medskip\noindent Namely, for the purposes of this section only, given a double complex $(A_{\bullet, \bullet}, d, \delta)$ set $R(A)_j = \Coker(A_{1, j} \to A_{0, j})$ and $U(A)_i = \Coker(A_{i, 1} \to A_{i, 0})$. (The letters $R$ and $U$ are meant to suggest Right and Up.) We endow $R(A)_\bullet$ with the structure of a complex using the maps $\delta$. Similarly we endow $U(A)_\bullet$ with the structure of a complex using the maps $d$. In other words we obtain the following huge commutative diagram $$ \xymatrix{ \ldots \ar[r]^d & U(A)_2 \ar[r]^d & U(A)_1 \ar[r]^d & U(A)_0 & \\ \ldots \ar[r]^d & A_{2, 0} \ar[r]^d \ar[u] & A_{1, 0} \ar[r]^d \ar[u] & A_{0, 0} \ar[r] \ar[u] & R(A)_0 \\ \ldots \ar[r]^d & A_{2, 1} \ar[r]^d \ar[u]^\delta & A_{1, 1} \ar[r]^d \ar[u]^\delta & A_{0, 1} \ar[r] \ar[u]^\delta & R(A)_1 \ar[u]^\delta \\ \ldots \ar[r]^d & A_{2, 2} \ar[r]^d \ar[u]^\delta & A_{1, 2} \ar[r]^d \ar[u]^\delta & A_{0, 2} \ar[r] \ar[u]^\delta & R(A)_2 \ar[u]^\delta \\ & \ldots \ar[u]^\delta & \ldots \ar[u]^\delta & \ldots \ar[u]^\delta & \ldots \ar[u]^\delta \\ } $$ (This is no longer a double complex of course.) It is clear what a morphism $\Phi : (A_{\bullet, \bullet}, d, \delta) \to (B_{\bullet, \bullet}, d, \delta)$ of double complexes is, and it is clear that this induces morphisms of complexes $R(\Phi) : R(A)_\bullet \to R(B)_\bullet$ and $U(\Phi) : U(A)_\bullet \to U(B)_\bullet$. \begin{lemma} \label{lemma-no-spectral-sequence} Let $(A_{\bullet, \bullet}, d, \delta)$ be a double complex such that \begin{enumerate} \item Each row $A_{\bullet, j}$ is a resolution of $R(A)_j$. \item Each column $A_{i, \bullet}$ is a resolution of $U(A)_i$. \end{enumerate} Then there are canonical isomorphisms $$ H_i(R(A)_\bullet) \cong H_i(U(A)_\bullet). $$ The isomorphisms are functorial with respect to morphisms of double complexes with the properties above. \end{lemma} \begin{proof} We will show that $H_i(R(A)_\bullet)$ and $H_i(U(A)_\bullet)$ are canonically isomorphic to a third group. Namely $$ \mathbf{H}_i(A) := \frac{ \{ (a_{i, 0}, a_{i-1, 1}, \ldots, a_{0, i}) \mid d(a_{i, 0}) = \delta(a_{i-1, 1}), \ldots, d(a_{1, i-1}) = \delta(a_{0, i}) \}} { \{ d(a_{i + 1, 0}) + \delta(a_{i, 1}), d(a_{i, 1}) + \delta(a_{i-1, 2}), \ldots, d(a_{1, i}) + \delta(a_{0, i + 1}) \} } $$ Here we use the notational convention that $a_{i, j}$ denotes an element of $A_{i, j}$. In other words, an element of $\mathbf{H}_i$ is represented by a zig-zag, represented as follows for $i = 2$ $$ \xymatrix{ a_{2, 0} \ar@{|->}[r] & d(a_{2, 0}) = \delta(a_{1, 1}) & \\ & a_{1, 1} \ar@{|->}[u] \ar@{|->}[r] & d(a_{1, 1}) = \delta(a_{0, 2}) \\ & & a_{0, 2} \ar@{|->}[u] \\ } $$ Naturally, we divide out by the ``trivial'' zig-zags in the displayed denominator. They are generated by tuples supported at the left endpoint with value $d(a_{i+1,0})$, tuples supported at the right endpoint with value $\delta(a_{0,i+1})$, and the adjacent pairs $(0,\ldots,0,\delta(a_{t+1,i-t}),d(a_{t+1,i-t}),0,\ldots,0)$ for $0\leq t 0$ the functor $\text{Tor}_i^R(M, -)$ is zero. \item The functor $\text{Tor}_1^R(M, -)$ is zero. \item For all ideals $I \subset R$ we have $\text{Tor}_1^R(M, R/I) = 0$. \item For all finitely generated ideals $I \subset R$ we have $\text{Tor}_1^R(M, R/I) = 0$. \end{enumerate} \end{lemma} \begin{proof} Suppose $M$ is flat. Let $N$ be an $R$-module. Let $F_\bullet$ be a free resolution of $N$. Then $F_\bullet \otimes_R M$ is a resolution of $N \otimes_R M$, by flatness of $M$. Hence all higher Tor groups vanish. \medskip\noindent It now suffices to show that the last condition implies that $M$ is flat. Let $I \subset R$ be an ideal. Consider the short exact sequence $0 \to I \to R \to R/I \to 0$. Apply Lemma \ref{lemma-long-exact-sequence-tor}. We get an exact sequence $$ \text{Tor}_1^R(M, R/I) \to M \otimes_R I \to M \otimes_R R \to M \otimes_R R/I \to 0 $$ Since obviously $M \otimes_R R = M$ we conclude that the last hypothesis implies that $M \otimes_R I \to M$ is injective for every finitely generated ideal $I$. Thus $M$ is flat by Lemma \ref{lemma-flat}. \end{proof} \begin{remark} \label{remark-Tor-ring-mod-ideal} The proof of Lemma \ref{lemma-characterize-flat} actually shows that $$ \text{Tor}_1^R(M, R/I) = \Ker(I \otimes_R M \to M). $$ \end{remark} \section{Functorialities for Tor} \label{section-functoriality-tor} % BEGIN ALGEBRA EDITORIAL ROUTE section-functoriality-tor \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-functoriality-tor}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-functoriality-tor \noindent In this section we briefly discuss the functoriality of $\text{Tor}$ with respect to change of ring, etc. Here is a list of items to work out. \begin{enumerate} \item Given a ring map $R \to R'$, an $R$-module $M$ and an $R'$-module $N'$ the $R$-modules $\text{Tor}_i^R(M, N')$ have a natural $R'$-module structure. \item Given a ring map $R \to R'$ and $R$-modules $M$, $N$ there is a natural $R$-module map $\text{Tor}_i^R(M, N) \to \text{Tor}_i^{R'}(M \otimes_R R', N \otimes_R R')$. \item Given a ring map $R \to R'$ an $R$-module $M$ and an $R'$-module $N'$ there exists a natural $R'$-module map $\text{Tor}_i^R(M, N') \to \text{Tor}_i^{R'}(M \otimes_R R', N')$. \end{enumerate} \begin{lemma} \label{lemma-flat-base-change-tor} Given a flat ring map $R \to R'$ and $R$-modules $M$, $N$ the natural $R$-module map $\text{Tor}_i^R(M, N)\otimes_R R' \to \text{Tor}_i^{R'}(M \otimes_R R', N \otimes_R R')$ is an isomorphism for all $i$. \end{lemma} \begin{proof} Omitted. This is true because a free resolution $F_\bullet$ of $M$ over $R$ stays exact when tensoring with $R'$ over $R$ and hence $(F_\bullet \otimes_R N)\otimes_R R'$ computes the Tor groups over $R'$. \end{proof} \noindent The following lemma does not seem to fit anywhere else. \begin{lemma} \label{lemma-tor-commutes-filtered-colimits} Let $R$ be a ring. Let $M = \colim M_i$ be a filtered colimit of $R$-modules. Let $N$ be an $R$-module. Then $\text{Tor}_n^R(M, N) = \colim \text{Tor}_n^R(M_i, N)$ for all $n$. \end{lemma} \begin{proof} Choose a free resolution $F_\bullet$ of $N$. Then $F_\bullet \otimes_R M = \colim F_\bullet \otimes_R M_i$ as complexes by Lemma \ref{lemma-tensor-products-commute-with-limits}. Thus the result follows by Lemma \ref{lemma-directed-colimit-exact}. \end{proof} \section{Projective modules} \label{section-projective} % BEGIN ALGEBRA EDITORIAL ROUTE section-projective \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-projective}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-projective \noindent Some lemmas on projective modules. \begin{definition} \label{definition-projective} \begin{reference} \cite[Chapter II, \S 4, no. 50, opening definition, p. 242]{FAC} \end{reference} \begin{history} The cited source defines a projective module as a direct summand of a free module. This is condition (2) of Lemma \ref{lemma-characterize-projective}; the definition below instead uses exactness of the Hom functor. \end{history} Let $R$ be a ring. An $R$-module $P$ is {\it projective} if and only if the functor $\Hom_R(P, -) : \text{Mod}_R \to \text{Mod}_R$ is an exact functor. \end{definition} \noindent The functor $\Hom_R(M, - )$ is left exact for any $R$-module $M$, see Lemma \ref{lemma-hom-exact}. Hence the condition for $P$ to be projective really signifies that given a surjection of $R$-modules $N \to N'$ the map $\Hom_R(P, N) \to \Hom_R(P, N')$ is surjective. \begin{lemma} \label{lemma-characterize-projective} Let $R$ be a ring. Let $P$ be an $R$-module. The following are equivalent \begin{enumerate} \item $P$ is projective, \item $P$ is a direct summand of a free $R$-module, and \item $\Ext^1_R(P, M) = 0$ for every $R$-module $M$. \end{enumerate} \end{lemma} \begin{proof} Assume $P$ is projective. Choose a surjection $\pi : F \to P$ where $F$ is a free $R$-module. As $P$ is projective there exists a $i \in \Hom_R(P, F)$ such that $\pi \circ i = \text{id}_P$. In other words $F \cong \Ker(\pi) \oplus i(P)$ and we see that $P$ is a direct summand of $F$. \medskip\noindent Conversely, assume that $P \oplus Q = F$ is a free $R$-module. Note that the free module $F = \bigoplus_{i \in I} R$ is projective as $\Hom_R(F, M) = \prod_{i \in I} M$ and the functor $M \mapsto \prod_{i \in I} M$ is exact. Then $\Hom_R(F, -) = \Hom_R(P, -) \times \Hom_R(Q, -)$ as functors, hence both $P$ and $Q$ are projective. \medskip\noindent Assume $P \oplus Q = F$ is a free $R$-module. Then we have a free resolution $F_\bullet$ of the form $$ \ldots \to F \xrightarrow{a} F \xrightarrow{b} F \to P \to 0 $$ where the maps $a, b$ alternate and are equal to the projectors onto $P$ and $Q$, respectively. Hence the complex $\Hom_R(F_\bullet, M)$ is split exact in degrees $\geq 1$, whence we see the vanishing in (3). \medskip\noindent Assume $\Ext^1_R(P, M) = 0$ for every $R$-module $M$. Pick a free resolution $F_\bullet \to P$. Set $M = \Im(F_1 \to F_0) = \Ker(F_0 \to P)$. Consider the element $\xi \in \Ext^1_R(P, M)$ given by the class of the quotient map $\pi : F_1 \to M$. Since $\xi$ is zero there exists a map $s : F_0 \to M$ such that $\pi = s \circ (F_1 \to F_0)$. Clearly, this means that $$ F_0 = \Ker(s) \oplus \Ker(F_0 \to P) = P \oplus \Ker(F_0 \to P) $$ and we win. \end{proof} \begin{lemma} \label{lemma-characterize-finite-projective-noetherian} Let $R$ be a Noetherian ring. Let $P$ be a finite $R$-module. If $\Ext^1_R(P, M) = 0$ for every finite $R$-module $M$, then $P$ is projective. \end{lemma} \noindent This lemma can be strengthened: There is a version for finitely presented $R$-modules if $R$ is not assumed Noetherian. There is a version with $M$ running through all finite length modules in the Noetherian case. \begin{proof} Choose a surjection $R^{\oplus n} \to P$ with kernel $M$. Since $\Ext^1_R(P, M) = 0$ this surjection is split and we conclude by Lemma \ref{lemma-characterize-projective}. \end{proof} \begin{lemma} \label{lemma-direct-sum-projective} A direct sum of projective modules is projective. \end{lemma} \begin{proof} This is true by the characterization of projectives as direct summands of free modules in Lemma \ref{lemma-characterize-projective}. \end{proof} \begin{lemma} \label{lemma-lift-projective-module} Let $R$ be a ring. Let $I \subset R$ be a nilpotent ideal. Let $\overline{P}$ be a projective $R/I$-module. Then there exists a projective $R$-module $P$ such that $P/IP \cong \overline{P}$. \end{lemma} \begin{proof} By Lemma \ref{lemma-characterize-projective} we can choose a set $A$ and a direct sum decomposition $\bigoplus_{\alpha \in A} R/I = \overline{P} \oplus \overline{K}$ for some $R/I$-module $\overline{K}$. Write $F = \bigoplus_{\alpha \in A} R$ for the free $R$-module on $A$. Choose a lift $p : F \to F$ of the projector $\overline{p}$ associated to the direct summand $\overline{P}$ of $\bigoplus_{\alpha \in A} R/I$. Note that $p^2 - p \in \text{End}_R(F)$ is a nilpotent endomorphism of $F$ (as $I$ is nilpotent and the matrix entries of $p^2 - p$ are in $I$; more precisely, if $I^n = 0$, then $(p^2 - p)^n = 0$). Hence by Lemma \ref{lemma-lift-idempotents-noncommutative} we can modify our choice of $p$ and assume that $p$ is a projector. Set $P = \Im(p)$. \end{proof} \begin{lemma} \label{lemma-lift-finite-projective-module} Let $R$ be a ring. Let $I \subset R$ be a locally nilpotent ideal. Let $\overline{P}$ be a finite projective $R/I$-module. Then there exists a finite projective $R$-module $P$ such that $P/IP \cong \overline{P}$. \end{lemma} \begin{proof} Recall that $\overline{P}$ is a direct summand of a free $R/I$-module $\bigoplus_{\alpha \in A} R/I$ by Lemma \ref{lemma-characterize-projective}. As $\overline{P}$ is finite, it follows that $\overline{P}$ is contained in $\bigoplus_{\alpha \in A'} R/I$ for some $A' \subset A$ finite. Hence we may assume we have a direct sum decomposition $(R/I)^{\oplus n} = \overline{P} \oplus \overline{K}$ for some $n$ and some $R/I$-module $\overline{K}$. Choose a lift $p \in \text{Mat}(n \times n, R)$ of the projector $\overline{p}$ associated to the direct summand $\overline{P}$ of $(R/I)^{\oplus n}$. Note that $p^2 - p \in \text{Mat}(n \times n, R)$ is nilpotent: as $I$ is locally nilpotent and the matrix entries $c_{ij}$ of $p^2 - p$ are in $I$ we have $c_{ij}^t = 0$ for some $t > 0$ and then $(p^2 - p)^{tn^2} = 0$ (by looking at the matrix coefficients). Hence by Lemma \ref{lemma-lift-idempotents-noncommutative} we can modify our choice of $p$ and assume that $p$ is a projector. Set $P = \Im(p)$. \end{proof} \begin{lemma} \label{lemma-lift-projective} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Assume \begin{enumerate} \item $I$ is nilpotent, \item $M/IM$ is a projective $R/I$-module, \item $M$ is a flat $R$-module. \end{enumerate} Then $M$ is a projective $R$-module. \end{lemma} \begin{proof} By Lemma \ref{lemma-lift-projective-module} we can find a projective $R$-module $P$ and an isomorphism $P/IP \to M/IM$. We are going to show that $M$ is isomorphic to $P$ which will finish the proof. Because $P$ is projective we can lift the map $P \to P/IP \to M/IM$ to an $R$-module map $P \to M$ which is an isomorphism modulo $I$. Since $I^n = 0$ for some $n$, we can use the filtrations \begin{align*} 0 = I^nM \subset I^{n - 1}M \subset \ldots \subset IM \subset M \\ 0 = I^nP \subset I^{n - 1}P \subset \ldots \subset IP \subset P \end{align*} to see that it suffices to show that the induced maps $I^aP/I^{a + 1}P \to I^aM/I^{a + 1}M$ are bijective. Since both $P$ and $M$ are flat $R$-modules we can identify this with the map $$ I^a/I^{a + 1} \otimes_{R/I} P/IP \longrightarrow I^a/I^{a + 1} \otimes_{R/I} M/IM $$ induced by $P \to M$. Since we chose $P \to M$ such that the induced map $P/IP \to M/IM$ is an isomorphism, we win. \end{proof} \begin{lemma} \label{lemma-projective-modulo-two-ideals} Let $R$ be a ring. Let $I, J \subset R$ be ideals such that $I \cap J = 0$. Let $P$ be an $R$-module such that $P/IP$ is a projective $R/I$-module and $P/JP$ is a projective $R/J$-module. Then $P$ is a projective $R$-module. \end{lemma} \begin{proof} Choose a surjection $p : F \to P$ where $F$ is a free $R$-module. Since $P/IP$ is a projective $R/I$-module, we can choose a map $f : P/IP \to F/IF$ which is a right inverse to $p \bmod I$. Consider the map $q : F/JF \to F/(I + J)F \times_{P/(I + J)P} P/JP$ induced by the quotient map $F/JF \to F/(I + J)F$ and $p$. Note that $q$ is a surjective map of $R/J$-modules (small detail omitted). Consider the map $f' : P/JP \to F/(I + J)F \times_{P/(I + J)P} P/JP$ induced by $f$ and the identity map. Since $P/JP$ is a projective $R/J$-module and $q$ is surjective, we can choose a map $g : P/JP \to F/JF$ such that $q \circ g = f'$. Then $f \bmod I + J = g \bmod I + J$. Since $F = F/JF \times_{F/(I + J)F} F/IF$ because $I \cap J = 0$, we conclude that we obtain a well defined homomorphism $h = (f, g) : P \to F$ of $R$-modules. The map $a = p \circ h : P \to P$ reduces to the identity modulo $I$ and modulo $J$. Then $a$ also induces the identity map on the submodule $IP$: if $x = \sum i_\alpha x_\alpha$ with $i_\alpha \in I$ and $x_\alpha \in P$, then $a(x) = \sum i_\alpha a(x_\alpha) = \sum i_\alpha x_\alpha = x$ because $a(x_\alpha) = x_\alpha + j_\alpha$ with $j_\alpha \in JP$ and $i_\alpha j_\alpha = 0$. Thus $a : P \to P$ acts as the identity on $IP$ and on $P/IP$ and we conclude that $a$ is an automorphism of $P$ (small detail omitted). Thus $P$ is a summand of $F$, whence projective. \end{proof} \section{Finite projective modules} \label{section-finite-projective-modules} % BEGIN ALGEBRA EDITORIAL ROUTE section-finite-projective-modules \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-finite-projective-modules}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-finite-projective-modules \begin{definition} \label{definition-locally-free} Let $R$ be a ring and $M$ an $R$-module. \begin{enumerate} \item We say that $M$ is {\it locally free} if we can cover $\Spec(R)$ by standard opens $D(f_i)$, $i \in I$ such that $M_{f_i}$ is a free $R_{f_i}$-module for all $i \in I$. \item We say that $M$ is {\it finite locally free} if we can choose the covering such that each $M_{f_i}$ is finite free. \item We say that $M$ is {\it finite locally free of rank $r$} if we can choose the covering such that each $M_{f_i}$ is isomorphic to $R_{f_i}^{\oplus r}$. \end{enumerate} \end{definition} \noindent Note that a finite locally free $R$-module is automatically finitely presented by Lemma \ref{lemma-cover}. Moreover, if $M$ is a finite locally free module of rank $r$ over a ring $R$ and if $R$ is nonzero, then $r$ is uniquely determined by Lemma \ref{lemma-rank} (because at least one of the localizations $R_{f_i}$ is a nonzero ring). \begin{lemma} \label{lemma-finite-projective} \begin{reference} \cite[Chapter II, \S 4, no. 50, Proposition 4 and final paragraph, pp. 242--243]{FAC} \end{reference} \begin{history} For a finite module over the coordinate ring of a classical affine variety, the cited proposition tests projectivity by freeness of the stalks at classical closed points. The equivalences below work over an arbitrary ring and test all prime ideals or all maximal ideals, with finite presentation made explicit. The source proof writes a local-to-global formula for projective dimension; this is homological dimension, not rank. Its final paragraph asks whether every finite projective module over a polynomial ring over a field is free. This question was later answered affirmatively by the Quillen--Suslin theorem, which is not developed in this chapter. \end{history} Let $R$ be a ring and let $M$ be an $R$-module. The following are equivalent \begin{enumerate} \item $M$ is finitely presented and $R$-flat, \item $M$ is finite projective, \item $M$ is a direct summand of a finite free $R$-module, \item $M$ is finitely presented and for all $\mathfrak p \in \Spec(R)$ the localization $M_{\mathfrak p}$ is free, \item $M$ is finitely presented and for all maximal ideals $\mathfrak m \subset R$ the localization $M_{\mathfrak m}$ is free, \item $M$ is finite and locally free, \item $M$ is finite locally free, and \item $M$ is finite, for every prime $\mathfrak p$ the module $M_{\mathfrak p}$ is free, and the function $$ \rho_M : \Spec(R) \to \mathbf{Z}, \quad \mathfrak p \longmapsto \dim_{\kappa(\mathfrak p)} M \otimes_R \kappa(\mathfrak p) $$ is locally constant in the Zariski topology. \end{enumerate} \end{lemma} \begin{proof} First suppose $M$ is finite projective, i.e., (2) holds. Take a surjection $R^n \to M$ and let $K$ be the kernel. Since $M$ is projective, $0 \to K \to R^n \to M \to 0$ splits. Hence (2) $\Rightarrow$ (3). The implication (3) $\Rightarrow$ (2) follows from the fact that a direct summand of a projective is projective, see Lemma \ref{lemma-characterize-projective}. \medskip\noindent Assume (3), so we can write $K \oplus M \cong R^{\oplus n}$. So $K$ is a direct summand of $R^n$ and thus finitely generated. This shows $M = R^{\oplus n}/K$ is finitely presented. In other words, (3) $\Rightarrow$ (1). \medskip\noindent Assume $M$ is finitely presented and flat, i.e., (1) holds. We will prove that (7) holds. Pick any prime $\mathfrak p$ and $x_1, \ldots, x_r \in M$ which map to a basis of $M \otimes_R \kappa(\mathfrak p)$. By Nakayama's lemma (in the form of Lemma \ref{lemma-NAK-localization}) these elements generate $M_g$ for some $g \in R$, $g \not \in \mathfrak p$. The corresponding surjection $\varphi : R_g^{\oplus r} \to M_g$ has the following two properties: (a) $\Ker(\varphi)$ is a finite $R_g$-module (see Lemma \ref{lemma-extension}) and (b) $\Ker(\varphi) \otimes \kappa(\mathfrak p) = 0$ by flatness of $M_g$ over $R_g$ (see Lemma \ref{lemma-flat-tor-zero}). Hence by Nakayama's lemma again there exists $g'=h/g^a\in R_g\setminus\mathfrak pR_g$, with $a\geq0$ and $h\in R\setminus\mathfrak p$, such that $\Ker(\varphi)_{g'}=0$. Thus $(M_g)_{g'}\cong M_{gh}$ is free on the neighbourhood $D(gh)$. \medskip\noindent A finite locally free module is a finite module, see Lemma \ref{lemma-cover}, hence (7) $\Rightarrow$ (6). It is clear that (6) $\Rightarrow$ (7) and that (7) $\Rightarrow$ (8). \medskip\noindent A finite locally free module is a finitely presented module, see Lemma \ref{lemma-cover}, hence (7) $\Rightarrow$ (4). Of course (4) implies (5). Since we may check flatness locally (see Lemma \ref{lemma-flat-localization}) we conclude that (5) implies (1). At this point we have $$ \xymatrix{ (2) \ar@{<=>}[r] & (3) \ar@{=>}[r] & (1) \ar@{=>}[r] & (7) \ar@{<=>}[r] \ar@{=>}[rd] \ar@{=>}[d] & (6) \\ & & (5) \ar@{=>}[u] & (4) \ar@{=>}[l] & (8) } $$ \medskip\noindent Suppose that $M$ satisfies (1), (4), (5), (6), and (7). We will prove that (3) holds. It suffices to show that $M$ is projective. We have to show that $\Hom_R(M, -)$ is exact. Let $0 \to N'' \to N \to N'\to 0$ be a short exact sequence of $R$-modules. We have to show that $0 \to \Hom_R(M, N'') \to \Hom_R(M, N) \to \Hom_R(M, N') \to 0$ is exact. As $M$ is finite locally free there exists a covering $\Spec(R) = \bigcup D(f_i)$ such that $M_{f_i}$ is finite free. By Lemma \ref{lemma-hom-from-finitely-presented} we see that $$ 0 \to \Hom_R(M, N'')_{f_i} \to \Hom_R(M, N)_{f_i} \to \Hom_R(M, N')_{f_i} \to 0 $$ is equal to $0 \to \Hom_{R_{f_i}}(M_{f_i}, N''_{f_i}) \to \Hom_{R_{f_i}}(M_{f_i}, N_{f_i}) \to \Hom_{R_{f_i}}(M_{f_i}, N'_{f_i}) \to 0$ which is exact as $M_{f_i}$ is free and as the localization $0 \to N''_{f_i} \to N_{f_i} \to N'_{f_i} \to 0$ is exact (as localization is exact). Whence we see that $0 \to \Hom_R(M, N'') \to \Hom_R(M, N) \to \Hom_R(M, N') \to 0$ is exact by Lemma \ref{lemma-cover}. \medskip\noindent Finally, assume that (8) holds. Pick a maximal ideal $\mathfrak m \subset R$. Pick $x_1, \ldots, x_r \in M$ which map to a $\kappa(\mathfrak m)$-basis of $M \otimes_R \kappa(\mathfrak m) = M/\mathfrak mM$. In particular $\rho_M(\mathfrak m) = r$. By Nakayama's Lemma \ref{lemma-NAK} there exists an $f \in R$, $f \not \in \mathfrak m$ such that $x_1, \ldots, x_r$ generate $M_f$ over $R_f$. By the assumption that $\rho_M$ is locally constant there exists a $g \in R$, $g \not \in \mathfrak m$ such that $\rho_M$ is constant equal to $r$ on $D(g)$. We claim that $$ \Psi : R_{fg}^{\oplus r} \longrightarrow M_{fg}, \quad (a_1, \ldots, a_r) \longmapsto \sum a_i x_i $$ is an isomorphism. This claim will show that $M$ is finite locally free, i.e., that (7) holds. To see the claim it suffices to show that the induced map on localizations $\Psi_{\mathfrak p} : R_{\mathfrak p}^{\oplus r} \to M_{\mathfrak p}$ is an isomorphism for all $\mathfrak p \in D(fg)$, see Lemma \ref{lemma-characterize-zero-local}. By our choice of $f$ the map $\Psi_{\mathfrak p}$ is surjective. By assumption (8) we have $M_{\mathfrak p} \cong R_{\mathfrak p}^{\oplus \rho_M(\mathfrak p)}$ and by our choice of $g$ we have $\rho_M(\mathfrak p) = r$. Hence $\Psi_{\mathfrak p}$ determines a surjection $R_{\mathfrak p}^{\oplus r} \to M_{\mathfrak p} \cong R_{\mathfrak p}^{\oplus r}$ whence it is an isomorphism by Lemma \ref{lemma-fun}. (Of course this last fact follows from a simple matrix argument also.) \end{proof} \begin{lemma} \label{lemma-finite-projective-reduced} Let $R$ be a reduced ring and let $M$ be an $R$-module. Then the equivalent conditions of Lemma \ref{lemma-finite-projective} are also equivalent to \begin{enumerate} \item[(9)] $M$ is finite and the function $\rho_M : \Spec(R) \to \mathbf{Z}$, $\mathfrak p \mapsto \dim_{\kappa(\mathfrak p)} M \otimes_R \kappa(\mathfrak p)$ is locally constant in the Zariski topology. \end{enumerate} \end{lemma} \begin{proof} Pick a maximal ideal $\mathfrak m \subset R$. Pick $x_1, \ldots, x_r \in M$ which map to a $\kappa(\mathfrak m)$-basis of $M \otimes_R \kappa(\mathfrak m) = M/\mathfrak mM$. In particular $\rho_M(\mathfrak m) = r$. By Nakayama's Lemma \ref{lemma-NAK} there exists an $f \in R$, $f \not \in \mathfrak m$ such that $x_1, \ldots, x_r$ generate $M_f$ over $R_f$. By the assumption that $\rho_M$ is locally constant there exists a $g \in R$, $g \not \in \mathfrak m$ such that $\rho_M$ is constant equal to $r$ on $D(g)$. We claim that $$ \Psi : R_{fg}^{\oplus r} \longrightarrow M_{fg}, \quad (a_1, \ldots, a_r) \longmapsto \sum a_i x_i $$ is an isomorphism. This claim will show that $M$ is finite locally free, i.e., that (7) holds. Since $\Psi$ is surjective, it suffices to show that $\Psi$ is injective. Since $R_{fg}$ is reduced, it suffices to show that $\Psi$ is injective after localization at all minimal primes $\mathfrak p$ of $R_{fg}$, see Lemma \ref{lemma-reduced-ring-sub-product-fields}. However, we know that $R_\mathfrak p = \kappa(\mathfrak p)$ by Lemma \ref{lemma-minimal-prime-reduced-ring} and $\rho_M(\mathfrak p) = r$ hence $\Psi_\mathfrak p : R_\mathfrak p^{\oplus r} \to M \otimes_R \kappa(\mathfrak p)$ is an isomorphism as a surjective map of finite dimensional vector spaces of the same dimension. \end{proof} \begin{remark} \label{remark-warning} It is not true that a finite $R$-module which is $R$-flat is automatically projective. A counterexample is where $R = \mathcal{C}^\infty(\mathbf{R})$ is the ring of infinitely differentiable functions on $\mathbf{R}$, and $M = R_{\mathfrak m} = R/I$ where $\mathfrak m = \{f \in R \mid f(0) = 0\}$ and $I = \{f \in R \mid \exists \epsilon, \epsilon > 0 : f(x) = 0\ \forall x, |x| < \epsilon\}$. \end{remark} \begin{lemma} \label{lemma-finite-flat-local} (Warning: see Remark \ref{remark-warning}.) Suppose $R$ is a local ring, and $M$ is a finite flat $R$-module. Then $M$ is finite free. \end{lemma} \begin{proof} Follows from the equational criterion of flatness, see Lemma \ref{lemma-flat-eq}. Namely, suppose that $x_1, \ldots, x_r \in M$ map to a basis of $M/\mathfrak mM$. By Nakayama's Lemma \ref{lemma-NAK} these elements generate $M$. We want to show there is no relation among the $x_i$. Instead, we will show by induction on $n$ that if $x_1, \ldots, x_n \in M$ are linearly independent in the vector space $M/\mathfrak mM$ then they are independent over $R$. \medskip\noindent The base case of the induction is where we have $x \in M$, $x \not\in \mathfrak mM$ and a relation $fx = 0$. By the equational criterion there exist $y_j \in M$ and $a_j \in R$ such that $x = \sum a_j y_j$ and $fa_j = 0$ for all $j$. Since $x \not\in \mathfrak mM$ we see that at least one $a_j$ is a unit and hence $f = 0 $. \medskip\noindent Suppose that $\sum f_i x_i$ is a relation among $x_1, \ldots, x_n$. By our choice of $x_i$ we have $f_i \in \mathfrak m$. According to the equational criterion of flatness there exist $a_{ij} \in R$ and $y_j \in M$ such that $x_i = \sum a_{ij} y_j$ and $\sum f_i a_{ij} = 0$. Since $x_n \not \in \mathfrak mM$ we see that $a_{nj}\not\in \mathfrak m$ for at least one $j$. Since $\sum f_i a_{ij} = 0$ we get $f_n = \sum_{i = 1}^{n-1} (-a_{ij}/a_{nj}) f_i$. The relation $\sum f_i x_i = 0$ now can be rewritten as $\sum_{i = 1}^{n-1} f_i( x_i + (-a_{ij}/a_{nj}) x_n) = 0$. Note that the elements $x_i + (-a_{ij}/a_{nj}) x_n$ map to $n-1$ linearly independent elements of $M/\mathfrak mM$. By induction assumption we get that all the $f_i$, $i \leq n-1$ have to be zero, and also $f_n = \sum_{i = 1}^{n-1} (-a_{ij}/a_{nj}) f_i$. This proves the induction step. \end{proof} \begin{lemma} \label{lemma-finite-projective-descends} Let $R \to S$ be a flat local homomorphism of local rings. Let $M$ be a finite $R$-module. Then $M$ is finite projective over $R$ if and only if $M \otimes_R S$ is finite projective over $S$. \end{lemma} \begin{proof} By Lemma \ref{lemma-finite-projective} being finite projective over a local ring is the same thing as being finite free. Suppose that $M \otimes_R S$ is a finite free $S$-module. Pick $x_1, \ldots, x_r \in M$ whose images in $M/\mathfrak m_RM$ form a basis over $\kappa(\mathfrak m_R)$. Then we see that $x_1 \otimes 1, \ldots, x_r \otimes 1$ are a basis for $M \otimes_R S$. This implies that the map $R^{\oplus r} \to M, (a_i) \mapsto \sum a_i x_i$ becomes an isomorphism after tensoring with $S$. By faithful flatness of $R \to S$, see Lemma \ref{lemma-local-flat-ff} we see that it is an isomorphism. \end{proof} \begin{lemma} \label{lemma-locally-free-semi-local-free} Let $R$ be a semi-local ring. Let $M$ be a finite locally free module. If $M$ has constant rank, then $M$ is free. In particular, if $R$ has connected spectrum, then $M$ is free. \end{lemma} \begin{proof} Omitted. Hints: First show that $M/\mathfrak m_iM$ has the same dimension $d$ for all maximal ideals $\mathfrak m_1, \ldots, \mathfrak m_n$ of $R$ using the rank is constant. Next, show that there exist elements $x_1, \ldots, x_d \in M$ which form a basis for each $M/\mathfrak m_iM$ by the Chinese remainder theorem. Finally show that $x_1, \ldots, x_d$ is a basis for $M$. \end{proof} \noindent Here is a technical lemma that is used in the chapter on groupoids. \begin{lemma} \label{lemma-semi-local-module-basis-in-submodule} Let $R$ be a local ring with maximal ideal $\mathfrak m$ and infinite residue field. Let $R \to S$ be a ring map. Let $M$ be an $S$-module and let $N \subset M$ be an $R$-submodule. Assume \begin{enumerate} \item $S$ is semi-local and $\mathfrak mS$ is contained in the Jacobson radical of $S$, \item $M$ is a finite free $S$-module, and \item $N$ generates $M$ as an $S$-module. \end{enumerate} Then $N$ contains an $S$-basis of $M$. \end{lemma} \begin{proof} Assume $M$ is free of rank $n$. Let $I \subset S$ be the Jacobson radical. By Nakayama's Lemma \ref{lemma-NAK} a sequence of elements $m_1, \ldots, m_n$ is a basis for $M$ if and only if $\overline{m}_i \in M/IM$ generate $M/IM$. Hence we may replace $M$ by $M/IM$, $N$ by $N/(N \cap IM)$, $R$ by $R/\mathfrak m$, and $S$ by $S/IS$. In this case we see that $S$ is a finite product of fields $S = k_1 \times \ldots \times k_r$ and $M = k_1^{\oplus n} \times \ldots \times k_r^{\oplus n}$. The fact that $N \subset M$ generates $M$ as an $S$-module means that there exist $x_j \in N$ such that a linear combination $\sum a_j x_j$ with $a_j \in S$ has a nonzero component in each factor $k_i^{\oplus n}$. Because $R = k$ is an infinite field, this means that also some linear combination $y = \sum c_j x_j$ with $c_j \in k$ has a nonzero component in each factor. Hence $y \in N$ generates a free direct summand $Sy \subset M$. By induction on $n$ the result holds for $M/Sy$ and the submodule $\overline{N} = N/(N \cap Sy)$. In other words there exist $\overline{y}_2, \ldots, \overline{y}_n$ in $\overline{N}$ which (freely) generate $M/Sy$. Then $y, y_2, \ldots, y_n$ (freely) generate $M$ and we win. \end{proof} \begin{lemma} \label{lemma-evaluation-map-iso-finite-projective} Let $R$ be a ring. Let $L$, $M$, $N$ be $R$-modules. The canonical map $$ \Hom_R(M, N) \otimes_R L \to \Hom_R(M, N \otimes_R L) $$ is an isomorphism if $M$ is finite projective. \end{lemma} \begin{proof} By Lemma \ref{lemma-finite-projective} we see that $M$ is finitely presented as well as finite locally free. By Lemmas \ref{lemma-hom-from-finitely-presented} and \ref{lemma-tensor-product-localization} formation of the left and right hand side of the arrow commutes with localization. We may check that our map is an isomorphism after localization, see Lemma \ref{lemma-cover}. Thus we may assume $M$ is finite free. In this case the lemma is immediate. \end{proof} \section{Open loci defined by module maps} \label{section-loci-maps} % BEGIN ALGEBRA EDITORIAL ROUTE section-loci-maps \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-loci-maps}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-loci-maps \noindent The set of primes where a given module map is surjective, or an isomorphism is sometimes open. In the case of finite projective modules we can look at the rank of the map. \begin{lemma} \label{lemma-map-between-finite} Let $R$ be a ring. Let $\varphi : M \to N$ be a map of $R$-modules with $N$ a finite $R$-module. Then we have the equality \begin{align*} U & = \{\mathfrak p \subset R \mid \varphi_{\mathfrak p} : M_{\mathfrak p} \to N_{\mathfrak p} \text{ is surjective}\} \\ & = \{\mathfrak p \subset R \mid \varphi \otimes \kappa(\mathfrak p) : M \otimes \kappa(\mathfrak p) \to N \otimes \kappa(\mathfrak p) \text{ is surjective}\} \end{align*} and $U$ is an open subset of $\Spec(R)$. Moreover, for any $f \in R$ such that $D(f) \subset U$ the map $M_f \to N_f$ is surjective. \end{lemma} \begin{proof} The equality in the displayed formula follows from Nakayama's lemma. Nakayama's lemma also implies that $U$ is open. See Lemma \ref{lemma-NAK} especially part (3). If $D(f) \subset U$, then $M_f \to N_f$ is surjective on all localizations at primes of $R_f$, and hence it is surjective by Lemma \ref{lemma-characterize-zero-local}. \end{proof} \begin{lemma} \label{lemma-map-between-finitely-presented} Let $R$ be a ring. Let $\varphi : M \to N$ be a map of $R$-modules with $M$ finite and $N$ finitely presented. Then $$ U = \{\mathfrak p \subset R \mid \varphi_{\mathfrak p} : M_{\mathfrak p} \to N_{\mathfrak p} \text{ is an isomorphism}\} $$ is an open subset of $\Spec(R)$. \end{lemma} \begin{proof} Let $\mathfrak p \in U$. Pick a presentation $N = R^{\oplus n}/\sum_{j = 1, \ldots, m} R k_j$. Denote $e_i$ the image in $N$ of the $i$th basis vector of $R^{\oplus n}$. For each $i \in \{1,\ldots,n\}$ choose a preimage $n_i/s_i\in M_{\mathfrak p}$ of $e_i/1$, with $n_i\in M$ and $s_i\notin\mathfrak p$. Choose $t_i\notin\mathfrak p$ such that $t_i(\varphi(n_i)-s_ie_i)=0$ in $N$. Put $m_i=t_in_i\in M$ and $f_i=t_is_i\notin\mathfrak p$; then $\varphi(m_i)=f_ie_i$ in $N$. Set $f=f_1\cdots f_n$ and let $\psi : R_f^{\oplus n} \to M_f$ be the map which maps the $i$th basis vector to $m_i/f_i$. Note that $\varphi_f \circ \psi$ is the localization at $f$ of the given map $R^{\oplus n} \to N$. As $\varphi_{\mathfrak p}$ is an isomorphism we see that $\psi(k_j)$ is an element of $M_f$ which maps to zero in $M_{\mathfrak p}$. Hence we see that there exist $g_j \in R$, $g_j \not \in \mathfrak p$ such that $g_j \psi(k_j) = 0$. Setting $g = g_1 \ldots g_m$, we see that $\psi_g$ factors through $N_{fg}$ to give a map $\chi : N_{fg} \to M_{fg}$. By construction $\chi$ is a right inverse to $\varphi_{fg}$. It follows that $\chi_\mathfrak p$ is an isomorphism. By Lemma \ref{lemma-map-between-finite} there is an $h \in R$, $h \not \in \mathfrak p$ such that $\chi_h : N_{fgh} \to M_{fgh}$ is surjective. Hence $\varphi_{fgh}$ and $\chi_h$ are mutually inverse maps, which implies that $D(fgh) \subset U$ as desired. \end{proof} \begin{lemma} \label{lemma-finitely-presented-localization-free} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime. Let $M$ be a finitely presented $R$-module. If $M_\mathfrak p$ is free, then there is an $f \in R$, $f \not \in \mathfrak p$ such that $M_f$ is a free $R_f$-module. \end{lemma} \begin{proof} Choose a basis $x_1, \ldots, x_n \in M_\mathfrak p$. We can choose an $f \in R$, $f \not \in \mathfrak p$ such that $x_i$ is the image of some $y_i \in M_f$. After replacing $y_i$ by $f^m y_i$ for $m \gg 0$ we may assume $y_i \in M$. Namely, this replaces $x_1, \ldots, x_n$ by $f^mx_1, \ldots, f^mx_n$ which is still a basis as $f$ maps to a unit in $R_\mathfrak p$. Hence we obtain a homomorphism $\varphi = (y_1, \ldots, y_n) : R^{\oplus n} \to M$ of $R$-modules whose localization at $\mathfrak p$ is an isomorphism. By Lemma \ref{lemma-map-between-finitely-presented} we can find an $f \in R$, $f \not \in \mathfrak p$ such that $\varphi_\mathfrak q$ is an isomorphism for all primes $\mathfrak q \subset R$ with $f \not \in \mathfrak q$. Then it follows from Lemma \ref{lemma-characterize-zero-local} that $\varphi_f$ is an isomorphism and the proof is complete. \end{proof} \begin{lemma} \label{lemma-cokernel-flat} Let $R$ be a ring. Let $\varphi : P_1 \to P_2$ be a map of finite projective modules. Then \begin{enumerate} \item The set $U$ of primes $\mathfrak p \in \Spec(R)$ such that $\varphi \otimes \kappa(\mathfrak p)$ is injective is open and for any $f\in R$ such that $D(f) \subset U$ we have \begin{enumerate} \item $P_{1, f} \to P_{2, f}$ is injective, and \item the module $\Coker(\varphi)_f$ is finite projective over $R_f$. \end{enumerate} \item The set $W$ of primes $\mathfrak p \in \Spec(R)$ such that $\varphi \otimes \kappa(\mathfrak p)$ is surjective is open and for any $f\in R$ such that $D(f) \subset W$ we have \begin{enumerate} \item $P_{1, f} \to P_{2, f}$ is surjective, and \item the module $\Ker(\varphi)_f$ is finite projective over $R_f$. \end{enumerate} \item The set $V$ of primes $\mathfrak p \in \Spec(R)$ such that $\varphi \otimes \kappa(\mathfrak p)$ is an isomorphism is open and for any $f\in R$ such that $D(f) \subset V$ the map $\varphi : P_{1, f} \to P_{2, f}$ is an isomorphism of modules over $R_f$. \end{enumerate} \end{lemma} \begin{proof} To prove the set $U$ is open we may work locally on $\Spec(R)$. Thus we may replace $R$ by a suitable localization and assume that $P_1 = R^{n_1}$ and $P_2 = R^{n_2}$, see Lemma \ref{lemma-finite-projective}. In this case injectivity of $\varphi \otimes \kappa(\mathfrak p)$ is equivalent to $n_1 \leq n_2$ and some $n_1 \times n_1$ minor $f$ of the matrix of $\varphi$ being invertible in $\kappa(\mathfrak p)$. Thus $D(f) \subset U$. This argument also shows that $P_{1, \mathfrak p} \to P_{2, \mathfrak p}$ is injective for $\mathfrak p \in U$. \medskip\noindent Now suppose $D(f) \subset U$. By the remark in the previous paragraph and Lemma \ref{lemma-characterize-zero-local} we see that $P_{1, f} \to P_{2, f}$ is injective, i.e., (1)(a) holds. By Lemma \ref{lemma-finite-projective} to prove (1)(b) it suffices to prove that $\Coker(\varphi)$ is finite projective locally on $D(f)$. Thus, as we saw above, we may assume that $P_1 = R^{n_1}$ and $P_2 = R^{n_2}$ and that some minor of the matrix of $\varphi$ is invertible in $R$. If the minor in question corresponds to the first $n_1$ basis vectors of $R^{n_2}$, then using the last $n_2 - n_1$ basis vectors we get a map $R^{n_2 - n_1} \to R^{n_2} \to \Coker(\varphi)$ which is easily seen to be an isomorphism. \medskip\noindent Openness of $W$ and (2)(a) for $D(f) \subset W$ follow from Lemma \ref{lemma-map-between-finite}. Since $P_{2, f}$ is projective over $R_f$ we see that $\varphi_f : P_{1, f} \to P_{2, f}$ has a section and it follows that $\Ker(\varphi)_f$ is a direct summand of $P_{1, f}$. Therefore $\Ker(\varphi)_f$ is finite projective. Thus (2)(b) holds as well. \medskip\noindent It is clear that $V = U \cap W$ is open and the other statement in (3) follows from (1)(a) and (2)(a). \end{proof} \section{Faithfully flat descent for projectivity of modules} \label{section-ffdescent-projectivity-introduction} \medskip\noindent In the next few sections we prove, following Raynaud and Gruson \cite{GruRay}, that the projectivity of modules descends along faithfully flat ring maps. The idea of the proof is to use d\'evissage \`a la Kaplansky \cite{Kaplansky} to reduce to the case of countably generated modules. Given a well-behaved filtration of a module $M$, d\'evissage allows us to express $M$ as a direct sum of successive quotients of the filtering submodules (see Section \ref{section-transfinite-devissage}). Using this technique, we prove that a projective module is a direct sum of countably generated modules (Theorem \ref{theorem-projective-direct-sum}). To prove descent of projectivity for countably generated modules, we introduce a ``Mittag-Leffler'' condition on modules, prove that a countably generated module is projective if and only if it is flat and Mittag-Leffler (Theorem \ref{theorem-projectivity-characterization}), and then show that the property of being a Mittag-Leffler module descends (Lemma \ref{lemma-ffdescent-ML}). Finally, given an arbitrary module $M$ whose base change by a faithfully flat ring map is projective, we filter $M$ by submodules whose successive quotients are countably generated projective modules, and then by d\'evissage conclude $M$ is a direct sum of projectives, hence projective itself (Theorem \ref{theorem-ffdescent-projectivity}). \medskip\noindent We note that there is an error in the proof of faithfully flat descent of projectivity in \cite{GruRay}. There, descent of projectivity along faithfully flat ring maps is deduced from descent of projectivity along a more general type of ring map (\cite[Example 3.1.4(1) of Part II]{GruRay}). However, the proof of descent along this more general type of map is incorrect. In \cite{G}, Gruson explains what went wrong, although he does not provide a fix for the case of interest. Patching this hole in the proof of faithfully flat descent of projectivity comes down to proving that the property of being a Mittag-Leffler module descends along faithfully flat ring maps. We do this in Lemma \ref{lemma-ffdescent-ML}. \section{Characterizing flatness} \label{section-characterize-flatness} % BEGIN ALGEBRA EDITORIAL ROUTE section-characterize-flatness \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-characterize-flatness}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-characterize-flatness \noindent In this section we discuss criteria for flatness. The main result in this section is Lazard's theorem (Theorem \ref{theorem-lazard} below), which says that a flat module is the colimit of a directed system of free finite modules. We remind the reader of the ``equational criterion for flatness'', see Lemma \ref{lemma-flat-eq}. It turns out that this can be massaged into a seemingly much stronger property. \begin{lemma} \label{lemma-flat-factors-free} Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is flat. \item If $f: R^n \to M$ is a module map and $x \in \Ker(f)$, then there are module maps $h: R^n \to R^m$ and $g: R^m \to M$ such that $f = g \circ h$ and $x \in \Ker(h)$. \item Suppose $f: R^n \to M$ is a module map, $N \subset \Ker(f)$ any submodule, and $h: R^n \to R^{m}$ a map such that $N \subset \Ker(h)$ and $f$ factors through $h$. Then given any $x \in \Ker(f)$ we can find a map $h': R^n \to R^{m'}$ such that $N + Rx \subset \Ker(h')$ and $f$ factors through $h'$. \item If $f: R^n \to M$ is a module map and $N \subset \Ker(f)$ is a finitely generated submodule, then there are module maps $h: R^n \to R^m$ and $g: R^m \to M$ such that $f = g \circ h$ and $N \subset \Ker(h)$. \end{enumerate} \end{lemma} \begin{proof} That (1) is equivalent to (2) is just a reformulation of the equational criterion for flatness\footnote{In fact, a module map $f : R^n \to M$ corresponds to a choice of elements $x_1, x_2, \ldots, x_n$ of $M$ (namely, the images of the standard basis elements $e_1, e_2, \ldots, e_n$); furthermore, an element $x \in \Ker(f)$ corresponds to a relation between these $x_1, x_2, \ldots, x_n$ (namely, the relation $\sum_i f_i x_i = 0$, where the $f_i$ are the coordinates of $x$). The module map $h$ (represented as an $m \times n$-matrix) corresponds to the matrix $(a_{ij})$ from Lemma \ref{lemma-flat-eq}, and the $y_j$ of Lemma \ref{lemma-flat-eq} are the images of the standard basis vectors of $R^m$ under $g$.}. To show (2) implies (3), let $g: R^m \to M$ be the map such that $f$ factors as $f = g \circ h$. By (2) find $h'': R^m \to R^{m'}$ such that $h''$ kills $h(x)$ and $g: R^m \to M$ factors through $h''$. Then taking $h' = h'' \circ h$ works. (3) implies (4) by induction on the number of generators of $N \subset \Ker(f)$ in (4). Clearly (4) implies (2). \end{proof} \begin{lemma} \label{lemma-flat-factors-fp} Let $M$ be an $R$-module. Then $M$ is flat if and only if the following condition holds: if $P$ is a finitely presented $R$-module and $f: P \to M$ a module map, then there is a free finite $R$-module $F$ and module maps $h: P \to F$ and $g: F \to M$ such that $f = g \circ h$. \end{lemma} \begin{proof} This is just a reformulation of condition (4) from Lemma \ref{lemma-flat-factors-free}. \end{proof} \begin{lemma} \label{lemma-flat-surjective-hom} Let $M$ be an $R$-module. Then $M$ is flat if and only if the following condition holds: for every finitely presented $R$-module $P$, if $N \to M$ is a surjective $R$-module map, then the induced map $\Hom_R(P, N) \to \Hom_R(P, M)$ is surjective. \end{lemma} \begin{proof} First suppose $M$ is flat. We must show that if $P$ is finitely presented, then given a map $f: P \to M$, it factors through the map $N \to M$. By Lemma \ref{lemma-flat-factors-fp} the map $f$ factors through a map $F \to M$ where $F$ is free and finite. Since $F$ is free, this map factors through $N \to M$. Thus $f$ factors through $N \to M$. \medskip\noindent Conversely, suppose the condition of the lemma holds. Let $f: P \to M$ be a map from a finitely presented module $P$. Choose a free module $N$ with a surjection $N \to M$ onto $M$. Then $f$ factors through $N \to M$, and since $P$ is finitely generated, $f$ factors through a free finite submodule of $N$. Thus $M$ satisfies the condition of Lemma \ref{lemma-flat-factors-fp}, hence is flat. \end{proof} \begin{theorem}[Lazard's theorem] \label{theorem-lazard} Let $M$ be an $R$-module. Then $M$ is flat if and only if it is the colimit of a directed system of free finite $R$-modules. \end{theorem} \begin{proof} A colimit of a directed system of flat modules is flat, as taking directed colimits is exact and commutes with tensor product. Hence if $M$ is the colimit of a directed system of free finite modules then $M$ is flat. \medskip\noindent For the converse, first recall that any module $M$ can be written as the colimit of a directed system of finitely presented modules, in the following way. Choose a surjection $f: R^I \to M$ for some set $I$, and let $K$ be the kernel. Let $E$ be the set of ordered pairs $(J, N)$ where $J$ is a finite subset of $I$ and $N$ is a finitely generated submodule of $R^J \cap K$. Then $E$ is made into a directed partially ordered set by defining $(J, N) \leq (J', N')$ if and only if $J \subset J'$ and $N \subset N'$. Define $M_e = R^J/N$ for $e = (J, N)$, and define $f_{ee'}: M_e \to M_{e'}$ to be the natural map for $e \leq e'$. Then $(M_e, f_{ee'})$ is a directed system and the natural maps $f_e: M_e \to M$ induce an isomorphism $\colim_{e \in E} M_e \xrightarrow{\cong} M$. \medskip\noindent Now suppose $M$ is flat. Let $I = M \times \mathbf{Z}$, write $(x_i)$ for the canonical basis of $R^{I}$, and take in the above discussion $f: R^I \to M$ to be the map sending $x_i$ to the projection of $i$ onto $M$. To prove the theorem it suffices to show that the $e \in E$ such that $M_e$ is free form a cofinal subset of $E$. So let $e = (J, N) \in E$ be arbitrary. By Lemma \ref{lemma-flat-factors-fp} there is a free finite module $F$ and maps $h: R^J/N \to F$ and $g: F \to M$ such that the natural map $f_e: R^J/N \to M$ factors as $R^J/N \xrightarrow{h} F \xrightarrow{g} M$. We are going to realize $F$ as $M_{e'}$ for some $e' \geq e$. \medskip\noindent Let $\{ b_1, \ldots, b_n \}$ be a finite basis of $F$. Choose $n$ distinct elements $i_1, \ldots, i_n \in I$ such that $i_{\ell} \notin J$ for all $\ell$, and such that the image of $x_{i_{\ell}}$ under $f: R^I \to M$ equals the image of $b_{\ell}$ under $g: F \to M$. This is possible since every element of $M$ can be written as $f(x_i)$ for infinitely many distinct $i \in I$ (by our choice of $I$). Now let $J' = J \cup \{i_1, \ldots , i_n \}$, and define $R^{J'} \to F$ by $x_i \mapsto h(x_i)$ for $i \in J$ and $x_{i_{\ell}} \mapsto b_{\ell}$ for $\ell = 1, \ldots, n$. Let $N' = \Ker(R^{J'} \to F)$. Observe: \begin{enumerate} \item The square $$ \xymatrix{ R^{J'} \ar[r] \ar@{^{(}->}[d] & F \ar[d]^{g} \\ R^{I} \ar[r]_{f} & M } $$ is commutative, %$R^{J'} \to F$ factors $f: R^I \to M$, hence $N' \subset K = \Ker(f)$; \item $R^{J'} \to F$ is a surjection onto a free finite module, hence it splits and so $N'$ is finitely generated; \item $J \subset J'$ and $N \subset N'$. \end{enumerate} By (1) and (2) $e' = (J', N')$ is in $E$, by (3) $e' \geq e$, and by construction $M_{e'} = R^{J'}/N' \cong F$ is free. \end{proof} \section{Universally injective module maps} \label{section-universally-injective} % BEGIN ALGEBRA EDITORIAL ROUTE section-universally-injective \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-universally-injective}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-universally-injective \noindent Next we discuss universally injective module maps, which are in a sense complementary to flat modules (see Lemma \ref{lemma-flat-universally-injective}). We follow Lazard's thesis \cite{Autour}; also see \cite{Lam}. \begin{definition} \label{definition-universally-injective} Let $f: M \to N$ be a map of $R$-modules. Then $f$ is called {\it universally injective} if for every $R$-module $Q$, the map $f \otimes_R \text{id}_Q: M \otimes_R Q \to N \otimes_R Q$ is injective. A sequence $0 \to M_1 \to M_2 \to M_3 \to 0$ of $R$-modules is called {\it universally exact} if it is exact and $M_1 \to M_2$ is universally injective. \end{definition} \begin{example} \label{example-universally-exact} Examples of universally exact sequences. \begin{enumerate} \item A split short exact sequence is universally exact since tensoring commutes with taking direct sums. \item The colimit of a directed system of universally exact sequences is universally exact. This follows from the fact that taking directed colimits is exact and that tensoring commutes with taking colimits. In particular the colimit of a directed system of split exact sequences is universally exact. We will see below that, conversely, any universally exact sequence arises in this way. \end{enumerate} \end{example} \noindent Next we give a list of criteria for a short exact sequence to be universally exact. They are analogues of criteria for flatness given above. Parts (3)-(6) below correspond, respectively, to the criteria for flatness given in Lemmas \ref{lemma-flat-eq}, \ref{lemma-flat-factors-free}, \ref{lemma-flat-surjective-hom}, and Theorem \ref{theorem-lazard}. \begin{theorem} \label{theorem-universally-exact-criteria} Let $$ 0 \to M_1 \xrightarrow{f_1} M_2 \xrightarrow{f_2} M_3 \to 0 $$ be an exact sequence of $R$-modules. The following are equivalent: \begin{enumerate} \item The sequence $0 \to M_1 \to M_2 \to M_3 \to 0$ is universally exact. \item For every finitely presented $R$-module $Q$, the sequence $$ 0 \to M_1 \otimes_R Q \to M_2 \otimes_R Q \to M_3 \otimes_R Q \to 0 $$ is exact. \item Given elements $x_i \in M_1$ $(i = 1, \ldots, n)$, $y_j \in M_2$ $(j = 1, \ldots, m)$, and $a_{ij} \in R$ $(i = 1, \ldots, n, j = 1, \ldots, m)$ such that for all $i$ $$ f_1(x_i) = \sum\nolimits_j a_{ij} y_j, $$ there exists $z_j \in M_1$ $(j =1, \ldots, m)$ such that for all $i$, $$ x_i = \sum\nolimits_j a_{ij} z_j . $$ \item Given a commutative diagram of $R$-module maps $$ \xymatrix{ R^n \ar[r] \ar[d] & R^m \ar[d] \\ M_1 \ar[r]^{f_1} & M_2 } $$ where $m$ and $n$ are integers, there exists a map $R^m \to M_1$ making the top triangle commute. \item For every finitely presented $R$-module $P$, the $R$-module map $\Hom_R(P, M_2) \to \Hom_R(P, M_3)$ is surjective. \item The sequence $0 \to M_1 \to M_2 \to M_3 \to 0$ is the colimit of a directed system of split exact sequences of the form $$ 0 \to M_{1} \to M_{2, i} \to M_{3, i} \to 0 $$ where the $M_{3, i}$ are finitely presented. \end{enumerate} \end{theorem} \begin{proof} Obviously (1) implies (2). \medskip\noindent Next we show (2) implies (3). Let $f_1(x_i) = \sum_j a_{ij} y_j$ be relations as in (3). Let $(d_j)$ be a basis for $R^m$, $(e_i)$ a basis for $R^n$, and $R^m \to R^n$ the map given by $d_j \mapsto \sum_i a_{ij} e_i$. Let $Q$ be the cokernel of $R^m \to R^n$. Then tensoring $R^m \to R^n \to Q \to 0$ by the map $f_1: M_1 \to M_2$, we get a commutative diagram $$ \xymatrix{ M_1^{\oplus m} \ar[r] \ar[d] & M_1^{\oplus n} \ar[r] \ar[d] & M_1 \otimes_R Q \ar[r] \ar[d] & 0 \\ M_2^{\oplus m} \ar[r] & M_2^{\oplus n} \ar[r] & M_2 \otimes_R Q \ar[r] & 0 } $$ where $M_1^{\oplus m} \to M_1^{\oplus n}$ is given by $$ (z_1, \ldots, z_m) \mapsto (\sum\nolimits_j a_{1j} z_j, \ldots, \sum\nolimits_j a_{nj} z_j), $$ and $M_2^{\oplus m} \to M_2^{\oplus n}$ is given similarly. We want to show $x = (x_1, \ldots, x_n) \in M_1^{\oplus n}$ is in the image of $M_1^{\oplus m} \to M_1^{\oplus n}$. By (2) the map $M_1 \otimes Q \to M_2 \otimes Q$ is injective, hence by exactness of the top row it is enough to show $x$ maps to $0$ in $M_2 \otimes Q$, and so by exactness of the bottom row it is enough to show the image of $x$ in $M_2^{\oplus n}$ is in the image of $M_2^{\oplus m} \to M_2^{\oplus n}$. This is true by assumption. \medskip\noindent Condition (4) is just a translation of (3) into diagram form. \medskip\noindent Next we show (4) implies (5). Let $\varphi : P \to M_3$ be a map from a finitely presented $R$-module $P$. We must show that $\varphi$ lifts to a map $P \to M_2$. Choose a presentation of $P$, $$ R^n \xrightarrow{g_1} R^m \xrightarrow{g_2} P \to 0. $$ Using freeness of $R^n$ and $R^m$, we can construct $h_2: R^m \to M_2$ and then $h_1: R^n \to M_1$ such that the following diagram commutes $$ \xymatrix{ & R^n \ar[r]^{g_1} \ar[d]^{h_1} & R^m \ar[r]^{g_2} \ar[d]^{h_2} & P \ar[r] \ar[d]^{\varphi} & 0 \\ 0 \ar[r] & M_1 \ar[r]^{f_1} & M_2 \ar[r]^{f_2} & M_3 \ar[r] & 0 . } $$ By (4) there is a map $k_1: R^m \to M_1$ such that $k_1 \circ g_1 = h_1$. Now define $h'_2: R^m \to M_2$ by $h_2' = h_2 - f_1 \circ k_1$. Then $$ h'_2 \circ g_1 = h_2 \circ g_1 - f_1 \circ k_1 \circ g_1 = h_2 \circ g_1 - f_1 \circ h_1 = 0 . $$ Hence by passing to the quotient $h'_2$ defines a map $\varphi': P \to M_2$ such that $\varphi' \circ g_2 = h_2'$. In a diagram, we have $$ \xymatrix{ R^m \ar[r]^{g_2} \ar[d]_{h'_2} & P \ar[d]^{\varphi} \ar[dl]_{\varphi'} \\ M_2 \ar[r]^{f_2} & M_3. } $$ where the top triangle commutes. We claim that $\varphi'$ is the desired lift, i.e.\ that $f_2 \circ \varphi' = \varphi$. From the definitions we have $$ f_2 \circ \varphi' \circ g_2 = f_2 \circ h'_2 = f_2 \circ h_2 - f_2 \circ f_1 \circ k_1 = f_2 \circ h_2 = \varphi \circ g_2. $$ Since $g_2$ is surjective, this finishes the proof. \medskip\noindent Now we show (5) implies (6). Write $M_{3}$ as the colimit of a directed system of finitely presented modules $M_{3, i}$, see Lemma \ref{lemma-module-colimit-fp}. Let $M_{2, i}$ be the fiber product of $M_{3, i}$ and $M_{2}$ over $M_{3}$---by definition this is the submodule of $M_2 \times M_{3, i}$ consisting of elements whose two projections onto $M_3$ are equal. Let $M_{1, i}$ be the kernel of the projection $M_{2, i} \to M_{3, i}$. Then we have a directed system of exact sequences $$ 0 \to M_{1, i} \to M_{2, i} \to M_{3, i} \to 0, $$ and for each $i$ a map of exact sequences $$ \xymatrix{ 0 \ar[r] & M_{1, i} \ar[d] \ar[r] & M_{2, i} \ar[r] \ar[d] & M_{3, i} \ar[d] \ar[r] & 0 \\ 0 \ar[r] & M_{1} \ar[r] & M_{2} \ar[r] & M_{3} \ar[r] & 0 } $$ compatible with the directed system. From the definition of the fiber product $M_{2, i}$, it follows that the map $M_{1, i} \to M_1$ is an isomorphism. By (5) there is a map $M_{3, i} \to M_{2}$ lifting $M_{3, i} \to M_3$, and by the universal property of the fiber product this gives rise to a section of $M_{2, i} \to M_{3, i}$. Hence the sequences $$ 0 \to M_{1, i} \to M_{2, i} \to M_{3, i} \to 0 $$ split. Passing to the colimit, we have a commutative diagram $$ \xymatrix{ 0 \ar[r] & \colim M_{1, i} \ar[d]^{\cong} \ar[r] & \colim M_{2, i} \ar[r] \ar[d] & \colim M_{3, i} \ar[d]^{\cong} \ar[r] & 0 \\ 0 \ar[r] & M_{1} \ar[r] & M_{2} \ar[r] & M_{3} \ar[r] & 0 } $$ with exact rows and outer vertical maps isomorphisms. Hence $\colim M_{2, i} \to M_2$ is also an isomorphism and (6) holds. \medskip\noindent Condition (6) implies (1) by Example \ref{example-universally-exact} (2). \end{proof} \noindent The previous theorem shows that a universally exact sequence is always a colimit of split short exact sequences. If the cokernel of a universally injective map is finitely presented, then in fact the map itself splits: \begin{lemma} \label{lemma-universally-exact-split} Let $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ be an exact sequence of $R$-modules. Suppose $M_3$ is of finite presentation. Then $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ is universally exact if and only if it is split. \end{lemma} \begin{proof} A split short exact sequence is always universally exact, see Example \ref{example-universally-exact}. Conversely, if the sequence is universally exact, then by Theorem \ref{theorem-universally-exact-criteria} (5) applied to $P = M_3$, the map $M_2 \to M_3$ admits a section. \end{proof} \noindent The following lemma shows how universally injective maps are complementary to flat modules. \begin{lemma} \label{lemma-flat-universally-injective} Let $M$ be an $R$-module. Then $M$ is flat if and only if any exact sequence of $R$-modules $$ 0 \to M_1 \to M_2 \to M \to 0 $$ is universally exact. \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-flat-surjective-hom} and Theorem \ref{theorem-universally-exact-criteria} (5). \end{proof} \begin{example} \label{example-universally-exact-non-split-non-flat} Non-split and non-flat universally exact sequences. \begin{enumerate} \item In spite of Lemma \ref{lemma-universally-exact-split}, it is possible to have a short exact sequence of $R$-modules $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ that is universally exact but non-split. For instance, take $R = \mathbf{Z}$, let $M_1 = \bigoplus_{n=1}^{\infty} \mathbf{Z}$, let $M_{2} = \prod_{n = 1}^{\infty} \mathbf{Z}$, and let $M_{3}$ be the cokernel of the inclusion $M_1 \to M_2$. Then $M_1, M_2, M_3$ are all flat since they are torsion-free (More on Algebra, Lemma \ref{more-algebra-lemma-dedekind-torsion-free-flat}), so by Lemma \ref{lemma-flat-universally-injective}, $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ is universally exact. However there can be no section $s: M_3 \to M_2$. In fact, if $x$ is the image of $(2, 2^2, 2^3, \ldots) \in M_2$ in $M_3$, then any module map $s: M_3 \to M_2$ must kill $x$. This is because $x \in 2^n M_3$ for any $n \geq 1$, hence $s(x)$ is divisible by $2^n$ for all $n \geq 1$ and so must be $0$. \item In spite of Lemma \ref{lemma-flat-universally-injective}, it is possible to have a short exact sequence of $R$-modules $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ that is universally exact but with $M_1, M_2, M_3$ all non-flat. In fact if $M$ is any non-flat module, just take the split exact sequence $$ 0 \to M \to M \oplus M \to M \to 0. $$ For instance over $R = \mathbf{Z}$, take $M$ to be any nonzero torsion module. \item Taking the direct sum of an exact sequence as in (1) with one as in (2), we get a short exact sequence of $R$-modules $$ 0 \to M_1 \to M_2 \to M_3 \to 0 $$ that is universally exact, non-split, and such that $M_1, M_2, M_3$ are all non-flat. \end{enumerate} \end{example} \begin{lemma} \label{lemma-ui-flat-domain} Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a universally exact sequence of $R$-modules, and suppose $M_2$ is flat. Then $M_1$ and $M_3$ are flat. \end{lemma} \begin{proof} Let $0 \to N \to N' \to N'' \to 0$ be a short exact sequence of $R$-modules. Consider the commutative diagram $$ \xymatrix{ M_1 \otimes_R N \ar[r] \ar[d] & M_2 \otimes_R N \ar[r] \ar[d] & M_3 \otimes_R N \ar[d] \\ M_1 \otimes_R N' \ar[r] \ar[d] & M_2 \otimes_R N' \ar[r] \ar[d] & M_3 \otimes_R N' \ar[d] \\ M_1 \otimes_R N'' \ar[r] & M_2 \otimes_R N'' \ar[r] & M_3 \otimes_R N'' } $$ (we have dropped the $0$'s on the boundary). By assumption the rows give short exact sequences and the arrow $M_2 \otimes N \to M_2 \otimes N'$ is injective. Clearly this implies that $M_1 \otimes N \to M_1 \otimes N'$ is injective and we see that $M_1$ is flat. In particular the left and middle columns give rise to short exact sequences. It follows from a diagram chase that the arrow $M_3 \otimes N \to M_3 \otimes N'$ is injective. Hence $M_3$ is flat. \end{proof} \begin{lemma} \label{lemma-universally-injective-tensor} Let $R$ be a ring. Let $M \to M'$ be a universally injective $R$-module map. Then for any $R$-module $N$ the map $M \otimes_R N \to M' \otimes_R N$ is universally injective. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-composition-universally-injective} Let $R$ be a ring. A composition of universally injective $R$-module maps is universally injective. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-universally-injective-permanence} Let $R$ be a ring. Let $M \to M'$ and $M' \to M''$ be $R$-module maps. If their composition $M \to M''$ is universally injective, then $M \to M'$ is universally injective. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-universally-injective-check-stalks} Let $R \to S$ be a ring map. Let $M \to M'$ be a map of $S$-modules. The following are equivalent \begin{enumerate} \item $M \to M'$ is universally injective as a map of $R$-modules, \item for each prime $\mathfrak q$ of $S$ the map $M_{\mathfrak q} \to M'_{\mathfrak q}$ is universally injective as a map of $R$-modules, \item for each maximal ideal $\mathfrak m$ of $S$ the map $M_{\mathfrak m} \to M'_{\mathfrak m}$ is universally injective as a map of $R$-modules, \item for each prime $\mathfrak q$ of $S$ the map $M_{\mathfrak q} \to M'_{\mathfrak q}$ is universally injective as a map of $R_{\mathfrak p}$-modules, where $\mathfrak p$ is the inverse image of $\mathfrak q$ in $R$, and \item for each maximal ideal $\mathfrak m$ of $S$ the map $M_{\mathfrak m} \to M'_{\mathfrak m}$ is universally injective as a map of $R_{\mathfrak p}$-modules, where $\mathfrak p$ is the inverse image of $\mathfrak m$ in $R$. \end{enumerate} \end{lemma} \begin{proof} Let $N$ be an $R$-module. Let $\mathfrak q$ be a prime of $S$ lying over the prime $\mathfrak p$ of $R$. Then we have $$ (M \otimes_R N)_{\mathfrak q} = M_{\mathfrak q} \otimes_R N = M_{\mathfrak q} \otimes_{R_{\mathfrak p}} N_{\mathfrak p}. $$ Moreover, the same thing holds for $M'$ and localization is exact. Also, if $N$ is an $R_{\mathfrak p}$-module, then $N_{\mathfrak p} = N$. Using this the equivalences can be proved in a straightforward manner. \medskip\noindent For example, suppose that (5) holds. Let $K = \Ker(M \otimes_R N \to M' \otimes_R N)$. By the remarks above we see that $K_{\mathfrak m} = 0$ for each maximal ideal $\mathfrak m$ of $S$. Hence $K = 0$ by Lemma \ref{lemma-characterize-zero-local}. Thus (1) holds. Conversely, suppose that (1) holds. Take any $\mathfrak q \subset S$ lying over $\mathfrak p \subset R$. Take any module $N$ over $R_{\mathfrak p}$. Then by assumption $\Ker(M \otimes_R N \to M' \otimes_R N) = 0$. Hence by the formulae above and the fact that $N = N_{\mathfrak p}$ we see that $\Ker(M_{\mathfrak q} \otimes_{R_{\mathfrak p}} N \to M'_{\mathfrak q} \otimes_{R_{\mathfrak p}} N) = 0$. In other words (4) holds. Of course (4) $\Rightarrow$ (5) is immediate. Hence (1), (4) and (5) are all equivalent. We omit the proof of the other equivalences. \end{proof} \begin{lemma} \label{lemma-universally-injective-localize} Let $\varphi : A \to B$ be a ring map. Let $S \subset A$ and $S' \subset B$ be multiplicative subsets such that $\varphi(S) \subset S'$. Let $M \to M'$ be a map of $B$-modules. \begin{enumerate} \item If $M \to M'$ is universally injective as a map of $A$-modules, then $(S')^{-1}M \to (S')^{-1}M'$ is universally injective as a map of $A$-modules and as a map of $S^{-1}A$-modules. \item If $M$ and $M'$ are $(S')^{-1}B$-modules, then $M \to M'$ is universally injective as a map of $A$-modules if and only if it is universally injective as a map of $S^{-1}A$-modules. \end{enumerate} \end{lemma} \begin{proof} You can prove this using Lemma \ref{lemma-universally-injective-check-stalks} but you can also prove it directly as follows. Assume $M \to M'$ is $A$-universally injective. Let $Q$ be an $A$-module. Then $Q \otimes_A M \to Q \otimes_A M'$ is injective. Since localization is exact we see that $(S')^{-1}(Q \otimes_A M) \to (S')^{-1}(Q \otimes_A M')$ is injective. As $(S')^{-1}(Q \otimes_A M) = Q \otimes_A (S')^{-1}M$ and similarly for $M'$ we see that $Q \otimes_A (S')^{-1}M \to Q \otimes_A (S')^{-1}M'$ is injective, hence $(S')^{-1}M \to (S')^{-1}M'$ is universally injective as a map of $A$-modules. This proves the first part of (1). To see (2) we can use the following two facts: (a) if $Q$ is an $S^{-1}A$-module, then $Q \otimes_A S^{-1}A = Q$, i.e., tensoring with $Q$ over $A$ is the same thing as tensoring with $Q$ over $S^{-1}A$, (b) if $M$ is any $A$-module on which the elements of $S$ are invertible, then $M \otimes_A Q = M \otimes_{S^{-1}A} S^{-1}Q$. Part (2) follows from this immediately. \end{proof} \begin{lemma} \label{lemma-check-universally-injective-into-flat} Let $R$ be a ring and let $M \to M'$ be a map of $R$-modules. If $M'$ is flat, then $M \to M'$ is universally injective if and only if $M/IM \to M'/IM'$ is injective for every finitely generated ideal $I$ of $R$. \end{lemma} \begin{proof} It suffices to show that $M \otimes_R Q \to M' \otimes_R Q$ is injective for every finite $R$-module $Q$, see Theorem \ref{theorem-universally-exact-criteria}. Then $Q$ has a finite filtration $0 = Q_0 \subset Q_1 \subset \ldots \subset Q_n = Q$ by submodules whose subquotients are isomorphic to cyclic modules $R/I_i$, see Lemma \ref{lemma-trivial-filter-finite-module}. Since $M'$ is flat, we obtain a filtration $$ \xymatrix{ M \otimes Q_1 \ar[r] \ar[d] & M \otimes Q_2 \ar[r] \ar[d] & \ldots \ar[r] & M \otimes Q \ar[d] \\ M' \otimes Q_1 \ar@{^{(}->}[r] & M' \otimes Q_2 \ar@{^{(}->}[r] & \ldots \ar@{^{(}->}[r] & M' \otimes Q } $$ of $M' \otimes_R Q$ by submodules $M' \otimes_R Q_i$ whose successive quotients are $M' \otimes_R R/I_i = M'/I_iM'$. A simple induction argument shows that it suffices to check $M/I_i M \to M'/I_i M'$ is injective. Note that the collection of finitely generated ideals $I'_i \subset I_i$ is a directed set. Thus $M/I_iM = \colim M/I'_iM$ is a filtered colimit, similarly for $M'$, the maps $M/I'_iM \to M'/I'_i M'$ are injective by assumption, and since filtered colimits are exact (Lemma \ref{lemma-directed-colimit-exact}) we conclude. \end{proof} \begin{lemma} \label{lemma-base-change-along-universally-injective-ring-map} Let $R \to S$ be a ring map which is universally injective as a map of $R$-modules. Then the functor $M \mapsto M \otimes_R S$ on $R$-modules reflects injections, surjections, and isomorphisms. \end{lemma} \begin{proof} Let $M \to N$ be a map of $R$-modules with kernel $K$ and cokernel $Q$. If $M \otimes_R S \to N \otimes_R S$ is injective, then the image of $K \otimes_R S \to M \otimes_R S$ is zero. Since $K \subset K \otimes_R S$ and $M \subset M \otimes_R S$ we conclude that $K = 0$. On the other hand, if $M \otimes_R S \to N \otimes_R S$ is surjective, then $Q \otimes_R S$ is zero (by right exactness of tensor product). Hence $Q \subset Q \otimes_R S$ is zero too. \end{proof} \begin{lemma} \label{lemma-faithfully-flat-universally-injective} Let $R \to S$ be a faithfully flat ring map. Then $R \to S$ is universally injective as a map of $R$-modules. In particular $R \cap IS = I$ for any ideal $I \subset R$. \end{lemma} \begin{proof} Let $N$ be an $R$-module. We have to show that $N \to N \otimes_R S$ is injective. As $S$ is faithfully flat as an $R$-module, it suffices to prove this after tensoring with $S$. Hence it suffices to show that $N \otimes_R S \to N \otimes_R S \otimes_R S$, $n \otimes s \mapsto n \otimes 1 \otimes s$ is injective. This is true because there is a retraction, namely, $n \otimes s \otimes s' \mapsto n \otimes ss'$. \end{proof} \section{Descent for finite projective modules} \label{section-finite-projective} % BEGIN ALGEBRA EDITORIAL ROUTE section-finite-projective \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-finite-projective}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-finite-projective \noindent In this section we give an elementary proof of the fact that the property of being a {\it finite} projective module descends along faithfully flat ring maps. The proof does not apply when we drop the finiteness condition. However, the method is indicative of the one we shall use to prove descent for the property of being a {\it countably generated} projective module---see the comments at the end of this section. \begin{lemma} \label{lemma-finite-projective-again} Let $M$ be an $R$-module. Then $M$ is finite projective if and only if $M$ is finitely presented and flat. \end{lemma} \begin{proof} This is part of Lemma \ref{lemma-finite-projective}. However, at this point we can give a more elegant proof of the implication (1) $\Rightarrow$ (2) of that lemma as follows. If $M$ is finitely presented and flat, then take a surjection $R^n \to M$. By Lemma \ref{lemma-flat-surjective-hom} applied to $P = M$, the map $R^n \to M$ admits a section. So $M$ is a direct summand of a free module and hence projective. \end{proof} \noindent Here are some properties of modules that descend. \begin{lemma} \label{lemma-descend-properties-modules} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. Then \begin{enumerate} \item if the $S$-module $M \otimes_R S$ is of finite type, then $M$ is of finite type, \item if the $S$-module $M \otimes_R S$ is of finite presentation, then $M$ is of finite presentation, \item if the $S$-module $M \otimes_R S$ is flat, then $M$ is flat. \end{enumerate} \end{lemma} \begin{proof} Assume $M \otimes_R S$ is of finite type. Let $y_1, \ldots, y_m$ be generators of $M \otimes_R S$ over $S$. Write $y_j=\sum_{i=1}^n x_i\otimes f_{ij}$ using one common finite list $x_1,\ldots,x_n\in M$ and coefficients $f_{ij}\in S$. Then we see that the map $\varphi : R^{\oplus n} \to M$ has the property that $\varphi \otimes \text{id}_S : S^{\oplus n} \to M \otimes_R S$ is surjective. Since $R \to S$ is faithfully flat we see that $\varphi$ is surjective, and $M$ is finitely generated. \medskip\noindent Assume $M \otimes_R S$ is of finite presentation. By (1) we see that $M$ is of finite type. Choose a surjection $R^{\oplus n} \to M$ and denote $K$ the kernel. As $R \to S$ is flat we see that $K \otimes_R S$ is the kernel of the base change $S^{\oplus n} \to M \otimes_R S$. As $M \otimes_R S$ is of finite presentation we conclude that $K \otimes_R S$ is of finite type. Hence by (1) we see that $K$ is of finite type and hence $M$ is of finite presentation. \medskip\noindent Part (3) is Lemma \ref{lemma-flatness-descends}. \end{proof} \begin{proposition} \label{proposition-ffdescent-finite-projectivity} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. If the $S$-module $M \otimes_R S$ is finite projective, then $M$ is finite projective. \end{proposition} \begin{proof} Follows from Lemmas \ref{lemma-finite-projective-again} and \ref{lemma-descend-properties-modules}. \end{proof} \noindent The next few sections are about removing the finiteness assumption by using d\'evissage to reduce to the countably generated case. In the countably generated case, the strategy is to find a characterization of countably generated projective modules analogous to Lemma \ref{lemma-finite-projective-again}, and then to prove directly that this characterization descends. We do this by introducing the notion of a Mittag-Leffler module and proving that if a module $M$ is countably generated, then it is projective if and only if it is flat and Mittag-Leffler (Theorem \ref{theorem-projectivity-characterization}). When $M$ is finitely generated, this statement reduces to Lemma \ref{lemma-finite-projective-again} (since, according to Example \ref{example-ML} (1), a finitely generated module is Mittag-Leffler if and only if it is finitely presented). \section{Transfinite d\'evissage of modules} \label{section-transfinite-devissage} % BEGIN ALGEBRA EDITORIAL ROUTE section-transfinite-devissage \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-transfinite-devissage}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-transfinite-devissage \noindent In this section we introduce a d\'evissage technique for decomposing a module into a direct sum. The main result is that a projective module is a direct sum of countably generated modules (Theorem \ref{theorem-projective-direct-sum} below). We follow \cite{Kaplansky}. \begin{definition} \label{definition-devissage} Let $M$ be an $R$-module. A {\it direct sum d\'evissage} of $M$ is a family of submodules $(M_{\alpha})_{\alpha \in S}$, indexed by an ordinal $S$ and increasing (with respect to inclusion), such that: \begin{enumerate} \item[(0)] $M_0 = 0$; \item[(1)] $M = \bigcup_{\alpha} M_{\alpha}$; \item[(2)] if $\alpha \in S$ is a limit ordinal, then $M_{\alpha} = \bigcup_{\beta < \alpha} M_{\beta}$; \item[(3)] if $\alpha + 1 \in S$, then $M_{\alpha}$ is a direct summand of $M_{\alpha + 1}$. \end{enumerate} If moreover \begin{enumerate} \item[(4)] $M_{\alpha + 1}/M_{\alpha}$ is countably generated for $\alpha + 1 \in S$, \end{enumerate} then $(M_{\alpha})_{\alpha \in S}$ is called a {\it Kaplansky d\'evissage} of $M$. \end{definition} \noindent The terminology is justified by the following lemma. \begin{lemma} \label{lemma-direct-sum-devissage} Let $M$ be an $R$-module. If $(M_{\alpha})_{\alpha \in S}$ is a direct sum d\'evissage of $M$, then $M \cong \bigoplus_{\alpha + 1 \in S} M_{\alpha + 1}/M_{\alpha}$. \end{lemma} \begin{proof} By property (3) of a direct sum d\'evissage, there is an inclusion $M_{\alpha + 1}/M_{\alpha} \to M$ for each $\alpha+1\in S$. Consider the map $$ f : \bigoplus\nolimits_{\alpha + 1\in S} M_{\alpha + 1}/M_{\alpha} \to M $$ given by the sum of these inclusions. Further consider the restrictions $$ f_{\beta} : \bigoplus\nolimits_{\alpha + 1 \leq \beta} M_{\alpha + 1}/M_{\alpha} \longrightarrow M $$ for $\beta\in S$. Transfinite induction on $S$ shows that the image of $f_{\beta}$ is $M_{\beta}$. For $\beta=0$ this is true by $(0)$. If $\beta+1$ is a successor ordinal and it is true for $\beta$, then it is true for $\beta + 1$ by (3). And if $\beta$ is a limit ordinal and it is true for $\alpha < \beta$, then it is true for $\beta$ by (2). Hence $f$ is surjective by (1). \medskip\noindent Transfinite induction on $S$ also shows that the restrictions $f_{\beta}$ are injective. For $\beta = 0$ it is true. If $\beta+1$ is a successor ordinal and $f_{\beta}$ is injective, then let $x$ be in the kernel and write $x = (x_{\alpha + 1})_{\alpha + 1 \leq \beta + 1}$ in terms of its components $x_{\alpha + 1} \in M_{\alpha + 1}/M_{\alpha}$. By property (3) and the fact that the image of $f_{\beta}$ is $M_{\beta}$ both $(x_{\alpha + 1})_{\alpha + 1 \leq \beta}$ and $x_{\beta + 1}$ map to $0$. Hence $x_{\beta+1} = 0$ and, by the assumption that the restriction $f_{\beta}$ is injective also $x_{\alpha + 1} = 0$ for every $\alpha + 1 \leq \beta$. So $x = 0$ and $f_{\beta+1}$ is injective. If $\beta$ is a limit ordinal consider an element $x$ of the kernel. Then $x$ is already contained in the domain of $f_{\alpha}$ for some $\alpha < \beta$. Thus $x = 0$ which finishes the induction. We conclude that $f$ is injective since $f_{\beta}$ is for each $\beta \in S$. \end{proof} \begin{lemma} \label{lemma-Kaplansky-devissage} Let $M$ be an $R$-module. Then $M$ is a direct sum of countably generated $R$-modules if and only if it admits a Kaplansky d\'evissage. \end{lemma} \begin{proof} The lemma takes care of the ``if'' direction. Conversely, suppose $M = \bigoplus_{i \in I} N_i$ where each $N_i$ is a countably generated $R$-module. Well-order $I$ so that we can think of it as an ordinal. Set $S=I+1$ and $M_\alpha=\bigoplus_{j<\alpha}N_j$ for $\alpha\in S$. Then $(M_\alpha)_{\alpha\in S}$ is a Kaplansky d\'evissage of $M$. \end{proof} \begin{theorem} \label{theorem-kaplansky-direct-sum} Suppose $M$ is a direct sum of countably generated $R$-modules. If $P$ is a direct summand of $M$, then $P$ is also a direct sum of countably generated $R$-modules. \end{theorem} \begin{proof} Write $M = P \oplus Q$. We are going to construct a Kaplansky d\'evissage $(M_{\alpha})_{\alpha \in S}$ of $M$ which, in addition to the defining properties (0)-(4), satisfies: \begin{enumerate} \item[(5)] Each $M_{\alpha}$ is a direct summand of $M$; \item[(6)] $M_{\alpha} = P_{\alpha} \oplus Q_{\alpha}$, where $P_{\alpha} =P \cap M_{\alpha}$ and $Q_\alpha = Q \cap M_{\alpha}$. \end{enumerate} (Note: if properties (0)-(2) hold, then in fact property (3) is equivalent to property (5).) \medskip\noindent To see how this implies the theorem, it is enough to show that $(P_{\alpha})_{\alpha \in S}$ forms a Kaplansky d\'evissage of $P$. Properties (0), (1), and (2) are clear. By (5) and (6) for $(M_{\alpha})$, each $P_{\alpha}$ is a direct summand of $M$. Since $P_{\alpha} \subset P_{\alpha + 1}$, this implies $P_{\alpha}$ is a direct summand of $P_{\alpha + 1}$; hence (3) holds for $(P_{\alpha})$. For (4), note that $$ M_{\alpha + 1}/M_{\alpha} \cong P_{\alpha + 1}/P_{\alpha} \oplus Q_{\alpha + 1}/Q_{\alpha}, $$ so $P_{\alpha + 1}/P_{\alpha}$ is countably generated because this is true of $M_{\alpha + 1}/M_{\alpha}$. \medskip\noindent It remains to construct the $M_{\alpha}$. Write $M = \bigoplus_{i \in I} N_i$ where each $N_i$ is a countably generated $R$-module. Choose a well-ordering of $I$. By transfinite recursion we are going to define an increasing family of submodules $M_{\alpha}$ of $M$, one for each ordinal $\alpha$, such that $M_{\alpha}$ is a direct sum of some subset of the $N_i$. \medskip\noindent For $\alpha = 0$ let $M_{0} = 0$. If $\alpha$ is a limit ordinal and $M_{\beta}$ has been defined for all $\beta < \alpha$, then define $M_{\alpha} = \bigcup_{\beta < \alpha} M_{\beta}$. Since each $M_{\beta}$ for $\beta < \alpha$ is a direct sum of a subset of the $N_i$, the same will be true of $M_{\alpha}$. If $\alpha + 1$ is a successor ordinal and $M_{\alpha}$ has been defined, then define $M_{\alpha + 1}$ as follows. If $M_{\alpha} = M$, then let $M_{\alpha + 1} = M$. If not, choose the smallest $j \in I$ such that $N_j$ is not contained in $M_{\alpha}$. We will construct an infinite matrix $(x_{mn}), m, n = 1, 2, 3, \ldots$ such that: \begin{enumerate} \item $N_j$ is contained in the submodule of $M$ generated by the entries $x_{mn}$; \item if we write any entry $x_{k\ell}$ in terms of its $P$- and $Q$-components, $x_{k\ell} = y_{k\ell} + z_{k\ell}$, then the matrix $(x_{mn})$ contains a set of generators for each $N_i$ for which $y_{k\ell}$ or $z_{k\ell}$ has nonzero component. \end{enumerate} Then we define $M_{\alpha + 1}$ to be the submodule of $M$ generated by $M_{\alpha}$ and all $x_{mn}$; by property (2) of the matrix $(x_{mn})$, $M_{\alpha + 1}$ will be a direct sum of some subset of the $N_i$. To construct the matrix $(x_{mn})$, let $x_{11}, x_{12}, x_{13}, \ldots$ be a countable set of generators for $N_j$. Then if $x_{11} = y_{11} + z_{11}$ is the decomposition into $P$- and $Q$-components, let $x_{21}, x_{22}, x_{23}, \ldots$ be a countable set of generators for the sum of the $N_i$ for which $y_{11}$ or $z_{11}$ have nonzero component. Repeat this process on $x_{12}$ to get elements $x_{31}, x_{32}, \ldots$, the third row of our matrix. Repeat on $x_{21}$ to get the fourth row, on $x_{13}$ to get the fifth, and so on, going down along successive anti-diagonals as indicated below: $$ \left( \vcenter{ \xymatrix@R=2mm@C=2mm{ x_{11} & x_{12} \ar[dl] & x_{13} \ar[dl] & x_{14} \ar[dl] & \ldots \\ x_{21} & x_{22} \ar[dl] & x_{23} \ar[dl] & \ldots \\ x_{31} & x_{32} \ar[dl] & \ldots \\ x_{41} & \ldots \\ \ldots } } \right). $$ \medskip\noindent Transfinite induction on $I$ (using the fact that we constructed $M_{\alpha + 1}$ to contain $N_j$ for the smallest $j$ such that $N_j$ is not contained in $M_{\alpha}$) shows that for each $i \in I$, $N_i$ is contained in some $M_{\alpha}$. Thus, there is some large enough ordinal $S$ satisfying: for each $i \in I$ there is $\alpha \in S$ such that $N_i$ is contained in $M_{\alpha}$. This means $(M_{\alpha})_{\alpha \in S}$ satisfies property (1) of a Kaplansky d\'evissage of $M$. The family $(M_{\alpha})_{\alpha \in S}$ moreover satisfies the other defining properties, and also (5) and (6) above: properties (0), (2), (4), and (6) are clear by construction; property (5) is true because each $M_{\alpha}$ is by construction a direct sum of some $N_i$; and (3) is implied by (5) and the fact that $M_{\alpha} \subset M_{\alpha + 1}$. \end{proof} \noindent As a corollary we get the result for projective modules stated at the beginning of the section. \begin{theorem} \label{theorem-projective-direct-sum} \begin{slogan} Any projective module is a direct sum of countably generated projective modules. \end{slogan} If $P$ is a projective $R$-module, then $P$ is a direct sum of countably generated projective $R$-modules. \end{theorem} \begin{proof} A module is projective if and only if it is a direct summand of a free module, so this follows from Theorem \ref{theorem-kaplansky-direct-sum}. \end{proof} \section{Projective modules over a local ring} \label{section-projective-local-ring} \noindent In this section we prove a very cute result: a projective module $M$ over a local ring is free (Theorem \ref{theorem-projective-free-over-local-ring} below). Note that with the additional assumption that $M$ is finite, this result is Lemma \ref{lemma-finite-flat-local}. In general we have: \begin{lemma} \label{lemma-projective-free} Let $R$ be a ring. Then every projective $R$-module is free if and only if every countably generated projective $R$-module is free. \end{lemma} \begin{proof} Follows immediately from Theorem \ref{theorem-projective-direct-sum}. \end{proof} \noindent Here is a criterion for a countably generated module to be free. \begin{lemma} \label{lemma-freeness-criteria} Let $M$ be a countably generated $R$-module with the following property: if $M = N \oplus N'$ with $N'$ a finite free $R$-module, then any element of $N$ is contained in a free direct summand of $N$. Then $M$ is free. \end{lemma} \begin{proof} Let $x_1, x_2, \ldots$ be a countable set of generators for $M$. We inductively construct finite free direct summands $F_1, F_2, \ldots$ of $M$ such that for all $n$ we have that $F_1 \oplus \ldots \oplus F_n$ is a direct summand of $M$ which contains $x_1, \ldots, x_n$. Namely, given $F_1, \ldots, F_n$ with the desired properties, write $$ M = F_1 \oplus \ldots \oplus F_n \oplus N $$ and let $x \in N$ be the image of $x_{n + 1}$. Then we can find a free direct summand $F_{n + 1} \subset N$ containing $x$ by the assumption in the statement of the lemma. Of course we can replace $F_{n + 1}$ by a finite free direct summand of $F_{n + 1}$ and the induction step is complete. Then $M = \bigoplus_{i = 1}^{\infty} F_i$ is free. \end{proof} \begin{lemma} \label{lemma-projective-freeness-criteria} Let $P$ be a projective module over a local ring $R$. Then any element of $P$ is contained in a free direct summand of $P$. \end{lemma} \begin{proof} Since $P$ is projective it is a direct summand of some free $R$-module $F$, say $F = P \oplus Q$. Let $x \in P$ be the element that we wish to show is contained in a free direct summand of $P$. Let $B$ be a basis of $F$ such that the number of basis elements needed in the expression of $x$ is minimal, say $x = \sum_{i=1}^n a_i e_i$ for some $e_i \in B$ and $a_i \in R$. Then no $a_j$ can be expressed as a linear combination of the other $a_i$; for if $a_j = \sum_{i \neq j} a_i b_i$ for some $b_i \in R$, then replacing $e_i$ by $e_i + b_ie_j$ for $i \neq j$ and leaving unchanged the other elements of $B$, we get a new basis for $F$ in terms of which $x$ has a shorter expression. \medskip\noindent Let $e_i = y_i + z_i, y_i \in P, z_i \in Q$ be the decomposition of $e_i$ into its $P$- and $Q$-components. Write $y_i = \sum_{j=1}^{n} b_{ij} e_j + t_i$, where $t_i$ is a linear combination of elements in $B$ other than $e_1, \ldots, e_n$. To finish the proof it suffices to show that the matrix $(b_{ij})$ is invertible. For then the map $F \to F$ sending $e_i \mapsto y_i$ for $i=1, \ldots, n$ and fixing $B \setminus \{e_1, \ldots, e_n\}$ is an isomorphism, so that $y_1, \ldots, y_n$ together with $B \setminus \{e_1, \ldots, e_n\}$ form a basis for $F$. Then the submodule $N$ spanned by $y_1, \ldots, y_n$ is a free submodule of $P$; $N$ is a direct summand of $P$ since $N \subset P$ and both $N$ and $P$ are direct summands of $F$; and $x \in N$ since $x \in P$ implies $x = \sum_{i=1}^n a_i e_i = \sum_{i=1}^n a_i y_i$. \medskip\noindent Now we prove that $(b_{ij})$ is invertible. Plugging $y_i = \sum_{j=1}^{n} b_{ij} e_j + t_i$ into $\sum_{i=1}^n a_i e_i = \sum_{i=1}^n a_i y_i$ and equating the coefficients of $e_j$ gives $a_j = \sum_{i=1}^n a_i b_{ij}$. But as noted above, our choice of $B$ guarantees that no $a_j$ can be written as a linear combination of the other $a_i$. Thus $b_{ij}$ is a non-unit for $i \neq j$, and $1-b_{ii}$ is a non-unit---so in particular $b_{ii}$ is a unit---for all $i$. But a matrix over a local ring having units along the diagonal and non-units elsewhere is invertible, as its determinant is a unit. \end{proof} \begin{theorem} \label{theorem-projective-free-over-local-ring} \begin{slogan} Projective modules over local rings are free. \end{slogan} If $P$ is a projective module over a local ring $R$, then $P$ is free. \end{theorem} \begin{proof} Follows from Lemmas \ref{lemma-projective-free}, \ref{lemma-freeness-criteria}, and \ref{lemma-projective-freeness-criteria}. \end{proof} \section{Mittag-Leffler systems} \label{section-mittag-leffler} % BEGIN ALGEBRA EDITORIAL ROUTE section-mittag-leffler \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-mittag-leffler}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-mittag-leffler \noindent The purpose of this section is to define Mittag-Leffler systems and why this is a useful notion. \medskip\noindent In the following, $I$ will be a directed set, see Categories, Definition \ref{categories-definition-directed-set}. Let $(A_i, \varphi_{ji}: A_j \to A_i)$ be an inverse system of sets or of modules indexed by $I$, see Categories, Definition \ref{categories-definition-directed-system}. This is a directed inverse system as we assumed $I$ directed (Categories, Definition \ref{categories-definition-directed-system}). For each $i \in I$, the images $\varphi_{ji}(A_j) \subset A_i$ for $j \geq i$ form a decreasing directed family of subsets (or submodules) of $A_i$. Let $A'_i = \bigcap_{j \geq i} \varphi_{ji}(A_j)$. Then $\varphi_{ji}(A'_j) \subset A'_i$ for $j \geq i$, hence by restricting we get a directed inverse system $(A'_i, \varphi_{ji}|_{A'_j})$. From the construction of the limit of an inverse system in the category of sets or modules, we have $\lim A_i = \lim A'_i$. The Mittag-Leffler condition on $(A_i, \varphi_{ji})$ is that $A'_i$ equals $\varphi_{ji}(A_j)$ for some $j \geq i$ (and hence equals $\varphi_{ki}(A_k)$ for all $k \geq j$): \begin{definition} \label{definition-ML-system} Let $(A_i, \varphi_{ji})$ be a directed inverse system of sets over $I$. Then we say $(A_i, \varphi_{ji})$ is {\it Mittag-Leffler} if for each $i \in I$, the family $\varphi_{ji}(A_j) \subset A_i$ for $j \geq i$ stabilizes. Explicitly, this means that for each $i \in I$, there exists $j \geq i$ such that for $k \geq j$ we have $\varphi_{ki}(A_k) = \varphi_{ji}( A_j)$. If $(A_i, \varphi_{ji})$ is a directed inverse system of modules over a ring $R$, we say that it is Mittag-Leffler if the underlying inverse system of sets is Mittag-Leffler. \end{definition} \begin{example} \label{example-ML-surjective-maps} If $(A_i, \varphi_{ji})$ is a directed inverse system of sets or of modules and the maps $\varphi_{ji}$ are surjective, then clearly the system is Mittag-Leffler. Conversely, suppose $(A_i, \varphi_{ji})$ is Mittag-Leffler. Let $A'_i \subset A_i$ be the stable image of $\varphi_{ji}(A_j)$ for $j \geq i$. Then $\varphi_{ji}|_{A'_j}: A'_j \to A'_i$ is surjective for $j \geq i$ and $\lim A_i = \lim A'_i$. Hence the limit of the Mittag-Leffler system $(A_i, \varphi_{ji})$ can also be written as the limit of a directed inverse system over $I$ with surjective maps. \end{example} \begin{lemma} \label{lemma-ML-limit-nonempty} Let $(A_i, \varphi_{ji})$ be a directed inverse system over $I$. Suppose $I$ is countable. If $(A_i, \varphi_{ji})$ is Mittag-Leffler and the $A_i$ are nonempty, then $\lim A_i$ is nonempty. \end{lemma} \begin{proof} Let $i_1, i_2, i_3, \ldots$ be an enumeration of the elements of $I$. Define inductively a sequence of elements $j_n \in I$ for $n = 1, 2, 3, \ldots$ by the conditions: $j_1 = i_1$, and $j_n \geq i_n$ and $j_n \geq j_m$ for $m < n$. Then the sequence $j_n$ is increasing and forms a cofinal subset of $I$. Hence we may assume $I =\{1, 2, 3, \ldots \}$. So by Example \ref{example-ML-surjective-maps} we are reduced to showing that the limit of an inverse system of nonempty sets with surjective maps indexed by the positive integers is nonempty. This follows from the axiom of choice. \end{proof} \noindent The Mittag-Leffler condition will be important for us because of the following exactness property. \begin{lemma} \label{lemma-ML-exact-sequence} Let $$ 0 \to A_i \xrightarrow{f_i} B_i \xrightarrow{g_i} C_i \to 0 $$ be an exact sequence of directed inverse systems of abelian groups over $I$. Suppose $I$ is countable. If $(A_i)$ is Mittag-Leffler, then $$ 0 \to \lim A_i \to \lim B_i \to \lim C_i\to 0 $$ is exact. \end{lemma} \begin{proof} Taking limits of directed inverse systems is left exact, hence we only need to prove surjectivity of $\lim B_i \to \lim C_i$. So let $(c_i) \in \lim C_i$. For each $i \in I$, let $E_i = g_i^{-1}(c_i)$, which is nonempty since $g_i: B_i \to C_i$ is surjective. The system of maps $\varphi_{ji}: B_j \to B_i$ for $(B_i)$ restrict to maps $E_j \to E_i$ which make $(E_i)$ into an inverse system of nonempty sets. It is enough to show that $(E_i)$ is Mittag-Leffler. For then Lemma \ref{lemma-ML-limit-nonempty} would show $\lim E_i$ is nonempty, and taking any element of $\lim E_i$ would give an element of $\lim B_i$ mapping to $(c_i)$. \medskip\noindent By the injection $f_i: A_i \to B_i$ we will regard $A_i$ as a subset of $B_i$. Since $(A_i)$ is Mittag-Leffler, if $i \in I$ then there exists $j \geq i$ such that $\varphi_{ki}(A_k) = \varphi_{ji}(A_j)$ for $k \geq j$. We claim that also $\varphi_{ki}(E_k) = \varphi_{ji}(E_j)$ for $k \geq j$. Always $\varphi_{ki}(E_k) \subset \varphi_{ji}(E_j)$ for $k \geq j$. For the reverse inclusion let $e_j \in E_j$, and we need to find $x_k \in E_k$ such that $\varphi_{ki}(x_k) = \varphi_{ji}(e_j)$. Let $e'_k \in E_k$ be any element, and set $e'_j = \varphi_{kj}(e'_k)$. Then $g_j(e_j - e'_j) = c_j - c_j = 0$, hence $e_j - e'_j = a_j \in A_j$. Since $\varphi_{ki}(A_k) = \varphi_{ji}(A_j)$, there exists $a_k \in A_k$ such that $\varphi_{ki}(a_k) = \varphi_{ji}(a_j)$. Hence $$ \varphi_{ki}(e'_k + a_k) = \varphi_{ji}(e'_j) + \varphi_{ji}(a_j) = \varphi_{ji}(e_j), $$ so we can take $x_k = e'_k + a_k$. \end{proof} \section{Inverse systems} \label{section-inverse-systems} % BEGIN ALGEBRA EDITORIAL ROUTE section-inverse-systems \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-inverse-systems}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-inverse-systems \noindent In many papers (and in this section) the term {\it inverse system} is used to indicate an inverse system over the partially ordered set $(\mathbf{N}, \geq)$. We briefly discuss such systems in this section. This material will be discussed more broadly in Homology, Section \ref{homology-section-inverse-systems}. Suppose we are given a ring $R$ and a sequence of $R$-modules $$ M_1 \xleftarrow{\varphi_2} M_2 \xleftarrow{\varphi_3} M_3 \leftarrow \ldots $$ with maps as indicated. By composing successive maps we obtain maps $\varphi_{ii'} : M_i \to M_{i'}$ whenever $i \geq i'$ such that moreover $\varphi_{ii''} = \varphi_{i'i''} \circ \varphi_{i i'}$ whenever $i \geq i' \geq i''$. Conversely, given the system of maps $\varphi_{ii'}$ we can set $\varphi_i = \varphi_{i(i-1)}$ and recover the maps displayed above. In this case $$ \lim M_i = \{(x_i) \in \prod M_i \mid \varphi_i(x_i) = x_{i - 1}, \ i = 2, 3, \ldots\} $$ compare with Categories, Section \ref{categories-section-limit-sets}. As explained in Homology, Section \ref{homology-section-inverse-systems} this is actually a limit in the category of $R$-modules, as defined in Categories, Section \ref{categories-section-limits}. \begin{lemma} \label{lemma-Mittag-Leffler} Let $R$ be a ring. Let $0 \to K_i \to L_i \to M_i \to 0$ be short exact sequences of $R$-modules, $i \geq 1$ which fit into maps of short exact sequences $$ \xymatrix{ 0 \ar[r] & K_i \ar[r] & L_i \ar[r] & M_i \ar[r] & 0 \\ 0 \ar[r] & K_{i + 1} \ar[r] \ar[u] & L_{i + 1} \ar[r] \ar[u] & M_{i + 1} \ar[r] \ar[u] & 0} $$ If for every $i$ there exists a $c = c(i) \geq i$ such that $\Im(K_c \to K_i) = \Im(K_j \to K_i)$ for all $j \geq c$, then the sequence $$ 0 \to \lim K_i \to \lim L_i \to \lim M_i \to 0 $$ is exact. \end{lemma} \begin{proof} This is a special case of the more general Lemma \ref{lemma-ML-exact-sequence}. \end{proof} \section{Mittag-Leffler modules} \label{section-mittag-leffler-modules} % BEGIN ALGEBRA EDITORIAL ROUTE section-mittag-leffler-modules \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-mittag-leffler-modules}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-mittag-leffler-modules \noindent A Mittag-Leffler module is (very roughly) a module which can be written as a directed limit whose dual is a Mittag-Leffler system. To be able to give a precise definition we need to do a bit of work. \begin{definition} \label{definition-ML-inductive-system} Let $(M_i, f_{ij})$ be a directed system of $R$-modules. We say that $(M_i, f_{ij})$ is a {\it Mittag-Leffler directed system of modules} if each $M_i$ is an $R$-module of finite presentation and if for every $R$-module $N$, the inverse system $$ (\Hom_R(M_i, N), \Hom_R(f_{ij}, N)) $$ is Mittag-Leffler. \end{definition} \noindent We are going to characterize those $R$-modules that are colimits of Mittag-Leffler directed systems of modules. \begin{definition} \label{definition-domination} Let $f: M \to N$ and $g: M \to M'$ be maps of $R$-modules. Then we say $g$ {\it dominates} $f$ if for any $R$-module $Q$, we have $\Ker(f \otimes_R \text{id}_Q) \subset \Ker(g \otimes_R \text{id}_Q)$. \end{definition} \noindent It is enough to check this condition for finitely presented modules. \begin{lemma} \label{lemma-domination-fp} Let $f: M \to N$ and $g: M \to M'$ be maps of $R$-modules. Then $g$ dominates $f$ if and only if for any finitely presented $R$-module $Q$, we have $\Ker(f \otimes_R \text{id}_Q) \subset \Ker(g \otimes_R \text{id}_Q)$. \end{lemma} \begin{proof} Suppose $\Ker(f \otimes_R \text{id}_Q) \subset \Ker(g \otimes_R \text{id}_Q)$ for all finitely presented modules $Q$. If $Q$ is an arbitrary module, write $Q = \colim_{i \in I} Q_i$ as a colimit of a directed system of finitely presented modules $Q_i$. Then $\Ker(f \otimes_R \text{id}_{Q_i}) \subset \Ker(g \otimes_R \text{id}_{Q_i})$ for all $i$. Since taking directed colimits is exact and commutes with tensor product, it follows that $\Ker(f \otimes_R \text{id}_Q) \subset \Ker(g \otimes_R \text{id}_Q)$. \end{proof} \begin{lemma} \label{lemma-domination-universally-injective} Let $f : M \to N$ and $g : M \to M'$ be maps of $R$-modules. Consider the pushout of $f$ and $g$, $$ \xymatrix{ M \ar[r]_f \ar[d]_g & N \ar[d]^{g'} \\ M' \ar[r]^{f'} & N' } $$ Then $g$ dominates $f$ if and only if $f'$ is universally injective. \end{lemma} \begin{proof} Recall that $N'$ is $M' \oplus N$ modulo the submodule consisting of elements $(g(x), -f(x))$ for $x \in M$. From the construction of $N'$ we have a short exact sequence $$ 0 \to \Ker(f) \cap \Ker(g) \to \Ker(f) \to \Ker(f') \to 0. $$ Since tensoring commutes with taking pushouts, we have such a short exact sequence $$ 0 \to \Ker(f \otimes \text{id}_Q ) \cap \Ker(g \otimes \text{id}_Q) \to \Ker(f \otimes \text{id}_Q) \to \Ker(f' \otimes \text{id}_Q) \to 0 $$ for every $R$-module $Q$. So $f'$ is universally injective if and only if $\Ker(f \otimes \text{id}_Q ) \subset \Ker(g \otimes \text{id}_Q)$ for every $Q$, if and only if $g$ dominates $f$. \end{proof} \noindent The above definition of domination is sometimes related to the usual notion of domination of maps as the following lemma shows. \begin{lemma} \label{lemma-domination} Let $f: M \to N$ and $g: M \to M'$ be maps of $R$-modules. Suppose $\Coker(f)$ is of finite presentation. Then $g$ dominates $f$ if and only if $g$ factors through $f$, i.e.\ there exists a module map $h: N \to M'$ such that $g = h \circ f$. \end{lemma} \begin{proof} Consider the pushout of $f$ and $g$ as in the statement of Lemma \ref{lemma-domination-universally-injective}. From the construction of the pushout it follows that $\Coker(f') = \Coker(f)$, so $\Coker(f')$ is of finite presentation. Then by Lemma \ref{lemma-universally-exact-split}, $f'$ is universally injective if and only if $$ 0 \to M' \xrightarrow{f'} N' \to \Coker(f') \to 0 $$ splits. This is the case if and only if there is a map $h' : N' \to M'$ such that $h' \circ f' = \text{id}_{M'}$. From the universal property of the pushout, the existence of such an $h'$ is equivalent to $g$ factoring through $f$. \end{proof} \begin{proposition} \label{proposition-ML-characterization} Let $M$ be an $R$-module. Let $(M_i, f_{ij})$ be a directed system of finitely presented $R$-modules, indexed by $I$, such that $M = \colim M_i$. Let $f_i: M_i \to M$ be the canonical map. The following are equivalent: \begin{enumerate} \item For every finitely presented $R$-module $P$ and module map $f: P \to M$, there exists a finitely presented $R$-module $Q$ and a module map $g: P \to Q$ such that $g$ and $f$ dominate each other, i.e., $\Ker(f \otimes_R \text{id}_N) = \Ker(g \otimes_R \text{id}_N)$ for every $R$-module $N$. \item For each $i \in I$, there exists $j \geq i$ such that $f_{ij}: M_i \to M_j$ dominates $f_i: M_i \to M$. \item For each $i \in I$, there exists $j \geq i$ such that $f_{ij}: M_i \to M_j$ factors through $f_{ik}: M_i \to M_k$ for all $k \geq i$. \item For every $R$-module $N$, the inverse system $(\Hom_R(M_i, N), \Hom_R(f_{ij}, N))$ is Mittag-Leffler. \item For $N = \prod_{s \in I} M_s$, the inverse system $(\Hom_R(M_i, N), \Hom_R(f_{ij}, N))$ is Mittag-Leffler. \end{enumerate} \end{proposition} \begin{proof} First we prove the equivalence of (1) and (2). Suppose (1) holds and let $i \in I$. Corresponding to the map $f_i: M_i \to M$, we can choose $g: M_i \to Q$ as in (1). Since $M_i$ and $Q$ are of finite presentation, so is $\Coker(g)$. Then by Lemma \ref{lemma-domination}, $f_i : M_i \to M$ factors through $g: M_i \to Q$, say $f_i = h \circ g$ for some $h: Q \to M$. Then since $Q$ is finitely presented, $h$ factors through $M_j \to M$ for some $j \geq i$, say $h = f_j \circ h'$ for some $h': Q \to M_j$. Since $M_i$ is finitely generated, after increasing $j$ and composing $h'$ with the transition map we have $f_{ij}=h'\circ g$. Thus we have a commutative diagram $$ \xymatrix{ & M & \\ M_i \ar[dr]_g \ar[ur]^{f_i} \ar[rr]^{f_{ij}} & & M_j \ar[ul]_{f_j} \\ & Q \ar[ur]_{h'} & } $$ Thus $f_{ij}$ dominates $g$. But $g$ dominates $f_i$, so $f_{ij}$ dominates $f_i$. \medskip\noindent Conversely, suppose (2) holds. Let $P$ be of finite presentation and $f: P \to M$ a module map. Then $f$ factors through $f_i: M_i \to M$ for some $i \in I$, say $f = f_i \circ g'$ for some $g': P \to M_i$. Choose by (2) a $j \geq i$ such that $f_{ij}$ dominates $f_i$. We have a commutative diagram $$ \xymatrix{ P \ar[d]_{g'} \ar[r]^{f} & M \\ M_i \ar[ur]^{f_i} \ar[r]_{f_{ij}} & M_j \ar[u]_{f_j} } $$ From the diagram and the fact that $f_{ij}$ dominates $f_i$, we find that $f$ and $f_{ij} \circ g'$ dominate each other. Hence taking $g = f_{ij} \circ g' : P \to M_j$ works. \medskip\noindent Next we prove (2) is equivalent to (3). Let $i \in I$. It is always true that $f_i$ dominates $f_{ik}$ for $k \geq i$, since $f_i$ factors through $f_{ik}$. If (2) holds, choose $j \geq i$ such that $f_{ij}$ dominates $f_i$. Then since domination is a transitive relation, $f_{ij}$ dominates $f_{ik}$ for $k \geq i$. All $M_i$ are of finite presentation, so $\Coker(f_{ik})$ is of finite presentation for $k \geq i$. By Lemma \ref{lemma-domination}, $f_{ij}$ factors through $f_{ik}$ for all $k \geq i$. Thus (2) implies (3). On the other hand, if (3) holds then for any $R$-module $N$, $f_{ij} \otimes_R \text{id}_N$ factors through $f_{ik} \otimes_R \text{id}_N$ for $k \geq i$. So $\Ker(f_{ik} \otimes_R \text{id}_N) \subset \Ker(f_{ij} \otimes_R \text{id}_N)$ for $k \geq i$. But $\Ker(f_i \otimes_R \text{id}_N: M_i \otimes_R N \to M \otimes_R N)$ is the union of $\Ker(f_{ik} \otimes_R \text{id}_N)$ for $k \geq i$. Thus $\Ker(f_i \otimes_R \text{id}_N) \subset \Ker(f_{ij} \otimes_R \text{id}_N)$ for any $R$-module $N$, which by definition means $f_{ij}$ dominates $f_i$. \medskip\noindent It is trivial that (3) implies (4) implies (5). We show (5) implies (3). Let $N = \prod_{s \in I} M_s$. If (5) holds, then given $i \in I$ choose $j \geq i$ such that $$ \Im( \Hom(M_j, N) \to \Hom(M_i, N)) = \Im( \Hom(M_k, N) \to \Hom(M_i, N)) $$ for all $k \geq j$. Passing the product over $s \in I$ outside of the $\Hom$'s and looking at the maps on each component of the product, this says $$ \Im( \Hom(M_j, M_s) \to \Hom(M_i, M_s)) = \Im( \Hom(M_k, M_s) \to \Hom(M_i, M_s)) $$ for all $k \geq j$ and $s \in I$. Taking $s = j$ we have $$ \Im( \Hom(M_j, M_j) \to \Hom(M_i, M_j)) = \Im( \Hom(M_k, M_j) \to \Hom(M_i, M_j)) $$ for all $k \geq j$. Since $f_{ij}$ is the image of $\text{id} \in \Hom(M_j, M_j)$ under $\Hom(M_j, M_j) \to \Hom(M_i, M_j)$, this shows that for any $k \geq j$ there is $h \in \Hom(M_k, M_j)$ such that $f_{ij} = h \circ f_{ik}$. For any $k\geq i$, choose $\ell\geq j,k$ and $a:M_\ell\to M_j$ with $f_{ij}=a\circ f_{i\ell}$. Then $h=a\circ f_{k\ell}$ satisfies $f_{ij}=h\circ f_{ik}$. Hence (3) holds. \end{proof} \begin{definition} \label{definition-mittag-leffler-module} Let $M$ be an $R$-module. We say that $M$ is {\it Mittag-Leffler} if the equivalent conditions of Proposition \ref{proposition-ML-characterization} hold. \end{definition} \noindent In particular a finitely presented module is Mittag-Leffler. \begin{remark} \label{remark-flat-ML} Let $M$ be a flat $R$-module. By Lazard's theorem (Theorem \ref{theorem-lazard}) we can write $M = \colim M_i$ as the colimit of a directed system $(M_i, f_{ij})$ where the $M_i$ are free finite $R$-modules. For $M$ to be Mittag-Leffler, it is enough for the inverse system of duals $(\Hom_R(M_i, R), \Hom_R(f_{ij}, R))$ to be Mittag-Leffler. This follows from criterion (4) of Proposition \ref{proposition-ML-characterization} and the fact that for a free finite $R$-module $F$, there is a functorial isomorphism $\Hom_R(F, R) \otimes_R N \cong \Hom_R(F, N)$ for any $R$-module $N$. \end{remark} \begin{lemma} \label{lemma-tensor-ML-modules} If $R$ is a ring and $M$, $N$ are Mittag-Leffler modules over $R$, then $M \otimes_R N$ is a Mittag-Leffler module. \end{lemma} \begin{proof} Write $M = \colim_{i \in I} M_i$ and $N = \colim_{j \in J} N_j$ as directed colimits of finitely presented $R$-modules. Denote $f_{ii'} : M_i \to M_{i'}$ and $g_{jj'} : N_j \to N_{j'}$ the transition maps. Then $M_i \otimes_R N_j$ is a finitely presented $R$-module (see Lemma \ref{lemma-tensor-finiteness}), and $M \otimes_R N = \colim_{(i, j) \in I \times J} M_i \otimes_R N_j$. Pick $(i, j) \in I \times J$. By the definition of a Mittag-Leffler module we have Proposition \ref{proposition-ML-characterization} (3) for both systems. In other words there exist $i' \geq i$ and $j' \geq j$ such that for every choice of $i'' \geq i$ and $j'' \geq j$ there exist maps $a : M_{i''} \to M_{i'}$ and $b : N_{j''} \to N_{j'}$ such that $f_{ii'} = a \circ f_{ii''}$ and $g_{jj'} = b \circ g_{jj''}$. Then it is clear that $a \otimes b : M_{i''} \otimes_R N_{j''} \to M_{i'} \otimes_R N_{j'}$ serves the same purpose for the system $(M_i \otimes_R N_j, f_{ii'} \otimes g_{jj'})$. Thus by the characterization Proposition \ref{proposition-ML-characterization} (3) we conclude that $M \otimes_R N$ is Mittag-Leffler. \end{proof} \begin{lemma} \label{lemma-ML-also} Let $R$ be a ring and $M$ an $R$-module. Then $M$ is Mittag-Leffler if and only if for every finite free $R$-module $F$ and module map $f: F \to M$, there exists a finitely presented $R$-module $Q$ and a module map $g : F \to Q$ such that $g$ and $f$ dominate each other, i.e., $\Ker(f \otimes_R \text{id}_N) = \Ker(g \otimes_R \text{id}_N)$ for every $R$-module $N$. \end{lemma} \begin{proof} Since the condition is clearly weaker than condition (1) of Proposition \ref{proposition-ML-characterization} we see that a Mittag-Leffler module satisfies the condition. Conversely, suppose that $M$ satisfies the condition and that $f : P \to M$ is an $R$-module map from a finitely presented $R$-module $P$ into $M$. Choose a surjection $F \to P$ where $F$ is a finite free $R$-module. By assumption we can find a map $F \to Q$ where $Q$ is a finitely presented $R$-module such that $F \to Q$ and $F \to M$ dominate each other. In particular, the kernel of $F \to Q$ contains the kernel of $F \to P$, hence we obtain an $R$-module map $g : P \to Q$ such that $F \to Q$ is equal to the composition $F \to P \to Q$. Let $N$ be any $R$-module and consider the commutative diagram $$ \xymatrix{ F \otimes_R N \ar[d] \ar[r] & Q \otimes_R N \\ P \otimes_R N \ar[ru] \ar[r] & M \otimes_R N } $$ By assumption the kernels of $F \otimes_R N \to Q \otimes_R N$ and $F \otimes_R N \to M \otimes_R N$ are equal. Hence, as $F \otimes_R N \to P \otimes_R N$ is surjective, also the kernels of $P \otimes_R N \to Q \otimes_R N$ and $P \otimes_R N \to M \otimes_R N$ are equal. \end{proof} \begin{lemma} \label{lemma-restrict-ML-modules} Let $R \to S$ be a finite and finitely presented ring map. Let $M$ be an $S$-module. If $M$ is a Mittag-Leffler module over $S$ then $M$ is a Mittag-Leffler module over $R$. \end{lemma} \begin{proof} Assume $M$ is a Mittag-Leffler module over $S$. Write $M = \colim M_i$ as a directed colimit of finitely presented $S$-modules $M_i$. As $M$ is Mittag-Leffler over $S$ there exists for each $i$ an index $j \geq i$ such that for all $k \geq j$ there is a factorization $f_{ij} = h \circ f_{ik}$ (where $h$ depends on $i$, the choice of $j$ and $k$). Note that by Lemma \ref{lemma-finite-finitely-presented-extension} the modules $M_i$ are also finitely presented as $R$-modules. Moreover, all the maps $f_{ij}, f_{ik}, h$ are maps of $R$-modules. Thus we see that the system $(M_i, f_{ij})$ satisfies the same condition when viewed as a system of $R$-modules. Thus $M$ is Mittag-Leffler as an $R$-module. \end{proof} \begin{lemma} \label{lemma-mod-ideal-ML-modules} Let $R$ be a ring. Let $S = R/I$ for some finitely generated ideal $I$. Let $M$ be an $S$-module. Then $M$ is a Mittag-Leffler module over $R$ if and only if $M$ is a Mittag-Leffler module over $S$. \end{lemma} \begin{proof} One implication follows from Lemma \ref{lemma-restrict-ML-modules}. To prove the other, assume $M$ is Mittag-Leffler as an $R$-module. Write $M = \colim M_i$ as a directed colimit of finitely presented $S$-modules. As $I$ is finitely generated, the ring $S$ is finite and finitely presented as an $R$-algebra, hence the modules $M_i$ are finitely presented as $R$-modules, see Lemma \ref{lemma-finite-finitely-presented-extension}. Next, let $N$ be any $S$-module. Note that for each $i$ we have $\Hom_R(M_i, N) = \Hom_S(M_i, N)$ as $R \to S$ is surjective. Hence the condition that the inverse system $(\Hom_R(M_i, N))_i$ satisfies Mittag-Leffler, implies that the system $(\Hom_S(M_i, N))_i$ satisfies Mittag-Leffler. Thus $M$ is Mittag-Leffler over $S$ by definition. \end{proof} \begin{remark} \label{remark-go-up-ML-modules} Let $R \to S$ be a finite and finitely presented ring map. Let $M$ be an $S$-module which is Mittag-Leffler as an $R$-module. Then it is in general not the case that $M$ is Mittag-Leffler as an $S$-module. For example suppose that $S$ is the ring of dual numbers over $R$, i.e., $S = R \oplus R\epsilon$ with $\epsilon^2 = 0$. Then an $S$-module consists of an $R$-module $M$ endowed with a square zero $R$-linear endomorphism $\epsilon : M \to M$. Now suppose that $M_0$ is an $R$-module which is not Mittag-Leffler. Choose a presentation $F_1 \xrightarrow{u} F_0 \to M_0 \to 0$ with $F_1$ and $F_0$ free $R$-modules. Set $M = F_1 \oplus F_0$ with $$ \epsilon = \left( \begin{matrix} 0 & 0 \\ u & 0 \end{matrix} \right) : M \longrightarrow M. $$ Then $M/\epsilon M \cong F_1 \oplus M_0$ is not Mittag-Leffler over $R = S/\epsilon S$, hence not Mittag-Leffler over $S$ (see Lemma \ref{lemma-mod-ideal-ML-modules}). On the other hand, $M/\epsilon M = M \otimes_S S/\epsilon S$ which would be Mittag-Leffler over $S$ if $M$ was, see Lemma \ref{lemma-tensor-ML-modules}. \end{remark} \section{Interchanging direct products with tensor} \label{section-products-tensor} % BEGIN ALGEBRA EDITORIAL ROUTE section-products-tensor \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-products-tensor}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-products-tensor \noindent Let $M$ be an $R$-module and let $(Q_{\alpha})_{\alpha \in A}$ be a family of $R$-modules. Then there is a canonical map $M \otimes_R \left( \prod_{\alpha \in A} Q_{\alpha} \right) \to \prod_{\alpha \in A} ( M \otimes_R Q_{\alpha})$ given on pure tensors by $x \otimes (q_{\alpha}) \mapsto (x \otimes q_{\alpha})$. This map is not necessarily injective or surjective, as the following example shows. \begin{example} \label{example-Q-not-ML} Take $R = \mathbf{Z}$, $M = \mathbf{Q}$, and consider the family $Q_n = \mathbf{Z}/n$ for $n \geq 1$. Then $\prod_n (M \otimes Q_n) = 0$. However there is an injection $\mathbf{Q} \to M \otimes (\prod_n Q_n)$ obtained by tensoring the injection $\mathbf{Z} \to \prod_n Q_n$ by $M$, so $M \otimes (\prod_n Q_n)$ is nonzero. Thus $M \otimes (\prod_n Q_n) \to \prod_n (M \otimes Q_n)$ is not injective. \medskip\noindent On the other hand, take again $R = \mathbf{Z}$, $M = \mathbf{Q}$, and let $Q_n = \mathbf{Z}$ for $n \geq 1$. The image of $M \otimes (\prod_n Q_n) \to \prod_n (M \otimes Q_n) = \prod_n M$ consists precisely of sequences of the form $(a_n/m)_{n \geq 1}$ with $a_n \in \mathbf{Z}$ and $m$ some nonzero integer. Hence the map is not surjective. \end{example} \noindent We determine below the precise conditions needed on $M$ for the map $M \otimes_R \left( \prod_{\alpha} Q_{\alpha} \right) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$ to be surjective, bijective, or injective for all choices of $(Q_{\alpha})_{\alpha \in A}$. This is relevant because the modules for which it is injective turn out to be exactly Mittag-Leffler modules (Proposition \ref{proposition-ML-tensor}). In what follows, if $M$ is an $R$-module and $A$ a set, we write $M^A$ for the product $\prod_{\alpha \in A} M$. \begin{proposition} \label{proposition-fg-tensor} Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is finitely generated. \item For every family $(Q_{\alpha})_{\alpha \in A}$ of $R$-modules, the canonical map $M \otimes_R \left( \prod_{\alpha} Q_{\alpha} \right) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$ is surjective. \item For every $R$-module $Q$ and every set $A$, the canonical map $M \otimes_R Q^{A} \to (M \otimes_R Q)^{A}$ is surjective. \item For every set $A$, the canonical map $M \otimes_R R^{A} \to M^{A}$ is surjective. \end{enumerate} \end{proposition} \begin{proof} First we prove (1) implies (2). Choose a surjection $R^n \to M$ and consider the commutative diagram $$ \xymatrix{ R^n \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} \ar[d] & \prod_{\alpha} (R^n \otimes_R Q_{\alpha}) \ar[d] \\ M \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] & \prod_{\alpha} ( M \otimes_R Q_{\alpha}). } $$ The top arrow is an isomorphism and the vertical arrows are surjections. We conclude that the bottom arrow is a surjection. \medskip\noindent Obviously (2) implies (3) implies (4), so it remains to prove (4) implies (1). In fact for (1) to hold it suffices that the element $d = (x)_{x \in M}$ of $M^M$ is in the image of the map $f: M \otimes_R R^{M} \to M^M$. In this case $d = \sum_{i = 1}^{n} f(x_i \otimes a_i)$ for some $x_i \in M$ and $a_i \in R^M$. If for $x \in M$ we write $p_x: M^M \to M$ for the projection onto the $x$-th factor, then $$ x = p_x(d) = \sum\nolimits_{i = 1}^{n} p_x(f(x_i \otimes a_i)) = \sum\nolimits_{i=1}^{n} (a_i)_x x_i. $$ Thus $x_1, \ldots, x_n$ generate $M$. \end{proof} \begin{proposition} \label{proposition-fp-tensor} Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is finitely presented. \item For every family $(Q_{\alpha})_{\alpha \in A}$ of $R$-modules, the canonical map $M \otimes_R \left( \prod_{\alpha} Q_{\alpha} \right) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$ is bijective. \item For every $R$-module $Q$ and every set $A$, the canonical map $M \otimes_R Q^{A} \to (M \otimes_R Q)^{A}$ is bijective. \item For every set $A$, the canonical map $M \otimes_R R^{A} \to M^{A}$ is bijective. \end{enumerate} \end{proposition} \begin{proof} First we prove (1) implies (2). Choose a presentation $R^m \to R^n \to M$ and consider the commutative diagram $$ \xymatrix{ R^m \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d]^{\cong} & R^n \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d]^{\cong} & M \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & 0 \\ \prod_{\alpha} (R^m \otimes_R Q_{\alpha}) \ar[r] & \prod_{\alpha} (R^n \otimes_R Q_{\alpha}) \ar[r] & \prod_{\alpha} (M \otimes_R Q_{\alpha}) \ar[r] & 0. } $$ The first two vertical arrows are isomorphisms and the rows are exact. This implies that the map $M \otimes_R (\prod_{\alpha} Q_{\alpha}) \to \prod_{\alpha} ( M \otimes_R Q_{\alpha})$ is surjective and, by a diagram chase, also injective. Hence (2) holds. \medskip\noindent Obviously (2) implies (3) implies (4), so it remains to prove (4) implies (1). From Proposition \ref{proposition-fg-tensor}, if (4) holds we already know that $M$ is finitely generated. So we can choose a surjection $F \to M$ where $F$ is free and finite. Let $K$ be the kernel. We must show $K$ is finitely generated. For any set $A$, we have a commutative diagram $$ \xymatrix{ & K \otimes_R R^A \ar[r] \ar[d]_{f_3} & F \otimes_R R^A \ar[r] \ar[d]_{f_2}^{\cong} & M \otimes_R R^A \ar[r] \ar[d]_{f_1}^{\cong} & 0 \\ 0 \ar[r] & K^A \ar[r] & F^A \ar[r] & M^A \ar[r] & 0 . } $$ The map $f_1$ is an isomorphism by assumption, the map $f_2$ is an isomorphism since $F$ is free and finite, and the rows are exact. A diagram chase shows that $f_3$ is surjective, hence by Proposition \ref{proposition-fg-tensor} we get that $K$ is finitely generated. \end{proof} \noindent We need the following lemma for the next proposition. \begin{lemma} \label{lemma-kernel-tensored-fp} Let $M$ be an $R$-module, $P$ a finitely presented $R$-module, and $f: P \to M$ a map. Let $Q$ be an $R$-module and suppose $x \in \Ker(P \otimes Q \to M \otimes Q)$. Then there exists a finitely presented $R$-module $P'$ and a map $f': P \to P'$ such that $f$ factors through $f'$ and $x \in \Ker(P \otimes Q \to P' \otimes Q)$. \end{lemma} \begin{proof} Write $M$ as a colimit $M = \colim_{i \in I} M_i$ of a directed system of finitely presented modules $M_i$. Since $P$ is finitely presented, the map $f: P \to M$ factors through $M_j \to M$ for some $j \in I$. Upon tensoring by $Q$ we have a commutative diagram $$ \xymatrix{ & M_j \otimes Q \ar[dr] & \\ P \otimes Q \ar[ur] \ar[rr] & & M \otimes Q . } $$ The image $y$ of $x$ in $M_j \otimes Q$ is in the kernel of $M_j \otimes Q \to M \otimes Q$. Since $M \otimes Q = \colim_{i \in I} (M_i \otimes Q)$, this means $y$ maps to $0$ in $M_{j'} \otimes Q$ for some $j' \geq j$. Thus we may take $P' = M_{j'}$ and $f'$ to be the composite $P \to M_j \to M_{j'}$. \end{proof} \begin{proposition} \label{proposition-ML-tensor} Let $M$ be an $R$-module. The following are equivalent: \begin{enumerate} \item $M$ is Mittag-Leffler. \item For every family $(Q_{\alpha})_{\alpha \in A}$ of $R$-modules, the canonical map $M \otimes_R \left( \prod_{\alpha} Q_{\alpha} \right) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$ is injective. \end{enumerate} \end{proposition} \begin{proof} First we prove (1) implies (2). Suppose $M$ is Mittag-Leffler and let $x$ be in the kernel of $M \otimes_R (\prod_{\alpha} Q_{\alpha}) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$. Write $M$ as a colimit $M = \colim_{i \in I} M_i$ of a directed system of finitely presented modules $M_i$. Then $M \otimes_R (\prod_{\alpha} Q_{\alpha})$ is the colimit of $M_i \otimes_R (\prod_{\alpha} Q_{\alpha})$. So $x$ is the image of an element $x_i \in M_i \otimes_R (\prod_{\alpha} Q_{\alpha})$. We must show that $x_i$ maps to $0$ in $M_j \otimes_R (\prod_{\alpha} Q_{\alpha})$ for some $j \geq i$. Since $M$ is Mittag-Leffler, we may choose $j \geq i$ such that $M_i \to M_j$ and $M_i \to M$ dominate each other. Then consider the commutative diagram $$ \xymatrix{ M \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] & \prod_{\alpha} (M \otimes_R Q_{\alpha}) \\ M_i \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} \ar[d] \ar[u] & \prod_{\alpha} (M_i \otimes_R Q_{\alpha}) \ar[d] \ar[u] \\ M_j \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} & \prod_{\alpha} (M_j \otimes_R Q_{\alpha}) } $$ whose bottom two horizontal maps are isomorphisms, according to Proposition \ref{proposition-fp-tensor}. Since $x_i$ maps to $0$ in $\prod_{\alpha} (M \otimes_R Q_{\alpha})$, its image in $\prod_{\alpha} (M_i \otimes_R Q_{\alpha})$ is in the kernel of the map $\prod_{\alpha} (M_i \otimes_R Q_{\alpha}) \to \prod_{\alpha} (M \otimes_R Q_{\alpha})$. But this kernel equals the kernel of $\prod_{\alpha} (M_i \otimes_R Q_{\alpha}) \to \prod_{\alpha} (M_j \otimes_R Q_{\alpha})$ according to the choice of $j$. Thus $x_i$ maps to $0$ in $\prod_{\alpha} (M_j \otimes_R Q_{\alpha})$ and hence to $0$ in $M_j \otimes_R (\prod_{\alpha} Q_{\alpha})$. \medskip\noindent Now suppose (2) holds. We prove $M$ satisfies formulation (1) of being Mittag-Leffler from Proposition \ref{proposition-ML-characterization}. Let $f: P \to M$ be a map from a finitely presented module $P$ to $M$. Choose a set $B$ of representatives of the isomorphism classes of finitely presented $R$-modules. Let $A$ be the set of pairs $(Q, x)$ where $Q \in B$ and $x \in \Ker(P \otimes Q \to M \otimes Q)$. For $\alpha = (Q, x) \in A$, we write $Q_{\alpha}$ for $Q$ and $x_{\alpha}$ for $x$. Consider the commutative diagram $$ \xymatrix{ M \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] & \prod_{\alpha} (M \otimes_R Q_{\alpha}) \\ P \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} \ar[u] & \prod_{\alpha} (P \otimes_R Q_{\alpha}) \ar[u] . } $$ The top arrow is an injection by assumption, and the bottom arrow is an isomorphism by Proposition \ref{proposition-fp-tensor}. Let $x \in P \otimes_R (\prod_{\alpha} Q_{\alpha})$ be the element corresponding to $(x_{\alpha}) \in \prod_{\alpha} (P \otimes_R Q_{\alpha})$ under this isomorphism. Then $x \in \Ker( P \otimes_R (\prod_{\alpha} Q_{\alpha}) \to M \otimes_R (\prod_{\alpha} Q_{\alpha}))$ since the top arrow in the diagram is injective. By Lemma \ref{lemma-kernel-tensored-fp}, we get a finitely presented module $P'$ and a map $f': P \to P'$ such that $f: P \to M$ factors through $f'$ and $x \in \Ker(P \otimes_R (\prod_{\alpha} Q_{\alpha}) \to P' \otimes_R (\prod_{\alpha} Q_{\alpha}))$. We have a commutative diagram $$ \xymatrix{ P' \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} & \prod_{\alpha} (P' \otimes_R Q_{\alpha}) \\ P \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r]^{\cong} \ar[u] & \prod_{\alpha} (P \otimes_R Q_{\alpha}) \ar[u] . } $$ where both the top and bottom arrows are isomorphisms by Proposition \ref{proposition-fp-tensor}. Thus since $x$ is in the kernel of the left vertical map, $(x_{\alpha})$ is in the kernel of the right vertical map. This means $x_{\alpha} \in \Ker(P \otimes_R Q_{\alpha} \to P' \otimes_R Q_{\alpha})$ for every $\alpha \in A$. By the definition of $A$ this means $\Ker(P \otimes_R Q \to P' \otimes_R Q) \supset \Ker(P \otimes_R Q \to M \otimes_R Q)$ for all finitely presented $Q$ and, since $f: P \to M$ factors through $f': P \to P'$, actually equality holds. By Lemma \ref{lemma-domination-fp}, $f$ and $f'$ dominate each other. \end{proof} \begin{lemma} \label{lemma-minimal-contains} Let $M$ be a flat Mittag-Leffler module over $R$. Let $F$ be an $R$-module and let $x \in F \otimes_R M$. Then there exists a smallest submodule $F' \subset F$ such that $x \in F' \otimes_R M$. Also, $F'$ is a finite $R$-module. \end{lemma} \begin{proof} Since $M$ is flat we have $F' \otimes_R M \subset F \otimes_R M$ if $F' \subset F$ is a submodule, hence the statement makes sense. Let $I = \{F' \subset F \mid x \in F' \otimes_R M\}$ and for $i \in I$ denote $F_i \subset F$ the corresponding submodule. Then $x$ maps to zero under the map $$ F \otimes_R M \longrightarrow \prod (F/F_i \otimes_R M) $$ whence by Proposition \ref{proposition-ML-tensor} $x$ maps to zero under the map $$ F \otimes_R M \longrightarrow \left(\prod F/F_i\right) \otimes_R M $$ Since $M$ is flat the kernel of this arrow is $(\bigcap F_i) \otimes_R M$ which proves that $F' = \bigcap F_i$. To see that $F'$ is a finite module, suppose that $x = \sum_{j = 1, \ldots, m} f_j \otimes m_j$ with $f_j \in F'$ and $m_j \in M$. Then $x \in F'' \otimes_R M$ where $F'' \subset F'$ is the submodule generated by $f_1, \ldots, f_m$. Of course then $F'' = F'$ and we conclude the final statement holds. \end{proof} \begin{lemma} \label{lemma-pure-submodule-ML} Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a universally exact sequence of $R$-modules. Then: \begin{enumerate} \item If $M_2$ is Mittag-Leffler, then $M_1$ is Mittag-Leffler. \item If $M_1$ and $M_3$ are Mittag-Leffler, then $M_2$ is Mittag-Leffler. \end{enumerate} \end{lemma} \begin{proof} For any family $(Q_{\alpha})_{\alpha \in A}$ of $R$-modules we have a commutative diagram $$ \xymatrix{ 0 \ar[r] & M_1 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & M_2 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & M_3 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & 0 \\ 0 \ar[r] & \prod_{\alpha}(M_1 \otimes Q_{\alpha}) \ar[r] & \prod_{\alpha}(M_2 \otimes Q_{\alpha}) \ar[r] & \prod_{\alpha}(M_3 \otimes Q_{\alpha})\ar[r] & 0 } $$ with exact rows. Thus (1) and (2) follow from Proposition \ref{proposition-ML-tensor}. \end{proof} \begin{lemma} \label{lemma-quotient-module-ML} Let $M_1 \to M_2 \to M_3 \to 0$ be an exact sequence of $R$-modules. If $M_1$ is finitely generated and $M_2$ is Mittag-Leffler, then $M_3$ is Mittag-Leffler. \end{lemma} \begin{proof} For any family $(Q_{\alpha})_{\alpha \in A}$ of $R$-modules, since tensor product is right exact, we have a commutative diagram $$ \xymatrix{ M_1 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & M_2 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & M_3 \otimes_R (\prod_{\alpha} Q_{\alpha}) \ar[r] \ar[d] & 0 \\ \prod_{\alpha}(M_1 \otimes Q_{\alpha}) \ar[r] & \prod_{\alpha}(M_2 \otimes Q_{\alpha}) \ar[r] & \prod_{\alpha}(M_3 \otimes Q_{\alpha})\ar[r] & 0 } $$ with exact rows. By Proposition \ref{proposition-fg-tensor} the left vertical arrow is surjective. By Proposition \ref{proposition-ML-tensor} the middle vertical arrow is injective. A diagram chase shows the right vertical arrow is injective. Hence $M_3$ is Mittag-Leffler by Proposition \ref{proposition-ML-tensor}. \end{proof} \begin{lemma} \label{lemma-colimit-universally-injective-ML} If $M = \colim M_i$ is the colimit of a directed system of Mittag-Leffler $R$-modules $M_i$ with universally injective transition maps, then $M$ is Mittag-Leffler. \end{lemma} \begin{proof} Let $(Q_{\alpha})_{\alpha \in A}$ be a family of $R$-modules. We have to show that $M \otimes_R (\prod Q_\alpha) \to \prod M \otimes_R Q_\alpha$ is injective and we know that $M_i \otimes_R (\prod Q_\alpha) \to \prod M_i \otimes_R Q_\alpha$ is injective for each $i$, see Proposition \ref{proposition-ML-tensor}. Since $\otimes$ commutes with filtered colimits, it suffices to show that $\prod M_i \otimes_R Q_\alpha \to \prod M \otimes_R Q_\alpha$ is injective. This is clear as each of the maps $M_i \otimes_R Q_\alpha \to M \otimes_R Q_\alpha$ is injective by our assumption that the transition maps are universally injective. \end{proof} \begin{lemma} \label{lemma-direct-sum-ML} If $M = \bigoplus_{i \in I} M_i$ is a direct sum of $R$-modules, then $M$ is Mittag-Leffler if and only if each $M_i$ is Mittag-Leffler. \end{lemma} \begin{proof} The ``only if'' direction follows from Lemma \ref{lemma-pure-submodule-ML} (1) and the fact that a split short exact sequence is universally exact. The converse follows from Lemma \ref{lemma-colimit-universally-injective-ML} but we can also argue it directly as follows. First note that if $I$ is finite then this follows from Lemma \ref{lemma-pure-submodule-ML} (2). For general $I$, if all $M_i$ are Mittag-Leffler then we prove the same of $M$ by verifying condition (1) of Proposition \ref{proposition-ML-characterization}. Let $f: P \to M$ be a map from a finitely presented module $P$. Then $f$ factors as $P \xrightarrow{f'} \bigoplus_{i' \in I'} M_{i'} \hookrightarrow \bigoplus_{i \in I} M_i$ for some finite subset $I'$ of $I$. By the finite case $\bigoplus_{i' \in I'} M_{i'}$ is Mittag-Leffler and hence there exists a finitely presented module $Q$ and a map $g: P \to Q$ such that $g$ and $f'$ dominate each other. Then also $g$ and $f$ dominate each other. \end{proof} \begin{lemma} \label{lemma-flat-ML-over-ML-ring} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. If $S$ is Mittag-Leffler as an $R$-module, and $M$ is flat and Mittag-Leffler as an $S$-module, then $M$ is Mittag-Leffler as an $R$-module. \end{lemma} \begin{proof} We deduce this from the characterization of Proposition \ref{proposition-ML-tensor}. Namely, suppose that $Q_\alpha$ is a family of $R$-modules. Consider the composition $$ \xymatrix{ M \otimes_R \prod_\alpha Q_\alpha = M \otimes_S S \otimes_R \prod_\alpha Q_\alpha \ar[d] \\ M \otimes_S \prod_\alpha (S \otimes_R Q_\alpha) \ar[d] \\ \prod_\alpha (M \otimes_S S \otimes_R Q_\alpha) = \prod_\alpha (M \otimes_R Q_\alpha) } $$ The first arrow is injective as $M$ is flat over $S$ and $S$ is Mittag-Leffler over $R$ and the second arrow is injective as $M$ is Mittag-Leffler over $S$. Hence $M$ is Mittag-Leffler over $R$. \end{proof} \section{Coherent rings} \label{section-coherent} % BEGIN ALGEBRA EDITORIAL ROUTE section-coherent \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-coherent}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-coherent \noindent We use the discussion on interchanging $\prod$ and $\otimes$ to determine for which rings products of flat modules are flat. It turns out that these are the so-called coherent rings. You may be more familiar with the notion of a coherent $\mathcal{O}_X$-module on a ringed space, see Modules, Section \ref{modules-section-coherent}. \begin{definition} \label{definition-coherent} Let $R$ be a ring. Let $M$ be an $R$-module. \begin{enumerate} \item We say $M$ is a {\it coherent module} if it is finitely generated and every finitely generated submodule of $M$ is finitely presented over $R$. \item We say $R$ is a {\it coherent ring} if it is coherent as a module over itself. \end{enumerate} \end{definition} \noindent Thus a ring is coherent if and only if every finitely generated ideal is finitely presented as a module. \begin{example} \label{example-valuation-ring-coherent} A valuation ring is a coherent ring. Namely, every nonzero finitely generated ideal is principal (Lemma \ref{lemma-characterize-valuation-ring}), hence free as a valuation ring is a domain, hence finitely presented. \end{example} \noindent The category of coherent modules is abelian. \begin{lemma} \label{lemma-coherent} Let $R$ be a ring. \begin{enumerate} \item A finite submodule of a coherent module is coherent. \item Let $\varphi : N \to M$ be a homomorphism from a finite module to a coherent module. Then $\Ker(\varphi)$ is finite, $\Im(\varphi)$ is coherent, and $\Coker(\varphi)$ is coherent. \item Let $\varphi : N \to M$ be a homomorphism of coherent modules. Then $\Ker(\varphi)$ and $\Coker(\varphi)$ are coherent modules. \item Given a short exact sequence of $R$-modules $0 \to M_1 \to M_2 \to M_3 \to 0$ if two out of three are coherent so is the third. \end{enumerate} \end{lemma} \begin{proof} The first statement is immediate from the definition. \medskip\noindent Let $\varphi : N \to M$ satisfy the assumptions of (2). First, $\Im(\varphi)$ is finite, hence coherent by (1). In particular $\Im(\varphi)$ is finitely presented, so applying Lemma \ref{lemma-extension} to the exact sequence $0 \to \Ker(\varphi) \to N \to \Im(\varphi) \to 0$ we see that $\Ker(\varphi)$ is finite. To prove that $\Coker(\varphi)$ is coherent, let $E \subset \Coker(\varphi)$ be a finite submodule, and let $E'$ be its inverse image in $M$. From the exact sequence $0 \to \Im(\varphi) \to E' \to E \to 0$ and since $\Im(\varphi)$ is finite we conclude by Lemma \ref{lemma-extension} that $E' \subset M$ is finite, hence finitely presented because $M$ is coherent. The same exact sequence then shows that $E$ is finitely presented, whence our claim. \medskip\noindent Part (3) follows immediately from (1) and (2). \medskip\noindent Let $0 \to M_1 \xrightarrow{i} M_2 \xrightarrow{p} M_3 \to 0$ be a short exact sequence of $R$-modules as in (4). It remains to prove that if $M_1$ and $M_3$ are coherent so is $M_2$. By Lemma \ref{lemma-extension} we see that $M_2$ is finite. Let $N_2 \subset M_2$ be a finite submodule. Put $N_3 = p(N_2) \subset M_3$ and $N_1 = i^{-1}(N_2) \subset M_1$. We have an exact sequence $0 \to N_1 \to N_2 \to N_3 \to 0$. Clearly $N_3$ is finite (as a quotient of $N_2$), hence finitely presented (as a finite submodule of $M_3$). It follows by Lemma \ref{lemma-extension} (5) that $N_1$ is finite, hence finitely presented (as a finite submodule of $M_1$). We conclude by Lemma \ref{lemma-extension} (2) that $N_2$ is finitely presented. \end{proof} \begin{lemma} \label{lemma-coherent-ring} Let $R$ be a ring. If $R$ is coherent, then a module is coherent if and only if it is finitely presented. \end{lemma} \begin{proof} It is clear that a coherent module is finitely presented (over any ring). Conversely, if $R$ is coherent, then $R^{\oplus n}$ is coherent and so is the cokernel of any map $R^{\oplus m} \to R^{\oplus n}$, see Lemma \ref{lemma-coherent}. \end{proof} \begin{lemma} \label{lemma-Noetherian-coherent} A Noetherian ring is a coherent ring. \end{lemma} \begin{proof} By Lemma \ref{lemma-Noetherian-finite-type-is-finite-presentation} any finite $R$-module is finitely presented. In particular any ideal of $R$ is finitely presented. \end{proof} \begin{proposition} \label{proposition-characterize-coherent} \begin{reference} This is \cite[Theorem 2.1]{Chase}. \end{reference} Let $R$ be a ring. The following are equivalent \begin{enumerate} \item $R$ is coherent, \item any product of flat $R$-modules is flat, and \item for every set $A$ the module $R^A$ is flat. \end{enumerate} \end{proposition} \begin{proof} Assume $R$ coherent, and let $Q_\alpha$, $\alpha \in A$ be a set of flat $R$-modules. We have to show that $I \otimes_R \prod_\alpha Q_\alpha \to \prod Q_\alpha$ is injective for every finitely generated ideal $I$ of $R$, see Lemma \ref{lemma-flat}. Since $R$ is coherent $I$ is an $R$-module of finite presentation. Hence $I \otimes_R \prod_\alpha Q_\alpha = \prod I \otimes_R Q_\alpha$ by Proposition \ref{proposition-fp-tensor}. The desired injectivity follows as $I \otimes_R Q_\alpha \to Q_\alpha$ is injective by flatness of $Q_\alpha$. \medskip\noindent The implication (2) $\Rightarrow$ (3) is trivial. \medskip\noindent Assume that the $R$-module $R^A$ is flat for every set $A$. Let $I$ be a finitely generated ideal in $R$. Then $I \otimes_R R^A \to R^A$ is injective by assumption. By Proposition \ref{proposition-fg-tensor} and the finiteness of $I$ the image is equal to $I^A$. Hence $I \otimes_R R^A = I^A$ for every set $A$ and we conclude that $I$ is finitely presented by Proposition \ref{proposition-fp-tensor}. \end{proof} \section{Examples and non-examples of Mittag-Leffler modules} \label{section-examples} % BEGIN ALGEBRA EDITORIAL ROUTE section-examples \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-examples}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-examples \noindent We end this section with some examples and non-examples of Mittag-Leffler modules. \begin{example} \label{example-ML} Mittag-Leffler modules. \begin{enumerate} \item Any finitely presented module is Mittag-Leffler. This follows, for instance, from Proposition \ref{proposition-ML-characterization} (1). In general, it is true that a finitely generated module is Mittag-Leffler if and only if it is finitely presented. This follows from Propositions \ref{proposition-fg-tensor}, \ref{proposition-fp-tensor}, and \ref{proposition-ML-tensor}. \item A free module is Mittag-Leffler since it satisfies condition (1) of Proposition \ref{proposition-ML-characterization}. \item By the previous example together with Lemma \ref{lemma-direct-sum-ML}, projective modules are Mittag-Leffler. \end{enumerate} \end{example} \noindent We also want to add to our list of examples power series rings over a Noetherian ring $R$. This will be a consequence of the following lemma. \begin{lemma} \label{lemma-flat-ML-criterion} Let $M$ be a flat $R$-module. The following are equivalent \begin{enumerate} \item $M$ is Mittag-Leffler, and \item if $F$ is a finite free $R$-module and $x \in F \otimes_R M$, then there exists a smallest submodule $F'$ of $F$ such that $x \in F' \otimes_R M$. \end{enumerate} \end{lemma} \begin{proof} The implication (1) $\Rightarrow$ (2) is a special case of Lemma \ref{lemma-minimal-contains}. Assume (2). By Theorem \ref{theorem-lazard} we can write $M$ as the colimit $M = \colim_{i \in I} M_i$ of a directed system $(M_i, f_{ij})$ of finite free $R$-modules. By Remark \ref{remark-flat-ML}, it suffices to show that the inverse system $(\Hom_R(M_i, R), \Hom_R(f_{ij}, R))$ is Mittag-Leffler. In other words, fix $i \in I$ and for $j \geq i$ let $Q_j$ be the image of $\Hom_R(M_j, R) \to \Hom_R(M_i, R)$; we must show that the $Q_j$ stabilize. \medskip\noindent Since $M_i$ is free and finite, we can make the identification $\Hom_R(M_i, M_j) = \Hom_R(M_i, R) \otimes_R M_j$ for all $j$. Using the fact that the $M_j$ are free, it follows that for $j \geq i$, $Q_j$ is the smallest submodule of $\Hom_R(M_i, R)$ such that $f_{ij} \in Q_j \otimes_R M_j$. Under the identification $\Hom_R(M_i, M) = \Hom_R(M_i, R) \otimes_R M$, the canonical map $f_i: M_i \to M$ is in $\Hom_R(M_i, R) \otimes_R M$. By the assumption on $M$, there exists a smallest submodule $Q$ of $\Hom_R(M_i, R)$ such that $f_i \in Q \otimes_R M$. We are going to show that the $Q_j$ stabilize to $Q$. \medskip\noindent For $j \geq i$ we have a commutative diagram $$ \xymatrix{ Q_j \otimes_R M_j \ar[r] \ar[d] & \Hom_R(M_i, R) \otimes_R M_j \ar[d] \\ Q_j \otimes_R M \ar[r] & \Hom_R(M_i, R) \otimes_R M. } $$ Since $f_{ij} \in Q_j \otimes_R M_j$ maps to $f_i \in \Hom_R(M_i, R) \otimes_R M$, it follows that $f_i \in Q_j \otimes_R M$. Hence, by the choice of $Q$, we have $Q \subset Q_j$ for all $j \geq i$. \medskip\noindent Since the $Q_j$ are decreasing and $Q \subset Q_j$ for all $j \geq i$, to show that the $Q_j$ stabilize to $Q$ it suffices to find a $j \geq i$ such that $Q_j \subset Q$. As an element of $$ \Hom_R(M_i, R) \otimes_R M = \colim_{j \in I} (\Hom_R(M_i, R) \otimes_R M_j), $$ $f_i$ is the colimit of $f_{ij}$ for $j \geq i$, and $f_i$ also lies in the submodule $$ \colim_{j \in I} (Q \otimes_R M_j) \subset \colim_{j \in I} (\Hom_R(M_i, R) \otimes_R M_j). $$ It follows that for some $j \geq i$, $f_{ij}$ lies in $Q \otimes_R M_j$. Since $Q_j$ is the smallest submodule of $\Hom_R(M_i, R)$ with $f_{ij} \in Q_j \otimes_R M_j$, we conclude $Q_j\subset Q$. \end{proof} \begin{lemma} \label{lemma-product-over-Noetherian-ring} Let $R$ be a Noetherian ring and $A$ a set. Then $M = R^A$ is a flat and Mittag-Leffler $R$-module. \end{lemma} \begin{proof} Combining Lemma \ref{lemma-Noetherian-coherent} and Proposition \ref{proposition-characterize-coherent} we see that $M$ is flat over $R$. We show that $M$ satisfies the condition of Lemma \ref{lemma-flat-ML-criterion}. Let $F$ be a free finite $R$-module. If $F'$ is any submodule of $F$ then it is finitely presented since $R$ is Noetherian. So by Proposition \ref{proposition-fp-tensor} we have a commutative diagram $$ \xymatrix{ F' \otimes_R M \ar[r] \ar[d]^{\cong} & F \otimes_R M \ar[d]^{\cong} \\ (F')^A \ar[r] & F^A } $$ by which we can identify the map $F' \otimes_R M \to F \otimes_R M$ with $(F')^A \to F^A$. Hence if $x \in F \otimes_R M$ corresponds to $(x_\alpha) \in F^A$, then the submodule $F'$ of $F$ generated by the $x_\alpha$ is the smallest submodule of $F$ such that $x \in F' \otimes_R M$. \end{proof} \begin{lemma} \label{lemma-power-series-ML} Let $R$ be a Noetherian ring and $n$ a positive integer. Then the $R$-module $M = R[[t_1, \ldots, t_n]]$ is flat and Mittag-Leffler. \end{lemma} \begin{proof} As an $R$-module, we have $M = R^A$ for a (countable) set $A$. Hence this lemma is a special case of Lemma \ref{lemma-product-over-Noetherian-ring}. \end{proof} \begin{example} \label{example-not-ML} Non Mittag-Leffler modules. \begin{enumerate} \item By Example \ref{example-Q-not-ML} and Proposition \ref{proposition-ML-tensor}, $\mathbf{Q}$ is not a Mittag-Leffler $\mathbf{Z}$-module. \item We prove below (Theorem \ref{theorem-projectivity-characterization}) that for a flat and countably generated module, projectivity is equivalent to being Mittag-Leffler. Thus any flat, countably generated, non-projective module $M$ is an example of a non-Mittag-Leffler module. For such an example, see Remark \ref{remark-warning}. \item Let $k$ be a field. Let $R = k[[x]]$. The $R$-module $M = \prod_{n \in \mathbf{N}} R/(x^n)$ is not Mittag-Leffler. Namely, consider the element $\xi = (\xi_1, \xi_2, \xi_3, \ldots)$ defined by $\xi_{2^m} = x^{2^{m - 1}}$ and $\xi_n = 0$ else, so $$ \xi = (0, x, 0, x^2, 0, 0, 0, x^4, 0, 0, 0, 0, 0, 0, 0, x^8, \ldots) $$ Then the annihilator of $\xi$ in $M/x^{2^m}M$ is generated by $x^{2^{m - 1}}$ for $m \gg 0$. But if $M$ was Mittag-Leffler, then there would exist a finite $R$-module $Q$ and an element $\xi' \in Q$ such that the annihilator of $\xi'$ in $Q/x^l Q$ agrees with the annihilator of $\xi$ in $M/x^l M$ for all $l \geq 1$, see Proposition \ref{proposition-ML-characterization} (1). Now you can prove there exists an integer $a \geq 0$ such that the annihilator of $\xi'$ in $Q/x^l Q$ is generated by either $x^a$ or $x^{l - a}$ for all $l \gg 0$ (depending on whether $\xi' \in Q$ is torsion or not). The combination of the above would give for all $l = 2^m \gg 0$ the equality $a = l/2$ or $l - a = l/2$ which is nonsensical. \item The same argument shows that $(x)$-adic completion of $\bigoplus_{n \in \mathbf{N}} R/(x^n)$ is not Mittag-Leffler over $R = k[[x]]$ (hint: $\xi$ is actually an element of this completion). \item Let $R = k[a, b]/(a^2, ab, b^2)$. Let $S$ be the finitely presented $R$-algebra with presentation $S = R[t]/(at - b)$. Then as an $R$-module $S$ is countably generated and indecomposable (details omitted). On the other hand, $R$ is Artinian local, hence complete local, hence a henselian local ring, see Lemma \ref{lemma-complete-henselian}. If $S$ was Mittag-Leffler as an $R$-module, then it would be a direct sum of finite $R$-modules by Lemma \ref{lemma-split-ML-henselian}. Thus we conclude that $S$ is not Mittag-Leffler as an $R$-module. \end{enumerate} \end{example} \section{Countably generated Mittag-Leffler modules} \label{section-ML-countable} % BEGIN ALGEBRA EDITORIAL ROUTE section-ML-countable \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ML-countable}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ML-countable \noindent It turns out that countably generated Mittag-Leffler modules have a particularly simple structure. \begin{lemma} \label{lemma-ML-countable-colimit} Let $M$ be an $R$-module. Write $M = \colim_{i \in I} M_i$ where $(M_i, f_{ij})$ is a directed system of finitely presented $R$-modules. If $M$ is Mittag-Leffler and countably generated, then there is a directed countable subset $I' \subset I$ such that $M \cong \colim_{i \in I'} M_i$. \end{lemma} \begin{proof} Let $x_1, x_2, \ldots$ be a countable set of generators for $M$. For each $x_n$ choose $i \in I$ such that $x_n$ is in the image of the canonical map $f_i: M_i \to M$; let $I'_{0} \subset I$ be the set of all these $i$. Now since $M$ is Mittag-Leffler, for each $i \in I'_{0}$ we can choose $j \in I$ such that $j \geq i$ and $f_{ij}: M_i \to M_j$ factors through $f_{ik}: M_i \to M_k$ for all $k \geq i$ (condition (3) of Proposition \ref{proposition-ML-characterization}); let $I'_1$ be the union of $I'_0$ with all of these $j$. Since $I'_1$ is a countable set, we can enlarge it to a countable directed set $I'_{2} \subset I$. Now we can apply the same procedure to $I'_{2}$ as we did to $I'_{0}$ to get a new countable set $I'_{3} \subset I$. Then we enlarge $I'_{3}$ to a countable directed set $I'_{4}$. Continuing in this way---adding in a $j$ as in Proposition \ref{proposition-ML-characterization} (3) for each $ i \in I'_{\ell}$ if $\ell$ is even and enlarging $I'_{\ell}$ to a directed set if $\ell$ is odd---we get a sequence of subsets $I'_{\ell} \subset I$ for $\ell \geq 0$. The union $I' = \bigcup I'_{\ell}$ satisfies: \begin{enumerate} \item $I'$ is countable and directed; \item each $x_n$ is in the image of $f_i: M_i \to M$ for some $i \in I'$; \item if $i \in I'$, then there is $j \in I'$ such that $j \geq i$ and $f_{ij}: M_i \to M_j$ factors through $f_{ik}: M_i \to M_k$ for all $k \in I$ with $k \geq i$. In particular $\Ker(f_{ik}) \subset \Ker(f_{ij})$ for $k \geq i$. \end{enumerate} We claim that the canonical map $\colim_{i \in I'} M_i \to \colim_{i \in I} M_i = M$ is an isomorphism. By (2) it is surjective. For injectivity, suppose $x \in \colim_{i \in I'} M_i$ maps to $0$ in $\colim_{i \in I} M_i$. Representing $x$ by an element $\tilde{x} \in M_i$ for some $i \in I'$, this means that $f_{ik}(\tilde{x}) = 0$ for some $k \in I, k \geq i$. But then by (3) there is $j \in I', j \geq i,$ such that $f_{ij}(\tilde{x}) = 0$. Hence $x = 0$ in $\colim_{i \in I'} M_i$. \end{proof} \noindent Lemma \ref{lemma-ML-countable-colimit} implies that a countably generated Mittag-Leffler module $M$ over $R$ is the colimit of a system $$ M_1 \to M_2 \to M_3 \to M_4 \to \ldots $$ with each $M_n$ a finitely presented $R$-module. To see this argue as in the proof of Lemma \ref{lemma-ML-limit-nonempty} to obtain an increasing cofinal sequence indexed by $(\mathbf{N},\leq)$, allowing repetitions. Suppose $R = k[x_1, x_2, x_3, \ldots]$ and $M = R/(x_i)$. Then $M$ is finitely generated but not finitely presented, hence not Mittag-Leffler (see Example \ref{example-ML} part (1)). But of course you can write $M = \colim_n M_n$ by taking $M_n = R/(x_1, \ldots, x_n)$, hence the condition that you can write $M$ as such a limit does not imply that $M$ is Mittag-Leffler. \begin{lemma} \label{lemma-ML-countable} Let $R$ be a ring. Let $M$ be an $R$-module. Assume $M$ is Mittag-Leffler and countably generated. For any $R$-module map $f : P \to M$ with $P$ finitely generated there exists an endomorphism $\alpha : M \to M$ such that \begin{enumerate} \item $\alpha : M \to M$ factors through a finitely presented $R$-module, and \item $\alpha \circ f = f$. \end{enumerate} \end{lemma} \begin{proof} Write $M = \colim_{i \in I} M_i$ as a directed colimit of finitely presented $R$-modules with $I$ countable, see Lemma \ref{lemma-ML-countable-colimit}. The transition maps are denoted $f_{ij}$ and we use $f_i : M_i \to M$ to denote the canonical maps into $M$. Set $N = \prod_{s \in I} M_s$. Denote $$ M_i^* = \Hom_R(M_i, N) = \prod\nolimits_{s \in I} \Hom_R(M_i, M_s) $$ so that $(M_i^*)$ is an inverse system of $R$-modules over $I$. Note that $\Hom_R(M, N) = \lim M_i^*$. As $M$ is Mittag-Leffler, we find for every $i \in I$ an index $k(i) \geq i$ such that $$ E_i := \bigcap\nolimits_{i' \geq i} \Im(M_{i'}^* \to M_i^*) = \Im(M_{k(i)}^* \to M_i^*) $$ Choose and fix $j \in I$ such that $\Im(P \to M) \subset \Im(M_j \to M)$. This is possible as $P$ is finitely generated. Set $k = k(j)$. Let $x = (0, \ldots, 0, \text{id}_{M_k}, 0, \ldots, 0) \in M_k^*$ and note that this maps to $y = (0, \ldots, 0, f_{jk}, 0, \ldots, 0) \in M_j^*$. By our choice of $k$ we see that $y \in E_j$. By Example \ref{example-ML-surjective-maps} the transition maps $E_i \to E_j$ are surjective for each $i \geq j$ and $\lim E_i = \lim M_i^* = \Hom_R(M, N)$. Hence Lemma \ref{lemma-ML-limit-nonempty} guarantees there exists an element $z \in \Hom_R(M, N)$ which maps to $y$ in $E_j \subset M_j^*$. Let $z_k$ be the $k$th component of $z$. Then $z_k : M \to M_k$ is a homomorphism such that $$ \xymatrix{ M \ar[r]_{z_k} & M_k \\ M_j \ar[ru]_{f_{jk}} \ar[u]^{f_j} } $$ commutes. Let $\alpha : M \to M$ be the composition $f_k \circ z_k : M \to M_k \to M$. Then $\alpha$ factors through a finitely presented module by construction and $\alpha \circ f_j = f_j$. Since the image of $f$ is contained in the image of $f_j$ this also implies that $\alpha \circ f = f$. \end{proof} \noindent We will see later (see Lemma \ref{lemma-split-ML-henselian}) that Lemma \ref{lemma-ML-countable} means that a countably generated Mittag-Leffler module over a henselian local ring is a direct sum of finitely presented modules. \section{Characterizing projective modules} \label{section-characterize-projective} % BEGIN ALGEBRA EDITORIAL ROUTE section-characterize-projective \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-characterize-projective}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-characterize-projective \noindent The goal of this section is to prove that a module is projective if and only if it is flat, Mittag-Leffler, and a direct sum of countably generated modules (Theorem \ref{theorem-projectivity-characterization} below). \begin{lemma} \label{lemma-countgen-projective} Let $M$ be an $R$-module. If $M$ is flat, Mittag-Leffler, and countably generated, then $M$ is projective. \end{lemma} \begin{proof} By Lazard's theorem (Theorem \ref{theorem-lazard}), we can write $M = \colim_{i \in I} M_i$ for a directed system of finite free $R$-modules $(M_i, f_{ij})$ indexed by a set $I$. By Lemma \ref{lemma-ML-countable-colimit}, we may assume $I$ is countable. Now let $$ 0 \to N_1 \to N_2 \to N_3 \to 0 $$ be an exact sequence of $R$-modules. We must show that applying $\Hom_R(M, -)$ preserves exactness. Since $M_i$ is finite free, $$ 0 \to \Hom_R(M_i, N_1) \to \Hom_R(M_i, N_2) \to \Hom_R(M_i, N_3) \to 0 $$ is exact for each $i$. Since $M$ is Mittag-Leffler, $(\Hom_R(M_i, N_{1}))$ is a Mittag-Leffler inverse system. So by Lemma \ref{lemma-ML-exact-sequence}, $$ 0 \to \lim_{i \in I} \Hom_R(M_i, N_1) \to \lim_{i \in I} \Hom_R(M_i, N_2) \to \lim_{i \in I} \Hom_R(M_i, N_3) \to 0 $$ is exact. But for any $R$-module $N$ there is a functorial isomorphism $\Hom_R(M, N) \cong \lim_{i \in I} \Hom_R(M_i, N)$, so $$ 0 \to \Hom_R(M, N_1) \to \Hom_R(M, N_2) \to \Hom_R(M, N_3) \to 0 $$ is exact. \end{proof} \begin{remark} \label{remark-characterize-projective} Lemma \ref{lemma-countgen-projective} does not hold without the countable generation assumption. For example, the $\mathbf Z$-module $M = \mathbf{Z}[[x]]$ is flat and Mittag-Leffler but not projective. It is Mittag-Leffler by Lemma \ref{lemma-power-series-ML}. Subgroups of free abelian groups are free, hence a projective $\mathbf Z$-module is in fact free and so are its submodules. Thus to show $M$ is not projective it suffices to produce a non-free submodule. Fix a prime $p$ and consider the submodule $N$ consisting of power series $f(x) = \sum a_i x^i$ such that for every integer $m \geq 1$, $p^m$ divides $a_i$ for all but finitely many $i$. Then $\sum a_i p^i x^i$ is in $N$ for all $a_i \in \mathbf{Z}$, so $N$ is uncountable. Thus if $N$ were free it would have uncountable rank and the dimension of $N/pN$ over $\mathbf{Z}/p$ would be uncountable. This is not true as the elements $x^i \in N/pN$ for $i \geq 0$ span $N/pN$. \end{remark} \begin{theorem} \label{theorem-projectivity-characterization} Let $M$ be an $R$-module. Then $M$ is projective if and only if \begin{enumerate} \item $M$ is flat, \item $M$ is Mittag-Leffler, \item $M$ is a direct sum of countably generated $R$-modules. \end{enumerate} \end{theorem} \begin{proof} First suppose $M$ is projective. Then $M$ is a direct summand of a free module, so $M$ is flat and Mittag-Leffler since these properties pass to direct summands. By Kaplansky's theorem (Theorem \ref{theorem-projective-direct-sum}), $M$ satisfies (3). \medskip\noindent Conversely, suppose $M$ satisfies (1)-(3). Since being flat and Mittag-Leffler passes to direct summands, $M$ is a direct sum of flat, Mittag-Leffler, countably generated $R$-modules. Lemma \ref{lemma-countgen-projective} implies $M$ is a direct sum of projective modules. Hence $M$ is projective. \end{proof} \begin{lemma} \label{lemma-ML-ui-descent} Let $f: M \to N$ be a universally injective map of $R$-modules. Suppose $M$ is a direct sum of countably generated $R$-modules, and suppose $N$ is flat and Mittag-Leffler. Then $M$ is projective. \end{lemma} \begin{proof} By Lemmas \ref{lemma-ui-flat-domain} and \ref{lemma-pure-submodule-ML}, $M$ is flat and Mittag-Leffler, so the conclusion follows from Theorem \ref{theorem-projectivity-characterization}. \end{proof} \begin{lemma} \label{lemma-universally-injective-submodule-powerseries} Let $R$ be a Noetherian ring and let $M$ be a $R$-module. Suppose $M$ is a direct sum of countably generated $R$-modules, and suppose there is a universally injective map $M \to R[[t_1, \ldots, t_n]]$ for some $n$. Then $M$ is projective. \end{lemma} \begin{proof} Follows from Lemmas \ref{lemma-ML-ui-descent} and \ref{lemma-power-series-ML}. \end{proof} \section{Ascending properties of modules} \label{section-ascent} % BEGIN ALGEBRA EDITORIAL ROUTE section-ascent \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ascent}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ascent \noindent All of the properties of a module in Theorem \ref{theorem-projectivity-characterization} ascend along arbitrary ring maps: \begin{lemma} \label{lemma-ascend-properties-modules} Let $R \to S$ be a ring map. Let $M$ be an $R$-module. Then: \begin{enumerate} \item If $M$ is flat, then the $S$-module $M \otimes_R S$ is flat. \item If $M$ is Mittag-Leffler, then the $S$-module $M \otimes_R S$ is Mittag-Leffler. \item If $M$ is a direct sum of countably generated $R$-modules, then the $S$-module $M \otimes_R S$ is a direct sum of countably generated $S$-modules. \item If $M$ is projective, then the $S$-module $M \otimes_R S$ is projective. \end{enumerate} \end{lemma} \begin{proof} All are obvious except (2). For this, use formulation (3) of being Mittag-Leffler from Proposition \ref{proposition-ML-characterization} and the fact that tensoring commutes with taking colimits. Alternatively, one can use the characterization of Proposition \ref{proposition-ML-tensor}. \end{proof} \section{Descending properties of modules} \label{section-descent} % BEGIN ALGEBRA EDITORIAL ROUTE section-descent \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-descent}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-descent \noindent We address the faithfully flat descent of the properties from Theorem \ref{theorem-projectivity-characterization} that characterize projectivity. In the presence of flatness, the property of being a Mittag-Leffler module descends: \begin{lemma} \label{lemma-ffdescent-ML} \begin{reference} Email from Juan Pablo Acosta Lopez dated 12/20/14. \end{reference} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. If the $S$-module $M \otimes_R S$ is Mittag-Leffler, then $M$ is Mittag-Leffler. \end{lemma} \begin{proof} Write $M = \colim_{i\in I} M_i$ as a directed colimit of finitely presented $R$-modules $M_i$. Using Proposition \ref{proposition-ML-characterization}, we see that we have to prove that for each $i \in I$ there exists $i \leq j$, $j\in I$ such that $M_i\rightarrow M_j$ dominates $M_i\rightarrow M$. \medskip\noindent Take $N$ to be the pushout $$ \xymatrix{ M_i \ar[r] \ar[d] & M_j \ar[d] \\ M \ar[r] & N } $$ Then the lemma is equivalent to the existence of $j$ such that $M_j\rightarrow N$ is universally injective, see Lemma \ref{lemma-domination-universally-injective}. Observe that the tensorization by $S$ $$ \xymatrix{ M_i\otimes_R S \ar[r] \ar[d] & M_j\otimes_R S \ar[d] \\ M\otimes_R S \ar[r] & N\otimes_R S } $$ is a pushout diagram. So because $M \otimes_R S = \colim_{i\in I} M_i \otimes_R S$ expresses $M\otimes_R S$ as a colimit of $S$-modules of finite presentation, and $M\otimes_R S$ is Mittag-Leffler, there exists $j \geq i$ such that $M_j\otimes_R S\rightarrow N\otimes_R S$ is universally injective. So using that $R\rightarrow S$ is faithfully flat we conclude that $M_j\rightarrow N$ is universally injective too. \end{proof} \begin{lemma} \label{lemma-ffdescent-countable} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. If the $S$-module $M \otimes_R S$ is countably generated, then $M$ is countably generated. \end{lemma} \begin{proof} Say $M \otimes_R S$ is generated by the elements $y_i$, $i = 1, 2, 3, \ldots$. Write $y_i = \sum_{j = 1, \ldots, n_i} x_{ij} \otimes s_{ij}$ for some $n_i \geq 0$, $x_{ij} \in M$ and $s_{ij} \in S$. Denote $M' \subset M$ the submodule generated by the countable collection of elements $x_{ij}$. Then $M' \otimes_R S \to M \otimes_R S$ is surjective as the image contains the generators $y_i$. Since $S$ is faithfully flat over $R$ we conclude that $M' = M$ as desired. \end{proof} \noindent At this point the faithfully flat descent of countably generated projective modules follows easily. \begin{lemma} \label{lemma-ffdescent-countable-projectivity} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. If the $S$-module $M \otimes_R S$ is countably generated and projective, then $M$ is countably generated and projective. \end{lemma} \begin{proof} Follows from Lemmas \ref{lemma-descend-properties-modules}, \ref{lemma-ffdescent-ML}, and \ref{lemma-ffdescent-countable} and Theorem \ref{theorem-projectivity-characterization}. \end{proof} \noindent All that remains is to use d\'evissage to reduce descent of projectivity in the general case to the countably generated case. First, two simple lemmas. \begin{lemma} \label{lemma-lift-countably-generated-submodule} Let $R \to S$ be a ring map, let $M$ be an $R$-module, and let $Q$ be a countably generated $S$-submodule of $M \otimes_R S$. Then there exists a countably generated $R$-submodule $P$ of $M$ such that $\Im(P \otimes_R S \to M \otimes_R S)$ contains $Q$. \end{lemma} \begin{proof} Let $y_1, y_2, \ldots$ be generators for $Q$ and write $y_j = \sum_k x_{jk} \otimes s_{jk}$ for some $x_{jk} \in M$ and $s_{jk} \in S$. Then take $P$ to be the submodule of $M$ generated by the $x_{jk}$. \end{proof} \begin{lemma} \label{lemma-adapted-submodule} Let $R \to S$ be a ring map, and let $M$ be an $R$-module. Suppose $M \otimes_R S = \bigoplus_{i \in I} Q_i$ is a direct sum of countably generated $S$-modules $Q_i$. If $N$ is a countably generated submodule of $M$, then there is a countably generated submodule $N'$ of $M$ such that $N' \supset N$ and $\Im(N' \otimes_R S \to M \otimes_R S) = \bigoplus_{i \in I'} Q_i$ for some subset $I' \subset I$. \end{lemma} \begin{proof} Let $N'_0 = N$. We construct by induction an increasing sequence of countably generated submodules $N'_{\ell} \subset M$ for $\ell = 0, 1, 2, \ldots$ such that: if $I'_{\ell}$ is the set of $i \in I$ such that the projection of $\Im(N'_{\ell} \otimes_R S \to M \otimes_R S)$ onto $Q_i$ is nonzero, then $\Im(N'_{\ell + 1} \otimes_R S \to M \otimes_R S)$ contains $Q_i$ for all $i \in I'_{\ell}$. To construct $N'_{\ell + 1}$ from $N'_\ell$, let $Q$ be the sum of (the countably many) $Q_i$ for $i \in I'_{\ell}$, choose $P$ as in Lemma \ref{lemma-lift-countably-generated-submodule}, and then let $N'_{\ell + 1} = N'_{\ell} + P$. Having constructed the $N'_{\ell}$, just take $N' = \bigcup_{\ell} N'_{\ell}$ and $I' = \bigcup_{\ell} I'_{\ell}$. \end{proof} \begin{theorem} \label{theorem-ffdescent-projectivity} Let $R \to S$ be a faithfully flat ring map. Let $M$ be an $R$-module. If the $S$-module $M \otimes_R S$ is projective, then $M$ is projective. \end{theorem} \begin{proof} We are going to construct a Kaplansky d\'evissage of $M$ to show that it is a direct sum of projective modules and hence projective. By Theorem \ref{theorem-projective-direct-sum} we can write $M \otimes_R S = \bigoplus_{i \in I} Q_i$ as a direct sum of countably generated $S$-modules $Q_i$. Choose a well-ordering on $M$. Using transfinite recursion we are going to define an increasing family of submodules $M_{\alpha}$ of $M$, one for each ordinal $\alpha$, such that $M_{\alpha} \otimes_R S$ is a direct sum of some subset of the $Q_i$. \medskip\noindent For $\alpha = 0$ let $M_0 = 0$. If $\alpha$ is a limit ordinal and $M_{\beta}$ has been defined for all $\beta < \alpha$, then define $M_\alpha = \bigcup_{\beta < \alpha} M_{\beta}$. Since each $M_{\beta} \otimes_R S$ for $\beta < \alpha$ is a direct sum of a subset of the $Q_i$, the same will be true of $M_{\alpha} \otimes_R S$. If $\alpha + 1$ is a successor ordinal and $M_{\alpha}$ has been defined, then define $M_{\alpha + 1}$ as follows. If $M_{\alpha} = M$, then let $M_{\alpha +1} = M$. Otherwise choose the smallest $x \in M$ (with respect to the fixed well-ordering) such that $x \notin M_{\alpha}$. Since $S$ is flat over $R$, $(M/M_{\alpha}) \otimes_R S = M \otimes_R S/M_{\alpha} \otimes_R S$, so since $M_{\alpha} \otimes_R S$ is a direct sum of some $Q_i$, the same is true of $(M/M_{\alpha}) \otimes_R S$. By Lemma \ref{lemma-adapted-submodule}, we can find a countably generated $R$-submodule $P$ of $M/M_{\alpha}$ containing the image of $x$ in $M/M_{\alpha}$ and such that $P \otimes_R S$ (which equals $\Im(P \otimes_R S \to (M/M_{\alpha}) \otimes_R S)$ since $S$ is flat over $R$) is a direct sum of some $Q_i$. Since $M \otimes_R S = \bigoplus_{i \in I} Q_i$ is projective and projectivity passes to direct summands, $P \otimes_R S$ is also projective. Thus by Lemma \ref{lemma-ffdescent-countable-projectivity}, $P$ is projective. Finally we define $M_{\alpha + 1}$ to be the preimage of $P$ in $M$, so that $M_{\alpha + 1}/M_{\alpha} = P$ is countably generated and projective. In particular $M_{\alpha}$ is a direct summand of $M_{\alpha + 1}$ since projectivity of $M_{\alpha + 1}/M_{\alpha}$ implies the sequence $0 \to M_{\alpha} \to M_{\alpha + 1} \to M_{\alpha + 1}/M_{\alpha} \to 0$ splits. \medskip\noindent Transfinite induction on $M$ (using the fact that we constructed $M_{\alpha + 1}$ to contain the smallest $x \in M$ not contained in $M_{\alpha}$) shows that each $x \in M$ is contained in some $M_{\alpha}$. Thus, there is some large enough ordinal $\gamma$ satisfying: for each $x \in M$ there is $\alpha \in \gamma$ such that $x \in M_{\alpha}$. This means $(M_{\alpha})_{\alpha \in \gamma}$ satisfies property (1) of a Kaplansky d\'evissage of $M$. The other properties are clear by construction. We conclude $M = \bigoplus_{\alpha + 1 \in \gamma} M_{\alpha + 1}/M_{\alpha}$. Since each $M_{\alpha + 1}/M_{\alpha}$ is projective by construction, $M$ is projective. \end{proof} \section{Completion} \label{section-completion} % BEGIN ALGEBRA EDITORIAL ROUTE section-completion \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-completion}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-completion \noindent Suppose that $R$ is a ring and $I$ is an ideal. We define the {\it completion of $R$ with respect to $I$} to be the limit $$ R^\wedge = \lim_n R/I^n. $$ An element of $R^\wedge$ is given by a sequence of elements $f_n \in R/I^n$ such that $f_n \equiv f_{n + 1} \bmod I^n$ for all $n$. We will view $R^\wedge$ as an $R$-algebra. Similarly, if $M$ is an $R$-module then we define the {\it completion of $M$ with respect to $I$} to be the limit $$ M^\wedge = \lim_n M/I^nM. $$ An element of $M^\wedge$ is given by a sequence of elements $m_n \in M/I^nM$ such that $m_n \equiv m_{n + 1} \bmod I^nM$ for all $n$. We will view $M^\wedge$ as an $R^\wedge$-module. From this description it is clear that there are always canonical maps $$ M \longrightarrow M^\wedge \quad\text{and}\quad M \otimes_R R^\wedge \longrightarrow M^\wedge. $$ Moreover, given a map $\varphi : M \to N$ of modules we get an induced map $\varphi^\wedge : M^\wedge \to N^\wedge$ on completions making the diagram $$ \xymatrix{ M \ar[r] \ar[d] & N \ar[d] \\ M^\wedge \ar[r] & N^\wedge } $$ commute. In general completion is not an exact functor, see Examples, Section \ref{examples-section-completion-not-exact}. Here are some initial positive results. \begin{lemma} \label{lemma-completion-generalities} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $\varphi : M \to N$ be a map of $R$-modules. \begin{enumerate} \item If $M/IM \to N/IN$ is surjective, then $M^\wedge \to N^\wedge$ is surjective. \item If $M \to N$ is surjective, then $M^\wedge \to N^\wedge$ is surjective. \item If $0 \to K \to M \to N \to 0$ is a short exact sequence of $R$-modules and $N$ is flat, then $0 \to K^\wedge \to M^\wedge \to N^\wedge \to 0$ is a short exact sequence. \item The map $M \otimes_R R^\wedge \to M^\wedge$ is surjective for any finite $R$-module $M$. \end{enumerate} \end{lemma} \begin{proof} Assume $M/IM \to N/IN$ is surjective. Then the map $M/I^nM \to N/I^nN$ is surjective for each $n \geq 1$ by Nakayama's lemma. More precisely, apply Lemma \ref{lemma-NAK} part (11) to the map $M/I^nM \to N/I^nN$ over the ring $R/I^n$ and the nilpotent ideal $I/I^n$ to see this. Set $K_n = \{x \in M \mid \varphi(x) \in I^nN\}$. Thus we get short exact sequences $$ 0 \to K_n/I^nM \to M/I^nM \to N/I^nN \to 0 $$ We claim that the canonical map $K_{n + 1}/I^{n + 1}M \to K_n/I^nM$ is surjective. Namely, if $x \in K_n$ write $\varphi(x) = \sum z_j n_j$ with $z_j \in I^n$, $n_j \in N$. By assumption we can write $n_j = \varphi(m_j) + \sum z_{jk}n_{jk}$ with $m_j \in M$, $z_{jk} \in I$ and $n_{jk} \in N$. Hence $$ \varphi(x - \sum z_j m_j) = \sum z_jz_{jk} n_{jk}. $$ This means that $x' = x - \sum z_j m_j \in K_{n + 1}$ maps to $x \bmod I^nM$ which proves the claim. Now we may apply Lemma \ref{lemma-Mittag-Leffler} to the inverse system of short exact sequences above to see (1). Part (2) is a special case of (1). If the assumptions of (3) hold, then for each $n$ the sequence $$ 0 \to K/I^nK \to M/I^nM \to N/I^nN \to 0 $$ is short exact by Lemma \ref{lemma-flat-tor-zero}. Hence we can directly apply Lemma \ref{lemma-Mittag-Leffler} to conclude (3) is true. To see (4) choose generators $x_i \in M$, $i = 1, \ldots, n$. Then the map $R^{\oplus n} \to M$, $(a_1, \ldots, a_n) \mapsto \sum a_ix_i$ is surjective. Hence by (2) we see $(R^\wedge)^{\oplus n} \to M^\wedge$, $(a_1, \ldots, a_n) \mapsto \sum a_ix_i$ is surjective. Assertion (4) follows from this. \end{proof} \begin{definition} \label{definition-complete} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. We say $M$ is {\it $I$-adically complete} if the map $$ M \longrightarrow M^\wedge = \lim_n M/I^nM $$ is an isomorphism\footnote{This includes the condition that $\bigcap I^nM = 0$.}. We say $R$ is {\it $I$-adically complete} if $R$ is $I$-adically complete as an $R$-module. \end{definition} \noindent It is not true that the completion of an $R$-module $M$ with respect to $I$ is $I$-adically complete. For an example see Examples, Section \ref{examples-section-noncomplete-completion}. If the ideal is finitely generated, then the completion is complete. \begin{lemma} \label{lemma-hathat-finitely-generated} \begin{reference} \cite[Theorem 15]{Matlis}. The slick proof given here is from an email of Bjorn Poonen dated Nov 5, 2016. \end{reference} Let $R$ be a ring. Let $I$ be a finitely generated ideal of $R$. Let $M$ be an $R$-module. Then \begin{enumerate} \item the completion $M^\wedge$ is $I$-adically complete, and \item $I^nM^\wedge = \Ker(M^\wedge \to M/I^nM) = (I^nM)^\wedge$ for all $n \geq 1$. \end{enumerate} In particular $R^\wedge$ is $I$-adically complete, $I^nR^\wedge = (I^n)^\wedge$, and $R^\wedge/I^nR^\wedge = R/I^n$. \end{lemma} \begin{proof} Since $I$ is finitely generated, $I^n$ is finitely generated, say by $f_1, \ldots, f_r$. Applying Lemma \ref{lemma-completion-generalities} part (2) to the surjection $(f_1, \ldots, f_r) : M^{\oplus r} \to I^n M$ yields a surjection $$ (M^\wedge)^{\oplus r} \xrightarrow{(f_1, \ldots, f_r)} (I^n M)^\wedge = \lim_{m \geq n} I^n M/I^m M = \Ker(M^\wedge \to M/I^n M). $$ On the other hand, the image of $(f_1, \ldots, f_r) : (M^\wedge)^{\oplus r} \to M^\wedge$ is $I^n M^\wedge$. Thus $M^\wedge / I^n M^\wedge \simeq M/I^n M$. Taking inverse limits yields $(M^\wedge)^\wedge \simeq M^\wedge$; that is, $M^\wedge$ is $I$-adically complete. \end{proof} \begin{lemma} \label{lemma-completion-differ-by-torsion} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $0 \to M \to N \to Q \to 0$ be an exact sequence of $R$-modules such that $Q$ is annihilated by a power of $I$. Then completion produces an exact sequence $0 \to M^\wedge \to N^\wedge \to Q \to 0$. \end{lemma} \begin{proof} Say $I^c Q = 0$. Then $Q/I^nQ = Q$ for $n \geq c$. On the other hand, it is clear that $I^nM \subset M \cap I^nN \subset I^{n - c}M$ for $n \geq c$. Thus $M^\wedge = \lim M/(M \cap I^n N)$. Apply Lemma \ref{lemma-Mittag-Leffler} to the system of exact sequences $$ 0 \to M/(M \cap I^n N) \to N/I^n N \to Q \to 0 $$ for $n \geq c$ to conclude. \end{proof} \begin{lemma} \label{lemma-hathat} \begin{reference} Taken from an unpublished note of Lenstra and de Smit. \end{reference} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Denote $K_n = \Ker(M^\wedge \to M/I^nM)$. Then $M^\wedge$ is $I$-adically complete if and only if $K_n$ is equal to $I^nM^\wedge$ for all $n \geq 1$. \end{lemma} \begin{proof} The module $I^n M^\wedge$ is contained in $K_n$. Thus for each $n \geq 1$ there is a canonical exact sequence $$ 0 \to K_n/I^nM^\wedge \to M^\wedge/I^nM^\wedge \to M/I^nM \to 0. $$ As $I^nM^\wedge$ maps onto $I^nM/I^{n + 1}M$ we see that $K_{n + 1} + I^n M^\wedge = K_n$. Thus the inverse system $\{K_n/I^n M^\wedge\}_{n \geq 1}$ has surjective transition maps. By Lemma \ref{lemma-Mittag-Leffler} we see that there is a short exact sequence $$ 0 \to \lim_n K_n/I^n M^\wedge \to (M^\wedge)^\wedge \to M^\wedge \to 0 $$ Hence $M^\wedge$ is complete if and only if $K_n/I^n M^\wedge = 0$ for all $n \geq 1$. \end{proof} \begin{lemma} \label{lemma-radical-completion} Let $R$ be a ring, let $I \subset R$ be an ideal, and let $R^\wedge = \lim R/I^n$. \begin{enumerate} \item any element of $R^\wedge$ which maps to a unit of $R/I$ is a unit, \item any element of $1 + I$ maps to an invertible element of $R^\wedge$, \item any element of $1 + IR^\wedge$ is invertible in $R^\wedge$, and \item the ideals $IR^\wedge$ and $\Ker(R^\wedge \to R/I)$ are contained in the Jacobson radical of $R^\wedge$. \end{enumerate} \end{lemma} \begin{proof} Let $x \in R^\wedge$ map to a unit $x_1$ in $R/I$. Then $x$ maps to a unit $x_n$ in $R/I^n$ for every $n$ by Lemma \ref{lemma-locally-nilpotent-unit}. Hence $y = (x_n^{-1}) \in \lim R/I^n = R^\wedge$ is an inverse to $x$. Parts (2) and (3) follow immediately from (1). Part (4) follows from (1) and Lemma \ref{lemma-contained-in-radical}. \end{proof} \begin{lemma} \label{lemma-when-surjective-to-completion} Let $A$ be a ring. Let $I = (f_1, \ldots, f_r)$ be a finitely generated ideal. Let $M$ be an $A$-module. If $M \to \lim M/f_i^nM$ is surjective for each $i$, then $M \to \lim M/I^nM$ is surjective. \end{lemma} \begin{proof} Note that $\lim M/I^nM = \lim M/(f_1^n, \ldots, f_r^n)M$ as $I^n \supset (f_1^n, \ldots, f_r^n) \supset I^{rn}$. An element $\xi$ of $\lim M/(f_1^n, \ldots, f_r^n)M$ can be symbolically written as $$ \xi = \sum\nolimits_{n \geq 0} \sum\nolimits_i f_i^n x_{n, i} $$ with $x_{n, i} \in M$. If $M \to \lim M/f_i^nM$ is surjective, then there is an $x_i \in M$ mapping to $\sum x_{n, i} f_i^n$ in $\lim M/f_i^nM$. Then $x = \sum x_i$ maps to $\xi$ in $\lim M/I^nM$. \end{proof} \begin{lemma} \label{lemma-complete-by-sub} Let $A$ be a ring. Let $I \subset J \subset A$ be ideals. Let $M$ be an $A$-module. If $M$ is $J$-adically complete and $I$ is finitely generated, then $M$ is $I$-adically complete. \end{lemma} \begin{proof} Assume $M$ is $J$-adically complete and $I$ is finitely generated. We have $\bigcap I^nM = 0$ because $\bigcap J^nM = 0$. By Lemma \ref{lemma-when-surjective-to-completion} it suffices to prove the surjectivity of $M \to \lim M/I^nM$ in case $I$ is generated by a single element. Say $I = (f)$. Let $x_n \in M$ with $x_{n + 1} - x_n \in f^nM$. We have to show there exists an $x \in M$ such that $x_n - x \in f^nM$ for all $n$. As $x_{n + 1} - x_n \in J^nM$ and as $M$ is $J$-adically complete, there exists an element $x \in M$ such that $x_n - x \in J^nM$. Replacing $x_n$ by $x_n - x$ we may assume that $x_n \in J^nM$. To finish the proof we will show that this implies $x_n \in I^nM$. Namely, write $x_n - x_{n + 1} = f^nz_n$. Then $$ x_n = f^n(z_n + fz_{n + 1} + f^2z_{n + 2} + \ldots) $$ The sum $z_n + fz_{n + 1} + f^2z_{n + 2} + \ldots$ converges in $M$ as $f^c \in J^c$. The sum $f^n(z_n + fz_{n + 1} + f^2z_{n + 2} + \ldots)$ converges in $M$ to $x_n$ because the partial sums equal $x_n - x_{n + c}$ and $x_{n + c} \in J^{n + c}M$. \end{proof} \begin{lemma} \label{lemma-change-ideal-completion} Let $R$ be a ring. Let $I$, $J$ be ideals of $R$. Assume there exist integers $c, d > 0$ such that $I^c \subset J$ and $J^d \subset I$. Then completion with respect to $I$ agrees with completion with respect to $J$ for any $R$-module. In particular an $R$-module $M$ is $I$-adically complete if and only if it is $J$-adically complete. \end{lemma} \begin{proof} Consider the system of maps $M/I^nM \to M/J^{\lfloor n/c \rfloor}M$ and the system of maps $M/J^mM \to M/I^{\lfloor m/d \rfloor}M$ to get mutually inverse maps between the completions. \end{proof} \begin{lemma} \label{lemma-quotient-complete} Let $R$ be a ring. Let $I$ be an ideal of $R$. Let $M$ be an $I$-adically complete $R$-module, and let $K \subset M$ be an $R$-submodule. The following are equivalent \begin{enumerate} \item $K = \bigcap (K + I^nM)$ and \item $M/K$ is $I$-adically complete. \end{enumerate} \end{lemma} \begin{proof} Set $N = M/K$. By Lemma \ref{lemma-completion-generalities} the map $M = M^\wedge \to N^\wedge$ is surjective. Hence $N \to N^\wedge$ is surjective. It is easy to see that the kernel of $N \to N^\wedge$ is the module $\bigcap (K + I^nM) / K$. \end{proof} \begin{lemma} \label{lemma-when-finite-module-complete-over-complete-ring} Let $R$ be a ring. Let $I$ be an ideal of $R$. Let $M$ be an $R$-module. If (a) $R$ is $I$-adically complete, (b) $M$ is a finite $R$-module, and (c) $\bigcap I^nM = (0)$, then $M$ is $I$-adically complete. \end{lemma} \begin{proof} By Lemma \ref{lemma-completion-generalities} the map $M = M \otimes_R R = M \otimes_R R^\wedge \to M^\wedge$ is surjective. The kernel of this map is $\bigcap I^nM$ hence zero by assumption. Hence $M \cong M^\wedge$ and $M$ is complete. \end{proof} \begin{lemma} \label{lemma-finite-over-complete-ring} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Assume \begin{enumerate} \item $R$ is $I$-adically complete, \item $\bigcap_{n \geq 1} I^nM = (0)$, and \item $M/IM$ is a finite $R/I$-module. \end{enumerate} Then $M$ is a finite $R$-module. \end{lemma} \begin{proof} Let $x_1, \ldots, x_n \in M$ be elements whose images in $M/IM$ generate $M/IM$ as an $R/I$-module. Denote by $M' \subset M$ the $R$-submodule generated by $x_1, \ldots, x_n$. By Lemma \ref{lemma-completion-generalities} the map $(M')^\wedge \to M^\wedge$ is surjective. Since $\bigcap I^nM = 0$ we see in particular that $\bigcap I^nM' = (0)$. Hence by Lemma \ref{lemma-when-finite-module-complete-over-complete-ring} we see that $M'$ is complete, and we conclude that $M' \to M^\wedge$ is surjective. Finally, the kernel of $M \to M^\wedge$ is zero since it is equal to $\bigcap I^nM = (0)$. Hence we conclude that $M \cong M' \cong M^\wedge$ is finitely generated. \end{proof} \section{Completion for Noetherian rings} \label{section-completion-noetherian} % BEGIN ALGEBRA EDITORIAL ROUTE section-completion-noetherian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-completion-noetherian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-completion-noetherian \noindent In this section we discuss completion with respect to ideals in Noetherian rings. \begin{lemma} \label{lemma-completion-tensor} Let $I$ be an ideal of a Noetherian ring $R$. Denote by ${}^\wedge$ completion with respect to $I$. \begin{enumerate} \item If $K \to N$ is an injective map of finite $R$-modules, then the map on completions $K^\wedge \to N^\wedge$ is injective. \item If $0 \to K \to N \to M \to 0$ is a short exact sequence of finite $R$-modules, then $0 \to K^\wedge \to N^\wedge \to M^\wedge \to 0$ is a short exact sequence. \item If $M$ is a finite $R$-module, then $M^\wedge = M \otimes_R R^\wedge$. \end{enumerate} \end{lemma} \begin{proof} Setting $M = N/K$ we find that part (1) follows from part (2). Let $0 \to K \to N \to M \to 0$ be as in (2). For each $n$ we get the short exact sequence $$ 0 \to K/(I^nN \cap K) \to N/I^nN \to M/I^nM \to 0. $$ By Lemma \ref{lemma-Mittag-Leffler} we obtain the exact sequence $$ 0 \to \lim K/(I^nN \cap K) \to N^\wedge \to M^\wedge \to 0. $$ By the Artin-Rees Lemma \ref{lemma-Artin-Rees} we may choose $c$ such that $I^nK \subset I^n N \cap K \subset I^{n-c} K$ for $n \geq c$. Hence $K^\wedge = \lim K/I^nK = \lim K/(I^nN \cap K)$ and we conclude that (2) is true. \medskip\noindent Let $M$ be as in (3) and let $0 \to K \to R^{\oplus t} \to M \to 0$ be a presentation of $M$. We get a commutative diagram $$ \xymatrix{ & K \otimes_R R^\wedge \ar[r] \ar[d] & R^{\oplus t} \otimes_R R^\wedge \ar[r] \ar[d] & M \otimes_R R^\wedge \ar[r] \ar[d] & 0 \\ 0 \ar[r] & K^\wedge \ar[r] & (R^{\oplus t})^\wedge \ar[r] & M^\wedge \ar[r] & 0 } $$ The top row is exact, see Section \ref{section-flat}. The bottom row is exact by part (2). By Lemma \ref{lemma-completion-generalities} the vertical arrows are surjective. The middle vertical arrow is an isomorphism. We conclude (3) holds by the Snake Lemma \ref{lemma-snake}. \end{proof} \begin{lemma} \label{lemma-completion-flat} Let $I$ be an ideal of a Noetherian ring $R$. Denote by ${}^\wedge$ completion with respect to $I$. \begin{enumerate} \item The ring map $R \to R^\wedge$ is flat. \item The functor $M \mapsto M^\wedge$ is exact on the category of finitely generated $R$-modules. \end{enumerate} \end{lemma} \begin{proof} Consider $J \otimes_R R^\wedge \to R \otimes_R R^\wedge = R^\wedge$ where $J$ is an arbitrary ideal of $R$. According to Lemma \ref{lemma-completion-tensor} this is identified with $J^\wedge \to R^\wedge$ and $J^\wedge \to R^\wedge$ is injective. Part (1) follows from Lemma \ref{lemma-flat}. Part (2) is a reformulation of Lemma \ref{lemma-completion-tensor} part (2). \end{proof} \begin{lemma} \label{lemma-completion-faithfully-flat} Let $I$ be an ideal of a Noetherian ring $R$. Denote by $R^\wedge$ the completion of $R$ with respect to $I$. If $I$ is contained in the Jacobson radical of $R$, then the ring map $R \to R^\wedge$ is faithfully flat. In particular, if $(R, \mathfrak m)$ is a Noetherian local ring, then the completion $\lim_n R/\mathfrak m^n$ is faithfully flat. \end{lemma} \begin{proof} By Lemma \ref{lemma-completion-flat} it is flat. The composition $R \to R^\wedge \to R/I$ where the last map is the projection map $R^\wedge \to R/I$ shows that any maximal ideal of $R$ is in the image of $\Spec(R^\wedge) \to \Spec(R)$. Hence the map is faithfully flat by Lemma \ref{lemma-ff}. \end{proof} \begin{lemma} \label{lemma-completion-complete} Let $R$ be a Noetherian ring. Let $I$ be an ideal of $R$. Let $M$ be an $R$-module. Then the completion $M^\wedge$ of $M$ with respect to $I$ is $I$-adically complete, $I^n M^\wedge = (I^nM)^\wedge$, and $M^\wedge/I^nM^\wedge = M/I^nM$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-hathat-finitely-generated} because $I$ is a finitely generated ideal. \end{proof} \begin{lemma} \label{lemma-completion-Noetherian} Let $I$ be an ideal of a ring $R$. Assume \begin{enumerate} \item $R/I$ is a Noetherian ring, \item $I$ is finitely generated. \end{enumerate} Then the completion $R^\wedge$ of $R$ with respect to $I$ is a Noetherian ring complete with respect to $IR^\wedge$. \end{lemma} \begin{proof} By Lemma \ref{lemma-hathat-finitely-generated} we see that $R^\wedge$ is $I$-adically complete. Hence it is also $IR^\wedge$-adically complete. Since $R^\wedge/IR^\wedge = R/I$ is Noetherian we see that after replacing $R$ by $R^\wedge$ we may in addition to assumptions (1) and (2) assume that also $R$ is $I$-adically complete. \medskip\noindent Let $f_1, \ldots, f_t$ be generators of $I$. Then there is a surjection of rings $R/I[T_1, \ldots, T_t] \to \bigoplus I^n/I^{n + 1}$ mapping $T_i$ to the element $\overline{f}_i \in I/I^2$. Hence $\bigoplus I^n/I^{n + 1}$ is a Noetherian ring. Let $J \subset R$ be an ideal. Consider the ideal $$ \bigoplus J \cap I^n/J \cap I^{n + 1} \subset \bigoplus I^n/I^{n + 1}. $$ Let $\overline{g}_1, \ldots, \overline{g}_m$ be generators of this ideal. We may choose $\overline{g}_j$ to be a homogeneous element of degree $d_j$ and we may pick $g_j \in J \cap I^{d_j}$ mapping to $\overline{g}_j \in J \cap I^{d_j}/J \cap I^{d_j + 1}$. We claim that $g_1, \ldots, g_m$ generate $J$. \medskip\noindent Let $x \in J \cap I^n$. There exist $a_j \in I^{\max(0, n - d_j)}$ such that $x - \sum a_j g_j \in J \cap I^{n + 1}$. The reason is that $J \cap I^n/J \cap I^{n + 1}$ is equal to $\sum_{j:\,d_j \leq n} \overline{g}_j I^{n - d_j}/I^{n - d_j + 1}$ by our choice of $g_1, \ldots, g_m$. Hence starting with $x \in J$ we can find a sequence of vectors $(a_{1, n}, \ldots, a_{m, n})_{n \geq 0}$ with $a_{j, n} \in I^{\max(0, n - d_j)}$ such that $$ x = \sum\nolimits_{n = 0, \ldots, N} \sum\nolimits_{j = 1, \ldots, m} a_{j, n} g_j \bmod I^{N + 1} $$ Setting $A_j = \sum_{n \geq 0} a_{j, n}$ we see that $x = \sum A_j g_j$ as $R$ is complete. Hence $J$ is finitely generated and we win. \end{proof} \begin{lemma} \label{lemma-completion-Noetherian-Noetherian} Let $R$ be a Noetherian ring. Let $I$ be an ideal of $R$. The completion $R^\wedge$ of $R$ with respect to $I$ is Noetherian. \end{lemma} \begin{proof} This is a consequence of Lemma \ref{lemma-completion-Noetherian}. It can also be seen directly as follows. Choose generators $f_1, \ldots, f_n$ of $I$. Consider the map $$ R[[x_1, \ldots, x_n]] \longrightarrow R^\wedge, \quad x_i \longmapsto f_i. $$ This is a well defined and surjective ring map (details omitted). Since $R[[x_1, \ldots, x_n]]$ is Noetherian (see Lemma \ref{lemma-Noetherian-power-series}) we win. \end{proof} \noindent Suppose $R \to S$ is a local homomorphism of local rings $(R, \mathfrak m)$ and $(S, \mathfrak n)$. Let $S^\wedge$ be the completion of $S$ with respect to $\mathfrak n$. In general $S^\wedge$ is not the $\mathfrak m$-adic completion of $S$. If $\mathfrak n^t \subset \mathfrak mS$ for some $t \geq 1$ then we do have $S^\wedge = \lim S/\mathfrak m^nS$ by Lemma \ref{lemma-change-ideal-completion}. In some cases this even implies that $S^\wedge$ is finite over $R^\wedge$. \begin{lemma} \label{lemma-finite-after-completion} Let $R \to S$ be a local homomorphism of local rings $(R, \mathfrak m)$ and $(S, \mathfrak n)$. Let $R^\wedge$, resp.\ $S^\wedge$ be the completion of $R$, resp.\ $S$ with respect to $\mathfrak m$, resp.\ $\mathfrak n$. If $\mathfrak m$ and $\mathfrak n$ are finitely generated and $\dim_{\kappa(\mathfrak m)} S/\mathfrak mS < \infty$, then \begin{enumerate} \item $S^\wedge$ is equal to the $\mathfrak m$-adic completion of $S$, and \item $S^\wedge$ is a finite $R^\wedge$-module. \end{enumerate} \end{lemma} \begin{proof} We have $\mathfrak mS \subset \mathfrak n$ because $R \to S$ is a local ring map. The assumption $\dim_{\kappa(\mathfrak m)} S/\mathfrak mS < \infty$ implies that $S/\mathfrak mS$ is an Artinian ring, see Lemma \ref{lemma-finite-dimensional-algebra}. Hence it has dimension $0$, see Lemma \ref{lemma-Noetherian-dimension-0}, hence $\mathfrak n = \sqrt{\mathfrak mS}$. This and the fact that $\mathfrak n$ is finitely generated implies that $\mathfrak n^t \subset \mathfrak mS$ for some $t \geq 1$. By Lemma \ref{lemma-change-ideal-completion} we see that $S^\wedge$ can be identified with the $\mathfrak m$-adic completion of $S$. As $\mathfrak m$ is finitely generated we see from Lemma \ref{lemma-hathat-finitely-generated} that $S^\wedge$ and $R^\wedge$ are $\mathfrak m$-adically complete. At this point we may apply Lemma \ref{lemma-finite-over-complete-ring} to $S^\wedge$ as an $R^\wedge$-module to conclude. \end{proof} \begin{lemma} \label{lemma-completion-finite-extension} Let $R$ be a Noetherian ring. Let $R \to S$ be a finite ring map. Let $\mathfrak p \subset R$ be a prime and let $\mathfrak q_1, \ldots, \mathfrak q_m$ be the primes of $S$ lying over $\mathfrak p$ (Lemma \ref{lemma-finite-finite-fibres}). Then $$ R_\mathfrak p^\wedge \otimes_R S = (S_\mathfrak p)^\wedge = S_{\mathfrak q_1}^\wedge \times \ldots \times S_{\mathfrak q_m}^\wedge $$ where the $(S_\mathfrak p)^\wedge$ is the completion with respect to $\mathfrak p$ and the local rings $R_\mathfrak p$ and $S_{\mathfrak q_i}$ are completed with respect to their maximal ideals. \end{lemma} \begin{proof} We may replace $R$ by the localization $R_\mathfrak p$ and $S$ by $S_\mathfrak p = S \otimes_R R_\mathfrak p$. Hence we may assume that $R$ is a local Noetherian ring and that $\mathfrak p = \mathfrak m$ is its maximal ideal. The $\mathfrak q_iS_{\mathfrak q_i}$-adic completion $S_{\mathfrak q_i}^\wedge$ is equal to the $\mathfrak m$-adic completion by Lemma \ref{lemma-finite-after-completion}. For every $n \geq 1$ prime ideals of $S/\mathfrak m^nS$ are in 1-to-1 correspondence with the maximal ideals $\mathfrak q_1, \ldots, \mathfrak q_m$ of $S$ (by going up for $S$ over $R$, see Lemma \ref{lemma-integral-going-up}). Hence $S/\mathfrak m^nS = \prod S_{\mathfrak q_i}/\mathfrak m^nS_{\mathfrak q_i}$ by Lemma \ref{lemma-artinian-finite-length} (using for example Proposition \ref{proposition-dimension-zero-ring} to see that $S/\mathfrak m^nS$ is Artinian). Hence the $\mathfrak m$-adic completion $S^\wedge$ of $S$ is equal to $\prod S_{\mathfrak q_i}^\wedge$. Finally, we have $R^\wedge \otimes_R S = S^\wedge$ by Lemma \ref{lemma-completion-tensor}. \end{proof} \begin{lemma} \label{lemma-split-completed-sequence} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $0 \to K \to P \to M \to 0$ be a short exact sequence of $R$-modules. If $M$ is flat over $R$ and $M/IM$ is a projective $R/I$-module, then the sequence of $I$-adic completions $$ 0 \to K^\wedge \to P^\wedge \to M^\wedge \to 0 $$ is a split exact sequence. \end{lemma} \begin{proof} As $M$ is flat, each of the sequences $$ 0 \to K/I^nK \to P/I^nP \to M/I^nM \to 0 $$ is short exact, see Lemma \ref{lemma-flat-tor-zero} and the sequence $0 \to K^\wedge \to P^\wedge \to M^\wedge \to 0$ is a short exact sequence, see Lemma \ref{lemma-completion-generalities}. It suffices to show that we can find splittings $s_n : M/I^nM \to P/I^nP$ such that $s_{n + 1} \bmod I^n = s_n$. We will construct these $s_n$ by induction on $n$. Pick any splitting $s_1$, which exists as $M/IM$ is a projective $R/I$-module. Assume given $s_n$ for some $n > 0$. Set $P_{n + 1} = \{x \in P \mid x \bmod I^nP \in \Im(s_n)\}$. The map $\pi : P_{n + 1}/I^{n + 1}P_{n + 1} \to M/I^{n + 1}M$ is surjective (details omitted). As $M/I^{n + 1}M$ is projective as a $R/I^{n + 1}$-module by Lemma \ref{lemma-lift-projective} we may choose a section $t : M/I^{n + 1}M \to P_{n + 1}/I^{n + 1}P_{n + 1}$ of $\pi$. Setting $s_{n + 1}$ equal to the composition of $t$ with the canonical map $P_{n + 1}/I^{n + 1}P_{n + 1} \to P/I^{n + 1}P$ works. \end{proof} \begin{lemma} \label{lemma-complete-modulo-nilpotent} Let $A$ be a Noetherian ring. Let $I, J \subset A$ be ideals. If $A$ is $I$-adically complete and $A/I$ is $J$-adically complete, then $A$ is $J$-adically complete. \end{lemma} \begin{proof} Let $B$ be the $(I + J)$-adic completion of $A$. By Lemma \ref{lemma-completion-tensor} $B/IB$ is the $J$-adic completion of $A/I$ hence isomorphic to $A/I$ by assumption. Moreover $B$ is $I$-adically complete by Lemma \ref{lemma-complete-by-sub}. Hence $B$ is a finite $A$-module by Lemma \ref{lemma-finite-over-complete-ring}. By Nakayama's lemma (Lemma \ref{lemma-NAK} using that $I$ is in the Jacobson radical of $A$ by Lemma \ref{lemma-radical-completion}) we find that $A \to B$ is surjective. The map $A \to B$ is flat by Lemma \ref{lemma-completion-flat}. The image of $\Spec(B) \to \Spec(A)$ contains $V(I)$ and as $I$ is contained in the Jacobson radical of $A$ we find $A \to B$ is faithfully flat (Lemma \ref{lemma-ff-rings}). Thus $A \to B$ is injective. Thus $A$ is complete with respect to $I + J$, hence a fortiori complete with respect to $J$. \end{proof} \section{Taking limits of modules} \label{section-limits} % BEGIN ALGEBRA EDITORIAL ROUTE section-limits \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-limits}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-limits \noindent In this section we discuss what happens when we take a limit of modules. \begin{lemma} \label{lemma-limit-complete-pre} Let $I \subset A$ be a finitely generated ideal of a ring. Let $(M_n)$ be an inverse system of $A$-modules with $I^n M_n = 0$. Then $M = \lim M_n$ is $I$-adically complete. \end{lemma} \begin{proof} We have $M \to M/I^nM \to M_n$. Taking the limit we get $M \to M^\wedge \to M$. Hence $M$ is a direct summand of $M^\wedge$. Since $M^\wedge$ is $I$-adically complete by Lemma \ref{lemma-hathat-finitely-generated}, so is $M$. \end{proof} \begin{lemma} \label{lemma-limit-complete} Let $I \subset A$ be a finitely generated ideal of a ring. Let $(M_n)$ be an inverse system of $A$-modules with $M_n = M_{n + 1}/I^nM_{n + 1}$. Set $M = \lim M_n$. Then $M/I^nM = M_n$ and $M$ is $I$-adically complete. \end{lemma} \begin{proof} By Lemma \ref{lemma-limit-complete-pre} we see that $M$ is $I$-adically complete. Since the transition maps are surjective, the maps $M \to M_n$ are surjective. Consider the inverse system of short exact sequences $$ 0 \to N_n \to M \to M_n \to 0 $$ defining $N_n$. Since $M_n = M_{n + 1}/I^nM_{n + 1}$ the map $N_{n + 1} + I^nM \to N_n$ is surjective. Hence $N_{n + 1}/(N_{n + 1} \cap I^{n + 1}M) \to N_n/(N_n \cap I^nM)$ is surjective. Taking the inverse limit of the short exact sequences $$ 0 \to N_n/(N_n \cap I^nM) \to M/I^nM \to M_n \to 0 $$ we obtain an exact sequence $$ 0 \to \lim N_n/(N_n \cap I^nM) \to M^\wedge \to M $$ Since $M$ is $I$-adically complete we conclude that $\lim N_n/(N_n \cap I^nM) = 0$ and hence by the surjectivity of the transition maps we get $N_n/(N_n \cap I^nM) = 0$ for all $n$. Thus $M_n = M/I^nM$ as desired. \end{proof} \begin{lemma} \label{lemma-finiteness-graded} Let $A$ be a Noetherian graded ring. Let $I \subset A_+$ be a homogeneous ideal. Let $(N_n)$ be an inverse system of finite graded $A$-modules with $N_n = N_{n + 1}/I^n N_{n + 1}$. Then there is a finite graded $A$-module $N$ such that $N_n = N/I^nN$ as graded modules for all $n$. \end{lemma} \begin{proof} If $N_1=0$, all $N_n$ vanish and we take $N=0$. Otherwise pick $r>0$ and homogeneous elements $x_{1, 1}, \ldots, x_{1, r} \in N_1$ of degrees $d_1, \ldots, d_r$ generating $N_1$. Since the transition maps are surjective, we can pick a compatible system of homogeneous elements $x_{n, i} \in N_n$ lifting $x_{1, i}$. By the graded Nakayama lemma (Lemma \ref{lemma-graded-NAK}) we see that $N_n$ is generated by the elements $x_{n, 1}, \ldots, x_{n, r}$ sitting in degrees $d_1, \ldots, d_r$. Thus for $m \leq n$ we see that $N_n \to N_n/I^m N_n$ is an isomorphism in degrees $< \min(d_i) + m$ (as $I^mN_n$ is zero in those degrees). Put $b(d)=\max\{1,1+d-\min(d_i)\}$. The inverse system of degree $d$ parts $$ \ldots = N_{b(d)+2, d} = N_{b(d)+1, d} = N_{b(d), d} $$ stabilizes as indicated. Let $N$ be the graded $A$-module whose $d$th graded part is this stabilization. In particular, we have the elements $x_i = \lim x_{n, i}$ in $N$. We claim the $x_i$ generate $N$: any $x \in N_d$ is a linear combination of $x_1, \ldots, x_r$ because we can check this in $N_{b(d), d}$ where it holds as $x_{b(d), i}$ generate $N_{b(d)}$. Finally, the reader checks that the surjective map $N/I^nN \to N_n$ is an isomorphism by checking to see what happens in each degree as before. Details omitted. \end{proof} \begin{lemma} \label{lemma-daniel-litt} Let $A$ be a graded ring. Let $I \subset A_+$ be a homogeneous ideal. Denote $A' = \lim A/I^n$. Let $(G_n)$ be an inverse system of graded $A$-modules with $G_n$ annihilated by $I^n$. Let $M$ be a graded $A$-module and let $\varphi_n : M \to G_n$ be a compatible system of graded $A$-module maps. If the induced map $$ \varphi : M \otimes_A A' \longrightarrow \lim G_n $$ is an isomorphism, then $M_d \to \lim G_{n, d}$ is an isomorphism for all $d \in \mathbf{Z}$. \end{lemma} \begin{proof} By convention graded rings are in degrees $\geq 0$ and graded modules may have nonzero parts of any degree, see Section \ref{section-graded}. The map $\varphi$ exists because $\lim G_n$ is a module over $A'$ as $G_n$ is annihilated by $I^n$. Another useful thing to keep in mind is that we have $$ \bigoplus\nolimits_{d \in \mathbf{Z}} \lim G_{n, d} \subset \lim G_n \subset \prod\nolimits_{d \in \mathbf{Z}} \lim G_{n, d} $$ where a subscript ${\ }_d$ indicates the $d$th graded part. \medskip\noindent Injective. Let $x \in M_d$. If $x \mapsto 0$ in $\lim G_{n, d}$ then $x \otimes 1 = 0$ in $M \otimes_A A'$. Then we can find a finitely generated submodule $M' \subset M$ with $x \in M'$ such that $x \otimes 1$ is zero in $M' \otimes_A A'$. Say $M'$ is generated by homogeneous elements sitting in degrees $d_1, \ldots, d_r$. Let $n = d - \min(d_i) + 1$. Since $A'$ has a map to $A/I^n$ and since $A \to A/I^n$ is an isomorphism in degrees $\leq n - 1$ we see that $M' \to M' \otimes_A A'$ is injective in degrees $<\min(d_i)+n$ (in particular, in degree $d$). Thus $x = 0$ as desired. \medskip\noindent Surjective. Let $y \in \lim G_{n, d}$. Choose a finite sum $\sum x_i \otimes f'_i$ in $M \otimes_A A'$ mapping to $y$. We may assume $x_i$ is homogeneous, say of degree $d_i$. Observe that although $A'$ is not a graded ring, it is a limit of the graded rings $A/I^nA$ and moreover, in any given degree the transition maps eventually become isomorphisms (see above). This gives $$ A = \bigoplus\nolimits_{d \geq 0} A_d \subset A' \subset \prod\nolimits_{d \geq 0} A_d $$ Thus we can write $$ f'_i = \sum\nolimits_{j = 0, \ldots, d - d_i - 1} f_{i, j} + f_i + g'_i $$ with $f_{i, j} \in A_j$, $f_i \in A_{d - d_i}$, and $g'_i \in A'$ mapping to zero in $\prod_{j \leq d - d_i} A_j$. Now if we compute $\varphi_n(\sum_{i, j} f_{i, j}x_i) \in G_n$, then we get a sum of homogeneous elements of degree $< d$. Hence $\varphi(\sum x_i \otimes f_{i, j})$ maps to zero in $\lim G_{n, d}$. Similarly, a computation shows the element $\varphi(\sum x_i \otimes g'_i)$ maps to zero in $\prod_{d' \leq d} \lim G_{n, d'}$. Since we know that $\varphi(\sum x_i \otimes f'_i)$ is $y$, we conclude that $\sum f_ix_i \in M_d$ maps to $y$ as desired. \end{proof} \section{Criteria for flatness} \label{section-criteria-flatness} % BEGIN ALGEBRA EDITORIAL ROUTE section-criteria-flatness \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-criteria-flatness}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-criteria-flatness \noindent In this section we prove some important technical lemmas in the Noetherian case. We will (partially) generalize these to the non-Noetherian case in Section \ref{section-more-flatness-criteria}. \begin{lemma} \label{lemma-mod-injective} Suppose that $R \to S$ is a local homomorphism of local rings with $S$ Noetherian. Denote by $\mathfrak m$ the maximal ideal of $R$. Let $M$ be a flat $R$-module and $N$ a finite $S$-module. Let $u : N \to M$ be a map of $R$-modules. If $\overline{u} : N/\mathfrak m N \to M/\mathfrak m M$ is injective then $u$ is injective. In this case $M/u(N)$ is flat over $R$. \end{lemma} \begin{proof} First we claim that $u_n : N/{\mathfrak m}^nN \to M/{\mathfrak m}^nM$ is injective for all $n \geq 1$. We proceed by induction, the base case is that $\overline{u} = u_1$ is injective. By our assumption that $M$ is flat over $R$ we have a short exact sequence $0 \to M \otimes_R {\mathfrak m}^n/{\mathfrak m}^{n + 1} \to M/{\mathfrak m}^{n + 1}M \to M/{\mathfrak m}^n M \to 0$. Also, $M \otimes_R {\mathfrak m}^n/{\mathfrak m}^{n + 1} = M/{\mathfrak m}M \otimes_{R/{\mathfrak m}} {\mathfrak m}^n/{\mathfrak m}^{n + 1}$. We have a similar exact sequence $N \otimes_R {\mathfrak m}^n/{\mathfrak m}^{n + 1} \to N/{\mathfrak m}^{n + 1}N \to N/{\mathfrak m}^n N \to 0$ for $N$ except we do not have the zero on the left. We also have $N \otimes_R {\mathfrak m}^n/{\mathfrak m}^{n + 1} = N/{\mathfrak m}N \otimes_{R/{\mathfrak m}} {\mathfrak m}^n/{\mathfrak m}^{n + 1}$. Thus the map $u_{n + 1}$ is injective as both $u_n$ and the map $\overline{u} \otimes \text{id}_{{\mathfrak m}^n/{\mathfrak m}^{n + 1}}$ are. \medskip\noindent By Krull's intersection theorem (Lemma \ref{lemma-intersect-powers-ideal-module-zero}) applied to $N$ over the ring $S$ and the ideal $\mathfrak mS$ we have $\bigcap \mathfrak m^nN = 0$. Thus the injectivity of $u_n$ for all $n$ implies $u$ is injective. \medskip\noindent To show that $M/u(N)$ is flat over $R$, it suffices to show that $\text{Tor}_1^R(M/u(N), R/I) = 0$ for every ideal $I \subset R$, see Lemma \ref{lemma-characterize-flat}. From the short exact sequence $$ 0 \to N \xrightarrow{u} M \to M/u(N) \to 0 $$ and the flatness of $M$ we obtain an exact sequence of Tors $$ 0 \to \text{Tor}_1^R(M/u(N), R/I) \to N/IN \to M/IM $$ See Lemma \ref{lemma-long-exact-sequence-tor}. Thus it suffices to show that $N/IN$ injects into $M/IM$. Note that $R/I \to S/IS$ is a local homomorphism of local rings with $S/IS$ Noetherian, $N/IN \to M/IM$ is a map of $R/I$-modules, $N/IN$ is finite over $S/IS$, and $M/IM$ is flat over $R/I$ and $u \bmod I : N/IN \to M/IM$ is injective modulo $\mathfrak m$. Thus we may apply the first part of the proof to $u \bmod I$ and we conclude. \end{proof} \begin{lemma} \label{lemma-grothendieck} Suppose that $R \to S$ is a flat and local ring homomorphism of Noetherian local rings. Denote by $\mathfrak m$ the maximal ideal of $R$. Suppose $f \in S$ is a nonzerodivisor in $S/{\mathfrak m}S$. Then $S/fS$ is flat over $R$, and $f$ is a nonzerodivisor in $S$. \end{lemma} \begin{proof} Follows directly from Lemma \ref{lemma-mod-injective}. \end{proof} \begin{lemma} \label{lemma-grothendieck-regular-sequence} Suppose that $R \to S$ is a flat and local ring homomorphism of Noetherian local rings. Denote by $\mathfrak m$ the maximal ideal of $R$. Suppose $f_1, \ldots, f_c$ is a sequence of elements of $S$ such that the images $\overline{f}_1, \ldots, \overline{f}_c$ form a regular sequence in $S/{\mathfrak m}S$. Then $f_1, \ldots, f_c$ is a regular sequence in $S$ and each of the quotients $S/(f_1, \ldots, f_i)$ is flat over $R$. \end{lemma} \begin{proof} Induction and Lemma \ref{lemma-grothendieck}. \end{proof} \begin{lemma} \label{lemma-free-fibre-flat-free} Let $R \to S$ be a local homomorphism of Noetherian local rings. Let $\mathfrak m$ be the maximal ideal of $R$. Let $M$ be a nonzero finite $S$-module. Suppose that (a) $M/\mathfrak mM$ is a free $S/\mathfrak mS$-module, and (b) $M$ is flat over $R$. Then $M$ is free and $S$ is flat over $R$. \end{lemma} \begin{proof} Let $\overline{x}_1, \ldots, \overline{x}_n$ be a basis for the free module $M/\mathfrak mM$. Choose $x_1, \ldots, x_n \in M$ with $x_i$ mapping to $\overline{x}_i$. Let $u : S^{\oplus n} \to M$ be the map which maps the $i$th standard basis vector to $x_i$. By Lemma \ref{lemma-mod-injective} we see that $u$ is injective. On the other hand, by Nakayama's Lemma \ref{lemma-NAK} the map is surjective. The lemma follows. \end{proof} \begin{lemma} \label{lemma-complex-exact-mod} Let $R \to S$ be a local homomorphism of local Noetherian rings. Let $\mathfrak m$ be the maximal ideal of $R$. Let $0 \to F_e \to F_{e-1} \to \ldots \to F_0$ be a finite complex of finite $S$-modules. Assume that each $F_i$ is $R$-flat, and that the complex $0 \to F_e/\mathfrak m F_e \to F_{e-1}/\mathfrak m F_{e-1} \to \ldots \to F_0 / \mathfrak m F_0$ is exact. Then $0 \to F_e \to F_{e-1} \to \ldots \to F_0$ is exact, and moreover the module $\Coker(F_1 \to F_0)$ is $R$-flat. \end{lemma} \begin{proof} By induction on $e$. If $e = 1$, then this is exactly Lemma \ref{lemma-mod-injective}. If $e > 1$, we see by Lemma \ref{lemma-mod-injective} that $F_e \to F_{e-1}$ is injective and that $C = \Coker(F_e \to F_{e-1})$ is a finite $S$-module flat over $R$. Hence we can apply the induction hypothesis to the complex $0 \to C \to F_{e-2} \to \ldots \to F_0$. We deduce that $C \to F_{e-2}$ is injective and the exactness of the complex follows, as well as the flatness of the cokernel of $F_1 \to F_0$. \end{proof} \noindent In the rest of this section we prove two versions of what is called the ``{\it local criterion of flatness}''. Note also the interesting Lemma \ref{lemma-CM-over-regular-flat} below. \begin{lemma} \label{lemma-prepare-local-criterion-flatness} Let $R$ be a local ring with maximal ideal $\mathfrak m$ and residue field $\kappa = R/\mathfrak m$. Let $M$ be an $R$-module. If $\text{Tor}_1^R(\kappa, M) = 0$, then for every finite length $R$-module $N$ we have $\text{Tor}_1^R(N, M) = 0$. \end{lemma} \begin{proof} By induction on the length of $N$. If the length of $N$ is $1$, then $N \cong \kappa$ and we are done. If the length of $N$ is more than $1$, then we can fit $N$ into a short exact sequence $0 \to N' \to N \to N'' \to 0$ where $N'$, $N''$ are finite length $R$-modules of smaller length. The vanishing of $\text{Tor}_1^R(N, M)$ follows from the vanishing of $\text{Tor}_1^R(N', M)$ and $\text{Tor}_1^R(N'', M)$ (induction hypothesis) and the long exact sequence of Tor groups, see Lemma \ref{lemma-long-exact-sequence-tor}. \end{proof} \begin{lemma}[Local criterion for flatness] \label{lemma-local-criterion-flatness} Let $R \to S$ be a local homomorphism of local Noetherian rings. Let $\mathfrak m$ be the maximal ideal of $R$, and let $\kappa = R/\mathfrak m$. Let $M$ be a finite $S$-module. If $\text{Tor}_1^R(\kappa, M) = 0$, then $M$ is flat over $R$. \end{lemma} \begin{proof} Let $I \subset R$ be an ideal. By Lemma \ref{lemma-flat} it suffices to show that $I \otimes_R M \to M$ is injective. By Remark \ref{remark-Tor-ring-mod-ideal} we see that this kernel is equal to $\text{Tor}_1^R(M, R/I)$. By Lemma \ref{lemma-prepare-local-criterion-flatness} we see that $J \otimes_R M \to M$ is injective for every ideal $J$ of finite colength. \medskip\noindent Choose $n \gg 0$ and consider the following short exact sequence $$ 0 \to I \cap \mathfrak m^n \to I \oplus \mathfrak m^n \to I + \mathfrak m^n \to 0 $$ This is a sub sequence of the short exact sequence $0 \to R \to R^{\oplus 2} \to R \to 0$. Thus we get the diagram $$ \xymatrix{ (I\cap \mathfrak m^n) \otimes_R M \ar[r] \ar[d] & I \otimes_R M \oplus \mathfrak m^n \otimes_R M \ar[r] \ar[d] & (I + \mathfrak m^n) \otimes_R M \ar[d] \\ M \ar[r] & M \oplus M \ar[r] & M } $$ Note that $I + \mathfrak m^n$ and $\mathfrak m^n$ are ideals of finite colength. Thus a diagram chase shows that $\Ker((I \cap \mathfrak m^n)\otimes_R M \to M) \to \Ker(I \otimes_R M \to M)$ is surjective. We conclude in particular that $K = \Ker(I \otimes_R M \to M)$ is contained in the image of $(I \cap \mathfrak m^n) \otimes_R M$ in $I \otimes_R M$. By Artin-Rees, Lemma \ref{lemma-Artin-Rees} we see that $K$ is contained in $\mathfrak m^{n-c}(I \otimes_R M)$ for some $c > 0$ and all $n \gg 0$. Since $I \otimes_R M$ is a finite $S$-module (!) and since $S$ is Noetherian, we see that this implies $K = 0$. Namely, the above implies $K$ maps to zero in the $\mathfrak mS$-adic completion of $I \otimes_R M$. But the map from $S$ to its $\mathfrak mS$-adic completion is faithfully flat by Lemma \ref{lemma-completion-faithfully-flat}. Hence $K = 0$, as desired. \end{proof} \noindent In the following we often encounter the conditions ``$M/IM$ is flat over $R/I$ and $\text{Tor}_1^R(R/I, M) = 0$''. The following lemma gives some consequences of these conditions (it is a generalization of Lemma \ref{lemma-prepare-local-criterion-flatness}). \begin{lemma} \label{lemma-what-does-it-mean} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. If $M/IM$ is flat over $R/I$ and $\text{Tor}_1^R(R/I, M) = 0$ then \begin{enumerate} \item $M/I^nM$ is flat over $R/I^n$ for all $n \geq 1$, and \item for any module $N$ which is annihilated by $I^m$ for some $m \geq 0$ we have $\text{Tor}_1^R(N, M) = 0$. \end{enumerate} In particular, if $I$ is nilpotent, then $M$ is flat over $R$. \end{lemma} \begin{proof} Assume $M/IM$ is flat over $R/I$ and $\text{Tor}_1^R(R/I, M) = 0$. Let $N$ be an $R/I$-module. Choose a set $\Lambda$ and a short exact sequence $$ 0 \to K \to \bigoplus\nolimits_{\lambda \in \Lambda} R/I \to N \to 0 $$ By the long exact sequence of $\text{Tor}$ and the vanishing of $\text{Tor}_1^R(R/I, M)$ we get $$ 0 \to \text{Tor}_1^R(N, M) \to K \otimes_R M \to (\bigoplus\nolimits_{\lambda \in \Lambda} R/I) \otimes_R M \to N \otimes_R M \to 0 $$ But since $K$, $\bigoplus_{\lambda \in \Lambda} R/I$, and $N$ are all annihilated by $I$ we see that \begin{align*} K \otimes_R M & = K \otimes_{R/I} M/IM, \\ (\bigoplus\nolimits_{\lambda \in \Lambda} R/I) \otimes_R M & = (\bigoplus\nolimits_{\lambda \in \Lambda} R/I) \otimes_{R/I} M/IM, \\ N \otimes_R M & = N \otimes_{R/I} M/IM. \end{align*} As $M/IM$ is flat over $R/I$ we conclude that $$ 0 \to K \otimes_{R/I} M/IM \to (\bigoplus\nolimits_{\lambda \in \Lambda} R/I) \otimes_{R/I} M/IM \to N \otimes_{R/I} M/IM \to 0 $$ is exact. Combining this with the above we conclude that $\text{Tor}_1^R(N, M) = 0$ for any $R$-module $N$ annihilated by $I$. \medskip\noindent Let us prove (2) by induction on $m$. The case $m = 1$ was done in the previous paragraph. For $N$ annihilated by $I^m$ for $m > 1$ we may choose an exact sequence $0 \to N' \to N \to N'' \to 0$ with $N'$ and $N''$ annihilated by $I^{m - 1}$. For example one can take $N' = IN$ and $N'' = N/IN$. Then the exact sequence $$ \text{Tor}_1^R(N', M) \to \text{Tor}_1^R(N, M) \to \text{Tor}_1^R(N'', M) $$ and induction prove the vanishing we want. \medskip\noindent Finally, we prove (1). Given $n \geq 1$ we have to show that $M/I^nM$ is flat over $R/I^n$. In other words, we have to show that the functor $N \mapsto N \otimes_{R/I^n} M/I^nM$ is exact on the category of $R$-modules $N$ annihilated by $I^n$. However, for such $N$ we have $N \otimes_{R/I^n} M/I^nM = N \otimes_R M$. By the vanishing of $\text{Tor}_1$ in (2) we see that the functor $N \mapsto N \otimes_R M$ is exact on the category of $N$ annihilated by some power of $I$ and we conclude. \end{proof} \begin{lemma} \label{lemma-what-does-it-mean-again} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. \begin{enumerate} \item If $M/IM$ is flat over $R/I$ and $M \otimes_R I/I^2 \to IM/I^2M$ is injective, then $M/I^2M$ is flat over $R/I^2$. \item If $M/IM$ is flat over $R/I$ and $M \otimes_R I^n/I^{n + 1} \to I^nM/I^{n + 1}M$ is injective for $n = 1, \ldots, k$, then $M/I^{k + 1}M$ is flat over $R/I^{k + 1}$. \end{enumerate} \end{lemma} \begin{proof} The first statement is a consequence of Lemma \ref{lemma-what-does-it-mean} applied with $R$ replaced by $R/I^2$ and $M$ replaced by $M/I^2M$ using that $$ \text{Tor}_1^{R/I^2}(M/I^2M, R/I) = \Ker(M \otimes_R I/I^2 \to IM/I^2M), $$ see Remark \ref{remark-Tor-ring-mod-ideal}. The second statement follows in the same manner using induction on $n$ to show that $M/I^{n + 1}M$ is flat over $R/I^{n + 1}$ for $n = 1, \ldots, k$. Here we use that $$ \text{Tor}_1^{R/I^{n + 1}}(M/I^{n + 1}M, R/I^n) = \Ker(M \otimes_R I^n/I^{n + 1} \to I^nM/I^{n + 1}M) $$ for every $n$. \end{proof} \begin{lemma}[Variant of the local criterion] \label{lemma-variant-local-criterion-flatness} Let $R \to S$ be a local homomorphism of Noetherian local rings. Let $I \not = R$ be an ideal in $R$. Let $M$ be a finite $S$-module. If $\text{Tor}_1^R(M, R/I) = 0$ and $M/IM$ is flat over $R/I$, then $M$ is flat over $R$. \end{lemma} \begin{proof} First proof: By Lemma \ref{lemma-what-does-it-mean} we see that $\text{Tor}_1^R(\kappa, M)$ is zero where $\kappa$ is the residue field of $R$. Hence we see that $M$ is flat over $R$ by Lemma \ref{lemma-local-criterion-flatness}. \medskip\noindent Second proof: Let $\mathfrak m$ be the maximal ideal of $R$. We will show that $\mathfrak m \otimes_R M \to M$ is injective, and then apply Lemma \ref{lemma-local-criterion-flatness}. Suppose that $\sum f_i \otimes x_i \in \mathfrak m \otimes_R M$ and that $\sum f_i x_i = 0$ in $M$. By the equational criterion for flatness Lemma \ref{lemma-flat-eq} applied to $M/IM$ over $R/I$ we see there exist $\overline{a}_{ij} \in R/I$ and $\overline{y}_j \in M/IM$ such that $x_i \bmod IM = \sum_j \overline{a}_{ij} \overline{y}_j $ and $0 = \sum_i (f_i \bmod I) \overline{a}_{ij}$. Let $a_{ij} \in R$ be a lift of $\overline{a}_{ij}$ and similarly let $y_j \in M$ be a lift of $\overline{y}_j$. Then we see that \begin{eqnarray*} \sum f_i \otimes x_i & = & \sum f_i \otimes x_i + \sum f_ia_{ij} \otimes y_j - \sum f_i \otimes a_{ij} y_j \\ & = & \sum f_i \otimes (x_i - \sum a_{ij} y_j) + \sum (\sum f_i a_{ij}) \otimes y_j \end{eqnarray*} Since $x_i - \sum a_{ij} y_j \in IM$ and $\sum f_i a_{ij} \in I$ we see that there exists an element in $I \otimes_R M$ which maps to our given element $\sum f_i \otimes x_i$ in $\mathfrak m \otimes_R M$. But $I \otimes_R M \to M$ is injective by assumption (see Remark \ref{remark-Tor-ring-mod-ideal}) and we win. \end{proof} \noindent In particular, in the situation of Lemma \ref{lemma-variant-local-criterion-flatness}, suppose that $I = (x)$ is generated by a single element $x$ which is a nonzerodivisor in $R$. Then $\text{Tor}_1^R(M, R/(x)) = (0)$ if and only if $x$ is a nonzerodivisor on $M$. \begin{lemma} \label{lemma-flat-module-powers} Let $R \to S$ be a ring map. Let $I \subset R$ be an ideal. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $R$ is a Noetherian ring, \item $S$ is a Noetherian ring, \item $M$ is a finite $S$-module, and \item for each $n \geq 1$ the module $M/I^n M$ is flat over $R/I^n$. \end{enumerate} Then for every $\mathfrak q \in V(IS)$ the localization $M_{\mathfrak q}$ is flat over $R$. In particular, if $S$ is local and $IS$ is contained in its maximal ideal, then $M$ is flat over $R$. \end{lemma} \begin{proof} We are going to use Lemma \ref{lemma-variant-local-criterion-flatness}. By assumption $M/IM$ is flat over $R/I$. Hence it suffices to check that $\text{Tor}_1^R(M, R/I)$ is zero on localization at $\mathfrak q$. By Remark \ref{remark-Tor-ring-mod-ideal} this Tor group is equal to $K = \Ker(I \otimes_R M \to M)$. We know that the kernel of $I/I^n \otimes_{R/I^n} M/I^nM \to M/I^nM$ is zero for all $n \geq 1$. Hence an element of $K$ maps to zero in $I/I^n \otimes_{R/I^n} M/I^nM$. Since $$ I/I^n \otimes_{R/I^n} M/I^nM = I/I^n \otimes_R M = (I \otimes_R M)/I^{n - 1}(I \otimes_R M) $$ we conclude that $K \subset I^{n - 1}(I \otimes_R M)$ for all $n \geq 1$. By the Artin-Rees lemma, and more precisely Lemma \ref{lemma-intersection-powers-ideal-module} we conclude that $K_{\mathfrak q} = 0$, as desired. \end{proof} \begin{lemma} \label{lemma-surjective-on-tor-one} Let $R \to R' \to R''$ be ring maps. Let $M$ be an $R$-module. Suppose that $M \otimes_R R'$ is flat over $R'$. Then the natural map $\text{Tor}_1^R(M, R') \otimes_{R'} R'' \to \text{Tor}_1^R(M, R'')$ is onto. \end{lemma} \begin{proof} Let $F_\bullet$ be a free resolution of $M$ over $R$. The complex $F_2 \otimes_R R' \to F_1\otimes_R R' \to F_0 \otimes_R R'$ computes $\text{Tor}_1^R(M, R')$. The complex $F_2 \otimes_R R'' \to F_1\otimes_R R'' \to F_0 \otimes_R R''$ computes $\text{Tor}_1^R(M, R'')$. Note that $F_i \otimes_R R' \otimes_{R'} R'' = F_i \otimes_R R''$. Let $K' = \Ker(F_1\otimes_R R' \to F_0 \otimes_R R')$ and similarly $K'' = \Ker(F_1\otimes_R R'' \to F_0 \otimes_R R'')$. Thus we have an exact sequence $$ 0 \to K' \to F_1\otimes_R R' \to F_0 \otimes_R R' \to M \otimes_R R' \to 0. $$ By the assumption that $M \otimes_R R'$ is flat over $R'$, the sequence $$ K' \otimes_{R'} R'' \to F_1 \otimes_R R'' \to F_0 \otimes_R R'' \to M \otimes_R R'' \to 0 $$ is still exact. This means that $K' \otimes_{R'} R'' \to K''$ is surjective. Since $\text{Tor}_1^R(M, R')$ is a quotient of $K'$ and $\text{Tor}_1^R(M, R'')$ is a quotient of $K''$ we win. \end{proof} \begin{lemma} \label{lemma-surjective-on-tor-one-trivial} Let $R \to R'$ be a ring map. Let $I \subset R$ be an ideal and $I' = IR'$. Let $M$ be an $R$-module and set $M' = M \otimes_R R'$. The natural map $\text{Tor}_1^R(R'/I', M) \to \text{Tor}_1^{R'}(R'/I', M')$ is surjective. \end{lemma} \begin{proof} Let $F_2 \to F_1 \to F_0 \to M \to 0$ be a free resolution of $M$ over $R$. Set $F_i' = F_i \otimes_R R'$. The sequence $F_2' \to F_1' \to F_0' \to M' \to 0$ may no longer be exact at $F_1'$. A free resolution of $M'$ over $R'$ therefore looks like $$ F_2' \oplus F_2'' \to F_1' \to F_0' \to M' \to 0 $$ for a suitable free module $F_2''$ over $R'$. Next, note that $F_i \otimes_R R'/I' = F_i' / IF_i' = F_i'/I'F_i'$. So the complex $F_2'/I'F_2' \to F_1'/I'F_1' \to F_0'/I'F_0'$ computes $\text{Tor}_1^R(M, R'/I')$. On the other hand $F_i' \otimes_{R'} R'/I' = F_i'/I'F_i'$ and similarly for $F_2''$. Thus the complex $F_2'/I'F_2' \oplus F_2''/I'F_2'' \to F_1'/I'F_1' \to F_0'/I'F_0'$ computes $\text{Tor}_1^{R'}(M', R'/I')$. Since the vertical map on complexes $$ \xymatrix{ F_2'/I'F_2' \ar[r] \ar[d] & F_1'/I'F_1' \ar[r] \ar[d] & F_0'/I'F_0' \ar[d] \\ F_2'/I'F_2' \oplus F_2''/I'F_2'' \ar[r] & F_1'/I'F_1' \ar[r] & F_0'/I'F_0' } $$ clearly induces a surjection on homology we win. \end{proof} \begin{lemma} \label{lemma-another-variant-local-criterion-flatness} Let $$ \xymatrix{ S \ar[r] & S' \\ R \ar[r] \ar[u] & R' \ar[u] } $$ be a commutative diagram of local homomorphisms of local Noetherian rings. Let $I \subset R$ be a proper ideal. Let $M$ be a finite $S$-module. Denote by $I' = IR'$ and $M' = M \otimes_S S'$. Assume that \begin{enumerate} \item $S'$ is a localization of the tensor product $S \otimes_R R'$, \item $M/IM$ is flat over $R/I$, \item $\text{Tor}_1^R(M, R/I) \to \text{Tor}_1^{R'}(M', R'/I')$ is zero. \end{enumerate} Then $M'$ is flat over $R'$. \end{lemma} \begin{proof} Since $S'$ is a localization of $S \otimes_R R'$ we see that $M'$ is a localization of $M \otimes_R R'$. Note that by Lemma \ref{lemma-flat-base-change} the module $M/IM \otimes_{R/I} R'/I' = M \otimes_R R' /I'(M \otimes_R R')$ is flat over $R'/I'$. Hence also $M'/I'M'$ is flat over $R'/I'$ as the localization of a flat module is flat. By Lemma \ref{lemma-variant-local-criterion-flatness} it suffices to show that $\text{Tor}_1^{R'}(M', R'/I')$ is zero. Since $M'$ is a localization of $M \otimes_R R'$, the last assumption implies that it suffices to show that $\text{Tor}_1^R(M, R/I) \otimes_R R' \to \text{Tor}_1^{R'}(M \otimes_R R', R'/I')$ is surjective. \medskip\noindent By Lemma \ref{lemma-surjective-on-tor-one-trivial} we see that $\text{Tor}_1^R(M, R'/I') \to \text{Tor}_1^{R'}(M \otimes_R R', R'/I')$ is surjective. So now it suffices to show that $\text{Tor}_1^R(M, R/I) \otimes_R R' \to \text{Tor}_1^R(M, R'/I')$ is surjective. This follows from Lemma \ref{lemma-surjective-on-tor-one} by looking at the ring maps $R \to R/I \to R'/I'$ and the module $M$. \end{proof} \noindent Please compare the lemma below to Lemma \ref{lemma-criterion-flatness-fibre-nilpotent} (the case of a nilpotent ideal) and Lemma \ref{lemma-criterion-flatness-fibre} (the case of finitely presented algebras). \begin{lemma}[Crit\`ere de platitude par fibres; Noetherian case] \label{lemma-criterion-flatness-fibre-Noetherian} Let $R$, $S$, $S'$ be Noetherian local rings and let $R \to S \to S'$ be local ring homomorphisms. Let $\mathfrak m \subset R$ be the maximal ideal. Let $M$ be an $S'$-module. Assume \begin{enumerate} \item The module $M$ is finite over $S'$. \item The module $M$ is not zero. \item The module $M/\mathfrak m M$ is a flat $S/\mathfrak m S$-module. \item The module $M$ is a flat $R$-module. \end{enumerate} Then $S$ is flat over $R$ and $M$ is a flat $S$-module. \end{lemma} \begin{proof} Set $I = \mathfrak mS \subset S$. Then we see that $M/IM$ is a flat $S/I$-module because of (3). Since $\mathfrak m \otimes_R S' \to I \otimes_S S'$ is surjective we see that also $\mathfrak m \otimes_R M \to I \otimes_S M$ is surjective. Consider $$ \mathfrak m \otimes_R M \to I \otimes_S M \to M. $$ As $M$ is flat over $R$ the composition is injective and so both arrows are injective. In particular $\text{Tor}_1^S(S/I, M) = 0$ see Remark \ref{remark-Tor-ring-mod-ideal}. By Lemma \ref{lemma-variant-local-criterion-flatness} we conclude that $M$ is flat over $S$. Note that since $M/\mathfrak m_{S'}M$ is not zero by Nakayama's Lemma \ref{lemma-NAK} we see that actually $M$ is faithfully flat over $S$ by Lemma \ref{lemma-ff} (since it forces $M/\mathfrak m_SM \not = 0$). \medskip\noindent Consider the exact sequence $0 \to \mathfrak m \to R \to \kappa \to 0$. This gives an exact sequence $0 \to \text{Tor}_1^R(\kappa, S) \to \mathfrak m \otimes_R S \to I \to 0$. Since $M$ is flat over $S$ this gives an exact sequence $0 \to \text{Tor}_1^R(\kappa, S)\otimes_S M \to \mathfrak m \otimes_R M \to I \otimes_S M \to 0$. By the above this implies that $\text{Tor}_1^R(\kappa, S)\otimes_S M = 0$. Since $M$ is faithfully flat over $S$ this implies that $\text{Tor}_1^R(\kappa, S) = 0$ and we conclude that $S$ is flat over $R$ by Lemma \ref{lemma-local-criterion-flatness}. \end{proof} \begin{lemma} \label{lemma-flatness-scallop} Let $A$ be a ring, let $M$ be an $A$-module, and let $f \in A$. If \begin{enumerate} \item $f$ is a nonzerodivisor on $A$ and $M$, \item $M_f$ is a flat $A_f$-module, and \item $M/fM$ is a flat $A/fA$-module, \end{enumerate} Then $M$ is a flat $A$-module. Same with ``flat'' replaced by ``faithfully flat''. \end{lemma} \begin{proof} Since $0 \to A \to A \to A/fA \to 0$ and $0 \to M \to M \to M/fM \to 0$ are exact, we find that $\text{Tor}_i^A(M, A/fA) = 0$ for $i = 1$ and $i = 2$. By Lemma \ref{lemma-what-does-it-mean} we conclude that $\text{Tor}_1^A(M, N) = 0$ for all $A$-modules $N$ annihilated by $f$ (this uses the flatness of $M/fM$ over $A/fA$). Given an $A$-module $N$ annihilated by $f$ we may choose a short exact sequence $0 \to N' \to F \to N \to 0$ of $A$-modules where $F$ is a direct sum of copies of $A/fA$. From the exact sequence $$ \text{Tor}_2^A(M, F) \to \text{Tor}_2^A(M, N) \to \text{Tor}_1^A(M, N') $$ we conclude that $\text{Tor}_2^A(M, N) = 0$ for all $A$-modules $N$ annihilated by $f$. Next, let $K$ be an arbitrary $A$-module. We may break the map $f : K \to K$ into two short exact sequences $$ 0 \to K[f] \to K \to K' \to 0 \quad\text{and}\quad 0 \to K' \to K \to K/fK \to 0 $$ where $K' = K/K[f] \cong fK$. Applying the exact sequences of Tor we obtain exact sequences $$ \text{Tor}_1^A(K[f], M) \to \text{Tor}_1^A(K, M) \to \text{Tor}_1^A(K', M) $$ and $$ \text{Tor}_2^A(K/fK, M) \to \text{Tor}_1^A(K', M) \to \text{Tor}_1^A(K, M) $$ Using the vanishing of $\text{Tor}_1^A(K[f], M)$ and $\text{Tor}_2^A(K/fK, M)$ we conclude that $f : K \to K$ induces an injective map on $\text{Tor}^A_1(M, K)$. In other words, we see that $\text{Tor}^A_1(M, K)$ is zero if and only if $\text{Tor}^A_1(M, K) \otimes_A A_f$ is zero. By Lemma \ref{lemma-flat-base-change-tor} we have $$ \text{Tor}^A_1(M, K) \otimes_A A_f = \text{Tor}^{A_f}_1(M_f, K_f) = 0 $$ The last vanishing follows from the flatness of $M_f$ over $A_f$ (Lemma \ref{lemma-characterize-flat}). We conclude that $\text{Tor}_1^A(M, K) = 0$ for all $A$-modules $K$. Hence $M$ is flat over $A$ by Lemma \ref{lemma-characterize-flat}. \medskip\noindent We omit the argument for the case of faithfully flat modules. \end{proof} \begin{lemma} \label{lemma-flatness-scallop-pre} Let $A$ be a ring, let $M$ be an $A$-module. Let $I = (f_1, \ldots, f_r)$ be an ideal of $A$ generated by $r \geq 1$ elements. If \begin{enumerate} \item $M_{f_i}$ is a flat $A_{f_i}$-module for $i = 1, \ldots, r$, \item $M/IM$ is a flat $A/I$-module, \item $\text{Tor}_i^A(M, A/I) = 0$ for $i = 1, \ldots, r + 1$. \end{enumerate} Then $M$ is a flat $A$-module. Same with ``flat'' replaced by ``faithfully flat''. \end{lemma} \begin{proof} From Lemma \ref{lemma-what-does-it-mean} we see that $\text{Tor}_1^A(M, K) = 0$ for all $A$-modules $K$ annihilated by $I$. Given an $A$-module $K$ annihilated by $I$ we may choose a short exact sequence $0 \to N \to F \to K \to 0$ of $A$-modules where $F$ is a direct sum of copies of $A/I$. We obtain an exact sequence $$ \text{Tor}_i^A(M, F) \to \text{Tor}_i^A(M, K) \to \text{Tor}_{i - 1}^A(M, N) $$ Thus using assumption (3) and induction on $i$ we conclude that $\text{Tor}_i^A(M, K) = 0$ for all $A$-modules $K$ annihilated by $I$ and $i = 1, \ldots, r + 1$. \medskip\noindent Suppose that for some $1 \leq j \leq r$ we have shown that $\text{Tor}_i^A(M, K) = 0$ for all $A$-modules $K$ annihilated by $f_1, \ldots, f_j$ and $i = 1, \ldots, j + 1$. Let $K$ be an $A$-module annihilated by $f_1, \ldots, f_{j - 1}$. We may break the map $f_j : K \to K$ into two short exact sequences $$ 0 \to K[f_j] \to K \to K' \to 0 \quad\text{and}\quad 0 \to K' \to K \to K/f_jK \to 0 $$ where $K' = K/K[f_j] \cong f_jK$. Let $1 \leq i \leq j$. Applying the exact sequences of Tor we obtain exact sequences $$ \text{Tor}_i^A(K[f_j], M) \to \text{Tor}_i^A(K, M) \to \text{Tor}_i^A(K', M) $$ and $$ \text{Tor}_{i + 1}^A(K/f_jK, M) \to \text{Tor}_i^A(K', M) \to \text{Tor}_i^A(K, M) $$ Using the vanishing of $\text{Tor}_i^A(K[f_j], M)$ and $\text{Tor}_{i + 1}^A(K/f_jK, M)$ we conclude that $f_j : K \to K$ induces an injective map on $\text{Tor}^A_i(M, K)$. In other words, we see that $\text{Tor}^A_i(M, K)$ is zero if and only if $\text{Tor}^A_i(M, K) \otimes_A A_{f_j}$ is zero. By Lemma \ref{lemma-flat-base-change-tor} we have $$ \text{Tor}^A_i(M, K) \otimes_A A_{f_j} = \text{Tor}^{A_{f_j}}_i(M_{f_j}, K_{f_j}) = 0 $$ The last vanishing follows from the flatness of $M_{f_j}$ over $A_{f_j}$ (Lemma \ref{lemma-characterize-flat}). We conclude that $\text{Tor}_i^A(M, K) = 0$ for all $A$-modules $K$ annihilated by $f_1, \ldots, f_{j - 1}$ and $i = 1, \ldots, j$. By descending induction on $j$, we conclude that this holds for $j = 0$, i.e., we see that $\text{Tor}_1^A(M, K) = 0$ for all $A$-modules $K$ . Hence $M$ is flat over $A$ by Lemma \ref{lemma-characterize-flat}. \medskip\noindent We omit the argument for the case of faithfully flat modules. \end{proof} \section{Base change and flatness} \label{section-base-change-flat} % BEGIN ALGEBRA EDITORIAL ROUTE section-base-change-flat \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-base-change-flat}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-base-change-flat \noindent Some lemmas which deal with what happens with flatness when doing a base change. \begin{lemma} \label{lemma-base-change-flat-up-down} Let $$ \xymatrix{ S \ar[r] & S' \\ R \ar[r] \ar[u] & R' \ar[u] } $$ be a commutative diagram of local homomorphisms of local rings. Assume that $S'$ is a localization of the tensor product $S \otimes_R R'$. Let $M$ be an $S$-module and set $M' = S' \otimes_S M$. \begin{enumerate} \item If $M$ is flat over $R$ then $M'$ is flat over $R'$. \item If $M'$ is flat over $R'$ and $R \to R'$ is flat then $M$ is flat over $R$. \end{enumerate} In particular we have \begin{enumerate} \item[(3)] If $S$ is flat over $R$ then $S'$ is flat over $R'$. \item[(4)] If $R' \to S'$ and $R \to R'$ are flat then $S$ is flat over $R$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). If $M$ is flat over $R$, then $M \otimes_R R'$ is flat over $R'$ by Lemma \ref{lemma-flat-base-change}. If $W \subset S \otimes_R R'$ is the multiplicative subset such that $W^{-1}(S \otimes_R R') = S'$ then $M' = W^{-1}(M \otimes_R R')$. Hence $M'$ is flat over $R'$ as the localization of a flat module, see Lemma \ref{lemma-flat-localization} part (5). This proves (1) and in particular, we see that (3) holds. \medskip\noindent Proof of (2). Suppose that $M'$ is flat over $R'$ and $R \to R'$ is flat. By (3) applied to the diagram reflected in the northwest diagonal we see that $S \to S'$ is flat. Thus $S \to S'$ is faithfully flat by Lemma \ref{lemma-local-flat-ff}. We are going to use the criterion of Lemma \ref{lemma-flat} (\ref{item-f-ideal}) to show that $M$ is flat. Let $I \subset R$ be an ideal. If $I \otimes_R M \to M$ has a nonzero kernel, so does $(I \otimes_R M) \otimes_S S' \to M \otimes_S S' = M'$. Note that $I \otimes_R R' = IR'$ as $R \to R'$ is flat, and that $$ (I \otimes_R M) \otimes_S S' = (I \otimes_R R') \otimes_{R'} (M \otimes_S S') = IR' \otimes_{R'} M'. $$ From flatness of $M'$ over $R'$ we conclude that this maps injectively into $M'$. This concludes the proof of (2), and hence (4) is true as well. \end{proof} \noindent Here is yet another application of the local criterion of flatness. \begin{lemma} \label{lemma-yet-another-variant-local-criterion-flatness} Consider a commutative diagram of local rings and local homomorphisms $$ \xymatrix{ S \ar[r] & S' \\ R \ar[r] \ar[u] & R' \ar[u] } $$ Let $M$ be a finite $S$-module. Assume that \begin{enumerate} \item the horizontal arrows are flat ring maps \item $M$ is flat over $R$, \item $\mathfrak m_R R' = \mathfrak m_{R'}$, \item $R'$ and $S'$ are Noetherian. \end{enumerate} Then $M' = M \otimes_S S'$ is flat over $R'$. \end{lemma} \begin{proof} Since $\mathfrak m_R \subset R$ and $R \to R'$ is flat, we get $\mathfrak m_R \otimes_R R' = \mathfrak m_R R' = \mathfrak m_{R'}$ by assumption (3). Observe that $M'$ is a finite $S'$-module which is flat over $R$ by Lemma \ref{lemma-flatness-descends-more-general}. Thus $\mathfrak m_R \otimes_R M' \to M'$ is injective. Then we get $$ \mathfrak m_R \otimes_R M' = \mathfrak m_R \otimes_R R' \otimes_{R'} M' = \mathfrak m_{R'} \otimes_{R'} M' $$ Thus $\mathfrak m_{R'} \otimes_{R'} M' \to M'$ is injective. This shows that $\text{Tor}_1^{R'}(\kappa_{R'}, M') = 0$ (Remark \ref{remark-Tor-ring-mod-ideal}). Thus $M'$ is flat over $R'$ by Lemma \ref{lemma-local-criterion-flatness}. \end{proof} \section{Flatness criteria over Artinian rings} \label{section-flatness-artinian} % BEGIN ALGEBRA EDITORIAL ROUTE section-flatness-artinian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-flatness-artinian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-flatness-artinian \noindent We discuss some flatness criteria for modules over Artinian rings. Note that an Artinian local ring has a nilpotent maximal ideal so that the following two lemmas apply to Artinian local rings. \begin{lemma} \label{lemma-local-artinian-basis-when-flat} Let $(R, \mathfrak m)$ be a local ring with nilpotent maximal ideal $\mathfrak m$. Let $M$ be a flat $R$-module. If $A$ is a set and $x_\alpha \in M$, $\alpha \in A$ is a collection of elements of $M$, then the following are equivalent: \begin{enumerate} \item $\{\overline{x}_\alpha\}_{\alpha \in A}$ forms a basis for the vector space $M/\mathfrak mM$ over $R/\mathfrak m$, and \item $\{x_\alpha\}_{\alpha \in A}$ forms a basis for $M$ over $R$. \end{enumerate} \end{lemma} \begin{proof} The implication (2) $\Rightarrow$ (1) is immediate. Assume (1). By Nakayama's Lemma \ref{lemma-NAK} the elements $x_\alpha$ generate $M$. Then one gets a short exact sequence $$ 0 \to K \to \bigoplus\nolimits_{\alpha \in A} R \to M \to 0 $$ Tensoring with $R/\mathfrak m$ and using Lemma \ref{lemma-flat-tor-zero} we obtain $K/\mathfrak mK = 0$. By Nakayama's Lemma \ref{lemma-NAK} we conclude $K = 0$. \end{proof} \begin{lemma} \label{lemma-local-artinian-characterize-flat} Let $R$ be a local ring with nilpotent maximal ideal. Let $M$ be an $R$-module. The following are equivalent \begin{enumerate} \item $M$ is flat over $R$, \item $M$ is a free $R$-module, and \item $M$ is a projective $R$-module. \end{enumerate} \end{lemma} \begin{proof} Since any projective module is flat (as a direct summand of a free module) and every free module is projective, it suffices to prove that a flat module is free. Let $M$ be a flat module. Let $A$ be a set and let $x_\alpha \in M$, $\alpha \in A$ be elements such that $\overline{x_\alpha} \in M/\mathfrak m M$ forms a basis over the residue field of $R$. By Lemma \ref{lemma-local-artinian-basis-when-flat} the $x_\alpha$ are a basis for $M$ over $R$ and we win. \end{proof} \begin{lemma} \label{lemma-lift-basis} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Let $A$ be a set and let $x_\alpha \in M$, $\alpha \in A$ be a collection of elements of $M$. Assume \begin{enumerate} \item $I$ is nilpotent, \item $\{\overline{x}_\alpha\}_{\alpha \in A}$ forms a basis for $M/IM$ over $R/I$, and \item $\text{Tor}_1^R(R/I, M) = 0$. \end{enumerate} Then $M$ is free on $\{x_\alpha\}_{\alpha \in A}$ over $R$. \end{lemma} \begin{proof} Let $R$, $I$, $M$, $\{x_\alpha\}_{\alpha \in A}$ be as in the lemma and satisfy assumptions (1), (2), and (3). By Nakayama's Lemma \ref{lemma-NAK} the elements $x_\alpha$ generate $M$ over $R$. The assumption $\text{Tor}_1^R(R/I, M) = 0$ implies that we have a short exact sequence $$ 0 \to I \otimes_R M \to M \to M/IM \to 0. $$ Let $\sum f_\alpha x_\alpha = 0$ be a relation in $M$. By choice of $x_\alpha$ we see that $f_\alpha \in I$. Hence we conclude that $\sum f_\alpha \otimes x_\alpha = 0$ in $I \otimes_R M$. The map $I \otimes_R M \to I/I^2 \otimes_{R/I} M/IM$ and the fact that $\{x_\alpha\}_{\alpha \in A}$ forms a basis for $M/IM$ implies that $f_\alpha \in I^2$! Hence we conclude that there are no relations among the images of the $x_\alpha$ in $M/I^2M$. In other words, we see that $M/I^2M$ is free with basis the images of the $x_\alpha$. Using the map $I \otimes_R M \to I/I^3 \otimes_{R/I^2} M/I^2M$ we then conclude that $f_\alpha \in I^3$! And so on. Since $I^n = 0$ for some $n$ by assumption (1) we win. \end{proof} \begin{lemma} \label{lemma-prepare-lift-flatness} Let $\varphi : R \to R'$ be a ring map. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Assume \begin{enumerate} \item $M/IM$ is flat over $R/I$, and \item $R' \otimes_R M$ is flat over $R'$. \end{enumerate} Set $I_2 = \varphi^{-1}(\varphi(I^2)R')$. Then $M/I_2M$ is flat over $R/I_2$. \end{lemma} \begin{proof} We may replace $R$, $M$, and $R'$ by $R/I_2$, $M/I_2M$, and $R'/\varphi(I)^2R'$. Then $I^2 = 0$ and $\varphi$ is injective. By Lemma \ref{lemma-what-does-it-mean} and the fact that $I^2 = 0$ it suffices to prove that $\text{Tor}^R_1(R/I, M) = K = \Ker(I \otimes_R M \to M)$ is zero. Set $M' = M \otimes_R R'$ and $I' = IR'$. By assumption the map $I' \otimes_{R'} M' \to M'$ is injective. Hence $K$ maps to zero in $$ I' \otimes_{R'} M' = I' \otimes_R M = I' \otimes_{R/I} M/IM. $$ Then $I \to I'$ is an injective map of $R/I$-modules. Since $M/IM$ is flat over $R/I$ the map $$ I \otimes_{R/I} M/IM \longrightarrow I' \otimes_{R/I} M/IM $$ is injective. This implies that $K$ is zero in $I \otimes_R M = I \otimes_{R/I} M/IM$ as desired. \end{proof} \begin{lemma} \label{lemma-lift-flatness} Let $\varphi : R \to R'$ be a ring map. Let $I \subset R$ be an ideal. Let $M$ be an $R$-module. Assume \begin{enumerate} \item $I$ is nilpotent, \item $R \to R'$ is injective, \item $M/IM$ is flat over $R/I$, and \item $R' \otimes_R M$ is flat over $R'$. \end{enumerate} Then $M$ is flat over $R$. \end{lemma} \begin{proof} Define inductively $I_1 = I$ and $I_{n + 1} = \varphi^{-1}(\varphi(I_n)^2R')$ for $n \geq 1$. Note that by Lemma \ref{lemma-prepare-lift-flatness} we find that $M/I_nM$ is flat over $R/I_n$ for each $n \geq 1$. It is clear that $\varphi(I_{n + 1}) \subset \varphi(I)^{2^n}R'$. Since $I$ is nilpotent we see that $\varphi(I_n) = 0$ for some $n$. As $\varphi$ is injective we conclude that $I_n = 0$ for some $n$ and we win. \end{proof} \noindent Here is the local Artinian version of the local criterion for flatness. \begin{lemma} \label{lemma-artinian-variant-local-criterion-flatness} Let $R$ be an Artinian local ring. Let $M$ be an $R$-module. Let $I \subset R$ be a proper ideal. The following are equivalent \begin{enumerate} \item $M$ is flat over $R$, and \item $M/IM$ is flat over $R/I$ and $\text{Tor}_1^R(R/I, M) = 0$. \end{enumerate} \end{lemma} \begin{proof} The implication (1) $\Rightarrow$ (2) follows immediately from the definitions. Assume $M/IM$ is flat over $R/I$ and $\text{Tor}_1^R(R/I, M) = 0$. By Lemma \ref{lemma-local-artinian-characterize-flat} this implies that $M/IM$ is free over $R/I$. Pick a set $A$ and elements $x_\alpha \in M$ such that the images in $M/IM$ form a basis. By Lemma \ref{lemma-lift-basis} we conclude that $M$ is free and in particular flat. \end{proof} \noindent It turns out that flatness descends along injective homomorphisms whose source is an Artinian ring. \begin{lemma} \label{lemma-descent-flatness-injective-map-artinian-rings} Let $R \to S$ be a ring map. Let $M$ be an $R$-module. Assume \begin{enumerate} \item $R$ is Artinian \item $R \to S$ is injective, and \item $M \otimes_R S$ is a flat $S$-module. \end{enumerate} Then $M$ is a flat $R$-module. \end{lemma} \begin{proof} First proof: Let $I \subset R$ be the Jacobson radical of $R$. Then $I$ is nilpotent and $M/IM$ is flat over $R/I$ as $R/I$ is a product of fields, see Section \ref{section-artinian}. Hence $M$ is flat by an application of Lemma \ref{lemma-lift-flatness}. \medskip\noindent Second proof: By Lemma \ref{lemma-artinian-finite-length} we may write $R = \prod R_i$ as a finite product of local Artinian rings. This induces similar product decompositions for both $M$ and $S$. Hence we reduce to the case where $R$ is local Artinian (details omitted). \medskip\noindent Assume that $R \to S$, $M$ are as in the lemma satisfying (1), (2), and (3) and in addition that $R$ is local with maximal ideal $\mathfrak m$. Let $A$ be a set and $x_\alpha \in M$ be elements such that $\overline{x}_\alpha$ forms a basis for $M/\mathfrak mM$ over $R/\mathfrak m$. By Nakayama's Lemma \ref{lemma-NAK} we see that the elements $x_\alpha$ generate $M$ as an $R$-module. Set $N = S \otimes_R M$ and $I = \mathfrak mS$. Then $\{1 \otimes x_\alpha\}_{\alpha \in A}$ is a family of elements of $N$ which form a basis for $N/IN$. Moreover, since $N$ is flat over $S$ we have $\text{Tor}_1^S(S/I, N) = 0$. Thus we conclude from Lemma \ref{lemma-lift-basis} that $N$ is free on $\{1 \otimes x_\alpha\}_{\alpha \in A}$. The injectivity of $R \to S$ then guarantees that there cannot be a nontrivial relation among the $x_\alpha$ with coefficients in $R$. \end{proof} \noindent Please compare the lemma below to Lemma \ref{lemma-criterion-flatness-fibre-Noetherian} (the case of Noetherian local rings), Lemma \ref{lemma-criterion-flatness-fibre} (the case of finitely presented algebras), and Lemma \ref{lemma-criterion-flatness-fibre-locally-nilpotent} (the case of locally nilpotent ideals). \begin{lemma}[Crit\`ere de platitude par fibres: Nilpotent case] \label{lemma-criterion-flatness-fibre-nilpotent} Let $$ \xymatrix{ S \ar[rr] & & S' \\ & R \ar[lu] \ar[ru] } $$ be a commutative diagram in the category of rings. Let $I \subset R$ be a nilpotent ideal and $M$ an $S'$-module. Assume \begin{enumerate} \item The module $M/IM$ is a flat $S/IS$-module. \item The module $M$ is a flat $R$-module. \end{enumerate} Then $M$ is a flat $S$-module and $S_{\mathfrak q}$ is flat over $R$ for every $\mathfrak q \subset S$ such that $M \otimes_S \kappa(\mathfrak q)$ is nonzero. \end{lemma} \begin{proof} As $M$ is flat over $R$ tensoring with the short exact sequence $0 \to I \to R \to R/I \to 0$ gives a short exact sequence $$ 0 \to I \otimes_R M \to M \to M/IM \to 0. $$ Note that $I \otimes_R M \to IS \otimes_S M$ is surjective. Combined with the above this means both maps in $$ I \otimes_R M \to IS \otimes_S M \to M $$ are injective. Hence $\text{Tor}_1^S(S/IS, M) = 0$ (see Remark \ref{remark-Tor-ring-mod-ideal}) and we conclude that $M$ is a flat $S$-module by Lemma \ref{lemma-what-does-it-mean}. To finish we need to show that $S_{\mathfrak q}$ is flat over $R$ for any prime $\mathfrak q \subset S$ such that $M \otimes_S \kappa(\mathfrak q)$ is nonzero. This follows from Lemma \ref{lemma-ff} and \ref{lemma-flat-permanence}. \end{proof} \section{What makes a complex exact?} \label{section-complex-exact} % BEGIN ALGEBRA EDITORIAL ROUTE section-complex-exact \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-complex-exact}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-complex-exact \noindent Some of this material can be found in the paper \cite{WhatExact} by Buchsbaum and Eisenbud. \begin{situation} \label{situation-complex} Here $R$ is a ring, and we have a complex $$ 0 \to R^{n_e} \xrightarrow{\varphi_e} R^{n_{e-1}} \xrightarrow{\varphi_{e-1}} \ldots \xrightarrow{\varphi_{i + 1}} R^{n_i} \xrightarrow{\varphi_i} R^{n_{i-1}} \xrightarrow{\varphi_{i-1}} \ldots \xrightarrow{\varphi_1} R^{n_0} $$ In other words we require $\varphi_i \circ \varphi_{i + 1} = 0$ for $i = 1, \ldots, e - 1$. \end{situation} \begin{lemma} \label{lemma-add-trivial-complex} Suppose $R$ is a ring. Let $$ \ldots \xrightarrow{\varphi_{i + 1}} R^{n_i} \xrightarrow{\varphi_i} R^{n_{i-1}} \xrightarrow{\varphi_{i-1}} \ldots $$ be a complex of finite free $R$-modules. Suppose that for some $i$ some matrix coefficient of the map $\varphi_i$ is invertible. Then the displayed complex is isomorphic to the direct sum of a complex $$ \ldots \to R^{n_{i + 2}} \xrightarrow{\varphi_{i + 2}} R^{n_{i + 1}} \to R^{n_i - 1} \to R^{n_{i - 1} - 1} \to R^{n_{i - 2}} \xrightarrow{\varphi_{i - 2}} R^{n_{i - 3}} \to \ldots $$ and the complex $\ldots \to 0 \to R \to R \to 0 \to \ldots$ where the map $R \to R$ is the identity map. \end{lemma} \begin{proof} The assumption means, after a change of basis of $R^{n_i}$ and $R^{n_{i-1}}$ that the first basis vector of $R^{n_i}$ is mapped via $\varphi_i$ to the first basis vector of $R^{n_{i-1}}$. Let $e_j$ denote the $j$th basis vector of $R^{n_i}$ and $f_k$ the $k$th basis vector of $R^{n_{i-1}}$. Write $\varphi_i(e_j) = \sum a_{jk} f_k$. So $a_{1k} = 0$ unless $k = 1$ and $a_{11} = 1$. Change basis on $R^{n_i}$ again by setting $e'_j = e_j - a_{j1} e_1$ for $j > 1$. After this change of coordinates we have $a_{j1} = 0$ for $j > 1$. Note the image of $R^{n_{i + 1}} \to R^{n_i}$ is contained in the submodule spanned by $e'_j$, $j > 1$. Note also that $R^{n_{i-1}} \to R^{n_{i-2}}$ has to annihilate $f_1$ since it is in the image. These conditions and the shape of the matrix $(a_{jk})$ for $\varphi_i$ imply the lemma. \end{proof} \noindent In Situation \ref{situation-complex} we say a complex of the form $$ 0 \to \ldots \to 0 \to R \xrightarrow{1} R \to 0 \to \ldots \to 0 $$ or of the form $$ 0 \to \ldots \to 0 \to R $$ is {\it trivial}. More precisely, we say $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0}$ is trivial if either there exists an $e \geq i \geq 1$ with $n_i = n_{i - 1} = 1$, $\varphi_i = \text{id}_R$, and $n_j = 0$ for $j \not \in \{i, i - 1\}$ or $n_0 = 1$ and $n_i = 0$ for $i > 0$. The lemma above clearly says that any finite complex of finite free modules over a local ring is up to direct sums with trivial complexes the same as a complex all of whose maps have all matrix coefficients in the maximal ideal. \begin{lemma} \label{lemma-exact-depth-zero-local} In Situation \ref{situation-complex}. Suppose $R$ is a local Noetherian ring with maximal ideal $\mathfrak m$. Assume $\mathfrak m \in \text{Ass}(R)$, in other words $R$ has depth $0$. Suppose that $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0}$ is exact at $R^{n_e}, \ldots, R^{n_1}$. Then the complex is isomorphic to a direct sum of trivial complexes. \end{lemma} \begin{proof} Pick $x \in R$, $x \not = 0$, with $\mathfrak m x = 0$. Let $i$ be the biggest index such that $n_i > 0$. If $i = 0$, then the statement is true. If $i > 0$ denote by $f_1$ the first basis vector of $R^{n_i}$. Since $xf_1$ is not mapped to zero by exactness of the complex we deduce that some matrix coefficient of the map $R^{n_i} \to R^{n_{i - 1}}$ is not in $\mathfrak m$. Lemma \ref{lemma-add-trivial-complex} then allows us to decrease $n_e + \ldots + n_1$. Induction finishes the proof. \end{proof} \begin{lemma} \label{lemma-exact-artinian-local} In Situation \ref{situation-complex}. Let $R$ be an Artinian local ring. Suppose that $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0}$ is exact at $R^{n_e}, \ldots, R^{n_1}$. Then the complex is isomorphic to a direct sum of trivial complexes. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-exact-depth-zero-local} because an Artinian local ring has depth $0$. \end{proof} \noindent Below we define the rank of a map of finite free modules. This is just one possible definition of rank. It is just the definition that works in this section; there are others that may be more convenient in other settings. \begin{definition} \label{definition-rank} Let $R$ be a nonzero ring. Suppose that $\varphi : R^m \to R^n$ is a map of finite free modules. \begin{enumerate} \item The {\it rank} of $\varphi$ is the maximal $r$ such that $\wedge^r \varphi : \wedge^r R^m \to \wedge^r R^n$ is nonzero. \item We let $I(\varphi) \subset R$ be the ideal generated by the $r \times r$ minors of the matrix of $\varphi$, where $r$ is the rank as defined above. \end{enumerate} \end{definition} \noindent The rank of $\varphi : R^m \to R^n$ is $0$ if and only if $\varphi = 0$ and in this case $I(\varphi) = R$. \begin{lemma} \label{lemma-trivial-case-exact} In Situation \ref{situation-complex}, suppose $R \ne 0$ and the complex is isomorphic to a direct sum of trivial complexes. Then we have \begin{enumerate} \item the maps $\varphi_i$ have rank $r_i = n_i - n_{i + 1} + \ldots + (-1)^{e-i-1} n_{e-1} + (-1)^{e-i} n_e$, \item for all $i$, $1 \leq i \leq e - 1$ we have $\text{rank}(\varphi_{i + 1}) + \text{rank}(\varphi_i) = n_i$, \item each $I(\varphi_i) = R$. \end{enumerate} \end{lemma} \begin{proof} We may assume the complex is the direct sum of trivial complexes. Then for each $i$ we can split the standard basis elements of $R^{n_i}$ into those that map to a basis element of $R^{n_{i-1}}$ and those that are mapped to zero (and these are mapped onto by basis elements of $R^{n_{i + 1}}$ if $i > 0$). Using descending induction starting with $i = e$ it is easy to prove that there are $r_{i + 1}$ basis elements of $R^{n_i}$ which are mapped to zero and $r_i$ which are mapped to basis elements of $R^{n_{i-1}}$. From this the result follows. \end{proof} \begin{lemma} \label{lemma-div-x-exact-one-less} In Situation \ref{situation-complex}. Suppose $R$ is a local ring with maximal ideal $\mathfrak m$. Suppose that $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0}$ is exact at $R^{n_e}, \ldots, R^{n_1}$. Let $x \in \mathfrak m$ be a nonzerodivisor. The complex $0 \to (R/xR)^{n_e} \to \ldots \to (R/xR)^{n_1}$ is exact at $(R/xR)^{n_e}, \ldots, (R/xR)^{n_2}$. \end{lemma} \begin{proof} Denote by $F_\bullet$ the complex with terms $F_i = R^{n_i}$ and differential given by $\varphi_i$. Then we have a short exact sequence of complexes $$ 0 \to F_\bullet \xrightarrow{x} F_\bullet \to F_\bullet/xF_\bullet \to 0 $$ Applying the snake lemma we get a long exact sequence $$ H_i(F_\bullet) \xrightarrow{x} H_i(F_\bullet) \to H_i(F_\bullet/xF_\bullet) \to H_{i - 1}(F_\bullet) \xrightarrow{x} H_{i - 1}(F_\bullet) $$ The lemma follows. \end{proof} \begin{lemma}[Acyclicity lemma] \label{lemma-acyclic} \begin{reference} \cite[Lemma 1.8]{Peskine-Szpiro} \end{reference} Let $R$ be a local Noetherian ring. Let $0 \to M_e \to M_{e-1} \to \ldots \to M_0$ be a complex of finite $R$-modules. Assume $\text{depth}(M_i) \geq i$. Let $i$ be the largest index such that the complex is not exact at $M_i$. If $i > 0$ then $\Ker(M_i \to M_{i-1})/\Im(M_{i + 1} \to M_i)$ has depth $\geq 1$. \end{lemma} \begin{proof} Let $H = \Ker(M_i \to M_{i-1})/\Im(M_{i + 1} \to M_i)$ be the homology group in question. We may break the complex into exact sequences $0 \to M_e \to M_{e-1} \to K_{e-2} \to 0$, $0 \to K_j \to M_j \to K_{j-1} \to 0$, for $i + 2 \leq j \leq e-2 $, $0 \to K_{i + 1} \to M_{i + 1} \to B_i \to 0$, $0 \to K_i \to M_i \to M_{i-1}$, and $0 \to B_i \to K_i \to H \to 0$. We proceed up through these complexes to prove the statements about depths, repeatedly using Lemma \ref{lemma-depth-in-ses}. First of all, since $\text{depth}(M_e) \geq e$, and $\text{depth}(M_{e-1}) \geq e-1$ we deduce that $\text{depth}(K_{e-2}) \geq e - 1$. At this point the sequences $0 \to K_j \to M_j \to K_{j-1} \to 0$ for $i + 2 \leq j \leq e-2 $ imply similarly that $\text{depth}(K_{j-1}) \geq j$ for $i + 2 \leq j \leq e-2$. The sequence $0 \to K_{i + 1} \to M_{i + 1} \to B_i \to 0$ then shows that $\text{depth}(B_i) \geq i + 1$. The sequence $0 \to K_i \to M_i \to M_{i-1}$ shows that $\text{depth}(K_i) \geq 1$ since $M_i$ has depth $\geq i \geq 1$ by assumption. The sequence $0 \to B_i \to K_i \to H \to 0$ then implies the result. \end{proof} \begin{proposition} \label{proposition-what-exact} \begin{reference} \cite[Corollary 1]{WhatExact} \end{reference} In Situation \ref{situation-complex}, suppose $R$ is a local Noetherian ring. The following are equivalent \begin{enumerate} \item $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0}$ is exact at $R^{n_e}, \ldots, R^{n_1}$, and \item for all $i$, $1 \leq i \leq e$ the following two conditions are satisfied: \begin{enumerate} \item $\text{rank}(\varphi_i) = r_i$ where $r_i = n_i - n_{i + 1} + \ldots + (-1)^{e-i-1} n_{e-1} + (-1)^{e-i} n_e$, \item $I(\varphi_i) = R$, or $I(\varphi_i)$ contains a regular sequence of length $i$. \end{enumerate} \end{enumerate} \end{proposition} \begin{proof} If for some $i$ some matrix coefficient of $\varphi_i$ is not in $\mathfrak m$, then we apply Lemma \ref{lemma-add-trivial-complex}. It is easy to see that the proposition for a complex and for the same complex with a trivial complex added to it are equivalent. Thus we may assume that all matrix entries of each $\varphi_i$ are elements of the maximal ideal. Discard zero terms at the left. If no positive-degree term remains, the assertion holds. Otherwise we may assume that $e \geq 1$ and $n_e > 0$. \medskip\noindent Assume the complex is exact at $R^{n_e}, \ldots, R^{n_1}$. Let $\mathfrak q \in \text{Ass}(R)$. Note that the ring $R_{\mathfrak q}$ has depth $0$ and that the complex remains exact after localization at $\mathfrak q$. We apply Lemmas \ref{lemma-exact-depth-zero-local} and \ref{lemma-trivial-case-exact} to the localized complex over $R_{\mathfrak q}$. We conclude that $\varphi_{i, \mathfrak q}$ has rank $r_i$ for all $i$. Since $R \to \bigoplus_{\mathfrak q \in \text{Ass}(R)} R_\mathfrak q$ is injective (Lemma \ref{lemma-zero-at-ass-zero}), we conclude that $\varphi_i$ has rank $r_i$ over $R$ by the definition of rank as given in Definition \ref{definition-rank}. Therefore we see that $I(\varphi_i)_\mathfrak q = I(\varphi_{i, \mathfrak q})$ as the ranks do not change. Since all of the ideals $I(\varphi_i)_{\mathfrak q}$, $e \geq i \geq 1$ are equal to $R_{\mathfrak q}$ (by the lemmas referenced above) we conclude none of the ideals $I(\varphi_i)$ is contained in $\mathfrak q$. This implies that $I(\varphi_e)I(\varphi_{e-1})\ldots I(\varphi_1)$ is not contained in any of the associated primes of $R$. By Lemma \ref{lemma-silly} we may choose $x \in I(\varphi_e)I(\varphi_{e - 1})\ldots I(\varphi_1)$, $x \not \in \mathfrak q$ for all $\mathfrak q \in \text{Ass}(R)$. Observe that $x$ is a nonzerodivisor (Lemma \ref{lemma-ass-zero-divisors}). According to Lemma \ref{lemma-div-x-exact-one-less} the complex $0 \to (R/xR)^{n_e} \to \ldots \to (R/xR)^{n_1}$ is exact at $(R/xR)^{n_e}, \ldots, (R/xR)^{n_2}$. By induction on $e$ all the ideals $I(\varphi_i)/xR$ have a regular sequence of length $i - 1$. This proves that $I(\varphi_i)$ contains a regular sequence of length $i$. \medskip\noindent Assume (2)(a) and (2)(b) hold. We will prove that (1) holds by induction on $\dim(R)$. If $\dim(R) = 0$, then we must have $I(\varphi_i) = R$ for $1 \leq i \leq e$ by (2)(b). Since the coefficients of $\varphi_i$ are contained in the maximal ideal this can happen only if $r_i = 0$ for all $i$. By (2)(a) we conclude that $e = 0$ and (1) holds. Assume $\dim(R) > 0$. We claim that for any prime $\mathfrak p \subset R$ conditions (2)(a) and (2)(b) hold for the complex $0 \to R_\mathfrak p^{n_e} \to R_\mathfrak p^{n_{e - 1}} \to \ldots \to R_\mathfrak p^{n_0}$ with maps $\varphi_{i, \mathfrak p}$ over $R_\mathfrak p$. Namely, since $I(\varphi_i)$ contains a nonzero divisor, the image of $I(\varphi_i)$ in $R_\mathfrak p$ is nonzero. This implies that the rank of $\varphi_{i, \mathfrak p}$ is the same as the rank of $\varphi_i$: the rank as defined above of a matrix $\varphi$ over a ring $R$ can only drop when passing to an $R$-algebra $R'$ and this happens if and only if $I(\varphi)$ maps to zero in $R'$. Thus (2)(a) holds. Having said this we know that $I(\varphi_{i, \mathfrak p}) = I(\varphi_i)_\mathfrak p$ and we see that (2)(b) is preserved under localization as well. By induction on the dimension of $R$ we may assume the complex is exact when localized at any nonmaximal prime $\mathfrak p$ of $R$. Thus $\Ker(\varphi_i)/\Im(\varphi_{i + 1})$ has support contained in $\{\mathfrak m\}$ and hence if nonzero has depth $0$. Since $r_e = n_e > 0$ and the matrix entries lie in $\mathfrak m$, we have $I(\varphi_e) \subset \mathfrak m$. Thus (2)(b) implies $\text{depth}(R) \geq e$. By Lemma \ref{lemma-acyclic} we see that the complex is exact at $R^{n_e}, \ldots, R^{n_1}$ concluding the proof. \end{proof} \begin{remark} \label{remark-what-exact} If in Proposition \ref{proposition-what-exact} the equivalent conditions (1) and (2) are satisfied, then there exists a $j$ such that $I(\varphi_i) = R$ if and only if $i \geq j$. As in the proof of the proposition, it suffices to see this when all the matrices have coefficients in the maximal ideal $\mathfrak m$ of $R$. In this case we see that $I(\varphi_j) = R$ if and only if $\varphi_j = 0$. But if $\varphi_j = 0$, then we get arbitrarily long exact complexes $0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_j} \to 0 \to 0 \to \ldots \to 0$ and hence by the proposition we see that $I(\varphi_i)$ for $i > j$ has to be $R$ (since otherwise it is a proper ideal of a Noetherian local ring containing arbitrary long regular sequences which is impossible). \end{remark} \section{Cohen-Macaulay modules} \label{section-CM} % BEGIN ALGEBRA EDITORIAL ROUTE section-CM \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-CM}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-CM \noindent Here we show that Cohen-Macaulay modules have good properties. We postpone using Ext groups to establish the connection with duality and so on. \begin{definition} \label{definition-CM} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module. We say $M$ is {\it Cohen-Macaulay} if $M=0$ or if $\dim(\text{Supp}(M)) = \text{depth}(M)$. \end{definition} \noindent A first goal will be to establish Proposition \ref{proposition-CM-module}. We do this by a (perhaps nonstandard) sequence of elementary lemmas involving almost none of the earlier results on depth. Let us introduce some notation. \medskip\noindent Let $R$ be a local Noetherian ring. Let $M$ be a Cohen-Macaulay module, and let $f_1, \ldots, f_d$ be an $M$-regular sequence with $d = \dim(\text{Supp}(M))$. We say that $g \in \mathfrak m$ is {\it good with respect to $(M, f_1, \ldots, f_d)$} if for all $i = 0, 1, \ldots, d-1$ we have $\dim (\text{Supp}(M) \cap V(g, f_1, \ldots, f_i)) = d - i - 1$. This is equivalent to the condition that $\dim(\text{Supp}(M/(f_1, \ldots, f_i)M) \cap V(g)) = d - i - 1$ for $i = 0, 1, \ldots, d - 1$. \begin{lemma} \label{lemma-good-element} Notation and assumptions as above. Assume $d>0$. If $g$ is good with respect to $(M, f_1, \ldots, f_d)$, then (a) $g$ is a nonzerodivisor on $M$, and (b) $M/gM$ is Cohen-Macaulay with maximal regular sequence $f_1, \ldots, f_{d - 1}$. \end{lemma} \begin{proof} We prove the lemma by induction on $d \geq 1$. If $d = 1$, then we have to show that $g : M \to M$ is injective. The kernel $K$ has support contained in $\{\mathfrak m\}$ because by assumption $\dim \text{Supp}(M) \cap V(g) = 0$. Hence $K$ has finite length. Hence $f_1 : K \to K$ injective implies the length of the image is the length of $K$, and hence $f_1 K = K$, which by Nakayama's Lemma \ref{lemma-NAK} implies $K = 0$. Also, $\dim \text{Supp}(M/gM) = 0$ and so $M/gM$ is Cohen-Macaulay of depth $0$. \medskip\noindent Assume $d > 1$. Observe that $g$ is good for $(M/f_1M, f_2, \ldots, f_d)$, as is easily seen from the definition. By induction, we have that (a) $g$ is a nonzerodivisor on $M/f_1M$ and (b) $M/(g, f_1)M$ is Cohen-Macaulay with maximal regular sequence $f_2, \ldots, f_{d - 1}$. By Lemma \ref{lemma-permute-xi} we see that $g, f_1$ is an $M$-regular sequence. Hence $g$ is a nonzerodivisor on $M$ and $f_1, \ldots, f_{d - 1}$ is an $M/gM$-regular sequence. \end{proof} \begin{lemma} \label{lemma-CM-one-g} Let $R$ be a Noetherian local ring. Let $M$ be a Cohen-Macaulay module over $R$. Suppose $g \in \mathfrak m$ is such that $\dim(\text{Supp}(M) \cap V(g)) = \dim(\text{Supp}(M)) - 1$. Then (a) $g$ is a nonzerodivisor on $M$, and (b) $M/gM$ is Cohen-Macaulay of depth one less. \end{lemma} \begin{proof} Choose an $M$-regular sequence $f_1, \ldots, f_d$ with $d = \dim(\text{Supp}(M))$. If $g$ is good with respect to $(M, f_1, \ldots, f_d)$ we win by Lemma \ref{lemma-good-element}. In particular the lemma holds if $d = 1$. (The case $d = 0$ does not occur.) Assume $d > 1$. Choose an element $h \in R$ such that (\romannumeral1) $h$ is good with respect to $(M, f_1, \ldots, f_d)$, and (\romannumeral2) $\dim(\text{Supp}(M) \cap V(h, g)) = d - 2$. To see $h$ exists, let $\{\mathfrak q_j\}$ be the (finite) set of minimal primes of the closed sets $\text{Supp}(M)$, $\text{Supp}(M)\cap V(f_1, \ldots, f_i)$, $i = 1, \ldots, d - 1$, and $\text{Supp}(M) \cap V(g)$. None of these $\mathfrak q_j$ is equal to $\mathfrak m$ and hence we may find $h \in \mathfrak m$, $h \not \in \mathfrak q_j$ by Lemma \ref{lemma-silly}. It is clear that $h$ satisfies (\romannumeral1) and (\romannumeral2). From Lemma \ref{lemma-good-element} we conclude that $M/hM$ is Cohen-Macaulay. By (\romannumeral2) we see that the pair $(M/hM, g)$ satisfies the induction hypothesis. Hence $M/(h, g)M$ is Cohen-Macaulay and $g : M/hM \to M/hM$ is injective. By Lemma \ref{lemma-permute-xi} we see that $g : M \to M$ and $h : M/gM \to M/gM$ are injective. Combined with the fact that $M/(g, h)M$ is Cohen-Macaulay this finishes the proof. \end{proof} \begin{proposition} \label{proposition-CM-module} Let $R$ be a Noetherian local ring, with maximal ideal $\mathfrak m$. Let $M$ be a nonzero Cohen-Macaulay module over $R$ whose support has dimension $d$. Suppose that $g_1, \ldots, g_c$ are elements of $\mathfrak m$ such that $\dim(\text{Supp}(M/(g_1, \ldots, g_c)M)) = d - c$. Then $g_1, \ldots, g_c$ is an $M$-regular sequence, and can be extended to a maximal $M$-regular sequence. \end{proposition} \begin{proof} Let $Z = \text{Supp}(M) \subset \Spec(R)$. By Lemma \ref{lemma-one-equation} in the chain $Z \supset Z \cap V(g_1) \supset \ldots \supset Z \cap V(g_1, \ldots, g_c)$ each step decreases the dimension at most by $1$. Hence by assumption each step decreases the dimension by exactly $1$ each time. Thus we may successively apply Lemma \ref{lemma-CM-one-g} to the modules $M/(g_1, \ldots, g_i)M$ and the element $g_{i + 1}$. \medskip\noindent To extend $g_1, \ldots, g_c$ by one element if $c < d$ we simply choose an element $g_{c + 1} \in \mathfrak m$ which is not in any of the finitely many minimal primes of $Z \cap V(g_1, \ldots, g_c)$, using Lemma \ref{lemma-silly}. \end{proof} \noindent Having proved Proposition \ref{proposition-CM-module} we continue the development of standard theory. \begin{lemma} \label{lemma-nonzerodivisor-on-CM} Let $R$ be a Noetherian local ring with maximal ideal $\mathfrak m$. Let $M$ be a finite $R$-module. Let $x \in \mathfrak m$ be a nonzerodivisor on $M$. Then $M$ is Cohen-Macaulay if and only if $M/xM$ is Cohen-Macaulay. \end{lemma} \begin{proof} By Lemma \ref{lemma-depth-drops-by-one} we have $\text{depth}(M/xM) = \text{depth}(M)-1$. By Lemma \ref{lemma-one-equation-module} we have $\dim(\text{Supp}(M/xM)) = \dim(\text{Supp}(M)) - 1$. \end{proof} \begin{lemma} \label{lemma-CM-over-quotient} Let $R \to S$ be a surjective homomorphism of Noetherian local rings. Let $N$ be a finite $S$-module. Then $N$ is Cohen-Macaulay as an $S$-module if and only if $N$ is Cohen-Macaulay as an $R$-module. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-CM-ass-minimal-support} \begin{reference} \cite[Chapter 0, Proposition 16.5.4]{EGA} \end{reference} Let $R$ be a Noetherian local ring. Let $M$ be a finite Cohen-Macaulay $R$-module. If $\mathfrak p \in \text{Ass}(M)$, then $\dim(R/\mathfrak p) = \dim(\text{Supp}(M))$ and $\mathfrak p$ is a minimal prime in the support of $M$. In particular, $M$ has no embedded associated primes. \end{lemma} \begin{proof} By Lemma \ref{lemma-depth-dim-associated-primes} we have $\text{depth}(M) \leq \dim(R/\mathfrak p)$. Of course $\dim(R/\mathfrak p) \leq \dim(\text{Supp}(M))$ as $\mathfrak p \in \text{Supp}(M)$ (Lemma \ref{lemma-ass-support}). Thus we have equality in both inequalities as $M$ is Cohen-Macaulay. Then $\mathfrak p$ must be minimal in $\text{Supp}(M)$ otherwise we would have $\dim(R/\mathfrak p) < \dim(\text{Supp}(M))$. Finally, minimal primes in the support of $M$ are equal to the minimal elements of $\text{Ass}(M)$ (Proposition \ref{proposition-minimal-primes-associated-primes}) hence $M$ has no embedded associated primes (Definition \ref{definition-embedded-primes}). \end{proof} \begin{definition} \label{definition-maximal-CM} Let $R$ be a Noetherian local ring. A finite module $M$ over $R$ is called a {\it maximal Cohen-Macaulay} module if $\text{depth}(M) = \dim(R)$. \end{definition} \noindent In other words, a maximal Cohen-Macaulay module over a Noetherian local ring is a nonzero finite module with the largest possible depth over that ring. Equivalently, a maximal Cohen-Macaulay module over a Noetherian local ring $R$ is a Cohen-Macaulay module of dimension equal to the dimension of the ring. In particular, if $M$ is a Cohen-Macaulay $R$-module with $\Spec(R) = \text{Supp}(M)$, then $M$ is maximal Cohen-Macaulay. Thus the following two lemmas are on maximal Cohen-Macaulay modules. \begin{lemma} \label{lemma-maximal-chain-maximal-CM} \begin{slogan} In a local Cohen-Macaulay ring, any maximal chain of prime ideals has length equal to the dimension. \end{slogan} Let $R$ be a Noetherian local ring. Assume there exists a Cohen-Macaulay module $M$ with $\Spec(R) = \text{Supp}(M)$. Then any maximal chain of prime ideals $\mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_n$ has length $n = \dim(R)$. \end{lemma} \begin{proof} We will prove this by induction on $\dim(R)$. If $\dim(R) = 0$, then the statement is clear. Assume $\dim(R) > 0$. Then $n > 0$. Choose an element $x \in \mathfrak p_1$, with $x$ not in any of the minimal primes of $R$, and in particular $x \not \in \mathfrak p_0$. (See Lemma \ref{lemma-silly}.) Then $\dim(R/xR) = \dim(R) - 1$ by Lemma \ref{lemma-one-equation}. The module $M/xM$ is Cohen-Macaulay over $R/xR$ by Proposition \ref{proposition-CM-module} and Lemma \ref{lemma-CM-over-quotient}. The support of $M/xM$ is $\Spec(R/xR)$ by Lemma \ref{lemma-support-quotient}. After replacing $x$ by $x^n$ for some $n$, we may assume that $\mathfrak p_1$ is an associated prime of $M/xM$, see Lemma \ref{lemma-inherit-minimal-primes}. By Lemma \ref{lemma-CM-ass-minimal-support} we conclude that $\mathfrak p_1/(x)$ is a minimal prime of $R/xR$. It follows that the chain $\mathfrak p_1/(x) \subset \ldots \subset \mathfrak p_n/(x)$ is a maximal chain of primes in $R/xR$. By induction we find that this chain has length $\dim(R/xR) = \dim(R) - 1$ as desired. \end{proof} \begin{lemma} \label{lemma-dim-formula-maximal-CM} Suppose $R$ is a Noetherian local ring. Assume there exists a Cohen-Macaulay module $M$ with $\Spec(R) = \text{Supp}(M)$. Then for a prime $\mathfrak p \subset R$ we have $$ \dim(R) = \dim(R_{\mathfrak p}) + \dim(R/\mathfrak p). $$ \end{lemma} \begin{proof} Follows immediately from Lemma \ref{lemma-maximal-chain-maximal-CM}. \end{proof} \begin{lemma} \label{lemma-localize-CM-module} Suppose $R$ is a Noetherian local ring. Let $M$ be a Cohen-Macaulay module over $R$. For any prime $\mathfrak p \subset R$ the module $M_{\mathfrak p}$ is Cohen-Macaulay over $R_\mathfrak p$. \end{lemma} \begin{proof} We may and do assume $\mathfrak p \not = \mathfrak m$ and $M_{\mathfrak p}$ is nonzero. Choose a maximal chain of primes $\mathfrak p = \mathfrak p_c \subset \mathfrak p_{c - 1} \subset \ldots \subset \mathfrak p_1 \subset \mathfrak m$. If we prove the result for $M_{\mathfrak p_1}$ over $R_{\mathfrak p_1}$, then the lemma will follow by induction on $c$. Thus we may assume that there is no prime strictly between $\mathfrak p$ and $\mathfrak m$. Note that $\dim(\text{Supp}(M_\mathfrak p)) \leq \dim(\text{Supp}(M)) - 1$ because any chain of primes in the support of $M_\mathfrak p$ can be extended by one more prime (namely $\mathfrak m$) in the support of $M$. On the other hand, we have $\text{depth}(M_\mathfrak p) \geq \text{depth}(M) - \dim(R/\mathfrak p) = \text{depth}(M) - 1$ by Lemma \ref{lemma-depth-localization} and our choice of $\mathfrak p$. Thus $\text{depth}(M_\mathfrak p) \geq \dim(\text{Supp}(M_\mathfrak p))$ as desired (the other inequality is Lemma \ref{lemma-bound-depth}). \end{proof} \begin{definition} \label{definition-module-CM} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. We say $M$ is {\it Cohen-Macaulay} if $M_\mathfrak p$ is a Cohen-Macaulay module over $R_\mathfrak p$ for all primes $\mathfrak p$ of $R$. \end{definition} \noindent By Lemma \ref{lemma-localize-CM-module} it suffices to check this in the maximal ideals of $R$. \begin{lemma} \label{lemma-maximal-CM-polynomial-algebra} Let $R$ be a Noetherian ring. Let $M$ be a Cohen-Macaulay module over $R$. Then $M \otimes_R R[x_1, \ldots, x_n]$ is a Cohen-Macaulay module over $R[x_1, \ldots, x_n]$. \end{lemma} \begin{proof} By induction on the number of variables it suffices to prove this for $M[x] = M \otimes_R R[x]$ over $R[x]$. Let $\mathfrak m \subset R[x]$ be a maximal ideal, and let $\mathfrak p = R \cap \mathfrak m$. If $M_{\mathfrak p}=0$, then $M[x]_{\mathfrak m}=0$ and we are done. Hence assume $M_{\mathfrak p}\ne0$. Let $f_1, \ldots, f_d$ be an $M_\mathfrak p$-regular sequence in the maximal ideal of $R_{\mathfrak p}$ of length $d = \dim(\text{Supp}(M_{\mathfrak p}))$. Note that since $R[x]$ is flat over $R$ the localization $R[x]_{\mathfrak m}$ is flat over $R_{\mathfrak p}$. Hence, by Lemma \ref{lemma-flat-increases-depth}, the sequence $f_1, \ldots, f_d$ is a $M[x]_{\mathfrak m}$-regular sequence of length $d$ in $R[x]_{\mathfrak m}$. The quotient $$ Q = M[x]_{\mathfrak m}/(f_1, \ldots, f_d)M[x]_{\mathfrak m} = M_{\mathfrak p}/(f_1, \ldots, f_d)M_{\mathfrak p} \otimes_{R_\mathfrak p} R[x]_{\mathfrak m} $$ has support equal to the primes lying over $\mathfrak p$ because $R_\mathfrak p \to R[x]_\mathfrak m$ is flat and the support of $M_{\mathfrak p}/(f_1, \ldots, f_d)M_{\mathfrak p}$ is equal to $\{\mathfrak p\}$ (details omitted; hint: follows from Lemmas \ref{lemma-annihilator-flat-base-change} and \ref{lemma-support-closed}). Hence the dimension is $1$. To finish the proof it suffices to find an $f \in \mathfrak m$ which is a nonzerodivisor on $Q$. Since $\mathfrak m$ is a maximal ideal, the field extension $\kappa(\mathfrak m)/\kappa(\mathfrak p)$ is finite (Theorem \ref{theorem-nullstellensatz}). Hence we can find $f \in \mathfrak m$ which viewed as a polynomial in $x$ has leading coefficient not in $\mathfrak p$. Such an $f$ acts as a nonzerodivisor on $$ M_{\mathfrak p}/(f_1, \ldots, f_d)M_{\mathfrak p} \otimes_R R[x] = \bigoplus\nolimits_{n \geq 0} M_{\mathfrak p}/(f_1, \ldots, f_d)M_{\mathfrak p} \cdot x^n $$ and hence acts as a nonzerodivisor on $Q$. \end{proof} \section{Cohen-Macaulay rings} \label{section-CM-ring} % BEGIN ALGEBRA EDITORIAL ROUTE section-CM-ring \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-CM-ring}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-CM-ring \noindent Most of the results of this section are special cases of the results in Section \ref{section-CM}. \begin{definition} \label{definition-local-ring-CM} A Noetherian local ring $R$ is called {\it Cohen-Macaulay} if it is Cohen-Macaulay as a module over itself. \end{definition} \noindent Note that this is equivalent to requiring the existence of an $R$-regular sequence $x_1, \ldots, x_d$ of the maximal ideal such that $R/(x_1, \ldots, x_d)$ has dimension $0$. We will usually just say ``regular sequence'' and not ``$R$-regular sequence''. \begin{lemma} \label{lemma-reformulate-CM} \begin{slogan} Regular sequences in Cohen-Macaulay local rings are characterized by cutting out something of the correct dimension. \end{slogan} Let $R$ be a Noetherian local Cohen-Macaulay ring with maximal ideal $\mathfrak m $. Let $x_1, \ldots, x_c \in \mathfrak m$ be elements. Then $$ x_1, \ldots, x_c \text{ is a regular sequence } \Leftrightarrow \dim(R/(x_1, \ldots, x_c)) = \dim(R) - c $$ If so $x_1, \ldots, x_c$ can be extended to a regular sequence of length $\dim(R)$ and each quotient $R/(x_1, \ldots, x_i)$ is a Cohen-Macaulay ring of dimension $\dim(R) - i$. \end{lemma} \begin{proof} Special case of Proposition \ref{proposition-CM-module}. \end{proof} \begin{lemma} \label{lemma-maximal-chain-CM} Let $R$ be a Noetherian local ring. Suppose $R$ is Cohen-Macaulay of dimension $d$. Any maximal chain of prime ideals $\mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_n$ has length $n = d$. \end{lemma} \begin{proof} Special case of Lemma \ref{lemma-maximal-chain-maximal-CM}. \end{proof} \begin{lemma} \label{lemma-CM-dim-formula} Suppose $R$ is a Noetherian local Cohen-Macaulay ring of dimension $d$. For any prime $\mathfrak p \subset R$ we have $$ \dim(R) = \dim(R_{\mathfrak p}) + \dim(R/\mathfrak p). $$ \end{lemma} \begin{proof} Follows immediately from Lemma \ref{lemma-maximal-chain-CM}. (Also, this is a special case of Lemma \ref{lemma-dim-formula-maximal-CM}.) \end{proof} \begin{lemma} \label{lemma-localize-CM} Suppose $R$ is a Cohen-Macaulay local ring. For any prime $\mathfrak p \subset R$ the ring $R_{\mathfrak p}$ is Cohen-Macaulay as well. \end{lemma} \begin{proof} Special case of Lemma \ref{lemma-localize-CM-module}. \end{proof} \begin{definition} \label{definition-ring-CM} A Noetherian ring $R$ is called {\it Cohen-Macaulay} if all its local rings are Cohen-Macaulay. \end{definition} \begin{lemma} \label{lemma-CM-polynomial-algebra} Suppose $R$ is a Noetherian Cohen-Macaulay ring. Any polynomial algebra in finitely many variables over $R$ is Cohen-Macaulay. \end{lemma} \begin{proof} Special case of Lemma \ref{lemma-maximal-CM-polynomial-algebra}. \end{proof} \begin{lemma} \label{lemma-dimension-shift} Let $R$ be a Noetherian local Cohen-Macaulay ring of dimension $d$. Let $0 \to K \to R^{\oplus n} \to M \to 0$ be an exact sequence of $R$-modules. Then either $M = 0$, or $\text{depth}(K) > \text{depth}(M)$, or $\text{depth}(K) = \text{depth}(M) = d$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-depth-in-ses}. \end{proof} \begin{lemma} \label{lemma-mcm-resolution} Let $R$ be a local Noetherian Cohen-Macaulay ring of dimension $d$. Let $M$ be a nonzero finite $R$-module of depth $e$. If $e=d$, take $K=M$ and the identity map $K\to M$, with no free terms. If $e 0$ pick an $x \in \mathfrak m$, $x \not \in \mathfrak m^2$. For some $i$ we can find an $x_i \in \mathfrak m_i$ mapping to $x$. Note that $R/xR = \colim_{i' \geq i} R_{i'}/x_iR_{i'}$ is a Noetherian local ring. By Lemma \ref{lemma-regular-ring-CM} we see that $R_{i'}/x_iR_{i'}$ is a regular local ring. Hence by induction we see that $R/xR$ is a regular local ring. Since each $R_i$ is a domain (Lemma \ref{lemma-regular-domain}) we see that $R$ is a domain. Hence $x$ is a nonzerodivisor and we conclude that $R$ is a regular local ring by Lemma \ref{lemma-regular-mod-x}. \end{proof} \section{Epimorphisms of rings} \label{section-epimorphism} % BEGIN ALGEBRA EDITORIAL ROUTE section-epimorphism \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-epimorphism}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-epimorphism \noindent In any category there is a notion of an {\it epimorphism}. Some of this material is taken from \cite{Autour} and \cite{Mazet}. \begin{lemma} \label{lemma-epimorphism} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is an epimorphism, \item the two ring maps $S \to S \otimes_R S$ are equal, \item either of the ring maps $S \to S \otimes_R S$ is an isomorphism, and \item the ring map $S \otimes_R S \to S$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-composition-epimorphism} The composition of two epimorphisms of rings is an epimorphism. \end{lemma} \begin{proof} Omitted. Hint: This is true in any category. \end{proof} \begin{lemma} \label{lemma-base-change-epimorphism} If $R \to S$ is an epimorphism of rings and $R \to R'$ is any ring map, then $R' \to R' \otimes_R S$ is an epimorphism. \end{lemma} \begin{proof} Omitted. Hint: True in any category with pushouts. \end{proof} \begin{lemma} \label{lemma-permanence-epimorphism} If $A \to B \to C$ are ring maps and $A \to C$ is an epimorphism, so is $B \to C$. \end{lemma} \begin{proof} Omitted. Hint: This is true in any category. \end{proof} \noindent This means in particular that if $R \to S$ is an epimorphism with image $\overline{R} \subset S$, then $\overline{R} \to S$ is an epimorphism. Hence while proving results for epimorphisms we may often assume the map is injective. The following lemma means in particular that every localization is an epimorphism. \begin{lemma} \label{lemma-epimorphism-local} Let $R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item $R \to S$ is an epimorphism, and \item $R_{\mathfrak p} \to S_{\mathfrak p}$ is an epimorphism for each prime $\mathfrak p$ of $R$. \end{enumerate} \end{lemma} \begin{proof} Since $S_{\mathfrak p} = R_{\mathfrak p} \otimes_R S$ (see Lemma \ref{lemma-tensor-localization}) we see that (1) implies (2) by Lemma \ref{lemma-base-change-epimorphism}. Conversely, assume that (2) holds. Let $a, b : S \to A$ be two ring maps from $S$ to a ring $A$ whose composites with $R \to S$ are equal. By assumption we see that for every prime $\mathfrak p$ of $R$ the induced maps $a_{\mathfrak p}, b_{\mathfrak p} : S_{\mathfrak p} \to A_{\mathfrak p}$ are the same. Hence $a = b$ as $A \subset \prod_{\mathfrak p} A_{\mathfrak p}$, see Lemma \ref{lemma-characterize-zero-local}. \end{proof} \begin{lemma} \label{lemma-finite-epimorphism-surjective} \begin{slogan} A ring map is surjective if and only if it is a finite epimorphism. \end{slogan} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is an epimorphism and finite, and \item $R \to S$ is surjective. \end{enumerate} \end{lemma} \begin{proof} (This lemma seems to have been reproved many times in the literature, and has many different proofs.) It is clear that a surjective ring map is an epimorphism. Suppose that $R \to S$ is a finite ring map such that $S \otimes_R S \to S$ is an isomorphism. Our goal is to show that $R \to S$ is surjective. Assume $S/R$ is not zero. The exact sequence $R \to S \to S/R \to 0$ leads to an exact sequence $$ R \otimes_R S \to S \otimes_R S \to S/R \otimes_R S \to 0. $$ Our assumption implies that the first arrow is an isomorphism, hence we conclude that $S/R \otimes_R S = 0$. Hence also $S/R \otimes_R S/R = 0$. By Lemma \ref{lemma-trivial-filter-finite-module} there exists a surjection of $R$-modules $S/R \to R/I$ for some proper ideal $I \subset R$. Hence there exists a surjection $S/R \otimes_R S/R \to R/I \otimes_R R/I = R/I \not = 0$, contradiction. \end{proof} \begin{lemma} \label{lemma-faithfully-flat-epimorphism} A faithfully flat epimorphism is an isomorphism. \end{lemma} \begin{proof} This is clear from Lemma \ref{lemma-epimorphism} part (3) as the map $S \to S \otimes_R S$ is the map $R \to S$ tensored with $S$. \end{proof} \begin{lemma} \label{lemma-epimorphism-over-field} If $k \to S$ is an epimorphism and $k$ is a field, then $S = k$ or $S = 0$. \end{lemma} \begin{proof} This is clear from the result of Lemma \ref{lemma-faithfully-flat-epimorphism} (as any nonzero algebra over $k$ is faithfully flat), or by arguing directly that $S \to S \otimes_k S$ cannot be surjective unless $\dim_k(S) \leq 1$. \end{proof} \begin{lemma} \label{lemma-epimorphism-injective-spec} Let $R \to S$ be an epimorphism of rings. Then \begin{enumerate} \item $\Spec(S) \to \Spec(R)$ is injective, and \item for $\mathfrak q \subset S$ lying over $\mathfrak p \subset R$ we have $\kappa(\mathfrak p) = \kappa(\mathfrak q)$. \end{enumerate} \end{lemma} \begin{proof} Let $\mathfrak p$ be a prime of $R$. The fibre of the map is the spectrum of the fibre ring $S \otimes_R \kappa(\mathfrak p)$. By Lemma \ref{lemma-base-change-epimorphism} the map $\kappa(\mathfrak p) \to S \otimes_R \kappa(\mathfrak p)$ is an epimorphism, and hence by Lemma \ref{lemma-epimorphism-over-field} we have either $S \otimes_R \kappa(\mathfrak p) = 0$ or $S \otimes_R \kappa(\mathfrak p) = \kappa(\mathfrak p)$ which proves (1) and (2). \end{proof} \begin{lemma} \label{lemma-relations} Let $R$ be a ring. Let $M$, $N$ be $R$-modules. Let $\{x_i\}_{i \in I}$ be a set of generators of $M$. Let $\{y_j\}_{j \in J}$ be a set of generators of $N$. Let $\{m_j\}_{j \in J}$ be a family of elements of $M$ with $m_j = 0$ for all but finitely many $j$. Then $$ \sum\nolimits_{j \in J} m_j \otimes y_j = 0 \text{ in } M \otimes_R N $$ is equivalent to the following: There exist $a_{i, j} \in R$ with $a_{i, j} = 0$ for all but finitely many pairs $(i, j)$ such that \begin{align*} m_j & = \sum\nolimits_{i \in I} a_{i, j} x_i \quad\text{for all } j \in J, \\ 0 & = \sum\nolimits_{j \in J} a_{i, j} y_j \quad\text{for all } i \in I. \end{align*} \end{lemma} \begin{proof} The sufficiency is immediate. Suppose that $\sum_{j \in J} m_j \otimes y_j = 0$. Consider the short exact sequence $$ 0 \to K \to \bigoplus\nolimits_{j \in J} R \to N \to 0 $$ where the $j$th basis vector of $\bigoplus\nolimits_{j \in J} R$ maps to $y_j$. Tensor this with $M$ to get the exact sequence $$ K \otimes_R M \to \bigoplus\nolimits_{j \in J} M \to N \otimes_R M \to 0. $$ The assumption implies that there exist elements $k_i \in K$ such that $\sum k_i \otimes x_i$ maps to the element $(m_j)_{j \in J}$ of the middle. Writing $k_i = (a_{i, j})_{j \in J}$, we obtain what we want. \end{proof} \begin{lemma} \label{lemma-kernel-difference-projections} Let $\varphi : R \to S$ be a ring map. Let $g \in S$. The following are equivalent: \begin{enumerate} \item $g \otimes 1 = 1 \otimes g$ in $S \otimes_R S$, and \item there exist $n \geq 0$ and elements $y_i, z_j \in S$ and $x_{i, j} \in R$ for $1 \leq i, j \leq n$ such that \begin{enumerate} \item $g = \sum_{i, j \leq n} x_{i, j} y_i z_j$, \item for each $j$ we have $\sum x_{i, j}y_i \in \varphi(R)$, and \item for each $i$ we have $\sum x_{i, j}z_j \in \varphi(R)$. \end{enumerate} \end{enumerate} \end{lemma} \begin{proof} It is clear that (2) implies (1). Conversely, suppose that $g \otimes 1 = 1 \otimes g$. Choose generators $\{s_i\}_{i \in I}$ of $S$ as an $R$-module with $0, 1 \in I$ and $s_0 = 1$ and $s_1 = g$. Apply Lemma \ref{lemma-relations} to the relation $g \otimes s_0 + (-1) \otimes s_1 = 0$. We see that there exist $a_{i, j} \in R$ such that $g = \sum_i a_{i, 0} s_i$, $-1 = \sum_i a_{i, 1} s_i$, and for $j \not = 0, 1$ we have $0 = \sum_i a_{i, j} s_i$, and moreover for all $i$ we have $\sum_j a_{i, j}s_j = 0$. Then we have $$ \sum\nolimits_{i, j \not = 0} a_{i, j} s_i s_j = -g + a_{0, 0} $$ and for each $j \not = 0$ we have $\sum_{i \not = 0} a_{i, j}s_i \in \varphi(R)$. This proves that $-g + a_{0, 0}$ can be written as in (2). It follows that $g$ can be written as in (2). Details omitted. Hint: Show that the set of elements of $S$ which have an expression as in (2) forms an $R$-subalgebra of $S$. \end{proof} \begin{remark} \label{remark-matrices-associated-to-elements-epicenter} Let $R \to S$ be a ring map. Sometimes the set of elements $g \in S$ such that $g \otimes 1 = 1 \otimes g$ is called the {\it epicenter} of $S$. It is an $R$-algebra. By the construction of Lemma \ref{lemma-kernel-difference-projections} we get for each $g$ in the epicenter a matrix factorization $$ (g) = Y X Z $$ with $X \in \text{Mat}(n \times n, R)$, $Y \in \text{Mat}(1 \times n, S)$, and $Z \in \text{Mat}(n \times 1, S)$. Namely, let $x_{i, j}, y_i, z_j$ be as in part (2) of the lemma. Set $X = (x_{i, j})$, let $Y$ be the row vector whose entries are the $y_i$ and let $Z$ be the column vector whose entries are the $z_j$. With this notation conditions (b) and (c) of Lemma \ref{lemma-kernel-difference-projections} mean exactly that $Y X \in \text{Mat}(1 \times n, R)$, $X Z \in \text{Mat}(n \times 1, R)$. It turns out to be very convenient to consider the triple of matrices $(X, YX, XZ)$. Given $n \in \mathbf{N}$ and a triple $(P, U, V)$ we say that $(P, U, V)$ is a {\it $n$-triple associated to $g$} if there exists a matrix factorization as above such that $P = X$, $U = YX$ and $V = XZ$. \end{remark} \begin{lemma} \label{lemma-epimorphism-cardinality} Let $R \to S$ be an epimorphism of rings. Then the cardinality of $S$ is at most the cardinality of $R$. In a formula: $|S| \leq |R|$. \end{lemma} \begin{proof} The condition that $R \to S$ is an epimorphism means that each $g \in S$ satisfies $g \otimes 1 = 1 \otimes g$, see Lemma \ref{lemma-epimorphism}. We are going to use the notation introduced in Remark \ref{remark-matrices-associated-to-elements-epicenter}. Suppose that $g, g' \in S$ and suppose that $(P, U, V)$ is an $n$-triple which is associated to both $g$ and $g'$. Then we claim that $g = g'$. Namely, write $(P, U, V) = (X, YX, XZ)$ for a matrix factorization $(g) = YXZ$ of $g$ and write $(P, U, V) = (X', Y'X', X'Z')$ for a matrix factorization $(g') = Y'X'Z'$ of $g'$. Then we see that $$ (g) = YXZ = UZ = Y'X'Z = Y'PZ = Y'XZ = Y'V = Y'X'Z' = (g') $$ and hence $g = g'$. This implies that the cardinality of $S$ is bounded by the number of possible triples, which has cardinality at most $\sup_{n \in \mathbf{N}} |R|^n$. If $R$ is infinite then this is at most $|R|$, see \cite[Ch. I, 10.13]{Kunen}. \medskip\noindent If $R$ is a finite ring then the argument above only proves that $S$ is at worst countable. In fact in this case $R$ is Artinian and the map $R \to S$ is surjective. We omit the proof of this case. \end{proof} \begin{lemma} \label{lemma-epimorphism-modules} For a ring homomorphism $R \to S$ the following are equivalent \begin{enumerate} \item $R \to S$ is an epimorphism of rings, \item for any $S$-modules $N_1, N_2$ we have $\Hom_S(N_1, N_2) = \Hom_R(N_1, N_2)$, and \item the restriction functor $\text{Mod}_S \to \text{Mod}_R$ is fully faithful. \end{enumerate} \end{lemma} \begin{proof} Observe that (2) and (3) are equivalent by definition. \medskip\noindent Assume (1), let $N_1, N_2$ be $S$-modules, and let $\varphi : N_1 \to N_2$ be an $R$-linear map. For any $x \in N_1$ consider the map $S \otimes_R S \to N_2$ defined by the rule $g \otimes g' \mapsto g\varphi(g'x)$. Since both maps $S \to S \otimes_R S$ are isomorphisms (Lemma \ref{lemma-epimorphism}), we conclude that $g \varphi(g'x) = gg'\varphi(x) = \varphi(gg' x)$. Thus $\varphi$ is $S$-linear. \medskip\noindent Assume (2). Let $N_1 = S \otimes_R S$ viewed as an $S$-module via the left $S$-module action and let $N_2 = S \otimes_R S$ with the right $S$-module action. Since $N_1 = N_2$ as $R$-modules, by (2) we see that the two $S$-module structures on $S \otimes_R S$ coincide. This implies (1) by Lemma \ref{lemma-epimorphism}. \end{proof} \section{Pure ideals} \label{section-pure-ideals} % BEGIN ALGEBRA EDITORIAL ROUTE section-pure-ideals \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-pure-ideals}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-pure-ideals \noindent The material in this section is discussed in many papers, see for example \cite{Lazard}, \cite{Bkouche}, and \cite{DeMarco}. \begin{definition} \label{definition-pure-ideal} Let $R$ be a ring. We say that $I \subset R$ is {\it pure} if the quotient ring $R/I$ is flat over $R$. \end{definition} \begin{lemma} \label{lemma-pure} Let $R$ be a ring. Let $I \subset R$ be an ideal. The following are equivalent: \begin{enumerate} \item $I$ is pure, \item for every ideal $J \subset R$ we have $J \cap I = IJ$, \item for every finitely generated ideal $J \subset R$ we have $J \cap I = JI$, \item for every $x \in R$ we have $(x) \cap I = xI$, \item for every $x \in I$ we have $x = yx$ for some $y \in I$, \item for every $x_1, \ldots, x_n \in I$ there exists a $y \in I$ such that $x_i = yx_i$ for all $i = 1, \ldots, n$, \item for every prime $\mathfrak p$ of $R$ we have $IR_{\mathfrak p} = 0$ or $IR_{\mathfrak p} = R_{\mathfrak p}$, \item $\text{Supp}(I) = \Spec(R) \setminus V(I)$, \item $I$ is the kernel of the map $R \to (1 + I)^{-1}R$, \item $R/I \cong S^{-1}R$ as $R$-algebras for some multiplicative subset $S$ of $R$, and \item $R/I \cong (1 + I)^{-1}R$ as $R$-algebras. \end{enumerate} \end{lemma} \begin{proof} For any ideal $J$ of $R$ we have the short exact sequence $0 \to J \to R \to R/J \to 0$. Tensoring with $R/I$ we get an exact sequence $J \otimes_R R/I \to R/I \to R/(I + J) \to 0$ and $J \otimes_R R/I = J/JI$. Thus the equivalence of (1), (2), and (3) follows from Lemma \ref{lemma-flat}. Moreover, these imply (4). \medskip\noindent The implication (4) $\Rightarrow$ (5) is trivial. Assume (5) and let $x_1, \ldots, x_n \in I$. Choose $y_i \in I$ such that $x_i = y_ix_i$. Let $y \in I$ be the element such that $1 - y = \prod_{i = 1, \ldots, n} (1 - y_i)$. Then $x_i = yx_i$ for all $i = 1, \ldots, n$. Hence (6) holds, and it follows that (5) $\Leftrightarrow$ (6). \medskip\noindent Assume (5). Let $x \in I$. Then $x = yx$ for some $y \in I$. Hence $x(1 - y) = 0$, which shows that $x$ maps to zero in $(1 + I)^{-1}R$. Of course the kernel of the map $R \to (1 + I)^{-1}R$ is always contained in $I$. Hence we see that (5) implies (9). Assume (9). Then for any $x \in I$ we see that $x(1 - y) = 0$ for some $y \in I$. In other words, $x = yx$. We conclude that (5) is equivalent to (9). \medskip\noindent Assume (5). Let $\mathfrak p$ be a prime of $R$. If $\mathfrak p \not \in V(I)$, then $IR_{\mathfrak p} = R_{\mathfrak p}$. If $\mathfrak p \in V(I)$, in other words, if $I \subset \mathfrak p$, then $x \in I$ implies $x(1 - y) = 0$ for some $y \in I$, and hence $x$ maps to zero in $R_{\mathfrak p}$, i.e., $IR_{\mathfrak p} = 0$. Thus we see that (7) holds. \medskip\noindent Assume (7). Then $(R/I)_{\mathfrak p}$ is either $0$ or $R_{\mathfrak p}$ for any prime $\mathfrak p$ of $R$. Hence by Lemma \ref{lemma-flat-localization} we see that (1) holds. At this point we see that all of (1) -- (7) and (9) are equivalent. \medskip\noindent As $IR_{\mathfrak p} = I_{\mathfrak p}$ we see that (7) implies (8). Finally, if (8) holds, then this means exactly that $I_{\mathfrak p}$ is the zero module if and only if $\mathfrak p \in V(I)$, which is clearly saying that (7) holds. Now (1) -- (9) are equivalent. \medskip\noindent Assume (1) -- (9) hold. Then $R/I \subset (1 + I)^{-1}R$ by (9) and the map $R/I \to (1 + I)^{-1}R$ is also surjective by the description of localizations at primes afforded by (7). Hence (11) holds. \medskip\noindent The implication (11) $\Rightarrow$ (10) is trivial. And (10) implies that (1) holds because a localization of $R$ is flat over $R$, see Lemma \ref{lemma-flat-localization}. \end{proof} \begin{lemma} \label{lemma-pure-ideal-determined-by-zero-set} \begin{slogan} Pure ideals are determined by their vanishing locus. \end{slogan} Let $R$ be a ring. If $I, J \subset R$ are pure ideals, then $V(I) = V(J)$ implies $I = J$. \end{lemma} \begin{proof} For example, by property (7) of Lemma \ref{lemma-pure} we see that $I = \Ker(R \to \prod_{\mathfrak p \in V(I)} R_{\mathfrak p})$ can be recovered from the closed subset associated to it. \end{proof} \begin{lemma} \label{lemma-pure-open-closed-specializations} Let $R$ be a ring. The rule $I \mapsto V(I)$ determines a bijection $$ \{I \subset R \text{ pure}\} \leftrightarrow \{Z \subset \Spec(R)\text{ closed and closed under generalizations}\} $$ \end{lemma} \begin{proof} Let $I$ be a pure ideal. Then since $R \to R/I$ is flat, by going down generalizations lift along the map $\Spec(R/I) \to \Spec(R)$. Hence $V(I)$ is closed under generalizations. This shows that the map is well defined. By Lemma \ref{lemma-pure-ideal-determined-by-zero-set} the map is injective. Suppose that $Z \subset \Spec(R)$ is closed and closed under generalizations. Let $J \subset R$ be the radical ideal such that $Z = V(J)$. Let $I = \{x \in R : x \in xJ\}$. Note that $I$ is an ideal: if $x, y \in I$ then there exist $f, g \in J$ such that $x = xf$ and $y = yg$. Then $$ x + y = (x + y)(f + g - fg) $$ Verification left to the reader. We claim that $I$ is pure and that $V(I) = V(J)$. If the claim is true then the map of the lemma is surjective and the lemma holds. \medskip\noindent Note that $I \subset J$, so that $V(J) \subset V(I)$. Let $I \subset \mathfrak p$ be a prime. Consider the multiplicative subset $S = (R \setminus \mathfrak p)(1 + J)$. By definition of $I$ and $I \subset \mathfrak p$ we see that $0 \not \in S$. Hence we can find a prime $\mathfrak q$ of $R$ which is disjoint from $S$, see Lemmas \ref{lemma-localization-zero} and \ref{lemma-spec-localization}. Hence $\mathfrak q \subset \mathfrak p$ and $\mathfrak q \cap (1 + J) = \emptyset$. This implies that $\mathfrak q + J$ is a proper ideal of $R$. Let $\mathfrak m$ be a maximal ideal containing $\mathfrak q + J$. Then we get $\mathfrak m \in V(J)$ and hence $\mathfrak q \in V(J) = Z$ as $Z$ was assumed to be closed under generalization. This in turn implies $\mathfrak p \in V(J)$ as $\mathfrak q \subset \mathfrak p$. Thus we see that $V(I) = V(J)$. \medskip\noindent Finally, since $V(I) = V(J)$ (and $J$ radical) we see that $J = \sqrt{I}$. Pick $x \in I$, so that $x = xy$ for some $y \in J$ by definition. Then $x = xy = xy^2 = \ldots = xy^n$. Since $y^n \in I$ for some $n > 0$ we conclude that property (5) of Lemma \ref{lemma-pure} holds and we see that $I$ is indeed pure. \end{proof} \begin{lemma} \label{lemma-finitely-generated-pure-ideal} Let $R$ be a ring. Let $I \subset R$ be an ideal. The following are equivalent \begin{enumerate} \item $I$ is pure and finitely generated, \item $I$ is generated by an idempotent, \item $I$ is pure and $V(I)$ is open, and \item $R/I$ is a projective $R$-module. \end{enumerate} \end{lemma} \begin{proof} If (1) holds, then $I = I \cap I = I^2$ by Lemma \ref{lemma-pure}. Hence $I$ is generated by an idempotent by Lemma \ref{lemma-ideal-is-squared-union-connected}. Thus (1) $\Rightarrow$ (2). If (2) holds, then $I = (e)$ and $R = (1 - e) \oplus (e)$ as an $R$-module hence $R/I$ is flat and $I$ is pure and $V(I) = D(1 - e)$ is open. Thus (2) $\Rightarrow$ (1) $+$ (3). Finally, assume (3). Then $V(I)$ is open and closed, hence $V(I) = D(1 - e)$ for some idempotent $e$ of $R$, see Lemma \ref{lemma-disjoint-decomposition}. The ideal $J = (e)$ is a pure ideal such that $V(J) = V(I)$ hence $I = J$ by Lemma \ref{lemma-pure-ideal-determined-by-zero-set}. In this way we see that (3) $\Rightarrow$ (2). By Lemma \ref{lemma-finite-projective} we see that (4) is equivalent to the assertion that $I$ is pure and $R/I$ finitely presented. Moreover, $R/I$ is finitely presented if and only if $I$ is finitely generated, see Lemma \ref{lemma-extension}. Hence (4) is equivalent to (1). \end{proof} \noindent We can use the above to characterize those rings for which every finite flat module is finitely presented. \begin{lemma} \label{lemma-finite-flat-module-finitely-presented} Let $R$ be a ring. The following are equivalent: \begin{enumerate} \item every $Z \subset \Spec(R)$ which is closed and closed under generalizations is also open, and \item any finite flat $R$-module is finite locally free. \end{enumerate} \end{lemma} \begin{proof} If any finite flat $R$-module is finite locally free then the support of $R/I$ where $I$ is a pure ideal is open. Hence the implication (2) $\Rightarrow$ (1) follows from Lemma \ref{lemma-pure-open-closed-specializations}. \medskip\noindent For the converse assume that $R$ satisfies (1). Let $M$ be a finite flat $R$-module. The support $Z = \text{Supp}(M)$ of $M$ is closed, see Lemma \ref{lemma-support-closed}. On the other hand, if $\mathfrak p \subset \mathfrak p'$, then by Lemma \ref{lemma-finite-flat-local} the module $M_{\mathfrak p'}$ is free, and $M_{\mathfrak p} = M_{\mathfrak p'} \otimes_{R_{\mathfrak p'}} R_{\mathfrak p}$. Hence $\mathfrak p' \in \text{Supp}(M) \Rightarrow \mathfrak p \in \text{Supp}(M)$, in other words, the support is closed under generalization. As $R$ satisfies (1) we see that the support of $M$ is open and closed. Suppose that $M$ is generated by $r$ elements $m_1, \ldots, m_r$. The modules $\wedge^i(M)$, $i = 1, \ldots, r$ are finite flat $R$-modules also, because $\wedge^i(M)_{\mathfrak p} = \wedge^i(M_{\mathfrak p})$ is free over $R_{\mathfrak p}$. Note that $\text{Supp}(\wedge^{i + 1}(M)) \subset \text{Supp}(\wedge^i(M))$. Thus we see that there exists a decomposition $$ \Spec(R) = U_0 \amalg U_1 \amalg \ldots \amalg U_r $$ by open and closed subsets such that the support of $\wedge^i(M)$ is $U_r \cup \ldots \cup U_i$ for all $i = 0, \ldots, r$. Let $\mathfrak p$ be a prime of $R$, and say $\mathfrak p \in U_i$. Note that $\wedge^i(M) \otimes_R \kappa(\mathfrak p) = \wedge^i(M \otimes_R \kappa(\mathfrak p))$. Hence, after possibly renumbering $m_1, \ldots, m_r$ we may assume that $m_1, \ldots, m_i$ generate $M \otimes_R \kappa(\mathfrak p)$. By Nakayama's Lemma \ref{lemma-NAK} we get a surjection $$ R_f^{\oplus i} \longrightarrow M_f, \quad (a_1, \ldots, a_i) \longmapsto \sum a_im_i $$ for some $f \in R$, $f \not \in \mathfrak p$. We may also assume that $D(f) \subset U_i$. This means that $\wedge^i(M_f) = \wedge^i(M)_f$ is a flat $R_f$ module whose support is all of $\Spec(R_f)$. By the above it is generated by a single element, namely $m_1 \wedge \ldots \wedge m_i$. Hence $\wedge^i(M)_f \cong R_f/J$ for some pure ideal $J \subset R_f$ with $V(J) = \Spec(R_f)$. Clearly this means that $J = (0)$, see Lemma \ref{lemma-pure-ideal-determined-by-zero-set}. Thus $m_1 \wedge \ldots \wedge m_i$ is a basis for $\wedge^i(M_f)$ and it follows that the displayed map is injective as well as surjective. This proves that $M$ is finite locally free as desired. \end{proof} \section{Rings of finite global dimension} \label{section-ring-finite-gl-dim} % BEGIN ALGEBRA EDITORIAL ROUTE section-ring-finite-gl-dim \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ring-finite-gl-dim}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ring-finite-gl-dim \noindent The following lemma is often used to compare different projective resolutions of a given module. \begin{lemma}[Schanuel's lemma] \label{lemma-Schanuel} Let $R$ be a ring. Let $M$ be an $R$-module. Suppose that $$ 0 \to K \xrightarrow{c_1} P_1 \xrightarrow{p_1} M \to 0 \quad\text{and}\quad 0 \to L \xrightarrow{c_2} P_2 \xrightarrow{p_2} M \to 0 $$ are two short exact sequences, with $P_i$ projective. Then $K \oplus P_2 \cong L \oplus P_1$. More precisely, there exists a commutative diagram $$ \xymatrix{ 0 \ar[r] & K \oplus P_2 \ar[r]_{(c_1, \text{id})} \ar[d] & P_1 \oplus P_2 \ar[r]_{(p_1, 0)} \ar[d] & M \ar[r] \ar@{=}[d] & 0 \\ 0 \ar[r] & P_1 \oplus L \ar[r]^{(\text{id}, c_2)} & P_1 \oplus P_2 \ar[r]^{(0, p_2)} & M \ar[r] & 0 } $$ whose vertical arrows are isomorphisms. \end{lemma} \begin{proof} Consider the module $N$ defined by the short exact sequence $0 \to N \to P_1 \oplus P_2 \to M \to 0$, where the last map is the sum of the two maps $P_i \to M$. It is easy to see that the projection $N \to P_1$ is surjective with kernel $L$, and that $N \to P_2$ is surjective with kernel $K$. Since $P_i$ are projective we have $N \cong K \oplus P_2 \cong L \oplus P_1$. This proves the first statement. \medskip\noindent To prove the second statement (and to reprove the first), choose $a : P_1 \to P_2$ and $b : P_2 \to P_1$ such that $p_1 = p_2 \circ a$ and $p_2 = p_1 \circ b$. This is possible because $P_1$ and $P_2$ are projective. Then we get a commutative diagram $$ \xymatrix{ 0 \ar[r] & K \oplus P_2 \ar[r]_{(c_1, \text{id})} & P_1 \oplus P_2 \ar[r]_{(p_1, 0)} & M \ar[r] & 0 \\ 0 \ar[r] & N \ar[r] \ar[d] \ar[u] & P_1 \oplus P_2 \ar[r]_{(p_1, p_2)} \ar[d]_S \ar[u]^T & M \ar[r] \ar@{=}[d] \ar@{=}[u] & 0 \\ 0 \ar[r] & P_1 \oplus L \ar[r]^{(\text{id}, c_2)} & P_1 \oplus P_2 \ar[r]^{(0, p_2)} & M \ar[r] & 0 } $$ with $T$ and $S$ given by the matrices $$ S = \left( \begin{matrix} \text{id} & 0 \\ a & \text{id} \end{matrix} \right) \quad\text{and}\quad T = \left( \begin{matrix} \text{id} & b \\ 0 & \text{id} \end{matrix} \right) $$ Then $S$, $T$ and the maps $N \to P_1 \oplus L$ and $N \to K \oplus P_2$ are isomorphisms as desired. \end{proof} \begin{definition} \label{definition-finite-proj-dim} \begin{reference} \cite[Chapter III, \S 5, no. 74, definition of module dimension, pp. 268--269]{FAC} \end{reference} \begin{history} The cited source says that a finite module over the local ring of a point has dimension at most $p$ when it has a finite free resolution of length $p$. This is projective dimension in the terminology below; over a Noetherian local ring the equivalence with a resolution by finite free modules is Lemma \ref{lemma-what-kind-of-resolutions-Noetherian-local}. Immediately after the displayed resolution, the printed text says that ``each $L_p$'' is free. Since its terms are $L_p,L_{p-1},\ldots,L_0$, the quantified index has to be $L_i$. This corrects the repeated index without altering the displayed complex. \end{history} Let $R$ be a ring. Let $M$ be an $R$-module. We say $M$ has {\it finite projective dimension} if it has a finite length resolution by projective $R$-modules. The minimal length of such a resolution is called the {\it projective dimension} of $M$. \end{definition} \noindent It is clear that the projective dimension of $M$ is $0$ if and only if $M$ is a projective module. The following lemma explains to what extent the projective dimension is independent of the choice of a projective resolution. \begin{lemma} \label{lemma-independent-resolution} Let $R$ be a ring. Suppose that $M$ is an $R$-module of projective dimension $d$. Suppose that $F_e \to F_{e-1} \to \ldots \to F_0 \to M \to 0$ is exact with $F_i$ projective and $e \geq d - 1$. Then the kernel of $F_e \to F_{e-1}$ is projective (or the kernel of $F_0 \to M$ is projective in case $e = 0$). \end{lemma} \begin{proof} We prove this by induction on $d$. If $d = 0$, then $M$ is projective. In this case there is a splitting $F_0 = \Ker(F_0 \to M) \oplus M$, and hence $\Ker(F_0 \to M)$ is projective. This finishes the proof if $e = 0$, and if $e > 0$, then replacing $M$ by $\Ker(F_0 \to M)$ we decrease $e$. \medskip\noindent Next assume $d > 0$. Let $0 \to P_d \to P_{d-1} \to \ldots \to P_0 \to M \to 0$ be a minimal length finite resolution with $P_i$ projective. According to Schanuel's Lemma \ref{lemma-Schanuel} we have $P_0 \oplus \Ker(F_0 \to M) \cong F_0 \oplus \Ker(P_0 \to M)$. This proves the case $d = 1$, $e = 0$, because then the right hand side is $F_0 \oplus P_1$ which is projective. Hence now we may assume $e > 0$. The module $F_0 \oplus \Ker(P_0 \to M)$ has the finite projective resolution $$ 0 \to P_d \to P_{d-1} \to \ldots \to P_2 \to P_1 \oplus F_0 \to \Ker(P_0 \to M) \oplus F_0 \to 0 $$ of length $d - 1$. By induction applied to the exact sequence $$ F_e \to F_{e-1} \to \ldots \to F_2 \to P_0 \oplus F_1 \to P_0 \oplus \Ker(F_0 \to M) \to 0 $$ of length $e - 1$ we conclude $\Ker(F_e \to F_{e - 1})$ is projective (if $e \geq 2$) or that $\Ker(F_1 \oplus P_0 \to F_0 \oplus P_0)$ is projective. This implies the lemma. \end{proof} \begin{lemma} \label{lemma-what-kind-of-resolutions} Let $R$ be a ring. Let $M$ be an $R$-module. Let $d \geq 0$. The following are equivalent \begin{enumerate} \item $M$ has projective dimension $\leq d$, \item there exists a resolution $0 \to P_d \to P_{d - 1} \to \ldots \to P_0 \to M \to 0$ with $P_i$ projective, \item for some resolution $\ldots \to P_2 \to P_1 \to P_0 \to M \to 0$ with $P_i$ projective we have $\Ker(P_{d - 1} \to P_{d - 2})$ is projective if $d \geq 2$, or $\Ker(P_0 \to M)$ is projective if $d = 1$, or $M$ is projective if $d = 0$, \item for any resolution $\ldots \to P_2 \to P_1 \to P_0 \to M \to 0$ with $P_i$ projective we have $\Ker(P_{d - 1} \to P_{d - 2})$ is projective if $d \geq 2$, or $\Ker(P_0 \to M)$ is projective if $d = 1$, or $M$ is projective if $d = 0$. \end{enumerate} \end{lemma} \begin{proof} The equivalence of (1) and (2) is the definition of projective dimension, see Definition \ref{definition-finite-proj-dim}. We have (2) $\Rightarrow$ (4) by Lemma \ref{lemma-independent-resolution}. The implications (4) $\Rightarrow$ (3) and (3) $\Rightarrow$ (2) are immediate. \end{proof} \begin{lemma} \label{lemma-what-kind-of-resolutions-local} Let $R$ be a local ring. Let $M$ be an $R$-module. Let $d \geq 0$. The equivalent conditions (1) -- (4) of Lemma \ref{lemma-what-kind-of-resolutions} are also equivalent to \begin{enumerate} \item[(5)] there exists a resolution $0 \to P_d \to P_{d - 1} \to \ldots \to P_0 \to M \to 0$ with $P_i$ free. \end{enumerate} \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-what-kind-of-resolutions} and Theorem \ref{theorem-projective-free-over-local-ring}. \end{proof} \begin{lemma} \label{lemma-what-kind-of-resolutions-Noetherian} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. Let $d \geq 0$. The equivalent conditions (1) -- (4) of Lemma \ref{lemma-what-kind-of-resolutions} are also equivalent to \begin{enumerate} \item[(6)] there exists a resolution $0 \to P_d \to P_{d - 1} \to \ldots \to P_0 \to M \to 0$ with $P_i$ finite projective. \end{enumerate} \end{lemma} \begin{proof} Choose a resolution $\ldots \to F_2 \to F_1 \to F_0 \to M \to 0$ with $F_i$ finite free (Lemma \ref{lemma-resolution-by-finite-free}). By Lemma \ref{lemma-what-kind-of-resolutions} we see that $P_d = \Ker(F_{d - 1} \to F_{d - 2})$ is projective at least if $d \geq 2$. Then $P_d$ is a finite $R$-module as $R$ is Noetherian and $P_d \subset F_{d - 1}$ which is finite free. Whence $0 \to P_d \to F_{d - 1} \to \ldots \to F_1 \to F_0 \to M \to 0$ is the desired resolution. \end{proof} \begin{lemma} \label{lemma-what-kind-of-resolutions-Noetherian-local} Let $R$ be a local Noetherian ring. Let $M$ be a finite $R$-module. Let $d \geq 0$. The equivalent conditions (1) -- (4) of Lemma \ref{lemma-what-kind-of-resolutions}, condition (5) of Lemma \ref{lemma-what-kind-of-resolutions-local}, and condition (6) of Lemma \ref{lemma-what-kind-of-resolutions-Noetherian} are also equivalent to \begin{enumerate} \item[(7)] there exists a resolution $0 \to F_d \to F_{d - 1} \to \ldots \to F_0 \to M \to 0$ with $F_i$ finite free. \end{enumerate} \end{lemma} \begin{proof} This follows from Lemmas \ref{lemma-what-kind-of-resolutions}, \ref{lemma-what-kind-of-resolutions-local}, and \ref{lemma-what-kind-of-resolutions-Noetherian} and because a finite projective module over a local ring is finite free, see Lemma \ref{lemma-finite-projective}. \end{proof} \begin{lemma} \label{lemma-projective-dimension-ext} Let $R$ be a ring. Let $M$ be an $R$-module. Let $n \geq 0$. The following are equivalent \begin{enumerate} \item $M$ has projective dimension $\leq n$, \item $\Ext^i_R(M, N) = 0$ for all $R$-modules $N$ and all $i \geq n + 1$, and \item $\Ext^{n + 1}_R(M, N) = 0$ for all $R$-modules $N$. \end{enumerate} \end{lemma} \begin{proof} Assume (1). Choose a free resolution $F_\bullet \to M$ of $M$. Denote the augmentation by $d_0 : F_0 \to M$ and the differentials by $d_e : F_e \to F_{e - 1}$ for $e \geq 1$. Put $P_{-1}=M$ and $P_e = \Ker(d_e)$ for $e \geq 0$. By Lemma \ref{lemma-independent-resolution} we see that $P_e$ is projective for $e \geq n - 1$. This implies that $F_e \cong P_e \oplus P_{e - 1}$ for $e \geq n$ where $d_e$ maps the summand $P_{e - 1}$ isomorphically to $P_{e - 1}$ in $F_{e - 1}$. Hence, for any $R$-module $N$ the complex $\Hom_R(F_\bullet, N)$ is split exact in degrees $\geq n + 1$. Whence (2) holds. The implication (2) $\Rightarrow$ (3) is trivial. \medskip\noindent Assume (3) holds. If $n = 0$ then $M$ is projective by Lemma \ref{lemma-characterize-projective} and we see that (1) holds. If $n > 0$ choose a free $R$-module $F$ and a surjection $F \to M$ with kernel $K$. By Lemma \ref{lemma-reverse-long-exact-seq-ext} and the vanishing of $\Ext_R^i(F, N)$ for all $i > 0$ by part (1) we see that $\Ext_R^n(K, N) = 0$ for all $R$-modules $N$. Hence by induction we see that $K$ has projective dimension $\leq n - 1$. Then $M$ has projective dimension $\leq n$ as any finite projective resolution of $K$ gives a projective resolution of length one more for $M$ by adding $F$ to the front. \end{proof} \begin{lemma} \label{lemma-projective-dimension-ext-local-ring} \begin{reference} \cite[Chapter III, \S 5, no. 74, Lemma 1 and proof, p. 269]{FAC} \end{reference} \begin{history} For the regular local ring at a point of projective space, the cited lemma characterizes a finite module of projective dimension at most $n$ by the vanishing of $\Ext^i(M,R)$ for $i>n$. Its proof descends from the syzygy bound and uses the characterization by vanishing against every finite module. The statement below isolates the sharper local mechanism: in a minimal finite free resolution the top nonzero term survives after applying $\Hom_R(-,R)$. It applies to every finite module of finite projective dimension over a Noetherian local ring. \end{history} Let $R$ be a Noetherian local ring. Let $M$ be a finite $R$-module of finite projective dimension. For $n\geq0$, the following are equivalent: \begin{enumerate} \item $M$ has projective dimension at most $n$, \item $\Ext^i_R(M,R)=0$ for every $i>n$. \end{enumerate} Moreover, if $M$ is nonzero and $d$ is its projective dimension, then $\Ext^d_R(M,R)$ is nonzero. \end{lemma} \begin{proof} The result is immediate if $M=0$, so assume that $M$ is nonzero and let $d$ be its projective dimension. By Lemma \ref{lemma-what-kind-of-resolutions-Noetherian-local} there is a finite free resolution $$ 0\longrightarrow F_d\longrightarrow F_{d-1}\longrightarrow\cdots \longrightarrow F_0\longrightarrow M\longrightarrow0. $$ Using Lemma \ref{lemma-add-trivial-complex}, remove trivial summands until every matrix entry of every differential belongs to the maximal ideal $\mathfrak m$ of $R$. Minimality of $d$ implies that $F_d$ is nonzero. Consequently $$ \Ext^d_R(M,R)=\Coker\left(\Hom_R(F_{d-1},R)\longrightarrow \Hom_R(F_d,R)\right) $$ surjects onto the nonzero vector space $\Hom_R(F_d,R)/\mathfrak m\Hom_R(F_d,R)$. Thus the top Ext module is nonzero, while the displayed resolution gives $\Ext^i_R(M,R)=0$ for $i>d$. The two conditions in the statement now follow immediately. \end{proof} \begin{lemma} \label{lemma-projective-dimension-ext-finite-module} \begin{reference} \cite[Chapter III, \S 5, no. 77, Lemma 3, p. 271]{FAC} \end{reference} \begin{history} For a finite graded module over a polynomial ring, the cited lemma calls projective dimension the dimension of the module and tests it by vanishing of internal graded Ext into the ring. Algebra, Lemma \ref{lemma-graded-ext-properties} compares that internal Ext with ordinary Ext. The statement below isolates the more general ungraded fact over every Noetherian ring, under the necessary finite-projective-dimension hypothesis. \end{history} Let $R$ be a Noetherian ring and let $M$ be a finite $R$-module of finite projective dimension. For $n\geq0$, the following are equivalent: \begin{enumerate} \item $M$ has projective dimension at most $n$, \item $\Ext^i_R(M,R)=0$ for every $i>n$. \end{enumerate} Moreover, if $M$ is nonzero and $d$ is its projective dimension, then $\Ext^d_R(M,R)$ is nonzero. \end{lemma} \begin{proof} The implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-projective-dimension-ext}. Suppose $M$ is nonzero and has projective dimension $d$. There is a maximal ideal $\mathfrak m$ such that $M_{\mathfrak m}$ has projective dimension $d$. For $d=0$, choose any maximal ideal in the support of $M$. For $d>0$, choose a resolution of $M$ by finite free modules and let $K$ be the finite syzygy which tests the bound $d-1$ in Lemma \ref{lemma-what-kind-of-resolutions}. If no such maximal ideal existed, then $K_{\mathfrak m}$ would be projective for every maximal ideal $\mathfrak m$. Lemma \ref{lemma-finite-projective} would make $K$ finite projective, contradicting the minimality of $d$. Localizing a finite projective resolution of $M$ of length $d$ gives $$ \Ext^d_R(M,R)_{\mathfrak m}= \Ext^d_{R_{\mathfrak m}}(M_{\mathfrak m},R_{\mathfrak m}). $$ The right hand side is nonzero by Lemma \ref{lemma-projective-dimension-ext-local-ring}. Hence the global top Ext module is nonzero. If (2) holds and the projective dimension were larger than $n$, this top nonvanishing would be a contradiction. Thus (2) implies (1), and the final assertion has been proved at the same time. \end{proof} \begin{lemma} \label{lemma-exact-sequence-projective-dimension} Let $R$ be a ring. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of $R$-modules. \begin{enumerate} \item If $M$ has projective dimension $\leq n$ and $M''$ has projective dimension $\leq n + 1$, then $M'$ has projective dimension $\leq n$. \item If $M'$ and $M''$ have projective dimension $\leq n$ then $M$ has projective dimension $\leq n$. \item If $M'$ has projective dimension $\leq n$ and $M$ has projective dimension $\leq n + 1$ then $M''$ has projective dimension $\leq n + 1$. \end{enumerate} \end{lemma} \begin{proof} Combine the characterization of projective dimension in Lemma \ref{lemma-projective-dimension-ext} with the long exact sequence of ext groups in Lemma \ref{lemma-reverse-long-exact-seq-ext}. \end{proof} \begin{definition} \label{definition-finite-gl-dim} Let $R$ be a ring. The ring $R$ is said to have {\it finite global dimension} if there exists an integer $n$ such that every $R$-module has a resolution by projective $R$-modules of length at most $n$. The minimal such $n$ is then called the {\it global dimension} of $R$. \end{definition} \noindent The argument in the proof of the following lemma can be found in the paper \cite{Auslander} by Auslander. \begin{lemma} \label{lemma-colimit-projective-dimension} Let $R$ be a ring. Suppose we have a module $M = \bigcup_{e \in E} M_e$ where the $M_e$ are submodules well-ordered by inclusion. Assume the quotients $M_e/\bigcup\nolimits_{e' < e} M_{e'}$ have projective dimension $\leq n$. Then $M$ has projective dimension $\leq n$. \end{lemma} \begin{proof} We will prove this by induction on $n$. \medskip\noindent Base case: $n = 0$. Then $P_e = M_e/\bigcup_{e' < e} M_{e'}$ is projective. Thus we may choose a section $P_e \to M_e$ of the projection $M_e \to P_e$. We claim that the induced map $\psi : \bigoplus_{e \in E} P_e \to M$ is an isomorphism. Namely, if $x = \sum x_e \in \bigoplus P_e$ is nonzero, then we let $e_{max}$ be maximal such that $x_{e_{max}}$ is nonzero and we conclude that $y = \psi(x) = \psi(\sum x_e)$ is nonzero because $y \in M_{e_{max}}$ has nonzero image $x_{e_{max}}$ in $P_{e_{max}}$. On the other hand, let $y \in M$. Then $y \in M_e$ for some $e$. We show that $y \in \Im(\psi)$ by transfinite induction on $e$. Let $x_e \in P_e$ be the image of $y$. Then $y - \psi(x_e) \in \bigcup_{e' < e} M_{e'}$. By induction hypothesis we conclude that $y - \psi(x_e) \in \Im(\psi)$ hence $y \in \Im(\psi)$. Thus the claim is true and $\psi$ is an isomorphism. We conclude that $M$ is projective as a direct sum of projectives, see Lemma \ref{lemma-direct-sum-projective}. \medskip\noindent If $n > 0$, then for $e \in E$ we denote $F_e$ the free $R$-module on the set of elements of $M_e$. Then we have a system of short exact sequences $$ 0 \to K_e \to F_e \to M_e \to 0 $$ over the well-ordered set $E$. Note that the transition maps $F_{e'} \to F_e$ and $K_{e'} \to K_e$ are injective too. Set $F = \bigcup F_e$ and $K = \bigcup K_e$. Then $$ 0 \to K_e/\bigcup\nolimits_{e' < e} K_{e'} \to F_e/\bigcup\nolimits_{e' < e} F_{e'} \to M_e/\bigcup\nolimits_{e' < e} M_{e'} \to 0 $$ is a short exact sequence of $R$-modules too and $F_e/\bigcup_{e' < e} F_{e'}$ is the free $R$-module on the set of elements in $M_e$ which are not contained in $\bigcup_{e' < e} M_{e'}$. Hence by Lemma \ref{lemma-exact-sequence-projective-dimension} we see that the projective dimension of $K_e/\bigcup_{e' < e} K_{e'}$ is at most $n - 1$. By induction we conclude that $K$ has projective dimension at most $n - 1$. Whence $M$ has projective dimension at most $n$ and we win. \end{proof} \begin{lemma} \label{lemma-finite-gl-dim} Let $R$ be a ring. The following are equivalent \begin{enumerate} \item $R$ has finite global dimension $\leq n$, \item every finite $R$-module has projective dimension $\leq n$, and \item every cyclic $R$-module $R/I$ has projective dimension $\leq n$. \end{enumerate} \end{lemma} \begin{proof} It is clear that (1) $\Rightarrow$ (2) and (2) $\Rightarrow$ (3). Assume (3). Choose a set $E \subset M$ of generators of $M$. Choose a well ordering on $E$. For $e \in E$ denote $M_e$ the submodule of $M$ generated by the elements $e' \in E$ with $e' \leq e$. Then $M = \bigcup_{e \in E} M_e$. Note that for each $e \in E$ the quotient $$ M_e/\bigcup\nolimits_{e' < e} M_{e'} $$ is either zero or generated by one element, hence has projective dimension $\leq n$ by (3). By Lemma \ref{lemma-colimit-projective-dimension} this means that $M$ has projective dimension $\leq n$. \end{proof} \begin{lemma} \label{lemma-localize-finite-gl-dim} Let $R$ be a ring. Let $M$ be an $R$-module. Let $S \subset R$ be a multiplicative subset. \begin{enumerate} \item If $M$ has projective dimension $\leq n$, then $S^{-1}M$ has projective dimension $\leq n$ over $S^{-1}R$. \item If $R$ has finite global dimension $\leq n$, then $S^{-1}R$ has finite global dimension $\leq n$. \end{enumerate} \end{lemma} \begin{proof} Let $0 \to P_n \to P_{n - 1} \to \ldots \to P_0 \to M \to 0$ be a projective resolution. As localization is exact, see Proposition \ref{proposition-localization-exact}, and as each $S^{-1}P_i$ is a projective $S^{-1}R$-module, see Lemma \ref{lemma-ascend-properties-modules}, we see that $0 \to S^{-1}P_n \to \ldots \to S^{-1}P_0 \to S^{-1}M \to 0$ is a projective resolution of $S^{-1}M$. This proves (1). Let $M'$ be an $S^{-1}R$-module. Note that $M' = S^{-1}M'$. Hence we see that (2) follows from (1). \end{proof} \section{Regular rings and global dimension} \label{section-regular-finite-gl-dim} % BEGIN ALGEBRA EDITORIAL ROUTE section-regular-finite-gl-dim \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-regular-finite-gl-dim}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-regular-finite-gl-dim \noindent We can use the material on rings of finite global dimension to give another characterization of regular local rings. \begin{proposition} \label{proposition-regular-finite-gl-dim} Let $R$ be a regular local ring of dimension $d$. Every nonzero finite $R$-module $M$ of depth $e$ has a finite free resolution $$ 0 \to F_{d-e} \to \ldots \to F_0 \to M \to 0. $$ In particular a regular local ring has global dimension $\leq d$. \end{proposition} \begin{proof} The first part holds in view of Lemma \ref{lemma-regular-mcm-free} and Lemma \ref{lemma-mcm-resolution}. The last part follows from this and Lemma \ref{lemma-finite-gl-dim}. \end{proof} \begin{lemma} \label{lemma-finite-gl-dim-primes} Let $R$ be a Noetherian ring. Let $n \geq 0$ be an integer. Then $R$ has finite global dimension $\leq n$ if and only if for all maximal ideals $\mathfrak m$ of $R$ the ring $R_{\mathfrak m}$ has global dimension $\leq n$. \end{lemma} \begin{proof} We saw in Lemma \ref{lemma-localize-finite-gl-dim} that if $R$ has finite global dimension $n$, then all the localizations $R_{\mathfrak m}$ have finite global dimension at most $n$. Conversely, suppose that all the $R_{\mathfrak m}$ have global dimension $\leq n$. Let $M$ be a finite $R$-module. Let $0 \to K_n \to F_{n-1} \to \ldots \to F_0 \to M \to 0$ be a resolution with $F_i$ finite free. Then $K_n$ is a finite $R$-module. According to Lemma \ref{lemma-independent-resolution} and the assumption all the modules $K_n \otimes_R R_{\mathfrak m}$ are projective. Hence by Lemma \ref{lemma-finite-projective} the module $K_n$ is finite projective. \end{proof} \begin{lemma} \label{lemma-length-resolution-residue-field} Suppose that $R$ is a Noetherian local ring with maximal ideal $\mathfrak m$ and residue field $\kappa$. In this case the projective dimension of $\kappa$ is $\geq \dim_\kappa \mathfrak m / \mathfrak m^2$. \end{lemma} \begin{proof} Let $x_1 , \ldots, x_n$ be elements of $\mathfrak m$ whose images in $\mathfrak m / \mathfrak m^2$ form a basis. Consider the {\it Koszul complex} on $x_1, \ldots, x_n$. This is the complex $$ 0 \to \wedge^n R^n \to \wedge^{n-1} R^n \to \wedge^{n-2} R^n \to \ldots \to \wedge^i R^n \to \ldots \to R^n \to R $$ with maps given by $$ e_{j_1} \wedge \ldots \wedge e_{j_i} \longmapsto \sum_{a = 1}^i (-1)^{a + 1} x_{j_a} e_{j_1} \wedge \ldots \wedge \hat e_{j_a} \wedge \ldots \wedge e_{j_i} $$ It is easy to see that this is a complex $K_{\bullet}(R, x_{\bullet})$. Note that the cokernel of the last map of $K_{\bullet}(R, x_{\bullet})$ is $\kappa$ by Lemma \ref{lemma-NAK} part (8). \medskip\noindent If $\kappa$ has finite projective dimension $d$, then we can find a resolution $F_{\bullet} \to \kappa$ by finite free $R$-modules of length $d$ (Lemma \ref{lemma-what-kind-of-resolutions-Noetherian-local}). By Lemma \ref{lemma-add-trivial-complex} we may assume all the maps in the complex $F_{\bullet}$ have the property that $\Im(F_i \to F_{i-1}) \subset \mathfrak m F_{i-1}$, because removing a trivial summand from the resolution can at worst shorten the resolution. By Lemma \ref{lemma-compare-resolutions} we can find a map of complexes $\alpha : K_{\bullet}(R, x_{\bullet}) \to F_{\bullet}$ inducing the identity on $\kappa$. We will prove by induction that the maps $\alpha_i : \wedge^i R^n = K_i(R, x_{\bullet}) \to F_i$ have the property that $\alpha_i \otimes \kappa : \wedge^i \kappa^n \to F_i \otimes \kappa$ are injective. This shows that $F_n \not = 0$ and hence $d \geq n$ as desired. \medskip\noindent The result is clear for $i = 0$ because the composition $R \xrightarrow{\alpha_0} F_0 \to \kappa$ is nonzero. Note that $F_0$ must have rank $1$ since otherwise the map $F_1 \to F_0$ whose cokernel is a single copy of $\kappa$ cannot have image contained in $\mathfrak m F_0$. \medskip\noindent Next we check the case $i = 1$ as we feel that it is instructive; the reader can skip this as the induction step will deduce the $i = 1$ case from the case $i = 0$. We saw above that $F_0 = R$ and $F_1 \to F_0 = R$ has image $\mathfrak m$. We have a commutative diagram $$ \begin{matrix} R^n & = & K_1(R, x_{\bullet}) & \to & K_0(R, x_{\bullet}) & = & R \\ & & \downarrow & & \downarrow & & \downarrow \\ & & F_1 & \to & F_0 & = & R \end{matrix} $$ where the rightmost vertical arrow is given by multiplication by a unit. Hence we see that the image of the composition $R^n \to F_1 \to F_0 = R$ is also equal to $\mathfrak m$. Thus the map $R^n \otimes \kappa \to F_1 \otimes \kappa$ has to be injective since $\dim_\kappa (\mathfrak m / \mathfrak m^2) = n$. \medskip\noindent Let $i \geq 1$ and assume injectivity of $\alpha_j \otimes \kappa$ has been proved for all $j \leq i - 1$. Consider the commutative diagram $$ \begin{matrix} \wedge^i R^n & = & K_i(R, x_{\bullet}) & \to & K_{i-1}(R, x_{\bullet}) & = & \wedge^{i-1} R^n \\ & & \downarrow & & \downarrow & & \\ & & F_i & \to & F_{i-1} & & \end{matrix} $$ We know that $\wedge^{i-1} \kappa^n \to F_{i-1} \otimes \kappa$ is injective. This proves that $\wedge^{i-1} \kappa^n \otimes_{\kappa} \mathfrak m/\mathfrak m^2 \to F_{i-1} \otimes \mathfrak m/\mathfrak m^2$ is injective. Also, by our choice of the complex, $F_i$ maps into $\mathfrak mF_{i-1}$, and similarly for the Koszul complex. Hence we get a commutative diagram $$ \begin{matrix} \wedge^i \kappa^n & \to & \wedge^{i-1} \kappa^n \otimes \mathfrak m/\mathfrak m^2 \\ \downarrow & & \downarrow \\ F_i \otimes \kappa & \to & F_{i-1} \otimes \mathfrak m/\mathfrak m^2 \end{matrix} $$ At this point it suffices to verify the map $\wedge^i \kappa^n \to \wedge^{i-1} \kappa^n \otimes \mathfrak m/\mathfrak m^2$ is injective, which can be done by hand. \end{proof} \begin{lemma} \label{lemma-dim-gl-dim} Let $R$ be a Noetherian local ring. Suppose that the residue field $\kappa$ has finite projective dimension $n$ over $R$. In this case $\dim(R) \geq n$. \end{lemma} \begin{proof} Let $F_{\bullet}$ be a finite resolution of $\kappa$ by finite free $R$-modules (Lemma \ref{lemma-what-kind-of-resolutions-Noetherian-local}). By Lemma \ref{lemma-add-trivial-complex} we may assume all the maps in the complex $F_{\bullet}$ have the property that $\Im(F_i \to F_{i-1}) \subset \mathfrak m F_{i-1}$, because removing a trivial summand from the resolution can at worst shorten the resolution. Say $F_n \not = 0$ and $F_i = 0$ for $i > n$, so that the projective dimension of $\kappa$ is $n$. By Proposition \ref{proposition-what-exact} we see that $\text{depth}_{I(\varphi_n)}(R) \geq n$ since $I(\varphi_n)$ cannot equal $R$ by our choice of the complex. Thus by Lemma \ref{lemma-bound-depth} also $\dim(R) \geq n$. \end{proof} \begin{proposition} \label{proposition-finite-gl-dim-regular} Let $(R, \mathfrak m, \kappa)$ be a Noetherian local ring. The following are equivalent \begin{enumerate} \item $\kappa$ has finite projective dimension as an $R$-module, \item $R$ has finite global dimension, \item $R$ is a regular local ring. \end{enumerate} Moreover, in this case the global dimension of $R$ equals $\dim(R) = \dim_\kappa(\mathfrak m/\mathfrak m^2)$. \end{proposition} \begin{proof} We have (3) $\Rightarrow$ (2) by Proposition \ref{proposition-regular-finite-gl-dim}. The implication (2) $\Rightarrow$ (1) is trivial. Assume (1). By Lemmas \ref{lemma-length-resolution-residue-field} and \ref{lemma-dim-gl-dim} we see that $\dim(R) \geq \dim_\kappa(\mathfrak m /\mathfrak m^2)$. Thus $R$ is regular, see Definition \ref{definition-regular-local} and the discussion preceding it. Assume the equivalent conditions (1) -- (3) hold. By Proposition \ref{proposition-regular-finite-gl-dim} the global dimension of $R$ is at most $\dim(R)$ and by Lemma \ref{lemma-length-resolution-residue-field} it is at least $\dim_\kappa(\mathfrak m/\mathfrak m^2)$. Thus the stated equality holds. \end{proof} \begin{lemma} \label{lemma-localization-of-regular-local-is-regular} A Noetherian local ring $R$ is a regular local ring if and only if it has finite global dimension. In this case $R_{\mathfrak p}$ is a regular local ring for all primes $\mathfrak p$. \end{lemma} \begin{proof} By Propositions \ref{proposition-finite-gl-dim-regular} and \ref{proposition-regular-finite-gl-dim} we see that a Noetherian local ring is a regular local ring if and only if it has finite global dimension. Furthermore, any localization $R_{\mathfrak p}$ has finite global dimension, see Lemma \ref{lemma-localize-finite-gl-dim}, and hence is a regular local ring. \end{proof} \noindent By Lemma \ref{lemma-localization-of-regular-local-is-regular} it makes sense to make the following definition, because it does not conflict with the earlier definition of a regular local ring. \begin{definition} \label{definition-regular} A Noetherian ring $R$ is said to be {\it regular} if all the localizations $R_{\mathfrak p}$ at primes are regular local rings. \end{definition} \noindent It is enough to require the local rings at maximal ideals to be regular. Note that this is not the same as asking $R$ to have finite global dimension, even assuming $R$ is Noetherian. This is because there is an example of a regular Noetherian ring which does not have finite global dimension, namely because it does not have finite dimension. \begin{lemma} \label{lemma-finite-gl-dim-finite-dim-regular} Let $R$ be a nonzero Noetherian ring. The following are equivalent: \begin{enumerate} \item $R$ has finite global dimension $n$, \item $R$ is a regular ring of dimension $n$, \item there exists an integer $n$ such that all the localizations $R_{\mathfrak m}$ at maximal ideals are regular of dimension $\leq n$ with equality for at least one $\mathfrak m$, and \item there exists an integer $n$ such that all the localizations $R_{\mathfrak p}$ at prime ideals are regular of dimension $\leq n$ with equality for at least one $\mathfrak p$. \end{enumerate} \end{lemma} \begin{proof} This follows from the discussion above. More precisely, it follows by combining Definition \ref{definition-regular} with Lemma \ref{lemma-finite-gl-dim-primes} and Proposition \ref{proposition-finite-gl-dim-regular}. \end{proof} \begin{lemma} \label{lemma-flat-under-regular} Let $R \to S$ be a local homomorphism of local Noetherian rings. Assume that $R \to S$ is flat and that $S$ is regular. Then $R$ is regular. \end{lemma} \begin{proof} Let $\mathfrak m \subset R$ be the maximal ideal and let $\kappa = R/\mathfrak m$ be the residue field. Let $d = \dim S$. Choose any resolution $F_\bullet \to \kappa$ with each $F_i$ a finite free $R$-module. Set $K_d = \Ker(F_{d - 1} \to F_{d - 2})$. By flatness of $R \to S$ the complex $0 \to K_d \otimes_R S \to F_{d - 1} \otimes_R S \to \ldots \to F_0 \otimes_R S \to \kappa \otimes_R S \to 0$ is still exact. Because the global dimension of $S$ is $d$, see Proposition \ref{proposition-finite-gl-dim-regular}, we see that $K_d \otimes_R S$ is a finite free $S$-module (see also Lemma \ref{lemma-independent-resolution}). By Lemma \ref{lemma-finite-projective-descends} we see that $K_d$ is a finite free $R$-module. Hence $\kappa$ has finite projective dimension and $R$ is regular by Proposition \ref{proposition-finite-gl-dim-regular}. \end{proof} \section{Auslander-Buchsbaum} \label{section-Auslander-Buchsbaum} % BEGIN ALGEBRA EDITORIAL ROUTE section-Auslander-Buchsbaum \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Auslander-Buchsbaum}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Auslander-Buchsbaum \noindent The following result can be found in \cite{Auslander-Buchsbaum}. \begin{proposition} \label{proposition-Auslander-Buchsbaum} Let $R$ be a Noetherian local ring. Let $M$ be a nonzero finite $R$-module which has finite projective dimension $\text{pd}_R(M)$. Then we have $$ \text{depth}(R) = \text{pd}_R(M) + \text{depth}(M) $$ \end{proposition} \begin{proof} We prove this by induction on $\text{depth}(M)$. The most interesting case is the case $\text{depth}(M) = 0$. In this case, let $$ 0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0} \to M \to 0 $$ be a minimal finite free resolution, so $e = \text{pd}_R(M)$. By Lemma \ref{lemma-add-trivial-complex} we may assume all matrix coefficients of the maps in the complex are contained in the maximal ideal of $R$. Then on the one hand, by Proposition \ref{proposition-what-exact} we see that $\text{depth}(R) \geq e$. On the other hand, breaking the long exact sequence into short exact sequences \begin{align*} 0 \to R^{n_e} \to R^{n_{e - 1}} \to K_{e - 2} \to 0,\\ 0 \to K_{e - 2} \to R^{n_{e - 2}} \to K_{e - 3} \to 0,\\ \ldots,\\ 0 \to K_0 \to R^{n_0} \to M \to 0 \end{align*} we see, using Lemma \ref{lemma-depth-in-ses}, that \begin{align*} \text{depth}(K_{e - 2}) \geq \text{depth}(R) - 1,\\ \text{depth}(K_{e - 3}) \geq \text{depth}(R) - 2,\\ \ldots,\\ \text{depth}(K_0) \geq \text{depth}(R) - (e - 1),\\ \text{depth}(M) \geq \text{depth}(R) - e \end{align*} and since $\text{depth}(M) = 0$ we conclude $\text{depth}(R) \leq e$. This finishes the proof of the case $\text{depth}(M) = 0$. \medskip\noindent Induction step. If $\text{depth}(M) > 0$, then we pick $x \in \mathfrak m$ which is a nonzerodivisor on both $M$ and $R$. This is possible, because either $\text{pd}_R(M) > 0$ and $\text{depth}(R) > 0$ by the aforementioned Proposition \ref{proposition-what-exact} or $\text{pd}_R(M) = 0$ in which case $M$ is finite free hence also $\text{depth}(R) = \text{depth}(M) > 0$. Thus $\text{depth}(R \oplus M) > 0$ by Lemma \ref{lemma-depth-in-ses} (for example) and we can find an $x \in \mathfrak m$ which is a nonzerodivisor on both $R$ and $M$. Let $$ 0 \to R^{n_e} \to R^{n_{e-1}} \to \ldots \to R^{n_0} \to M \to 0 $$ be a minimal resolution as above. An application of the snake lemma shows that $$ 0 \to (R/xR)^{n_e} \to (R/xR)^{n_{e-1}} \to \ldots \to (R/xR)^{n_0} \to M/xM \to 0 $$ is a minimal resolution too. Thus $\text{pd}_R(M) = \text{pd}_{R/xR}(M/xM)$. By Lemma \ref{lemma-depth-drops-by-one} we have $\text{depth}(R/xR) = \text{depth}(R) - 1$ and $\text{depth}(M/xM) = \text{depth}(M) - 1$. Till now depths have all been depths as $R$ modules, but we observe that $\text{depth}_R(M/xM) = \text{depth}_{R/xR}(M/xM)$ and similarly for $R/xR$. By induction hypothesis we see that the Auslander-Buchsbaum formula holds for $M/xM$ over $R/xR$. Since the depths of both $R/xR$ and $M/xM$ have decreased by one and the projective dimension has not changed we conclude. \end{proof} \begin{lemma} \label{lemma-projective-dimension-modulo-nonzerodivisor} \begin{reference} \cite[Chapter III, \S 5, no. 76, Lemma 2 and proof, pp. 270--271]{FAC} \end{reference} \begin{history} The cited source calls projective dimension the dimension of a module. For a finite module over the regular local ring of a point of projective space, it proves the formula below from the long exact Ext sequence: higher Ext gives the upper bound, while a nonzero top Ext module and Nakayama's lemma give the lower bound. The source does not explicitly exclude the zero module, but its proof sets $p = \text{pd}(M)$ and chooses a nonzero top Ext module. Thus nonzeroness is an implicit source hypothesis which is made explicit in the statement below. The statement below isolates the same change of projective dimension over an arbitrary Noetherian local ring, assuming only that the original module has finite projective dimension. The short exact sequence first gives finite projective dimension for the quotient, after which the depth drop and the Auslander--Buchsbaum formula give the equality directly. \end{history} Let $(R, \mathfrak m)$ be a Noetherian local ring. Let $M$ be a nonzero finite $R$-module of finite projective dimension. If $x\in\mathfrak m$ is a nonzerodivisor on $M$, then $$ \text{pd}_R(M/xM)=\text{pd}_R(M)+1. $$ \end{lemma} \begin{proof} Put $d=\text{pd}_R(M)$. The short exact sequence $$ 0\longrightarrow M\xrightarrow{x}M\longrightarrow M/xM\longrightarrow0 $$ and Lemma \ref{lemma-exact-sequence-projective-dimension} show that $M/xM$ has finite projective dimension at most $d+1$. It is nonzero by Nakayama's lemma (Lemma \ref{lemma-NAK}). Lemma \ref{lemma-depth-drops-by-one} and Proposition \ref{proposition-Auslander-Buchsbaum} now give $$ \begin{aligned} \text{pd}_R(M/xM) &=\text{depth}(R)-\text{depth}(M/xM)\\ &=\text{depth}(R)-\text{depth}(M)+1\\ &=\text{pd}_R(M)+1. \end{aligned} $$ \end{proof} \section{Homomorphisms and dimension} \label{section-homomorphism-dimension} % BEGIN ALGEBRA EDITORIAL ROUTE section-homomorphism-dimension \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-homomorphism-dimension}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-homomorphism-dimension \noindent This section contains a collection of easy results relating dimensions of rings when there are maps between them. \begin{lemma} \label{lemma-dimension-going-up} Suppose $R \to S$ is a ring map satisfying either going up, see Definition \ref{definition-going-up-down}, or going down see Definition \ref{definition-going-up-down}. Assume in addition that $\Spec(S) \to \Spec(R)$ is surjective. Then $\dim(R) \leq \dim(S)$. \end{lemma} \begin{proof} Assume going up. Take any chain $\mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_e$ of prime ideals in $R$. By surjectivity we may choose a prime $\mathfrak q_0$ mapping to $\mathfrak p_0$. By going up we may extend this to a chain of length $e$ of primes $\mathfrak q_i$ lying over $\mathfrak p_i$. Thus $\dim(S) \geq \dim(R)$. The case of going down is exactly the same. See also Topology, Lemma \ref{topology-lemma-dimension-specializations-lift} for a purely topological version. \end{proof} \begin{lemma} \label{lemma-going-up-maximal-on-top} Suppose that $R \to S$ is a ring map with the going up property, see Definition \ref{definition-going-up-down}. If $\mathfrak q \subset S$ is a maximal ideal, then the inverse image of $\mathfrak q$ in $R$ is a maximal ideal too. \end{lemma} \begin{proof} Trivial. \end{proof} \begin{lemma} \label{lemma-integral-dim-up} Suppose that $R \to S$ is a ring map such that $S$ is integral over $R$. Then $\dim (R) \geq \dim(S)$, and every closed point of $\Spec(S)$ maps to a closed point of $\Spec(R)$. \end{lemma} \begin{proof} Immediate from Lemmas \ref{lemma-integral-no-inclusion} and \ref{lemma-going-up-maximal-on-top} and the definitions. \end{proof} \begin{lemma} \label{lemma-integral-sub-dim-equal} Suppose $R \subset S$ and $S$ integral over $R$. Then $\dim(R) = \dim(S)$. \end{lemma} \begin{proof} This is a combination of Lemmas \ref{lemma-integral-going-up}, \ref{lemma-integral-overring-surjective}, \ref{lemma-dimension-going-up}, and \ref{lemma-integral-dim-up}. \end{proof} \begin{definition} \label{definition-fibre} Suppose that $R \to S$ is a ring map. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$ of $R$. The {\it local ring of the fibre at $\mathfrak q$} is the local ring $$ S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} = (S/\mathfrak pS)_{\mathfrak q} = (S \otimes_R \kappa(\mathfrak p))_{\mathfrak q} $$ \end{definition} \begin{lemma} \label{lemma-dimension-base-fibre-total} Let $R \to S$ be a homomorphism of Noetherian rings. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$. Then $$ \dim(S_{\mathfrak q}) \leq \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}). $$ \end{lemma} \begin{proof} We use the characterization of dimension of Proposition \ref{proposition-dimension}. Let $x_1, \ldots, x_d$ be elements of $\mathfrak p$ generating an ideal of definition of $R_{\mathfrak p}$ with $d = \dim(R_{\mathfrak p})$. Let $y_1, \ldots, y_e$ be elements of $\mathfrak q$ generating an ideal of definition of $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ with $e = \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q})$. It is clear that $S_{\mathfrak q}/(x_1, \ldots, x_d, y_1, \ldots, y_e)$ has a nilpotent maximal ideal. Hence $x_1, \ldots, x_d, y_1, \ldots, y_e$ generate an ideal of definition of $S_{\mathfrak q}$. \end{proof} \begin{lemma} \label{lemma-dimension-base-fibre-equals-total} Let $R \to S$ be a homomorphism of Noetherian rings. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$. Assume the going down property holds for $R \to S$ (for example if $R \to S$ is flat, see Lemma \ref{lemma-flat-going-down}). Then $$ \dim(S_{\mathfrak q}) = \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}). $$ \end{lemma} \begin{proof} By Lemma \ref{lemma-dimension-base-fibre-total} we have an inequality $\dim(S_{\mathfrak q}) \leq \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q})$. To get equality, choose a chain of primes $\mathfrak pS \subset \mathfrak q_0 \subset \mathfrak q_1 \subset \ldots \subset \mathfrak q_d = \mathfrak q$ with $d = \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q})$. On the other hand, choose a chain of primes $\mathfrak p_0 \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_e = \mathfrak p$ with $e = \dim(R_{\mathfrak p})$. By the going down theorem we may choose $\mathfrak q_{-1} \subset \mathfrak q_0$ lying over $\mathfrak p_{e-1}$. And then we may choose $\mathfrak q_{-2} \subset \mathfrak q_{-1}$ lying over $\mathfrak p_{e-2}$. Inductively we keep going until we get a chain $\mathfrak q_{-e} \subset \ldots \subset \mathfrak q_d$ of length $e + d$. \end{proof} \begin{lemma} \label{lemma-flat-over-regular-with-regular-fibre} Let $R \to S$ be a local homomorphism of local Noetherian rings. Assume \begin{enumerate} \item $R$ is regular, \item $S/\mathfrak m_RS$ is regular, and \item $R \to S$ is flat. \end{enumerate} Then $S$ is regular. \end{lemma} \begin{proof} By Lemma \ref{lemma-dimension-base-fibre-equals-total} we have $\dim(S) = \dim(R) + \dim(S/\mathfrak m_RS)$. Pick generators $x_1, \ldots, x_d \in \mathfrak m_R$ with $d = \dim(R)$, and pick $y_1, \ldots, y_e \in \mathfrak m_S$ which generate the maximal ideal of $S/\mathfrak m_RS$ with $e = \dim(S/\mathfrak m_RS)$. Then we see that $x_1, \ldots, x_d, y_1, \ldots, y_e$ are elements which generate the maximal ideal of $S$ and $e + d = \dim(S)$. \end{proof} \noindent The lemma below will later be used to show that rings of finite type over a field are Cohen-Macaulay if and only if they are quasi-finite flat over a polynomial ring. It is a partial converse to Lemma \ref{lemma-CM-over-regular-flat}. \begin{lemma} \label{lemma-finite-flat-over-regular-CM} Let $R \to S$ be a local homomorphism of Noetherian local rings. Assume $R$ is Cohen-Macaulay. If $S$ is finite flat over $R$, or if $S$ is flat over $R$ and $\dim(S) \leq \dim(R)$, then $S$ is Cohen-Macaulay and $\dim(R) = \dim(S)$. \end{lemma} \begin{proof} Let $x_1, \ldots, x_d \in \mathfrak m_R$ be a regular sequence of length $d = \dim(R)$. By Lemma \ref{lemma-flat-increases-depth} this maps to a regular sequence in $S$. Hence $S$ is Cohen-Macaulay if $\dim(S) \leq d$. This is true if $S$ is finite flat over $R$ by Lemma \ref{lemma-integral-sub-dim-equal}. And in the second case we assumed it. \end{proof} \section{The dimension formula} \label{section-dimension-formula} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension-formula \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension-formula}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension-formula \noindent Recall the definitions of catenary (Definition \ref{definition-catenary}) and universally catenary (Definition \ref{definition-universally-catenary}). \begin{lemma} \label{lemma-dimension-formula} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over the prime $\mathfrak p$ of $R$. Assume that \begin{enumerate} \item $R$ is Noetherian, \item $R \to S$ is of finite type, \item $R$, $S$ are domains, and \item $R \subset S$. \end{enumerate} Then we have $$ \text{height}(\mathfrak q) \leq \text{height}(\mathfrak p) + \text{trdeg}_R(S) - \text{trdeg}_{\kappa(\mathfrak p)} \kappa(\mathfrak q) $$ with equality if $R$ is universally catenary. \end{lemma} \begin{proof} Suppose that $R \subset S' \subset S$, where $S'$ is a finitely generated $R$-subalgebra of $S$. In this case set $\mathfrak q' = S' \cap \mathfrak q$. The lemma for the ring maps $R \to S'$ and $S' \to S$ implies the lemma for $R \to S$ by additivity of transcendence degree in towers of fields (Fields, Lemma \ref{fields-lemma-transcendence-degree-tower}). Hence we can use induction on the number of generators of $S$ over $R$ and reduce to the case where $S$ is generated by one element over $R$. \medskip\noindent Case I: $S = R[x]$ is a polynomial algebra over $R$. In this case we have $\text{trdeg}_R(S) = 1$. Also $R \to S$ is flat and hence $$ \dim(S_{\mathfrak q}) = \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) $$ see Lemma \ref{lemma-dimension-base-fibre-equals-total}. Let $\mathfrak r = \mathfrak pS$. Then $\text{trdeg}_{\kappa(\mathfrak p)} \kappa(\mathfrak q) = 1$ is equivalent to $\mathfrak q = \mathfrak r$, and implies that $\dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) = 0$. In the same vein $\text{trdeg}_{\kappa(\mathfrak p)} \kappa(\mathfrak q) = 0$ is equivalent to having a strict inclusion $\mathfrak r \subset \mathfrak q$, which implies that $\dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) = 1$. Thus we are done with case I with equality in every instance. \medskip\noindent Case II: $S = R[x]/\mathfrak n$ with $\mathfrak n \not = 0$. In this case we have $\text{trdeg}_R(S) = 0$. Denote by $\mathfrak q' \subset R[x]$ the prime corresponding to $\mathfrak q$. Thus we have $$ S_{\mathfrak q} = (R[x])_{\mathfrak q'}/\mathfrak n(R[x])_{\mathfrak q'} $$ By the previous case we have $\dim((R[x])_{\mathfrak q'}) = \dim(R_{\mathfrak p}) + 1 - \text{trdeg}_{\kappa(\mathfrak p)} \kappa(\mathfrak q)$. Since $\mathfrak n \not = 0$ we see that the dimension of $S_{\mathfrak q}$ decreases by at least one, see Lemma \ref{lemma-one-equation}, which proves the inequality of the lemma. To see the equality in case $R$ is universally catenary note that $\mathfrak n \subset R[x]$ is a height one prime as it corresponds to a nonzero prime in $F[x]$ where $F$ is the fraction field of $R$. Hence any maximal chain of primes in $S_\mathfrak q = R[x]_{\mathfrak q'}/\mathfrak nR[x]_{\mathfrak q'}$ corresponds to a maximal chain of primes with length 1 greater between $\mathfrak q'$ and $(0)$ in $R[x]$. If $R$ is universally catenary these all have the same length equal to the height of $\mathfrak q'$. This proves that $\dim(S_\mathfrak q) = \dim(R[x]_{\mathfrak q'}) - 1$ and this implies equality holds as desired. \end{proof} \noindent The following lemma says that generically finite maps tend to be quasi-finite in codimension $1$. \begin{lemma} \label{lemma-finite-in-codim-1} Let $A \to B$ be a ring map. Assume \begin{enumerate} \item $A \subset B$ is an extension of domains, \item the induced extension of fraction fields is finite, \item $A$ is Noetherian, and \item $A \to B$ is of finite type. \end{enumerate} Let $\mathfrak p \subset A$ be a prime of height $1$. Then there are at most finitely many primes of $B$ lying over $\mathfrak p$ and they all have height $1$. \end{lemma} \begin{proof} By the dimension formula (Lemma \ref{lemma-dimension-formula}) for any prime $\mathfrak q$ lying over $\mathfrak p$ we have $$ \dim(B_{\mathfrak q}) \leq \dim(A_{\mathfrak p}) - \text{trdeg}_{\kappa(\mathfrak p)} \kappa(\mathfrak q). $$ As the domain $B_\mathfrak q$ has at least $2$ prime ideals we see that $\dim(B_{\mathfrak q}) \geq 1$. We conclude that $\dim(B_{\mathfrak q}) = 1$ and that the extension $\kappa(\mathfrak p) \subset \kappa(\mathfrak q)$ is algebraic. Hence $\mathfrak q$ defines a closed point of its fibre $\Spec(B \otimes_A \kappa(\mathfrak p))$, see Lemma \ref{lemma-finite-residue-extension-closed}. Since $B \otimes_A \kappa(\mathfrak p)$ is a Noetherian ring the fibre $\Spec(B \otimes_A \kappa(\mathfrak p))$ is a Noetherian topological space, see Lemma \ref{lemma-Noetherian-topology}. A sober Noetherian topological space consisting of closed points is finite, see for example Topology, Lemma \ref{topology-lemma-Noetherian}. \end{proof} \section{Dimension of finite type algebras over fields} \label{section-dimension-finite-type-algebras} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension-finite-type-algebras \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension-finite-type-algebras}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension-finite-type-algebras \noindent In this section we compute the dimension of a polynomial ring over a field. We also prove that the dimension of a finite type domain over a field is the dimension of its local rings at maximal ideals. We will establish the connection with the transcendence degree over the ground field in Section \ref{section-dimension-finite-type-algebras-reprise}. \begin{lemma} \label{lemma-dim-affine-space} Let $\mathfrak m$ be a maximal ideal in $k[x_1, \ldots, x_n]$. The ideal $\mathfrak m$ is generated by $n$ elements. The dimension of $k[x_1, \ldots, x_n]_{\mathfrak m}$ is $n$. Hence $k[x_1, \ldots, x_n]_{\mathfrak m}$ is a regular local ring of dimension $n$. \end{lemma} \begin{proof} By the Hilbert Nullstellensatz (Theorem \ref{theorem-nullstellensatz}) we know the residue field $\kappa = \kappa(\mathfrak m)$ is a finite extension of $k$. Denote by $\alpha_i \in \kappa$ the image of $x_i$. Set $\kappa_i = k(\alpha_1, \ldots, \alpha_i) \subset \kappa$, $i = 1, \ldots, n$ and $\kappa_0 = k$. Note that $\kappa_i = k[\alpha_1, \ldots, \alpha_i]$ by field theory. Define inductively elements $f_i \in \mathfrak m \cap k[x_1, \ldots, x_i]$ as follows: Let $P_i(T) \in \kappa_{i-1}[T]$ be the monic minimal polynomial of $\alpha_i $ over $\kappa_{i-1}$. Let $Q_i(T) \in k[x_1, \ldots, x_{i-1}][T]$ be a monic lift of $P_i(T)$ (of the same degree). Set $f_i = Q_i(x_i)$. Note that if $d_i = \deg_T(P_i) = \deg_T(Q_i) = \deg_{x_i}(f_i)$ then $d_1d_2\ldots d_i = [\kappa_i : k]$ by Fields, Lemmas \ref{fields-lemma-multiplicativity-degrees} and \ref{fields-lemma-degree-minimal-polynomial}. \medskip\noindent We claim that for all $i = 0, 1, \ldots, n$ there is an isomorphism $$ \psi_i : k[x_1, \ldots, x_i] /(f_1, \ldots, f_i) \cong \kappa_i. $$ By construction the composition $k[x_1, \ldots, x_i] \to k[x_1, \ldots, x_n] \to \kappa$ is surjective onto $\kappa_i$ and $f_1, \ldots, f_i$ are in the kernel. This gives a surjective homomorphism. We prove $\psi_i$ is injective by induction. It is clear for $i = 0$. Given the statement for $i$ we prove it for $i + 1$. The ring extension $k[x_1, \ldots, x_i]/(f_1, \ldots, f_i) \to k[x_1, \ldots, x_{i + 1}]/(f_1, \ldots, f_{i + 1})$ is generated by $1$ element over a field and one irreducible equation. By elementary field theory $k[x_1, \ldots, x_{i + 1}]/(f_1, \ldots, f_{i + 1})$ is a field, and hence $\psi_{i + 1}$ is injective. \medskip\noindent This implies that $\mathfrak m = (f_1, \ldots, f_n)$. Moreover, we also conclude that $$ k[x_1, \ldots, x_n]/(f_1, \ldots, f_i) \cong \kappa_i[x_{i + 1}, \ldots, x_n]. $$ Hence $(f_1, \ldots, f_i)$ is a prime ideal. Thus $$ (0) \subset (f_1) \subset (f_1, f_2) \subset \ldots \subset (f_1, \ldots, f_n) = \mathfrak m $$ is a chain of primes of length $n$. The lemma follows. \end{proof} \begin{proposition} \label{proposition-finite-gl-dim-polynomial-ring} \begin{reference} \cite[Chapter III, \S 4, no. 68, Hilbert-syzygy vanishing of graded Ext, p. 261]{FAC} \cite[Chapter III, \S 5, no. 74, syzygy bound for the local rings of projective space, pp. 268--269]{FAC} \end{reference} \begin{history} The source uses Hilbert's syzygy theorem to conclude that for $S=K[t_0,\ldots,t_r]$ and finite $M$, its internal graded $\Ext^q_S(M,N)$ vanishes for $q>r+1$. The proposition below supplies the global-dimension statement; the internal-to-ordinary comparison is isolated in Lemma \ref{lemma-graded-ext-properties}. No. 74 applies the corresponding local bound on projective $r$-space: every finite module over a stalk has projective dimension at most $r$. Each standard chart is affine $r$-space, so this follows from the global dimension statement below and localization. \end{history} A polynomial algebra in $n$ variables over a field is a regular ring. It has global dimension $n$. All localizations at maximal ideals are regular local rings of dimension $n$. \end{proposition} \begin{proof} By Lemma \ref{lemma-dim-affine-space} all localizations $k[x_1, \ldots, x_n]_{\mathfrak m}$ at maximal ideals are regular local rings of dimension $n$. Hence we conclude by Lemma \ref{lemma-finite-gl-dim-finite-dim-regular}. \end{proof} \begin{lemma} \label{lemma-dimension-height-polynomial-ring} Let $k$ be a field. Let $\mathfrak p \subset \mathfrak q \subset k[x_1, \ldots, x_n]$ be a pair of primes. Any maximal chain of primes between $\mathfrak p$ and $\mathfrak q$ has length $\text{height}(\mathfrak q) - \text{height}(\mathfrak p)$. \end{lemma} \begin{proof} By Proposition \ref{proposition-finite-gl-dim-polynomial-ring} any local ring of $k[x_1, \ldots, x_n]$ is regular. Hence all local rings are Cohen-Macaulay, see Lemma \ref{lemma-regular-ring-CM}. The local rings at maximal ideals have dimension $n$ hence every maximal chain of primes in $k[x_1, \ldots, x_n]$ has length $n$, see Lemma \ref{lemma-maximal-chain-CM}. Hence every maximal chain of primes between $(0)$ and $\mathfrak p$ has length $\text{height}(\mathfrak p)$, see Lemma \ref{lemma-CM-dim-formula} for example. Putting these together leads to the assertion of the lemma. \end{proof} \begin{lemma} \label{lemma-dimension-spell-it-out} Let $k$ be a field. Let $S$ be a finite type $k$-algebra which is an integral domain. Then $\dim(S) = \dim(S_{\mathfrak m})$ for any maximal ideal $\mathfrak m$ of $S$. In words: every maximal chain of primes has length equal to the dimension of $S$. \end{lemma} \begin{proof} Write $S = k[x_1, \ldots, x_n]/\mathfrak p$. By Proposition \ref{proposition-finite-gl-dim-polynomial-ring} and Lemma \ref{lemma-dimension-height-polynomial-ring} all the maximal chains of primes in $S$ (which necessarily end with a maximal ideal) have length $n - \text{height}(\mathfrak p)$. Thus this number is the dimension of $S$ and of $S_{\mathfrak m}$ for any maximal ideal $\mathfrak m$ of $S$. \end{proof} \noindent Recall that we defined the dimension $\dim_x(X)$ of a topological space $X$ at a point $x$ in Topology, Definition \ref{topology-definition-Krull}. \begin{lemma} \label{lemma-dimension-at-a-point-finite-type-over-field} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $X = \Spec(S)$. Let $\mathfrak p \subset S$ be a prime ideal and let $x \in X$ be the corresponding point. The following numbers are equal \begin{enumerate} \item $\dim_x(X)$, \item $\max \dim(Z)$ where the maximum is over those irreducible components $Z$ of $X$ passing through $x$, and \item $\min \dim(S_{\mathfrak m})$ where the minimum is over maximal ideals $\mathfrak m$ with $\mathfrak p \subset \mathfrak m$. \end{enumerate} \end{lemma} \begin{proof} Let $X = \bigcup_{i \in I} Z_i$ be the decomposition of $X$ into its irreducible components. There are finitely many of them (see Lemmas \ref{lemma-obvious-Noetherian} and \ref{lemma-Noetherian-topology}). Let $I' = \{i \mid x \in Z_i\}$, and let $T = \bigcup_{i \not \in I'} Z_i$. Then $U = X \setminus T$ is an open subset of $X$ containing the point $x$. The number (2) is $\max_{i \in I'} \dim(Z_i)$. For any open $W \subset U$ with $x \in W$ the irreducible components of $W$ are the irreducible sets $W_i = Z_i \cap W$ for $i \in I'$ and $x$ is contained in each of these. Note that each $W_i$, $i \in I'$ contains a closed point because $X$ is Jacobson, see Section \ref{section-ring-jacobson}. Since $W_i \subset Z_i$ we have $\dim(W_i) \leq \dim(Z_i)$. The existence of a closed point implies, via Lemma \ref{lemma-dimension-spell-it-out}, that there is a chain of irreducible closed subsets of length equal to $\dim(Z_i)$ in the open $W_i$. Thus $\dim(W_i) = \dim(Z_i)$ for any $i \in I'$. Hence $\dim(W)$ is equal to the number (2). This proves that (1) $ = $ (2). \medskip\noindent Let $\mathfrak m \supset \mathfrak p$ be any maximal ideal containing $\mathfrak p$. Let $x_0 \in X$ be the corresponding point. First of all, $x_0$ is contained in all the irreducible components $Z_i$, $i \in I'$. Let $\mathfrak q_i$ denote the minimal primes of $S$ corresponding to the irreducible components $Z_i$. For each $i$ such that $x_0 \in Z_i$ (which is equivalent to $\mathfrak m \supset \mathfrak q_i$) we have a surjection $$ S_{\mathfrak m} \longrightarrow S_\mathfrak m/\mathfrak q_i S_\mathfrak m =(S/\mathfrak q_i)_{\mathfrak m} $$ Moreover, the primes $\mathfrak q_i S_\mathfrak m$ so obtained exhaust the minimal primes of the Noetherian local ring $S_{\mathfrak m}$, see Lemma \ref{lemma-irreducible-components-containing-x}. We conclude, using Lemma \ref{lemma-dimension-spell-it-out}, that the dimension of $S_{\mathfrak m}$ is the maximum of the dimensions of the $Z_i$ passing through $x_0$. To finish the proof of the lemma it suffices to show that we can choose $x_0$ such that $x_0 \in Z_i \Rightarrow i \in I'$. Because $S$ is Jacobson (as we saw above) it is enough to show that $V(\mathfrak p) \setminus T$ (with $T$ as above) is nonempty. And this is clear since it contains the point $x$ (i.e. $\mathfrak p$). \end{proof} \begin{lemma} \label{lemma-dimension-closed-point-finite-type-field} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $X = \Spec(S)$. Let $\mathfrak m \subset S$ be a maximal ideal and let $x \in X$ be the associated closed point. Then $\dim_x(X) = \dim(S_{\mathfrak m})$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-dimension-at-a-point-finite-type-over-field}. \end{proof} \begin{lemma} \label{lemma-disjoint-decomposition-CM-algebra} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Assume that $S$ is Cohen-Macaulay. Then $\Spec(S) = \coprod T_d$ is a finite disjoint union of open and closed subsets $T_d$ with $T_d$ equidimensional (see Topology, Definition \ref{topology-definition-equidimensional}) of dimension $d$. Equivalently, $S$ is a product of rings $S_d$, $d = 0, \ldots, \dim(S)$ such that every maximal ideal $\mathfrak m$ of $S_d$ has height $d$. \end{lemma} \begin{proof} The equivalence of the two statements follows from Lemma \ref{lemma-disjoint-implies-product}. Let $\mathfrak m \subset S$ be a maximal ideal. Every maximal chain of primes in $S_{\mathfrak m}$ has the same length equal to $\dim(S_{\mathfrak m})$, see Lemma \ref{lemma-maximal-chain-CM}. Hence, the irreducible components passing through the point corresponding to $\mathfrak m$ all have dimension equal to $\dim(S_{\mathfrak m})$, see Lemma \ref{lemma-dimension-spell-it-out}. Since $\Spec(S)$ is a Jacobson topological space the intersection of any two irreducible components of it contains a closed point if nonempty, see Lemmas \ref{lemma-finite-type-field-Jacobson} and \ref{lemma-jacobson}. Thus we have shown that any two irreducible components that meet have the same dimension. The lemma follows easily from this, and the fact that $\Spec(S)$ has a finite number of irreducible components (see Lemmas \ref{lemma-obvious-Noetherian} and \ref{lemma-Noetherian-topology}). \end{proof} \section{Noether normalization} \label{section-Noether-normalization} % BEGIN ALGEBRA EDITORIAL ROUTE section-Noether-normalization \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Noether-normalization}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Noether-normalization \noindent In this section we prove variants of the Noether normalization lemma. The key ingredient we will use is contained in the following two lemmas. \begin{lemma} \label{lemma-helper} Let $n \in \mathbf{N}$. Let $N$ be a finite nonempty set of multi-indices $\nu = (\nu_1, \ldots, \nu_n)$. Given $e = (e_1, \ldots, e_n)$ we set $e \cdot \nu = \sum e_i\nu_i$. Then for $e_1 \gg e_2 \gg \ldots \gg e_{n-1} \gg e_n$ we have: If $\nu, \nu' \in N$ then $$ (e \cdot \nu = e \cdot \nu') \Leftrightarrow (\nu = \nu') $$ \end{lemma} \begin{proof} Say $N = \{\nu_j\}$ with $\nu_j = (\nu_{j1}, \ldots, \nu_{jn})$. Let $A_i = \max_j \nu_{ji} - \min_j \nu_{ji}$. If for $i = 2, \ldots, n$ we have $e_{i - 1} > A_ie_i + A_{i + 1}e_{i + 1} + \ldots + A_ne_n$ then the lemma holds. For suppose that $e \cdot (\nu - \nu') = 0$. Then for $n \ge 2$, $$ e_1(\nu_1 - \nu'_1) = \sum\nolimits_{i = 2}^n e_i(\nu'_i - \nu_i). $$ We may assume that $(\nu_1 - \nu'_1) \ge 0$. If $(\nu_1 - \nu'_1) > 0$, then $$ e_1(\nu_1 - \nu'_1) \ge e_1 > A_2e_2 + \ldots + A_ne_n \ge \sum\nolimits_{i = 2}^n e_i|\nu'_i - \nu_i| \ge \sum\nolimits_{i = 2}^n e_i(\nu'_i - \nu_i). $$ This contradiction implies that $\nu'_1 = \nu_1$. By induction, $\nu'_i = \nu_i$ for $2 \le i \le n$. \end{proof} \begin{lemma} \label{lemma-helper-polynomial} Let $R$ be a ring. Let $g \in R[x_1, \ldots, x_n]$ be an element which is nonconstant, i.e., $g \not \in R$. For $e_1 \gg e_2 \gg \ldots \gg e_{n-1} \gg e_n = 1$ the polynomial $$ g(x_1 + x_n^{e_1}, x_2 + x_n^{e_2}, \ldots, x_{n - 1} + x_n^{e_{n - 1}}, x_n) = ax_n^d + \text{lower order terms in }x_n $$ where $d > 0$ and $a \in R$ is one of the nonzero coefficients of $g$. \end{lemma} \begin{proof} Write $g = \sum_{\nu \in N} a_\nu x^\nu$ with $a_\nu \in R$ not zero. Here $N$ is a finite set of multi-indices as in Lemma \ref{lemma-helper} and $x^\nu = x_1^{\nu_1} \ldots x_n^{\nu_n}$. Note that the leading term in $$ (x_1 + x_n^{e_1})^{\nu_1} \ldots (x_{n-1} + x_n^{e_{n-1}})^{\nu_{n-1}} x_n^{\nu_n} \quad\text{is}\quad x_n^{e_1\nu_1 + \ldots + e_{n-1}\nu_{n-1} + \nu_n}. $$ Hence the lemma follows from Lemma \ref{lemma-helper} which guarantees that there is exactly one nonzero term $a_\nu x^\nu$ of $g$ which gives rise to the leading term of $g(x_1 + x_n^{e_1}, x_2 + x_n^{e_2}, \ldots, x_{n - 1} + x_n^{e_{n - 1}}, x_n)$, i.e., $a = a_\nu$ for the unique $\nu \in N$ such that $e \cdot \nu$ is maximal. \end{proof} \begin{lemma} \label{lemma-one-relation} Let $k$ be a field. Let $S = k[x_1, \ldots, x_n]/I$ for some proper ideal $I$. If $I \not = 0$, then there exist $y_1, \ldots, y_{n-1} \in k[x_1, \ldots, x_n]$ such that $S$ is finite over $k[y_1, \ldots, y_{n-1}]$. Moreover we may choose $y_i$ to be in the $\mathbf{Z}$-subalgebra of $k[x_1, \ldots, x_n]$ generated by $x_1, \ldots, x_n$. \end{lemma} \begin{proof} Pick $f \in I$, $f\not = 0$. It suffices to show the lemma for $k[x_1, \ldots, x_n]/(f)$ since $S$ is a quotient of that ring. We will take $y_i = x_i - x_n^{e_i}$, $i = 1, \ldots, n-1$ for suitable integers $e_i$. When does this work? It suffices to show that $\overline{x_n} \in k[x_1, \ldots, x_n]/(f)$ is integral over the ring $k[y_1, \ldots, y_{n-1}]$. The equation for $\overline{x_n}$ over this ring is $$ f(y_1 + x_n^{e_1}, \ldots, y_{n-1} + x_n^{e_{n-1}}, x_n) = 0. $$ Hence we are done if we can show there exist integers $e_i$ such that the leading coefficient with respect to $x_n$ of the equation above is a nonzero element of $k$. This can be achieved for example by choosing $e_1 \gg e_2 \gg \ldots \gg e_{n-1}$, see Lemma \ref{lemma-helper-polynomial}. \end{proof} \begin{lemma} \label{lemma-Noether-normalization} \begin{slogan} Noether normalization \end{slogan} Let $k$ be a field. Let $S = k[x_1, \ldots, x_n]/I$ for some ideal $I$. If $I \neq (1)$, there exist $r\geq 0$, and $y_1, \ldots, y_r \in k[x_1, \ldots, x_n]$ such that (a) the map $k[y_1, \ldots, y_r] \to S$ is injective where the source is the polynomial ring on $y_1, \ldots, y_r$, and (b) the map $k[y_1, \ldots, y_r] \to S$ is finite. In this case the integer $r$ is the dimension of $S$. Moreover we may choose $y_i$ to be in the $\mathbf{Z}$-subalgebra of $k[x_1, \ldots, x_n]$ generated by $x_1, \ldots, x_n$. \end{lemma} \begin{proof} By induction on $n$, with $n = 0$ being trivial. If $I = 0$, then take $r = n$ and $y_i = x_i$. If $I \not = 0$, then choose $y_1, \ldots, y_{n-1}$ as in Lemma \ref{lemma-one-relation}. Let $S' \subset S$ be the subring generated by the images of the $y_i$. By induction we can choose $r$ and $z_1, \ldots, z_r \in k[y_1, \ldots, y_{n-1}]$ such that (a), (b) hold for $k[z_1, \ldots, z_r] \to S'$. Since $S' \to S$ is injective and finite we see (a), (b) hold for $k[z_1, \ldots, z_r] \to S$. The assertion that $r = \dim(S)$ follows from Lemma \ref{lemma-integral-sub-dim-equal}. \end{proof} \begin{lemma} \label{lemma-Noether-normalization-at-point} Let $k$ be a field. Let $S$ be a finite type $k$-algebra and denote $X = \Spec(S)$. Let $\mathfrak q$ be a prime of $S$, and let $x \in X$ be the corresponding point. There exists a $g \in S$, $g \not \in \mathfrak q$ such that $\dim(S_g) = \dim_x(X) =: d$ and such that there exists a finite injective map $k[y_1, \ldots, y_d] \to S_g$. \end{lemma} \begin{proof} Note that by definition $\dim_x(X)$ is the minimum of the dimensions of $S_g$ for $g \in S$, $g \not \in \mathfrak q$, i.e., the minimum is attained. Thus the lemma follows from Lemma \ref{lemma-Noether-normalization}. \end{proof} \begin{lemma} \label{lemma-refined-Noether-normalization} Let $k$ be a field. Let $\mathfrak q \subset k[x_1, \ldots, x_n]$ be a prime ideal. Set $r = \text{trdeg}_k\ \kappa(\mathfrak q)$. Then there exists a finite ring map $\varphi : k[y_1, \ldots, y_n] \to k[x_1, \ldots, x_n]$ such that $\varphi^{-1}(\mathfrak q) = (y_{r + 1}, \ldots, y_n)$. \end{lemma} \begin{proof} By induction on $n$. The case $n = 0$ is clear. Assume $n > 0$. If $r = n$, then $\mathfrak q = (0)$ and the result is clear. Choose a nonzero $f \in \mathfrak q$. Of course $f$ is nonconstant. After applying an automorphism of the form $$ k[x_1, \ldots, x_n] \longrightarrow k[x_1, \ldots, x_n], \quad x_n \mapsto x_n, \quad x_i \mapsto x_i + x_n^{e_i}\ (i < n) $$ we may assume that $f$ is monic in $x_n$ over $k[x_1, \ldots, x_{n-1}]$, see Lemma \ref{lemma-helper-polynomial}. Hence the ring map $$ k[y_1, \ldots, y_n] \longrightarrow k[x_1, \ldots, x_n], \quad y_n \mapsto f, \quad y_i \mapsto x_i\ (i < n) $$ is finite. Moreover $y_n \in \mathfrak q \cap k[y_1, \ldots, y_n]$ by construction. Thus $\mathfrak q \cap k[y_1, \ldots, y_n] = \mathfrak pk[y_1, \ldots, y_n] + (y_n)$ where $\mathfrak p \subset k[y_1, \ldots, y_{n - 1}]$ is a prime ideal. Note that $\kappa(\mathfrak p) \subset \kappa(\mathfrak q)$ is finite, and hence $r = \text{trdeg}_k\ \kappa(\mathfrak p)$. Apply the induction hypothesis to the pair $(k[y_1, \ldots, y_{n - 1}], \mathfrak p)$ and we obtain a finite ring map $k[z_1, \ldots, z_{n - 1}] \to k[y_1, \ldots, y_{n - 1}]$ such that $\mathfrak p \cap k[z_1, \ldots, z_{n - 1}] = (z_{r + 1}, \ldots, z_{n - 1})$. We extend the ring map $k[z_1, \ldots, z_{n - 1}] \to k[y_1, \ldots, y_{n - 1}]$ to a ring map $k[z_1, \ldots, z_n] \to k[y_1, \ldots, y_n]$ by mapping $z_n$ to $y_n$. The composition of the ring maps $$ k[z_1, \ldots, z_n] \to k[y_1, \ldots, y_n] \to k[x_1, \ldots, x_n] $$ solves the problem. \end{proof} \begin{lemma} \label{lemma-Noether-normalization-over-a-domain} Let $R \to S$ be an injective finite type ring map. Assume $R$ is a domain. Then there exists an integer $d$ and a factorization $$ R \to R[y_1, \ldots, y_d] \to S' \to S $$ by injective maps such that $S'$ is finite over $R[y_1, \ldots, y_d]$ and such that $S'_f \cong S_f$ for some nonzero $f \in R$. \end{lemma} \begin{proof} Pick $x_1, \ldots, x_n \in S$ which generate $S$ over $R$. Let $K$ be the fraction field of $R$ and $S_K = S \otimes_R K$. By Lemma \ref{lemma-Noether-normalization} we can find $y_1, \ldots, y_d \in S$ such that $K[y_1, \ldots, y_d] \to S_K$ is a finite injective map. Note that $y_i \in S$ because we may pick the $y_j$ in the $\mathbf{Z}$-algebra generated by $x_1, \ldots, x_n$. As a finite ring map is integral (see Lemma \ref{lemma-finite-is-integral}) we can find monic $P_i \in K[y_1, \ldots, y_d][T]$ such that $P_i(x_i) = 0$ in $S_K$. Let $f \in R$ be a nonzero element such that $fP_i \in R[y_1, \ldots, y_d][T]$ for all $i$. Then $fP_i(x_i)$ maps to zero in $S_K$. Hence after replacing $f$ by another nonzero element of $R$ we may also assume $fP_i(x_i)$ is zero in $S$. Set $x_i' = fx_i$ and let $S' \subset S$ be the $R$-subalgebra generated by $y_1, \ldots, y_d$ and $x'_1, \ldots, x'_n$. Note that $x'_i$ is integral over $R[y_1, \ldots, y_d]$ as we have $Q_i(x_i') = 0$ where $Q_i = f^{\deg_T(P_i)}P_i(T/f)$ which is a monic polynomial in $T$ with coefficients in $R[y_1, \ldots, y_d]$ by our choice of $f$. Hence $R[y_1, \ldots, y_d] \subset S'$ is finite by Lemma \ref{lemma-characterize-finite-in-terms-of-integral}. Since $S' \subset S$ we have $S'_f \subset S_f$ (localization is exact). On the other hand, the elements $x_i = x'_i/f$ in $S'_f$ generate $S_f$ over $R_f$ and hence $S'_f \to S_f$ is surjective. Whence $S'_f \cong S_f$ and we win. \end{proof} \section{Dimension of finite type algebras over fields, reprise} \label{section-dimension-finite-type-algebras-reprise} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension-finite-type-algebras-reprise \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension-finite-type-algebras-reprise}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension-finite-type-algebras-reprise \noindent This section is a continuation of Section \ref{section-dimension-finite-type-algebras}. In this section we establish the connection between dimension and transcendence degree over the ground field for finite type domains over a field. \begin{lemma} \label{lemma-dimension-prime-polynomial-ring} Let $k$ be a field. Let $S$ be a finite type $k$-algebra which is an integral domain. Let $K$ be the field of fractions of $S$. Let $r = \text{trdeg}(K/k)$ be the transcendence degree of $K$ over $k$. Then $\dim(S) = r$. Moreover, the local ring of $S$ at every maximal ideal has dimension $r$. \end{lemma} \begin{proof} We may write $S = k[x_1, \ldots, x_n]/\mathfrak p$. By Lemma \ref{lemma-dimension-height-polynomial-ring} all local rings of $S$ at maximal ideals have the same dimension. Apply Lemma \ref{lemma-Noether-normalization}. We get a finite injective ring map $$ k[y_1, \ldots, y_d] \to S $$ with $d = \dim(S)$. Clearly, $k(y_1, \ldots, y_d) \subset K$ is a finite extension and we win. \end{proof} \begin{lemma} \label{lemma-tr-deg-specialization} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q \subset \mathfrak q' \subset S$ be distinct prime ideals. Then $\text{trdeg}_k\ \kappa(\mathfrak q') < \text{trdeg}_k\ \kappa(\mathfrak q)$. \end{lemma} \begin{proof} By Lemma \ref{lemma-dimension-prime-polynomial-ring} we have $\dim V(\mathfrak q) = \text{trdeg}_k\ \kappa(\mathfrak q)$ and similarly for $\mathfrak q'$. Hence the result follows as the strict inclusion $V(\mathfrak q') \subset V(\mathfrak q)$ implies a strict inequality of dimensions. \end{proof} \noindent The following lemma generalizes Lemma \ref{lemma-dimension-closed-point-finite-type-field}. \begin{lemma} \label{lemma-dimension-at-a-point-finite-type-field} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $X = \Spec(S)$. Let $\mathfrak p \subset S$ be a prime ideal, and let $x \in X$ be the corresponding point. Then we have $$ \dim_x(X) = \dim(S_{\mathfrak p}) + \text{trdeg}_k\ \kappa(\mathfrak p). $$ \end{lemma} \begin{proof} By Lemma \ref{lemma-dimension-prime-polynomial-ring} we know that $r = \text{trdeg}_k\ \kappa(\mathfrak p)$ is equal to the dimension of $V(\mathfrak p)$. Pick any maximal chain of primes $\mathfrak p \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_r$ starting with $\mathfrak p$ in $S$. This has length $r$ by Lemma \ref{lemma-dimension-spell-it-out}. Let $\mathfrak q_j$, $j \in J$ be the minimal primes of $S$ which are contained in $\mathfrak p$. These correspond $1-1$ to minimal primes in $S_{\mathfrak p}$ via the rule $\mathfrak q_j \mapsto \mathfrak q_jS_{\mathfrak p}$. By Lemma \ref{lemma-dimension-at-a-point-finite-type-over-field} we know that $\dim_x(X)$ is equal to the maximum of the dimensions of the rings $S/\mathfrak q_j$. For each $j$ pick a maximal chain of primes $\mathfrak q_j \subset \mathfrak p'_1 \subset \ldots \subset \mathfrak p'_{s(j)} = \mathfrak p$. Then $\dim(S_{\mathfrak p}) = \max_{j \in J} s(j)$. Now, each chain $$ \mathfrak q_j \subset \mathfrak p'_1 \subset \ldots \subset \mathfrak p'_{s(j)} = \mathfrak p \subset \mathfrak p_1 \subset \ldots \subset \mathfrak p_r $$ is a maximal chain in $S/\mathfrak q_j$, and by what was said before we have $\dim_x(X) = \max_{j \in J} r + s(j)$. The lemma follows. \end{proof} \noindent The following lemma says that the codimension of one finite type Spec in another is the difference of heights. \begin{lemma} \label{lemma-codimension} Let $k$ be a field. Let $S' \to S$ be a surjection of finite type $k$-algebras. Let $\mathfrak p \subset S$ be a prime ideal, and let $\mathfrak p'$ be the corresponding prime ideal of $S'$. Let $X = \Spec(S)$, resp.\ $X' = \Spec(S')$, and let $x \in X$, resp. $x'\in X'$ be the point corresponding to $\mathfrak p$, resp.\ $\mathfrak p'$. Then $$ \dim_{x'} X' - \dim_x X = \text{height}(\mathfrak p') - \text{height}(\mathfrak p). $$ \end{lemma} \begin{proof} Immediate from Lemma \ref{lemma-dimension-at-a-point-finite-type-field}. \end{proof} \begin{lemma} \label{lemma-dimension-preserved-field-extension} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $K/k$ be a field extension. Then $\dim(S) = \dim(K \otimes_k S)$. \end{lemma} \begin{proof} By Lemma \ref{lemma-Noether-normalization} there exists a finite injective map $k[y_1, \ldots, y_d] \to S$ with $d = \dim(S)$. Since $K$ is flat over $k$ we also get a finite injective map $K[y_1, \ldots, y_d] \to K \otimes_k S$. The result follows from Lemma \ref{lemma-integral-sub-dim-equal}. \end{proof} \begin{lemma} \label{lemma-dimension-at-a-point-preserved-field-extension} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Set $X = \Spec(S)$. Let $K/k$ be a field extension. Set $S_K = K \otimes_k S$, and $X_K = \Spec(S_K)$. Let $\mathfrak q \subset S$ be a prime corresponding to $x \in X$ and let $\mathfrak q_K \subset S_K$ be a prime corresponding to $x_K \in X_K$ lying over $\mathfrak q$. Then $\dim_x X = \dim_{x_K} X_K$. \end{lemma} \begin{proof} Choose a presentation $S = k[x_1, \ldots, x_n]/I$. This gives a presentation $K \otimes_k S = K[x_1, \ldots, x_n]/(K \otimes_k I)$. Let $\mathfrak q_K' \subset K[x_1, \ldots, x_n]$, resp.\ $\mathfrak q' \subset k[x_1, \ldots, x_n]$ be the corresponding primes. Consider the following commutative diagram of Noetherian local rings $$ \xymatrix{ K[x_1, \ldots, x_n]_{\mathfrak q_K'} \ar[r] & (K \otimes_k S)_{\mathfrak q_K} \\ k[x_1, \ldots, x_n]_{\mathfrak q'} \ar[r] \ar[u] & S_{\mathfrak q} \ar[u] } $$ Both vertical arrows are flat because they are localizations of the flat ring maps $S \to S_K$ and $k[x_1, \ldots, x_n] \to K[x_1, \ldots, x_n]$. Moreover, the vertical arrows have the same fibre rings. Hence, we see from Lemma \ref{lemma-dimension-base-fibre-equals-total} that $\text{height}(\mathfrak q') - \text{height}(\mathfrak q) = \text{height}(\mathfrak q_K') - \text{height}(\mathfrak q_K)$. Denote by $x' \in X' = \Spec(k[x_1, \ldots, x_n])$ and $x'_K \in X'_K = \Spec(K[x_1, \ldots, x_n])$ the points corresponding to $\mathfrak q'$ and $\mathfrak q_K'$. By Lemma \ref{lemma-codimension} and what we showed above we have \begin{eqnarray*} n - \dim_x X & = & \dim_{x'} X' - \dim_x X \\ & = & \text{height}(\mathfrak q') - \text{height}(\mathfrak q) \\ & = & \text{height}(\mathfrak q_K') - \text{height}(\mathfrak q_K) \\ & = & \dim_{x'_K} X'_K - \dim_{x_K} X_K \\ & = & n - \dim_{x_K} X_K \end{eqnarray*} and the lemma follows. \end{proof} \begin{lemma} \label{lemma-inequalities-under-field-extension} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $K/k$ be a field extension. Set $S_K = K \otimes_k S$. Let $\mathfrak q \subset S$ be a prime and let $\mathfrak q_K \subset S_K$ be a prime lying over $\mathfrak q$. Then $$ \dim (S_K \otimes_S \kappa(\mathfrak q))_{\mathfrak q_K} = \dim (S_K)_{\mathfrak q_K} - \dim S_\mathfrak q = \text{trdeg}_k \kappa(\mathfrak q) - \text{trdeg}_K \kappa(\mathfrak q_K) $$ Moreover, given $\mathfrak q$ we can always choose $\mathfrak q_K$ such that the number above is zero. \end{lemma} \begin{proof} Observe that $S_\mathfrak q \to (S_K)_{\mathfrak q_K}$ is a flat local homomorphism of local Noetherian rings with special fibre $(S_K \otimes_S \kappa(\mathfrak q))_{\mathfrak q_K}$. Hence the first equality follows from Lemma \ref{lemma-dimension-base-fibre-equals-total}. The second equality follows from the fact that we have $\dim_x X = \dim_{x_K} X_K$ with notation as in Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension} and we have $\dim_x X = \dim S_\mathfrak q + \text{trdeg}_k \kappa(\mathfrak q)$ by Lemma \ref{lemma-dimension-at-a-point-finite-type-field} and similarly for $\dim_{x_K} X_K$. If we choose $\mathfrak q_K$ minimal over $\mathfrak q S_K$, then the dimension of the fibre ring will be zero. \end{proof} \section{Dimension of graded algebras over a field} \label{section-dimension-graded} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension-graded \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension-graded}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension-graded \noindent Here is a basic result. \begin{lemma} \label{lemma-dimension-graded} Let $k$ be a field. Let $S$ be a graded $k$-algebra generated over $k$ by finitely many elements of degree $1$. Assume $S_0 = k$. Let $P(T) \in \mathbf{Q}[T]$ be the polynomial such that $\dim(S_d) = P(d)$ for all $d \gg 0$. See Proposition \ref{proposition-graded-hilbert-polynomial}. Then \begin{enumerate} \item The irrelevant ideal $S_{+}$ is a maximal ideal $\mathfrak m$. \item Any minimal prime of $S$ is a homogeneous ideal and is contained in $S_{+} = \mathfrak m$. \item We have $\dim(S) = \deg(P) + 1 = \dim_x\Spec(S)$ (with the convention that $\deg(0) = -1$) where $x$ is the point corresponding to the maximal ideal $S_{+} = \mathfrak m$. \item The Hilbert function of the local ring $R = S_{\mathfrak m}$ is equal to the Hilbert function of $S$. \end{enumerate} \end{lemma} \begin{proof} The first statement is obvious. The second follows from Lemma \ref{lemma-graded-ring-minimal-prime}. By (2) every irreducible component passes through $x$. Thus we have $\dim(S) = \dim_x\Spec(S) = \dim(S_\mathfrak m)$ by Lemma \ref{lemma-dimension-at-a-point-finite-type-over-field}. Since $\mathfrak m^d/\mathfrak m^{d + 1} \cong \mathfrak m^dS_\mathfrak m/\mathfrak m^{d + 1}S_\mathfrak m$ we see that the Hilbert function of the local ring $S_\mathfrak m$ is equal to the Hilbert function of $S$, which is (4). We conclude the last equality of (3) by Proposition \ref{proposition-dimension}. \end{proof} \section{Generic flatness} \label{section-generic-flatness} % BEGIN ALGEBRA EDITORIAL ROUTE section-generic-flatness \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-generic-flatness}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-generic-flatness \noindent Basically this says that a finite type algebra over a domain becomes flat after inverting a single element of the domain. There are several versions of this result (in increasing order of strength). \begin{lemma} \label{lemma-generic-flatness-Noetherian} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $R$ is Noetherian, \item $R$ is a domain, \item $R \to S$ is of finite type, and \item $M$ is a finite type $S$-module. \end{enumerate} Then there exists a nonzero $f \in R$ such that $M_f$ is a free $R_f$-module. \end{lemma} \begin{proof} Let $K$ be the fraction field of $R$. Set $S_K = K \otimes_R S$. This is an algebra of finite type over $K$. We will argue by induction on $d = \dim(S_K)$ (which is finite for example by Noether normalization, see Section \ref{section-Noether-normalization}). Fix $d \geq 0$. Assume we know that the lemma holds in all cases where $\dim(S_K) < d$. \medskip\noindent Suppose given $R \to S$ and $M$ as in the lemma with $\dim(S_K) = d$. By Lemma \ref{lemma-filter-Noetherian-module} there exists a filtration $0 \subset M_1 \subset M_2 \subset \ldots \subset M_n = M$ so that $M_i/M_{i - 1}$ is isomorphic to $S/\mathfrak q$ for some prime $\mathfrak q$ of $S$. Note that $\dim((S/\mathfrak q)_K) \leq \dim(S_K)$. Also, note that an extension of free modules is free (see basic notion \ref{item-extension-free}). Thus we may assume $M = S$ and that $S$ is a domain of finite type over $R$. \medskip\noindent If $R \to S$ has a nontrivial kernel, then take a nonzero $f \in R$ in this kernel. In this case $S_f = 0$ and the lemma holds. (This is really the case $d = -\infty$ and the start of the induction.) Hence we may assume that $R \to S$ is a finite type extension of Noetherian domains. \medskip\noindent Apply Lemma \ref{lemma-Noether-normalization-over-a-domain} and replace $R$ by $R_f$ (with $f$ as in the lemma) to get a factorization $$ R \subset R[y_1, \ldots, y_d] \subset S $$ where the second extension is finite. Choose $z_1, \ldots, z_r \in S$ which form a basis for the fraction field of $S$ over the fraction field of $R[y_1, \ldots, y_d]$. This gives a short exact sequence $$ 0 \to R[y_1, \ldots, y_d]^{\oplus r} \xrightarrow{(z_1, \ldots, z_r)} S \to N \to 0 $$ By construction $N$ is a finite $R[y_1, \ldots, y_d]$-module whose support does not contain the generic point $(0)$ of $\Spec(R[y_1, \ldots, y_d])$. By Lemma \ref{lemma-support-closed} there exists a nonzero $g \in R[y_1, \ldots, y_d]$ such that $g$ annihilates $N$, so we may view $N$ as a finite module over $S' = R[y_1, \ldots, y_d]/(g)$. Since $\dim(S'_K) < d$ by induction there exists a nonzero $f \in R$ such that $N_f$ is a free $R_f$-module. Since $(R[y_1, \ldots, y_d])_f \cong R_f[y_1, \ldots, y_d]$ is free also, we conclude by the already mentioned fact that an extension of free modules is free. \end{proof} \begin{lemma} \label{lemma-generic-flatness-finitely-presented} \begin{slogan} Generic freeness. \end{slogan} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $R$ is a domain, \item $R \to S$ is of finite presentation, and \item $M$ is an $S$-module of finite presentation. \end{enumerate} Then there exists a nonzero $f \in R$ such that $M_f$ is a free $R_f$-module. \end{lemma} \begin{proof} Write $S = R[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$. For $g \in R[x_1, \ldots, x_n]$ denote by $\overline{g}$ its image in $S$. We may write $M = S^{\oplus t}/\sum Sn_i$ for some $n_i \in S^{\oplus t}$. Write $n_i = (\overline{g}_{i1}, \ldots, \overline{g}_{it})$ for some $g_{ij} \in R[x_1, \ldots, x_n]$. Let $R_0 \subset R$ be the subring generated by all the coefficients of all the elements $g_i, g_{ij} \in R[x_1, \ldots, x_n]$. Define $S_0 = R_0[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$. Define $M_0 = S_0^{\oplus t}/\sum S_0n_i$. Then $R_0$ is a domain of finite type over $\mathbf{Z}$ and hence Noetherian (see Lemma \ref{lemma-Noetherian-permanence}). Moreover via the injection $R_0 \to R$ we have $S \cong R \otimes_{R_0} S_0$ and $M \cong R \otimes_{R_0} M_0$. Applying Lemma \ref{lemma-generic-flatness-Noetherian} we obtain a nonzero $f \in R_0$ such that $(M_0)_f$ is a free $(R_0)_f$-module. Hence $M_f = R_f \otimes_{(R_0)_f} (M_0)_f$ is a free $R_f$-module. \end{proof} \begin{lemma} \label{lemma-generic-flatness} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $R$ is a domain, \item $R \to S$ is of finite type, and \item $M$ is a finite type $S$-module. \end{enumerate} Then there exists a nonzero $f \in R$ such that \begin{enumerate} \item[(a)] $M_f$ and $S_f$ are free as $R_f$-modules, and \item[(b)] $S_f$ is a finitely presented $R_f$-algebra and $M_f$ is a finitely presented $S_f$-module. \end{enumerate} \end{lemma} \begin{proof} We first prove the lemma for $S = R[x_1, \ldots, x_n]$, and then we deduce the result in general. \medskip\noindent Assume $S = R[x_1, \ldots, x_n]$. Choose elements $m_1, \ldots, m_t$ which generate $M$. This gives a short exact sequence $$ 0 \to N \to S^{\oplus t} \xrightarrow{(m_1, \ldots, m_t)} M \to 0. $$ Denote by $K$ the fraction field of $R$. Set $S_K = K \otimes_R S = K[x_1, \ldots, x_n]$, and similarly $N_K = K \otimes_R N$, $M_K = K \otimes_R M$. As $R \to K$ is flat the sequence remains exact after tensoring with $K$. As $S_K = K[x_1, \ldots, x_n]$ is a Noetherian ring (see Lemma \ref{lemma-Noetherian-permanence}) we can find finitely many elements $n'_1, \ldots, n'_s \in N_K$ which generate it. Choose $n_1, \ldots, n_r \in N$ such that $n'_i = \sum a_{ij}n_j$ for some $a_{ij} \in K$. Set $$ M' = S^{\oplus t}/\sum\nolimits_{i = 1, \ldots, r} Sn_i $$ By construction $M'$ is a finitely presented $S$-module, and there is a surjection $M' \to M$ which induces an isomorphism $M'_K \cong M_K$. We may apply Lemma \ref{lemma-generic-flatness-finitely-presented} to $R \to S$ and $M'$ and we find an $f \in R$ such that $M'_f$ is a free $R_f$-module. Thus $M'_f \to M_f$ is a surjection of modules over the domain $R_f$ where the source is a free module and which becomes an isomorphism upon tensoring with $K$. Thus it is injective as $M'_f \subset M'_K$ because $M'_f$ is free and $R_f$ is a domain with fraction field $K$. Hence $M'_f \to M_f$ is an isomorphism and the result is proved. \medskip\noindent For the general case, choose a surjection $R[x_1, \ldots, x_n] \to S$. Think of both $S$ and $M$ as finite modules over $R[x_1, \ldots, x_n]$. By the special case proved above there exists a nonzero $f \in R$ such that both $S_f$ and $M_f$ are free as $R_f$-modules and finitely presented as $R_f[x_1, \ldots, x_n]$-modules. Clearly this implies that $S_f$ is a finitely presented $R_f$-algebra and that $M_f$ is a finitely presented $S_f$-module. \end{proof} \noindent Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Consider the following condition on an element $f \in R$: \begin{equation} \label{equation-flat-and-finitely-presented} \left\{ \begin{matrix} S_f & \text{is of finite presentation over }R_f\\ M_f & \text{is of finite presentation as }S_f\text{-module}\\ S_f, M_f & \text{are free as }R_f\text{-modules} \end{matrix} \right. \end{equation} We define \begin{equation} \label{equation-good-locus} U(R \to S, M) = \bigcup\nolimits_{f \in R\text{ with }(\ref{equation-flat-and-finitely-presented})} D(f) \end{equation} which is an open subset of $\Spec(R)$. \begin{lemma} \label{lemma-generic-flatness-locus-extension} Let $R \to S$ be a ring map. Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a short exact sequence of $S$-modules. Then $$ U(R \to S, M_1) \cap U(R \to S, M_3) \subset U(R \to S, M_2). $$ \end{lemma} \begin{proof} Let $u \in U(R \to S, M_1) \cap U(R \to S, M_3)$. Choose $f_1, f_3 \in R$ such that $u \in D(f_1)$, $u \in D(f_3)$ and such that (\ref{equation-flat-and-finitely-presented}) holds for $f_1$ and $M_1$ and for $f_3$ and $M_3$. Then set $f = f_1f_3$. Then $u \in D(f)$ and (\ref{equation-flat-and-finitely-presented}) holds for $f$ and both $M_1$ and $M_3$. An extension of free modules is free, and an extension of finitely presented modules is finitely presented (Lemma \ref{lemma-extension}). Hence we see that (\ref{equation-flat-and-finitely-presented}) holds for $f$ and $M_2$. Thus $u \in U(R \to S, M_2)$ and we win. \end{proof} \begin{lemma} \label{lemma-generic-flatness-locus-localize} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Let $f \in R$. Using the identification $\Spec(R_f) = D(f)$ we have $U(R_f \to S_f, M_f) = D(f) \cap U(R \to S, M)$. \end{lemma} \begin{proof} Suppose that $u \in U(R_f \to S_f, M_f)$. Then there exists an element $g \in R_f$ such that $u \in D(g)$ and such that (\ref{equation-flat-and-finitely-presented}) holds for the pair $((R_f)_g \to (S_f)_g, (M_f)_g)$. Write $g = a/f^n$ for some $a \in R$. Set $h = af$. Then $R_h = (R_f)_g$, $S_h = (S_f)_g$, and $M_h = (M_f)_g$. Moreover $u \in D(h)$. Hence $u \in U(R \to S, M)$. Conversely, suppose that $u \in D(f) \cap U(R \to S, M)$. Then there exists an element $g \in R$ such that $u \in D(g)$ and such that (\ref{equation-flat-and-finitely-presented}) holds for the pair $(R_g \to S_g, M_g)$. Then it is clear that (\ref{equation-flat-and-finitely-presented}) also holds for the pair $(R_{fg} \to S_{fg}, M_{fg}) = ((R_f)_g \to (S_f)_g, (M_f)_g)$. Hence $u \in U(R_f \to S_f, M_f)$ and we win. \end{proof} \begin{lemma} \label{lemma-generic-flatness-locus-reduce} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Let $U \subset \Spec(R)$ be a dense open. Assume there is a covering $U = \bigcup_{i \in I} D(f_i)$ of opens such that $U(R_{f_i} \to S_{f_i}, M_{f_i})$ is dense in $D(f_i)$ for each $i \in I$. Then $U(R \to S, M)$ is dense in $\Spec(R)$. \end{lemma} \begin{proof} In view of Lemma \ref{lemma-generic-flatness-locus-localize} this is a purely topological statement. Namely, by that lemma we see that $U(R \to S, M) \cap D(f_i)$ is dense in $D(f_i)$ for each $i \in I$. By Topology, Lemma \ref{topology-lemma-nowhere-dense-local} we see that $U(R \to S, M) \cap U$ is dense in $U$. Since $U$ is dense in $\Spec(R)$ we conclude that $U(R \to S, M)$ is dense in $\Spec(R)$. \end{proof} \begin{lemma} \label{lemma-generic-flatness-reduced} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $R \to S$ is of finite type, \item $M$ is a finite $S$-module, and \item $R$ is reduced. \end{enumerate} Then there exists a subset $U \subset \Spec(R)$ such that \begin{enumerate} \item $U$ is open and dense in $\Spec(R)$, \item for every $u \in U$ there exists an $f \in R$ such that $u \in D(f) \subset U$ and such that we have \begin{enumerate} \item $M_f$ and $S_f$ are free over $R_f$, \item $S_f$ is a finitely presented $R_f$-algebra, and \item $M_f$ is a finitely presented $S_f$-module. \end{enumerate} \end{enumerate} \end{lemma} \begin{proof} Note that the lemma is equivalent to the statement that the open $U(R \to S, M)$, see Equation (\ref{equation-good-locus}), is dense in $\Spec(R)$. We first prove the lemma for $S = R[x_1, \ldots, x_n]$, and then we deduce the result in general. \medskip\noindent Proof of the case $S = R[x_1, \ldots, x_n]$ and $M$ any finite module over $S$. Note that in this case $S_f = R_f[x_1, \ldots, x_n]$ is free and of finite presentation over $R_f$, so we do not have to worry about the conditions regarding $S$, only those that concern $M$. We will use induction on $n$. \medskip\noindent There exists a finite filtration $$ 0 \subset M_1 \subset M_2 \subset \ldots \subset M_t = M $$ such that $M_i/M_{i - 1} \cong S/J_i$ for some ideal $J_i \subset S$, see Lemma \ref{lemma-trivial-filter-finite-module}. Since a finite intersection of dense opens is dense open, we see from Lemma \ref{lemma-generic-flatness-locus-extension} that it suffices to prove the lemma for each of the modules $S/J_i$. Hence we may assume that $M = S/J$ for some ideal $J$ of $S = R[x_1, \ldots, x_n]$. \medskip\noindent Let $I \subset R$ be the ideal generated by the coefficients of elements of $J$. Let $U_1 = \Spec(R) \setminus V(I)$ and let $$ U_2 = \Spec(R) \setminus \overline{U_1}. $$ Then it is clear that $U = U_1 \cup U_2$ is dense in $\Spec(R)$. Let $f \in R$ be an element such that either (a) $D(f) \subset U_1$ or (b) $D(f) \subset U_2$. If for any such $f$ the lemma holds for the pair $(R_f \to R_f[x_1, \ldots, x_n], M_f)$ then by Lemma \ref{lemma-generic-flatness-locus-reduce} we see that $U(R \to S, M)$ is dense in $\Spec(R)$. Hence we may assume either (a) $I = R$, or (b) $V(I) = \Spec(R)$. \medskip\noindent In case (b) we actually have $I = 0$ as $R$ is reduced! Hence $J = 0$ and $M = S$ and the lemma holds in this case. \medskip\noindent In case (a) we have to do a little bit more work. Note that every element of $I$ is actually the coefficient of a monomial of an element of $J$, because the set of coefficients of elements of $J$ forms an ideal (details omitted). Hence we find an element $$ g = \sum\nolimits_{K \in E} a_K x^K \in J $$ where $E$ is a finite set of multi-indices $K = (k_1, \ldots, k_n)$ with at least one coefficient $a_{K_0}$ a unit in $R$. Actually we can find one which has a coefficient equal to $1$ as $1 \in I$ in case (a). Let $m = \#\{K \in E \mid a_K \text{ is not a unit}\}$. Note that $0 \leq m \leq \# E - 1$. We will argue by induction on $m$. \medskip\noindent The case $m = 0$. In this case all the coefficients $a_K$, $K \in E$ of $g$ are units and $E \not = \emptyset$. If $E = \{K_0\}$ is a singleton and $K_0 = (0, \ldots, 0)$, then $g$ is a unit and $J = S$ so the result holds for sure. (This happens in particular when $n = 0$ and it provides the base case of the induction on $n$.) If not $E = \{(0, \ldots, 0)\}$, then at least one $K$ is not equal to $(0, \ldots, 0)$, i.e., $g \not \in R$. At this point we employ the usual trick of Noether normalization. Namely, we consider $$ G(y_1, \ldots, y_n) = g(y_1 + y_n^{e_1}, y_2 + y_n^{e_2}, \ldots, y_{n - 1} + y_n^{e_{n - 1}}, y_n) $$ with $0 \ll e_{n -1} \ll e_{n - 2} \ll \ldots \ll e_1$. By Lemma \ref{lemma-helper-polynomial} it follows that $G(y_1, \ldots, y_n)$ as a polynomial in $y_n$ looks like $$ a_K y_n^{k_n + \sum_{i = 1, \ldots, n - 1} e_i k_i} + \text{lower order terms in }y_n $$ As $a_K$ is a unit we conclude that $M = R[x_1, \ldots, x_n]/J$ is finite over $R[y_1, \ldots, y_{n - 1}]$. Hence $U(R \to R[x_1, \ldots, x_n], M) = U(R \to R[y_1, \ldots, y_{n - 1}], M)$ and we win by induction on $n$. \medskip\noindent The case $m > 0$. Pick a multi-index $K \in E$ such that $a_K$ is not a unit. As before set $U_1 = \Spec(R_{a_K}) = \Spec(R) \setminus V(a_K)$ and set $$ U_2 = \Spec(R) \setminus \overline{U_1}. $$ Then it is clear that $U = U_1 \cup U_2$ is dense in $\Spec(R)$. Let $f \in R$ be an element such that either (a) $D(f) \subset U_1$ or (b) $D(f) \subset U_2$. If for any such $f$ the lemma holds for the pair $(R_f \to R_f[x_1, \ldots, x_n], M_f)$ then by Lemma \ref{lemma-generic-flatness-locus-reduce} we see that $U(R \to S, M)$ is dense in $\Spec(R)$. Hence we may assume either (a) $a_KR = R$, or (b) $V(a_K) = \Spec(R)$. In case (a) the number $m$ drops, as $a_K$ has turned into a unit. In case (b), since $R$ is reduced, we conclude that $a_K = 0$. Hence the set $E$ decreases so the number $m$ drops as well. In both cases we win by induction on $m$. \medskip\noindent At this point we have proven the lemma in case $S = R[x_1, \ldots, x_n]$. Assume that $(R \to S, M)$ is an arbitrary pair satisfying the conditions of the lemma. Choose a surjection $R[x_1, \ldots, x_n] \to S$. Observe that, with the notation introduced in (\ref{equation-good-locus}), we have $$ U(R \to S, M) = U(R \to R[x_1, \ldots, x_n], S) \cap U(R \to R[x_1, \ldots, x_n], M) $$ Hence, as we have just proved that the two opens on the right are dense, the open on the left is dense as well. \end{proof} \section{Around Krull-Akizuki} \label{section-krull-akizuki} % BEGIN ALGEBRA EDITORIAL ROUTE section-krull-akizuki \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-krull-akizuki}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-krull-akizuki \noindent One application of Krull-Akizuki is to show that there are plenty of discrete valuation rings. More generally in this section we show how to construct discrete valuation rings dominating Noetherian local rings. \medskip\noindent First we show how to dominate a Noetherian local domain by a $1$-dimensional Noetherian local domain by blowing up the maximal ideal. \begin{lemma} \label{lemma-dominate-by-dimension-1} Let $R$ be a local Noetherian domain with fraction field $K$. Assume $R$ is not a field. Then there exist $R \subset R' \subset K$ with \begin{enumerate} \item $R'$ local Noetherian of dimension $1$, \item $R \to R'$ a local ring map, i.e., $R'$ dominates $R$, and \item $R \to R'$ essentially of finite type. \end{enumerate} \end{lemma} \begin{proof} Choose any valuation ring $A \subset K$ dominating $R$ (which exists by Lemma \ref{lemma-dominate}). Denote by $v$ the corresponding valuation. Let $x_1, \ldots, x_r$ be a minimal set of generators of the maximal ideal $\mathfrak m$ of $R$. We may and do assume that $v(x_r) = \min\{v(x_1), \ldots, v(x_r)\}$. Consider the ring $$ S = R[x_1/x_r, x_2/x_r, \ldots, x_{r - 1}/x_r] \subset K. $$ Note that $\mathfrak mS = x_rS$ is a principal ideal. Note that $S \subset A$ and that $v(x_r) > 0$, hence we see that $x_rS \not = S$. Choose a minimal prime $\mathfrak q$ over $x_rS$. Then $\text{height}(\mathfrak q) = 1$ by Lemma \ref{lemma-minimal-over-1} and $\mathfrak q$ lies over $\mathfrak m$. Hence we see that $R' = S_{\mathfrak q}$ is a solution. \end{proof} \begin{lemma}[Koll\'ar] \label{lemma-hart-serre-loc-thm} \begin{reference} This is taken from a forthcoming paper by J\'anos Koll\'ar entitled ``Variants of normality for Noetherian schemes''. \end{reference} Let $(R, \mathfrak m)$ be a local Noetherian ring. Then exactly one of the following holds: \begin{enumerate} \item $(R, \mathfrak m)$ is Artinian, \item $(R, \mathfrak m)$ is regular of dimension $1$, \item $\text{depth}(R) \geq 2$, or \item there exists a finite ring map $R \to R'$ which is not an isomorphism, has kernel and cokernel annihilated by a power of $\mathfrak m$, satisfies $\mathfrak m \notin \operatorname{Ass}(R')$, and has $R' \not = 0$. \end{enumerate} \end{lemma} \begin{proof} Observe that $(R, \mathfrak m)$ is not Artinian if and only if $V(\mathfrak m) \subset \Spec(R)$ is nowhere dense. See Proposition \ref{proposition-dimension-zero-ring}. We assume this from now on. \medskip\noindent Let $J \subset R$ be the largest ideal killed by a power of $\mathfrak m$. If $J \not = 0$ then $R \to R/J$ shows that $(R, \mathfrak m)$ is as in (4). \medskip\noindent Otherwise $J = 0$. In particular $\mathfrak m$ is not an associated prime of $R$ and we see that there is a nonzerodivisor $x \in \mathfrak m$ by Lemma \ref{lemma-ideal-nonzerodivisor}. If $\mathfrak m$ is not an associated prime of $R/xR$ then $\text{depth}(R) \geq 2$ by the same lemma. Thus we are left with the case when there is a $y \in R$, $y \not \in xR$ such that $y \mathfrak m \subset xR$. \medskip\noindent If $y \mathfrak m \subset x \mathfrak m$ then we can consider the map $\varphi : \mathfrak m \to \mathfrak m$, $f \mapsto yf/x$ (well defined as $x$ is a nonzerodivisor). By the determinantal trick of Lemma \ref{lemma-charpoly-module} there exists a monic polynomial $P$ with coefficients in $R$ such that $P(\varphi) = 0$. We conclude that $P(y/x) = 0$ in $R_x$. Let $R' \subset R_x$ be the ring generated by $R$ and $y/x$. Then $R \subset R'$ and $R'/R$ is a finite $R$-module annihilated by a power of $\mathfrak m$. Thus $R$ is as in (4). \medskip\noindent Otherwise there is a $t \in \mathfrak m$ such that $y t = u x$ for some unit $u$ of $R$. After replacing $t$ by $u^{-1}t$ we get $yt = x$. In particular $y$ is a nonzerodivisor. For any $t' \in \mathfrak m$ we have $y t' = x s$ for some $s \in R$. Thus $y (t' - s t ) = x s - x s = 0$. Since $y$ is not a zero-divisor this implies that $t' = ts$ and so $\mathfrak m = (t)$. Thus $(R, \mathfrak m)$ is regular of dimension 1. \medskip\noindent The argument so far shows that every $R$ falls into one of the 4 cases. To finish we have to show that no two of the properties can hold simultaneously for each of the 6 combinations of properties. We'll just show that (2) and (3) each exclude (4); the other cases are left to the reader. \medskip\noindent Assume $R$ is regular of dimension $1$ and that $R \to R'$ is a finite ring map whose kernel and cokernel are annihilated by a power of $\mathfrak m$ and $\mathfrak m$ is not an associated prime of $R'$. Then $R'$ is a finite $R$-module of depth at least $1$ and hence free by Lemma \ref{lemma-regular-mcm-free}. Since $R \to R'$ is an isomorphism at the generic point, we conclude that $R'$ must be free of rank $1$ as an $R$-module. Then $R' \to \text{End}_R(R') \cong R$ is an inverse to the map $R \to R'$. Thus (4) cannot be true. \medskip\noindent Assume $R$ has depth $\geq 2$ and that $R \to R'$ is a finite ring map whose kernel and cokernel are annihilated by a power of $\mathfrak m$ and $\mathfrak m$ is not an associated prime of $R'$. Then $R \to R'$ is necessarily injective (as the kernel would have both depth $0$ and depth $\geq 1$) and the cokernel has depth at least $1$ (by Lemma \ref{lemma-depth-in-ses} and the fact that $R'$ has depth $\geq 1$ by assumption) whence cannot be supported on $\{\mathfrak m\}$ unless it is $0$ as well. Thus (4) cannot be true. \end{proof} \begin{lemma} \label{lemma-nonregular-dimension-one} Let $R$ be a local ring with maximal ideal $\mathfrak m$. Assume $R$ is Noetherian, has dimension $1$, and that $\dim(\mathfrak m/\mathfrak m^2) > 1$. Then there exists a ring map $R \to R'$ such that \begin{enumerate} \item $R \to R'$ is finite, \item $R \to R'$ is not an isomorphism, \item the kernel and cokernel of $R \to R'$ are annihilated by a power of $\mathfrak m$, and \item $\mathfrak m$ is not an associated prime of $R'$. \end{enumerate} \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-hart-serre-loc-thm} and the fact that $R$ is not Artinian, not regular, and does not have depth $\geq 2$ (the last part because the depth does not exceed the dimension by Lemma \ref{lemma-bound-depth}). \end{proof} \begin{example} \label{example-nonreduced} Consider the Noetherian local ring $$ R = k[[x, y]]/(y^2) $$ It has dimension 1 and it is Cohen-Macaulay. An example of an extension as in Lemma \ref{lemma-nonregular-dimension-one} is the extension $$ k[[x, y]]/(y^2) \subset k[[x, z]]/(z^2), \ \ y \mapsto xz $$ in other words it is gotten by adjoining $y/x$ to $R$. The effect of repeating the construction $n > 1$ times is to adjoin the element $y/x^n$. \end{example} \begin{example} \label{example-bad-dvr-char-p} Let $k$ be a field of characteristic $p > 0$ such that $k$ has infinite degree over its subfield $k^p$ of $p$th powers. For example $k = \mathbf{F}_p(t_1, t_2, t_3, \ldots)$. Consider the ring $$ A = \left\{ \sum a_i x^i \in k[[x]] \text{ such that } [k^p(a_0, a_1, a_2, \ldots) : k^p] < \infty \right\} $$ Then $A$ is a discrete valuation ring and its completion is $A^\wedge = k[[x]]$. Note that the induced extension of fraction fields of $A \subset k[[x]]$ is infinite purely inseparable. Choose any $f \in k[[x]]$, $f \not \in A$. Let $R = A[f] \subset k[[x]]$. Then $R$ is a Noetherian local domain of dimension $1$ whose completion $R^\wedge$ is nonreduced (think!). \end{example} \begin{remark} \label{remark-resolution-dim-1} Suppose that $R$ is a $1$-dimensional semi-local Noetherian domain. If there is a maximal ideal $\mathfrak m \subset R$ such that $R_{\mathfrak m}$ is not regular, then we may apply Lemma \ref{lemma-nonregular-dimension-one} to $(R_{\mathfrak m}, \mathfrak mR_{\mathfrak m})$ to get a finite ring extension $R \subset R_1$. (For example one can do this so that $\Spec(R_1) \to \Spec(R)$ is the blowup of $\Spec(R)$ in the ideal $\mathfrak m$.) Of course $R_1$ is a $1$-dimensional semi-local Noetherian domain with the same fraction field as $R$. If $R_1$ is not a regular semi-local ring, then we may repeat the construction to get $R_1 \subset R_2$. Thus we get a sequence $$ R \subset R_1 \subset R_2 \subset R_3 \subset \ldots $$ of finite ring extensions which may stop if $R_n$ is regular for some $n$. Resolution of singularities would be the claim that eventually $R_n$ is indeed regular. In reality this is not the case. Namely, there exists a characteristic $0$ Noetherian local domain $A$ of dimension $1$ whose completion is nonreduced, see \cite[Proposition 3.1]{Ferrand-Raynaud} or our Examples, Section \ref{examples-section-local-completion-nonreduced}. For an example in characteristic $p > 0$ see Example \ref{example-bad-dvr-char-p}. Since the construction of blowing up commutes with completion it is easy to see the sequence never stabilizes. See \cite{Bennett} for a discussion (mostly in positive characteristic). On the other hand, if the completion of $R$ at each of its maximal ideals is reduced, then the procedure stops. \end{remark} \begin{lemma} \label{lemma-characterize-dvr} Let $A$ be a ring. The following are equivalent. \begin{enumerate} \item The ring $A$ is a discrete valuation ring. \item The ring $A$ is a valuation ring and Noetherian but not a field. \item The ring $A$ is a regular local ring of dimension $1$. \item The ring $A$ is a Noetherian local domain with maximal ideal $\mathfrak m$ generated by a single nonzero element. \item The ring $A$ is a Noetherian local normal domain of dimension $1$. \end{enumerate} In this case if $\pi$ is a generator of the maximal ideal of $A$, then every nonzero element of $A$ can be uniquely written as $u\pi^n$, where $u \in A$ is a unit and $n \in \mathbf{Z}_{\geq 0}$. \end{lemma} \begin{proof} The equivalence of (1) and (2) is Lemma \ref{lemma-valuation-ring-Noetherian-discrete}. Moreover, in the proof of Lemma \ref{lemma-valuation-ring-Noetherian-discrete} we saw that if $A$ is a discrete valuation ring, then $A$ is a PID, hence (3). Note that a regular local ring is a domain (see Lemma \ref{lemma-regular-domain}). Using this the equivalence of (3) and (4) follows from dimension theory, see Section \ref{section-dimension}. \medskip\noindent Assume (3) and let $\pi$ be a generator of the maximal ideal $\mathfrak m$. For all $n \geq 0$ we have $\dim_{A/\mathfrak m} \mathfrak m^n/\mathfrak m^{n + 1} = 1$ because it is generated by $\pi^n$ (and it cannot be zero). In particular $\mathfrak m^n = (\pi^n)$ and the graded ring $\bigoplus \mathfrak m^n/\mathfrak m^{n + 1}$ is isomorphic to the polynomial ring $(A/\mathfrak m)[T]$. For $x \in A \setminus \{0\}$ define $v(x) = \max\{n \mid x \in \mathfrak m^n\}$. In other words $x = u \pi^{v(x)}$ with $u \in A^*$. By the remarks above we have $v(xy) = v(x) + v(y)$ for all $x, y \in A \setminus \{0\}$. We extend this to the field of fractions $K$ of $A$ by setting $v(a/b) = v(a) - v(b)$ (well defined by multiplicativity shown above). Then it is clear that $A$ is the set of elements of $K$ which have valuation $\geq 0$. Hence we see that $A$ is a valuation ring by Lemma \ref{lemma-valuation-valuation-ring}. \medskip\noindent A valuation ring is a normal domain by Lemma \ref{lemma-valuation-ring-normal}. Hence we see that the equivalent conditions (1) -- (3) imply (5). Assume (5). Suppose that $\mathfrak m$ cannot be generated by $1$ element to get a contradiction. Then Lemma \ref{lemma-nonregular-dimension-one} implies there is a finite ring map $A \to A'$ which is an isomorphism after inverting any nonzero element of $\mathfrak m$ but not an isomorphism. In particular we may identify $A'$ with a subset of the fraction field of $A$. Since $A \to A'$ is finite it is integral (see Lemma \ref{lemma-finite-is-integral}). Since $A$ is normal we get $A = A'$ a contradiction. \end{proof} \begin{definition} \label{definition-uniformizer} Let $A$ be a discrete valuation ring. A {\it uniformizer} is an element $\pi \in A$ which generates the maximal ideal of $A$. \end{definition} \noindent By Lemma \ref{lemma-characterize-dvr} any two uniformizers of a discrete valuation ring are associates. \begin{lemma} \label{lemma-finite-length} Let $R$ be a domain with fraction field $K$. Let $M$ be an $R$-submodule of $K^{\oplus r}$. Assume $R$ is local Noetherian of dimension $1$. For any nonzero $x \in R$ we have $\text{length}_R(R/xR) < \infty$ and $$ \text{length}_R(M/xM) \leq r \cdot \text{length}_R(R/xR). $$ \end{lemma} \begin{proof} If $x$ is a unit then the result is true. Hence we may assume $x \in \mathfrak m$ the maximal ideal of $R$. Since $x$ is not zero and $R$ is a domain we have $\dim(R/xR) = 0$, and hence $R/xR$ has finite length. Consider $M \subset K^{\oplus r}$ as in the lemma. We may assume that the elements of $M$ generate $K^{\oplus r}$ as a $K$-vector space after replacing $K^{\oplus r}$ by a smaller subspace if necessary. \medskip\noindent Suppose first that $M$ is a finite $R$-module. In that case we can clear denominators and assume $M \subset R^{\oplus r}$. Since $M$ generates $K^{\oplus r}$ as a vector space we see that $R^{\oplus r}/M$ has finite length. In particular there exists an integer $c \geq 0$ such that $x^cR^{\oplus r} \subset M$. Note that $M \supset xM \supset x^2M \supset \ldots$ is a sequence of modules with successive quotients each isomorphic to $M/xM$. Hence we see that $$ n \text{length}_R(M/xM) = \text{length}_R(M/x^nM). $$ The same argument for $M = R^{\oplus r}$ shows that $$ n \text{length}_R(R^{\oplus r}/xR^{\oplus r}) = \text{length}_R(R^{\oplus r}/x^nR^{\oplus r}). $$ By our choice of $c$ above we see that $x^nM$ is sandwiched between $x^n R^{\oplus r}$ and $x^{n + c}R^{\oplus r}$. This easily gives that $$ r(n + c) \text{length}_R(R/xR) \geq n \text{length}_R(M/xM) \geq r (n - c) \text{length}_R(R/xR) $$ Hence in the finite case we actually get the result of the lemma with equality. \medskip\noindent Suppose now that $M$ is not finite. Suppose that the length of $M/xM$ is $\geq k$ for some natural number $k$. Then we can find $$ 0 \subset N_0 \subset N_1 \subset N_2 \subset \ldots \subset N_k \subset M/xM $$ with $N_i \not = N_{i + 1}$ for $i = 0, \ldots k - 1$. Choose an element $m_i \in M$ whose congruence class mod $xM$ falls into $N_i$ but not into $N_{i - 1}$ for $i = 1, \ldots, k$. Consider the finite $R$-module $M' = Rm_1 + \ldots + Rm_k \subset M$. Let $N'_i \subset M'/xM'$ be the inverse image of $N_i$. It is clear that $N'_i \not =N'_{i + 1}$ by our choice of $m_i$. Hence we see that $\text{length}_R(M'/xM') \geq k$. By the finite case we conclude $k \leq r\text{length}_R(R/xR)$ as desired. \end{proof} \noindent Here is a first application. \begin{lemma} \label{lemma-finite-extension-residue-fields-dimension-1} Let $R \to S$ be a homomorphism of domains inducing an injection of fraction fields $K \subset L$. If $R$ is Noetherian local of dimension $1$ and $[L : K] < \infty$ then \begin{enumerate} \item each prime ideal $\mathfrak n_i$ of $S$ lying over the maximal ideal $\mathfrak m$ of $R$ is maximal, \item there are finitely many of these, and \item $[\kappa(\mathfrak n_i) : \kappa(\mathfrak m)] < \infty$ for each $i$. \end{enumerate} \end{lemma} \begin{proof} Pick $x \in \mathfrak m$ nonzero. Apply Lemma \ref{lemma-finite-length} to the submodule $S \subset L \cong K^{\oplus n}$ where $n = [L : K]$. Thus the ring $S/xS$ has finite length over $R$. It follows that $S/\mathfrak m S$ has finite length over $\kappa(\mathfrak m)$. In other words, $\dim_{\kappa(\mathfrak m)} S/\mathfrak m S$ is finite (Lemma \ref{lemma-dimension-is-length}). Thus $S/\mathfrak mS$ is Artinian (Lemma \ref{lemma-finite-dimensional-algebra}). The structural results on Artinian rings imply parts (1) and (2), see for example Lemma \ref{lemma-artinian-finite-length}. Part (3) is implied by the finiteness established above. \end{proof} \begin{lemma} \label{lemma-finite-length-global} Let $R$ be a domain with fraction field $K$. Let $M$ be an $R$-submodule of $K^{\oplus r}$. Assume $R$ is Noetherian of dimension $1$. For any nonzero $x \in R$ we have $\text{length}_R(M/xM) < \infty$. \end{lemma} \begin{proof} Since $R$ has dimension $1$ we see that $x$ is contained in finitely many primes $\mathfrak m_i$, $i = 1, \ldots, n$, each maximal. Since $R$ is Noetherian we see that $R/xR$ is Artinian and $R/xR = \prod_{i = 1, \ldots, n} (R/xR)_{\mathfrak m_i}$ by Proposition \ref{proposition-dimension-zero-ring} and Lemma \ref{lemma-artinian-finite-length}. Hence $M/xM$ similarly decomposes as the product $M/xM = \prod (M/xM)_{\mathfrak m_i}$ of its localizations at the $\mathfrak m_i$. By Lemma \ref{lemma-finite-length} applied to $M_{\mathfrak m_i}$ over $R_{\mathfrak m_i}$ we see each $M_{\mathfrak m_i}/xM_{\mathfrak m_i} = (M/xM)_{\mathfrak m_i}$ has finite length over $R_{\mathfrak m_i}$. Thus $M/xM$ has finite length over $R$ as the above implies $M/xM$ has a finite filtration by $R$-submodules whose successive quotients are isomorphic to the residue fields $\kappa(\mathfrak m_i)$. \end{proof} \begin{lemma}[Krull-Akizuki] \label{lemma-krull-akizuki} Let $R$ be a domain with fraction field $K$. Let $L/K$ be a finite extension of fields. Assume $R$ is Noetherian and $\dim(R) = 1$. In this case any ring $A$ with $R \subset A \subset L$ is Noetherian. \end{lemma} \begin{proof} Let $I \subset A$ be a nonzero ideal. By Lemma \ref{lemma-intersection-not-zero} we can find a nonzero element $x \in I \cap R$. Then we get $I/xA \subset A/xA$. By Lemma \ref{lemma-finite-length-global} the $R$-module $A/xA$ has finite length as an $R$-module. Hence $I/xA$ has finite length as an $R$-module. Hence $I$ is finitely generated as an ideal in $A$. \end{proof} \begin{lemma} \label{lemma-exists-dvr} Let $R$ be a Noetherian local domain with fraction field $K$. Assume that $R$ is not a field. Let $L/K$ be a finitely generated field extension. Then there exists a discrete valuation ring $A$ with fraction field $L$ which dominates $R$. \end{lemma} \begin{proof} If $L$ is not finite over $K$ choose a transcendence basis $x_1, \ldots, x_r$ of $L$ over $K$ and replace $R$ by $R[x_1, \ldots, x_r]$ localized at the maximal ideal generated by $\mathfrak m_R$ and $x_1, \ldots, x_r$. Thus we may assume $K \subset L$ finite. \medskip\noindent By Lemma \ref{lemma-dominate-by-dimension-1} we may assume $\dim(R) = 1$. \medskip\noindent Let $A \subset L$ be the integral closure of $R$ in $L$. By Lemma \ref{lemma-krull-akizuki} this is Noetherian. By Lemma \ref{lemma-integral-overring-surjective} there is a prime ideal $\mathfrak q \subset A$ lying over the maximal ideal of $R$. By Lemma \ref{lemma-characterize-dvr} the ring $A_{\mathfrak q}$ is a discrete valuation ring dominating $R$ as desired. \end{proof} \section{Factorization} \label{section-factoring} % BEGIN ALGEBRA EDITORIAL ROUTE section-factoring \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-factoring}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-factoring \noindent Here are some notions and relations between them that are typically taught in a first year course on algebra at the undergraduate level. \begin{definition} \label{definition-irreducible-prime-element} Let $R$ be a domain. \begin{enumerate} \item Elements $x, y \in R$ are called {\it associates} if there exists a unit $u \in R^*$ such that $x = uy$. \item An element $x \in R$ is called {\it irreducible} if it is nonzero, not a unit and whenever $x = yz$, $y, z \in R$, then $y$ is either a unit or an associate of $x$. \item A nonzero element $x \in R$ is called {\it prime} if the ideal generated by $x$ is a prime ideal. \end{enumerate} \end{definition} \begin{lemma} \label{lemma-easy-divisibility} Let $R$ be a domain. Let $x, y \in R$. Then $x$, $y$ are associates if and only if $(x) = (y)$. \end{lemma} \begin{proof} If $x = uy$ for some unit $u \in R$, then $(x) \subset (y)$ and $y = u^{-1}x$ so also $(y) \subset (x)$. Conversely, suppose that $(x) = (y)$. Then $x = fy$ and $y = gx$ for some $f, g \in R$. If $x = 0$, then also $y = 0$, and the conclusion is immediate. Otherwise, $x = fg x$ and since $R$ is a domain $fg = 1$. Thus $x$ and $y$ are associates. \end{proof} \begin{lemma} \label{lemma-factorization-exists} Let $R$ be a domain. Consider the following conditions: \begin{enumerate} \item The ring $R$ satisfies the ascending chain condition for principal ideals. \item Every nonzero, nonunit element $a \in R$ has a factorization $a = b_1 \ldots b_k$ with each $b_i$ an irreducible element of $R$. \end{enumerate} Then (1) implies (2). \end{lemma} \begin{proof} Let $x$ be a nonzero element, not a unit, which does not have a factorization into irreducibles. Set $x_1 = x$. We can write $x = yz$ where neither $y$ nor $z$ is irreducible or a unit. Then either $y$ does not have a factorization into irreducibles, in which case we set $x_2 = y$, or $z$ does not have a factorization into irreducibles, in which case we set $x_2 = z$. Continuing in this fashion we find a sequence $$ \ldots | x_3 | x_2 | x_1 $$ of elements of $R$ with $x_n/x_{n + 1}$ not a unit. This gives a strictly increasing sequence of principal ideals $(x_1) \subset (x_2) \subset (x_3) \subset \ldots$ thereby finishing the proof. \end{proof} \begin{definition} \label{definition-UFD} A {\it unique factorization domain}, abbreviated {\it UFD}, is a domain $R$ such that if $x \in R$ is a nonzero, nonunit, then $x$ has a factorization into irreducibles, and if $$ x = a_1 \ldots a_m = b_1 \ldots b_n $$ are factorizations into irreducibles then $n = m$ and there exists a permutation $\sigma : \{1, \ldots, n\} \to \{1, \ldots, n\}$ such that $a_i$ and $b_{\sigma(i)}$ are associates. \end{definition} \begin{lemma} \label{lemma-characterize-UFD} Let $R$ be a domain. Assume every nonzero, nonunit factors into irreducibles. Then $R$ is a UFD if and only if every irreducible element is prime. \end{lemma} \begin{proof} Assume $R$ is a UFD and let $x \in R$ be an irreducible element. Say $ab \in (x)$, i.e., $ab = cx$. If $a = 0$ or $b = 0$, the conclusion is immediate. Thus $a$, $b$, and $c$ are nonzero. Choose factorizations (allowing the empty product for a unit) $a = u_a a_1 \ldots a_n$, $b = u_b b_1 \ldots b_m$, and $c = u_c c_1 \ldots c_r$, with units $u_a, u_b, u_c \in R^*$. By uniqueness of the factorization $$ u_a u_b a_1 \ldots a_n b_1 \ldots b_m = u_c c_1 \ldots c_r x $$ we find that $x$ is an associate of one of the elements $a_1, \ldots, a_n, b_1, \ldots, b_m$. In other words, either $a \in (x)$ or $b \in (x)$ and we conclude that $x$ is prime. \medskip\noindent Assume every irreducible element is prime. We have to prove that factorization into irreducibles is unique up to permutation and taking associates. Say $a_1 \ldots a_m = b_1 \ldots b_n$ with $a_i$ and $b_j$ irreducible. Since $a_1$ is prime, we see that $b_j \in (a_1)$ for some $j$. After renumbering we may assume $b_1 \in (a_1)$. Then $b_1 = a_1 u$ and since $b_1$ is irreducible we see that $u$ is a unit. Hence $a_1$ and $b_1$ are associates and $a_2 \ldots a_m = ub_2\ldots b_n$. If $m = 1$ or $n = 1$, this equality forces $m = n = 1$. Otherwise, absorb $u$ into $b_2$ and apply induction on $n + m$ to see that $n = m$ and $a_i$ is associate to $b_{\sigma(i)}$ for $i = 2, \ldots, n$, as desired. \end{proof} \begin{lemma} \label{lemma-characterize-UFD-height-1} Let $R$ be a Noetherian domain. Then $R$ is a UFD if and only if every height $1$ prime ideal is principal. \end{lemma} \begin{proof} Assume $R$ is a UFD and let $\mathfrak p$ be a height 1 prime ideal. Take $x \in \mathfrak p$ nonzero and let $x = a_1 \ldots a_n$ be a factorization into irreducibles. Since $\mathfrak p$ is prime we see that $a_i \in \mathfrak p$ for some $i$. By Lemma \ref{lemma-characterize-UFD} the ideal $(a_i)$ is prime. Since $\mathfrak p$ has height $1$ we conclude that $(a_i) = \mathfrak p$. \medskip\noindent Assume every height $1$ prime is principal. Since $R$ is Noetherian every nonzero nonunit element $x$ has a factorization into irreducibles, see Lemma \ref{lemma-factorization-exists}. It suffices to prove that an irreducible element $x$ is prime, see Lemma \ref{lemma-characterize-UFD}. Let $(x) \subset \mathfrak p$ be a prime minimal over $(x)$. Then $\mathfrak p$ has height $1$ by Lemma \ref{lemma-minimal-over-1}. By assumption $\mathfrak p = (y)$. Hence $x = yz$ and $z$ is a unit as $x$ is irreducible. Thus $(x) = (y)$ and we see that $x$ is prime. \end{proof} \begin{lemma}[Nagata's criterion for factoriality] \label{lemma-invert-prime-elements} \begin{reference} \cite[Lemma 2]{Nagata-UFD} \end{reference} Let $A$ be a domain. Let $S \subset A$ be a multiplicative subset generated by prime elements. Let $x \in A$ be irreducible. Then \begin{enumerate} \item the image of $x$ in $S^{-1}A$ is irreducible or a unit, and \item $x$ is prime if and only if the image of $x$ in $S^{-1}A$ is a prime element or a unit in $S^{-1}A$. \end{enumerate} Moreover, then $A$ is a UFD if and only if every nonzero nonunit element of $A$ has a factorization into irreducibles and $S^{-1}A$ is a UFD. \end{lemma} \begin{proof} Say $x = \alpha \beta$ for $\alpha, \beta \in S^{-1}A$. Then $\alpha = a/s$ and $\beta = b/s'$ for $a, b \in A$, $s, s' \in S$. Thus we get $ss'x = ab$. By assumption we can write $ss' = p_1 \ldots p_r$ for some prime elements $p_i$. For each $i$ the element $p_i$ divides either $a$ or $b$. Dividing we find a factorization $x = a' b'$ and $a = s'' a'$, $b = s''' b'$ for some $s'', s''' \in S$. As $x$ is irreducible, either $a'$ or $b'$ is a unit. Tracing back we find that either $\alpha$ or $\beta$ is a unit. This proves (1). \medskip\noindent Suppose $x$ is prime. Then $A/(x)$ is a domain. Hence $S^{-1}A/xS^{-1}A = S^{-1}(A/(x))$ is a domain or zero. Thus $x$ maps to a prime element or a unit. \medskip\noindent Suppose that the image of $x$ in $S^{-1}A$ is a unit. Then $y x = s$ for some $s \in S$ and $y \in A$. By assumption $s = p_1 \ldots p_r$ with $p_i$ a prime element. For each $i$ either $p_i$ divides $y$ or $p_i$ divides $x$. In the second case $p_i$ and $x$ are associates (as $x$ is irreducible) and we are done. But if the first case happens for all $i = 1, \ldots, r$, then $x$ is a unit which is a contradiction. \medskip\noindent Suppose that the image of $x$ in $S^{-1}A$ is a prime element. Assume $a, b \in A$ and $ab \in (x)$. Then $sa = xy$ or $sb = xy$ for some $s \in S$ and $y \in A$. Say the first case happens. By assumption $s = p_1 \ldots p_r$ with $p_i$ a prime element. For each $i$ either $p_i$ divides $y$ or $p_i$ divides $x$. In the second case $p_i$ and $x$ are associates (as $x$ is irreducible) and we are done. If the first case happens for all $i = 1, \ldots, r$, then $a \in (x)$ as desired. This completes the proof of (2). \medskip\noindent The final statement of the lemma follows from (1) and (2) and Lemma \ref{lemma-characterize-UFD}. \end{proof} \begin{lemma} \label{lemma-UFD-ascending-chain-condition-principal-ideals} A UFD satisfies the ascending chain condition for principal ideals. \end{lemma} \begin{proof} Consider an ascending chain $(a_1) \subset (a_2) \subset (a_3) \subset \ldots$ of principal ideals in $R$. If $a_n = 0$ for every $n$, there is nothing to prove. Otherwise, after dropping an initial segment and renumbering, we may assume $a_1 \not = 0$. Write $a_1 = p_1^{e_1} \ldots p_r^{e_r}$ with $p_i$ prime. Then we see that $a_n$ is an associate of $p_1^{c_1} \ldots p_r^{c_r}$ for some $0 \leq c_i \leq e_i$. Since there are only finitely many possibilities we conclude. \end{proof} \begin{lemma} \label{lemma-factoring-in-polynomial} Let $R$ be a domain. Assume $R$ has the ascending chain condition for principal ideals. Then the same property holds for a polynomial ring over $R$. \end{lemma} \begin{proof} Consider an ascending chain $(f_1) \subset (f_2) \subset (f_3) \subset \ldots$ of principal ideals in $R[x]$. If $f_n = 0$ for every $n$, there is nothing to prove. Otherwise, after dropping an initial segment and renumbering, we may assume $f_1 \not = 0$. Since $f_{n + 1}$ divides $f_n$ we see that the degrees decrease in the sequence. Thus $f_n$ has fixed degree $d \geq 0$ for all $n \gg 0$. Let $a_n$ be the leading coefficient of $f_n$. The condition $f_n \in (f_{n + 1})$ implies that $a_{n + 1}$ divides $a_n$ for all $n$. By our assumption on $R$ we see that $a_{n + 1}$ and $a_n$ are associates for all $n$ large enough (Lemma \ref{lemma-easy-divisibility}). Thus for large $n$ we see that $f_n = u f_{n + 1}$ where $u \in R$ (for reasons of degree) is a unit (as $a_n$ and $a_{n + 1}$ are associates). \end{proof} \begin{lemma} \label{lemma-polynomial-ring-UFD} A polynomial ring over a UFD is a UFD. In particular, if $k$ is a field, then $k[x_1, \ldots, x_n]$ is a UFD. \end{lemma} \begin{proof} Let $R$ be a UFD. Then $R$ satisfies the ascending chain condition for principal ideals (Lemma \ref{lemma-UFD-ascending-chain-condition-principal-ideals}), hence $R[x]$ satisfies the ascending chain condition for principal ideals (Lemma \ref{lemma-factoring-in-polynomial}), and hence every nonzero nonunit element of $R[x]$ has a factorization into irreducibles (Lemma \ref{lemma-factorization-exists}). Let $S \subset R$ be the multiplicative subset generated by prime elements. Since every nonzero nonunit of $R$ is a product of prime elements we see that $K = S^{-1}R$ is the fraction field of $R$. Observe that every prime element of $R$ maps to a prime element of $R[x]$ and that $S^{-1}(R[x]) = S^{-1}R[x] = K[x]$ is a UFD (and even a PID). Thus we may apply Lemma \ref{lemma-invert-prime-elements} to conclude. \end{proof} \begin{lemma} \label{lemma-UFD-normal} A unique factorization domain is normal. \end{lemma} \begin{proof} Let $R$ be a UFD. Let $x$ be an element of the fraction field of $R$ which is integral over $R$. Say $x^d - a_1 x^{d - 1} - \ldots - a_d = 0$ with $a_i \in R$. If $x = 0$, there is nothing to prove. Thus we may assume $x \not = 0$ and write $x = u p_1^{e_1} \ldots p_r^{e_r}$ with $u$ a unit, $e_i \in \mathbf{Z}$, and $p_1, \ldots, p_r$ irreducible elements which are not associates. To prove the lemma we have to show $e_i \geq 0$. If not, say $e_1 < 0$, then for $N \gg 0$ we get $$ u^d p_2^{de_2 + N} \ldots p_r^{de_r + N} = p_1^{-de_1}p_2^N \ldots p_r^N( \sum\nolimits_{i = 1, \ldots, d} a_i x^{d - i} ) \in (p_1) $$ which contradicts uniqueness of factorization in $R$. \end{proof} \begin{definition} \label{definition-PID} A {\it principal ideal domain}, abbreviated {\it PID}, is a domain $R$ such that every ideal is a principal ideal. \end{definition} \begin{lemma} \label{lemma-PID-UFD} A principal ideal domain is a unique factorization domain. \end{lemma} \begin{proof} As a PID is Noetherian this follows from Lemma \ref{lemma-characterize-UFD-height-1}. \end{proof} \begin{definition} \label{definition-dedekind-domain} A {\it Dedekind domain} is a domain $R$ such that every nonzero ideal $I \subset R$ can be written as a product $$ I = \mathfrak p_1 \ldots \mathfrak p_r $$ of nonzero prime ideals uniquely up to permutation of the $\mathfrak p_i$. \end{definition} \begin{lemma} \label{lemma-PID-dedekind} A PID is a Dedekind domain. \end{lemma} \begin{proof} Let $R$ be a PID. Since every nonzero ideal of $R$ is principal, and $R$ is a UFD (Lemma \ref{lemma-PID-UFD}), this follows from the fact that every irreducible element in $R$ is prime (Lemma \ref{lemma-characterize-UFD}) so that factorizations of elements turn into factorizations into primes. \end{proof} \begin{lemma} \label{lemma-product-ideals-principal} \begin{slogan} A product of ideals is an invertible module iff both factors are. \end{slogan} Let $A$ be a ring. Let $I$ and $J$ be nonzero ideals of $A$ such that $IJ = (f)$ for some nonzerodivisor $f \in A$. Then $I$ and $J$ are finitely generated ideals and finitely locally free of rank $1$ as $A$-modules. \end{lemma} \begin{proof} It suffices to show that $I$ and $J$ are finite locally free $A$-modules of rank $1$, see Lemma \ref{lemma-finite-projective}. To do this, write $f = \sum_{i = 1, \ldots, n} x_i y_i$ with $x_i \in I$ and $y_i \in J$. We can also write $x_i y_i = a_i f$ for some $a_i \in A$. Since $f$ is a nonzerodivisor we see that $\sum a_i = 1$. Thus it suffices to show that each $I_{a_i}$ and $J_{a_i}$ is free of rank $1$ over $A_{a_i}$. After replacing $A$ by $A_{a_i}$ we conclude that $f = xy$ for some $x \in I$ and $y \in J$. Note that both $x$ and $y$ are nonzerodivisors. We claim that $I = (x)$ and $J = (y)$ which finishes the proof. Namely, if $x' \in I$, then $x'y = af = axy$ for some $a \in A$. Hence $x' = ax$ and we win. \end{proof} \begin{lemma} \label{lemma-characterize-Dedekind} Let $R$ be a ring. The following are equivalent: \begin{enumerate} \item $R$ is a Dedekind domain, \item $R$ is a Noetherian domain and for every nonzero maximal ideal $\mathfrak m$ the local ring $R_{\mathfrak m}$ is a discrete valuation ring, and \item $R$ is a Noetherian, normal domain, and $\dim(R) \leq 1$. \end{enumerate} \end{lemma} \begin{proof} Assume (1). The argument is nontrivial because we did not assume that $R$ was Noetherian in our definition of a Dedekind domain. Let $\mathfrak p \subset R$ be a nonzero prime ideal (the zero ideal is already finitely generated). Observe that $\mathfrak p \not = \mathfrak p^2$ by uniqueness of the factorizations in the definition. Pick $x \in \mathfrak p$ with $x \not \in \mathfrak p^2$. Let $y \in \mathfrak p$ be a second element (for example $y = 0$). Write $(x, y) = \mathfrak p_1 \ldots \mathfrak p_r$. Since $(x, y) \subset \mathfrak p$ at least one of the primes $\mathfrak p_i$ is contained in $\mathfrak p$. But as $x \not \in \mathfrak p^2$ there is at most one. Thus exactly one of $\mathfrak p_1, \ldots, \mathfrak p_r$ is contained in $\mathfrak p$, say $\mathfrak p_1 \subset \mathfrak p$. We conclude that $(x, y)R_\mathfrak p = \mathfrak p_1R_\mathfrak p$ is prime for every choice of $y$. We claim that $(x)R_\mathfrak p = \mathfrak pR_\mathfrak p$. Namely, pick $y \in \mathfrak p$. By the above applied with $y^2$ we see that $(x, y^2)R_\mathfrak p$ is prime. Hence $y \in (x, y^2)R_\mathfrak p$, i.e., $y = ax + by^2$ in $R_\mathfrak p$. Thus $(1 - by)y = ax \in (x)R_\mathfrak p$, i.e., $y \in (x)R_\mathfrak p$ as desired. \medskip\noindent Writing $(x) = \mathfrak p_1 \ldots \mathfrak p_r$ anew with $\mathfrak p_1 \subset \mathfrak p$ we conclude that $\mathfrak p_1 R_\mathfrak p = \mathfrak p R_\mathfrak p$, i.e., $\mathfrak p_1 = \mathfrak p$. Moreover, $\mathfrak p_1 = \mathfrak p$ is a finitely generated ideal of $R$ by Lemma \ref{lemma-product-ideals-principal}. We conclude that $R$ is Noetherian by Lemma \ref{lemma-cohen}. Moreover, it follows that $R_\mathfrak m$ is a discrete valuation ring for every nonzero maximal ideal $\mathfrak m$, see Lemma \ref{lemma-characterize-dvr}. \medskip\noindent The equivalence of (2) and (3) follows from Lemmas \ref{lemma-normality-is-local} and \ref{lemma-characterize-dvr}. Assume (2) and (3) are satisfied. The unit ideal is the empty product. Let $I \subset R$ be a nonzero proper ideal. We will construct a factorization of $I$. If $I$ is prime, then there is nothing to prove. If not, pick $I \subset \mathfrak p$ with $\mathfrak p \subset R$ maximal. Let $J = \{x \in R \mid x \mathfrak p \subset I\}$. We claim $J \mathfrak p = I$. It suffices to check this after localization at the maximal ideals $\mathfrak m$ of $R$ (the formation of $J$ commutes with localization and we use Lemma \ref{lemma-characterize-zero-local}). Then either $\mathfrak p R_\mathfrak m = R_\mathfrak m$ and the result is clear, or $\mathfrak p R_\mathfrak m = \mathfrak m R_\mathfrak m$. In the last case $\mathfrak p R_\mathfrak m = (\pi)$ and the case where $\mathfrak p$ is principal is immediate. By Noetherian induction the ideal $J$ has a factorization and we obtain the desired factorization of $I$. We omit the proof of uniqueness of the factorization. \end{proof} \noindent The following is a variant of the Krull-Akizuki lemma. \begin{lemma} \label{lemma-integral-closure-Dedekind} Let $A$ be a Noetherian domain of dimension $1$ with fraction field $K$. Let $L/K$ be a finite extension. Let $B$ be the integral closure of $A$ in $L$. Then $B$ is a Dedekind domain and $\Spec(B) \to \Spec(A)$ is surjective, has finite fibres, and induces finite residue field extensions. \end{lemma} \begin{proof} By Krull-Akizuki (Lemma \ref{lemma-krull-akizuki}) the ring $B$ is Noetherian. By Lemma \ref{lemma-integral-sub-dim-equal} $\dim(B) = 1$. Thus $B$ is a Dedekind domain by Lemma \ref{lemma-characterize-Dedekind}. Surjectivity of the map on spectra follows from Lemma \ref{lemma-integral-overring-surjective}. The last two statements follow from Lemma \ref{lemma-finite-extension-residue-fields-dimension-1}. \end{proof} \section{Orders of vanishing} \label{section-orders-of-vanishing} % BEGIN ALGEBRA EDITORIAL ROUTE section-orders-of-vanishing \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-orders-of-vanishing}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-orders-of-vanishing \begin{lemma} \label{lemma-ord-additive} Let $R$ be a semi-local Noetherian ring of dimension $1$. If $a, b \in R$ are nonzerodivisors then $$ \text{length}_R(R/(ab)) = \text{length}_R(R/(a)) + \text{length}_R(R/(b)) $$ and these lengths are finite. \end{lemma} \begin{proof} We saw the finiteness in Lemma \ref{lemma-finite-length-global}. Additivity holds since there is a short exact sequence $0 \to R/(a) \to R/(ab) \to R/(b) \to 0$ where the first map is given by multiplication by $b$. (Use that length is additive, see Lemma \ref{lemma-length-additive}.) \end{proof} \begin{definition} \label{definition-ord} Suppose that $K$ is a field, and $R \subset K$ is a local\footnote{We could also define this when $R$ is only semi-local but this is probably never really what you want!} Noetherian subring of dimension $1$ with fraction field $K$. In this case we define the {\it order of vanishing along $R$} $$ \text{ord}_R : K^* \longrightarrow \mathbf{Z} $$ by the rule $$ \text{ord}_R(x) = \text{length}_R(R/(x)) $$ if $x \in R$ and we set $\text{ord}_R(x/y) = \text{ord}_R(x) - \text{ord}_R(y)$ for $x, y \in R$ both nonzero. \end{definition} \noindent We can use the order of vanishing to compare lattices in a vector space. Here is the definition. \begin{definition} \label{definition-lattice} Let $R$ be a Noetherian local domain of dimension $1$ with fraction field $K$. Let $V$ be a finite dimensional $K$-vector space. A {\it lattice in $V$} is a finite $R$-submodule $M \subset V$ such that $V = K \otimes_R M$. \end{definition} \noindent The condition $V = K \otimes_R M$ signifies that $M$ contains a basis for the vector space $V$. We remark that in many places in the literature the notion of a lattice may be defined only in case the ring $R$ is a discrete valuation ring. If $R$ is a discrete valuation ring then any lattice is a free $R$-module, and this may not be the case in general. \begin{lemma} \label{lemma-compare-lattices} Let $R$ be a Noetherian local domain of dimension $1$ with fraction field $K$. Let $V$ be a finite dimensional $K$-vector space. \begin{enumerate} \item If $M$ is a lattice in $V$ and $M \subset M' \subset V$ is an $R$-submodule of $V$ containing $M$ then the following are equivalent \begin{enumerate} \item $M'$ is a lattice, \item $\text{length}_R(M'/M)$ is finite, and \item $M'$ is finitely generated. \end{enumerate} \item If $M$ is a lattice in $V$ and $M' \subset M$ is an $R$-submodule of $M$ then $M'$ is a lattice if and only if $\text{length}_R(M/M')$ is finite. \item If $M$, $M'$ are lattices in $V$, then so are $M \cap M'$ and $M + M'$. \item If $M \subset M' \subset M'' \subset V$ are lattices in $V$ then $$ \text{length}_R(M''/M) = \text{length}_R(M'/M) + \text{length}_R(M''/M'). $$ \item If $M$, $M'$, $N$, $N'$ are lattices in $V$ and $N \subset M \cap M'$, $M + M' \subset N'$, then we have \begin{eqnarray*} & & \text{length}_R(M/(M \cap M')) - \text{length}_R(M'/(M \cap M'))\\ & = & \text{length}_R(M/N) - \text{length}_R(M'/N) \\ & = & \text{length}_R((M + M')/M') - \text{length}_R((M + M')/M) \\ & = & \text{length}_R(N' / M') - \text{length}_R(N'/M) \end{eqnarray*} \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Assume (1)(a). Say $y_1, \ldots, y_m$ generate $M'$. Then each $y_i = x_i/f_i$ for some $x_i \in M$ and nonzero $f_i \in R$. Hence we see that $f_1 \ldots f_m M' \subset M$. Since $R$ is Noetherian local of dimension $1$ we see that $\mathfrak m^n \subset (f_1 \ldots f_m)$ for some $n$ (for example combine Lemmas \ref{lemma-one-equation} and Proposition \ref{proposition-dimension-zero-ring} or combine Lemmas \ref{lemma-finite-length} and \ref{lemma-length-infinite}). In other words $\mathfrak m^nM' \subset M$ for some $n$. Hence $\text{length}(M'/M) < \infty$ by Lemma \ref{lemma-length-finite}, in other words (1)(b) holds. Assume (1)(b). Then $M'/M$ is a finite $R$-module (see Lemma \ref{lemma-finite-length-finite}). Hence $M'$ is a finite $R$-module as an extension of finite $R$-modules. Hence (1)(c). The implication (1)(c) $\Rightarrow$ (1)(a) follows from the remark following Definition \ref{definition-lattice}. \medskip\noindent Proof of (2). Suppose $M$ is a lattice in $V$ and $M' \subset M$ is an $R$-submodule. We have seen in (1) that if $M'$ is a lattice, then $\text{length}_R(M/M') < \infty$. Conversely, assume that $\text{length}_R(M/M') < \infty$. Then $M'$ is finitely generated as $R$ is Noetherian and for some $n$ we have $\mathfrak m^n M \subset M'$ (Lemma \ref{lemma-length-infinite}). Hence it follows that $M'$ contains a basis for $V$, and $M'$ is a lattice. \medskip\noindent Proof of (3). Assume $M$, $M'$ are lattices in $V$. Since $R$ is Noetherian the submodule $M \cap M'$ of $M$ is finite. As $M$ is a lattice we can find $x_1, \ldots, x_n \in M$ which form a $K$-basis for $V$. Because $M'$ is a lattice we can write $x_i = y_i/f_i$ with $y_i \in M'$ and $f_i \in R$. Hence $f_ix_i \in M \cap M'$. Hence $M \cap M'$ is a lattice also. The fact that $M + M'$ is a lattice follows from part (1). \medskip\noindent Part (4) follows from additivity of lengths (Lemma \ref{lemma-length-additive}) and the exact sequence $$ 0 \to M'/M \to M''/M \to M''/M' \to 0. $$ Part (5) follows from repeatedly applying part (4). \end{proof} \begin{definition} \label{definition-distance} Let $R$ be a Noetherian local domain of dimension $1$ with fraction field $K$. Let $V$ be a finite dimensional $K$-vector space. Let $M$, $M'$ be two lattices in $V$. The {\it distance between $M$ and $M'$} is the integer $$ d(M, M') = \text{length}_R(M/(M \cap M')) - \text{length}_R(M'/(M \cap M')) $$ of Lemma \ref{lemma-compare-lattices} part (5). \end{definition} \noindent In particular, if $M' \subset M$, then $d(M, M') = \text{length}_R(M/M')$. \begin{lemma} \label{lemma-properties-distance-function} Let $R$ be a Noetherian local domain of dimension $1$ with fraction field $K$. Let $V$ be a finite dimensional $K$-vector space. This distance function has the property that $$ d(M, M'') = d(M, M') + d(M', M'') $$ whenever given three lattices $M$, $M'$, $M''$ of $V$. In particular we have $d(M, M') = - d(M', M)$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-order-vanishing-determinant} Let $R$ be a Noetherian local domain of dimension $1$ with fraction field $K$. Let $V$ be a finite dimensional $K$-vector space. Let $\varphi : V \to V$ be a $K$-linear isomorphism. For any lattice $M \subset V$ we have $$ d(M, \varphi(M)) = \text{ord}_R(\det(\varphi)) $$ \end{lemma} \begin{proof} We can see that the integer $d(M, \varphi(M))$ does not depend on the lattice $M$ as follows. Suppose that $M'$ is a second such lattice. Then we see that \begin{eqnarray*} d(M, \varphi(M)) & = & d(M, M') + d(M', \varphi(M)) \\ & = & d(M, M') + d(\varphi(M'), \varphi(M)) + d(M', \varphi(M')) \end{eqnarray*} Since $\varphi$ is an isomorphism we see that $d(\varphi(M'), \varphi(M)) = d(M', M) = -d(M, M')$, and hence $d(M, \varphi(M)) = d(M', \varphi(M'))$. Moreover, both sides of the equation (of the lemma) are additive in $\varphi$, i.e., $$ \text{ord}_R(\det(\varphi \circ \psi)) = \text{ord}_R(\det(\varphi)) + \text{ord}_R(\det(\psi)) $$ and also \begin{eqnarray*} d(M, \varphi(\psi((M)))) & = & d(M, \psi(M)) + d(\psi(M), \varphi(\psi(M))) \\ & = & d(M, \psi(M)) + d(M, \varphi(M)) \end{eqnarray*} by the independence shown above. Hence it suffices to prove the lemma for generators of $\text{GL}(V)$. Choose an isomorphism $K^{\oplus n} \cong V$. Then $\text{GL}(V) = \text{GL}_n(K)$ is generated by elementary matrices $E$. The result is clear for $E$ equal to the identity matrix. If $E = E_{ij}(\lambda)$ with $i \not = j$, $\lambda \in K$, $\lambda \not = 0$, for example $$ E_{12}(\lambda) = \left( \begin{matrix} 1 & \lambda & \ldots \\ 0 & 1 & \ldots \\ \ldots & \ldots & \ldots \end{matrix} \right) $$ then with respect to a different basis we get $E_{12}(1)$. The result is clear for $E = E_{12}(1)$ by taking as lattice $R^{\oplus n} \subset K^{\oplus n}$. Finally, if $E = E_i(a)$, with $a \in K^*$ for example $$ E_1(a) = \left( \begin{matrix} a & 0 & \ldots \\ 0 & 1 & \ldots \\ \ldots & \ldots & \ldots \end{matrix} \right) $$ then $E_1(a)(R^{\oplus n}) = aR \oplus R^{\oplus n - 1}$ and it is clear that $d(R^{\oplus n}, aR \oplus R^{\oplus n - 1}) = \text{ord}_R(a)$ as desired. \end{proof} \begin{lemma} \label{lemma-finite-extension-dim-1} Let $A \to B$ be a ring map. Assume \begin{enumerate} \item $A$ is a Noetherian local domain of dimension $1$, \item $A \subset B$ is a finite extension of domains. \end{enumerate} Let $L/K$ be the corresponding finite extension of fraction fields. Let $y \in L^*$ and $x = \text{Nm}_{L/K}(y)$. In this situation $B$ is semi-local. Let $\mathfrak m_i$, $i = 1, \ldots, n$ be the maximal ideals of $B$. Then $$ \text{ord}_A(x) = \sum\nolimits_i [\kappa(\mathfrak m_i) : \kappa(\mathfrak m_A)] \text{ord}_{B_{\mathfrak m_i}}(y) $$ where $\text{ord}$ is defined as in Definition \ref{definition-ord}. \end{lemma} \begin{proof} The ring $B$ is semi-local by Lemma \ref{lemma-finite-in-codim-1}. Write $y = b/b'$ for some $b, b' \in B$. By the additivity of $\text{ord}$ and multiplicativity of $\text{Nm}$ it suffices to prove the lemma for $y = b$ or $y = b'$. In other words we may assume $y \in B$. In this case the right hand side of the formula is $$ \sum [\kappa(\mathfrak m_i) : \kappa(\mathfrak m_A)] \text{length}_{B_{\mathfrak m_i}}((B/yB)_{\mathfrak m_i}) $$ By Lemma \ref{lemma-pushdown-module} this is equal to $\text{length}_A(B/yB)$. By Lemma \ref{lemma-order-vanishing-determinant} we have $$ \text{length}_A(B/yB) = d(B, yB) = \text{ord}_A(\det\nolimits_K(L \xrightarrow{y} L)). $$ Since $x = \text{Nm}_{L/K}(y) = \det\nolimits_K(L \xrightarrow{y} L)$ by definition the lemma is proved. \end{proof} \section{Quasi-finite maps} \label{section-quasi-finite} % BEGIN ALGEBRA EDITORIAL ROUTE section-quasi-finite \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-quasi-finite}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-quasi-finite \noindent Consider a ring map $R \to S$ of finite type. A map $\Spec(S) \to \Spec(R)$ is quasi-finite at a point if that point is isolated in its fibre. This means that the fibre is zero dimensional at that point. In this section we study the basic properties of this important but technical notion. More advanced material can be found in the next section. \begin{lemma} \label{lemma-isolated-point} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q$ be a prime of $S$. The following are equivalent: \begin{enumerate} \item $\mathfrak q$ is an isolated point of $\Spec(S)$, \item $S_{\mathfrak q}$ is finite over $k$, \item there exists a $g \in S$, $g \not\in \mathfrak q$ such that $D(g) = \{ \mathfrak q \}$, \item $\dim_{\mathfrak q} \Spec(S) = 0$, \item $\mathfrak q$ is a closed point of $\Spec(S)$ and $\dim(S_{\mathfrak q}) = 0$, and \item the field extension $\kappa(\mathfrak q)/k$ is finite and $\dim(S_{\mathfrak q}) = 0$. \end{enumerate} In this case $S = S_{\mathfrak q} \times S'$ for some finite type $k$-algebra $S'$. Also, the element $g$ as in (3) has the property $S_{\mathfrak q} = S_g$. \end{lemma} \begin{proof} Suppose $\mathfrak q$ is an isolated point of $\Spec(S)$, i.e., $\{\mathfrak q\}$ is open in $\Spec(S)$. Because $\Spec(S)$ is a Jacobson space (see Lemmas \ref{lemma-finite-type-field-Jacobson} and \ref{lemma-jacobson}) we see that $\mathfrak q$ is a closed point. Hence $\{\mathfrak q\}$ is open and closed in $\Spec(S)$. By Lemmas \ref{lemma-disjoint-decomposition} and \ref{lemma-disjoint-implies-product} we may write $S = S_1 \times S_2$ with $\mathfrak q$ corresponding to the only point $\Spec(S_1)$. Hence $S_1 = S_{\mathfrak q}$ is a zero dimensional ring of finite type over $k$. Hence it is finite over $k$ for example by Lemma \ref{lemma-Noether-normalization}. We have proved (1) implies (2). \medskip\noindent Suppose $S_{\mathfrak q}$ is finite over $k$. Then $S_{\mathfrak q}$ is Artinian local, see Lemma \ref{lemma-finite-dimensional-algebra}. So $\Spec(S_{\mathfrak q}) = \{\mathfrak qS_{\mathfrak q}\}$ by Lemma \ref{lemma-artinian-finite-length}. Consider the exact sequence $0 \to K \to S \to S_{\mathfrak q} \to Q \to 0$. It is clear that $K_{\mathfrak q} = Q_{\mathfrak q} = 0$. Also, $K$ is a finite $S$-module as $S$ is Noetherian and $Q$ is a finite $S$-module since $S_{\mathfrak q}$ is finite over $k$. Hence there exists $g \in S$, $g \not \in \mathfrak q$ such that $K_g = Q_g = 0$. Thus $S_{\mathfrak q} = S_g$ and $D(g) = \{ \mathfrak q \}$. We have proved that (2) implies (3). \medskip\noindent Suppose $D(g) = \{ \mathfrak q \}$. Since $D(g)$ is open by construction of the topology on $\Spec(S)$ we see that $\mathfrak q$ is an isolated point of $\Spec(S)$. We have proved that (3) implies (1). In other words (1), (2) and (3) are equivalent. \medskip\noindent Assume $\dim_{\mathfrak q} \Spec(S) = 0$. This means that there is some open neighbourhood of $\mathfrak q$ in $\Spec(S)$ which has dimension zero. Then there is an open neighbourhood of the form $D(g)$ which has dimension zero. Since $S_g$ is Noetherian we conclude that $S_g$ is Artinian and $D(g) = \Spec(S_g)$ is a finite discrete set, see Proposition \ref{proposition-dimension-zero-ring}. Thus $\mathfrak q$ is an isolated point of $D(g)$ and, by the equivalence of (1) and (2) above applied to $\mathfrak qS_g \subset S_g$, we see that $S_{\mathfrak q} = (S_g)_{\mathfrak qS_g}$ is finite over $k$. Hence (4) implies (2). It is clear that (1) implies (4). Thus (1) -- (4) are all equivalent. \medskip\noindent Lemma \ref{lemma-dimension-closed-point-finite-type-field} gives the implication (5) $\Rightarrow$ (4). The implication (4) $\Rightarrow$ (6) follows from Lemma \ref{lemma-dimension-at-a-point-finite-type-field}. The implication (6) $\Rightarrow$ (5) follows from Lemma \ref{lemma-finite-residue-extension-closed}. At this point we know (1) -- (6) are equivalent. \medskip\noindent The two statements at the end of the lemma we saw during the course of the proof of the equivalence of (1), (2) and (3) above. \end{proof} \begin{lemma} \label{lemma-isolated-point-fibre} \begin{slogan} Equivalent conditions for isolated points in fibres \end{slogan} Let $R \to S$ be a ring map of finite type. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. Let $F = \Spec(S \otimes_R \kappa(\mathfrak p))$ be the fibre of $\Spec(S) \to \Spec(R)$, see Remark \ref{remark-fundamental-diagram}. Denote by $\overline{\mathfrak q} \in F$ the point corresponding to $\mathfrak q$. The following are equivalent: \begin{enumerate} \item $\overline{\mathfrak q}$ is an isolated point of $F$, \item $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ is finite over $\kappa(\mathfrak p)$, \item there exists a $g \in S$, $g \not \in \mathfrak q$ such that the only prime of $D(g)$ mapping to $\mathfrak p$ is $\mathfrak q$, \item $\dim_{\overline{\mathfrak q}}(F) = 0$, \item $\overline{\mathfrak q}$ is a closed point of $F$ and $\dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) = 0$, and \item the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite and $\dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) = 0$. \end{enumerate} \end{lemma} \begin{proof} Note that $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} = (S \otimes_R \kappa(\mathfrak p))_{\overline{\mathfrak q}}$. Moreover $S \otimes_R \kappa(\mathfrak p)$ is of finite type over $\kappa(\mathfrak p)$. The conditions correspond exactly to the conditions of Lemma \ref{lemma-isolated-point} for the $\kappa(\mathfrak p)$-algebra $S \otimes_R \kappa(\mathfrak p)$ and the prime $\overline{\mathfrak q}$, hence they are equivalent. \end{proof} \begin{definition} \label{definition-quasi-finite} Let $R \to S$ be a finite type ring map. Let $\mathfrak q \subset S$ be a prime. \begin{enumerate} \item If the equivalent conditions of Lemma \ref{lemma-isolated-point-fibre} are satisfied then we say $R \to S$ is {\it quasi-finite at $\mathfrak q$}. \item We say a ring map $A \to B$ is {\it quasi-finite} if it is of finite type and quasi-finite at all primes of $B$. \end{enumerate} \end{definition} \begin{lemma} \label{lemma-quasi-finite-above-p} Let $R \to S$ be a finite type ring map and $\mathfrak p$ be a prime ideal of $R$. Then the following are equivalent: \begin{enumerate} \item $R \to S$ is quasi-finite at all primes of $S$ lying over $\mathfrak p$, \item $S \otimes_R \kappa(\mathfrak p)$ is a finite $\kappa(\mathfrak p)$-algebra, and \item $\Spec(S \otimes_R \kappa(\mathfrak p))$ is a finite set. \end{enumerate} \end{lemma} \begin{proof} Condition (1) says the topology on $\Spec(S \otimes_R \kappa(\mathfrak p))$ is discrete (as every point is open). Hence the equivalence of (1), (2), (3) follows from Lemma \ref{lemma-finite-type-algebra-finite-nr-primes}. \end{proof} \begin{lemma} \label{lemma-quasi-finite} Let $R \to S$ be a finite type ring map. Then $R \to S$ is quasi-finite if and only if for all primes $\mathfrak p \subset R$ the ring $S \otimes_R \kappa(\mathfrak p)$ is finite over $\kappa(\mathfrak p)$. \end{lemma} \begin{proof} Follows immediately from the more general Lemma \ref{lemma-quasi-finite-above-p}. \end{proof} \begin{lemma} \label{lemma-quasi-finite-local} Let $R \to S$ be a finite type ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. Let $f \in R$, $f \not \in \mathfrak p$ and $g \in S$, $g \not \in \mathfrak q$. Then $R \to S$ is quasi-finite at $\mathfrak q$ if and only if $R_f \to S_{fg}$ is quasi-finite at $\mathfrak qS_{fg}$. \end{lemma} \begin{proof} The fibre of $\Spec(S_{fg}) \to \Spec(R_f)$ is homeomorphic to an open subset of the fibre of $\Spec(S) \to \Spec(R)$. Hence the lemma follows from part (1) of the equivalent conditions of Lemma \ref{lemma-isolated-point-fibre}. \end{proof} \begin{lemma} \label{lemma-four-rings} Let $$ \xymatrix{ S \ar[r] & S' & & \mathfrak q \ar@{-}[r] & \mathfrak q' \\ R \ar[u] \ar[r] & R' \ar[u] & & \mathfrak p \ar@{-}[r] \ar@{-}[u] & \mathfrak p' \ar@{-}[u] } $$ be a commutative diagram of rings with primes as indicated. Assume $R \to S$ is of finite type, and $S \otimes_R R' \to S'$ surjective. If $R \to S$ is quasi-finite at $\mathfrak q$, then $R' \to S'$ is quasi-finite at $\mathfrak q'$. \end{lemma} \begin{proof} Write $S \otimes_R \kappa(\mathfrak p) = S_1 \times S_2$ with $S_1$ finite over $\kappa(\mathfrak p)$ and such that $\mathfrak q$ corresponds to a point of $S_1$ as in Lemma \ref{lemma-isolated-point}. This product decomposition induces a corresponding product decomposition for any $S \otimes_R \kappa(\mathfrak p)$-algebra. In particular, we obtain $S' \otimes_{R'} \kappa(\mathfrak p') = S'_1 \times S'_2$. Because $S \otimes_R R' \to S'$ is surjective the canonical map $(S \otimes_R \kappa(\mathfrak p)) \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p') \to S' \otimes_{R'} \kappa(\mathfrak p')$ is surjective and hence $S_i \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p') \to S'_i$ is surjective. It follows that $S'_1$ is finite over $\kappa(\mathfrak p')$. The map $S' \otimes_{R'} \kappa(\mathfrak p') \to \kappa(\mathfrak q')$ factors through $S_1'$ (i.e.\ it annihilates the factor $S_2'$) because the map $S \otimes_R \kappa(\mathfrak p) \to \kappa(\mathfrak q)$ factors through $S_1$ (i.e.\ it annihilates the factor $S_2$). Thus $\mathfrak q'$ corresponds to a point of $\Spec(S_1')$ in the disjoint union decomposition of the fibre: $\Spec(S' \otimes_{R'} \kappa(\mathfrak p')) = \Spec(S_1') \amalg \Spec(S_2')$, see Lemma \ref{lemma-spec-product}. Since $S_1'$ is finite over a field, it is an Artinian ring, and hence $\Spec(S_1')$ is a finite discrete set. (See Proposition \ref{proposition-dimension-zero-ring}.) We conclude $\mathfrak q'$ is isolated in its fibre as desired. \end{proof} \begin{lemma} \label{lemma-quasi-finite-composition} A composition of quasi-finite ring maps is quasi-finite. \end{lemma} \begin{proof} Suppose $A \to B$ and $B \to C$ are quasi-finite ring maps. By Lemma \ref{lemma-compose-finite-type} we see that $A \to C$ is of finite type. Let $\mathfrak r \subset C$ be a prime of $C$ lying over $\mathfrak q \subset B$ and $\mathfrak p \subset A$. Since $A \to B$ and $B \to C$ are quasi-finite at $\mathfrak q$ and $\mathfrak r$ respectively, there exist $b \in B$ and $c \in C$ such that $\mathfrak q$ is the only prime of $D(b)$ which maps to $\mathfrak p$ and similarly $\mathfrak r$ is the only prime of $D(c)$ which maps to $\mathfrak q$. If $c' \in C$ is the image of $b \in B$, then $\mathfrak r$ is the only prime of $D(cc')$ which maps to $\mathfrak p$. Therefore $A \to C$ is quasi-finite at $\mathfrak r$. \end{proof} \begin{lemma} \label{lemma-quasi-finite-base-change} Let $R \to S$ be a ring map of finite type. Let $R \to R'$ be any ring map. Set $S' = R' \otimes_R S$. \begin{enumerate} \item The set $\{\mathfrak q' \mid R' \to S' \text{ quasi-finite at }\mathfrak q'\}$ is the inverse image of the corresponding set of $\Spec(S)$ under the canonical map $\Spec(S') \to \Spec(S)$. \item If $\Spec(R') \to \Spec(R)$ is surjective, then $R \to S$ is quasi-finite if and only if $R' \to S'$ is quasi-finite. \item Any base change of a quasi-finite ring map is quasi-finite. \end{enumerate} \end{lemma} \begin{proof} Let $\mathfrak p' \subset R'$ be a prime lying over $\mathfrak p \subset R$. Then the fibre ring $S' \otimes_{R'} \kappa(\mathfrak p')$ is the base change of the fibre ring $S \otimes_R \kappa(\mathfrak p)$ by the field extension $\kappa(\mathfrak p) \to \kappa(\mathfrak p')$. Hence the first assertion follows from the invariance of dimension under field extension (Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension}) and Lemma \ref{lemma-isolated-point}. The stability of quasi-finite maps under base change follows from this and the stability of the finite type property under base change. The second assertion follows since the assumption implies that given a prime $\mathfrak q \subset S$ we can find a prime $\mathfrak q' \subset S'$ lying over it. \end{proof} \begin{lemma} \label{lemma-quasi-finite-permanence} Let $A \to B$ and $B \to C$ be ring homomorphisms such that $A \to C$ is of finite type. Let $\mathfrak r$ be a prime of $C$ lying over $\mathfrak q \subset B$ and $\mathfrak p \subset A$. If $A \to C$ is quasi-finite at $\mathfrak r$, then $B \to C$ is quasi-finite at $\mathfrak r$. \end{lemma} \begin{proof} Observe that $B \to C$ is of finite type (Lemma \ref{lemma-compose-finite-type}) so that the statement makes sense. Let us use characterization (3) of Lemma \ref{lemma-isolated-point-fibre}. If $A \to C$ is quasi-finite at $\mathfrak r$, then there exists some $c \in C$ such that $$ \{\mathfrak r' \subset C \text{ lying over }\mathfrak p\} \cap D(c) = \{\mathfrak{r}\}. $$ Since the primes $\mathfrak r' \subset C$ lying over $\mathfrak q$ form a subset of the primes $\mathfrak r' \subset C$ lying over $\mathfrak p$ we conclude $B \to C$ is quasi-finite at $\mathfrak r$. \end{proof} \begin{lemma} \label{lemma-generically-finite} Let $R \to S$ be a ring map of finite type. Let $\mathfrak p \subset R$ be a minimal prime. Assume that there are at most finitely many primes of $S$ lying over $\mathfrak p$. Then there exists a $g \in R$, $g \not \in \mathfrak p$ such that the ring map $R_g \to S_g$ is finite. \end{lemma} \begin{proof} Let $x_1, \ldots, x_n$ be generators of $S$ over $R$. By Lemma \ref{lemma-quasi-finite-above-p} the assumption means that $S \otimes_R \kappa(\mathfrak p) = S_{\mathfrak p}/\mathfrak pS_{\mathfrak p}$ is a finite $\kappa(\mathfrak p)$-algebra. Thus we may find monic polynomials $P_i \in R_{\mathfrak p}[X]$ such that $P_i(x_i)$ maps to zero in $S_{\mathfrak p}/\mathfrak pS_{\mathfrak p}$. Since $\mathfrak p$ is a minimal prime, $\mathfrak pR_{\mathfrak p}$ is a locally nilpotent ideal, see Lemma \ref{lemma-minimal-prime-reduced-ring}. Hence $\mathfrak pS_{\mathfrak p}$ is a locally nilpotent ideal, see Lemma \ref{lemma-locally-nilpotent}. Thus there exist $e_i \geq 1$ such that $P_i(x_i)^{e_i} = 0$ in $S_{\mathfrak p}$. Let $g_1 \in R$, $g_1 \not \in \mathfrak p$ be an element such that $P_i$ has coefficients in $R[1/g_1]$ for all $i$. Next, let $g_2 \in R$, $g_2 \not \in \mathfrak p$ be an element such that $P_i(x_i)^{e_i} = 0$ in $S_{g_1g_2}$. Setting $g = g_1g_2$ we win. \end{proof} \section{Zariski's Main Theorem} \label{section-Zariski} % BEGIN ALGEBRA EDITORIAL ROUTE section-Zariski \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-Zariski}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-Zariski \noindent In this section our aim is to prove the algebraic version of Zariski's Main theorem. This theorem will be the basis of many further developments in the theory of schemes and morphisms of schemes later in the Stacks project. \medskip\noindent Let $R \to S$ be a ring map of finite type. Our goal in this section is to show that the set of points of $\Spec(S)$ where the map is quasi-finite is {\it open} (Theorem \ref{theorem-main-theorem}). In fact, it will turn out that there exists a finite ring map $R \to S'$ such that in some sense the quasi-finite locus of $S/R$ is open in $\Spec(S')$ (but we will not prove this in the algebra chapter since we do not develop the language of schemes here -- for the case where $R \to S$ is quasi-finite see Lemma \ref{lemma-quasi-finite-open-integral-closure}). These statements are somewhat tricky to prove and we do it by a long list of lemmas concerning integral and finite extensions of rings. This material may be found in \cite{Henselian}, and \cite{Peskine}. We also found notes by Thierry Coquand helpful. \begin{lemma} \label{lemma-make-integral-trivial} Let $\varphi : R \to S$ be a ring map. Suppose $t \in S$ satisfies the relation $\varphi(a_0) + \varphi(a_1)t + \ldots + \varphi(a_n) t^n = 0$. Then $\varphi(a_n)t$ is integral over $R$. \end{lemma} \begin{proof} If $n = 0$, then $\varphi(a_0)t = 0$ and the assertion is immediate. Otherwise, multiply the equation $\varphi(a_0) + \varphi(a_1)t + \ldots + \varphi(a_n) t^n = 0$ by $\varphi(a_n)^{n-1}$ and write it as $\varphi(a_0 a_n^{n-1}) + \varphi(a_1 a_n^{n-2}) (\varphi(a_n)t) + \ldots + (\varphi(a_n) t)^n = 0$. \end{proof} \noindent The following lemma is in some sense the key lemma in this section. \begin{lemma} \label{lemma-make-integral-trick} Let $R$ be a ring. Let $\varphi : R[x] \to S$ be a ring map. Let $t \in S$. Assume that (a) $t$ is integral over $R[x]$, and (b) there exists a monic $p \in R[x]$ such that $t \varphi(p) \in \Im(\varphi)$. Then there exists a $q \in R[x]$ such that $t - \varphi(q)$ is integral over $R$. \end{lemma} \begin{proof} Write $t \varphi(p) = \varphi(r)$ for some $r \in R[x]$. Using euclidean division, write $r = qp + r'$ with $q, r' \in R[x]$ and $\deg(r') < \deg(p)$. We may replace $t$ by $t - \varphi(q)$ which is still integral over $R[x]$, so that we obtain $t \varphi(p) = \varphi(r')$. In the ring $S_t$ we may write this as $\varphi(p) - (1/t) \varphi(r') = 0$. This implies that $\varphi(x)$ gives an element of the localization $S_t$ which is integral over $\varphi(R)[1/t] \subset S_t$. On the other hand, $t$ is integral over the subring $\varphi(R)[\varphi(x)] \subset S$. Combined we conclude that $t$ is integral over the subring $\varphi(R)[1/t] \subset S_t$, see Lemma \ref{lemma-integral-transitive}. In other words there exists an equation of the form $$ t^d + \sum\nolimits_{i < d} \left(\sum\nolimits_{j = 0, \ldots, n_i} \varphi(r_{i, j})/t^j\right) t^i = 0 $$ in $S_t$ with $r_{i, j} \in R$. This means that $t^{d + N} + \sum_{i < d} \sum_{j = 0, \ldots, n_i} \varphi(r_{i, j}) t^{i + N - j} = 0$ in $S$ for some $N$ large enough. In other words $t$ is integral over $R$. \end{proof} \begin{lemma} \label{lemma-combine-lemmas} Let $R$ be a ring. Let $\varphi : R[x] \to S$ be a ring map. Let $t \in S$. Assume $t$ is integral over $R[x]$. Let $p \in R[x]$, $p = a_0 + a_1x + \ldots + a_k x^k$ such that $t \varphi(p) \in \Im(\varphi)$. Then there exists a $q \in R[x]$ and $n \geq 0$ such that $\varphi(a_k)^n t - \varphi(q)$ is integral over $R$. \end{lemma} \begin{proof} Let $R'$ and $S'$ be the localization of $R$ and $S$ at the element $a_k$. Let $\varphi' : R'[x] \to S'$ be the localization of $\varphi$. Let $t' \in S'$ be the image of $t$. Set $p' = p/a_k \in R'[x]$. Then $t' \varphi'(p') \in \Im(\varphi')$ since $t \varphi(p) \in \Im(\varphi)$. As $p'$ is monic, by Lemma \ref{lemma-make-integral-trick} there exists a $q' \in R'[x]$ such that $t' - \varphi'(q')$ is integral over $R'$. We may choose an $n \geq 0$ and an element $q \in R[x]$ such that $a_k^n q'$ is the image of $q$. Then $\varphi(a_k)^n t - \varphi(q)$ is an element of $S$ whose image in $S'$ is integral over $R'$. By Lemma \ref{lemma-integral-closure-localize} there exists an $m \geq 0$ such that $\varphi(a_k)^m(\varphi(a_k)^n t - \varphi(q))$ is integral over $R$. Thus $\varphi(a_k)^{m + n}t - \varphi(a_k^m q)$ is integral over $R$ as desired. \end{proof} \begin{situation} \label{situation-one-transcendental-element} Let $R$ be a ring. Let $\varphi : R[x] \to S$ be finite. Let $$ J = \{ g \in S \mid gS \subset \Im(\varphi)\} $$ be the ``conductor ideal'' of $\varphi$. Assume that $\varphi(R)$ is integrally closed in $S$. \end{situation} \begin{lemma} \label{lemma-leading-coefficient-in-J} In Situation \ref{situation-one-transcendental-element}. Suppose $u \in S$, $a_0, \ldots, a_k \in R$, $u \varphi(a_0 + a_1x + \ldots + a_k x^k) \in J$. Then there exists an $m \geq 0$ such that $u \varphi(a_k)^m \in J$. \end{lemma} \begin{proof} Assume that $S$ is generated by $t_1, \ldots, t_n$ as an $R[x]$-module. In this case $J = \{ g \in S \mid gt_i \in \Im(\varphi)\text{ for all }i\}$. Note that each element $u t_i$ is integral over $R[x]$, see Lemma \ref{lemma-finite-is-integral}. We have $\varphi(a_0 + a_1x + \ldots + a_k x^k) u t_i \in \Im(\varphi)$. By Lemma \ref{lemma-combine-lemmas}, for each $i$ there exists an integer $n_i$ and an element $q_i \in R[x]$ such that $\varphi(a_k^{n_i}) u t_i - \varphi(q_i)$ is integral over $R$. By assumption this element is in $\varphi(R)$ and hence $\varphi(a_k^{n_i}) u t_i \in \Im(\varphi)$. It follows that $m = \max\{n_1, \ldots, n_n\}$ works. \end{proof} \begin{lemma} \label{lemma-all-coefficients-in-J} In Situation \ref{situation-one-transcendental-element}. Suppose $u \in S$, $a_0, \ldots, a_k \in R$, $u \varphi(a_0 + a_1x + \ldots + a_k x^k) \in \sqrt{J}$. Then $u \varphi(a_i) \in \sqrt{J}$ for all $i$. \end{lemma} \begin{proof} Under the assumptions of the lemma we have $u^n \varphi(a_0 + a_1x + \ldots + a_k x^k)^n \in J$ for some $n \geq 1$. By Lemma \ref{lemma-leading-coefficient-in-J} we deduce $u^n \varphi(a_k^{nm}) \in J$ for some $m \geq 1$. Thus $u \varphi(a_k) \in \sqrt{J}$, and so $u \varphi(a_0 + a_1x + \ldots + a_k x^k) - u \varphi(a_k x^k) = u \varphi(a_0 + a_1x + \ldots + a_{k-1} x^{k-1}) \in \sqrt{J}$. We win by induction on $k$. \end{proof} \noindent This lemma suggests the following definition. \begin{definition} \label{definition-strongly-transcendental} Given an inclusion of rings $R \subset S$ and an element $x \in S$ we say that $x$ is {\it strongly transcendental over $R$} if whenever $u(a_0 + a_1 x + \ldots + a_k x^k) = 0$ with $u \in S$ and $a_i \in R$, then we have $ua_i = 0$ for all $i$. \end{definition} \noindent Note that if $S$ is a domain then this is the same as saying that $x$ as an element of the fraction field of $S$ is transcendental over the fraction field of $R$. \begin{lemma} \label{lemma-reduced-strongly-transcendental-minimal-prime} Suppose $R \subset S$ is an inclusion of reduced rings and suppose that $x \in S$ is strongly transcendental over $R$. Let $\mathfrak q \subset S$ be a minimal prime and let $\mathfrak p = R \cap \mathfrak q$. Then the image of $x$ in $S/\mathfrak q$ is strongly transcendental over the subring $R/\mathfrak p$. \end{lemma} \begin{proof} Suppose $u(a_0 + a_1x + \ldots + a_k x^k) \in \mathfrak q$. By Lemma \ref{lemma-minimal-prime-reduced-ring} the local ring $S_{\mathfrak q}$ is a field, and hence $u(a_0 + a_1x + \ldots + a_k x^k) $ is zero in $S_{\mathfrak q}$. Thus $uu'(a_0 + a_1x + \ldots + a_k x^k) = 0$ for some $u' \in S$, $u' \not\in \mathfrak q$. Since $x$ is strongly transcendental over $R$ we get $uu'a_i = 0$ for all $i$. This in turn implies that $ua_i \in \mathfrak q$. \end{proof} \begin{lemma} \label{lemma-domains-transcendental-not-quasi-finite} Suppose $R\subset S$ is an inclusion of domains and let $x \in S$. Assume $x$ is (strongly) transcendental over $R$ and that $S$ is finite over $R[x]$. Then $R \to S$ is not quasi-finite at any prime of $S$. \end{lemma} \begin{proof} As a first case, assume that $R$ is normal, see Definition \ref{definition-ring-normal}. By Lemma \ref{lemma-polynomial-ring-normal} we see that $R[x]$ is normal. Take a prime $\mathfrak q \subset S$, and set $\mathfrak p = R \cap \mathfrak q$. Assume that the extension $\kappa(\mathfrak p) \subset \kappa(\mathfrak q)$ is finite. This would be the case if $R \to S$ is quasi-finite at $\mathfrak q$. Let $\mathfrak r = R[x] \cap \mathfrak q$. Then since $\kappa(\mathfrak p) \subset \kappa(\mathfrak r) \subset \kappa(\mathfrak q)$ we see that the extension $\kappa(\mathfrak p) \subset \kappa(\mathfrak r)$ is finite too. Thus the inclusion $\mathfrak r \supset \mathfrak p R[x]$ is strict. By going down for $R[x] \subset S$, see Proposition \ref{proposition-going-down-normal-integral}, we find a prime $\mathfrak q' \subset \mathfrak q$, lying over the prime $\mathfrak pR[x]$. Hence the fibre $\Spec(S \otimes_R \kappa(\mathfrak p))$ contains a point not equal to $\mathfrak q$, namely $\mathfrak q'$, whose closure contains $\mathfrak q$ and hence $\mathfrak q$ is not isolated in its fibre. \medskip\noindent If $R$ is not normal, let $R \subset R' \subset K$ be the integral closure $R'$ of $R$ in its field of fractions $K$. Let $S \subset S' \subset L$ be the subring $S'$ of the field of fractions $L$ of $S$ generated by $R'$ and $S$. Note that by construction the map $S \otimes_R R' \to S'$ is surjective. This implies that $R'[x] \subset S'$ is finite. Also, the map $S \subset S'$ induces a surjection on $\Spec$, see Lemma \ref{lemma-integral-overring-surjective}. We conclude by Lemma \ref{lemma-four-rings} and the normal case we just discussed. \end{proof} \begin{lemma} \label{lemma-reduced-strongly-transcendental-not-quasi-finite} Suppose $R \subset S$ is an inclusion of reduced rings. Assume $x \in S$ is strongly transcendental over $R$, and $S$ finite over $R[x]$. Then $R \to S$ is not quasi-finite at any prime of $S$. \end{lemma} \begin{proof} Let $\mathfrak q \subset S$ be any prime. Choose a minimal prime $\mathfrak q' \subset \mathfrak q$. According to Lemmas \ref{lemma-reduced-strongly-transcendental-minimal-prime} and \ref{lemma-domains-transcendental-not-quasi-finite} the extension $R/(R \cap \mathfrak q') \subset S/\mathfrak q'$ is not quasi-finite at the prime corresponding to $\mathfrak q$. By Lemma \ref{lemma-four-rings} the extension $R \to S$ is not quasi-finite at $\mathfrak q$. \end{proof} \begin{lemma} \label{lemma-quasi-finite-monogenic} Let $R$ be a ring. Let $S = R[x]/I$. Let $\mathfrak q \subset S$ be a prime. Assume $R \to S$ is quasi-finite at $\mathfrak q$. Let $S' \subset S$ be the integral closure of $R$ in $S$. Then there exists an element $g \in S'$, $g \not\in \mathfrak q$ such that $S'_g \cong S_g$. \end{lemma} \begin{proof} Let $\mathfrak p$ be the image of $\mathfrak q$ in $\Spec(R)$. There exists an $f \in I$, $f = a_nx^n + \ldots + a_0$ such that $a_i \not \in \mathfrak p$ for some $i$. Namely, otherwise the fibre ring $S \otimes_R \kappa(\mathfrak p)$ would be $\kappa(\mathfrak p)[x]$ and the map would not be quasi-finite at any prime lying over $\mathfrak p$. We conclude there exists a relation $b_m x^m + \ldots + b_0 = 0$ with $b_j \in S'$, $j = 0, \ldots, m$ and $b_j \not \in \mathfrak q \cap S'$ for some $j$. We prove the lemma by induction on $m$. The base case $m = 0$ is vacuous (because the statements $b_0 = 0$ and $b_0 \not \in \mathfrak q$ are contradictory). \medskip\noindent The case $b_m \not \in \mathfrak q$. In this case $x$ is integral over $S'_{b_m}$, in fact $b_mx \in S'$: Lemma \ref{lemma-make-integral-trivial} makes it integral over $S'$, hence over $R$ by Lemma \ref{lemma-integral-transitive}, so the definition of $S'$ applies. Hence the injective map $S'_{b_m} \to S_{b_m}$ is also surjective, i.e., an isomorphism as desired. \medskip\noindent The case $b_m \in \mathfrak q$. In this case we have $b_mx \in S'$: Lemma \ref{lemma-make-integral-trivial} makes it integral over $S'$, hence over $R$ by Lemma \ref{lemma-integral-transitive}, so the definition of $S'$ applies. Set $b'_{m - 1} = b_mx + b_{m - 1}$. Then $$ b'_{m - 1}x^{m - 1} + b_{m - 2}x^{m - 2} + \ldots + b_0 = 0. $$ Since $b'_{m - 1}$ is congruent to $b_{m - 1}$ modulo $S' \cap \mathfrak q$ we see that it is still the case that one of $b'_{m - 1}, b_{m - 2}, \ldots, b_0$ is not in $S' \cap \mathfrak q$. Thus we win by induction on $m$. \end{proof} \begin{theorem}[Zariski's Main Theorem] \label{theorem-main-theorem} Let $R$ be a ring. Let $S$ be a finite type $R$-algebra. Let $S' \subset S$ be the integral closure of $R$ in $S$. Let $\mathfrak q \subset S$ be a prime of $S$. If $R \to S$ is quasi-finite at $\mathfrak q$ then there exists a $g \in S'$, $g \not \in \mathfrak q$ such that $S'_g \cong S_g$. \end{theorem} \begin{proof} There exist finitely many elements $x_1, \ldots, x_n \in S$ such that $S$ is finite over the $R$-subalgebra generated by $x_1, \ldots, x_n$. (For example, generators of $S$ over $R$.) We prove the theorem by induction on the minimal such number $n$. \medskip\noindent The case $n = 0$ is trivial, because in this case $S' = S$, see Lemma \ref{lemma-finite-is-integral}. \medskip\noindent The case $n = 1$. We may replace $R$ by its integral closure in $S$ (Lemma \ref{lemma-quasi-finite-permanence} guarantees that $R \to S$ is still quasi-finite at $\mathfrak q$). Thus we may assume $R \subset S$ is integrally closed in $S$, in other words $R = S'$. Consider the map $\varphi : R[x] \to S$, $x \mapsto x_1$. (We will see that $\varphi$ is not injective below.) By assumption $\varphi$ is finite. Hence we are in Situation \ref{situation-one-transcendental-element}. Let $J \subset S$ be the ``conductor ideal'' defined in Situation \ref{situation-one-transcendental-element}. Consider the diagram $$ \xymatrix{ R[x] \ar[r] & S \ar[r] & S/\sqrt{J} & R/(R \cap \sqrt{J})[x] \ar[l] \\ & R \ar[lu] \ar[r] \ar[u] & R/(R \cap \sqrt{J}) \ar[u] \ar[ru] & } $$ According to Lemma \ref{lemma-all-coefficients-in-J} the image of $x$ in the quotient $S/\sqrt{J}$ is strongly transcendental over $R/ (R \cap \sqrt{J})$. Hence by Lemma \ref{lemma-reduced-strongly-transcendental-not-quasi-finite} the ring map $R/ (R \cap \sqrt{J}) \to S/\sqrt{J}$ is not quasi-finite at any prime of $S/\sqrt{J}$. By Lemma \ref{lemma-four-rings} we deduce that $\mathfrak q$ does not lie in $V(J) \subset \Spec(S)$. Thus there exists an element $s \in J$, $s \not\in \mathfrak q$. By definition of $J$ we may write $s = \varphi(f)$ for some polynomial $f \in R[x]$. Let $I = \Ker(\varphi : R[x] \to S)$. Since $\varphi(f) \in J$ we get $(R[x]/I)_f \cong S_{\varphi(f)}$. Also $s \not \in \mathfrak q$ means that $f \not \in \varphi^{-1}(\mathfrak q)$. Thus $\varphi^{-1}(\mathfrak q)/I$ is a prime of $R[x]/I$ at which $R \to R[x]/I$ is quasi-finite, see Lemma \ref{lemma-quasi-finite-local}. Note that $R$ is integrally closed in $R[x]/I$ since $R$ is integrally closed in $S$. By Lemma \ref{lemma-quasi-finite-monogenic} there exists an element $h \in R$, $h \not \in R \cap \mathfrak q$ such that $R_h \cong (R[x]/I)_h$. Thus $(R[x]/I)_{fh} = S_{\varphi(fh)}$ is isomorphic to a principal localization $R_{h'}$ of $R$ for some $h' \in R$, $h' \not \in \mathfrak q$. \medskip\noindent The case $n > 1$. Consider the subring $R' \subset S$ which is the integral closure of $R[x_1, \ldots, x_{n-1}]$ in $S$. By Lemma \ref{lemma-quasi-finite-permanence} the extension $S/R'$ is quasi-finite at $\mathfrak q$. Also, note that $S$ is finite over $R'[x_n]$. By the case $n = 1$ above, there exists a $g' \in R'$, $g' \not \in \mathfrak q$ such that $(R')_{g'} \cong S_{g'}$. At this point we cannot apply induction to $R \to R'$ since $R'$ may not be finite type over $R$. Since $S$ is finitely generated over $R$ we deduce in particular that $(R')_{g'}$ is finitely generated over $R$. Say the elements $g'$, and $y_1/(g')^{n_1}, \ldots, y_N/(g')^{n_N}$ with $y_i \in R'$ generate $(R')_{g'}$ over $R$. Let $R''$ be the $R$-subalgebra of $R'$ generated by $x_1, \ldots, x_{n-1}, y_1, \ldots, y_N, g'$. This has the property $(R'')_{g'} \cong S_{g'}$. Surjectivity follows from the choice of the $y_i$; injectivity follows from $R'' \subset R'$ and the exactness of localization. Note that $R''$ is finite over $R[x_1, \ldots, x_{n-1}]$ because of our choice of $R'$, see Lemma \ref{lemma-characterize-integral}. Let $\mathfrak q'' = R'' \cap \mathfrak q$. Since $(R'')_{\mathfrak q''} = S_{\mathfrak q}$ we see that $R \to R''$ is quasi-finite at $\mathfrak q''$, see Lemma \ref{lemma-isolated-point-fibre}. We apply our induction hypothesis to $R \to R''$, $\mathfrak q''$ and $x_1, \ldots, x_{n-1} \in R''$ and we find a subring $R''' \subset R''$ which is integral over $R$ and an element $g'' \in R'''$, $g'' \not \in \mathfrak q''$ such that $(R''')_{g''} \cong (R'')_{g''}$. Write the image of $g'$ in $(R'')_{g''}$ as $g'''/(g'')^n$ for some $g''' \in R'''$. Set $g = g''g''' \in R'''$. Then it is clear that $g \not\in \mathfrak q$ and $(R''')_g \cong S_g$. Since by construction we have $R''' \subset S'$ we also have $S'_g \cong S_g$ as desired. \end{proof} \begin{lemma} \label{lemma-quasi-finite-open} Let $R \to S$ be a finite type ring map. The set of points $\mathfrak q$ of $\Spec(S)$ at which $S/R$ is quasi-finite is open in $\Spec(S)$. \end{lemma} \begin{proof} Let $\mathfrak q \subset S$ be a point at which the ring map is quasi-finite. By Theorem \ref{theorem-main-theorem} there exists an integral ring map $R \to S'$, $S' \subset S$ and an element $g \in S'$, $g\not \in \mathfrak q$ such that $S'_g \cong S_g$. Since $S$ and hence $S_g$ are of finite type over $R$ we may find finitely many elements $y_1, \ldots, y_N$ of $S'$ such that $S''_g \cong S_g$ where $S'' \subset S'$ is the sub $R$-algebra generated by $g, y_1, \ldots, y_N$. Since $S''$ is finite over $R$ (see Lemma \ref{lemma-characterize-integral}) we see that $S''$ is quasi-finite over $R$ (see Lemma \ref{lemma-quasi-finite}). It is easy to see that this implies that $S''_g$ is quasi-finite over $R$, for example because the property of being quasi-finite at a prime depends only on the local ring at the prime. Thus we see that $S_g$ is quasi-finite over $R$. By the same token this implies that $R \to S$ is quasi-finite at every prime of $S$ which lies in $D(g)$. \end{proof} \begin{lemma} \label{lemma-quasi-finite-open-integral-closure} Let $R \to S$ be a finite type ring map. Suppose that $S$ is quasi-finite over $R$. Let $S' \subset S$ be the integral closure of $R$ in $S$. Then \begin{enumerate} \item $\Spec(S) \to \Spec(S')$ is a homeomorphism onto an open subset, \item if $g \in S'$ and $D(g)$ is contained in the image of the map, then $S'_g \cong S_g$, and \item there exists a finite $R$-algebra $S'' \subset S'$ such that (1) and (2) hold for the ring map $S'' \to S$. \end{enumerate} \end{lemma} \begin{proof} Because $S/R$ is quasi-finite we may apply Theorem \ref{theorem-main-theorem} to each point $\mathfrak q$ of $\Spec(S)$. Since $\Spec(S)$ is quasi-compact, see Lemma \ref{lemma-quasi-compact}, we may choose a finite number of $g_i \in S'$, $i = 1, \ldots, n$ such that $S'_{g_i} = S_{g_i}$, and such that $g_1, \ldots, g_n$ generate the unit ideal in $S$ (in other words the standard opens of $\Spec(S)$ associated to $g_1, \ldots, g_n$ cover all of $\Spec(S)$). \medskip\noindent Suppose that $D(g) \subset \Spec(S')$ is contained in the image. Then $D(g) \subset \bigcup D(g_i)$. In other words, $g_1, \ldots, g_n$ generate the unit ideal of $S'_g$. Note that $S'_{gg_i} \cong S_{gg_i}$ by our choice of $g_i$. Hence $S'_g \cong S_g$ by Lemma \ref{lemma-cover}. \medskip\noindent We construct a finite algebra $S'' \subset S'$ as in (3). To do this note that each $S'_{g_i} \cong S_{g_i}$ is a finite type $R$-algebra. For each $i$ pick some elements $y_{ij} \in S'$ such that each $S'_{g_i}$ is generated as $R$-algebra by $1/g_i$ and the elements $y_{ij}$. Then set $S''$ equal to the sub $R$-algebra of $S'$ generated by all $g_i$ and all the $y_{ij}$. Details omitted. \end{proof} \section{Applications of Zariski's Main Theorem} \label{section-apply-main-theorem} % BEGIN ALGEBRA EDITORIAL ROUTE section-apply-main-theorem \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-apply-main-theorem}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-apply-main-theorem \noindent Here is an immediate application characterizing the finite maps of $1$-dimensional semi-local rings among the quasi-finite ones as those where equality always holds in the formula of Lemma \ref{lemma-finite-extension-dim-1}. \begin{lemma} \label{lemma-quasi-finite-extension-dim-1} Let $A \subset B$ be an extension of domains. Assume \begin{enumerate} \item $A$ is a local Noetherian ring of dimension $1$, \item $A \to B$ is of finite type, and \item the induced extension $L/K$ of fraction fields is finite. \end{enumerate} Assume moreover that $B$ is not a field. Then $B$ is semi-local. Let $x \in \mathfrak m_A$, $x \not = 0$. Let $\mathfrak m_i$, $i = 1, \ldots, n$ be the maximal ideals of $B$. Then $$ [L : K]\text{ord}_A(x) \geq \sum\nolimits_i [\kappa(\mathfrak m_i) : \kappa(\mathfrak m_A)] \text{ord}_{B_{\mathfrak m_i}}(x) $$ where $\text{ord}$ is defined as in Definition \ref{definition-ord}. We have equality if and only if $A \to B$ is finite. \end{lemma} \begin{proof} The ring $B$ is semi-local by Lemma \ref{lemma-finite-in-codim-1}. Let $B'$ be the integral closure of $A$ in $B$. By Lemma \ref{lemma-quasi-finite-open-integral-closure} we can find a finite $A$-subalgebra $C \subset B'$ such that on setting $\mathfrak n_i = C \cap \mathfrak m_i$ we have $C_{\mathfrak n_i} \cong B_{\mathfrak m_i}$ and the primes $\mathfrak n_1, \ldots, \mathfrak n_n$ are pairwise distinct. The ring $C$ is semi-local by Lemma \ref{lemma-finite-in-codim-1}. Let $\mathfrak p_j$, $j = 1, \ldots, m$ be the other maximal ideals of $C$ (the ``missing points''). By Lemma \ref{lemma-finite-extension-dim-1} we have $$ \text{ord}_A(x^{[L : K]}) = \sum\nolimits_i [\kappa(\mathfrak n_i) : \kappa(\mathfrak m_A)] \text{ord}_{C_{\mathfrak n_i}}(x) + \sum\nolimits_j [\kappa(\mathfrak p_j) : \kappa(\mathfrak m_A)] \text{ord}_{C_{\mathfrak p_j}}(x) $$ hence the inequality follows. In case of equality we conclude that $m = 0$ (no ``missing points''). Hence $C \subset B$ is an inclusion of semi-local rings inducing a bijection on maximal ideals and an isomorphism on all localizations at maximal ideals. So if $b \in B$, then $I = \{x \in C \mid xb \in C\}$ is an ideal of $C$ which is not contained in any of the maximal ideals of $C$, and hence $I = C$, hence $b \in C$. Thus $B = C$ and $B$ is finite over $A$. \end{proof} \noindent Here is a more standard application of Zariski's main theorem to the structure of local homomorphisms of local rings. \begin{lemma} \label{lemma-essentially-finite-type-fibre-dim-zero} Let $(R, \mathfrak m_R) \to (S, \mathfrak m_S)$ be a local homomorphism of local rings. Assume \begin{enumerate} \item $R \to S$ is essentially of finite type, \item $\kappa(\mathfrak m_R) \subset \kappa(\mathfrak m_S)$ is finite, and \item $\dim(S/\mathfrak m_RS) = 0$. \end{enumerate} Then $S$ is the localization of a finite $R$-algebra. \end{lemma} \begin{proof} Let $S'$ be a finite type $R$-algebra such that $S = S'_{\mathfrak q'}$ for some prime $\mathfrak q'$ of $S'$. By Definition \ref{definition-quasi-finite} we see that $R \to S'$ is quasi-finite at $\mathfrak q'$. After replacing $S'$ by $S'_{g'}$ for some $g' \in S'$, $g' \not \in \mathfrak q'$ we may assume that $R \to S'$ is quasi-finite, see Lemma \ref{lemma-quasi-finite-open}. Then by Lemma \ref{lemma-quasi-finite-open-integral-closure} there exists a finite $R$-algebra $S''$ and elements $g' \in S'$, $g' \not \in \mathfrak q'$ and $g'' \in S''$ such that $S'_{g'} \cong S''_{g''}$ as $R$-algebras. This proves the lemma. \end{proof} \begin{lemma} \label{lemma-completion-at-quasi-finite-prime} Let $R \to S$ be a ring map, $\mathfrak q$ a prime of $S$ lying over $\mathfrak p$ in $R$. If \begin{enumerate} \item $R$ is Noetherian, \item $R \to S$ is of finite type, and \item $R \to S$ is quasi-finite at $\mathfrak q$, \end{enumerate} then $R_\mathfrak p^\wedge \otimes_R S = S_\mathfrak q^\wedge \times B$ for some $R_\mathfrak p^\wedge$-algebra $B$. \end{lemma} \begin{proof} There exists a finite $R$-algebra $S' \subset S$ and an element $g \in S'$, $g \not \in \mathfrak q' = S' \cap \mathfrak q$ such that $S'_g = S_g$ and in particular $S'_{\mathfrak q'} = S_\mathfrak q$, see Lemma \ref{lemma-quasi-finite-open-integral-closure}. We have $$ R_\mathfrak p^\wedge \otimes_R S' = (S'_{\mathfrak q'})^\wedge \times B' $$ by Lemma \ref{lemma-completion-finite-extension}. Observe that under this product decomposition $g$ maps to a pair $(u, b')$ with $u \in (S'_{\mathfrak q'})^\wedge$ a unit because $g \not \in \mathfrak q'$. The product decomposition for $R_\mathfrak p^\wedge \otimes_R S'$ induces a product decomposition $$ R_\mathfrak p^\wedge \otimes_R S = A \times B. $$ Since $S'_g = S_g$ we also have $(R_\mathfrak p^\wedge \otimes_R S')_g = (R_\mathfrak p^\wedge \otimes_R S)_g$ and since $g \mapsto (u, b')$ where $u$ is a unit we see that $(S'_{\mathfrak q'})^\wedge = A$. Since the isomorphism $S'_{\mathfrak q'} = S_\mathfrak q$ determines an isomorphism on completions this also tells us that $A = S_\mathfrak q^\wedge$. This finishes the proof, except that we should perform the sanity check that the induced map $\phi : R_\mathfrak p^\wedge \otimes_R S \to A = S_\mathfrak q^\wedge$ is the natural one. For elements of the form $x \otimes 1$ with $x \in R_\mathfrak p^\wedge$ this is clear as the natural map $R_\mathfrak p^\wedge \to S_\mathfrak q^\wedge$ factors through $(S'_{\mathfrak q'})^\wedge$. For elements of the form $1 \otimes y$ with $y \in S$ we can argue that for some $n \geq 1$ the element $g^ny$ is the image of some $y' \in S'$. Thus $\phi(1 \otimes g^ny)$ is the image of $y'$ under the composition $S' \to (S'_{\mathfrak q'})^\wedge \to S_\mathfrak q^\wedge$ which is equal to the image of $g^ny$ by the map $S \to S_\mathfrak q^\wedge$. Since $g$ maps to a unit this also implies that $\phi(1 \otimes y)$ has the correct value, i.e., the image of $y$ by $S \to S_\mathfrak q^\wedge$. \end{proof} \section{Dimension of fibres} \label{section-dimension-fibres} % BEGIN ALGEBRA EDITORIAL ROUTE section-dimension-fibres \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-dimension-fibres}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-dimension-fibres \noindent We study the behaviour of dimensions of fibres, using Zariski's main theorem. Recall that we defined the dimension $\dim_x(X)$ of a topological space $X$ at a point $x$ in Topology, Definition \ref{topology-definition-Krull}. \begin{definition} \label{definition-relative-dimension} Suppose that $R \to S$ is of finite type, and let $\mathfrak q \subset S$ be a prime lying over a prime $\mathfrak p$ of $R$. We define the {\it relative dimension of $S/R$ at $\mathfrak q$}, denoted $\dim_{\mathfrak q}(S/R)$, to be the dimension of $\Spec(S \otimes_R \kappa(\mathfrak p))$ at the point corresponding to $\mathfrak q$. We let $\dim(S/R)$ be the supremum of $\dim_{\mathfrak q}(S/R)$ over all $\mathfrak q$. This is called the {\it relative dimension of} $S/R$. \end{definition} \noindent In particular, $R \to S$ is quasi-finite at $\mathfrak q$ if and only if $\dim_{\mathfrak q}(S/R) = 0$. The following lemma is more or less a reformulation of Zariski's Main Theorem. \begin{lemma} \label{lemma-quasi-finite-over-polynomial-algebra} Let $R \to S$ be a finite type ring map. Let $\mathfrak q \subset S$ be a prime. Let $\mathfrak p \subset R$ be the inverse image of $\mathfrak q$. Suppose that $\dim_{\mathfrak q}(S/R) = n$. There exists a $g \in S$, $g \not\in \mathfrak q$ such that $S_g$ is quasi-finite over a polynomial algebra $R[t_1, \ldots, t_n]$. \end{lemma} \begin{proof} The ring $\overline{S} = S \otimes_R \kappa(\mathfrak p)$ is of finite type over $\kappa(\mathfrak p)$. Let $\overline{\mathfrak q}$ be the prime of $\overline{S}$ corresponding to $\mathfrak q$. By definition of the dimension of a topological space at a point there exists an open $U \subset \Spec(\overline{S})$ with $\overline{\mathfrak q} \in U$ and $\dim(U) = n$. Since the topology on $\Spec(\overline{S})$ is induced from the topology on $\Spec(S)$ (see Remark \ref{remark-fundamental-diagram}), we can find a $g \in S$, $g \not \in \mathfrak q$ with image $\overline{g} \in \overline{S}$ such that $D(\overline{g}) \subset U$. Thus after replacing $S$ by $S_g$ we see that $\dim(\overline{S}) = n$. \medskip\noindent Next, choose generators $x_1, \ldots, x_N$ for $S$ as an $R$-algebra. By Lemma \ref{lemma-Noether-normalization} there exist elements $y_1, \ldots, y_n$ in the $\mathbf{Z}$-subalgebra of $S$ generated by $x_1, \ldots, x_N$ such that the map $R[t_1, \ldots, t_n] \to S$, $t_i \mapsto y_i$ has the property that $\kappa(\mathfrak p)[t_1, \ldots, t_n] \to \overline{S}$ is finite. In particular, $S$ is quasi-finite over $R[t_1, \ldots, t_n]$ at $\mathfrak q$. Hence, by Lemma \ref{lemma-quasi-finite-open} we may replace $S$ by $S_g$ for some $g\in S$, $g \not \in \mathfrak q$ such that $R[t_1, \ldots, t_n] \to S$ is quasi-finite. \end{proof} \begin{lemma} \label{lemma-refined-quasi-finite-over-polynomial-algebra} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$ of $R$. Assume \begin{enumerate} \item $R \to S$ is of finite type, \item $\dim_{\mathfrak q}(S/R) = n$, and \item $\text{trdeg}_{\kappa(\mathfrak p)}\kappa(\mathfrak q) = r$. \end{enumerate} Then there exist $f \in R$, $f \not \in \mathfrak p$, $g \in S$, $g \not\in \mathfrak q$ and a quasi-finite ring map $$ \varphi : R_f[x_1, \ldots, x_n] \longrightarrow S_g $$ such that $\varphi^{-1}(\mathfrak qS_g) = (\mathfrak p, x_{r + 1}, \ldots, x_n)R_f[x_1, \ldots, x_n]$. \end{lemma} \begin{proof} After replacing $S$ by a principal localization we may assume there exists a quasi-finite ring map $\varphi : R[t_1, \ldots, t_n] \to S$, see Lemma \ref{lemma-quasi-finite-over-polynomial-algebra}. Set $\mathfrak q' = \varphi^{-1}(\mathfrak q)$. Let $\overline{\mathfrak q}' \subset \kappa(\mathfrak p)[t_1, \ldots, t_n]$ be the prime corresponding to $\mathfrak q'$. By Lemma \ref{lemma-refined-Noether-normalization} there exists a finite ring map $\kappa(\mathfrak p)[x_1, \ldots, x_n] \to \kappa(\mathfrak p)[t_1, \ldots, t_n]$ such that the inverse image of $\overline{\mathfrak q}'$ is $(x_{r + 1}, \ldots, x_n)$. Let $\overline{h}_i \in \kappa(\mathfrak p)[t_1, \ldots, t_n]$ be the image of $x_i$. We can find an element $f \in R$, $f \not \in \mathfrak p$ and $h_i \in R_f[t_1, \ldots, t_n]$ which map to $\overline{h}_i$ in $\kappa(\mathfrak p)[t_1, \ldots, t_n]$. Then the ring map $$ R_f[x_1, \ldots, x_n] \longrightarrow R_f[t_1, \ldots, t_n] $$ becomes finite after tensoring with $\kappa(\mathfrak p)$. In particular, $R_f[t_1, \ldots, t_n]$ is quasi-finite over $R_f[x_1, \ldots, x_n]$ at the prime $\mathfrak q'R_f[t_1, \ldots, t_n]$. Hence, by Lemma \ref{lemma-quasi-finite-open} there exists a $g \in R_f[t_1, \ldots, t_n]$, $g \not \in \mathfrak q'R_f[t_1, \ldots, t_n]$ such that $R_f[x_1, \ldots, x_n] \to R_f[t_1, \ldots, t_n, 1/g]$ is quasi-finite. Thus we see that the composition $$ R_f[x_1, \ldots, x_n] \longrightarrow R_f[t_1, \ldots, t_n, 1/g] \longrightarrow S_{\varphi(g)} $$ is quasi-finite and we win. \end{proof} \begin{lemma} \label{lemma-dimension-inequality-quasi-finite} Let $R \to S$ be a finite type ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. If $R \to S$ is quasi-finite at $\mathfrak q$, then $\dim(S_{\mathfrak q}) \leq \dim(R_{\mathfrak p})$. \end{lemma} \begin{proof} If $R_{\mathfrak p}$ is Noetherian (and hence $S_{\mathfrak q}$ Noetherian since it is essentially of finite type over $R_{\mathfrak p}$) then this follows immediately from Lemma \ref{lemma-dimension-base-fibre-total} and the definitions. In the general case, let $S'$ be the integral closure of $R_\mathfrak p$ in $S_\mathfrak p$. By Zariski's Main Theorem \ref{theorem-main-theorem} we have $S_{\mathfrak q} = S'_{\mathfrak q'}$, where $\mathfrak q' = S' \cap \mathfrak qS_{\mathfrak p}$. By Lemma \ref{lemma-integral-dim-up} we have $\dim(S') \leq \dim(R_\mathfrak p)$ and hence a fortiori $\dim(S_\mathfrak q) = \dim(S'_{\mathfrak q'}) \leq \dim(R_\mathfrak p)$. \end{proof} \begin{lemma} \label{lemma-dimension-quasi-finite-over-polynomial-algebra} \begin{slogan} A quasi-finite cover of affine n-space has dimension at most n. \end{slogan} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Suppose there is a quasi-finite $k$-algebra map $k[t_1, \ldots, t_n] \to S$. Then $\dim(S) \leq n$. \end{lemma} \begin{proof} By Lemma \ref{lemma-dim-affine-space} the dimension of any local ring of $k[t_1, \ldots, t_n]$ is at most $n$. Thus the result follows from Lemma \ref{lemma-dimension-inequality-quasi-finite}. \end{proof} \begin{lemma} \label{lemma-dimension-fibres-bounded-open-upstairs} Let $R \to S$ be a finite type ring map. Let $\mathfrak q \subset S$ be a prime. Suppose that $\dim_{\mathfrak q}(S/R) = n$. There exists an open neighbourhood $V$ of $\mathfrak q$ in $\Spec(S)$ such that $\dim_{\mathfrak q'}(S/R) \leq n$ for all $\mathfrak q' \in V$. \end{lemma} \begin{proof} By Lemma \ref{lemma-quasi-finite-over-polynomial-algebra} we see that we may assume that $S$ is quasi-finite over a polynomial algebra $R[t_1, \ldots, t_n]$. Considering the fibres, we reduce to Lemma \ref{lemma-dimension-quasi-finite-over-polynomial-algebra}. \end{proof} \noindent In other words, the lemma says that the set of points where the fibre has dimension $\leq n$ is open in $\Spec(S)$. The next lemma says that formation of this open commutes with base change. If the ring map is of finite presentation then this set is quasi-compact open (see below). \begin{lemma} \label{lemma-dimension-fibres-bounded-open-upstairs-base-change} Let $R \to S$ be a finite type ring map. Let $R \to R'$ be any ring map. Set $S' = R' \otimes_R S$ and denote by $f : \Spec(S') \to \Spec(S)$ the associated map on spectra. Let $n \geq 0$. The inverse image $f^{-1}(\{\mathfrak q \in \Spec(S) \mid \dim_{\mathfrak q}(S/R) \leq n\})$ is equal to $\{\mathfrak q' \in \Spec(S') \mid \dim_{\mathfrak q'}(S'/R') \leq n\}$. \end{lemma} \begin{proof} The condition is formulated in terms of dimensions of fibre rings which are of finite type over a field. Combined with Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension} this yields the lemma. \end{proof} \begin{lemma} \label{lemma-dimension-fibres-bounded-quasi-compact-open-upstairs} Let $R \to S$ be a ring homomorphism of finite presentation. Let $n \geq 0$. The set $$ V_n = \{\mathfrak q \in \Spec(S) \mid \dim_{\mathfrak q}(S/R) \leq n\} $$ is a quasi-compact open subset of $\Spec(S)$. \end{lemma} \begin{proof} It is open by Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs}. Let $S = R[x_1, \ldots, x_N]/(f_1, \ldots, f_m)$ be a presentation of $S$. Let $R_0$ be the $\mathbf{Z}$-subalgebra of $R$ generated by the coefficients of the polynomials $f_i$. Let $S_0 = R_0[x_1, \ldots, x_N]/(f_1, \ldots, f_m)$. Then $S = R \otimes_{R_0} S_0$. By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs-base-change} $V_n$ is the inverse image of an open $V_{0, n}$ under the quasi-compact continuous map $\Spec(S) \to \Spec(S_0)$. Since $S_0$ is Noetherian we see that $V_{0, n}$ is quasi-compact. \end{proof} \begin{lemma} \label{lemma-finite-type-domain-over-valuation-ring-dim-fibres} Let $R$ be a valuation ring with residue field $k$ and field of fractions $K$. Let $S$ be a domain containing $R$ such that $S$ is of finite type over $R$. If $S \otimes_R k$ is not the zero ring then $$ \dim(S \otimes_R k) = \dim(S \otimes_R K). $$ In fact, $\Spec(S \otimes_R k)$ is equidimensional. \end{lemma} \begin{proof} It suffices to show that $\dim_{\mathfrak q}(S/R)$ is equal to $\dim(S \otimes_R K)$ for every prime $\mathfrak q$ of $S$ containing $\mathfrak m_RS$. Pick such a prime. By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} the inequality $\dim_{\mathfrak q}(S/R) \geq \dim(S \otimes_R K)$ holds. Set $n = \dim_{\mathfrak q}(S/R)$. By Lemma \ref{lemma-quasi-finite-over-polynomial-algebra} after replacing $S$ by $S_g$ for some $g \in S$, $g \not \in \mathfrak q$ there exists a quasi-finite ring map $R[t_1, \ldots, t_n] \to S$. If $\dim(S \otimes_R K) < n$, then $K[t_1, \ldots, t_n] \to S \otimes_R K$ has a nonzero kernel. Say $f = \sum a_I t_1^{i_1}\ldots t_n^{i_n}$. After dividing $f$ by a nonzero coefficient of $f$ with minimal valuation, we may assume $f\in R[t_1, \ldots, t_n]$ and some $a_I$ does not map to zero in $k$. Hence the ring map $k[t_1, \ldots, t_n] \to S \otimes_R k$ has a nonzero kernel which implies that $\dim(S \otimes_R k) < n$. Contradiction. \end{proof} \section{Algebras and modules of finite presentation} \label{section-finite-presentation} % BEGIN ALGEBRA EDITORIAL ROUTE section-finite-presentation \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-finite-presentation}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-finite-presentation \noindent In this section we discuss some standard results where the key feature is that the assumption involves a finite type or finite presentation assumption. \begin{lemma} \label{lemma-finite-type-descends} Let $R \to S$ be a ring map. Let $R \to R'$ be a faithfully flat ring map. Set $S' = R'\otimes_R S$. Then $R \to S$ is of finite type if and only if $R' \to S'$ is of finite type. \end{lemma} \begin{proof} It is clear that if $R \to S$ is of finite type then $R' \to S'$ is of finite type. Assume that $R' \to S'$ is of finite type. Say $y_1, \ldots, y_m$ generate $S'$ over $R'$. Write $y_j = \sum_i a_{ij} \otimes x_{ji}$ for some $a_{ij} \in R'$ and $x_{ji} \in S$. Let $A \subset S$ be the $R$-subalgebra generated by the $x_{ji}$. By flatness we have $A' := R' \otimes_R A \subset S'$, and by construction $y_j \in A'$. Hence $A' = S'$. By faithful flatness $A = S$. \end{proof} \begin{lemma} \label{lemma-finite-presentation-descends} Let $R \to S$ be a ring map. Let $R \to R'$ be a faithfully flat ring map. Set $S' = R'\otimes_R S$. Then $R \to S$ is of finite presentation if and only if $R' \to S'$ is of finite presentation. \end{lemma} \begin{proof} It is clear that if $R \to S$ is of finite presentation then $R' \to S'$ is of finite presentation. Assume that $R' \to S'$ is of finite presentation. By Lemma \ref{lemma-finite-type-descends} we see that $R \to S$ is of finite type. Write $S = R[x_1, \ldots, x_n]/I$. By flatness $S' = R'[x_1, \ldots, x_n]/R'\otimes I$. Say $g_1, \ldots, g_m$ generate $R'\otimes I$ over $R'[x_1, \ldots, x_n]$. Write $g_j = \sum_i a_{ij} \otimes f_{ji}$ for some $a_{ij} \in R'$ and $f_{ji} \in I$. Let $J \subset I$ be the ideal generated by the $f_{ji}$. By flatness we have $R' \otimes_R J \subset R'\otimes_R I$, and both are ideals over $R'[x_1, \ldots, x_n]$. By construction $g_j \in R' \otimes_R J$. Hence $R' \otimes_R J = R'\otimes_R I$. By faithful flatness $J = I$. \end{proof} \begin{lemma} \label{lemma-construct-fp-module} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $S \subset R$ be a multiplicative subset. Set $R' = S^{-1}(R/I) = S^{-1}R/S^{-1}I$. \begin{enumerate} \item For any finite $R'$-module $M'$ there exists a finite $R$-module $M$ such that $S^{-1}(M/IM) \cong M'$. \item For any finitely presented $R'$-module $M'$ there exists a finitely presented $R$-module $M$ such that $S^{-1}(M/IM) \cong M'$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Choose a short exact sequence $0 \to K' \to (R')^{\oplus n} \to M' \to 0$. Let $K \subset R^{\oplus n}$ be the inverse image of $K'$ under the map $R^{\oplus n} \to (R')^{\oplus n}$. Then $M = R^{\oplus n}/K$ works. \medskip\noindent Proof of (2). Choose a presentation $(R')^{\oplus m} \to (R')^{\oplus n} \to M' \to 0$. Suppose that the first map is given by the matrix $A' = (a'_{ij})$ and the second map is determined by generators $x'_i \in M'$, $i = 1, \ldots, n$. As $R' = S^{-1}(R/I)$ we can choose $s \in S$ and a matrix $A = (a_{ij})$ with coefficients in $R$ such that $a'_{ij} = a_{ij} / s \bmod S^{-1}I$. Let $M$ be the finitely presented $R$-module with presentation $R^{\oplus m} \to R^{\oplus n} \to M \to 0$ where the first map is given by the matrix $A$ and the second map is determined by generators $x_i \in M$, $i = 1, \ldots, n$. Then the map $M \to M'$, $x_i \mapsto x'_i$ induces an isomorphism $S^{-1}(M/IM) \cong M'$. \end{proof} \begin{lemma} \label{lemma-construct-fp-module-from-localization} Let $R$ be a ring. Let $S \subset R$ be a multiplicative subset. Let $M$ be an $R$-module. \begin{enumerate} \item If $S^{-1}M$ is a finite $S^{-1}R$-module then there exists a finite $R$-module $M'$ and a map $M' \to M$ which induces an isomorphism $S^{-1}M' \to S^{-1}M$. \item If $S^{-1}M$ is a finitely presented $S^{-1}R$-module then there exists an $R$-module $M'$ of finite presentation and a map $M' \to M$ which induces an isomorphism $S^{-1}M' \to S^{-1}M$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1). Let $x_1, \ldots, x_n \in M$ be elements which generate $S^{-1}M$ as an $S^{-1}R$-module. Let $M'$ be the $R$-submodule of $M$ generated by $x_1, \ldots, x_n$. \medskip\noindent Proof of (2). Let $x_1, \ldots, x_n \in M$ be elements which generate $S^{-1}M$ as an $S^{-1}R$-module. Let $K = \Ker(R^{\oplus n} \to M)$ where the map is given by the rule $(a_1, \ldots, a_n) \mapsto \sum a_i x_i$. By Lemma \ref{lemma-extension} we see that $S^{-1}K$ is a finite $S^{-1}R$-module. By (1) we can find a finite submodule $K' \subset K$ with $S^{-1}K' = S^{-1}K$. Take $M' = \Coker(K' \to R^{\oplus n})$. \end{proof} \begin{lemma} \label{lemma-construct-fp-module-from-stalk} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime ideal. Let $M$ be an $R$-module. \begin{enumerate} \item If $M_{\mathfrak p}$ is a finite $R_{\mathfrak p}$-module then there exists a finite $R$-module $M'$ and a map $M' \to M$ which induces an isomorphism $M'_{\mathfrak p} \to M_{\mathfrak p}$. \item If $M_{\mathfrak p}$ is a finitely presented $R_{\mathfrak p}$-module then there exists an $R$-module $M'$ of finite presentation and a map $M' \to M$ which induces an isomorphism $M'_{\mathfrak p} \to M_{\mathfrak p}$. \end{enumerate} \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-construct-fp-module-from-localization}. \end{proof} \begin{lemma} \label{lemma-local-isomorphism} Let $\varphi : R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. Assume \begin{enumerate} \item $S$ is of finite presentation over $R$, \item $\varphi$ induces an isomorphism $R_\mathfrak p \cong S_\mathfrak q$. \end{enumerate} Then there exist $f \in R$, $f \not \in \mathfrak p$ and an $R_f$-algebra $C$ such that $S_f \cong R_f \times C$ as $R_f$-algebras. \end{lemma} \begin{proof} Write $S = R[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$. Let $a_i \in R_\mathfrak p$ be an element mapping to the image of $x_i$ in $S_\mathfrak q$. Write $a_i = b_i/f$ for some $f \in R$, $f \not \in \mathfrak p$. After replacing $R$ by $R_f$ and $x_i$ by $x_i - a_i$ we may assume that $S = R[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$ such that $x_i$ maps to zero in $S_\mathfrak q$. Then if $c_j$ denotes the constant term of $g_j$ we conclude that $c_j$ maps to zero in $R_\mathfrak p$. After another replacement of $R$ we may assume that the constant coefficients $c_j$ of the $g_j$ are zero. Thus we obtain an $R$-algebra map $S \to R$, $x_i \mapsto 0$ whose kernel is the ideal $(x_1, \ldots, x_n)$. \medskip\noindent We have the isomorphisms $R_\mathfrak p \to S_\mathfrak q \to R_\mathfrak p$ and $S \to R$ sends $x_i$ to zero. Thus we must have $S_\mathfrak q = R_\mathfrak p[x_1, \ldots, x_n]/(x_1, \ldots, x_n)$ and a fortiori $S_\mathfrak q = S_\mathfrak p/(x_1, \ldots, x_n)S_\mathfrak p$. This means that the finitely generated ideal $(x_1, \ldots, x_n)S_\mathfrak p$ is pure in $S_\mathfrak p$, see Definition \ref{definition-pure-ideal}. Hence $(x_1, \ldots, x_n)S_\mathfrak p$ is generated by an idempotent $e$ in $S_\mathfrak p$ by Lemma \ref{lemma-finitely-generated-pure-ideal}. After replacing $R \to S$ by $R_f \to S_f$ for some $f \in R$, $f \not \in \mathfrak p$ we can find an idempotent $e' \in S$ mapping to $e$. Then $e'S$ and $(x_1, \ldots, x_n)S$ are finitely generated ideals which become equal in $S_\mathfrak p$. Hence after replacing $R \to S$ by $R_f \to S_f$ for some $f \in R$, $f \not \in \mathfrak p$ we may assume $e'S = (x_1, \ldots, x_n)S$. Setting $C = e'S$ finishes the proof. \end{proof} \begin{lemma} \label{lemma-isomorphic-local-rings} Let $R$ be a ring. Let $S$, $S'$ be of finite presentation over $R$. Let $\mathfrak q \subset S$ and $\mathfrak q' \subset S'$ be primes. If $S_{\mathfrak q} \cong S'_{\mathfrak q'}$ as $R$-algebras, then there exist $g \in S$, $g \not \in \mathfrak q$ and $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S_g \cong S'_{g'}$ as $R$-algebras. \end{lemma} \begin{proof} Let $\psi : S_{\mathfrak q} \to S'_{\mathfrak q'}$ be the isomorphism of the hypothesis of the lemma. Write $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_r)$ and $S' = R[y_1, \ldots, y_m]/J$. For each $i = 1, \ldots, n$ choose a fraction $h_i/g_i$ with $h_i, g_i \in R[y_1, \ldots, y_m]$ and $g_i \bmod J$ not in $\mathfrak q'$ which represents the image of $x_i$ under $\psi$. After replacing $S'$ by $S'_{g_1 \ldots g_n}$ and $R[y_1, \ldots, y_m]$ by $R[y_1, \ldots, y_m, y_{m + 1}]$ (mapping $y_{m + 1}$ to $1/(g_1\ldots g_n)$) we may assume that $\psi(x_i)$ is the image of some $h_i \in R[y_1, \ldots, y_m]$. Consider the elements $f_j(h_1, \ldots, h_n) \in R[y_1, \ldots, y_m]$. Since $\psi$ kills each $f_j$ we see that there exists a $g \in R[y_1, \ldots, y_m]$, $g \bmod J \not \in \mathfrak q'$ such that $g f_j(h_1, \ldots, h_n) \in J$ for each $j = 1, \ldots, r$. After replacing $S'$ by $S'_g$ and $R[y_1, \ldots, y_m]$ by $R[y_1, \ldots, y_m, y_{m + 1}]$ as before we may assume that $f_j(h_1, \ldots, h_n) \in J$. Thus we obtain a ring map $S \to S'$, $x_i \mapsto h_i$ which induces $\psi$ on local rings. By Lemma \ref{lemma-compose-finite-type} the map $S \to S'$ is of finite presentation. By Lemma \ref{lemma-local-isomorphism} we may assume that $S' = S \times C$. Thus localizing $S'$ at the idempotent corresponding to the factor $S$ we obtain the result. \end{proof} \begin{lemma} \label{lemma-finite-type-mod-nilpotent} Let $R$ be a ring. Let $I \subset R$ be a nilpotent ideal. Let $S$ be an $R$-algebra such that $R/I \to S/IS$ is of finite type. Then $R \to S$ is of finite type. \end{lemma} \begin{proof} Choose $s_1, \ldots, s_n \in S$ whose images in $S/IS$ generate $S/IS$ as an algebra over $R/I$. By Lemma \ref{lemma-NAK} part (11) we see that the $R$-algebra map $R[x_1, \ldots, x_n] \to S$, $x_i \mapsto s_i$ is surjective and we conclude. \end{proof} \begin{lemma} \label{lemma-surjective-mod-locally-nilpotent} Let $R$ be a ring. Let $I \subset R$ be a locally nilpotent ideal. Let $S \to S'$ be an $R$-algebra map such that $S \to S'/IS'$ is surjective and such that $S'$ is of finite type over $R$. Then $S \to S'$ is surjective. \end{lemma} \begin{proof} Write $S' = R[x_1, \ldots, x_m]/K$ for some ideal $K$. By assumption there exist $g_j = x_j + \sum \delta_{j, J} x^J \in R[x_1, \ldots, x_m]$ with $\delta_{j, J} \in I$ and with $g_j \bmod K \in \Im(S \to S')$. Hence it suffices to show that $g_1, \ldots, g_m$ generate $R[x_1, \ldots, x_m]$. Let $R_0 \subset R$ be a finitely generated $\mathbf{Z}$-subalgebra of $R$ containing at least the $\delta_{j, J}$. Then $R_0 \cap I$ is a nilpotent ideal (by Lemma \ref{lemma-Noetherian-power}). It follows that $R_0[x_1, \ldots, x_m]$ is generated by $g_1, \ldots, g_m$ (because $x_j \mapsto g_j$ defines an automorphism of $R_0[x_1, \ldots, x_m]$; details omitted). Since $R$ is the union of the subrings $R_0$ we win. \end{proof} \begin{lemma} \label{lemma-isomorphism-modulo-ideal} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $S \to S'$ be an $R$-algebra map. Let $IS \subset \mathfrak q \subset S$ be a prime ideal. Assume that \begin{enumerate} \item $S \to S'$ is surjective, \item $S_\mathfrak q/IS_\mathfrak q \to S'_\mathfrak q/IS'_\mathfrak q$ is an isomorphism, \item $S$ is of finite type over $R$, \item $S'$ is of finite presentation over $R$, and \item $S'_\mathfrak q$ is flat over $R$. \end{enumerate} Then $S_g \to S'_g$ is an isomorphism for some $g \in S$, $g \not \in \mathfrak q$. \end{lemma} \begin{proof} Let $J = \Ker(S \to S')$. By Lemma \ref{lemma-compose-finite-type} $J$ is a finitely generated ideal. Since $S'_\mathfrak q$ is flat over $R$ we see that $J_\mathfrak q/IJ_\mathfrak q \subset S_\mathfrak q/IS_{\mathfrak q}$ (apply Lemma \ref{lemma-flat-tor-zero} to $0 \to J \to S \to S' \to 0$). By assumption (2) we see that $J_\mathfrak q/IJ_\mathfrak q$ is zero. By Nakayama's lemma (Lemma \ref{lemma-NAK}) we see that there exists a $g \in S$, $g \not \in \mathfrak q$ such that $J_g = 0$. Hence $S_g \cong S'_g$ as desired. \end{proof} \begin{lemma} \label{lemma-isomorphism-modulo-locally-nilpotent} Let $R$ be a ring. Let $I \subset R$ be an ideal. Let $S \to S'$ be an $R$-algebra map. Assume that \begin{enumerate} \item $I$ is locally nilpotent, \item $S/IS \to S'/IS'$ is an isomorphism, \item $S$ is of finite type over $R$, \item $S'$ is of finite presentation over $R$, and \item $S'$ is flat over $R$. \end{enumerate} Then $S \to S'$ is an isomorphism. \end{lemma} \begin{proof} By Lemma \ref{lemma-surjective-mod-locally-nilpotent} the map $S \to S'$ is surjective. As $I$ is locally nilpotent, so are the ideals $IS$ and $IS'$ (Lemma \ref{lemma-locally-nilpotent}). Hence every prime ideal $\mathfrak q$ of $S$ contains $IS$ and (trivially) $S_\mathfrak q/IS_\mathfrak q \cong S'_\mathfrak q/IS'_\mathfrak q$. Thus Lemma \ref{lemma-isomorphism-modulo-ideal} applies and we see that $S_\mathfrak q \to S'_\mathfrak q$ is an isomorphism for every prime $\mathfrak q \subset S$. It follows that $S \to S'$ is injective for example by Lemma \ref{lemma-characterize-zero-local}. \end{proof} \section{Colimits and maps of finite presentation} \label{section-colimits-flat} % BEGIN ALGEBRA EDITORIAL ROUTE section-colimits-flat \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-colimits-flat}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-colimits-flat \noindent In this section we prove some preliminary lemmas which will eventually help us prove results using absolute Noetherian reduction. In Categories, Section \ref{categories-section-directed-colimits} we discuss filtered colimits in general. Here is an example of this very general notion. \begin{lemma} \label{lemma-ring-colimit-fp-category} Let $R \to A$ be a ring map. Consider the category $\mathcal{I}$ of all diagrams of $R$-algebra maps $A' \to A$ with $A'$ finitely presented over $R$. Then $\mathcal{I}$ is filtered, and the colimit of the $A'$ over $\mathcal{I}$ is isomorphic to $A$. \end{lemma} \begin{proof} The category\footnote{To avoid set theoretical difficulties we consider only $A' \to A$ such that $A'$ is a quotient of $R[x_1, x_2, x_3, \ldots]$.} $\mathcal{I}$ is nonempty as $R \to A$ is an object of it. Consider a pair of objects $A' \to A$, $A'' \to A$ of $\mathcal{I}$. Then $A' \otimes_R A'' \to A$ is in $\mathcal{I}$ (use Lemmas \ref{lemma-compose-finite-type} and \ref{lemma-base-change-finiteness}). The ring maps $A' \to A' \otimes_R A''$ and $A'' \to A' \otimes_R A''$ define arrows in $\mathcal{I}$ thereby proving the second defining property of a filtered category, see Categories, Definition \ref{categories-definition-directed}. Finally, suppose that we have two morphisms $\sigma, \tau : A' \to A''$ in $\mathcal{I}$. If $x_1, \ldots, x_r \in A'$ are generators of $A'$ as an $R$-algebra, then we can consider $A''' = A''/(\sigma(x_i) - \tau(x_i))$. This is a finitely presented $R$-algebra and the given $R$-algebra map $A'' \to A$ factors through the surjection $\nu : A'' \to A'''$. Thus $\nu$ is a morphism in $\mathcal{I}$ equalizing $\sigma$ and $\tau$ as desired. \medskip\noindent The fact that our index category is filtered means that we may compute the value of $B = \colim_{A' \to A} A'$ in the category of sets (some details omitted; compare with the discussion in Categories, Section \ref{categories-section-directed-colimits}). To see that $B \to A$ is surjective, for every $a \in A$ we can use $R[x] \to A$, $x \mapsto a$ to see that $a$ is in the image of $B \to A$. Conversely, if $b \in B$ is mapped to zero in $A$, then we can find $A' \to A$ in $\mathcal{I}$ and $a' \in A'$ which maps to $b$. Then $A'/(a') \to A$ is in $\mathcal{I}$ as well and the map $A' \to B$ factors as $A' \to A'/(a') \to B$ which shows that $b = 0$ as desired. \end{proof} \noindent Often it is easier to think about colimits over preordered sets. Let $(\Lambda, \geq)$ be a preordered set. A system of rings over $\Lambda$ is given by a ring $R_\lambda$ for every $\lambda \in \Lambda$, and a morphism $R_\lambda \to R_\mu$ whenever $\lambda \leq \mu$. These morphisms have to satisfy the rule that $R_\lambda \to R_\mu \to R_\nu$ is equal to the map $R_\lambda \to R_\nu$ for all $\lambda \leq \mu \leq \nu$. See Categories, Section \ref{categories-section-posets-limits}. We will often assume that $(\Lambda, \leq)$ is {\it directed}, which means that $\Lambda$ is nonempty and given $\lambda, \mu \in \Lambda$ there exists a $\nu \in \Lambda$ with $\lambda \leq \nu$ and $\mu \leq \nu$. Recall that the colimit $\colim_\lambda R_\lambda$ is sometimes called a ``direct limit'' in this case (but we will not use this terminology). \medskip\noindent Note that Categories, Lemma \ref{categories-lemma-directed-category-system} tells us that colimits over filtered index categories are the same thing as colimits over directed sets. \begin{lemma} \label{lemma-ring-colimit-fp} Let $R \to A$ be a ring map. There exists a directed system $A_\lambda$ of $R$-algebras of finite presentation such that $A = \colim_\lambda A_\lambda$. If $A$ is of finite type over $R$ we may arrange it so that all the transition maps in the system of $A_\lambda$ are surjective. \end{lemma} \begin{proof} The first proof is that this follows from Lemma \ref{lemma-ring-colimit-fp-category} and Categories, Lemma \ref{categories-lemma-directed-category-system}. \medskip\noindent Second proof. Compare with the proof of Lemma \ref{lemma-module-colimit-fp}. Consider any finite subset $S \subset A$, and any finite collection of polynomial relations $E$ among the elements of $S$. So each $s \in S$ corresponds to $x_s \in A$ and each $e \in E$ consists of a polynomial $f_e \in R[X_s; s\in S]$ such that $f_e(x_s) = 0$. Let $A_{S, E} = R[X_s; s\in S]/(f_e; e\in E)$ which is a finitely presented $R$-algebra. There are canonical maps $A_{S, E} \to A$. If $S \subset S'$ and if the elements of $E$ correspond, via the map $R[X_s; s \in S] \to R[X_s; s\in S']$, to a subset of $E'$, then there is an obvious map $A_{S, E} \to A_{S', E'}$ commuting with the maps to $A$. Thus, setting $\Lambda$ equal to the set of pairs $(S, E)$ with ordering by inclusion as above, we get a directed partially ordered set. It is clear that the colimit of this directed system is $A$. \medskip\noindent For the last statement, suppose $A = R[x_1, \ldots, x_n]/I$. In this case, consider the subset $\Lambda' \subset \Lambda$ consisting of those systems $(S, E)$ above with $S = \{x_1, \ldots, x_n\}$. It is easy to see that still $A = \colim_{\lambda' \in \Lambda'} A_{\lambda'}$. Moreover, the transition maps are clearly surjective. \end{proof} \noindent It turns out that we can characterize ring maps of finite presentation as follows. This in some sense says that the algebras of finite presentation are the ``compact'' objects in the category of $R$-algebras. \begin{lemma} \label{lemma-characterize-finite-presentation} Let $\varphi : R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $\varphi$ is of finite presentation, \item for every directed system $A_\lambda$ of $R$-algebras the map $$ \colim_\lambda \Hom_R(S, A_\lambda) \longrightarrow \Hom_R(S, \colim_\lambda A_\lambda) $$ is bijective, and \item for every directed system $A_\lambda$ of $R$-algebras the map $$ \colim_\lambda \Hom_R(S, A_\lambda) \longrightarrow \Hom_R(S, \colim_\lambda A_\lambda) $$ is surjective. \end{enumerate} \end{lemma} \begin{proof} Assume (1) and write $S = R[x_1, \ldots, x_n] / (f_1, \ldots, f_m)$. Let $A = \colim A_\lambda$. Observe that an $R$-algebra homomorphism $S \to A$ or $S \to A_\lambda$ is determined by the images of $x_1, \ldots, x_n$. Hence it is clear that $\colim_\lambda \Hom_R(S, A_\lambda) \to \Hom_R(S, A)$ is injective. To see that it is surjective, let $\chi : S \to A$ be an $R$-algebra homomorphism. Then each $x_i$ maps to some element in the image of some $A_{\lambda_i}$. We may pick $\mu \geq \lambda_i$, $i = 1, \ldots, n$ and assume $\chi(x_i)$ is the image of $y_i \in A_\mu$ for $i = 1, \ldots, n$. Consider $z_j = f_j(y_1, \ldots, y_n) \in A_\mu$. Since $\chi$ is a homomorphism the image of $z_j$ in $A = \colim_\lambda A_\lambda$ is zero. Hence there exists a $\mu_j \geq \mu$ such that $z_j$ maps to zero in $A_{\mu_j}$. Pick $\nu \geq \mu_j$, $j = 1, \ldots, m$. Then the images of $z_1, \ldots, z_m$ are zero in $A_\nu$. This exactly means that the $y_i$ map to elements $y'_i \in A_\nu$ which satisfy the relations $f_j(y'_1, \ldots, y'_n) = 0$. Thus we obtain a ring map $S \to A_\nu$. This shows that (1) implies (2). \medskip\noindent It is clear that (2) implies (3). Assume (3). By Lemma \ref{lemma-ring-colimit-fp} we may write $S = \colim_\lambda S_\lambda$ with $S_\lambda$ of finite presentation over $R$. Then the identity map factors as $$ S \to S_\lambda \to S $$ for some $\lambda$. This implies that $S$ is finitely presented over $S_\lambda$ by Lemma \ref{lemma-compose-finite-type} part (4) applied to $S \to S_\lambda \to S$. Applying part (2) of the same lemma to $R \to S_\lambda \to S$ we conclude that $S$ is of finite presentation over $R$. \end{proof} \noindent Using the basic material above we can give a criterion of when an algebra $A$ is a filtered colimit of a given type of algebra as follows. \begin{lemma} \label{lemma-when-colimit} Let $R \to \Lambda$ be a ring map. Let $\mathcal{E}$ be a set of $R$-algebras such that each $A \in \mathcal{E}$ is of finite presentation over $R$. Then the following two statements are equivalent \begin{enumerate} \item $\Lambda$ is a filtered colimit of elements of $\mathcal{E}$, and \item for any $R$-algebra map $A \to \Lambda$ with $A$ of finite presentation over $R$ we can find a factorization $A \to B \to \Lambda$ with $B \in \mathcal{E}$. \end{enumerate} \end{lemma} \begin{proof} Suppose that $\mathcal{I} \to \mathcal{E}$, $i \mapsto A_i$ is a filtered diagram such that $\Lambda = \colim_i A_i$. Let $A \to \Lambda$ be an $R$-algebra map with $A$ of finite presentation over $R$. Then we get a factorization $A \to A_i \to \Lambda$ by applying Lemma \ref{lemma-characterize-finite-presentation}. Thus (1) implies (2). \medskip\noindent Consider the category $\mathcal{I}$ of Lemma \ref{lemma-ring-colimit-fp-category}. By Categories, Lemma \ref{categories-lemma-cofinal-in-filtered} the full subcategory $\mathcal{J}$ consisting of those $A \to \Lambda$ with $A \in \mathcal{E}$ is cofinal in $\mathcal{I}$ and is a filtered category. Then $\Lambda$ is also the colimit over $\mathcal{J}$ by Categories, Lemma \ref{categories-lemma-cofinal}. \end{proof} \noindent But more is true. Namely, given $R = \colim_\lambda R_\lambda$ we see that the category of finitely presented $R$-modules is equivalent to the colimit of the categories of finitely presented $R_\lambda$-modules. Similarly for the categories of finitely presented $R$-algebras. \begin{lemma} \label{lemma-module-map-property-in-colimit} Let $A$ be a ring and let $M, N$ be $A$-modules. Suppose that $R = \colim_{i \in I} R_i$ is a directed colimit of $A$-algebras. \begin{enumerate} \item If $M$ is a finite $A$-module, and $u, u' : M \to N$ are $A$-module maps such that $u \otimes 1 = u' \otimes 1 : M \otimes_A R \to N \otimes_A R$ then for some $i$ we have $u \otimes 1 = u' \otimes 1 : M \otimes_A R_i \to N \otimes_A R_i$. \item If $N$ is a finite $A$-module and $u : M \to N$ is an $A$-module map such that $u \otimes 1 : M \otimes_A R \to N \otimes_A R$ is surjective, then for some $i$ the map $u \otimes 1 : M \otimes_A R_i \to N \otimes_A R_i$ is surjective. \item If $N$ is a finitely presented $A$-module, and $v : N \otimes_A R \to M \otimes_A R$ is an $R$-module map, then there exists an $i$ and an $R_i$-module map $v_i : N \otimes_A R_i \to M \otimes_A R_i$ such that $v = v_i \otimes 1$. \item If $M$ is a finite $A$-module, $N$ is a finitely presented $A$-module, and $u : M \to N$ is an $A$-module map such that $u \otimes 1 : M \otimes_A R \to N \otimes_A R$ is an isomorphism, then for some $i$ the map $u \otimes 1 : M \otimes_A R_i \to N \otimes_A R_i$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} To prove (1) assume $u$ is as in (1) and let $x_1, \ldots, x_m \in M$ be generators. Since $N \otimes_A R = \colim_i N \otimes_A R_i$ we may pick an $i \in I$ such that $u(x_j) \otimes 1 = u'(x_j) \otimes 1$ in $N \otimes_A R_i$, $j = 1, \ldots, m$. For such an $i$ we have $u \otimes 1 = u' \otimes 1 : M \otimes_A R_i \to N \otimes_A R_i$. \medskip\noindent To prove (2) assume $u \otimes 1$ surjective and let $y_1, \ldots, y_m \in N$ be generators. Since $N \otimes_A R = \colim_i N \otimes_A R_i$ we may pick an $i \in I$ and $z_j \in M \otimes_A R_i$, $j = 1, \ldots, m$ whose images in $N \otimes_A R$ equal $y_j \otimes 1$. For such an $i$ the map $u \otimes 1 : M \otimes_A R_i \to N \otimes_A R_i$ is surjective. \medskip\noindent To prove (3) let $y_1, \ldots, y_m \in N$ be generators. Let $K = \Ker(A^{\oplus m} \to N)$ where the map is given by the rule $(a_1, \ldots, a_m) \mapsto \sum a_j y_j$. Let $k_1, \ldots, k_t$ be generators for $K$. Say $k_s = (k_{s1}, \ldots, k_{sm})$. Since $M \otimes_A R = \colim_i M \otimes_A R_i$ we may pick an $i \in I$ and $z_j \in M \otimes_A R_i$, $j = 1, \ldots, m$ whose images in $M \otimes_A R$ equal $v(y_j \otimes 1)$. We want to use the $z_j$ to define the map $v_i : N \otimes_A R_i \to M \otimes_A R_i$. Since $K \otimes_A R_i \to R_i^{\oplus m} \to N \otimes_A R_i \to 0$ is a presentation, it suffices to check that $\xi_s = \sum_j k_{sj}z_j$ is zero in $M \otimes_A R_i$ for each $s = 1, \ldots, t$. This may not be the case, but since the image of $\xi_s$ in $M \otimes_A R$ is zero we see that it will be the case after increasing $i$ a bit. \medskip\noindent To prove (4) assume $u \otimes 1$ is an isomorphism, that $M$ is finite, and that $N$ is finitely presented. Let $v : N \otimes_A R \to M \otimes_A R$ be an inverse to $u \otimes 1$. Apply part (3) to get a map $v_i : N \otimes_A R_i \to M \otimes_A R_i$ for some $i$. Apply part (1) to see that, after increasing $i$ we have $v_i \circ (u \otimes 1) = \text{id}_{M \otimes_A R_i}$ and $(u \otimes 1) \circ v_i = \text{id}_{N \otimes_A R_i}$. \end{proof} \begin{lemma} \label{lemma-colimit-category-fp-modules} Suppose that $R = \colim_{\lambda \in \Lambda} R_\lambda$ is a directed colimit of rings. Then the category of finitely presented $R$-modules is the colimit of the categories of finitely presented $R_\lambda$-modules. More precisely \begin{enumerate} \item Given a finitely presented $R$-module $M$ there exists a $\lambda \in \Lambda$ and a finitely presented $R_\lambda$-module $M_\lambda$ such that $M \cong M_\lambda \otimes_{R_\lambda} R$. \item Given a $\lambda \in \Lambda$, finitely presented $R_\lambda$-modules $M_\lambda, N_\lambda$, and an $R$-module map $\varphi : M_\lambda \otimes_{R_\lambda} R \to N_\lambda \otimes_{R_\lambda} R$, then there exists a $\mu \geq \lambda$ and an $R_\mu$-module map $\varphi_\mu : M_\lambda \otimes_{R_\lambda} R_\mu \to N_\lambda \otimes_{R_\lambda} R_\mu$ such that $\varphi = \varphi_\mu \otimes 1_R$. \item Given a $\lambda \in \Lambda$, finitely presented $R_\lambda$-modules $M_\lambda, N_\lambda$, and $R_\lambda$-module maps $\varphi, \psi : M_\lambda \to N_\lambda$ such that $\varphi \otimes 1_R = \psi \otimes 1_R$, then $\varphi \otimes 1_{R_\mu} = \psi \otimes 1_{R_\mu}$ for some $\mu \geq \lambda$. \end{enumerate} \end{lemma} \begin{proof} To prove (1) choose a presentation $R^{\oplus m} \to R^{\oplus n} \to M \to 0$. Suppose that the first map is given by the matrix $A = (a_{ij})$. We can choose a $\lambda \in \Lambda$ and a matrix $A_\lambda = (a_{\lambda, ij})$ with coefficients in $R_\lambda$ which maps to $A$ in $R$. Then we simply let $M_\lambda$ be the $R_\lambda$-module with presentation $R_\lambda^{\oplus m} \to R_\lambda^{\oplus n} \to M_\lambda \to 0$ where the first arrow is given by $A_\lambda$. \medskip\noindent Parts (2) and (3) follow from Lemma \ref{lemma-module-map-property-in-colimit}. \end{proof} \begin{lemma} \label{lemma-algebra-map-property-in-colimit} Let $A$ be a ring and let $B, C$ be $A$-algebras. Suppose that $R = \colim_{i \in I} R_i$ is a directed colimit of $A$-algebras. \begin{enumerate} \item If $B$ is a finite type $A$-algebra, and $u, u' : B \to C$ are $A$-algebra maps such that $u \otimes 1 = u' \otimes 1 : B \otimes_A R \to C \otimes_A R$ then for some $i$ we have $u \otimes 1 = u' \otimes 1 : B \otimes_A R_i \to C \otimes_A R_i$. \item If $C$ is a finite type $A$-algebra and $u : B \to C$ is an $A$-algebra map such that $u \otimes 1 : B \otimes_A R \to C \otimes_A R$ is surjective, then for some $i$ the map $u \otimes 1 : B \otimes_A R_i \to C \otimes_A R_i$ is surjective. \item If $C$ is of finite presentation over $A$ and $v : C \otimes_A R \to B \otimes_A R$ is an $R$-algebra map, then there exists an $i$ and an $R_i$-algebra map $v_i : C \otimes_A R_i \to B \otimes_A R_i$ such that $v = v_i \otimes 1$. \item If $B$ is a finite type $A$-algebra, $C$ is a finitely presented $A$-algebra, and $u : B \to C$ is an $A$-algebra map such that $u \otimes 1 : B \otimes_A R \to C \otimes_A R$ is an isomorphism, then for some $i$ the map $u \otimes 1 : B \otimes_A R_i \to C \otimes_A R_i$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} To prove (1) assume $u$ is as in (1) and let $x_1, \ldots, x_m \in B$ be generators. Since $C \otimes_A R = \colim_i C \otimes_A R_i$ we may pick an $i \in I$ such that $u(x_j) \otimes 1 = u'(x_j) \otimes 1$ in $C \otimes_A R_i$, $j = 1, \ldots, m$. For such an $i$ we have $u \otimes 1 = u' \otimes 1 : B \otimes_A R_i \to C \otimes_A R_i$. \medskip\noindent To prove (2) assume $u \otimes 1$ surjective and let $y_1, \ldots, y_m \in C$ be generators. Since $B \otimes_A R = \colim_i B \otimes_A R_i$ we may pick an $i \in I$ and $z_j \in B \otimes_A R_i$, $j = 1, \ldots, m$ whose images in $C \otimes_A R$ equal $y_j \otimes 1$. For such an $i$ the map $u \otimes 1 : B \otimes_A R_i \to C \otimes_A R_i$ is surjective. \medskip\noindent To prove (3) let $c_1, \ldots, c_m \in C$ be generators. Let $K = \Ker(A[x_1, \ldots, x_m] \to C)$ where the map is given by the rule $x_j \mapsto c_j$. Let $f_1, \ldots, f_t$ be generators for $K$ as an ideal in $A[x_1, \ldots, x_m]$. We think of $f_j = f_j(x_1, \ldots, x_m)$ as a polynomial. Since $B \otimes_A R = \colim_i B \otimes_A R_i$ we may pick an $i \in I$ and $z_j \in B \otimes_A R_i$, $j = 1, \ldots, m$ whose images in $B \otimes_A R$ equal $v(c_j \otimes 1)$. We want to use the $z_j$ to define a map $v_i : C \otimes_A R_i \to B \otimes_A R_i$. Since $K \otimes_A R_i \to R_i[x_1, \ldots, x_m] \to C \otimes_A R_i \to 0$ is a presentation, it suffices to check that $\xi_s = f_s(z_1, \ldots, z_m)$ is zero in $B \otimes_A R_i$ for each $s = 1, \ldots, t$. This may not be the case, but since the image of $\xi_s$ in $B \otimes_A R$ is zero we see that it will be the case after increasing $i$ a bit. \medskip\noindent To prove (4) assume $u \otimes 1$ is an isomorphism, that $B$ is a finite type $A$-algebra, and that $C$ is a finitely presented $A$-algebra. Let $v : C \otimes_A R \to B \otimes_A R$ be an inverse to $u \otimes 1$. Let $v_i : C \otimes_A R_i \to B \otimes_A R_i$ be as in part (3). Apply part (1) to see that, after increasing $i$ we have $v_i \circ (u \otimes 1) = \text{id}_{B \otimes_A R_i}$ and $(u \otimes 1) \circ v_i = \text{id}_{C \otimes_A R_i}$. \end{proof} \begin{lemma} \label{lemma-colimit-category-fp-algebras} Suppose that $R = \colim_{\lambda \in \Lambda} R_\lambda$ is a directed colimit of rings. Then the category of finitely presented $R$-algebras is the colimit of the categories of finitely presented $R_\lambda$-algebras. More precisely \begin{enumerate} \item Given a finitely presented $R$-algebra $A$ there exists a $\lambda \in \Lambda$ and a finitely presented $R_\lambda$-algebra $A_\lambda$ such that $A \cong A_\lambda \otimes_{R_\lambda} R$. \item Given a $\lambda \in \Lambda$, finitely presented $R_\lambda$-algebras $A_\lambda, B_\lambda$, and an $R$-algebra map $\varphi : A_\lambda \otimes_{R_\lambda} R \to B_\lambda \otimes_{R_\lambda} R$, then there exists a $\mu \geq \lambda$ and an $R_\mu$-algebra map $\varphi_\mu : A_\lambda \otimes_{R_\lambda} R_\mu \to B_\lambda \otimes_{R_\lambda} R_\mu$ such that $\varphi = \varphi_\mu \otimes 1_R$. \item Given a $\lambda \in \Lambda$, finitely presented $R_\lambda$-algebras $A_\lambda, B_\lambda$, and $R_\lambda$-algebra maps $\varphi_\lambda, \psi_\lambda : A_\lambda \to B_\lambda$ such that $\varphi_\lambda \otimes 1_R = \psi_\lambda \otimes 1_R$, then $\varphi_\lambda \otimes 1_{R_\mu} = \psi_\lambda \otimes 1_{R_\mu}$ for some $\mu \geq \lambda$. \end{enumerate} \end{lemma} \begin{proof} To prove (1) choose a presentation $A = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$. We can choose a $\lambda \in \Lambda$ and elements $f_{\lambda, j} \in R_\lambda[x_1, \ldots, x_n]$ mapping to $f_j \in R[x_1, \ldots, x_n]$. Then we simply let $A_\lambda = R_\lambda[x_1, \ldots, x_n]/(f_{\lambda, 1}, \ldots, f_{\lambda, m})$. \medskip\noindent Parts (2) and (3) follow from Lemma \ref{lemma-algebra-map-property-in-colimit}. \end{proof} \begin{lemma} \label{lemma-limit-no-condition-local} Suppose $R \to S$ is a local homomorphism of local rings. There exists a directed set $(\Lambda, \leq)$, and a system of local homomorphisms $R_\lambda \to S_\lambda$ of local rings such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is essentially of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is essentially of finite type over $R_\lambda$. \end{enumerate} \end{lemma} \begin{proof} Denote by $\varphi : R \to S$ the ring map. Let $\mathfrak m \subset R$ be the maximal ideal of $R$ and let $\mathfrak n \subset S$ be the maximal ideal of $S$. Let $$ \Lambda = \{ (A, B) \mid A \subset R, B \subset S, \# A < \infty, \# B < \infty, \varphi(A) \subset B \}. $$ As partial ordering we take the inclusion relation. For each $\lambda = (A, B) \in \Lambda$ we let $R'_\lambda$ be the sub $\mathbf{Z}$-algebra generated by $a \in A$, and we let $S'_\lambda$ be the sub $\mathbf{Z}$-algebra generated by $b$, $b \in B$. Let $R_\lambda$ be the localization of $R'_\lambda$ at the prime ideal $R'_\lambda \cap \mathfrak m$ and let $S_\lambda$ be the localization of $S'_\lambda$ at the prime ideal $S'_\lambda \cap \mathfrak n$. In a picture $$ \xymatrix{ B \ar[r] & S'_\lambda \ar[r] & S_\lambda \ar[r] & S \\ A \ar[r] \ar[u] & R'_\lambda \ar[r] \ar[u] & R_\lambda \ar[r] \ar[u] & R \ar[u] }. $$ The transition maps are clear. We leave the proofs of the other assertions to the reader. \end{proof} \begin{lemma} \label{lemma-limit-essentially-finite-type} Suppose $R \to S$ is a local homomorphism of local rings. Assume that $S$ is essentially of finite type over $R$. Then there exists a directed set $(\Lambda, \leq)$, and a system of local homomorphisms $R_\lambda \to S_\lambda$ of local rings such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is essentially of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is essentially of finite type over $R_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ presents $S_\mu$ as the localization of a quotient of $S_\lambda \otimes_{R_\lambda} R_\mu$. \end{enumerate} \end{lemma} \begin{proof} Denote by $\varphi : R \to S$ the ring map. Let $\mathfrak m \subset R$ be the maximal ideal of $R$ and let $\mathfrak n \subset S$ be the maximal ideal of $S$. Let $x_1, \ldots, x_n \in S$ be elements such that $S$ is a localization of the sub $R$-algebra of $S$ generated by $x_1, \ldots, x_n$. In other words, $S$ is a quotient of a localization of the polynomial ring $R[x_1, \ldots, x_n]$. \medskip\noindent Let $\Lambda = \{ A \subset R \mid \# A < \infty\}$ be the set of finite subsets of $R$. As partial ordering we take the inclusion relation. For each $\lambda = A \in \Lambda$ we let $R'_\lambda$ be the sub $\mathbf{Z}$-algebra generated by $a \in A$, and we let $S'_\lambda$ be the sub $\mathbf{Z}$-algebra generated by $\varphi(a)$, $a \in A$ and the elements $x_1, \ldots, x_n$. Let $R_\lambda$ be the localization of $R'_\lambda$ at the prime ideal $R'_\lambda \cap \mathfrak m$ and let $S_\lambda$ be the localization of $S'_\lambda$ at the prime ideal $S'_\lambda \cap \mathfrak n$. In a picture $$ \xymatrix{ \varphi(A) \amalg \{x_i\} \ar[r] & S'_\lambda \ar[r] & S_\lambda \ar[r] & S \\ A \ar[r] \ar[u] & R'_\lambda \ar[r] \ar[u] & R_\lambda \ar[r] \ar[u] & R \ar[u] } $$ It is clear that if $A \subset B$ corresponds to $\lambda \leq \mu$ in $\Lambda$, then there are canonical maps $R_\lambda \to R_\mu$, and $S_\lambda \to S_\mu$ and we obtain a system over the directed set $\Lambda$. \medskip\noindent The assertion that $R = \colim R_\lambda$ is clear because all the maps $R_\lambda \to R$ are injective and any element of $R$ eventually is in the image. The same argument works for $S = \colim S_\lambda$. Assertions (2), (3) are true by construction. The final assertion holds because clearly the maps $S'_\lambda \otimes_{R'_\lambda} R'_\mu \to S'_\mu$ are surjective. \end{proof} \begin{lemma} \label{lemma-limit-essentially-finite-presentation} Suppose $R \to S$ is a local homomorphism of local rings. Assume that $S$ is essentially of finite presentation over $R$. Then there exists a directed set $(\Lambda, \leq)$, and a system of local homomorphisms $R_\lambda \to S_\lambda$ of local rings such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is essentially of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is essentially of finite type over $R_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ presents $S_\mu$ as the localization of $S_\lambda \otimes_{R_\lambda} R_\mu$ at a prime ideal. \end{enumerate} \end{lemma} \begin{proof} By assumption we may choose an isomorphism $\Phi : (R[x_1, \ldots, x_n]/I)_{\mathfrak q} \to S$ where $I \subset R[x_1, \ldots, x_n]$ is a finitely generated ideal, and $\mathfrak q \subset R[x_1, \ldots, x_n]/I$ is a prime. (Note that $R \cap \mathfrak q$ is equal to the maximal ideal $\mathfrak m$ of $R$.) We also choose generators $f_1, \ldots, f_m \in I$ for the ideal $I$. Write $R$ in any way as a colimit $R = \colim R_\lambda$ over a directed set $(\Lambda, \leq )$, with each $R_\lambda$ local and essentially of finite type over $\mathbf{Z}$, and with local transition maps. There exists some $\lambda_0 \in \Lambda$ such that $f_j$ is the image of some $f_{j, \lambda_0} \in R_{\lambda_0}[x_1, \ldots, x_n]$. For all $\lambda \geq \lambda_0$ denote by $f_{j, \lambda} \in R_{\lambda}[x_1, \ldots, x_n]$ the image of $f_{j, \lambda_0}$. Thus we obtain a system of ring maps $$ R_\lambda[x_1, \ldots, x_n]/(f_{1, \lambda}, \ldots, f_{m, \lambda}) \to R[x_1, \ldots, x_n]/(f_1, \ldots, f_m) \to S $$ Set $\mathfrak q_\lambda$ to be the inverse image of $\mathfrak q$. Set $S_\lambda = (R_\lambda[x_1, \ldots, x_n]/ (f_{1, \lambda}, \ldots, f_{m, \lambda}))_{\mathfrak q_\lambda}$. We leave it to the reader to see that this works. \end{proof} \begin{remark} \label{remark-suitable-systems-limits} Suppose that $R \to S$ is a local homomorphism of local rings, which is essentially of finite presentation. Take any system $(\Lambda, \leq)$, $R_\lambda \to S_\lambda$ with the properties listed in Lemma \ref{lemma-limit-essentially-finite-type}. What may happen is that this is the ``wrong'' system, namely, it may happen that property (4) of Lemma \ref{lemma-limit-essentially-finite-presentation} is not satisfied. Here is an example. Let $k = \mathbf{F}_2$. Consider the ring $$ R = \text{localization of } k[z, y_1, y_2, \ldots]/(y_i^2 - zy_{i + 1}) \text{ at }(z, y_1, y_2, \ldots) $$ Set $S = R/zR$. As system take $\Lambda = \mathbf{N}$ and $$ R_n = \text{localization of } k[z, y_1, \ldots, y_n]/(\{y_i^2 - zy_{i + 1}\}_{i \leq n-1}) \text{ at }(z, y_1, \ldots, y_n) $$ and $S_n = R_n/(z, y_n^2)$. None of the maps $S_n \otimes_{R_n} R_{n + 1} \to S_{n + 1}$ is a localization (i.e., an isomorphism in this case) since $1 \otimes y_{n + 1}^2$ maps to zero. If we take instead $S_n' = R_n/zR_n$ then the maps $S'_n \otimes_{R_n} R_{n + 1} \to S'_{n + 1}$ are isomorphisms. The moral of this remark is that we do have to be a little careful in choosing the systems. \end{remark} \begin{lemma} \label{lemma-limit-module-essentially-finite-presentation} Suppose $R \to S$ is a local homomorphism of local rings. Assume that $S$ is essentially of finite presentation over $R$. Let $M$ be a finitely presented $S$-module. Then there exists a directed set $(\Lambda, \leq)$, and a system of local homomorphisms $R_\lambda \to S_\lambda$ of local rings together with $S_\lambda$-modules $M_\lambda$, such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. The colimit of the system $M_\lambda$ is $M$. \item Each $R_\lambda$ is essentially of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is essentially of finite type over $R_\lambda$. \item Each $M_\lambda$ is finite over $S_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ presents $S_\mu$ as the localization of $S_\lambda \otimes_{R_\lambda} R_\mu$ at a prime ideal. \item For each $\lambda \leq \mu$ the map $M_\lambda \otimes_{S_\lambda} S_\mu \to M_\mu$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} As in the proof of Lemma \ref{lemma-limit-essentially-finite-presentation} we may first write $R = \colim R_\lambda$ as a directed colimit of local $\mathbf{Z}$-algebras which are essentially of finite type. Next, we may assume that for some $\lambda_1 \in \Lambda$ there exist $f_{j, \lambda_1} \in R_{\lambda_1}[x_1, \ldots, x_n]$ such that $$ S = \colim_{\lambda \geq \lambda_1} S_\lambda, \text{ with } S_\lambda = (R_\lambda[x_1, \ldots, x_n]/ (f_{1, \lambda}, \ldots, f_{m, \lambda}))_{\mathfrak q_\lambda} $$ Choose a presentation $$ S^{\oplus s} \to S^{\oplus t} \to M \to 0 $$ of $M$ over $S$. Let $A \in \text{Mat}(t \times s, S)$ be the matrix of the presentation. For some $\lambda_2 \in \Lambda$, $\lambda_2 \geq \lambda_1$ we can find a matrix $A_{\lambda_2} \in \text{Mat}(t \times s, S_{\lambda_2})$ which maps to $A$. For all $\lambda \geq \lambda_2$ we let $M_\lambda = \Coker(S_\lambda^{\oplus s} \xrightarrow{A_\lambda} S_\lambda^{\oplus t})$. We leave it to the reader to see that this works. \end{proof} \begin{lemma} \label{lemma-limit-no-condition} Suppose $R \to S$ is a ring map. Then there exists a directed set $(\Lambda, \leq)$, and a system of ring maps $R_\lambda \to S_\lambda$ such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is of finite type over $R_\lambda$. \end{enumerate} \end{lemma} \begin{proof} This is the non-local version of Lemma \ref{lemma-limit-no-condition-local}. Proof is similar and left to the reader. \end{proof} \begin{lemma} \label{lemma-limit-integral} Suppose $R \to S$ is a ring map. Assume that $S$ is integral over $R$. Then there exists a directed set $(\Lambda, \leq)$, and a system of ring maps $R_\lambda \to S_\lambda$ such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is finite over $R_\lambda$. \end{enumerate} \end{lemma} \begin{proof} Consider the set $\Lambda$ of pairs $(E, F)$ where $E \subset R$ is a finite subset, $F \subset S$ is a finite subset, and every element $f \in F$ is the root of a monic $P(X) \in R[X]$ whose coefficients are in $E$. Say $(E, F) \leq (E', F')$ if $E \subset E'$ and $F \subset F'$. Given $\lambda = (E, F) \in \Lambda$ set $R_\lambda \subset R$ equal to the $\mathbf{Z}$-subalgebra of $R$ generated by $E$ and $S_\lambda \subset S$ equal to the $\mathbf{Z}$-subalgebra generated by $F$ and the image of $E$ in $S$. It is clear that $R = \colim R_\lambda$. We have $S = \colim S_\lambda$ as every element of $S$ is integral over $R$. The ring maps $R_\lambda \to S_\lambda$ are finite by Lemma \ref{lemma-characterize-finite-in-terms-of-integral} and the fact that $S_\lambda$ is generated over $R_\lambda$ by the elements of $F$ which are integral over $R_\lambda$ by our condition on the pairs $(E, F)$. The lemma follows. \end{proof} \begin{lemma} \label{lemma-limit-finite-type} Suppose $R \to S$ is a ring map. Assume that $S$ is of finite type over $R$. Then there exists a directed set $(\Lambda, \leq)$, and a system of ring maps $R_\lambda \to S_\lambda$ such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is of finite type over $R_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ presents $S_\mu$ as a quotient of $S_\lambda \otimes_{R_\lambda} R_\mu$. \end{enumerate} \end{lemma} \begin{proof} This is the non-local version of Lemma \ref{lemma-limit-essentially-finite-type}. Proof is similar and left to the reader. \end{proof} \begin{lemma} \label{lemma-limit-finite-presentation} Suppose $R \to S$ is a ring map. Assume that $S$ is of finite presentation over $R$. Then there exists a directed set $(\Lambda, \leq)$, and a system of ring maps $R_\lambda \to S_\lambda$ such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. \item Each $R_\lambda$ is of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is of finite type over $R_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ is an isomorphism. \end{enumerate} \end{lemma} \begin{proof} This is the non-local version of Lemma \ref{lemma-limit-essentially-finite-presentation}. Proof is similar and left to the reader. \end{proof} \begin{lemma} \label{lemma-limit-module-finite-presentation} Suppose $R \to S$ is a ring map. Assume that $S$ is of finite presentation over $R$. Let $M$ be a finitely presented $S$-module. Then there exists a directed set $(\Lambda, \leq)$, and a system of ring maps $R_\lambda \to S_\lambda$ together with $S_\lambda$-modules $M_\lambda$, such that \begin{enumerate} \item The colimit of the system $R_\lambda \to S_\lambda$ is equal to $R \to S$. The colimit of the system $M_\lambda$ is $M$. \item Each $R_\lambda$ is of finite type over $\mathbf{Z}$. \item Each $S_\lambda$ is of finite type over $R_\lambda$. \item Each $M_\lambda$ is finite over $S_\lambda$. \item For each $\lambda \leq \mu$ the map $S_\lambda \otimes_{R_\lambda} R_\mu \to S_\mu$ is an isomorphism. \item For each $\lambda \leq \mu$ the map $M_\lambda \otimes_{S_\lambda} S_\mu \to M_\mu$ is an isomorphism. \end{enumerate} In particular, for every $\lambda \in \Lambda$ we have $$ M = M_\lambda \otimes_{S_\lambda} S = M_\lambda \otimes_{R_\lambda} R. $$ \end{lemma} \begin{proof} This is the non-local version of Lemma \ref{lemma-limit-module-essentially-finite-presentation}. Proof is similar and left to the reader. \end{proof} \section{More flatness criteria} \label{section-more-flatness-criteria} % BEGIN ALGEBRA EDITORIAL ROUTE section-more-flatness-criteria \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-more-flatness-criteria}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-more-flatness-criteria \noindent The following lemma is often used in algebraic geometry to show that a finite morphism from a normal surface to a smooth surface is flat. It is a partial converse to Lemma \ref{lemma-finite-flat-over-regular-CM} because an injective finite local ring map certainly satisfies condition (3). \begin{lemma} \label{lemma-CM-over-regular-flat} \begin{slogan} Miracle flatness \end{slogan} Let $R \to S$ be a local homomorphism of Noetherian local rings. Assume \begin{enumerate} \item $R$ is regular, \item $S$ is Cohen-Macaulay, \item $\dim(S) = \dim(R) + \dim(S/\mathfrak m_R S)$. \end{enumerate} Then $R \to S$ is flat. \end{lemma} \begin{proof} By induction on $\dim(R)$. The case $\dim(R) = 0$ is trivial, because then $R$ is a field. Assume $\dim(R) > 0$. By (3) this implies that $\dim(S) > 0$. Let $\mathfrak q_1, \ldots, \mathfrak q_r$ be the minimal primes of $S$. Note that $\mathfrak q_i \not \supset \mathfrak m_R S$ since $$ \dim(S/\mathfrak q_i) = \dim(S) > \dim(S/\mathfrak m_R S), $$ the first equality by Lemma \ref{lemma-maximal-chain-CM} and the inequality by (3). Thus $\mathfrak p_i = R \cap \mathfrak q_i$ is not equal to $\mathfrak m_R$. Pick $x \in \mathfrak m_R$, $x \not \in \mathfrak m_R^2$, and $x \not \in \mathfrak p_i$, see Lemma \ref{lemma-silly}. Hence we see that $x$ is not contained in any of the minimal primes of $S$. Hence $x$ is a nonzerodivisor on $S$ by (2), see Lemma \ref{lemma-reformulate-CM} and $S/xS$ is Cohen-Macaulay with $\dim(S/xS) = \dim(S) - 1$. By (1) and Lemma \ref{lemma-regular-ring-CM} the ring $R/xR$ is regular with $\dim(R/xR) = \dim(R) - 1$. By induction we see that $R/xR \to S/xS$ is flat. Hence we conclude by Lemma \ref{lemma-variant-local-criterion-flatness} and the remark following it. \end{proof} \begin{lemma} \label{lemma-flat-over-regular} Let $R \to S$ be a homomorphism of Noetherian local rings. Assume that $R$ is a regular local ring and that a regular system of parameters maps to a regular sequence in $S$. Then $R \to S$ is flat. \end{lemma} \begin{proof} Suppose that $x_1, \ldots, x_d$ are a system of parameters of $R$ which map to a regular sequence in $S$. Note that $S/(x_1, \ldots, x_d)S$ is flat over $R/(x_1, \ldots, x_d)$ as the latter is a field. Then $x_d$ is a nonzerodivisor in $S/(x_1, \ldots, x_{d - 1})S$ hence $S/(x_1, \ldots, x_{d - 1})S$ is flat over $R/(x_1, \ldots, x_{d - 1})$ by the local criterion of flatness (see Lemma \ref{lemma-variant-local-criterion-flatness} and remarks following). Then $x_{d - 1}$ is a nonzerodivisor in $S/(x_1, \ldots, x_{d - 2})S$ hence $S/(x_1, \ldots, x_{d - 2})S$ is flat over $R/(x_1, \ldots, x_{d - 2})$ by the local criterion of flatness (see Lemma \ref{lemma-variant-local-criterion-flatness} and remarks following). Continue till one reaches the conclusion that $S$ is flat over $R$. \end{proof} \noindent The following lemma is the key to proving that results for finitely presented modules over finitely presented rings over a base ring follow from the corresponding results for finite modules in the Noetherian case. \begin{lemma} \label{lemma-colimit-eventually-flat} Let $R \to S$, $M$, $\Lambda$, $R_\lambda \to S_\lambda$, $M_\lambda$ be as in Lemma \ref{lemma-limit-module-essentially-finite-presentation}. Assume that $M$ is flat over $R$. Then for some $\lambda \in \Lambda$ the module $M_\lambda$ is flat over $R_\lambda$. \end{lemma} \begin{proof} Pick some $\lambda \in \Lambda$ and consider $$ \text{Tor}_1^{R_\lambda}(M_\lambda, R_\lambda/\mathfrak m_\lambda) = \Ker(\mathfrak m_\lambda \otimes_{R_\lambda} M_\lambda \to M_\lambda). $$ See Remark \ref{remark-Tor-ring-mod-ideal}. The right hand side shows that this is a finitely generated $S_\lambda$-module (because $S_\lambda$ is Noetherian and the modules in question are finite). Let $\xi_1, \ldots, \xi_n$ be generators. Because $M$ is flat over $R$ we have that $0 = \Ker(\mathfrak m_\lambda R \otimes_R M \to M)$. Since $\otimes$ commutes with colimits we see there exists a $\lambda' \geq \lambda$ such that each $\xi_i$ maps to zero in $\mathfrak m_{\lambda}R_{\lambda'} \otimes_{R_{\lambda'}} M_{\lambda'}$. Hence we see that $$ \text{Tor}_1^{R_\lambda}(M_\lambda, R_\lambda/\mathfrak m_\lambda) \longrightarrow \text{Tor}_1^{R_{\lambda'}}(M_{\lambda'}, R_{\lambda'}/\mathfrak m_{\lambda}R_{\lambda'}) $$ is zero. Note that $M_\lambda \otimes_{R_\lambda} R_\lambda/\mathfrak m_\lambda$ is flat over $R_\lambda/\mathfrak m_\lambda$ because this last ring is a field. Hence we may apply Lemma \ref{lemma-another-variant-local-criterion-flatness} to get that $M_{\lambda'}$ is flat over $R_{\lambda'}$. \end{proof} \noindent Using the lemma above we can start to reprove the results of Section \ref{section-criteria-flatness} in the non-Noetherian case. \begin{lemma} \label{lemma-mod-injective-general} Suppose that $R \to S$ is a local homomorphism of local rings. Denote by $\mathfrak m$ the maximal ideal of $R$. Let $u : M \to N$ be a map of $S$-modules. Assume \begin{enumerate} \item $S$ is essentially of finite presentation over $R$, \item $M$, $N$ are finitely presented over $S$, \item $N$ is flat over $R$, and \item $\overline{u} : M/\mathfrak mM \to N/\mathfrak mN$ is injective. \end{enumerate} Then $u$ is injective, and $N/u(M)$ is flat over $R$. \end{lemma} \begin{proof} By Lemma \ref{lemma-limit-module-essentially-finite-presentation} and its proof we can find a system $R_\lambda \to S_\lambda$ of local ring maps together with maps of $S_\lambda$-modules $u_\lambda : M_\lambda \to N_\lambda$ satisfying the conclusions (1) -- (6) for both $N$ and $M$ of that lemma and such that the colimit of the maps $u_\lambda$ is $u$. By Lemma \ref{lemma-colimit-eventually-flat} we may assume that $N_\lambda$ is flat over $R_\lambda$ for all sufficiently large $\lambda$. Denote by $\mathfrak m_\lambda \subset R_\lambda$ the maximal ideal and $\kappa_\lambda = R_\lambda / \mathfrak m_\lambda$, resp.\ $\kappa = R/\mathfrak m$ the residue fields. \medskip\noindent Consider the map $$ \Psi_\lambda : M_\lambda/\mathfrak m_\lambda M_\lambda \otimes_{\kappa_\lambda} \kappa \longrightarrow M/\mathfrak m M. $$ Since $S_\lambda/\mathfrak m_\lambda S_\lambda$ is essentially of finite type over the field $\kappa_\lambda$ we see that the tensor product $S_\lambda/\mathfrak m_\lambda S_\lambda \otimes_{\kappa_\lambda} \kappa$ is essentially of finite type over $\kappa$. Hence it is a Noetherian ring and we conclude the kernel of $\Psi_\lambda$ is finitely generated. Since $M/\mathfrak m M$ is the colimit of the system $M_\lambda/\mathfrak m_\lambda M_\lambda$ and $\kappa$ is the colimit of the fields $\kappa_\lambda$ there exists a $\lambda' \geq \lambda$ such that the kernel of $\Psi_\lambda$ is generated by the kernel of $$ \Psi_{\lambda, \lambda'} : M_\lambda/\mathfrak m_\lambda M_\lambda \otimes_{\kappa_\lambda} \kappa_{\lambda'} \longrightarrow M_{\lambda'}/\mathfrak m_{\lambda'} M_{\lambda'}. $$ By construction there exists a multiplicative subset $W \subset S_\lambda \otimes_{R_\lambda} R_{\lambda'}$ such that $S_{\lambda'} = W^{-1}(S_\lambda \otimes_{R_\lambda} R_{\lambda'})$ and $$ W^{-1}(M_\lambda/\mathfrak m_\lambda M_\lambda \otimes_{\kappa_\lambda} \kappa_{\lambda'}) = M_{\lambda'}/\mathfrak m_{\lambda'} M_{\lambda'}. $$ Now suppose that $x$ is an element of the kernel of $$ \Psi_{\lambda'} : M_{\lambda'}/\mathfrak m_{\lambda'} M_{\lambda'} \otimes_{\kappa_{\lambda'}} \kappa \longrightarrow M/\mathfrak m M. $$ Write $x = y/w$ for some $w \in W$ and $y \in M_\lambda/\mathfrak m_\lambda M_\lambda \otimes_{\kappa_\lambda} \kappa$. Hence $y \in \Ker(\Psi_\lambda)$. Hence $y$ is a linear combination of elements in the kernel of $\Psi_{\lambda, \lambda'}$. Hence the image of $y$ is zero in $M_{\lambda'}/\mathfrak m_{\lambda'} M_{\lambda'} \otimes_{\kappa_{\lambda'}} \kappa$, hence $x = 0$ because $w$ is invertible in $S_{\lambda'}$. We conclude that the kernel of $\Psi_{\lambda'}$ is zero for all sufficiently large $\lambda'$! \medskip\noindent By the result of the preceding paragraph we may assume that the kernel of $\Psi_\lambda$ is zero for all $\lambda$ sufficiently large, which implies that the map $M_\lambda/\mathfrak m_\lambda M_\lambda \to M/\mathfrak m M$ is injective. Combined with $\overline{u}$ being injective this formally implies that also $\overline{u_\lambda} : M_\lambda/\mathfrak m_\lambda M_\lambda \to N_\lambda/\mathfrak m_\lambda N_\lambda$ is injective. By Lemma \ref{lemma-mod-injective} we conclude that (for all sufficiently large $\lambda$) the map $u_\lambda$ is injective and that $N_\lambda/u_\lambda(M_\lambda)$ is flat over $R_\lambda$. The lemma follows. \end{proof} \begin{lemma} \label{lemma-grothendieck-general} Suppose that $R \to S$ is a local ring homomorphism of local rings. Denote by $\mathfrak m$ the maximal ideal of $R$. Suppose \begin{enumerate} \item $S$ is essentially of finite presentation over $R$, \item $S$ is flat over $R$, and \item $f \in S$ is a nonzerodivisor in $S/{\mathfrak m}S$. \end{enumerate} Then $S/fS$ is flat over $R$, and $f$ is a nonzerodivisor in $S$. \end{lemma} \begin{proof} Follows directly from Lemma \ref{lemma-mod-injective-general}. \end{proof} \begin{lemma} \label{lemma-grothendieck-regular-sequence-general} Suppose that $R \to S$ is a local ring homomorphism of local rings. Denote by $\mathfrak m$ the maximal ideal of $R$. Suppose \begin{enumerate} \item $R \to S$ is essentially of finite presentation, \item $R \to S$ is flat, and \item $f_1, \ldots, f_c$ is a sequence of elements of $S$ such that the images $\overline{f}_1, \ldots, \overline{f}_c$ form a regular sequence in $S/{\mathfrak m}S$. \end{enumerate} Then $f_1, \ldots, f_c$ is a regular sequence in $S$ and each of the quotients $S/(f_1, \ldots, f_i)$ is flat over $R$. \end{lemma} \begin{proof} Induction and Lemma \ref{lemma-grothendieck-general}. \end{proof} \noindent Here is the version of the local criterion of flatness for the case of local ring maps which are locally of finite presentation. \begin{lemma} \label{lemma-variant-local-criterion-flatness-general} Let $R \to S$ be a local homomorphism of local rings. Let $I \not = R$ be an ideal in $R$. Let $M$ be an $S$-module. Assume \begin{enumerate} \item $S$ is essentially of finite presentation over $R$, \item $M$ is of finite presentation over $S$, \item $\text{Tor}_1^R(M, R/I) = 0$, and \item $M/IM$ is flat over $R/I$. \end{enumerate} Then $M$ is flat over $R$. \end{lemma} \begin{proof} Let $\Lambda$, $R_\lambda \to S_\lambda$, $M_\lambda$ be as in Lemma \ref{lemma-limit-module-essentially-finite-presentation}. Denote by $I_\lambda \subset R_\lambda$ the inverse image of $I$. In this case the system $R/I \to S/IS$, $M/IM$, $R_\lambda/I_\lambda \to S_\lambda/I_\lambda S_\lambda$, and $M_\lambda/I_\lambda M_\lambda$ satisfies the conclusions of Lemma \ref{lemma-limit-module-essentially-finite-presentation} as well. Hence by Lemma \ref{lemma-colimit-eventually-flat} we may assume (after shrinking the index set $\Lambda$) that $M_\lambda/I_\lambda M_\lambda$ is flat over $R_\lambda/I_\lambda$ for all $\lambda$. Pick some $\lambda$ and consider $$ \text{Tor}_1^{R_\lambda}(M_\lambda, R_\lambda/I_\lambda) = \Ker(I_\lambda \otimes_{R_\lambda} M_\lambda \to M_\lambda). $$ See Remark \ref{remark-Tor-ring-mod-ideal}. The right hand side shows that this is a finitely generated $S_\lambda$-module (because $S_\lambda$ is Noetherian and the modules in question are finite). Let $\xi_1, \ldots, \xi_n$ be generators. Because $\text{Tor}_1^R(M, R/I) = 0$ and since $\otimes$ commutes with colimits we see there exists a $\lambda' \geq \lambda$ such that each $\xi_i$ maps to zero in $\text{Tor}_1^{R_{\lambda'}}(M_{\lambda'}, R_{\lambda'}/I_{\lambda'})$. The composition of the maps $$ \xymatrix{ R_{\lambda'} \otimes_{R_\lambda} \text{Tor}_1^{R_\lambda}(M_\lambda, R_\lambda/I_\lambda) \ar[d]^{\text{surjective by Lemma \ref{lemma-surjective-on-tor-one}}} \\ \text{Tor}_1^{R_\lambda}(M_\lambda, R_{\lambda'}/I_\lambda R_{\lambda'}) \ar[d]^{\text{surjective up to localization by Lemma \ref{lemma-surjective-on-tor-one-trivial}}} \\ \text{Tor}_1^{R_{\lambda'}}(M_{\lambda'}, R_{\lambda'}/I_\lambda R_{\lambda'}) \ar[d]^{\text{surjective by Lemma \ref{lemma-surjective-on-tor-one}}} \\ \text{Tor}_1^{R_{\lambda'}}(M_{\lambda'}, R_{\lambda'}/I_{\lambda'}). } $$ is surjective up to a localization by the reasons indicated. The localization is necessary since $M_{\lambda'}$ is not equal to $M_\lambda \otimes_{R_\lambda} R_{\lambda'}$. Namely, it is equal to $M_\lambda \otimes_{S_\lambda} S_{\lambda'}$ and $S_{\lambda'}$ is the localization of $S_{\lambda} \otimes_{R_\lambda} R_{\lambda'}$ whence the statement up to a localization (or tensoring with $S_{\lambda'}$). Note that Lemma \ref{lemma-surjective-on-tor-one} applies to the first and third arrows because $M_\lambda/I_\lambda M_\lambda$ is flat over $R_\lambda/I_\lambda$ and because $M_{\lambda'}/I_\lambda M_{\lambda'}$ is flat over $R_{\lambda'}/I_\lambda R_{\lambda'}$ as it is a localization of a base change of the flat module $M_\lambda/I_\lambda M_\lambda$. The composition maps the generators $\xi_i$ to zero as we explained above. We finally conclude that $\text{Tor}_1^{R_{\lambda'}}(M_{\lambda'}, R_{\lambda'}/I_{\lambda'})$ is zero. This implies that $M_{\lambda'}$ is flat over $R_{\lambda'}$ by Lemma \ref{lemma-variant-local-criterion-flatness}. \end{proof} \noindent Please compare the lemma below to Lemma \ref{lemma-criterion-flatness-fibre-Noetherian} (the case of Noetherian local rings) and Lemma \ref{lemma-criterion-flatness-fibre-nilpotent} (the case of a nilpotent ideal in the base). \begin{lemma}[Crit\`ere de platitude par fibres] \label{lemma-criterion-flatness-fibre} Let $R$, $S$, $S'$ be local rings and let $R \to S \to S'$ be local ring homomorphisms. Let $M$ be an $S'$-module. Let $\mathfrak m \subset R$ be the maximal ideal. Assume \begin{enumerate} \item The ring maps $R \to S$ and $R \to S'$ are essentially of finite presentation. \item The module $M$ is of finite presentation over $S'$. \item The module $M$ is not zero. \item The module $M/\mathfrak mM$ is a flat $S/\mathfrak mS$-module. \item The module $M$ is a flat $R$-module. \end{enumerate} Then $S$ is flat over $R$ and $M$ is a flat $S$-module. \end{lemma} \begin{proof} As in the proof of Lemma \ref{lemma-limit-essentially-finite-presentation} we may first write $R = \colim R_\lambda$ as a directed colimit of local $\mathbf{Z}$-algebras which are essentially of finite type. Denote by $\mathfrak p_\lambda$ the maximal ideal of $R_\lambda$. Next, we may assume that for some $\lambda_1 \in \Lambda$ there exist $f_{j, \lambda_1} \in R_{\lambda_1}[x_1, \ldots, x_n]$ such that $$ S = \colim_{\lambda \geq \lambda_1} S_\lambda, \text{ with } S_\lambda = (R_\lambda[x_1, \ldots, x_n]/ (f_{1, \lambda}, \ldots, f_{u, \lambda}))_{\mathfrak q_\lambda} $$ For some $\lambda_2 \in \Lambda$, $\lambda_2 \geq \lambda_1$ there exist $g_{j, \lambda_2} \in R_{\lambda_2}[x_1, \ldots, x_n, y_1, \ldots, y_m]$ with images $\overline{g}_{j, \lambda_2} \in S_{\lambda_2}[y_1, \ldots, y_m]$ such that $$ S' = \colim_{\lambda \geq \lambda_2} S'_\lambda, \text{ with } S'_\lambda = (S_\lambda[y_1, \ldots, y_m]/ (\overline{g}_{1, \lambda}, \ldots, \overline{g}_{v, \lambda}))_{\overline{\mathfrak q}'_\lambda} $$ Note that this also implies that $$ S'_\lambda = (R_\lambda[x_1, \ldots, x_n, y_1, \ldots, y_m]/ (f_{1, \lambda}, \ldots, f_{u, \lambda}, g_{1, \lambda}, \ldots, g_{v, \lambda}))_{\mathfrak q'_\lambda} $$ Choose a presentation $$ (S')^{\oplus s} \to (S')^{\oplus t} \to M \to 0 $$ of $M$ over $S'$. Let $A \in \text{Mat}(t \times s, S')$ be the matrix of the presentation. For some $\lambda_3 \in \Lambda$, $\lambda_3 \geq \lambda_2$ we can find a matrix $A_{\lambda_3} \in \text{Mat}(t \times s, S'_{\lambda_3})$ which maps to $A$. For all $\lambda \geq \lambda_3$ we let $M_\lambda = \Coker((S'_\lambda)^{\oplus s} \xrightarrow{A_\lambda} (S'_\lambda)^{\oplus t})$. \medskip\noindent With these choices, we have for each $\lambda_3 \leq \lambda \leq \mu$ that $S_\lambda \otimes_{R_{\lambda}} R_\mu \to S_\mu$ is a localization, $S'_\lambda \otimes_{S_{\lambda}} S_\mu \to S'_\mu$ is a localization, and the map $M_\lambda \otimes_{S'_\lambda} S'_\mu \to M_\mu$ is an isomorphism. This also implies that $S'_\lambda \otimes_{R_{\lambda}} R_\mu \to S'_\mu$ is a localization. Thus, since $M$ is flat over $R$ we see by Lemma \ref{lemma-colimit-eventually-flat} that for all $\lambda$ big enough the module $M_\lambda$ is flat over $R_\lambda$. Moreover, note that $ \mathfrak m = \colim \mathfrak p_\lambda $, $ S/\mathfrak mS = \colim S_\lambda/\mathfrak p_\lambda S_\lambda $, $ S'/\mathfrak mS' = \colim S'_\lambda/\mathfrak p_\lambda S'_\lambda $, and $ M/\mathfrak mM = \colim M_\lambda/\mathfrak p_\lambda M_\lambda $. Also, for each $\lambda_3 \leq \lambda \leq \mu$ we see (from the properties listed above) that $$ S'_\lambda/\mathfrak p_\lambda S'_\lambda \otimes_{S_{\lambda}/\mathfrak p_\lambda S_\lambda} S_\mu/\mathfrak p_\mu S_\mu \longrightarrow S'_\mu/\mathfrak p_\mu S'_\mu $$ is a localization, and the map $$ M_\lambda / \mathfrak p_\lambda M_\lambda \otimes_{S'_\lambda/\mathfrak p_\lambda S'_\lambda} S'_\mu /\mathfrak p_\mu S'_\mu \longrightarrow M_\mu/\mathfrak p_\mu M_\mu $$ is an isomorphism. Hence the system $(S_\lambda/\mathfrak p_\lambda S_\lambda \to S'_\lambda/\mathfrak p_\lambda S'_\lambda, M_\lambda/\mathfrak p_\lambda M_\lambda)$ is a system as in Lemma \ref{lemma-limit-module-essentially-finite-presentation} as well. We may apply Lemma \ref{lemma-colimit-eventually-flat} again because $M/\mathfrak m M$ is assumed flat over $S/\mathfrak mS$ and we see that $M_\lambda/\mathfrak p_\lambda M_\lambda$ is flat over $S_\lambda/\mathfrak p_\lambda S_\lambda$ for all $\lambda$ big enough. Thus for $\lambda$ big enough the data $R_\lambda \to S_\lambda \to S'_\lambda, M_\lambda$ satisfies the hypotheses of Lemma \ref{lemma-criterion-flatness-fibre-Noetherian}. Pick such a $\lambda$. Then $S$ is a localization of $S_\lambda \otimes_{R_\lambda} R$, hence is flat over $R$. Also $M$ is a localization of $M_\lambda \otimes_{S_\lambda} S$, hence is flat over $S$ (base change and localization preserve flatness). \end{proof} \noindent The following is an easy consequence of the ``crit\`ere de platitude par fibres'' Lemma \ref{lemma-criterion-flatness-fibre}. For more results of this kind see More on Flatness, Section \ref{flat-section-introduction}. \begin{lemma} \label{lemma-criterion-flatness-fibre-fp-over-ft} Let $R$, $S$, $S'$ be local rings and let $R \to S \to S'$ be local ring homomorphisms. Let $M$ be an $S'$-module. Let $\mathfrak m \subset R$ be the maximal ideal. Assume \begin{enumerate} \item $R \to S'$ is essentially of finite presentation, \item $R \to S$ is essentially of finite type, \item $M$ is of finite presentation over $S'$, \item $M$ is not zero, \item $M/\mathfrak mM$ is a flat $S/\mathfrak mS$-module, and \item $M$ is a flat $R$-module. \end{enumerate} Then $S$ is essentially of finite presentation and flat over $R$ and $M$ is a flat $S$-module. \end{lemma} \begin{proof} As $S$ is essentially of finite type over $R$ we can write $S = C_{\overline{\mathfrak q}}$ for some finite type $R$-algebra $C$. Write $C = R[x_1, \ldots, x_n]/I$. Let $\mathfrak q \subset R[x_1, \ldots, x_n]$ be the prime ideal corresponding to $\overline{\mathfrak q}$. Then we see that $S = B/J$ where $B = R[x_1, \ldots, x_n]_{\mathfrak q}$ is essentially of finite presentation over $R$ and $J = IB$. We can find $f_1, \ldots, f_k \in J$ such that the images $\overline{f}_i \in B/\mathfrak mB$ generate the image $\overline{J}$ of $J$ in the Noetherian ring $B/\mathfrak mB$. Hence there exist finitely generated ideals $J' \subset J$ such that $B/J' \to B/J$ induces an isomorphism $$ (B/J') \otimes_R R/\mathfrak m \longrightarrow B/J \otimes_R R/\mathfrak m = S/\mathfrak mS. $$ For any $J'$ as above we see that Lemma \ref{lemma-criterion-flatness-fibre} applies to the ring maps $$ R \longrightarrow B/J' \longrightarrow S' $$ and the module $M$. Hence we conclude that $B/J'$ is flat over $R$ for any choice $J'$ as above. Now, if $J' \subset J'' \subset J$ are two finitely generated ideals as above, then we conclude that $B/J' \to B/J''$ is a surjective map between flat $R$-algebras which are essentially of finite presentation which is an isomorphism modulo $\mathfrak m$. Hence Lemma \ref{lemma-mod-injective-general} implies that $B/J' = B/J''$, i.e., $J' = J''$. Clearly this means that $J$ is finitely generated, i.e., $S$ is essentially of finite presentation over $R$. Thus we may apply Lemma \ref{lemma-criterion-flatness-fibre} to $R \to S \to S'$ and we win. \end{proof} \begin{lemma}[Crit\`ere de platitude par fibres: locally nilpotent case] \label{lemma-criterion-flatness-fibre-locally-nilpotent} Let $$ \xymatrix{ S \ar[rr] & & S' \\ & R \ar[lu] \ar[ru] } $$ be a commutative diagram in the category of rings. Let $I \subset R$ be a locally nilpotent ideal and $M$ an $S'$-module. Assume \begin{enumerate} \item $R \to S$ is of finite type, \item $R \to S'$ is of finite presentation, \item $M$ is a finitely presented $S'$-module, \item $M/IM$ is flat as a $S/IS$-module, and \item $M$ is flat as an $R$-module. \end{enumerate} Then $M$ is a flat $S$-module and $S_\mathfrak q$ is flat and essentially of finite presentation over $R$ for every $\mathfrak q \subset S$ such that $M \otimes_S \kappa(\mathfrak q)$ is nonzero. \end{lemma} \begin{proof} If $M \otimes_S \kappa(\mathfrak q)$ is nonzero, then choose a prime in the support of this finite fibre module. Its inverse image $\mathfrak q' \subset S'$ lies over $\mathfrak q$ and $M_{\mathfrak q'} \ne 0$ (see also Lemma \ref{lemma-in-image}). Let $\mathfrak p \subset R$ be the image of $\mathfrak q$ in $\Spec(R)$. Then $I \subset \mathfrak p$ as $I$ is locally nilpotent hence $M/\mathfrak p M$ is flat over $S/\mathfrak pS$. Hence we may apply Lemma \ref{lemma-criterion-flatness-fibre-fp-over-ft} to $R_\mathfrak p \to S_\mathfrak q \to S'_{\mathfrak q'}$ and $M_{\mathfrak q'}$. We conclude that $M_{\mathfrak q'}$ is flat over $S$ and $S_\mathfrak q$ is flat and essentially of finite presentation over $R$. For every $\mathfrak q' \in \Supp_{S'}(M)$ the same local argument applies; at primes outside this support, $M_{\mathfrak q'} = 0$ is flat. Thus $M$ is flat over $S$ (Lemma \ref{lemma-flat-localization}). \end{proof} \section{Openness of the flat locus} \label{section-open-flat} % BEGIN ALGEBRA EDITORIAL ROUTE section-open-flat \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-open-flat}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-open-flat \noindent We use Lemma \ref{lemma-colimit-eventually-flat} to reduce to the Noetherian case. The Noetherian case is handled using the characterization of exact complexes given in Section \ref{section-complex-exact}. \begin{lemma} \label{lemma-CM-dim-finite-type} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $f_1, \ldots, f_i$ be elements of $S$. Assume that $S$ is Cohen-Macaulay and equidimensional of dimension $d$, and that $V(f_1, \ldots, f_i) \ne \varnothing$ and $\dim V(f_1, \ldots, f_i) \leq d - i$. Then equality holds and $f_1, \ldots, f_i$ form a regular sequence in $S_{\mathfrak q}$ for every prime $\mathfrak q$ of $V(f_1, \ldots, f_i)$. \end{lemma} \begin{proof} If $S$ is Cohen-Macaulay and equidimensional of dimension $d$, then we have $\dim(S_{\mathfrak m}) = d$ for all maximal ideals $\mathfrak m$ of $S$, see Lemma \ref{lemma-disjoint-decomposition-CM-algebra}. By Proposition \ref{proposition-CM-module} we see that for all maximal ideals $\mathfrak m \in V(f_1, \ldots, f_i)$ the sequence is a regular sequence in $S_{\mathfrak m}$ and the local ring $S_{\mathfrak m}/(f_1, \ldots, f_i)$ is Cohen-Macaulay of dimension $d - i$. This actually means that $S/(f_1, \ldots, f_i)$ is Cohen-Macaulay and equidimensional of dimension $d - i$. \end{proof} \begin{lemma} \label{lemma-open-regular-sequence} Let $R \to S$ be a finite type ring map. Let $d$ be an integer such that all fibres $S \otimes_R \kappa(\mathfrak p)$ are Cohen-Macaulay and equidimensional of dimension $d$. Let $f_1, \ldots, f_i$ be elements of $S$. The set $$ \{ \mathfrak q \in V(f_1, \ldots, f_i) \mid f_1, \ldots, f_i \text{ are a regular sequence in } S_{\mathfrak q}/\mathfrak p S_{\mathfrak q} \text{ where }\mathfrak p = R \cap \mathfrak q \} $$ is open in $V(f_1, \ldots, f_i)$. \end{lemma} \begin{proof} Write $\overline{S} = S/(f_1, \ldots, f_i)$. Suppose $\mathfrak q$ is an element of the set defined in the lemma, and $\mathfrak p$ is the corresponding prime of $R$. We will use relative dimension as defined in Definition \ref{definition-relative-dimension}. First, note that $d = \dim_{\mathfrak q}(S/R) = \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + \text{trdeg}_{\kappa(\mathfrak p)}\ \kappa(\mathfrak q)$ by Lemma \ref{lemma-dimension-at-a-point-finite-type-field}. Since $f_1, \ldots, f_i$ form a regular sequence in the Noetherian local ring $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ Lemma \ref{lemma-one-equation} tells us that $\dim(\overline{S}_{\mathfrak q}/\mathfrak p\overline{S}_{\mathfrak q}) = \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) - i$. We conclude that $\dim_{\mathfrak q}(\overline{S}/R) = \dim(\overline{S}_{\mathfrak q}/\mathfrak p\overline{S}_{\mathfrak q}) + \text{trdeg}_{\kappa(\mathfrak p)}\ \kappa(\mathfrak q) = d - i$ by Lemma \ref{lemma-dimension-at-a-point-finite-type-field}. By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} we have $\dim_{\mathfrak q'}(\overline{S}/R) \leq d - i$ for all $\mathfrak q' \in V(f_1, \ldots, f_i) = \Spec(\overline{S})$ in a neighbourhood of $\mathfrak q$. Thus after replacing $S$ by $S_g$ for some $g \in S$, $g \not \in \mathfrak q$ we may assume that the inequality holds for all $\mathfrak q'$. The result follows from Lemma \ref{lemma-CM-dim-finite-type}. \end{proof} \begin{lemma} \label{lemma-exact-on-fibres-open} Let $R \to S$ be a ring map. Consider a finite homological complex of finite free $S$-modules: $$ F_{\bullet} : 0 \to S^{n_e} \xrightarrow{\varphi_e} S^{n_{e-1}} \xrightarrow{\varphi_{e-1}} \ldots \xrightarrow{\varphi_{i + 1}} S^{n_i} \xrightarrow{\varphi_i} S^{n_{i-1}} \xrightarrow{\varphi_{i-1}} \ldots \xrightarrow{\varphi_1} S^{n_0} $$ For every prime $\mathfrak q$ of $S$ consider the complex $\overline{F}_{\bullet, \mathfrak q} = F_{\bullet, \mathfrak q} \otimes_R \kappa(\mathfrak p)$ where $\mathfrak p$ is inverse image of $\mathfrak q$ in $R$. Assume $R$ is Noetherian and there exists an integer $d$ such that $R \to S$ is of finite type and flat with fibres $S \otimes_R \kappa(\mathfrak p)$ Cohen-Macaulay of dimension $d$. The set $$ \{\mathfrak q \in \Spec(S) \mid \overline{F}_{\bullet, \mathfrak q}\text{ is exact}\} $$ is open in $\Spec(S)$. \end{lemma} \begin{proof} Let $\mathfrak q$ be an element of the set defined in the lemma. We are going to use Proposition \ref{proposition-what-exact} to show there exists a $g \in S$, $g \not \in \mathfrak q$ such that $D(g)$ is contained in the set defined in the lemma. In other words, we are going to show that after replacing $S$ by $S_g$, the set of the lemma is all of $\Spec(S)$. Thus during the proof we will, finitely often, replace $S$ by such a localization. Recall that Proposition \ref{proposition-what-exact} characterizes exactness of complexes in terms of ranks of the maps $\varphi_i$ and the ideals $I(\varphi_i)$, in case the ring is local. We first address the rank condition. Set $r_i = n_i - n_{i + 1} + \ldots + (-1)^{e - i} n_e$. Note that $r_i + r_{i + 1} = n_i$ and note that $r_i$ is the expected rank of $\varphi_i$ (in the exact case). \medskip\noindent By Lemma \ref{lemma-complex-exact-mod} we see that if $\overline{F}_{\bullet, \mathfrak q}$ is exact, then the localization $F_{\bullet, \mathfrak q}$ is exact. In particular the complex $F_\bullet$ becomes exact after localizing by an element $g \in S$, $g \not \in \mathfrak q$. In this case Proposition \ref{proposition-what-exact} applied to all localizations of $S$ at prime ideals implies that all $(r_i + 1) \times (r_i + 1)$-minors of $\varphi_i$ are zero. Thus we see that the rank of $\varphi_i$ is at most $r_i$. \medskip\noindent Let $I_i \subset S$ denote the ideal generated by the $r_i \times r_i$-minors of the matrix of $\varphi_i$. By Proposition \ref{proposition-what-exact} the complex $\overline{F}_{\bullet, \mathfrak q}$ is exact if and only if for every $1 \leq i \leq e$ we have either $(I_i)_{\mathfrak q} = S_{\mathfrak q}$ or $(I_i)_{\mathfrak q}$ contains a $S_{\mathfrak q}/\mathfrak p S_{\mathfrak q}$-regular sequence of length $i$. Namely, by our choice of $r_i$ above and by the bound on the ranks of the $\varphi_i$ this is the only way the conditions of Proposition \ref{proposition-what-exact} can be satisfied. \medskip\noindent If $(I_i)_{\mathfrak q} = S_{\mathfrak q}$, then after localizing $S$ at some element $g \not\in \mathfrak q$ we may assume that $I_i = S$. Clearly, this is an open condition. \medskip\noindent If $(I_i)_{\mathfrak q} \not = S_{\mathfrak q}$, then we have a sequence $f_1, \ldots, f_i \in (I_i)_{\mathfrak q}$ which form a regular sequence in $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$. After further localizing away from $\mathfrak q$, take these same fraction representatives as elements of $I_i \subset S$. Note that for any prime $\mathfrak q' \subset S$ such that $(f_1, \ldots, f_i) \not \subset \mathfrak q'$ we have $(I_i)_{\mathfrak q'} = S_{\mathfrak q'}$. Thus the result follows from Lemma \ref{lemma-open-regular-sequence}. \end{proof} \begin{theorem} \label{theorem-openness-flatness} Let $R$ be a ring. Let $R \to S$ be a ring map of finite presentation. Let $M$ be a finitely presented $S$-module. The set $$ \{ \mathfrak q \in \Spec(S) \mid M_{\mathfrak q}\text{ is flat over }R\} $$ is open in $\Spec(S)$. \end{theorem} \begin{proof} Let $\mathfrak q \in \Spec(S)$ be a prime. Let $\mathfrak p \subset R$ be the inverse image of $\mathfrak q$ in $R$. Note that $M_{\mathfrak q}$ is flat over $R$ if and only if it is flat over $R_{\mathfrak p}$. Let us assume that $M_{\mathfrak q}$ is flat over $R$. We claim that there exists a $g \in S$, $g \not \in \mathfrak q$ such that $M_g$ is flat over $R$. \medskip\noindent We first reduce to the case where $R$ and $S$ are of finite type over $\mathbf{Z}$. Choose a directed set $\Lambda$ and a system $(R_\lambda \to S_\lambda, M_\lambda)$ as in Lemma \ref{lemma-limit-module-finite-presentation}. Set $\mathfrak p_\lambda$ equal to the inverse image of $\mathfrak p$ in $R_\lambda$. Set $\mathfrak q_\lambda$ equal to the inverse image of $\mathfrak q$ in $S_\lambda$. Then the system $$ ((R_\lambda)_{\mathfrak p_\lambda}, (S_\lambda)_{\mathfrak q_\lambda}, (M_\lambda)_{\mathfrak q_{\lambda}}) $$ is a system as in Lemma \ref{lemma-limit-module-essentially-finite-presentation}. Hence by Lemma \ref{lemma-colimit-eventually-flat} we see that for some $\lambda$ the module $M_\lambda$ is flat over $R_\lambda$ at the prime $\mathfrak q_{\lambda}$. Suppose we can prove our claim for the system $(R_\lambda \to S_\lambda, M_\lambda, \mathfrak q_{\lambda})$. In other words, suppose that we can find a $g \in S_\lambda$, $g \not\in \mathfrak q_\lambda$ such that $(M_\lambda)_g$ is flat over $R_\lambda$. By Lemma \ref{lemma-limit-module-finite-presentation} we have $M = M_\lambda \otimes_{R_\lambda} R$ and hence also $M_g = (M_\lambda)_g \otimes_{R_\lambda} R$. Thus by Lemma \ref{lemma-flat-base-change} we deduce the claim for the system $(R \to S, M, \mathfrak q)$. \medskip\noindent At this point we may assume that $R$ and $S$ are of finite type over $\mathbf{Z}$. We may write $S$ as a quotient of a polynomial ring $R[x_1, \ldots, x_n]$. Of course, we may replace $S$ by $R[x_1, \ldots, x_n]$ and assume that $S$ is a polynomial ring over $R$. In particular we see that $R \to S$ is flat and all fibre rings $S \otimes_R \kappa(\mathfrak p)$ have global dimension $n$. \medskip\noindent If $n = 0$, then $S = R$ and the finite flat module $M_{\mathfrak q}$ is free, including rank zero. Its basis spreads after a localization, proving the claim. Hence assume $n \geq 1$. Choose a resolution $F_\bullet$ of $M$ over $S$ with each $F_i$ finite free, see Lemma \ref{lemma-resolution-by-finite-free}. Let $K_1 = \Ker(F_0 \to M)$ and, for $n \geq 2$, let $K_n = \Ker(F_{n-1} \to F_{n-2})$. Note that $(K_n)_{\mathfrak q}$ is flat over $R$, since each $F_i$ is flat over $R$ and by assumption on $M$, see Lemma \ref{lemma-flat-ses}. In addition, the sequence $$ 0 \to K_n/\mathfrak p K_n \to F_{n-1}/ \mathfrak p F_{n-1} \to \ldots \to F_0 / \mathfrak p F_0 \to M/\mathfrak p M \to 0 $$ is exact upon localizing at $\mathfrak q$, because of vanishing of $\text{Tor}_i^{R_\mathfrak p}(\kappa(\mathfrak p), M_{\mathfrak q})$. Since the global dimension of $S_\mathfrak q/\mathfrak p S_{\mathfrak q}$ is at most $n$ we conclude that $K_n / \mathfrak p K_n$ localized at $\mathfrak q$ is a finite free module over $S_\mathfrak q/\mathfrak p S_{\mathfrak q}$. By Lemma \ref{lemma-free-fibre-flat-free} $(K_n)_{\mathfrak q}$ is free over $S_{\mathfrak q}$. In particular, there exists a $g \in S$, $g \not \in \mathfrak q$ such that $(K_n)_g$ is finite free over $S_g$. \medskip\noindent By Lemma \ref{lemma-exact-on-fibres-open} there exists a further localization $S_g$ such that the complex $$ 0 \to K_n \to F_{n-1} \to \ldots \to F_0 $$ is exact on {\it all fibres} of $R \to S$. By Lemma \ref{lemma-complex-exact-mod} this implies that the cokernel of $F_1 \to F_0$ is flat. This proves the theorem in the Noetherian case. \end{proof} \section{Openness of Cohen-Macaulay loci} \label{section-CM-open} % BEGIN ALGEBRA EDITORIAL ROUTE section-CM-open \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-CM-open}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-CM-open \noindent In this section we characterize the Cohen-Macaulay property of finite type algebras in terms of flatness. We then use this to prove the set of points where such an algebra is Cohen-Macaulay is open. \begin{lemma} \label{lemma-where-CM} Let $S$ be a finite type algebra over a field $k$. Let $\varphi : k[y_1, \ldots, y_d] \to S$ be a quasi-finite ring map. As subsets of $\Spec(S)$ we have $$ \{ \mathfrak q \mid S_{\mathfrak q} \text{ is flat over }k[y_1, \ldots, y_d]\} = \{ \mathfrak q \mid S_{\mathfrak q} \text{ is CM and }\dim_{\mathfrak q}(S/k) = d\} $$ For notation see Definition \ref{definition-relative-dimension}. \end{lemma} \begin{proof} Let $\mathfrak q \subset S$ be a prime. Set $\mathfrak p = k[y_1, \ldots, y_d] \cap \mathfrak q$. Note that always $\dim(S_{\mathfrak q}) \leq \dim(k[y_1, \ldots, y_d]_{\mathfrak p})$ by Lemma \ref{lemma-dimension-inequality-quasi-finite} for example. Moreover, the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite and hence $\text{trdeg}_k(\kappa(\mathfrak p)) = \text{trdeg}_k(\kappa(\mathfrak q))$. \medskip\noindent Let $\mathfrak q$ be an element of the left hand side. Then Lemma \ref{lemma-finite-flat-over-regular-CM} applies and we conclude that $S_{\mathfrak q}$ is Cohen-Macaulay and $\dim(S_{\mathfrak q}) = \dim(k[y_1, \ldots, y_d]_{\mathfrak p})$. Combined with the equality of transcendence degrees above and Lemma \ref{lemma-dimension-at-a-point-finite-type-field} this implies that $\dim_{\mathfrak q}(S/k) = d$. Hence $\mathfrak q$ is an element of the right hand side. \medskip\noindent Let $\mathfrak q$ be an element of the right hand side. By the equality of transcendence degrees above, the assumption that $\dim_{\mathfrak q}(S/k) = d$ and Lemma \ref{lemma-dimension-at-a-point-finite-type-field} we conclude that $\dim(S_{\mathfrak q}) = \dim(k[y_1, \ldots, y_d]_{\mathfrak p})$. Hence Lemma \ref{lemma-CM-over-regular-flat} applies and we see that $\mathfrak q$ is an element of the left hand side. \end{proof} \begin{lemma} \label{lemma-finite-type-over-field-CM-open} Let $S$ be a finite type algebra over a field $k$. The set of primes $\mathfrak q$ such that $S_{\mathfrak q}$ is Cohen-Macaulay is open in $\Spec(S)$. \end{lemma} \noindent This lemma is a special case of Lemma \ref{lemma-finite-presentation-flat-CM-locus-open} below, so you can skip straight to the proof of that lemma if you like. \begin{proof} Let $\mathfrak q \subset S$ be a prime such that $S_{\mathfrak q}$ is Cohen-Macaulay. We have to show there exists a $g \in S$, $g \not \in \mathfrak q$ such that the ring $S_g$ is Cohen-Macaulay. For any $g \in S$, $g \not \in \mathfrak q$ we may replace $S$ by $S_g$ and $\mathfrak q$ by $\mathfrak qS_g$. Combining this with Lemmas \ref{lemma-Noether-normalization-at-point} and \ref{lemma-dimension-at-a-point-finite-type-field} we may assume that there exists a finite injective ring map $k[y_1, \ldots, y_d] \to S$ with $d = \dim(S_{\mathfrak q}) + \text{trdeg}_k(\kappa(\mathfrak q))$. Set $\mathfrak p = k[y_1, \ldots, y_d] \cap \mathfrak q$. By construction we see that $\mathfrak q$ is an element of the right hand side of the displayed equality of Lemma \ref{lemma-where-CM}. Hence it is also an element of the left hand side. \medskip\noindent By Theorem \ref{theorem-openness-flatness} we see that for some $g \in S$, $g \not \in \mathfrak q$ the ring $S_g$ is flat over $k[y_1, \ldots, y_d]$. Hence by the equality of Lemma \ref{lemma-where-CM} again we conclude that all local rings of $S_g$ are Cohen-Macaulay as desired. \end{proof} \begin{lemma} \label{lemma-generic-CM} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. The set of Cohen-Macaulay primes forms a dense open $U \subset \Spec(S)$. \end{lemma} \begin{proof} The set is open by Lemma \ref{lemma-finite-type-over-field-CM-open}. It contains all minimal primes $\mathfrak q \subset S$ since the local ring at a minimal prime $S_{\mathfrak q}$ has dimension zero and hence is Cohen-Macaulay. \end{proof} \begin{lemma} \label{lemma-finite-presentation-flat-CM-locus-open} Let $R$ be a ring. Let $R \to S$ be of finite presentation and flat. For any $d \geq 0$ the set $$ \left\{ \begin{matrix} \mathfrak q \in \Spec(S) \text{ such that setting }\mathfrak p = R \cap \mathfrak q \text{ the fibre ring}\\ S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} \text{ is Cohen-Macaulay} \text{ and } \dim_{\mathfrak q}(S/R) = d \end{matrix} \right\} $$ is open in $\Spec(S)$. \end{lemma} \begin{proof} Let $\mathfrak q$ be an element of the set indicated, with $\mathfrak p$ the corresponding prime of $R$. We have to find a $g \in S$, $g \not \in \mathfrak q$ such that all fibre rings of $R \to S_g$ are Cohen-Macaulay and $\dim_{\mathfrak r}(S_g/R) = d$ for every prime $\mathfrak r \subset S_g$. During the course of the proof we may (finitely many times) replace $S$ by $S_g$ for a $g \in S$, $g \not \in \mathfrak q$. Thus by Lemma \ref{lemma-quasi-finite-over-polynomial-algebra} we may assume there is a quasi-finite ring map $R[t_1, \ldots, t_d] \to S$ with $d = \dim_{\mathfrak q}(S/R)$. Let $\mathfrak q' = R[t_1, \ldots, t_d] \cap \mathfrak q$. By Lemma \ref{lemma-where-CM} we see that the ring map $$ R[t_1, \ldots, t_d]_{\mathfrak q'} / \mathfrak p R[t_1, \ldots, t_d]_{\mathfrak q'} \longrightarrow S_{\mathfrak q}/\mathfrak p S_{\mathfrak q} $$ is flat. Hence by the crit\`ere de platitude par fibres Lemma \ref{lemma-criterion-flatness-fibre} we see that $R[t_1, \ldots, t_d]_{\mathfrak q'} \to S_{\mathfrak q}$ is flat. Hence by Theorem \ref{theorem-openness-flatness} we see that for some $g \in S$, $g \not \in \mathfrak q$, the ring map $R[t_1, \ldots, t_d] \to S_g$ is flat. Replacing $S$ by $S_g$ we see that for every prime $\mathfrak r \subset S$, setting $\mathfrak r' = R[t_1, \ldots, t_d] \cap \mathfrak r$ and $\mathfrak p' = R \cap \mathfrak r$ the local ring map $R[t_1, \ldots, t_d]_{\mathfrak r'} \to S_{\mathfrak r}$ is flat. Hence also the base change $$ R[t_1, \ldots, t_d]_{\mathfrak r'} / \mathfrak p' R[t_1, \ldots, t_d]_{\mathfrak r'} \longrightarrow S_{\mathfrak r}/\mathfrak p' S_{\mathfrak r} $$ is flat. Hence by Lemma \ref{lemma-where-CM} applied with $k = \kappa(\mathfrak p')$ we see $\mathfrak r$ is in the set of the lemma as desired. \end{proof} \begin{lemma} \label{lemma-generic-CM-flat-finite-presentation} Let $R$ be a ring. Let $R \to S$ be flat of finite presentation. The set of primes $\mathfrak q$ such that the fibre ring $S_{\mathfrak q} \otimes_R \kappa(\mathfrak p)$, with $\mathfrak p = R \cap \mathfrak q$ is Cohen-Macaulay is open and dense in every fibre of $\Spec(S) \to \Spec(R)$. \end{lemma} \begin{proof} The set, call it $W$, is open by Lemma \ref{lemma-finite-presentation-flat-CM-locus-open}. It is dense in the fibres because the intersection of $W$ with a fibre is the corresponding set of the fibre to which Lemma \ref{lemma-generic-CM} applies. \end{proof} \begin{lemma} \label{lemma-extend-field-CM-locus} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $K/k$ be a field extension, and set $S_K = K \otimes_k S$. Let $\mathfrak q \subset S$ be a prime of $S$. Let $\mathfrak q_K \subset S_K$ be a prime of $S_K$ lying over $\mathfrak q$. Then $S_{\mathfrak q}$ is Cohen-Macaulay if and only if $(S_K)_{\mathfrak q_K}$ is Cohen-Macaulay. \end{lemma} \begin{proof} During the course of the proof we may (finitely many times) replace $S$ by $S_g$ for any $g \in S$, $g \not \in \mathfrak q$. Hence using Lemma \ref{lemma-Noether-normalization-at-point} we may assume that $\dim(S) = \dim_{\mathfrak q}(S/k) =: d$ and find a finite injective map $k[x_1, \ldots, x_d] \to S$. Note that this also induces a finite injective map $K[x_1, \ldots, x_d] \to S_K$ by base change. By Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension} we have $\dim_{\mathfrak q_K}(S_K/K) = d$. Set $\mathfrak p = k[x_1, \ldots, x_d] \cap \mathfrak q$ and $\mathfrak p_K = K[x_1, \ldots, x_d] \cap \mathfrak q_K$. Consider the following commutative diagram of Noetherian local rings $$ \xymatrix{ S_{\mathfrak q} \ar[r] & (S_K)_{\mathfrak q_K} \\ k[x_1, \ldots, x_d]_{\mathfrak p} \ar[r] \ar[u] & K[x_1, \ldots, x_d]_{\mathfrak p_K} \ar[u] } $$ By Lemma \ref{lemma-where-CM} we have to show that the left vertical arrow is flat if and only if the right vertical arrow is flat. Because the bottom arrow is flat this equivalence holds by Lemma \ref{lemma-base-change-flat-up-down}. \end{proof} \begin{lemma} \label{lemma-CM-locus-commutes-base-change} Let $R$ be a ring. Let $R \to S$ be of finite type. Let $R \to R'$ be any ring map. Set $S' = R' \otimes_R S$. Denote by $f : \Spec(S') \to \Spec(S)$ the map associated to the ring map $S \to S'$. Set $W$ equal to the set of primes $\mathfrak q$ such that the fibre ring $S_{\mathfrak q} \otimes_R \kappa(\mathfrak p)$, $\mathfrak p = R \cap \mathfrak q$ is Cohen-Macaulay, and let $W'$ denote the analogue for $S'/R'$. Then $W' = f^{-1}(W)$. \end{lemma} \begin{proof} Trivial from Lemma \ref{lemma-extend-field-CM-locus} and the definitions. \end{proof} \begin{lemma} \label{lemma-relative-dimension-CM} Let $R$ be a ring. Let $R \to S$ be a ring map which (a) is flat, (b) is of finite presentation, and (c) has Cohen-Macaulay fibres. Then we can write $S = S_0 \times \ldots \times S_n$ as a product of $R$-algebras $S_d$ such that each $S_d$ satisfies (a), (b), (c) and has all nonempty fibres equidimensional of dimension $d$. \end{lemma} \begin{proof} For each integer $d$ denote by $W_d \subset \Spec(S)$ the set defined in Lemma \ref{lemma-finite-presentation-flat-CM-locus-open}. Clearly we have $\Spec(S) = \coprod W_d$, and each $W_d$ is open by the lemma we just quoted. Hence the result follows from Lemma \ref{lemma-disjoint-implies-product}. \end{proof} \section{Differentials} \label{section-differentials} % BEGIN ALGEBRA EDITORIAL ROUTE section-differentials \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-differentials}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-differentials \noindent In this section we define the module of differentials of a ring map. \begin{definition} \label{definition-derivation} Let $\varphi : R \to S$ be a ring map and let $M$ be an $S$-module. A {\it derivation}, or more precisely an {\it $R$-derivation} into $M$ is a map $D : S \to M$ which is additive, annihilates elements of $\varphi(R)$, and satisfies the {\it Leibniz rule}: $D(ab) = aD(b) + bD(a)$. \end{definition} \noindent Note that $D(ra) = rD(a)$ if $r \in R$ and $a \in S$. An equivalent definition is that an $R$-derivation is an $R$-linear map $D : S \to M$ which satisfies the Leibniz rule. The set of all $R$-derivations forms an $S$-module: Given two $R$-derivations $D, D'$ the sum $D + D' : S \to M$, $a \mapsto D(a)+D'(a)$ is an $R$-derivation, and given an $R$-derivation $D$ and an element $c\in S$ the scalar multiple $cD : S \to M$, $a \mapsto cD(a)$ is an $R$-derivation. We denote this $S$-module $$ \text{Der}_R(S, M). $$ Also, if $\alpha : M \to N$ is an $S$-module map, then the composition $\alpha \circ D$ is an $R$-derivation into $N$. In this way the assignment $M \mapsto \text{Der}_R(S, M)$ is a covariant functor. \medskip\noindent Consider the following map of free $S$-modules $$ \bigoplus\nolimits_{(a, b)\in S^2} S[(a, b)] \oplus \bigoplus\nolimits_{(f, g)\in S^2} S[(f, g)] \oplus \bigoplus\nolimits_{r\in R} S[r] \longrightarrow \bigoplus\nolimits_{a\in S} S[a] $$ defined by the rules $$ [(a, b)] \longmapsto [a + b] - [a] - [b],\quad [(f, g)] \longmapsto [fg] -f[g] - g[f],\quad [r] \longmapsto [\varphi(r)] $$ with obvious notation. Let $\Omega_{S/R}$ be the cokernel of this map. There is a map $\text{d} : S \to \Omega_{S/R}$ which maps $a$ to the class $\text{d}a$ of $[a]$ in the cokernel. This is an $R$-derivation by the relations imposed on $\Omega_{S/R}$, in other words $$ \text{d}(a + b) = \text{d}a + \text{d}b, \quad \text{d}(fg) = f\text{d}g + g\text{d}f, \quad \text{d}\varphi(r) = 0 $$ where $a,b,f,g \in S$ and $r \in R$. \begin{definition} \label{definition-differentials} The pair $(\Omega_{S/R}, \text{d})$ is called the {\it module of K\"ahler differentials} or the {\it module of differentials} of $S$ over $R$. \end{definition} \begin{lemma} \label{lemma-universal-omega} \begin{slogan} Maps out of the module of differentials are the same as derivations. \end{slogan} The module of differentials of $S$ over $R$ has the following universal property. The map $$ \Hom_S(\Omega_{S/R}, M) \longrightarrow \text{Der}_R(S, M), \quad \alpha \longmapsto \alpha \circ \text{d} $$ is an isomorphism of functors. \end{lemma} \begin{proof} By definition an $R$-derivation is a rule which associates to each $a \in S$ an element $D(a) \in M$. Thus $D$ gives rise to a map $[D] : \bigoplus S[a] \to M$. However, the conditions of being an $R$-derivation exactly mean that $[D]$ annihilates the image of the map in the displayed presentation of $\Omega_{S/R}$ above. \end{proof} \begin{lemma} \label{lemma-trivial-differential-surjective} Suppose that $R \to S$ is surjective. Then $\Omega_{S/R} = 0$. \end{lemma} \begin{proof} You can see this either because all $R$-derivations clearly have to be zero, or because the map in the presentation of $\Omega_{S/R}$ is surjective. \end{proof} \noindent Suppose that \begin{equation} \label{equation-functorial-omega} \vcenter{ \xymatrix{ S \ar[r]_\varphi & S' \\ R \ar[r]^\psi \ar[u]^\alpha & R' \ar[u]_\beta } } \end{equation} is a commutative diagram of rings. In this case there is a natural map of modules of differentials fitting into the commutative diagram $$ \xymatrix{ \Omega_{S/R} \ar[r] & \Omega_{S'/R'} \\ S \ar[u]^{\text{d}} \ar[r]^{\varphi} & S' \ar[u]_{\text{d}} } $$ To construct the map just use the obvious map between the presentations for $\Omega_{S/R}$ and $\Omega_{S'/R'}$. Namely, \begin{equation} \label{equation-map-presentations} \vcenter{ \xymatrix{ \bigoplus S'[(a', b')] \oplus \bigoplus S'[(f', g')] \oplus \bigoplus S'[r'] \ar[r] & \bigoplus S' [a'] \\ \\ \bigoplus S[(a, b)] \oplus \bigoplus S[(f, g)] \oplus \bigoplus S[r] \ar[r] \ar[uu]^{ \begin{matrix} [(a, b)] \mapsto [(\varphi(a), \varphi(b))] \\ [(f, g)] \mapsto [(\varphi(f), \varphi(g))] \\ [r]\mapsto [\psi(r)] \end{matrix} } & \bigoplus S[a] \ar[uu]_{[a] \mapsto [\varphi(a)]} } } \end{equation} The result is simply that $f\text{d}g \in \Omega_{S/R}$ is mapped to $\varphi(f)\text{d}\varphi(g)$. \begin{lemma} \label{lemma-colimit-differentials} Let $I$ be a directed set. Let $(R_i \to S_i, \varphi_{ii'})$ be a system of ring maps over $I$, see Categories, Section \ref{categories-section-posets-limits}. Then we have $$ \Omega_{S/R} = \colim_i \Omega_{S_i/R_i}, $$ where $R \to S = \colim (R_i \to S_i)$. \end{lemma} \begin{proof} This is clear from the defining presentation of $\Omega_{S/R}$ and the functoriality of this described above. \end{proof} \begin{lemma} \label{lemma-differential-surjective} In diagram (\ref{equation-functorial-omega}), suppose that $S \to S'$ is surjective with kernel $I \subset S$. Then $\Omega_{S/R} \to \Omega_{S'/R'}$ is surjective with kernel generated as an $S$-module by the elements $\text{d}a$, where $a \in S$ is such that $\varphi(a) \in \beta(R')$. (This includes in particular the elements $\text{d}(i)$, $i \in I$.) \end{lemma} \begin{proof}[First proof] Consider the map of presentations (\ref{equation-map-presentations}). Clearly the right vertical map of free modules is surjective. Thus the map is surjective. Suppose that some element $\eta$ of $\Omega_{S/R}$ maps to zero in $\Omega_{S'/R'}$. Write $\eta$ as the image of $\sum s_i[a_i]$ for some $s_i, a_i \in S$. Then we see that $\sum \varphi(s_i)[\varphi(a_i)]$ is the image of an element $$ \theta = \sum s_j'[a_j', b_j'] + \sum s_k'[f_k', g_k'] + \sum s_l'[r_l'] $$ in the upper left corner of the diagram. Since $\varphi$ is surjective, the terms $s_j'[a_j', b_j']$ and $s_k'[f_k', g_k']$ are in the image of elements in the lower left corner. Thus, modifying $\eta$ and $\theta$ by subtracting the images of these elements, we may assume $\theta = \sum s_l'[r_l']$. In other words, we see $\sum \varphi(s_i)[\varphi(a_i)]$ is of the form $\sum s'_l [\beta(r'_l)]$. Next, we may assume that we have some $a' \in S'$ such that $a' = \varphi(a_i)$ for all $i$ and $a' = \beta(r_l')$ for all $l$. This is clear from the direct sum decomposition of the upper right corner of the diagram. Choose $a \in S$ with $\varphi(a) = a'$. Then we can write $a_i = a + x_i$ for some $x_i \in I$. Thus we may assume that all $a_i$ are equal to $a$ by using the relations that are allowed. But then we may assume our element is of the form $s[a]$. We still know that $\varphi(s)[a'] = \sum s_l'[\beta(r_l')]$. Hence either $\varphi(s) = 0$ and we're done, or $a' = \varphi(a)$ is in the image of $\beta$ and we're done as well. \end{proof} \begin{proof}[Second proof] We will use the universal property of modules of differentials given in Lemma \ref{lemma-universal-omega} without further mention. \medskip\noindent In (\ref{equation-functorial-omega}) let $R'' = S \times_{S'} R'$. Then we have the following diagram: $$ \xymatrix{ S \ar[r] & S \ar[r] & S' \\ R \ar[r] \ar[u] & R'' \ar[r] \ar[u] & R' \ar[u] } $$ Let $M$ be an $S$-module. It follows immediately from the definitions that an $R$-derivation $D : S \to M$ is an $R''$-derivation if and only if it annihilates the elements in the image of $R'' \to S$. The universal property translates this into the statement that the natural map $\Omega_{S/R} \to \Omega_{S/R''}$ is surjective with kernel generated as an $S$-module by the differentials of elements in the image of $R''$. \medskip\noindent From the previous paragraph we see that it suffices to show that $\Omega_{S/R} \to \Omega_{S'/R'}$ is an isomorphism when $S \to S'$ is surjective and $R = S \times_{S'} R'$. Let $M'$ be an $S'$-module. Observe that any $R'$-derivation $D' : S' \to M'$ gives an $R$-derivation by precomposing with $S \to S'$. Conversely, suppose $M$ is an $S$-module and $D : S \to M$ is an $R$-derivation. If $i \in I$, then there exists an $a \in R$ with $\alpha(a) = i$ (as $R = S \times_{S'} R'$). It follows that $D(i) = 0$ and hence $0 = D(is) = iD(s)$ for all $s \in S$. Thus the image of $D$ is contained in the submodule $M' \subset M$ of elements annihilated by $I$ and moreover the induced map $S \to M'$ factors through an $R'$-derivation $S' \to M'$. It is an exercise to use the universal property to see that this means $\Omega_{S/R} \to \Omega_{S'/R'}$ is an isomorphism; details omitted. \end{proof} \begin{lemma} \label{lemma-exact-sequence-differentials} Let $A \to B \to C$ be ring maps. Then there is a canonical exact sequence $$ C \otimes_B \Omega_{B/A} \to \Omega_{C/A} \to \Omega_{C/B} \to 0 $$ of $C$-modules. \end{lemma} \begin{proof} We get a diagram (\ref{equation-functorial-omega}) by putting $R = A$, $S = C$, $R' = B$, and $S' = C$. By Lemma \ref{lemma-differential-surjective} the map $\Omega_{C/A} \to \Omega_{C/B}$ is surjective, and the kernel is generated by the elements $\text{d}(c)$, where $c \in C$ is in the image of $B \to C$. The lemma follows. \end{proof} \begin{lemma} \label{lemma-differentials-localize} Let $\varphi : A \to B$ be a ring map. \begin{enumerate} \item If $S \subset A$ is a multiplicative subset mapping to invertible elements of $B$, then $\Omega_{B/A} = \Omega_{B/S^{-1}A}$. \item If $S \subset B$ is a multiplicative subset then $S^{-1}\Omega_{B/A} = \Omega_{S^{-1}B/A}$. \end{enumerate} \end{lemma} \begin{proof} To show the equality of (1) it is enough to show that any $A$-derivation $D : B \to M$ annihilates the elements $\varphi(s)^{-1}$. This is clear from the Leibniz rule applied to $1 = \varphi(s) \varphi(s)^{-1}$. To show (2), note that there is an obvious map $S^{-1}\Omega_{B/A} \to \Omega_{S^{-1}B/A}$. To show it is an isomorphism it is enough to show that there is an $A$-derivation $\text{d}'$ of $S^{-1}B$ into $S^{-1}\Omega_{B/A}$. To define it we simply set $\text{d}'(b/s) = (1/s)\text{d}b - (1/s^2)b\text{d}s$. Details omitted. \end{proof} \begin{lemma} \label{lemma-differential-seq} In diagram (\ref{equation-functorial-omega}), suppose that $S \to S'$ is surjective with kernel $I \subset S$, and assume that $R' = R$. Then there is a canonical exact sequence of $S'$-modules $$ I/I^2 \longrightarrow \Omega_{S/R} \otimes_S S' \longrightarrow \Omega_{S'/R} \longrightarrow 0. $$ The leftmost map is characterized by the rule that $f \in I$ maps to $\text{d}f \otimes 1$. \end{lemma} \begin{proof} The middle term is $\Omega_{S/R} \otimes_S S/I$. For $f \in I$ denote by $\overline{f}$ the image of $f$ in $I/I^2$. To show that the map $\overline{f} \mapsto \text{d}f \otimes 1$ is well defined we just have to check that $\text{d} f_1f_2 \otimes 1 = 0$ if $f_1, f_2 \in I$. And this is clear from the Leibniz rule $\text{d} f_1f_2 \otimes 1 = (f_1 \text{d}f_2 + f_2 \text{d} f_1 )\otimes 1 = \text{d}f_2 \otimes f_1 + \text{d}f_1 \otimes f_2 = 0$. A similar computation shows this map is $S' = S/I$-linear. \medskip\noindent The map $\Omega_{S/R} \otimes_S S' \to \Omega_{S'/R}$ is the canonical $S'$-linear map associated to the $S$-linear map $\Omega_{S/R} \to \Omega_{S'/R}$. It is surjective because $\Omega_{S/R} \to \Omega_{S'/R}$ is surjective by Lemma \ref{lemma-differential-surjective}. \medskip\noindent The composite of the two maps is zero because $\text{d}f$ maps to zero in $\Omega_{S'/R}$ for $f \in I$. Note that exactness just says that the kernel of $\Omega_{S/R} \to \Omega_{S'/R}$ is generated as an $S$-submodule by the submodule $I\Omega_{S/R}$ together with the elements $\text{d}f$, with $f \in I$. We know by Lemma \ref{lemma-differential-surjective} that this kernel is generated by the elements $\text{d}(a)$ where $\varphi(a) = \beta(r)$ for some $r \in R$. But then $a = \alpha(r) + a - \alpha(r)$, so $\text{d}(a) = \text{d}(a - \alpha(r))$. And $a - \alpha(r) \in I$ since $\varphi(a - \alpha(r)) = \varphi(a) - \varphi(\alpha(r)) = \beta(r) - \beta(r) = 0$. We conclude the elements $\text{d}f$ with $f \in I$ already generate the kernel as an $S$-module, as desired. \end{proof} \begin{lemma} \label{lemma-differential-seq-split} In diagram (\ref{equation-functorial-omega}), suppose that $S \to S'$ is surjective with kernel $I \subset S$, and assume that $R' = R$. Moreover, assume that there exists an $R$-algebra map $S' \to S$ which is a right inverse to $S \to S'$. Then the exact sequence of $S'$-modules of Lemma \ref{lemma-differential-seq} turns into a short exact sequence $$ 0 \longrightarrow I/I^2 \longrightarrow \Omega_{S/R} \otimes_S S' \longrightarrow \Omega_{S'/R} \longrightarrow 0 $$ which is even a split short exact sequence. \end{lemma} \begin{proof} Let $\beta : S' \to S$ be the right inverse to the surjection $\alpha : S \to S'$. Consider the map $$ D : S \longrightarrow I/I^2, \quad x \longmapsto x - \beta(\alpha(x)). $$ It is easy to show that $D$ is an $R$-derivation (omitted). Moreover $x D(s) = 0$ if $x \in I, s \in S$. Hence, by the universal property $D$ induces a map $\tau : \Omega_{S/R} \otimes_S S' \to I/I^2$. We omit the verification that it is a left inverse to $\text{d} : I/I^2 \to \Omega_{S/R} \otimes_S S'$. Hence we win. \end{proof} \begin{lemma} \label{lemma-differential-mod-power-ideal} Let $R \to S$ be a ring map. Let $I \subset S$ be an ideal. Let $n \geq 1$ be an integer. Set $S' = S/I^{n + 1}$. The map $\Omega_{S/R} \to \Omega_{S'/R}$ induces an isomorphism $$ \Omega_{S/R} \otimes_S S/I^n \longrightarrow \Omega_{S'/R} \otimes_{S'} S/I^n. $$ \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-differential-seq} and the fact that $\text{d}(I^{n + 1}) \subset I^n\Omega_{S/R}$ by the Leibniz rule for $\text{d}$. \end{proof} \begin{lemma} \label{lemma-differentials-base-change} Suppose that we have ring maps $R \to R'$ and $R \to S$. Set $S' = S \otimes_R R'$, so that we obtain a diagram (\ref{equation-functorial-omega}). Then the canonical map defined above induces an isomorphism $\Omega_{S/R} \otimes_R R' = \Omega_{S'/R'}$. \end{lemma} \begin{proof} Let $\text{d}' : S' = S \otimes_R R' \to \Omega_{S/R} \otimes_R R'$ denote the map $\text{d}'( \sum a_i \otimes x_i ) = \sum \text{d}(a_i) \otimes x_i$. It exists because the map $S \times R' \to \Omega_{S/R} \otimes_R R'$, $(a, x)\mapsto \text{d}a \otimes_R x$ is $R$-bilinear. This is an $R'$-derivation, as can be verified by a simple computation. We will show that $(\Omega_{S/R} \otimes_R R', \text{d}')$ satisfies the universal property. Let $D : S' \to M'$ be an $R'$-derivation into an $S'$-module. The composition $S \to S' \to M'$ is an $R$-derivation, hence we get an $S$-linear map $\varphi_D : \Omega_{S/R} \to M'$. We may tensor this with $R'$ and get the map $\varphi'_D : \Omega_{S/R} \otimes_R R' \to M'$, $\varphi'_D(\eta \otimes x) = x\varphi_D(\eta)$. It is clear that $D = \varphi'_D \circ \text{d}'$. \end{proof} \noindent The multiplication map $S \otimes_R S \to S$ is the $R$-algebra map which maps $a \otimes b$ to $ab$ in $S$. It is also an $S$-algebra map, if we think of $S \otimes_R S$ as an $S$-algebra via either of the maps $S \to S \otimes_R S$. \begin{lemma} \label{lemma-differentials-diagonal} Let $R \to S$ be a ring map. Let $J = \Ker(S \otimes_R S \to S)$ be the kernel of the multiplication map. There is a canonical isomorphism of $S$-modules $\Omega_{S/R} \to J/J^2$, $a \text{d} b \mapsto a \otimes b - ab \otimes 1$. \end{lemma} \begin{proof}[First proof] Apply Lemma \ref{lemma-differential-seq-split} to the commutative diagram $$ \xymatrix{ S \otimes_R S \ar[r] & S \\ S \ar[r] \ar[u] & S \ar[u] } $$ where the left vertical arrow is $a \mapsto a \otimes 1$. We get the exact sequence $0 \to J/J^2 \to \Omega_{S \otimes_R S/S} \otimes_{S \otimes_R S} S \to \Omega_{S/S} \to 0$. By Lemma \ref{lemma-trivial-differential-surjective} the term $\Omega_{S/S}$ is $0$, and we obtain an isomorphism between the other two terms. We have $\Omega_{S \otimes_R S/S} = \Omega_{S/R} \otimes_S (S \otimes_R S)$ by Lemma \ref{lemma-differentials-base-change} as $S \to S \otimes_R S$ is the base change of $R \to S$ and hence $$ \Omega_{S \otimes_R S/S} \otimes_{S \otimes_R S} S = \Omega_{S/R} \otimes_S (S \otimes_R S) \otimes_{S \otimes_R S} S = \Omega_{S/R}. $$ We omit the verification that the map is given by the rule of the lemma. \end{proof} \begin{proof}[Second proof] First we show that the rule $a \text{d} b \mapsto a \otimes b - ab \otimes 1$ is well defined. In order to do this we have to show that $\text{d}r$ and $a\text{d}b + b \text{d}a - \text{d}(ab)$ map to zero. The first because $r \otimes 1 - 1 \otimes r = 0$ by definition of the tensor product. The second because $$ (a \otimes b - ab \otimes 1) + (b \otimes a - ba \otimes 1) - (1 \otimes ab - ab \otimes 1) = (a \otimes 1 - 1\otimes a)(1\otimes b - b \otimes 1) $$ is in $J^2$. \medskip\noindent We construct a map in the other direction. We may think of $S \to S \otimes_R S$, $a \mapsto a \otimes 1$ as the base change of $R \to S$. Hence we have $\Omega_{S \otimes_R S/S} = \Omega_{S/R} \otimes_S (S \otimes_R S)$, by Lemma \ref{lemma-differentials-base-change}. At this point the sequence of Lemma \ref{lemma-differential-seq} gives a map $$ J/J^2 \to \Omega_{S \otimes_R S/ S} \otimes_{S \otimes_R S} S = (\Omega_{S/R} \otimes_S (S \otimes_R S))\otimes_{S \otimes_R S} S = \Omega_{S/R}. $$ We leave it to the reader to see it is the inverse of the map above. \end{proof} \begin{lemma} \label{lemma-differentials-polynomial-ring} If $S = R[x_1, \ldots, x_n]$, then $\Omega_{S/R}$ is a finite free $S$-module with basis $\text{d}x_1, \ldots, \text{d}x_n$. \end{lemma} \begin{proof} We first show that $\text{d}x_1, \ldots, \text{d}x_n$ generate $\Omega_{S/R}$ as an $S$-module. To prove this we show that $\text{d}g$ can be expressed as a sum $\sum g_i \text{d}x_i$ for any $g \in R[x_1, \ldots, x_n]$. We do this by induction on the (total) degree of $g$. It is clear if the degree of $g$ is $0$, because then $\text{d}g = 0$. If the degree of $g$ is $> 0$, then we may write $g$ as $c + \sum g_i x_i$ with $c\in R$ and $\deg(g_i) < \deg(g)$. By the Leibniz rule we have $\text{d}g = \sum g_i \text{d} x_i + \sum x_i \text{d}g_i$, and hence we win by induction. \medskip\noindent Consider the $R$-derivation $\partial / \partial x_i : R[x_1, \ldots, x_n] \to R[x_1, \ldots, x_n]$. (We leave it to the reader to define this; the defining property being that $\partial / \partial x_i (x_j) = \delta_{ij}$.) By the universal property this corresponds to an $S$-module map $l_i : \Omega_{S/R} \to R[x_1, \ldots, x_n]$ which maps $\text{d}x_i$ to $1$ and $\text{d}x_j$ to $0$ for $j \not = i$. Thus it is clear that there are no $S$-linear relations among the elements $\text{d}x_1, \ldots, \text{d}x_n$. \end{proof} \begin{lemma} \label{lemma-differentials-finitely-presented} Suppose $R \to S$ is of finite presentation. Then $\Omega_{S/R}$ is a finitely presented $S$-module. \end{lemma} \begin{proof} Write $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$. Write $I = (f_1, \ldots, f_m)$. According to Lemma \ref{lemma-differential-seq} there is an exact sequence of $S$-modules $$ I/I^2 \to \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \to \Omega_{S/R} \to 0. $$ The result follows from the fact that $I/I^2$ is a finite $S$-module (generated by the images of the $f_i$), and that the middle term is finite free by Lemma \ref{lemma-differentials-polynomial-ring}. \end{proof} \begin{lemma} \label{lemma-differentials-finitely-generated} Suppose $R \to S$ is of finite type. Then $\Omega_{S/R}$ is a finitely generated $S$-module. \end{lemma} \begin{proof} This is very similar to, but easier than the proof of Lemma \ref{lemma-differentials-finitely-presented}. \end{proof} \section{The de Rham complex} \label{section-de-rham-complex} % BEGIN ALGEBRA EDITORIAL ROUTE section-de-rham-complex \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-de-rham-complex}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-de-rham-complex \noindent Let $A \to B$ be a ring map. Denote by $\text{d} : B \to \Omega_{B/A}$ the universal $A$-derivation into the module of differentials constructed in Section \ref{section-differentials}. Let $\Omega_{B/A}^i = \wedge^i_B(\Omega_{B/A})$ for $i \geq 0$ be the $i$th exterior power as in Section \ref{section-tensor-algebra}. The {\it de Rham complex of $B$ over $A$} is the complex $$ \Omega_{B/A}^0 \to \Omega_{B/A}^1 \to \Omega_{B/A}^2 \to \ldots $$ with $A$-linear differentials constructed and described below. \medskip\noindent The map $\text{d} : \Omega^0_{B/A} \to \Omega^1_{B/A}$ is the universal derivation $\text{d} : B \to \Omega_{B/A}$. Observe that this is indeed $A$-linear. \medskip\noindent For $p \geq 1$ we claim there is a unique $A$-linear map $\text{d} : \Omega_{B/A}^p \to \Omega_{B/A}^{p + 1}$ such that \begin{equation} \label{equation-rule} \text{d}\left(b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_p\right) = \text{d}b_0 \wedge \text{d}b_1 \wedge \ldots \wedge \text{d}b_p. \end{equation} Recall that $\Omega_{B/A}$ is generated as a $B$-module by the elements $\text{d}b$. Thus $\Omega^p_{B/A}$ is generated as an $A$-module by the elements $b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_p$ and it follows that the map $\text{d} : \Omega^p_{B/A} \to \Omega^{p + 1}_{B/A}$ if it exists is unique. \medskip\noindent Construction of $\text{d} : \Omega_{B/A}^1 \to \Omega_{B/A}^2$. By Definition \ref{definition-differentials} the elements $\text{d}b$ freely generate $\Omega_{B/A}$ as a $B$-module subject to the relations $\text{d}a = 0$ for $a \in A$ and $\text{d}(b' + b'') = \text{d}b' + \text{d}b''$ and $\text{d}(b'b'') = b'\text{d}b'' + b''\text{d}b'$ for $b', b'' \in B$. Hence to show that the rule $$ \sum b'_i \text{d}b_i \longmapsto \sum \text{d}b'_i \wedge \text{d}b_i $$ is well defined we have to show that the elements $$ b\text{d}a, \quad\text{and}\quad b\text{d}(b' + b'') - b\text{d}b' - b\text{d}b'' \quad\text{and}\quad b\text{d}(b'b'') - bb'\text{d}b'' - bb''\text{d}b' $$ for $a \in A$ and $b, b', b'' \in B$ are mapped to zero. This is clear by direct computation using the Leibniz rule for $\text{d}$. \medskip\noindent Observe that the composition $\Omega^0_{B/A} \to \Omega^1_{B/A} \to \Omega^2_{B/A}$ is zero as $\text{d}(\text{d}(b)) = \text{d}(1 \text{d}b) = \text{d}(1) \wedge \text{d}(b) = 0 \wedge \text{d}b = 0$. Here $\text{d}(1) = 0$ as $1 \in B$ is in the image of $A \to B$. We will use this below. \medskip\noindent Construction of $\text{d} : \Omega_{B/A}^p \to \Omega_{B/A}^{p + 1}$ for $p \geq 2$. We will show the $A$-linear map $$ \gamma : \Omega^1_{B/A} \otimes_A \ldots \otimes_A \Omega^1_{B/A} \longrightarrow \Omega_{B/A}^{p + 1} $$ defined by the formula $$ \omega_1 \otimes \ldots \otimes \omega_p \longmapsto \sum (-1)^{i + 1} \omega_1 \wedge \ldots \wedge \text{d}(\omega_i) \wedge \ldots \wedge \omega_p $$ factors over the natural surjection $\Omega^1_{B/A} \otimes_A \ldots \otimes_A \Omega^1_{B/A} \to \Omega^p_{B/A}$ to give the desired map $\text{d} : \Omega^p_{B/A} \to \Omega^{p + 1}_{B/A}$. According to Lemma \ref{lemma-present-wedge} the kernel of $\Omega^1_{B/A} \otimes_A \ldots \otimes_A \Omega^1_{B/A} \to \Omega^p_{B/A}$ is generated as an $A$-module by the elements $\omega_1 \otimes \ldots \otimes \omega_p$ with $\omega_i = \omega_j$ for some $i \not = j$ and $\omega_1 \otimes \ldots \otimes f\omega_i \otimes \ldots \otimes \omega_p - \omega_1 \otimes \ldots \otimes f\omega_j \otimes \ldots \otimes \omega_p$ for some $f \in B$. A direct computation shows the first type of element is mapped to $0$ by $\gamma$, in other words, $\gamma$ is alternating. To finish we have to show that $$ \gamma( \omega_1 \otimes \ldots \otimes f\omega_i \otimes \ldots \otimes \omega_p) = \gamma( \omega_1 \otimes \ldots \otimes f\omega_j \otimes \ldots \otimes \omega_p) $$ for $f \in B$. By $A$-linearity and the alternating property, it is enough to show this for $p = 2$, $i = 1$, $j = 2$, $\omega_1 = b \text{d}b'$ and $\omega_2 = c \text{d} c'$ for $b, b', c, c' \in B$. Thus we need to show that \begin{align*} & \text{d}(fb) \wedge \text{d}b' \wedge c \text{d}c' - fb \text{d}b' \wedge \text{d}c \wedge \text{d}c' \\ & = \text{d}b \wedge \text{d}b' \wedge fc\text{d}c' - b \text{d}b' \wedge \text{d}(fc) \wedge \text{d}c', \end{align*} in other words that $$ (c \text{d}(fb) + fb \text{d}c - fc \text{d}b - b \text{d}(fc)) \wedge \text{d}b' \wedge \text{d}c' = 0. $$ This follows from the Leibniz rule. Observe that the value of $\gamma$ on the element $b_0\text{d}b_1 \otimes \text{d}b_2 \otimes \ldots \otimes \text{d}b_p$ is $\text{d}b_0 \wedge \text{d}b_1 \wedge \ldots \wedge \text{d}b_p$ and hence (\ref{equation-rule}) will be satisfied for the map $\text{d} : \Omega^p_{B/A} \to \Omega^{p + 1}_{B/A}$ so obtained. \medskip\noindent Finally, since $\Omega^p_{B/A}$ is additively generated by the elements $b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_p$ and since $\text{d}(b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_p) = \text{d}b_0 \wedge \ldots \wedge \text{d}b_p$ we see in exactly the same manner that the composition $ \Omega^p_{B/A} \to \Omega^{p + 1}_{B/A} \to \Omega^{p + 2}_{B/A} $ is zero for $p \geq 1$. Thus the de Rham complex is indeed a complex. \medskip\noindent Given just a ring $R$ we set $\Omega_R = \Omega_{R/\mathbf{Z}}$. This is sometimes called the absolute module of differentials of $R$; this makes sense: if $\Omega_R$ is the module of differentials where we only assume the Leibniz rule and not the vanishing of $\text{d}1$, then the Leibniz rule gives $\text{d}1 = \text{d}(1 \cdot 1) = 1 \text{d}1 + 1 \text{d}1 = 2 \text{d}1$ and hence $\text{d}1 = 0$ in $\Omega_R$. In this case the {\it absolute de Rham complex of $R$} is the corresponding complex $$ \Omega_R^0 \to \Omega_R^1 \to \Omega_R^2 \to \ldots, $$ where we set $\Omega^i_R = \Omega^i_{R/\mathbf{Z}}$ and so on. \medskip\noindent Suppose we have a commutative diagram of rings $$ \xymatrix{ B \ar[r] & B' \\ A \ar[r] \ar[u] & A' \ar[u] }. $$ There is a natural map of de Rham complexes $$ \Omega^\bullet_{B/A} \longrightarrow \Omega^\bullet_{B'/A'}. $$ Namely, in degree $0$ this is the map $B \to B'$, in degree $1$ this is the map $\Omega_{B/A} \to \Omega_{B'/A'}$ constructed in Section \ref{section-differentials}, and for $p \geq 2$ it is the induced map $\Omega^p_{B/A} = \wedge^p_B(\Omega_{B/A}) \to \wedge^p_{B'}(\Omega_{B'/A'}) = \Omega^p_{B'/A'}$. The compatibility with differentials follows from the characterization of the differentials by the formula (\ref{equation-rule}). \begin{lemma} \label{lemma-de-rham-complex-base-change} Suppose that we have ring maps $A \to A'$ and $A \to B$. Set $B' = B \otimes_A A'$, so that we obtain a diagram as above. Then the canonical map defined above induces an isomorphism $\Omega^\bullet_{B/A} \otimes_A A' = \Omega^\bullet_{B'/A'}$ of complexes. \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-differentials-base-change} and the fact that taking exterior powers commutes with base change. \end{proof} \begin{lemma} \label{lemma-de-rham-complex} Let $A \to B$ be a ring map. Let $\pi : \Omega_{B/A} \to \Omega$ be a surjective $B$-module map. Denote by $\text{d} : B \to \Omega$ the composition of $\pi$ with the universal derivation $\text{d}_{B/A} : B \to \Omega_{B/A}$. Set $\Omega^i = \wedge_B^i(\Omega)$. Assume that the kernel of $\pi$ is generated, as a $B$-module, by elements $\omega \in \Omega_{B/A}$ such that $\text{d}_{B/A}(\omega) \in \Omega_{B/A}^2$ maps to zero in $\Omega^2$. Then there is a de Rham complex $$ \Omega^0 \to \Omega^1 \to \Omega^2 \to \ldots $$ whose differential is defined by the rule $$ \text{d} : \Omega^p \to \Omega^{p + 1},\quad \text{d}\left(f_0\text{d}f_1 \wedge \ldots \wedge \text{d}f_p\right) = \text{d}f_0 \wedge \text{d}f_1 \wedge \ldots \wedge \text{d}f_p. $$ \end{lemma} \begin{proof} We will show that there exists a commutative diagram $$ \xymatrix{ \Omega_{B/A}^0 \ar[d] \ar[r]_{\text{d}_{B/A}} & \Omega_{B/A}^1 \ar[d]_\pi \ar[r]_{\text{d}_{B/A}} & \Omega_{B/A}^2 \ar[d]_{\wedge^2\pi} \ar[r]_{\text{d}_{B/A}} & \ldots \\ \Omega^0 \ar[r]^{\text{d}} & \Omega^1 \ar[r]^{\text{d}} & \Omega^2 \ar[r]^{\text{d}} & \ldots }. $$ The description of the map $\text{d}$ will follow from the construction of the differentials $\text{d}_{B/A} : \Omega^p_{B/A} \to \Omega^{p + 1}_{B/A}$ of the de Rham complex of $B$ over $A$ given above. Since the leftmost vertical arrow is an isomorphism we have the first square. Because $\pi$ is surjective, to get the second square it suffices to show that $\text{d}_{B/A}$ maps the kernel of $\pi$ into the kernel of $\wedge^2\pi$. We are given that any element of the kernel of $\pi$ is of the form $\sum b_i\omega_i$ with $\pi(\omega_i) = 0$ and $\wedge^2\pi(\text{d}_{B/A}(\omega_i)) = 0$. By the Leibniz rule for $\text{d}_{B/A}$ we have $\text{d}_{B/A}(\sum b_i\omega_i) = \sum b_i \text{d}_{B/A}(\omega_i) + \sum \text{d}_{B/A}(b_i) \wedge \omega_i$. Hence this maps to zero under $\wedge^2\pi$. \medskip\noindent For $i > 1$ we note that $\wedge^i \pi$ is surjective with kernel the image of $\Ker(\pi) \wedge \Omega^{i - 1}_{B/A} \to \Omega_{B/A}^i$. For $\omega_1 \in \Ker(\pi)$ and $\omega_2 \in \Omega^{i - 1}_{B/A}$ we have $$ \text{d}_{B/A}(\omega_1 \wedge \omega_2) = \text{d}_{B/A}(\omega_1) \wedge \omega_2 - \omega_1 \wedge \text{d}_{B/A}(\omega_2), $$ which is in the kernel of $\wedge^{i + 1}\pi$ by what we just proved above. Hence we get the $(i + 1)$st square in the diagram above. This concludes the proof. \end{proof} \section{Finite order differential operators} \label{section-differential-operators} % BEGIN ALGEBRA EDITORIAL ROUTE section-differential-operators \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-differential-operators}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-differential-operators \noindent In this section we introduce differential operators of finite order. \begin{definition} \label{definition-differential-operators} Let $R \to S$ be a ring map. Let $M$, $N$ be $S$-modules. Let $k \geq 0$ be an integer. We inductively define a {\it differential operator $D : M \to N$ of order $k$} to be an $R$-linear map such that for all $g \in S$ the map $m \mapsto D(gm) - gD(m)$ is a differential operator of order $k - 1$. For the base case $k = 0$ we define a differential operator of order $0$ to be an $S$-linear map. \end{definition} \noindent If $D : M \to N$ is a differential operator of order $k$, then for all $g \in S$ the map $gD$ is a differential operator of order $k$. The sum of two differential operators of order $k$ is another. Hence the set of all these $$ \text{Diff}^k(M, N) = \text{Diff}^k_{S/R}(M, N) $$ is an $S$-module. We have $$ \text{Diff}^0(M, N) \subset \text{Diff}^1(M, N) \subset \text{Diff}^2(M, N) \subset \ldots. $$ \begin{lemma} \label{lemma-composition-differential-operators} Let $R \to S$ be a ring map. Let $L, M, N$ be $S$-modules. If $D : L \to M$ and $D' : M \to N$ are differential operators of order $k$ and $k'$, then $D' \circ D$ is a differential operator of order $k + k'$. \end{lemma} \begin{proof} Let $g \in S$. Then the map which sends $x \in L$ to $$ D'(D(gx)) - gD'(D(x)) = D'(D(gx)) - D'(gD(x)) + D'(gD(x)) - gD'(D(x)) $$ is a sum of two compositions of differential operators of lower order. Hence the lemma follows by induction on $k + k'$. \end{proof} \begin{lemma} \label{lemma-module-principal-parts} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Let $k \geq 0$. There exists an $S$-module $P^k_{S/R}(M)$ and a canonical isomorphism $$ \text{Diff}^k_{S/R}(M, N) = \Hom_S(P^k_{S/R}(M), N) $$ functorial in the $S$-module $N$. \end{lemma} \noindent Via the Yoneda lemma this tells us there exists a ``universal'' differential operator $D_{univ} : M \to P^k_{S/R}(M)$ of order $k$ such that for every differential operator $D : M \to N$ of order $k$ there is a unique $S$-linear map $\alpha : P^k_{S/R}(M) \to N$ with $D = \alpha \circ D_{univ}$. The pair $(P^k_{S/R}(M), D_{univ})$ is unique up to unique isomorphism. \begin{proof} The existence of $P^k_{S/R}(M)$ follows from general category theoretic arguments, but we will also give a construction. Set $F = \bigoplus_{m \in M} S[m]$ where $[m]$ is a symbol indicating the basis element in the summand corresponding to $m$. Given any differential operator $D : M \to N$ we obtain an $S$-linear map $L_D : F \to N$ sending $[m]$ to $D(m)$. If $D$ has order $0$, then $L_D$ annihilates the elements $$ [m + m'] - [m] - [m'],\quad g_0[m] - [g_0m] $$ where $g_0 \in S$ and $m, m' \in M$. If $D$ has order $1$, then $L_D$ annihilates the elements $$ [m + m'] - [m] - [m'],\quad f[m] - [fm], \quad g_0g_1[m] - g_0[g_1m] - g_1[g_0m] + [g_1g_0m] $$ where $f \in R$, $g_0, g_1 \in S$, and $m \in M$. If $D$ has order $k$, then $L_D$ annihilates the elements $[m + m'] - [m] - [m']$, $f[m] - [fm]$, and the elements $$ g_0g_1\ldots g_k[m] - \sum g_0 \ldots \hat g_i \ldots g_k[g_im] + \ldots +(-1)^{k + 1}[g_0\ldots g_km]. $$ Conversely, if $L : F \to N$ is an $S$-linear map annihilating all the elements listed in the previous sentence, then $m \mapsto L([m])$ is a differential operator of order $k$. Thus we see that $P^k_{S/R}(M)$ is the quotient of $F$ by the submodule generated by these elements. \end{proof} \begin{definition} \label{definition-module-principal-parts} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. The module $P^k_{S/R}(M)$ constructed in Lemma \ref{lemma-module-principal-parts} is called the {\it module of principal parts of order $k$} of $M$. \end{definition} \noindent Note that the inclusions $$ \text{Diff}^0(M, N) \subset \text{Diff}^1(M, N) \subset \text{Diff}^2(M, N) \subset \ldots $$ correspond via Yoneda's lemma (Categories, Lemma \ref{categories-lemma-yoneda}) to surjections $$ \ldots \to P^2_{S/R}(M) \to P^1_{S/R}(M) \to P^0_{S/R}(M) = M. $$ \begin{example} \label{example-derivations-and-differential-operators} Let $R \to S$ be a ring map and let $N$ be an $S$-module. Observe that $\text{Diff}^1(S, N) = \text{Der}_R(S, N) \oplus N$. Namely, if $D : S \to N$ is a differential operator of order $1$ then $\sigma_D : S \to N$ defined by $\sigma_D(g) := D(g) - gD(1)$ is an $R$-derivation and $D = \sigma_D + \lambda_{D(1)}$ where $\lambda_x : S \to N$ is the linear map sending $g$ to $gx$. It follows that $P^1_{S/R} = \Omega_{S/R} \oplus S$ by the universal property of $\Omega_{S/R}$. \end{example} \begin{lemma} \label{lemma-sequence-of-principal-parts} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. There is a canonical short exact sequence $$ 0 \to \Omega_{S/R} \otimes_S M \to P^1_{S/R}(M) \to M \to 0 $$ functorial in $M$ called the {\it sequence of principal parts}. \end{lemma} \begin{proof} The map $P^1_{S/R}(M) \to M$ is given above. Let $N$ be an $S$-module and let $D : M \to N$ be a differential operator of order $1$. For $m \in M$ the map $$ g \longmapsto D(gm) - gD(m) $$ is an $R$-derivation $S \to N$ by the axioms for differential operators of order $1$. Thus it corresponds to a linear map $D_m : \Omega_{S/R} \to N$ determined by the rule $a\text{d}b \mapsto aD(bm) - abD(m)$ (see Lemma \ref{lemma-universal-omega}). The map $$ \Omega_{S/R} \times M \longrightarrow N,\quad (\eta, m) \longmapsto D_m(\eta) $$ is $S$-bilinear (details omitted) and hence determines an $S$-linear map $$ \sigma_D : \Omega_{S/R} \otimes_S M \to N. $$ In this way we obtain a map $\text{Diff}^1(M, N) \to \Hom_S(\Omega_{S/R} \otimes_S M, N)$, $D \mapsto \sigma_D$ functorial in $N$. By the Yoneda lemma this corresponds to a map $\Omega_{S/R} \otimes_S M \to P^1_{S/R}(M)$. It is immediate from the construction that this map is functorial in $M$. The sequence $$ \Omega_{S/R} \otimes_S M \to P^1_{S/R}(M) \to M \to 0 $$ is exact because for every module $N$ the sequence $$ 0 \to \Hom_S(M, N) \to \text{Diff}^1(M, N) \to \Hom_S(\Omega_{S/R} \otimes_S M, N) $$ is exact by inspection. \medskip\noindent To see that $\Omega_{S/R} \otimes_S M \to P^1_{S/R}(M)$ is injective we argue as follows. Choose an exact sequence $$ 0 \to M' \to F \to M \to 0 $$ with $F$ a free $S$-module. This induces an exact sequence $$ 0 \to \text{Diff}^1(M, N) \to \text{Diff}^1(F, N) \to \text{Diff}^1(M', N) $$ for all $N$. This proves that in the commutative diagram $$ \xymatrix{ 0 \ar[r] & \Omega_{S/R} \otimes_S M' \ar[r] \ar[d] & P^1_{S/R}(M') \ar[r] \ar[d] & M' \ar[r] \ar[d] & 0 \\ 0 \ar[r] & \Omega_{S/R} \otimes_S F \ar[r] \ar[d] & P^1_{S/R}(F) \ar[r] \ar[d] & F \ar[r] \ar[d] & 0 \\ 0 \ar[r] & \Omega_{S/R} \otimes_S M \ar[r] \ar[d] & P^1_{S/R}(M) \ar[r] \ar[d] & M \ar[r] \ar[d] & 0 \\ & 0 & 0 & 0 } $$ the middle column is exact. The left column is exact by right exactness of $\Omega_{S/R} \otimes_S -$. By the snake lemma (see Section \ref{section-snake}) it suffices to prove exactness on the left for the free module $F$. Using that $P^1_{S/R}(-)$ commutes with direct sums we reduce to the case $M = S$. This case is a consequence of the discussion in Example \ref{example-derivations-and-differential-operators}. \end{proof} \begin{remark} \label{remark-functoriality-principal-parts} Suppose given a commutative diagram of rings $$ \xymatrix{ B \ar[r] & B' \\ A \ar[u] \ar[r] & A' \ar[u] }, $$ a $B$-module $M$, a $B'$-module $M'$, and a $B$-linear map $M \to M'$. Then we get a compatible system of module maps $$ \xymatrix{ \ldots \ar[r] & P^2_{B'/A'}(M') \ar[r] & P^1_{B'/A'}(M') \ar[r] & P^0_{B'/A'}(M') \\ \ldots \ar[r] & P^2_{B/A}(M) \ar[r] \ar[u] & P^1_{B/A}(M) \ar[r] \ar[u] & P^0_{B/A}(M) \ar[u] }. $$ These maps are compatible with further composition of maps of this type. The easiest way to see this is to use the description of the modules $P^k_{B/A}(M)$ in terms of generators and relations in the proof of Lemma \ref{lemma-module-principal-parts}, but it can also be seen directly from the universal property of these modules. Moreover, these maps are compatible with the short exact sequences of Lemma \ref{lemma-sequence-of-principal-parts}. \end{remark} \begin{lemma} \label{lemma-principal-parts-base-change} Suppose that we have ring maps $A \to A'$ and $A \to B$ and a $B$-module $M$. Set $B' = B \otimes_A A'$ and view $M' = M \otimes_A A'$ as a $B'$-module. The map of Remark \ref{remark-functoriality-principal-parts} induces an isomorphism $P^k_{B/A}(M) \otimes_A A' = P^k_{B'/A'}(M')$. \end{lemma} \begin{proof} Let $D_{univ} : M \to P^k_{B/A}(M)$ be the universal differential operator. The induced $A'$-linear map $D_{univ} \otimes 1 : M' = M \otimes_A A' \to P^k_{B/A}(M) \otimes_A A'$ is easily verified to be an order $k$ differential operator for $M'/B'/A'$. We will show that $D_{univ} \otimes 1$ satisfies the universal property. Let $D' : M' \to N'$ be a differential operator of order $k$ into a $B'$-module $N'$. Then the composition $D : M \to M' \to N'$ is a differential operator into $N'$ viewed as a $B$-module. Hence there is a $B$-linear map $\gamma : P^k_{B/A}(M) \to N'$ such that $D = \gamma \circ D_{univ}$. The reader checks easily that the induced $B'$-linear map $\gamma' : P^k_{B/A}(M) \otimes_A A' \to N'$ satisfies $\gamma' \circ (D_{univ} \otimes 1) = D'$. We omit the proof that $\gamma'$ is unique. \end{proof} \begin{lemma} \label{lemma-principal-parts-diagonal} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Let $J = \Ker(S \otimes_R S \to S)$ be the kernel of the multiplication map. There is a canonical isomorphism of $S$-modules $$ P^k_{S/R}(M) \longrightarrow (S \otimes_R M)/J^{k + 1}(S \otimes_R M) $$ where $s \in S$ acts on the target via multiplication by $s \otimes 1$ and such that the universal differential operator of order $k$ corresponds to the map given by $m \mapsto \text{class of }1 \otimes m$. \end{lemma} \begin{proof} Consider the map $T : M \to S \otimes_R M$, $m \mapsto 1 \otimes m$. Since $T$ is $R$-linear and since \begin{align*} g_0g_1\ldots g_k T(m) - \sum g_0 \ldots \hat g_i \ldots g_k T(g_im) + \ldots +(-1)^{k + 1}T(g_0\ldots g_km) \\ = \prod_{i = 0,\ldots,k} (g_i \otimes 1 - 1 \otimes g_i) 1 \otimes m \end{align*} for $m \in M$ and $g_0, \ldots, g_k \in S$, we conclude that the rule $m \mapsto \text{class of }1 \otimes m$ in the statement of the lemma is a differential operator of order $k$ (see proof of Lemma \ref{lemma-module-principal-parts}). By the universal property of $P^k_{S/R}(M)$ we obtain the arrow in the statement of the lemma. On the other hand, if $D : M \to N$ is a differential operator of order $k$, then we can consider the $S$-linear map $L : S \otimes_R M \to N$, $g \otimes m \mapsto gD(m)$. The reader checks, by a computation similar to the one above and using that $J$ is generated by elements of the form $g \otimes 1 - 1 \otimes g$, that $L$ annihilates $J^{k + 1}(S \otimes_R M)$. In particular, if we apply this to the universal differential operator $D_{univ} : M \to P^k_{S/R}(M)$, then we obtain an $S$-linear map $(S \otimes_R M)/J^{k + 1}(S \otimes_R M) \to P^k_{S/R}(M)$. We leave it to the reader to see that this map is the inverse to the map in the statement of the lemma. \end{proof} \begin{lemma} \label{lemma-differentials-de-rham-complex-order-1} Let $A \to B$ be a ring map. The differentials $\text{d} : \Omega^i_{B/A} \to \Omega^{i + 1}_{B/A}$ are differential operators of order $1$. \end{lemma} \begin{proof} Given $b \in B$ we have to show that $\text{d} \circ b - b \circ \text{d}$ is a linear operator. Thus we have to show that $$ \text{d} \circ b \circ b' - b \circ \text{d} \circ b' - b' \circ \text{d} \circ b + b' \circ b \circ \text{d} = 0. $$ To see this it suffices to check this on additive generators for $\Omega^i_{B/A}$. Thus it suffices to show that $$ \text{d}(bb'b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_i) - b\text{d}(b'b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_i) - b'\text{d}(bb_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_i) + bb'\text{d}(b_0\text{d}b_1 \wedge \ldots \wedge \text{d}b_i) $$ is zero. This is a pleasant calculation using the Leibniz rule which is left to the reader. \end{proof} \begin{lemma} \label{lemma-check-differential-operators} Let $A \to B$ be a ring map. Let $g_i \in B$, $i \in I$ be a set of generators for $B$ as an $A$-algebra. Let $M, N$ be $B$-modules. Let $k \geq 1$. Let $D : M \to N$ be an $A$-linear map. In order to show that $D$ is a differential operator of order $k$ it suffices to show that $D \circ g_i - g_i \circ D$ is a differential operator of order $k - 1$ for $i \in I$. \end{lemma} \begin{proof} Namely, we claim that the set of elements $g \in B$ such that $D \circ g - g \circ D$ is a differential operator of order $k - 1$ is an $A$-subalgebra of $B$. This follows from the relations $$ D \circ (g + g') - (g + g') \circ D = (D \circ g - g \circ D) + (D \circ g' - g' \circ D) $$ and $$ D \circ gg' - gg' \circ D = (D \circ g - g \circ D) \circ g' + g \circ (D \circ g' - g' \circ D). $$ Strictly speaking, to conclude for products we also use Lemma \ref{lemma-composition-differential-operators}. \end{proof} \begin{lemma} \label{lemma-invert-system-differential-operators} Let $A \to B$ be a ring map. Let $M, N$ be $B$-modules. Let $S \subset B$ be a multiplicative subset. Any differential operator $D : M \to N$ of order $k$ extends uniquely to a differential operator $E : S^{-1}M \to S^{-1}N$ of order $k$. \end{lemma} \begin{proof} By induction on $k$. If $k = 0$, then $D$ is $B$-linear and hence we get the extension by the functoriality of localization. Given $b \in B$ the operator $L_b : m \mapsto D(bm) - bD(m)$ has order $k - 1$. Hence it has a unique extension to a differential operator $E_b : S^{-1}M \to S^{-1}N$ of order $k - 1$ by induction. Moreover, a computation shows that $L_{b'b} = L_{b'} \circ b + b' \circ L_b$, hence by uniqueness we obtain $E_{b'b} = E_{b'} \circ b + b' \circ E_b$. Similarly, we obtain $E_{b'} \circ b - b \circ E_{b'} = E_b \circ b' - b' \circ E_b$. Now for $m \in M$ and $g \in S$ we set $$ E(m/g) = (1/g)(D(m) - E_g(m/g)). $$ To show that this is well defined it suffices to show that for $g' \in S$ if we use the representative $g'm/g'g$ we get the same result. We compute \begin{align*} (1/g'g)(D(g'm) - E_{g'g}(g'm/gg')) & = (1/gg')(g'D(m) + E_{g'}(m) - E_{g'g}(g'm/gg')) \\ & = (1/g'g)(g'D(m) - g' E_g(m/g)), \end{align*} which is the same as before. It is clear that $E$ is $A$-linear as $D$ and $E_g$ are $A$-linear. Taking $g = 1$ and using that $E_1 = 0$ we see that $E$ extends $D$. By Lemma \ref{lemma-check-differential-operators} it now suffices to show that $E \circ b - b \circ E$ for $b \in B$ and $E \circ 1/g' - 1/g' \circ E$ for $g' \in S$ are differential operators of order $k - 1$ in order to show that $E$ is a differential operator of order $k$. For the first, choose an element $m/g$ in $S^{-1}M$ and observe that \begin{align*} E(b m/g) - bE(m/g) & = (1/g)(D(bm) - bD(m) - E_g(bm/g) + bE_g(m/g)) \\ & = (1/g)(L_b(m) - E_b(m) + gE_b(m/g)) \\ & = E_b(m/g), \end{align*} which is a differential operator of order $k - 1$. Finally, we have \begin{align*} E(m/g'g) - (1/g')E(m/g) & = (1/g'g)(D(m) - E_{g'g}(m/g'g)) - (1/g'g)(D(m) - E_g(m/g)) \\ & = -(1/g')E_{g'}(m/g'g), \end{align*} which also is a differential operator of order $k - 1$ as the composition of linear maps (multiplication by $1/g'$ and signs) and $E_{g'}$. We omit the proof of uniqueness. \end{proof} \begin{lemma} \label{lemma-base-change-differential-operators} Let $R \to A$ and $R \to B$ be ring maps. Let $M$ and $M'$ be $A$-modules. Let $D : M \to M'$ be a differential operator of order $k$ with respect to $R \to A$. Let $N$ be any $B$-module. Then the map $$ D \otimes \text{id}_N : M \otimes_R N \to M' \otimes_R N $$ is a differential operator of order $k$ with respect to $B \to A \otimes_R B$. \end{lemma} \begin{proof} It is clear that $D' = D \otimes \text{id}_N$ is $B$-linear. If $k = 0$, then $D'$ is $A \otimes_R B$-linear because $D$ is $A$-linear. For $k \geq 1$, we argue as follows. By Lemma \ref{lemma-check-differential-operators} it suffices to show that $$ D' \circ a \otimes 1 - a \otimes 1 \circ D' = (D \circ a - a \circ D) \otimes \text{id}_N $$ is a differential operator of order $k - 1$ which follows by induction on $k$. \end{proof} \section{The naive cotangent complex} \label{section-netherlander} % BEGIN ALGEBRA EDITORIAL ROUTE section-netherlander \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-netherlander}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-netherlander \noindent Let $R \to S$ be a ring map. Denote by $R[S]$ the polynomial ring whose variables are the elements $s \in S$. Let's denote $[s] \in R[S]$ the variable corresponding to $s \in S$. Thus $R[S]$ is a free $R$-module on the basis elements $[s_1] \ldots [s_n]$ where $s_1, \ldots, s_n$ range over all unordered sequences of elements of $S$. There is a canonical surjection \begin{equation} \label{equation-canonical-presentation} R[S] \longrightarrow S,\quad [s] \longmapsto s \end{equation} whose kernel we denote $I \subset R[S]$. It is a simple observation that $I$ is generated by the elements $[s + s'] - [s] - [s']$, $[s][s'] - [ss']$ and $[r] - r$. According to Lemma \ref{lemma-differential-seq} there is a canonical map \begin{equation} \label{equation-naive-cotangent-complex} I/I^2 \longrightarrow \Omega_{R[S]/R} \otimes_{R[S]} S \end{equation} whose cokernel is canonically isomorphic to $\Omega_{S/R}$. Observe that the $S$-module $\Omega_{R[S]/R} \otimes_{R[S]} S$ is free on the generators $\text{d}[s]$. \begin{definition} \label{definition-naive-cotangent-complex} Let $R \to S$ be a ring map. The {\it naive cotangent complex} $\NL_{S/R}$ is the chain complex (\ref{equation-naive-cotangent-complex}) $$ \NL_{S/R} = \left(I/I^2 \longrightarrow \Omega_{R[S]/R} \otimes_{R[S]} S\right) $$ with $I/I^2$ placed in (homological) degree $1$ and $\Omega_{R[S]/R} \otimes_{R[S]} S$ placed in degree $0$. We will denote by $H_1(L_{S/R}) = H_1(\NL_{S/R})$\footnote{This module is sometimes denoted $\Gamma_{S/R}$ in the literature.} the homology in degree $1$. \end{definition} \noindent Before we continue let us say a few words about the actual cotangent complex (Cotangent, Section \ref{cotangent-section-cotangent-ring-map}). Given a ring map $R \to S$ there exists a canonical simplicial $R$-algebra $P_\bullet$ whose terms are polynomial algebras and which comes equipped with a canonical homotopy equivalence on underlying simplicial sets $$ P_\bullet \longrightarrow S. $$ The cotangent complex $L_{S/R}$ of $S$ over $R$ is defined as the chain complex associated to the simplicial module $$ \Omega_{P_\bullet/R} \otimes_{P_\bullet} S. $$ The naive cotangent complex as defined above is canonically isomorphic to the truncation $\tau_{\leq 1}L_{S/R}$ (see Homology, Section \ref{homology-section-truncations} and Cotangent, Section \ref{cotangent-section-surjections}). In particular, it is indeed the case that $H_1(\NL_{S/R}) = H_1(L_{S/R})$ so our definition is compatible with the one using the cotangent complex. Moreover, $H_0(L_{S/R}) = H_0(\NL_{S/R}) = \Omega_{S/R}$ as we've seen above. \medskip\noindent Let $R \to S$ be a ring map. A {\it presentation of $S$ over $R$} is a surjection $\alpha : P \to S$ of $R$-algebras where $P$ is a polynomial algebra (on a set of variables). Often, when $S$ is of finite type over $R$ we will indicate this by saying: ``Let $R[x_1, \ldots, x_n] \to S$ be a presentation of $S/R$'', or ``Let $0 \to I \to R[x_1, \ldots, x_n] \to S \to 0$ be a presentation of $S/R$'' if we want to indicate that $I$ is the kernel of the presentation. Note that the map $R[S] \to S$ used to define the naive cotangent complex is an example of a presentation. \medskip\noindent Note that for every presentation $\alpha$ we obtain a two term chain complex of $S$-modules $$ \NL(\alpha) : I/I^2 \longrightarrow \Omega_{P/R} \otimes_P S. $$ Here the term $I/I^2$ is placed in degree $1$ and the term $\Omega_{P/R} \otimes_P S$ is placed in degree $0$. The class of $f \in I$ in $I/I^2$ is mapped to $\text{d}f \otimes 1$ in $\Omega_{P/R} \otimes_P S$. The cokernel of this complex is canonically $\Omega_{S/R}$, see Lemma \ref{lemma-differential-seq}. We call the complex $\NL(\alpha)$ the {\it naive cotangent complex associated to the presentation $\alpha : P \to S$ of $S/R$}. Note that if $P = R[S]$ with its canonical surjection onto $S$, then we recover $\NL_{S/R}$. If $P = R[x_1, \ldots, x_n]$ then we will sometimes use the notation $I/I^2 \to \bigoplus_{i = 1, \ldots, n} S\text{d}x_i$ to denote this complex. \medskip\noindent Suppose we are given a commutative diagram \begin{equation} \label{equation-functoriality-NL} \vcenter{ \xymatrix{ S \ar[r]_{\phi} & S' \\ R \ar[r] \ar[u] & R' \ar[u] } } \end{equation} of rings. Let $\alpha : P \to S$ be a presentation of $S$ over $R$ and let $\alpha' : P' \to S'$ be a presentation of $S'$ over $R'$. A {\it morphism of presentations from $\alpha : P \to S$ to $\alpha' : P' \to S'$} is defined to be an $R$-algebra map $$ \varphi : P \to P' $$ such that $\phi \circ \alpha = \alpha' \circ \varphi$. Note that in this case $\varphi(I) \subset I'$, where $I = \Ker(\alpha)$ and $I' = \Ker(\alpha')$. Thus $\varphi$ induces a map of $S$-modules $I/I^2 \to I'/(I')^2$ and by functoriality of differentials also an $S$-module map $\Omega_{P/R} \otimes_P S \to \Omega_{P'/R'} \otimes_{P'} S'$. These maps are compatible with the differentials of $\NL(\alpha)$ and $\NL(\alpha')$ and we obtain a map of naive cotangent complexes $$ \NL(\alpha) \longrightarrow \NL(\alpha'). $$ It is often convenient to consider the induced map $\NL(\alpha) \otimes_S S' \to \NL(\alpha')$. \medskip\noindent In the special case that $P = R[S]$ and $P' = R'[S']$ the map $\phi : S \to S'$ induces a canonical ring map $\varphi : P \to P'$ by the rule $[s] \mapsto [\phi(s)]$. Hence the construction above determines canonical(!) maps of chain complexes $$ \NL_{S/R} \longrightarrow \NL_{S'/R'},\quad\text{and}\quad \NL_{S/R} \otimes_S S' \longrightarrow \NL_{S'/R'} $$ associated to the diagram (\ref{equation-functoriality-NL}). Note that this construction is compatible with composition: given a commutative diagram $$ \xymatrix{ S \ar[r]_{\phi} & S' \ar[r]_{\phi'} & S'' \\ R \ar[r] \ar[u] & R' \ar[u] \ar[r] & R'' \ar[u] }, $$ we see that the composition of $$ \NL_{S/R} \longrightarrow \NL_{S'/R'} \longrightarrow \NL_{S''/R''} $$ is the map $\NL_{S/R} \to \NL_{S''/R''}$ given by the outer square. \medskip\noindent It turns out that $\NL(\alpha)$ is homotopy equivalent to $\NL_{S/R}$ and that the maps constructed above are well defined up to homotopy (homotopies of maps of complexes are discussed in Homology, Section \ref{homology-section-complexes} but we also spell out the exact meaning of the statements in the lemma below in its proof). \begin{lemma} \label{lemma-NL-homotopy} Suppose given a diagram (\ref{equation-functoriality-NL}). Let $\alpha : P \to S$ and $\alpha' : P' \to S'$ be presentations. \begin{enumerate} \item There exists a morphism of presentations from $\alpha$ to $\alpha'$. \item Any two morphisms of presentations induce homotopic morphisms of complexes $\NL(\alpha) \to \NL(\alpha')$. \item The construction is compatible with compositions of morphisms of presentations (see proof for exact statement). \item If $R \to R'$ and $S \to S'$ are isomorphisms, then for any map $\varphi$ of presentations from $\alpha$ to $\alpha'$ the induced map $\NL(\alpha) \to \NL(\alpha')$ is a homotopy equivalence and a quasi-isomorphism. \end{enumerate} In particular, comparing $\alpha$ to the canonical presentation (\ref{equation-canonical-presentation}) we conclude there is a quasi-isomorphism $\NL(\alpha) \to \NL_{S/R}$ well defined up to homotopy and compatible with all functorialities (up to homotopy). \end{lemma} \begin{proof} Since $P$ is a polynomial algebra over $R$ we can write $P = R[x_a, a \in A]$ for some set $A$. As $\alpha'$ is surjective, we can choose for every $a \in A$ an element $f_a \in P'$ such that $\alpha'(f_a) = \phi(\alpha(x_a))$. Let $\varphi : P = R[x_a, a \in A] \to P'$ be the unique $R$-algebra map such that $\varphi(x_a) = f_a$. This gives the morphism in (1). \medskip\noindent Let $\varphi$ and $\varphi'$ be morphisms of presentations from $\alpha$ to $\alpha'$. Let $I = \Ker(\alpha)$ and $I' = \Ker(\alpha')$. We have to construct the diagonal map $h$ in the diagram $$ \xymatrix{ I/I^2 \ar[r]^-{\text{d}} \ar@<1ex>[d]^{\varphi'_1} \ar@<-1ex>[d]_{\varphi_1} & \Omega_{P/R} \otimes_P S \ar@<1ex>[d]^{\varphi'_0} \ar@<-1ex>[d]_{\varphi_0} \ar[ld]_h \\ I'/(I')^2 \ar[r]^-{\text{d}} & \Omega_{P'/R'} \otimes_{P'} S' } $$ where the vertical maps are induced by $\varphi$ and $\varphi'$, and $h$ must satisfy $$ \varphi_1 - \varphi'_1 = h \circ \text{d} \quad\text{and}\quad \varphi_0 - \varphi'_0 = \text{d} \circ h $$ Consider the map $\varphi - \varphi' : P \to P'$. Since both $\varphi$ and $\varphi'$ are compatible with $\alpha$ and $\alpha'$ we obtain $\varphi - \varphi' : P \to I'$. This implies that $\varphi, \varphi' : P \to P'$ induce the same $P$-module structure on $I'/(I')^2$, since $\varphi(p)i' - \varphi'(p)i' = (\varphi - \varphi')(p)i' \in (I')^2$. Also $\varphi - \varphi'$ is $R$-linear and $$ (\varphi - \varphi')(fg) = \varphi(f)(\varphi - \varphi')(g) + (\varphi - \varphi')(f)\varphi'(g) $$ Hence the induced map $D : P \to I'/(I')^2$ is an $R$-derivation. Thus we obtain a canonical map $h : \Omega_{P/R} \otimes_P S \to I'/(I')^2$ such that $D = h \circ \text{d}$. A calculation (omitted) shows that $h$ is the desired homotopy. \medskip\noindent Suppose that we have a commutative diagram $$ \xymatrix{ S \ar[r]_{\phi} & S' \ar[r]_{\phi'} & S'' \\ R \ar[r] \ar[u] & R' \ar[u] \ar[r] & R'' \ar[u] } $$ and that \begin{enumerate} \item $\alpha : P \to S$, \item $\alpha' : P' \to S'$, and \item $\alpha'' : P'' \to S''$ \end{enumerate} are presentations. Suppose that \begin{enumerate} \item $\varphi : P \to P'$ is a morphism of presentations from $\alpha$ to $\alpha'$ and \item $\varphi' : P' \to P''$ is a morphism of presentations from $\alpha'$ to $\alpha''$. \end{enumerate} Then it is immediate that $\varphi' \circ \varphi : P \to P''$ is a morphism of presentations from $\alpha$ to $\alpha''$ and that the induced map $\NL(\alpha) \to \NL(\alpha'')$ of naive cotangent complexes is the composition of the maps $\NL(\alpha) \to \NL(\alpha')$ and $\NL(\alpha') \to \NL(\alpha'')$ induced by $\varphi$ and $\varphi'$. \medskip\noindent In the simple case of complexes with 2 terms a quasi-isomorphism is just a map that induces an isomorphism on both the cokernel and the kernel of the maps between the terms. Note that homotopic maps of 2 term complexes (as explained above) define the same maps on kernel and cokernel. Hence if $\varphi$ is a map from a presentation $\alpha$ of $S$ over $R$ to itself, then the induced map $\NL(\alpha) \to \NL(\alpha)$ is a quasi-isomorphism being homotopic to the identity by part (2). To prove (4) in full generality, consider a morphism $\varphi'$ from $\alpha'$ to $\alpha$ which exists by (1). The compositions $\NL(\alpha) \to \NL(\alpha') \to \NL(\alpha)$ and $\NL(\alpha') \to \NL(\alpha) \to \NL(\alpha')$ are homotopic to the identity maps by (2) and (3), hence these maps are homotopy equivalences by definition. It follows formally that both maps $\NL(\alpha) \to \NL(\alpha')$ and $\NL(\alpha') \to \NL(\alpha)$ are quasi-isomorphisms. Some details omitted. \end{proof} \begin{lemma} \label{lemma-NL-polynomial-algebra} Let $A \to B$ be a polynomial algebra. Then $\NL_{B/A}$ is homotopy equivalent to the chain complex $(0 \to \Omega_{B/A})$ with $\Omega_{B/A}$ in degree $0$. \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-NL-homotopy} and the fact that $\text{id}_B : B \to B$ is a presentation of $B$ over $A$ with zero kernel. \end{proof} \noindent The following lemma is part of the motivation for introducing the naive cotangent complex. The cotangent complex extends this to a genuine long exact cohomology sequence. If $B \to C$ is a local complete intersection, then one can extend the sequence with a zero on the left, see More on Algebra, Lemma \ref{more-algebra-lemma-transitive-lci-at-end}. \begin{lemma}[Jacobi-Zariski sequence] \label{lemma-exact-sequence-NL} Let $A \to B \to C$ be ring maps. Choose a presentation $\alpha : A[x_s, s \in S] \to B$ with kernel $I$. Choose a presentation $\beta : B[y_t, t \in T] \to C$ with kernel $J$. Let $\gamma : A[x_s, y_t] \to C$ be the induced presentation of $C$ with kernel $K$. Then we get a canonical commutative diagram $$ \xymatrix{ 0 \ar[r] & \Omega_{A[x_s]/A} \otimes C \ar[r] & \Omega_{A[x_s, y_t]/A} \otimes C \ar[r] & \Omega_{B[y_t]/B} \otimes C \ar[r] & 0 \\ & I/I^2 \otimes C \ar[r] \ar[u] & K/K^2 \ar[r] \ar[u] & J/J^2 \ar[r] \ar[u] & 0 }, $$ with exact rows. We get the following exact sequence of homology groups $$ H_1(\NL_{B/A} \otimes_B C) \to H_1(L_{C/A}) \to H_1(L_{C/B}) \to C \otimes_B \Omega_{B/A} \to \Omega_{C/A} \to \Omega_{C/B} \to 0 $$ of $C$-modules extending the sequence of Lemma \ref{lemma-exact-sequence-differentials}. If $\text{Tor}_1^B(\Omega_{B/A}, C) = 0$ and $\text{Tor}_2^B(\Omega_{B/A}, C) = 0$, then $H_1(\NL_{B/A} \otimes_B C) = H_1(L_{B/A}) \otimes_B C$. \end{lemma} \begin{proof} The precise definition of the maps is omitted. The exactness of the top row follows as the $\text{d}x_s$, $\text{d}y_t$ form a basis for the middle module. The map $\gamma$ factors $$ A[x_s, y_t] \to B[y_t] \to C $$ with surjective first arrow and second arrow equal to $\beta$. Thus we see that $K \to J$ is surjective. Moreover, the kernel of the first displayed arrow is $IA[x_s, y_t]$. Hence $I/I^2 \otimes C$ surjects onto the kernel of $K/K^2 \to J/J^2$. Finally, we can use Lemma \ref{lemma-NL-homotopy} to identify the terms as homology groups of the naive cotangent complexes. \medskip\noindent The final assertion is a statement in homological algebra. Recall that $\NL_{B/A} = (N^{-1} \to N^0)$ is a two term complex of $B$-modules with $N^0$ free and cohomology modules $H^0 = \Omega_{B/A}$ and $H^{-1} = H_1(L_{B/A})$. Write $M \subset N^0$ for the image of the differential. If $\text{Tor}_1^B(H^0, C) = 0$, then we have an exact sequence $$ 0 \to M \otimes_B C \to N^0 \otimes_B C \to H^0 \otimes_B C \to 0 $$ Since $N^0$ is free, we also see that $\text{Tor}_2^B(H^0, C) = \text{Tor}_1^B(M, C)$. Hence if $\text{Tor}_2^B(H^0, C) = 0$ then we also have an exact sequence $$ 0 \to H^{-1} \otimes_B C \to N^{-1} \otimes_B C \to M \otimes_B C \to 0 $$ Putting everything together we see that if $\text{Tor}_1^B(H^0, C) = 0$ and $\text{Tor}_2^B(H^0, C) = 0$, then $H^{-1} \otimes_B C$ is the kernel of $N^{-1} \otimes_B C \to N^0 \otimes_B C$ as desired. \end{proof} \begin{remark} \label{remark-composition-homotopy-equivalent-to-zero} Let $A \to B$ and $\phi : B \to C$ be ring maps. Then the composition $\NL_{B/A} \to \NL_{C/A} \to \NL_{C/B}$ is homotopy equivalent to zero. Namely, this composition is the functoriality of the naive cotangent complex for the square $$ \xymatrix{ B \ar[r]_\phi & C \\ A \ar[r] \ar[u] & B \ar[u] }. $$ Write $J = \Ker(B[C] \to C)$. An explicit homotopy is given by the map $\Omega_{A[B]/A} \otimes_{A[B]} B \to J/J^2$ which maps the basis element $\text{d}[b]$ to the class of $[\phi(b)] - b$ in $J/J^2$. \end{remark} \begin{lemma} \label{lemma-NL-surjection} Let $A \to B$ be a surjective ring map with kernel $I$. Then $\NL_{B/A}$ is homotopy equivalent to the chain complex $(I/I^2 \to 0)$ with $I/I^2$ in degree $1$. In particular $H_1(L_{B/A}) = I/I^2$. \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-NL-homotopy} and the fact that $A \to B$ is a presentation of $B$ over $A$. \end{proof} \begin{lemma} \label{lemma-application-NL} Let $A \to B \to C$ be ring maps. Assume $A \to C$ is surjective (so also $B \to C$ is). Denote $I = \Ker(A \to C)$ and $J = \Ker(B \to C)$. Then the sequence $$ I/I^2 \to J/J^2 \to \Omega_{B/A} \otimes_B B/J \to 0 $$ is exact. \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-exact-sequence-NL} and the description of the naive cotangent complexes $\NL_{C/B}$ and $\NL_{C/A}$ in Lemma \ref{lemma-NL-surjection}. \end{proof} \begin{lemma}[Flat base change] \label{lemma-change-base-NL} Let $R \to S$ be a ring map. Let $\alpha : P \to S$ be a presentation. Let $R \to R'$ be a flat ring map. Let $\alpha' : P \otimes_R R' \to S' = S \otimes_R R'$ be the induced presentation. Then $\NL(\alpha) \otimes_R R' = \NL(\alpha) \otimes_S S' = \NL(\alpha')$. In particular, the canonical map $$ \NL_{S/R} \otimes_S S' \longrightarrow \NL_{S \otimes_R R'/R'} $$ is a homotopy equivalence if $R \to R'$ is flat. \end{lemma} \begin{proof} This is true because $\Ker(\alpha') = R' \otimes_R \Ker(\alpha)$ since $R \to R'$ is flat. \end{proof} \begin{lemma} \label{lemma-colimits-NL} Let $R_\lambda \to S_\lambda$ be a system of ring maps over the directed set $\Lambda$. Set $R = \colim R_\lambda$ and $S = \colim S_\lambda$. Then $\NL_{S/R} = \colim \NL_{S_\lambda/R_\lambda}$. \end{lemma} \begin{proof} Recall that $\NL_{S/R}$ is the complex $I/I^2 \to \bigoplus_{s \in S} S\text{d}[s]$ where $I \subset R[S]$ is the kernel of the canonical presentation $R[S] \to S$. Now it is clear that $R[S] = \colim R_\lambda[S_\lambda]$ and similarly that $I = \colim I_\lambda$ where $I_\lambda = \Ker(R_\lambda[S_\lambda] \to S_\lambda)$. Hence the lemma is clear. \end{proof} \begin{lemma} \label{lemma-NL-of-localization} If $S \subset A$ is a multiplicative subset of $A$, then $\NL_{S^{-1}A/A}$ is homotopy equivalent to the zero complex. \end{lemma} \begin{proof} Since $A \to S^{-1}A$ is flat we see that $\NL_{S^{-1}A/A} \otimes_A S^{-1}A \to \NL_{S^{-1}A/S^{-1}A}$ is a homotopy equivalence by flat base change (Lemma \ref{lemma-change-base-NL}). Since the source of the arrow is isomorphic to $\NL_{S^{-1}A/A}$ and the target of the arrow is homotopy equivalent to zero (by Lemma \ref{lemma-NL-surjection}) we win. \end{proof} \begin{lemma} \label{lemma-NL-localize-bottom} Let $S \subset A$ be a multiplicative subset of $A$. Let $S^{-1}A \to B$ be a ring map. Then $\NL_{B/A} \to \NL_{B/S^{-1}A}$ is a homotopy equivalence. \end{lemma} \begin{proof} Choose a presentation $\alpha : P \to B$ of $B$ over $A$. Then $\beta : S^{-1}P \to B$ is a presentation of $B$ over $S^{-1}A$. A direct computation shows that we have $\NL(\alpha) = \NL(\beta)$ which proves the lemma as the naive cotangent complex is well defined up to homotopy by Lemma \ref{lemma-NL-homotopy}. \end{proof} \begin{lemma} \label{lemma-principal-localization-NL} \begin{slogan} The formation of the naive cotangent complex commutes with localization at an element. \end{slogan} Let $A \to B$ be a ring map. Let $g \in B$. Suppose $\alpha : P \to B$ is a presentation with kernel $I$. Then a presentation of $B_g$ over $A$ is the map $$ \beta : P[x] \longrightarrow B_g $$ extending $\alpha$ and sending $x$ to $1/g$. The kernel $J$ of $\beta$ is generated by $I$ and the element $f x - 1$ where $f \in P$ is an element mapped to $g \in B$ by $\alpha$. In this situation we have \begin{enumerate} \item $J/J^2 = (I/I^2)_g \oplus B_g (f x - 1)$, \item $\Omega_{P[x]/A} \otimes_{P[x]} B_g = \Omega_{P/A} \otimes_P B_g \oplus B_g \text{d}x$, \item $\NL(\beta) \cong \NL(\alpha) \otimes_B B_g \oplus (B_g \xrightarrow{g} B_g).$ \end{enumerate} Hence the canonical map $\NL_{B/A} \otimes_B B_g \to \NL_{B_g/A}$ is a homotopy equivalence. \end{lemma} \begin{proof} Since $P[x]/(I, fx - 1) = B[x]/(gx - 1) = B_g$ we get the statement about $I$ and $fx - 1$ generating $J$. Consider the commutative diagram $$ \xymatrix{ 0 \ar[r] & \Omega_{P/A} \otimes_P B_g \ar[r] & \Omega_{P[x]/A} \otimes_{P[x]} B_g \ar[r] & \Omega_{B[x]/B} \otimes_{B[x]} B_g \ar[r] & 0 \\ & (I/I^2)_g \ar[r] \ar[u] & J/J^2 \ar[r] \ar[u] & (gx - 1)/(gx - 1)^2 \ar[r] \ar[u] & 0 } $$ with exact rows of Lemma \ref{lemma-exact-sequence-NL}. The $B_g$-module $\Omega_{B[x]/B} \otimes_{B[x]} B_g$ is free of rank $1$ on $\text{d}x$. The element $\text{d}x$ in the $B_g$-module $\Omega_{P[x]/A} \otimes_{P[x]} B_g$ provides a splitting for the top row. The element $gx - 1 \in (gx - 1)/(gx - 1)^2$ is mapped to $g\text{d}x$ in $\Omega_{B[x]/B} \otimes_{B[x]} B_g$ and hence $(gx - 1)/(gx - 1)^2$ is free of rank $1$ over $B_g$. (This can also be seen by arguing that $gx - 1$ is a nonzerodivisor in $B[x]$ because it is a polynomial with invertible constant term and any nonzerodivisor gives a quasi-regular sequence of length $1$ by Lemma \ref{lemma-regular-quasi-regular}.) \medskip\noindent Let us prove $(I/I^2)_g \to J/J^2$ is injective. Consider the $P$-algebra map $$ \pi : P[x] \to (P/I^2)_f = P_f/I_f^2 $$ sending $x$ to $1/f$. Since $J$ is generated by $I$ and $fx - 1$ we see that $\pi(J) \subset (I/I^2)_f = (I/I^2)_g$. Since this is an ideal of square zero we see that $\pi(J^2) = 0$. If $a \in I$ maps to an element of $J^2$ in $J$, then $\pi(a) = 0$, which implies that $a$ maps to zero in $I_f/I_f^2$. This proves the desired injectivity. \medskip\noindent Thus we have a short exact sequence of two term complexes $$ 0 \to \NL(\alpha) \otimes_B B_g \to \NL(\beta) \to (B_g \xrightarrow{g} B_g) \to 0 $$ Such a short exact sequence can always be split in the category of complexes. In our particular case we can take as splittings $$ J/J^2 = (I/I^2)_g \oplus B_g (fx - 1)\quad\text{and}\quad \Omega_{P[x]/A} \otimes B_g = \Omega_{P/A} \otimes B_g \oplus B_g (g^{-2}\text{d}f + \text{d}x). $$ This works because $\text{d}(fx - 1) = x\text{d}f + f \text{d}x = g(g^{-2}\text{d}f + \text{d}x)$ in $\Omega_{P[x]/A} \otimes B_g$. \end{proof} \begin{lemma} \label{lemma-localize-NL} Let $A \to B$ be a ring map. Let $S \subset B$ be a multiplicative subset. The canonical map $\NL_{B/A} \otimes_B S^{-1}B \to \NL_{S^{-1}B/A}$ is a quasi-isomorphism. \end{lemma} \begin{proof} We have $S^{-1}B = \colim_{g \in S} B_g$ where we think of $S$ as a directed set (ordering by divisibility), see Lemma \ref{lemma-localization-colimit}. By Lemma \ref{lemma-principal-localization-NL} each of the maps $\NL_{B/A} \otimes_B B_g \to \NL_{B_g/A}$ is a quasi-isomorphism. The lemma follows from Lemma \ref{lemma-colimits-NL}. \end{proof} \begin{lemma} \label{lemma-sum-two-terms} Let $R$ be a ring. Let $A_1 \to A_0$ and $B_1 \to B_0$ be two term complexes. Suppose that there exist morphisms of complexes $\varphi : A_\bullet \to B_\bullet$ and $\psi : B_\bullet \to A_\bullet$ such that $\varphi \circ \psi$ and $\psi \circ \varphi$ are homotopic to the identity maps. Then $A_1 \oplus B_0 \cong B_1 \oplus A_0$ as $R$-modules. \end{lemma} \begin{proof} Choose a map $h : A_0 \to A_1$ such that $$ \text{id}_{A_1} - \psi_1 \circ \varphi_1 = h \circ d_A \text{ and } \text{id}_{A_0} - \psi_0 \circ \varphi_0 = d_A \circ h. $$ Similarly, choose a map $h' : B_0 \to B_1$ such that $$ \text{id}_{B_1} - \varphi_1 \circ \psi_1 = h' \circ d_B \text{ and } \text{id}_{B_0} - \varphi_0 \circ \psi_0 = d_B \circ h'. $$ A trivial computation shows that $$ \left( \begin{matrix} \text{id}_{A_1} & -\psi_1 \circ h' + h \circ \psi_0 \\ 0 & \text{id}_{B_0} \end{matrix} \right) = \left( \begin{matrix} \psi_1 & h \\ -d_B & \varphi_0 \end{matrix} \right) \left( \begin{matrix} \varphi_1 & - h' \\ d_A & \psi_0 \end{matrix} \right). $$ The product in the reverse order is also upper triangular with identity diagonal entries. Thus both products are invertible, so both factors are invertible and the lemma follows. \end{proof} \begin{lemma} \label{lemma-conormal-module} Let $R \to S$ be a ring map of finite type. For any presentations $\alpha : R[x_1, \ldots, x_n] \to S$ and $\beta : R[y_1, \ldots, y_m] \to S$ we have $$ I/I^2 \oplus S^{\oplus m} \cong J/J^2 \oplus S^{\oplus n} $$ as $S$-modules, where $I = \Ker(\alpha)$ and $J = \Ker(\beta)$. \end{lemma} \begin{proof} See Lemmas \ref{lemma-NL-homotopy} and \ref{lemma-sum-two-terms}. \end{proof} \begin{lemma} \label{lemma-conormal-module-localize} Let $R \to S$ be a ring map of finite type. Let $g \in S$. For any presentations $\alpha : R[x_1, \ldots, x_n] \to S$ and $\beta : R[y_1, \ldots, y_m] \to S_g$ we have $$ (I/I^2)_g \oplus S^{\oplus m}_g \cong J/J^2 \oplus S_g^{\oplus n} $$ as $S_g$-modules, where $I = \Ker(\alpha)$ and $J = \Ker(\beta)$. \end{lemma} \begin{proof} Let $\beta' : R[x_1, \ldots, x_n, x] \to S_g$ be the presentation of Lemma \ref{lemma-principal-localization-NL} constructed starting with $\alpha$. Then we know that $\NL(\alpha) \otimes_S S_g$ is homotopy equivalent to $\NL(\beta')$. We know that $\NL(\beta)$ and $\NL(\beta')$ are homotopy equivalent by Lemma \ref{lemma-NL-homotopy}. We conclude that $\NL(\alpha) \otimes_S S_g$ is homotopy equivalent to $\NL(\beta)$. Finally, we apply Lemma \ref{lemma-sum-two-terms}. \end{proof} \section{Local complete intersections} \label{section-lci} % BEGIN ALGEBRA EDITORIAL ROUTE section-lci \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-lci}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-lci \noindent The property of being a local complete intersection is an intrinsic property of a Noetherian local ring. This will be discussed in Divided Power Algebra, Section \ref{dpa-section-lci}. However, for the moment we just define this property for finite type algebras over a field. \begin{definition} \label{definition-lci-field} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. \begin{enumerate} \item We say that $S$ is a {\it global complete intersection over $k$} if there exists a presentation $S = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ such that $\dim(S) = n - c$. \item We say that $S$ is a {\it local complete intersection over $k$} if there exists a covering $\Spec(S) = \bigcup D(g_i)$ such that each of the rings $S_{g_i}$ is a global complete intersection over $k$. \end{enumerate} We will also use the convention that the zero ring is a global complete intersection over $k$. \end{definition} \noindent Suppose $S$ is a global complete intersection $S = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ as in Definition \ref{definition-lci-field}. For a maximal ideal $\mathfrak m \subset k[x_1, \ldots, x_n]$ we have $\dim(k[x_1, \ldots, x_n]_\mathfrak m) = n$ (Lemma \ref{lemma-dim-affine-space}). If $(f_1, \ldots, f_c) \subset \mathfrak m$, then we conclude that $\dim(S_\mathfrak m) \geq n - c$ by Lemma \ref{lemma-one-equation}. Since $\dim(S) = n - c$ by Definition \ref{definition-lci-field} we conclude that $\dim(S_\mathfrak m) = n - c$ for all maximal ideals of $S$ and that $\Spec(S)$ is equidimensional (Topology, Definition \ref{topology-definition-equidimensional}) of dimension $n - c$, see Lemma \ref{lemma-dimension-at-a-point-finite-type-over-field}. We will often use this without further mention. \begin{lemma} \label{lemma-localize-lci} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $g \in S$. \begin{enumerate} \item If $S$ is a global complete intersection so is $S_g$. \item If $S$ is a local complete intersection so is $S_g$. \end{enumerate} \end{lemma} \begin{proof} The second statement follows immediately from the first. Proof of the first statement. If $S_g$ is the zero ring, then it is true. Assume $S_g$ is nonzero. Write $S = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ with $n - c = \dim(S)$ as in Definition \ref{definition-lci-field}. By the remarks following the definition $\dim(S_g) = n - c$. Let $g' \in k[x_1, \ldots, x_n]$ be an element whose residue class corresponds to $g$. Then $S_g = k[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, x_{n + 1}g' - 1)$ as desired. \end{proof} \begin{lemma} \label{lemma-lci-CM} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. If $S$ is a local complete intersection, then $S$ is a Cohen-Macaulay ring. \end{lemma} \begin{proof} Choose a maximal prime $\mathfrak m$ of $S$. We have to show that $S_\mathfrak m$ is Cohen-Macaulay. By assumption we may assume $S = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ with $\dim(S) = n - c$. Let $\mathfrak m' \subset k[x_1, \ldots, x_n]$ be the maximal ideal corresponding to $\mathfrak m$. According to Proposition \ref{proposition-finite-gl-dim-polynomial-ring} the local ring $k[x_1, \ldots, x_n]_{\mathfrak m'}$ is regular local of dimension $n$. In particular it is Cohen-Macaulay by Lemma \ref{lemma-regular-ring-CM}. By Lemma \ref{lemma-one-equation} applied $c$ times the local ring $S_{\mathfrak m} = k[x_1, \ldots, x_n]_{\mathfrak m'}/(f_1, \ldots, f_c)$ has dimension $\geq n - c$. By assumption $\dim(S_{\mathfrak m}) \leq n - c$. Thus we get equality. This implies that $f_1, \ldots, f_c$ is a regular sequence in $k[x_1, \ldots, x_n]_{\mathfrak m'}$ and that $S_{\mathfrak m}$ is Cohen-Macaulay, see Proposition \ref{proposition-CM-module}. \end{proof} \noindent The following is the technical key to the rest of the material in this section. An important feature of this lemma is that we may choose any presentation for the ring $S$, but that condition (1) does not depend on this choice. \begin{lemma} \label{lemma-lci} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q$ be a prime of $S$. Choose any presentation $S = k[x_1, \ldots, x_n]/I$. Let $\mathfrak q'$ be the prime of $k[x_1, \ldots, x_n]$ corresponding to $\mathfrak q$. Set $c = \text{height}(\mathfrak q') - \text{height}(\mathfrak q)$, in other words $\dim_{\mathfrak q}(S) = n - c$ (see Lemma \ref{lemma-codimension}). The following are equivalent \begin{enumerate} \item There exists a $g \in S$, $g \not \in \mathfrak q$ such that $S_g$ is a global complete intersection over $k$. \item The ideal $I_{\mathfrak q'} \subset k[x_1, \ldots, x_n]_{\mathfrak q'}$ can be generated by $c$ elements. \item The conormal module $(I/I^2)_{\mathfrak q}$ can be generated by $c$ elements over $S_{\mathfrak q}$. \item The conormal module $(I/I^2)_{\mathfrak q}$ is a free $S_{\mathfrak q}$-module of rank $c$. \item The ideal $I_{\mathfrak q'}$ can be generated by a regular sequence in the regular local ring $k[x_1, \ldots, x_n]_{\mathfrak q'}$. \end{enumerate} In this case any $c$ elements of $I_{\mathfrak q'}$ which generate $I_{\mathfrak q'}/\mathfrak q'I_{\mathfrak q'}$ form a regular sequence in the local ring $k[x_1, \ldots, x_n]_{\mathfrak q'}$. \end{lemma} \begin{proof} Set $R = k[x_1, \ldots, x_n]_{\mathfrak q'}$. This is a Cohen-Macaulay local ring of dimension $\text{height}(\mathfrak q')$, see for example Lemma \ref{lemma-lci-CM}. Moreover, $\overline{R} = R/IR = R/I_{\mathfrak q'} = S_{\mathfrak q}$ is a quotient of dimension $\text{height}(\mathfrak q)$. Let $f_1, \ldots, f_c \in I_{\mathfrak q'}$ be elements which generate $(I/I^2)_{\mathfrak q}$. By Lemma \ref{lemma-NAK} we see that $f_1, \ldots, f_c$ generate $I_{\mathfrak q'}$. Since the dimensions work out, we conclude by Proposition \ref{proposition-CM-module} that $f_1, \ldots, f_c$ is a regular sequence in $R$. By Lemma \ref{lemma-regular-quasi-regular} we see that $(I/I^2)_{\mathfrak q}$ is free. These arguments show that (2), (3), (4) are equivalent and that they imply the last statement of the lemma, and therefore they imply (5). \medskip\noindent If (5) holds, say $I_{\mathfrak q'}$ is generated by a regular sequence of length $e$, then $\text{height}(\mathfrak q) = \dim(S_{\mathfrak q}) = \dim(k[x_1, \ldots, x_n]_{\mathfrak q'}) - e = \text{height}(\mathfrak q') - e$ by dimension theory, see Section \ref{section-dimension}. We conclude that $e = c$. Thus (5) implies (2). \medskip\noindent We continue with the notation introduced in the first paragraph. For each $f_i$ we may find $d_i \in k[x_1, \ldots, x_n]$, $d_i \not \in \mathfrak q'$ such that $f_i' = d_i f_i \in k[x_1, \ldots, x_n]$. Then it is still true that $I_{\mathfrak q'} = (f_1', \ldots, f_c')R$. Hence there exists a $g' \in k[x_1, \ldots, x_n]$, $g' \not \in \mathfrak q'$ such that $I_{g'} = (f_1', \ldots, f_c')$. Moreover, pick $g'' \in k[x_1, \ldots, x_n]$, $g'' \not \in \mathfrak q'$ such that $\dim(S_{g''}) = \dim_{\mathfrak q} \Spec(S)$. By Lemma \ref{lemma-codimension} this dimension is equal to $n - c$. Finally, set $g$ equal to the image of $g'g''$ in $S$. Then we see that $$ S_g \cong k[x_1, \ldots, x_n, x_{n + 1}] / (f_1', \ldots, f_c', x_{n + 1}g'g'' - 1) $$ and by our choice of $g''$ this ring has dimension $n - c$. Therefore it is a global complete intersection. Thus each of (2), (3), and (4) implies (1). \medskip\noindent Assume (1). Let $S_g \cong k[y_1, \ldots, y_m]/(f_1, \ldots, f_t)$ be a presentation of $S_g$ as a global complete intersection. Write $J = (f_1, \ldots, f_t)$. Let $\mathfrak q'' \subset k[y_1, \ldots, y_m]$ be the prime corresponding to $\mathfrak qS_g$. Note that $t = m - \dim(S_g) = \text{height}(\mathfrak q'') - \text{height}(\mathfrak q)$, see Lemma \ref{lemma-codimension} for the last equality. As seen in the proof of Lemma \ref{lemma-lci-CM} (and also above) the elements $f_1, \ldots, f_t$ form a regular sequence in the local ring $k[y_1, \ldots, y_m]_{\mathfrak q''}$. By Lemma \ref{lemma-regular-quasi-regular} we see that $(J/J^2)_{\mathfrak q}$ is free of rank $t$. By Lemma \ref{lemma-conormal-module-localize} we have $$ J/J^2 \oplus S_g^n \cong (I/I^2)_g \oplus S_g^m $$ Thus $(I/I^2)_{\mathfrak q}$ is free of rank $t + n - m = m - \dim(S_g) + n - m = n - \dim(S_g) = \text{height}(\mathfrak q') - \text{height}(\mathfrak q) = c$. Thus we obtain (4). \end{proof} \noindent The result of Lemma \ref{lemma-lci} suggests the following definition. \begin{definition} \label{definition-lci-local-ring} Let $k$ be a field. Let $S$ be a local $k$-algebra essentially of finite type over $k$. We say $S$ is a {\it complete intersection (over $k$)} if there exists a local $k$-algebra $R$ and elements $f_1, \ldots, f_c \in \mathfrak m_R$ such that \begin{enumerate} \item $R$ is essentially of finite type over $k$, \item $R$ is a regular local ring, \item $f_1, \ldots, f_c$ form a regular sequence in $R$, and \item $S \cong R/(f_1, \ldots, f_c)$ as $k$-algebras. \end{enumerate} \end{definition} \noindent By the Cohen structure theorem (see Theorem \ref{theorem-cohen-structure-theorem}) any complete Noetherian local ring may be written as the quotient of some regular complete local ring. Hence we may use the definition above to define the notion of a complete intersection ring for any complete Noetherian local ring. We will discuss this in Divided Power Algebra, Section \ref{dpa-section-lci}. In the meantime the following lemma shows that such a definition makes sense. \begin{lemma} \label{lemma-ci-well-defined} Let $A \to B \to C$ be surjective local ring homomorphisms. Assume $A$ and $B$ are regular local rings. The following are equivalent \begin{enumerate} \item $\Ker(A \to C)$ is generated by a regular sequence, \item $\Ker(A \to C)$ is generated by $\dim(A) - \dim(C)$ elements, \item $\Ker(B \to C)$ is generated by a regular sequence, and \item $\Ker(B \to C)$ is generated by $\dim(B) - \dim(C)$ elements. \end{enumerate} \end{lemma} \begin{proof} A regular local ring is Cohen-Macaulay, see Lemma \ref{lemma-regular-ring-CM}. Hence we have the equivalences (1) $\Leftrightarrow$ (2) and (3) $\Leftrightarrow$ (4), see Proposition \ref{proposition-CM-module}. By Lemma \ref{lemma-regular-quotient-regular} the ideal $\Ker(A \to B)$ can be generated by $\dim(A) - \dim(B)$ elements. Hence we see that (4) implies (2). \medskip\noindent It remains to show that (1) implies (4). We do this by induction on $\dim(A) - \dim(B)$. The case $\dim(A) - \dim(B) = 0$ is trivial. Assume $\dim(A) > \dim (B)$. Write $I = \Ker(A \to C)$ and $J = \Ker(A \to B)$. Note that $J \subset I$. Our assumption is that the minimal number of generators of $I$ is $\dim(A) - \dim(C)$. Let $\mathfrak m \subset A$ be the maximal ideal. Consider the maps $$ J/ \mathfrak m J \to I / \mathfrak m I \to \mathfrak m /\mathfrak m^2. $$ By Lemma \ref{lemma-regular-quotient-regular} and its proof the composition is injective. Take any element $x \in J$ which is not zero in $J /\mathfrak mJ$. By the above and Nakayama's lemma $x$ is an element of a minimal set of generators of $I$. Hence we may replace $A$ by $A/xA$ and $I$ by $I/xA$ which decreases both $\dim(A)$ and the minimal number of generators of $I$ by $1$. Thus we win. \end{proof} \begin{lemma} \label{lemma-lci-local} Let $k$ be a field. Let $S$ be a local $k$-algebra essentially of finite type over $k$. The following are equivalent: \begin{enumerate} \item $S$ is a complete intersection over $k$, \item for any surjection $R \to S$ with $R$ a regular local ring essentially of finite presentation over $k$ the ideal $\Ker(R \to S)$ can be generated by a regular sequence, \item for some surjection $R \to S$ with $R$ a regular local ring essentially of finite presentation over $k$ the ideal $\Ker(R \to S)$ can be generated by $\dim(R) - \dim(S)$ elements, \item there exists a global complete intersection $A$ over $k$ and a prime $\mathfrak a$ of $A$ such that $S \cong A_{\mathfrak a}$, and \item there exists a local complete intersection $A$ over $k$ and a prime $\mathfrak a$ of $A$ such that $S \cong A_{\mathfrak a}$. \end{enumerate} \end{lemma} \begin{proof} It is clear that (2) implies (1) and (1) implies (3). It is also clear that (4) implies (5). Let us show that (3) implies (4). Thus we assume there exists a surjection $R \to S$ with $R$ a regular local ring essentially of finite presentation over $k$ such that the ideal $\Ker(R \to S)$ can be generated by $\dim(R) - \dim(S)$ elements. We may write $R = (k[x_1, \ldots, x_n]/J)_{\mathfrak q}$ for some $J \subset k[x_1, \ldots, x_n]$ and some prime $\mathfrak q \subset k[x_1, \ldots, x_n]$ with $J \subset \mathfrak q$. Let $I \subset k[x_1, \ldots, x_n]$ be the kernel of the map $k[x_1, \ldots, x_n] \to S$ so that $S \cong (k[x_1, \ldots, x_n]/I)_{\mathfrak q}$. By assumption $(I/J)_{\mathfrak q}$ is generated by $\dim(R) - \dim(S)$ elements. We conclude that $I_{\mathfrak q}$ can be generated by $\dim(k[x_1, \ldots, x_n]_{\mathfrak q}) - \dim(S)$ elements by Lemma \ref{lemma-ci-well-defined}. From Lemma \ref{lemma-lci} we see that for some $g \in k[x_1, \ldots, x_n]$, $g \not \in \mathfrak q$ the algebra $(k[x_1, \ldots, x_n]/I)_g$ is a global complete intersection and $S$ is isomorphic to a local ring of it. \medskip\noindent To finish the proof of the lemma we have to show that (5) implies (2). Assume (5) and let $\pi : R \to S$ be a surjection with $R$ a regular local $k$-algebra essentially of finite type over $k$. By assumption we have $S = A_{\mathfrak a}$ for some local complete intersection $A$ over $k$. Choose a presentation $R = (k[y_1, \ldots, y_m]/J)_{\mathfrak q}$ with $J \subset \mathfrak q \subset k[y_1, \ldots, y_m]$. We may and do assume that $J$ is the kernel of the map $k[y_1, \ldots, y_m] \to R$. Let $I \subset k[y_1, \ldots, y_m]$ be the kernel of the map $k[y_1, \ldots, y_m] \to S = A_{\mathfrak a}$. Then $J \subset I$ and $(I/J)_{\mathfrak q}$ is the kernel of the surjection $\pi : R \to S$. So $S = (k[y_1, \ldots, y_m]/I)_{\mathfrak q}$. \medskip\noindent By Lemma \ref{lemma-isomorphic-local-rings} we see that there exist $g \in A$, $g \not \in \mathfrak a$ and $g' \in k[y_1, \ldots, y_m]$, $g' \not \in \mathfrak q$ such that $A_g \cong (k[y_1, \ldots, y_m]/I)_{g'}$. After replacing $A$ by $A_g$ and $k[y_1, \ldots, y_m]$ by $k[y_1, \ldots, y_{m + 1}]$ we may assume that $A \cong k[y_1, \ldots, y_m]/I$. Consider the surjective maps of local rings $$ k[y_1, \ldots, y_m]_{\mathfrak q} \to R \to S. $$ We have to show that the kernel of $R \to S$ is generated by a regular sequence. By Lemma \ref{lemma-lci} we know that $k[y_1, \ldots, y_m]_{\mathfrak q} \to A_{\mathfrak a} = S$ has this property (as $A$ is a local complete intersection over $k$). We win by Lemma \ref{lemma-ci-well-defined}. \end{proof} \begin{lemma} \label{lemma-lci-at-prime} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q$ be a prime of $S$. The following are equivalent: \begin{enumerate} \item The local ring $S_{\mathfrak q}$ is a complete intersection ring (Definition \ref{definition-lci-local-ring}). \item There exists a $g \in S$, $g \not \in \mathfrak q$ such that $S_g$ is a local complete intersection over $k$. \item There exists a $g \in S$, $g \not \in \mathfrak q$ such that $S_g$ is a global complete intersection over $k$. \item For any presentation $S = k[x_1, \ldots, x_n]/I$ with $\mathfrak q' \subset k[x_1, \ldots, x_n]$ corresponding to $\mathfrak q$ any one of the equivalent conditions (1) -- (5) of Lemma \ref{lemma-lci} holds. \end{enumerate} \end{lemma} \begin{proof} This is a combination of Lemmas \ref{lemma-lci} and \ref{lemma-lci-local} and the definitions. \end{proof} \begin{lemma} \label{lemma-lci-global} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. The following are equivalent: \begin{enumerate} \item The ring $S$ is a local complete intersection over $k$. \item All local rings of $S$ are complete intersection rings over $k$. \item All localizations of $S$ at maximal ideals are complete intersection rings over $k$. \end{enumerate} \end{lemma} \begin{proof} This follows from Lemma \ref{lemma-lci-at-prime}, the fact that $\Spec(S)$ is quasi-compact and the definitions. \end{proof} \noindent The following lemma says that being a complete intersection is preserved under change of base field (in a strong sense). \begin{lemma} \label{lemma-lci-field-change-local} Let $K/k$ be a field extension. Let $S$ be a finite type algebra over $k$. Let $\mathfrak q_K$ be a prime of $S_K = K \otimes_k S$ and let $\mathfrak q$ be the corresponding prime of $S$. Then $S_{\mathfrak q}$ is a complete intersection over $k$ (Definition \ref{definition-lci-local-ring}) if and only if $(S_K)_{\mathfrak q_K}$ is a complete intersection over $K$. \end{lemma} \begin{proof} Choose a presentation $S = k[x_1, \ldots, x_n]/I$. This gives a presentation $S_K = K[x_1, \ldots, x_n]/I_K$ where $I_K = K \otimes_k I$. Let $\mathfrak q_K' \subset K[x_1, \ldots, x_n]$, resp.\ $\mathfrak q' \subset k[x_1, \ldots, x_n]$ be the corresponding prime. We will show that the equivalent conditions of Lemma \ref{lemma-lci} hold for the pair $(S = k[x_1, \ldots, x_n]/I, \mathfrak q)$ if and only if they hold for the pair $(S_K = K[x_1, \ldots, x_n]/I_K, \mathfrak q_K)$. The lemma will follow from this (see Lemma \ref{lemma-lci-at-prime}). \medskip\noindent By Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension} we have $\dim_{\mathfrak q} S = \dim_{\mathfrak q_K} S_K$. Hence the integer $c$ occurring in Lemma \ref{lemma-lci} is the same for the pair $(S = k[x_1, \ldots, x_n]/I, \mathfrak q)$ as for the pair $(S_K = K[x_1, \ldots, x_n]/I_K, \mathfrak q_K)$. On the other hand we have \begin{eqnarray*} I \otimes_{k[x_1, \ldots, x_n]} \kappa(\mathfrak q') \otimes_{\kappa(\mathfrak q')} \kappa(\mathfrak q_K') & = & I \otimes_{k[x_1, \ldots, x_n]} \kappa(\mathfrak q_K') \\ & = & I \otimes_{k[x_1, \ldots, x_n]} K[x_1, \ldots, x_n] \otimes_{K[x_1, \ldots, x_n]} \kappa(\mathfrak q_K') \\ & = & (K \otimes_k I) \otimes_{K[x_1, \ldots, x_n]} \kappa(\mathfrak q_K') \\ & = & I_K \otimes_{K[x_1, \ldots, x_n]} \kappa(\mathfrak q'_K). \end{eqnarray*} Therefore, $\dim_{\kappa(\mathfrak q')} I \otimes_{k[x_1, \ldots, x_n]} \kappa(\mathfrak q') = \dim_{\kappa(\mathfrak q'_K)} I_K \otimes_{K[x_1, \ldots, x_n]} \kappa(\mathfrak q_K')$. Thus it follows from Nakayama's Lemma \ref{lemma-NAK} that the minimal number of generators of $I_{\mathfrak q'}$ is the same as the minimal number of generators of $(I_K)_{\mathfrak q'_K}$. Thus the lemma follows from characterization (2) of Lemma \ref{lemma-lci}. \end{proof} \begin{lemma} \label{lemma-lci-field-change} Let $k \to K$ be a field extension. Let $S$ be a finite type $k$-algebra. Then $S$ is a local complete intersection over $k$ if and only if $S \otimes_k K$ is a local complete intersection over $K$. \end{lemma} \begin{proof} This follows from a combination of Lemmas \ref{lemma-lci-global} and \ref{lemma-lci-field-change-local}. But we also give a different proof here (based on the same principles). \medskip\noindent Set $S' = S \otimes_k K$. Let $\alpha : k[x_1, \ldots, x_n] \to S$ be a presentation with kernel $I$. Let $\alpha' : K[x_1, \ldots, x_n] \to S'$ be the induced presentation with kernel $I'$. \medskip\noindent Suppose that $S$ is a local complete intersection. Pick a prime $\mathfrak q \subset S'$. Denote by $\mathfrak q'$ the corresponding prime of $K[x_1, \ldots, x_n]$, $\mathfrak p$ the corresponding prime of $S$, and $\mathfrak p'$ the corresponding prime of $k[x_1, \ldots, x_n]$. Consider the following diagram of Noetherian local rings $$ \xymatrix{ S'_{\mathfrak q} & K[x_1, \ldots, x_n]_{\mathfrak q'} \ar[l] \\ S_{\mathfrak p}\ar[u] & k[x_1, \ldots, x_n]_{\mathfrak p'} \ar[u] \ar[l] }. $$ By Lemma \ref{lemma-lci} we know that $S_{\mathfrak p}$ is cut out by some regular sequence $f_1, \ldots, f_c$ in $k[x_1, \ldots, x_n]_{\mathfrak p'}$. Since the right vertical arrow is flat we see that the images of $f_1, \ldots, f_c$ form a regular sequence in $K[x_1, \ldots, x_n]_{\mathfrak q'}$. Because tensoring with $K$ over $k$ is an exact functor we have $S'_{\mathfrak q} = K[x_1, \ldots, x_n]_{\mathfrak q'}/(f_1, \ldots, f_c)$. Hence by Lemma \ref{lemma-lci} again we see that $S'$ is a local complete intersection in a neighbourhood of $\mathfrak q$. Since $\mathfrak q$ was arbitrary we see that $S'$ is a local complete intersection over $K$. \medskip\noindent Suppose that $S'$ is a local complete intersection. Pick a maximal ideal $\mathfrak m$ of $S$. Let $\mathfrak m'$ denote the corresponding maximal ideal of $k[x_1, \ldots, x_n]$. Denote by $\kappa = \kappa(\mathfrak m)$ the residue field. By Remark \ref{remark-fundamental-diagram} the primes of $S'$ lying over $\mathfrak m$ correspond to primes in $K \otimes_k \kappa$. By the Hilbert-Nullstellensatz Theorem \ref{theorem-nullstellensatz} we have $[\kappa : k] < \infty$. Hence $K \otimes_k \kappa$ is finite nonzero over $K$. Hence $K \otimes_k \kappa$ has a finite number $> 0$ of primes which are all maximal, each of which has a residue field finite over $K$ (see Section \ref{section-artinian}). Hence there are finitely many $> 0$ prime ideals $\mathfrak n \subset S'$ lying over $\mathfrak m$, each of which is maximal and has a residue field which is finite over $K$. Pick one, say $\mathfrak n \subset S'$, and let $\mathfrak n' \subset K[x_1, \ldots, x_n]$ denote the corresponding prime ideal of $K[x_1, \ldots, x_n]$. Note that since $V(\mathfrak mS')$ is finite, we see that $\mathfrak n$ is an isolated closed point of it, and we deduce that $\mathfrak mS'_{\mathfrak n}$ is an ideal of definition of $S'_{\mathfrak n}$. This implies that $\dim(S_{\mathfrak m}) = \dim(S'_{\mathfrak n})$ for example by Lemma \ref{lemma-dimension-base-fibre-equals-total}. (This can also be seen using Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension}.) Consider the corresponding diagram of Noetherian local rings $$ \xymatrix{ S'_{\mathfrak n} & K[x_1, \ldots, x_n]_{\mathfrak n'} \ar[l] \\ S_{\mathfrak m}\ar[u] & k[x_1, \ldots, x_n]_{\mathfrak m'} \ar[u] \ar[l] }. $$ According to Lemma \ref{lemma-change-base-NL} we have $\NL(\alpha) \otimes_S S' = \NL(\alpha')$, in particular $I'/(I')^2 = I/I^2 \otimes_S S'$. Thus $(I/I^2)_{\mathfrak m} \otimes_{S_{\mathfrak m}} \kappa$ and $(I'/(I')^2)_{\mathfrak n} \otimes_{S'_{\mathfrak n}} \kappa(\mathfrak n)$ have the same dimension. Since $(I'/(I')^2)_{\mathfrak n}$ is free of rank $n - \dim S'_{\mathfrak n}$ we deduce that $(I/I^2)_{\mathfrak m}$ can be generated by $n - \dim S'_{\mathfrak n} = n - \dim S_{\mathfrak m}$ elements. By Lemma \ref{lemma-lci} we see that $S$ is a local complete intersection in a neighbourhood of $\mathfrak m$. Since $\mathfrak m$ was any maximal ideal we conclude that $S$ is a local complete intersection. \end{proof} \noindent We end with a lemma which we will later use to prove that given ring maps $T \to A \to B$ where $B$ is syntomic over $T$, and $B$ is syntomic over $A$, then $A$ is syntomic over $T$. \begin{lemma} \label{lemma-lci-permanence-initial} Let $$ \xymatrix{ B & S \ar[l] \\ A \ar[u] & R \ar[l] \ar[u] } $$ be a commutative square of local rings. Assume \begin{enumerate} \item $R$ and $\overline{S} = S/\mathfrak m_R S$ are regular local rings, \item $A = R/I$ and $B = S/J$ for some ideals $I$, $J$, \item $J \subset S$ and $\overline{J} = J/(\mathfrak m_R S \cap J) \subset \overline{S}$ are generated by regular sequences, and \item $A \to B$ and $R \to S$ are flat. \end{enumerate} Then $I$ is generated by a regular sequence. \end{lemma} \begin{proof} Set $\overline{B} = B/\mathfrak m_RB = B/\mathfrak m_AB$ so that $\overline{B} = \overline{S}/\overline{J}$. Let $f_1, \ldots, f_{\overline{c}} \in J$ be elements such that $\overline{f}_1, \ldots, \overline{f}_{\overline{c}} \in \overline{J}$ form a regular sequence generating $\overline{J}$. Note that $\overline{c} = \dim(\overline{S}) - \dim(\overline{B})$, see Lemma \ref{lemma-ci-well-defined}. By Lemma \ref{lemma-grothendieck-regular-sequence} the ring $S/(f_1, \ldots, f_{\overline{c}})$ is flat over $R$. Hence $S/((f_1, \ldots, f_{\overline{c}}) + IS)$ is flat over $A$. The map $S/((f_1, \ldots, f_{\overline{c}}) + IS) \to B$ is therefore a surjection of finite $S/IS$-modules flat over $A$ which is an isomorphism modulo $\mathfrak m_A$, and hence an isomorphism by Lemma \ref{lemma-mod-injective}. In other words, $J = (f_1, \ldots, f_{\overline{c}}) + IS$. \medskip\noindent By Lemma \ref{lemma-ci-well-defined} again the ideal $J$ is generated by a regular sequence of $c = \dim(S) - \dim(B)$ elements. Hence $J/\mathfrak m_SJ$ is a vector space of dimension $c$. By the description of $J$ above there exist $g_1, \ldots, g_{c - \overline{c}} \in I$ such that $J$ is generated by $f_1, \ldots, f_{\overline{c}}, g_1, \ldots, g_{c - \overline{c}}$ (use Nakayama's Lemma \ref{lemma-NAK}). Consider the ring $A' = R/(g_1, \ldots, g_{c - \overline{c}})$ and the surjection $A' \to A$. We see from the above that $B = S/(f_1, \ldots, f_{\overline{c}}, g_1, \ldots, g_{c - \overline{c}})$ is flat over $A'$ (as $S/(f_1, \ldots, f_{\overline{c}})$ is flat over $R$). Hence $A' \to B$ is injective (as it is faithfully flat, see Lemma \ref{lemma-local-flat-ff}). Since this map factors through $A$ we get $A' = A$. Note that $\dim(B) = \dim(A) + \dim(\overline{B})$, and $\dim(S) = \dim(R) + \dim(\overline{S})$, see Lemma \ref{lemma-dimension-base-fibre-equals-total}. Hence $c - \overline{c} = \dim(R) -\dim(A)$ by elementary algebra. Thus $I = (g_1, \ldots, g_{c - \overline{c}})$ is generated by a regular sequence according to Lemma \ref{lemma-ci-well-defined}. \end{proof} \section{Syntomic morphisms} \label{section-syntomic} % BEGIN ALGEBRA EDITORIAL ROUTE section-syntomic \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-syntomic}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-syntomic \noindent Syntomic ring maps are flat finitely presented ring maps all of whose fibers are local complete intersections. We discuss general local complete intersection ring maps in More on Algebra, Section \ref{more-algebra-section-lci}. \begin{definition} \label{definition-lci} A ring map $R \to S$ is called {\it syntomic}, or we say $S$ is a {\it flat local complete intersection over $R$} if it is flat, of finite presentation, and if all of its fibre rings $S \otimes_R \kappa(\mathfrak p)$ are local complete intersections, see Definition \ref{definition-lci-field}. \end{definition} \noindent Clearly, an algebra over a field is syntomic over the field if and only if it is a local complete intersection. Here is a pleasing feature of this definition. \begin{lemma} \label{lemma-syntomic-descends} \begin{slogan} Being syntomic is fpqc local on the base. \end{slogan} Let $R \to S$ be a ring map. Let $R \to R'$ be a faithfully flat ring map. Set $S' = R'\otimes_R S$. Then $R \to S$ is syntomic if and only if $R' \to S'$ is syntomic. \end{lemma} \begin{proof} By Lemma \ref{lemma-finite-presentation-descends} and Lemma \ref{lemma-flatness-descends} this holds for the property of being flat and for the property of being of finite presentation. The map $\Spec(R') \to \Spec(R)$ is surjective, see Lemma \ref{lemma-ff-rings}. Thus it suffices to show, for primes $\mathfrak p' \subset R'$ lying over $\mathfrak p \subset R$, that $S \otimes_R \kappa(\mathfrak p)$ is a local complete intersection if and only if $S' \otimes_{R'} \kappa(\mathfrak p')$ is a local complete intersection. Note that $S' \otimes_{R'} \kappa(\mathfrak p') = S \otimes_R \kappa(\mathfrak p) \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak p')$. Thus Lemma \ref{lemma-lci-field-change} applies. \end{proof} \begin{lemma} \label{lemma-base-change-syntomic} Any base change of a syntomic map is syntomic. \end{lemma} \begin{proof} This is true for being flat, for being of finite presentation, and for having local complete intersections as fibres by Lemmas \ref{lemma-flat-base-change}, \ref{lemma-compose-finite-type} and \ref{lemma-lci-field-change}. \end{proof} \begin{lemma} \label{lemma-local-syntomic} Let $R \to S$ be a ring map. Suppose we have $g_1, \ldots, g_m \in S$ which generate the unit ideal such that each $R \to S_{g_i}$ is syntomic. Then $R \to S$ is syntomic. \end{lemma} \begin{proof} This is true for being flat and for being of finite presentation by Lemmas \ref{lemma-flat-localization} and \ref{lemma-cover-upstairs}. The property of having fibre rings which are local complete intersections is local on $S$ by its very definition, see Definition \ref{definition-lci-field}. \end{proof} \begin{definition} \label{definition-relative-global-complete-intersection} Let $R \to S$ be a ring map. We say that $R \to S$ is a {\it relative global complete intersection} if there exists a presentation $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ and every nonempty fibre of $\Spec(S) \to \Spec(R)$ has dimension $n - c$. We will say ``let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ be a relative global complete intersection'' to indicate this situation. \end{definition} \noindent The following lemma is occasionally useful to find global presentations. \begin{lemma} \label{lemma-huber} Let $S$ be a finitely presented $R$-algebra which has a presentation $S = R[x_1, \ldots, x_n]/I$ such that $I/I^2$ is free over $S$. Then $S$ has a presentation $S = R[y_1, \ldots, y_m]/(f_1, \ldots, f_c)$ such that $(f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2$ is free with basis given by the classes of $f_1, \ldots, f_c$. \end{lemma} \begin{proof} Note that $I$ is a finitely generated ideal by Lemma \ref{lemma-finite-presentation-independent}. Let $f_1, \ldots, f_c \in I$ be elements which map to a basis of $I/I^2$. By Nakayama's lemma (Lemma \ref{lemma-NAK}) there exists a $g \in 1 + I$ such that $$ g \cdot I \subset (f_1, \ldots, f_c) $$ and $I_g \cong (f_1, \ldots, f_c)_g$. Hence we see that $$ S \cong R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)[1/g] \cong R[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, gx_{n + 1} - 1) $$ as desired. It follows that $f_1, \ldots, f_c,gx_{n + 1} - 1$ form a basis for $(f_1, \ldots, f_c, gx_{n + 1} - 1)/(f_1, \ldots, f_c, gx_{n + 1} - 1)^2$ for example by applying Lemma \ref{lemma-principal-localization-NL}. \end{proof} \begin{example} \label{example-factor-polynomials} Let $n , m \geq 1$ be integers. Consider the ring map \begin{eqnarray*} R = \mathbf{Z}[a_1, \ldots, a_{n + m}] & \longrightarrow & S = \mathbf{Z}[b_1, \ldots, b_n, c_1, \ldots, c_m] \\ a_1 & \longmapsto & b_1 + c_1 \\ a_2 & \longmapsto & b_2 + b_1 c_1 + c_2 \\ \ldots & \ldots & \ldots \\ a_{n + m} & \longmapsto & b_n c_m \end{eqnarray*} In other words, this is the unique ring map of polynomial rings as indicated such that the polynomial factorization $$ x^{n + m} + a_1 x^{n + m - 1} + \ldots + a_{n + m} = (x^n + b_1 x^{n - 1} + \ldots + b_n) (x^m + c_1 x^{m - 1} + \ldots + c_m) $$ holds. Note that $S$ is generated by $n + m$ elements over $R$ (namely, $b_i, c_j$) and that there are $n + m$ equations (namely $a_k = a_k(b_i, c_j)$). In order to show that $S$ is a relative global complete intersection over $R$ it suffices to prove that all fibres have dimension $0$. \medskip\noindent To prove this, let $R \to k$ be a ring map into a field $k$. Say $a_i$ maps to $\alpha_i \in k$. Consider the fibre ring $S_k = k \otimes_R S$. Let $k \to K$ be a field extension. A $k$-algebra map $S_k \to K$ is the same thing as finding $\beta_1, \ldots, \beta_n, \gamma_1, \ldots, \gamma_m \in K$ such that $$ x^{n + m} + \alpha_1 x^{n + m - 1} + \ldots + \alpha_{n + m} = (x^n + \beta_1 x^{n - 1} + \ldots + \beta_n) (x^m + \gamma_1 x^{m - 1} + \ldots + \gamma_m). $$ Hence we see there are at most finitely many choices of such $n + m$-tuples in $K$. This proves that all fibres have finitely many closed points (use Hilbert's Nullstellensatz to see they all correspond to solutions in $\overline{k}$ for example) and hence that $R \to S$ is a relative global complete intersection. \medskip\noindent Another way to argue this is to show $\mathbf{Z}[a_1, \ldots, a_{n + m}] \to \mathbf{Z}[b_1, \ldots, b_n, c_1, \ldots, c_m]$ is actually also a {\it finite} ring map. Namely, by Lemma \ref{lemma-polynomials-divide} each of $b_i, c_j$ is integral over $R$, and hence $R \to S$ is finite by Lemma \ref{lemma-characterize-integral}. \end{example} \begin{example} \label{example-roots-universal-polynomial} Consider the ring map \begin{eqnarray*} R = \mathbf{Z}[a_1, \ldots, a_n] & \longrightarrow & S = \mathbf{Z}[\alpha_1, \ldots, \alpha_n] \\ a_1 & \longmapsto & \alpha_1 + \ldots + \alpha_n \\ \ldots & \ldots & \ldots \\ a_n & \longmapsto & \alpha_1 \ldots \alpha_n \end{eqnarray*} In other words this is the unique ring map of polynomial rings as indicated such that $$ x^n + a_1 x^{n - 1} + \ldots + a_n = \prod\nolimits_{i = 1}^n (x + \alpha_i) $$ holds in $\mathbf{Z}[\alpha_i, x]$. Another way to say this is that $a_i$ maps to the $i$th elementary symmetric function in $\alpha_1, \ldots, \alpha_n$. By the usual theory of elementary symmetric polynomials (details omitted) the ring $S$ is finite free over $R$ with basis the elements $\alpha_1^{e_1} \alpha_2^{e_2} \ldots \alpha_n^{e_n}$ with $0 \leq e_i \leq n - i$. A fortiori, the fibre rings of $R \to S$ are finite and hence have dimension $0$. On the other hand, $S$ is generated by $n$ elements over $R$ subject to $n$ equations. Hence $S$ is a relative global complete intersection over $R$. Since the rank of $S$ over $R$ is positive, we also see that $S$ is faithfully flat over $R$. \end{example} \begin{lemma} \label{lemma-base-change-relative-global-complete-intersection} Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ be a relative global complete intersection (Definition \ref{definition-relative-global-complete-intersection}) \begin{enumerate} \item For any $R \to R'$ the base change $R' \otimes_R S = R'[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection. \item For any $g \in S$ which is the image of $h \in R[x_1, \ldots, x_n]$ the ring $S_g = R[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, hx_{n + 1} - 1)$ is a relative global complete intersection. \item If $R \to S$ factors as $R \to R_f \to S$ for some $f \in R$, then the ring $S = R_f[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection over $R_f$. \end{enumerate} \end{lemma} \begin{proof} By Lemma \ref{lemma-dimension-preserved-field-extension} the fibres of a base change have the same dimension as the fibres of the original map. Moreover $R' \otimes_R R[x_1, \ldots, x_n]/(f_1, \ldots, f_c) = R'[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Thus (1) follows. The proof of (2) is that the localization at one element can be described as $S_g \cong S[x_{n + 1}]/(gx_{n + 1} - 1)$. Assertion (3) follows from (1) since under the assumptions of (3) we have $R_f \otimes_R S \cong S$. \end{proof} \begin{lemma} \label{lemma-localize-relative-complete-intersection} Let $R$ be a ring. Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. We will find $h \in R[x_1, \ldots, x_n]$ which maps to $g \in S$ such that $$ S_g = R[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, hx_{n + 1} - 1) $$ is a relative global complete intersection with a presentation as in Definition \ref{definition-relative-global-complete-intersection} in each of the following cases: \begin{enumerate} \item Let $I \subset R$ be an ideal. If the fibres of $\Spec(S/IS) \to \Spec(R/I)$ have dimension $n - c$, then we can find $(h, g)$ as above such that $g$ maps to $1 \in S/IS$. \item Let $\mathfrak p \subset R$ be a prime. If $\dim(S \otimes_R \kappa(\mathfrak p)) = n - c$, then we can find $(h, g)$ as above such that $g$ maps to a unit of $S \otimes_R \kappa(\mathfrak p)$. \item Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. If $\dim_{\mathfrak q}(S/R) = n - c$, then we can find $(h, g)$ as above such that $g \not \in \mathfrak q$. \end{enumerate} \end{lemma} \begin{proof} Ad (1). By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} there exists an open subset $W \subset \Spec(S)$ containing $V(IS)$ such that all fibres of $W \to \Spec(R)$ have dimension $\leq n - c$. Say $W = \Spec(S) \setminus V(J)$. Then $V(J) \cap V(IS) = \emptyset$ hence we can find a $g \in J$ which maps to $1 \in S/IS$. Let $h \in R[x_1, \ldots, x_n]$ be any preimage of $g$. \medskip\noindent Ad (2). By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} there exists an open subset $W \subset \Spec(S)$ containing $\Spec(S \otimes_R \kappa(\mathfrak p))$ such that all fibres of $W \to \Spec(R)$ have dimension $\leq n - c$. Say $W = \Spec(S) \setminus V(J)$. Then $V(J \cdot S \otimes_R \kappa(\mathfrak p)) = \emptyset$. Hence we can find a $g \in J$ which maps to a unit in $S \otimes_R \kappa(\mathfrak p)$ (details omitted). Let $h \in R[x_1, \ldots, x_n]$ be any preimage of $g$. \medskip\noindent Ad (3). By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} there exists a $g \in S$, $g \not \in \mathfrak q$ such that all nonempty fibres of $R \to S_g$ have dimension $\leq n - c$. Let $h \in R[x_1, \ldots, x_n]$ be any element that maps to $g$. \end{proof} \noindent The following lemma says we can do absolute Noetherian approximation for relative global complete intersections. \begin{lemma} \label{lemma-relative-global-complete-intersection-Noetherian} Let $R$ be a ring. Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ be a relative global complete intersection (Definition \ref{definition-relative-global-complete-intersection}). There exists a finite type $\mathbf{Z}$-subalgebra $R_0 \subset R$ such that $f_i \in R_0[x_1, \ldots, x_n]$ and such that $$ S_0 = R_0[x_1, \ldots, x_n]/(f_1, \ldots, f_c) $$ is a relative global complete intersection. \end{lemma} \begin{proof} Let $R_0 \subset R$ be the $\mathbf{Z}$-algebra of $R$ generated by all the coefficients of the polynomials $f_1, \ldots, f_c$. Let $S_0 = R_0[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Clearly, $S = R \otimes_{R_0} S_0$. Pick a prime $\mathfrak q \subset S$ and denote by $\mathfrak p \subset R$, $\mathfrak q_0 \subset S_0$, and $\mathfrak p_0 \subset R_0$ the primes it lies over. Because $\dim (S \otimes_R \kappa(\mathfrak p) ) = n - c$ we also have $\dim (S_0 \otimes_{R_0} \kappa(\mathfrak p_0)) = n - c$, see Lemma \ref{lemma-dimension-preserved-field-extension}. By Lemma \ref{lemma-dimension-fibres-bounded-open-upstairs} there exists a $g \in S_0$, $g \not \in \mathfrak q_0$ such that all nonempty fibres of $R_0 \to (S_0)_g$ have dimension $\leq n - c$. As $\mathfrak q$ was arbitrary and $\Spec(S)$ quasi-compact, we can find finitely many $g_1, \ldots, g_m \in S_0$ such that (a) for $j = 1, \ldots, m$ the nonempty fibres of $R_0 \to (S_0)_{g_j}$ have dimension $\leq n - c$ and (b) the image of $\Spec(S) \to \Spec(S_0)$ is contained in $D(g_1) \cup \ldots \cup D(g_m)$. In other words, the images of $g_1, \ldots, g_m$ in $S = R \otimes_{R_0} S_0$ generate the unit ideal. After increasing $R_0$ we may assume that $g_1, \ldots, g_m$ generate the unit ideal in $S_0$. By (a) the nonempty fibres of $R_0 \to S_0$ all have dimension $\leq n - c$ and we conclude. \end{proof} \begin{lemma} \label{lemma-relative-global-complete-intersection-conormal} Let $R$ be a ring. Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ be a relative global complete intersection (Definition \ref{definition-relative-global-complete-intersection}). For every prime $\mathfrak q$ of $S$, let $\mathfrak q'$ denote the corresponding prime of $R[x_1, \ldots, x_n]$. Then \begin{enumerate} \item $f_1, \ldots, f_c$ is a regular sequence in the local ring $R[x_1, \ldots, x_n]_{\mathfrak q'}$, \item each of the rings $R[x_1, \ldots, x_n]_{\mathfrak q'}/(f_1, \ldots, f_i)$ is flat over $R$, and \item the $S$-module $(f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2$ is free with basis given by the elements $f_i \bmod (f_1, \ldots, f_c)^2$. \end{enumerate} \end{lemma} \begin{proof} Assume $R$ is Noetherian. Let $\mathfrak p = R \cap \mathfrak q'$. By Lemma \ref{lemma-lci} for example we see that $f_1, \ldots, f_c$ form a regular sequence in the local ring $R[x_1, \ldots, x_n]_{\mathfrak q'} \otimes_R \kappa(\mathfrak p)$. Moreover, the local ring $R[x_1, \ldots, x_n]_{\mathfrak q'}$ is flat over $R_{\mathfrak p}$. Since $R$, and hence $R[x_1, \ldots, x_n]_{\mathfrak q'}$ is Noetherian we see from Lemma \ref{lemma-grothendieck-regular-sequence} that (1) and (2) hold. \medskip\noindent Let $R$ be general. Write $R = \colim_{\lambda \in \Lambda} R_\lambda$ as the filtered colimit of finite type $\mathbf{Z}$-subalgebras (compare with Section \ref{section-colimits-flat}). We may assume that $f_1, \ldots, f_c \in R_\lambda[x_1, \ldots, x_n]$ for all $\lambda$. Let $R_0 \subset R$ be as in Lemma \ref{lemma-relative-global-complete-intersection-Noetherian}. Then we may assume $R_0 \subset R_\lambda$ for all $\lambda$. It follows that $S_\lambda = R_\lambda[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection (as base change of $S_0$ via $R_0 \to R_\lambda$, see Lemma \ref{lemma-base-change-relative-global-complete-intersection}). Denote by $\mathfrak p_\lambda$, $\mathfrak q_\lambda$, $\mathfrak q'_\lambda$ the primes of $R_\lambda$, $S_\lambda$, $R_\lambda[x_1, \ldots, x_n]$ induced by $\mathfrak p$, $\mathfrak q$, $\mathfrak q'$. With this notation, we have (1) and (2) for each $\lambda$. Since $$ R[x_1, \ldots, x_n]_{\mathfrak q'}/(f_1, \ldots, f_i) = \colim R_\lambda[x_1, \ldots, x_n]_{\mathfrak q_\lambda'}/(f_1, \ldots, f_i) $$ we deduce flatness in (2) over $R$ from Lemma \ref{lemma-colimit-rings-flat}. Since we have \begin{align*} R[x_1, \ldots, x_n]_{\mathfrak q'}/(f_1, \ldots, f_i) \xrightarrow{f_{i + 1}} R[x_1, \ldots, x_n]_{\mathfrak q'}/(f_1, \ldots, f_i) \\ = \colim \left( R_\lambda[x_1, \ldots, x_n]_{\mathfrak q_\lambda'}/(f_1, \ldots, f_i) \xrightarrow{f_{i + 1}} R_\lambda[x_1, \ldots, x_n]_{\mathfrak q_\lambda'}/(f_1, \ldots, f_i) \right) \end{align*} and since filtered colimits are exact (Lemma \ref{lemma-directed-colimit-exact}) we conclude that we have (1). \medskip\noindent Proof of (3). Denote by $N$ the $S$-module $(f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2$ and $e_i \in N$ the image of $f_i$. By Lemma \ref{lemma-regular-quasi-regular} and (1) we know that $e_1, \ldots, e_c$ is a basis of $N_\mathfrak q$ for all primes $\mathfrak q$ of $S$. By Lemma \ref{lemma-characterize-zero-local} we conclude that (3) is true. \end{proof} \begin{lemma} \label{lemma-relative-global-complete-intersection} A relative global complete intersection is syntomic, i.e., flat. \end{lemma} \begin{proof} Let $R \to S$ be a relative global complete intersection. The fibres are global complete intersections, and $S$ is of finite presentation over $R$. Thus the only thing to prove is that $R \to S$ is flat. This is true by (2) of Lemma \ref{lemma-relative-global-complete-intersection-conormal}. \end{proof} \begin{lemma} \label{lemma-adjoin-roots} Suppose that $A$ is a ring, and $P(x) = x^n + b_1 x^{n-1} + \ldots + b_n \in A[x]$ is a monic polynomial over $A$. Then there exists a syntomic, finite free, faithfully flat ring extension $A \subset A'$ such that $P(x) = \prod_{i = 1, \ldots, n} (x - \beta_i)$ for certain $\beta_i \in A'$. \end{lemma} \begin{proof} Take $A' = A \otimes_R S$, where $R$ and $S$ are as in Example \ref{example-roots-universal-polynomial}, where $R \to A$ maps $a_i$ to $b_i$, and let $\beta_i = -1 \otimes \alpha_i$. Observe that $R \to S$ is faithfully flat and finite free and syntomic by Lemma \ref{lemma-relative-global-complete-intersection}. These properties are inherited by the base change $A \to A'$; some details omitted. \end{proof} \begin{lemma} \label{lemma-syntomic} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$ of $R$. The following are equivalent: \begin{enumerate} \item There exists an element $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is syntomic. \item There exists an element $g \in S$, $g \not \in \mathfrak q$ such that $S_g$ is a relative global complete intersection over $R$. \item There exists an element $g \in S$, $g \not \in \mathfrak q$, such that $R \to S_g$ is of finite presentation, the local ring map $R_{\mathfrak p} \to S_{\mathfrak q}$ is flat, and the local ring $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ is a complete intersection ring over $\kappa(\mathfrak p)$ (see Definition \ref{definition-lci-local-ring}). \end{enumerate} \end{lemma} \begin{proof} The implication (1) $\Rightarrow$ (3) is Lemma \ref{lemma-lci-at-prime}. The implication (2) $\Rightarrow$ (1) is Lemma \ref{lemma-relative-global-complete-intersection}. It remains to show that (3) implies (2). \medskip\noindent Assume (3). After replacing $S$ by $S_g$ for some $g \in S$, $g\not\in \mathfrak q$, we may assume $S$ is finitely presented over $R$. Choose a presentation $S = R[x_1, \ldots, x_n]/I$. Let $\mathfrak q' \subset R[x_1, \ldots, x_n]$ be the prime corresponding to $\mathfrak q$. Write $\kappa(\mathfrak p) = k$. Note that $S \otimes_R k = k[x_1, \ldots, x_n]/\overline{I}$ where $\overline{I} \subset k[x_1, \ldots, x_n]$ is the ideal generated by the image of $I$. Let $\overline{\mathfrak q}' \subset k[x_1, \ldots, x_n]$ be the prime ideal generated by the image of $\mathfrak q'$. By Lemma \ref{lemma-lci-at-prime} the equivalent conditions of Lemma \ref{lemma-lci} hold for $\overline{I}$ and $\overline{\mathfrak q}'$. Say the dimension of $\overline{I}_{\overline{\mathfrak q}'}/ \overline{\mathfrak q}'\overline{I}_{\overline{\mathfrak q}'}$ over $\kappa(\overline{\mathfrak q}')$ is $c$. Pick $f_1, \ldots, f_c \in I$ mapping to a basis of this vector space. The images $\overline{f}_j \in \overline{I}$ generate $\overline{I}_{\overline{\mathfrak q}'}$ (by Lemma \ref{lemma-lci}). Set $S' = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Let $J$ be the kernel of the surjection $S' \to S$. Since $S$ is of finite presentation $J$ is a finitely generated ideal (Lemma \ref{lemma-compose-finite-type}). Consider the short exact sequence $$ 0 \to J \to S' \to S \to 0. $$ As $S_\mathfrak q$ is flat over $R$ we see that $J_{\mathfrak q'} \otimes_R k \to S'_{\mathfrak q'} \otimes_R k$ is injective (Lemma \ref{lemma-flat-tor-zero}). However, by construction $S'_{\mathfrak q'} \otimes_R k$ maps isomorphically to $S_\mathfrak q \otimes_R k$. Hence we conclude that $J_{\mathfrak q'} \otimes_R k = J_{\mathfrak q'}/\mathfrak pJ_{\mathfrak q'} = 0$. By Nakayama's lemma (Lemma \ref{lemma-NAK}) we conclude that there exists a $g \in R[x_1, \ldots, x_n]$, $g \not \in \mathfrak q'$ such that $J_g = 0$. In other words $S'_g \cong S_g$. After further localizing we see that $S'$ (and hence $S$) becomes a relative global complete intersection by Lemma \ref{lemma-localize-relative-complete-intersection} as desired. \end{proof} \begin{lemma} \label{lemma-syntomic-presentation-ideal-mod-squares} Let $R$ be a ring. Let $S = R[x_1, \ldots, x_n]/I$ for some finitely generated ideal $I$. If $g \in S$ is such that $S_g$ is syntomic over $R$, then $(I/I^2)_g$ is a finite projective $S_g$-module. \end{lemma} \begin{proof} By Lemma \ref{lemma-syntomic} there exist finitely many elements $g_1, \ldots, g_m \in S$ which generate the unit ideal in $S_g$ such that each $S_{gg_j}$ is a relative global complete intersection over $R$. Since it suffices to prove that $(I/I^2)_{gg_j}$ is finite projective, see Lemma \ref{lemma-finite-projective}, we may assume that $S_g$ is a relative global complete intersection. In this case the result follows from Lemmas \ref{lemma-conormal-module-localize} and \ref{lemma-relative-global-complete-intersection-conormal}. \end{proof} \begin{lemma} \label{lemma-composition-syntomic} Let $R \to S$, $S \to S'$ be ring maps. \begin{enumerate} \item If $R \to S$ and $S \to S'$ are syntomic, then $R \to S'$ is syntomic. \item If $R \to S$ and $S \to S'$ are relative global complete intersections, then $R \to S'$ is a relative global complete intersection. \end{enumerate} \end{lemma} \begin{proof} Proof of (2). Say $R \to S$ and $S \to S'$ are relative global complete intersections and we have presentations $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ and $S' = S[y_1, \ldots, y_m]/(h_1, \ldots, h_d)$ as in Definition \ref{definition-relative-global-complete-intersection}. Then $$ S' \cong R[x_1, \ldots, x_n, y_1, \ldots, y_m]/(f_1, \ldots, f_c, h'_1, \ldots, h'_d) $$ for some lifts $h_j' \in R[x_1, \ldots, x_n, y_1, \ldots, y_m]$ of the $h_j$. Hence it suffices to bound the dimensions of the fibre rings. Thus we may assume $R = k$ is a field. In this case we see that we have a ring, namely $S$, which is of finite type over $k$ and equidimensional of dimension $n - c$, and a finite type ring map $S \to S'$ all of whose nonempty fibre rings are equidimensional of dimension $m - d$. Then, by Lemma \ref{lemma-dimension-base-fibre-total} for example applied to localizations at maximal ideals of $S'$, we see that $\dim(S') \leq n - c + m - d$ as desired. \medskip\noindent We will reduce part (1) to part (2). Assume $R \to S$ and $S \to S'$ are syntomic. Let $\mathfrak q' \subset S'$ be a prime ideal lying over $\mathfrak q \subset S$. By Lemma \ref{lemma-syntomic} there exists a $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S \to S'_{g'}$ is a relative global complete intersection. Similarly, we find $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is a relative global complete intersection. By Lemma \ref{lemma-base-change-relative-global-complete-intersection} the ring map $S_g \to S'_{gg'}$ is a relative global complete intersection. By part (2) we see that $R \to S'_{gg'}$ is a relative global complete intersection and $gg' \not \in \mathfrak q'$. Since $\mathfrak q'$ was arbitrary combining Lemmas \ref{lemma-syntomic} and \ref{lemma-local-syntomic} we see that $R \to S'$ is syntomic (this also uses that the spectrum of $S'$ is quasi-compact, see Lemma \ref{lemma-quasi-compact}). \end{proof} \noindent The following lemma will be improved later, see Smoothing Ring Maps, Proposition \ref{smoothing-proposition-lift-smooth}. \begin{lemma} \label{lemma-lift-syntomic} Let $R$ be a ring and let $I \subset R$ be an ideal. Let $R/I \to \overline{S}$ be a syntomic map. Then there exist elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{\overline{g}_i} \cong S_i/IS_i$ for some relative global complete intersection $S_i$ over $R$. \end{lemma} \begin{proof} By Lemma \ref{lemma-syntomic} we find a collection of elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{\overline{g}_i}$ is a relative global complete intersection over $R/I$. Hence we may assume that $\overline{S}$ is a relative global complete intersection. Write $\overline{S} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_c)$ as in Definition \ref{definition-relative-global-complete-intersection}. Choose $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ lifting $\overline{f}_1, \ldots, \overline{f}_c$. Set $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Note that $S/IS \cong \overline{S}$. By Lemma \ref{lemma-localize-relative-complete-intersection} we can find $g \in S$ mapping to $1$ in $\overline{S}$ such that $S_g$ is a relative global complete intersection over $R$. Since $\overline{S} \cong S_g/IS_g$ this finishes the proof. \end{proof} \section{Smooth ring maps} \label{section-smooth} % BEGIN ALGEBRA EDITORIAL ROUTE section-smooth \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-smooth}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-smooth \noindent Let us motivate the definition of a smooth ring map by an example. Suppose $R$ is a ring and $S = R[x, y]/(f)$ for some nonzero $f \in R[x, y]$. In this case there is an exact sequence $$ S \to S\text{d}x \oplus S\text{d}y \to \Omega_{S/R} \to 0 $$ where the first arrow maps $1$ to $\frac{\partial f}{\partial x} \text{d}x + \frac{\partial f}{\partial y} \text{d}y$, see Section \ref{section-netherlander}. We conclude that $\Omega_{S/R}$ is locally free of rank $1$ if the partial derivatives of $f$ generate the unit ideal in $S$. In this case $S$ is smooth of relative dimension $1$ over $R$. But it can happen that $\Omega_{S/R}$ is locally free of rank $2$ namely if both partial derivatives of $f$ are zero. For example if for a prime $p$ we have $p = 0$ in $R$ and $f = x^p + y^p$ then this happens. Here $R \to S$ is a relative global complete intersection of relative dimension $1$ which is not smooth. Hence, in order to check that a ring map is smooth it is not sufficient to check whether the module of differentials is free. The correct condition is the following. \begin{definition} \label{definition-smooth} A ring map $R \to S$ is {\it smooth} if it is of finite presentation and the naive cotangent complex $\NL_{S/R}$ is quasi-isomorphic to a finite projective $S$-module placed in degree $0$: this means that $H_1(\NL_{S/R}) = 0$ and that $\Omega_{S/R}$ is a finite projective $S$-module. \end{definition} \noindent Let $R \to S$ be a ring map. By Lemma \ref{lemma-NL-homotopy} for any presentation $\alpha : P \to S$ we have $H_1(\NL(\alpha)) = H_1(\NL_{S/R})$ and $H_0(\NL(\alpha)) = \Omega_{S/R}$. Thus, if $R \to S$ is smooth, then for any surjection $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I$ the map $$ I/I^2 \longrightarrow \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S $$ is an injective map whose cokernel is a finite projective $S$-module. Thus the displayed arrow is a split injection. In other words $\bigoplus_{i = 1}^n S \text{d}x_i \cong I/I^2 \oplus \Omega_{S/R}$ as $S$-modules and $I/I^2$ is a finite projective $S$-module as well. Conversely, if $R \to S$ is of finite presentation and we have a surjection $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I$ such that the displayed arrow is a split injection, then $R \to S$ is smooth. \begin{lemma} \label{lemma-localize-smooth} Let $R \to S$ be a smooth ring map. Any localization $S_g$ is smooth over $R$. If $f \in R$ maps to an invertible element of $S$, then $R_f \to S$ is smooth. \end{lemma} \begin{proof} By Lemma \ref{lemma-localize-NL} the naive cotangent complex for $S_g$ over $R$ is the base change of the naive cotangent complex of $S$ over $R$. The assumption is that the naive cotangent complex of $S/R$ is quasi-isomorphic to $\Omega_{S/R}$ and that this is a finite projective $S$-module. Hence so is its base change. Thus $S_g$ is smooth over $R$. \medskip\noindent The second assertion follows in the same way from Lemma \ref{lemma-NL-localize-bottom}. \end{proof} \begin{lemma} \label{lemma-base-change-smooth} \begin{slogan} Smoothness is preserved under base change \end{slogan} Let $R \to S$ be a smooth ring map. Let $R \to R'$ be any ring map. Then the base change $R' \to S' = R' \otimes_R S$ is smooth. \end{lemma} \begin{proof} Let $\alpha : R[x_1, \ldots, x_n] \to S$ be a presentation with kernel $I$. Let $\alpha' : R'[x_1, \ldots, x_n] \to R' \otimes_R S$ be the induced presentation. Let $I' = \Ker(\alpha')$. Since $0 \to I \to R[x_1, \ldots, x_n] \to S \to 0$ is exact, the sequence $R' \otimes_R I \to R'[x_1, \ldots, x_n] \to R' \otimes_R S \to 0$ is exact. Thus $R' \otimes_R I \to I'$ is surjective. By Definition \ref{definition-smooth} there is a short exact sequence $$ 0 \to I/I^2 \to \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \to \Omega_{S/R} \to 0 $$ and the $S$-module $\Omega_{S/R}$ is finite projective. In particular $I/I^2$ is a direct summand of $\Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S$. Consider the commutative diagram $$ \xymatrix{ R' \otimes_R (I/I^2) \ar[r] \ar[d] & R' \otimes_R (\Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S) \ar[d] \\ I'/(I')^2 \ar[r] & \Omega_{R'[x_1, \ldots, x_n]/R'} \otimes_{R'[x_1, \ldots, x_n]} (R' \otimes_R S) } $$ Since the right vertical map is an isomorphism we see that the left vertical map is injective and surjective by what was said above. Thus we conclude that $\NL(\alpha')$ is quasi-isomorphic to $\Omega_{S'/R'} \cong S' \otimes_S \Omega_{S/R}$ placed in degree $0$. This module is finite projective since it is the base change of a finite projective module. \end{proof} \begin{lemma} \label{lemma-smooth-over-field} Let $k$ be a field. Let $S$ be a smooth $k$-algebra. Then $S$ is a local complete intersection. \end{lemma} \begin{proof} By Lemmas \ref{lemma-base-change-smooth} and \ref{lemma-lci-field-change} it suffices to prove this when $k$ is algebraically closed. Choose a presentation $\alpha : k[x_1, \ldots, x_n] \to S$ with kernel $I$. Let $\mathfrak m$ be a maximal ideal of $S$, and let $\mathfrak m' \supset I$ be the corresponding maximal ideal of $k[x_1, \ldots, x_n]$. We will show that condition (5) of Lemma \ref{lemma-lci} holds (with $\mathfrak m$ instead of $\mathfrak q$). We may write $\mathfrak m' = (x_1 - a_1, \ldots, x_n - a_n)$ for some $a_i \in k$, because $k$ is algebraically closed, see Theorem \ref{theorem-nullstellensatz}. By our assumption that $k \to S$ is smooth the $S$-module map $\text{d} : I/I^2 \to \bigoplus_{i = 1}^n S \text{d}x_i$ is a split injection. Hence the corresponding map $I/\mathfrak m' I \to \bigoplus \kappa(\mathfrak m') \text{d}x_i$ is injective. Say $\dim_{\kappa(\mathfrak m')}(I/\mathfrak m' I) = c$ and pick $f_1, \ldots, f_c \in I$ which map to a $\kappa(\mathfrak m')$-basis of $I/\mathfrak m' I$. By Nakayama's Lemma \ref{lemma-NAK} we see that $f_1, \ldots, f_c$ generate $I_{\mathfrak m'}$ over $k[x_1, \ldots, x_n]_{\mathfrak m'}$. Consider the commutative diagram $$ \xymatrix{ I \ar[r] \ar[d] & I/I^2 \ar[rr] \ar[d] & & I/\mathfrak m'I \ar[d] \\ \Omega_{k[x_1, \ldots, x_n]/k} \ar[r] & \bigoplus S\text{d}x_i \ar[rr]^{\text{d}x_i \mapsto x_i - a_i} & & \mathfrak m'/(\mathfrak m')^2 } $$ (proof commutativity omitted). The middle vertical map is the one defining the naive cotangent complex of $\alpha$. Note that the right lower horizontal arrow induces an isomorphism $\bigoplus \kappa(\mathfrak m') \text{d}x_i \to \mathfrak m'/(\mathfrak m')^2$. Hence our generators $f_1, \ldots, f_c$ of $I_{\mathfrak m'}$ map to a collection of elements in $k[x_1, \ldots, x_n]_{\mathfrak m'}$ whose classes in $\mathfrak m'/(\mathfrak m')^2$ are linearly independent over $\kappa(\mathfrak m')$. Therefore they form a regular sequence in the ring $k[x_1, \ldots, x_n]_{\mathfrak m'}$ by Lemma \ref{lemma-regular-ring-CM}. This verifies condition (5) of Lemma \ref{lemma-lci}, hence $S_g$ is a global complete intersection over $k$ for some $g \in S$, $g \not \in \mathfrak m$. As this works for any maximal ideal of $S$ we conclude that $S$ is a local complete intersection over $k$. \end{proof} \begin{definition} \label{definition-standard-smooth} Let $R$ be a ring. Given integers $n \geq c \geq 0$ and $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$, we say $$ R[x_1, \ldots, x_n]/(f_1, \ldots, f_c) $$ is a {\it standard smooth algebra over $R$} if the polynomial $$ g = \det \left( \begin{matrix} \partial f_1/\partial x_1 & \partial f_2/\partial x_1 & \ldots & \partial f_c/\partial x_1 \\ \partial f_1/\partial x_2 & \partial f_2/\partial x_2 & \ldots & \partial f_c/\partial x_2 \\ \ldots & \ldots & \ldots & \ldots \\ \partial f_1/\partial x_c & \partial f_2/\partial x_c & \ldots & \partial f_c/\partial x_c \end{matrix} \right) $$ maps to an invertible element in $R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. We say an $R$-algebra $S$ is {\it standard smooth} or that the ring map $R \to S$ is {\it standard smooth} if there exist $n \geq c \geq 0$ and $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ such that $R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a standard smooth algebra over $R$ and $S$ is isomorphic to $R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ as an $R$-algebra. \end{definition} \begin{lemma} \label{lemma-standard-smooth} Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c) = R[x_1, \ldots, x_n]/I$ be a standard smooth algebra. Then \begin{enumerate} \item the ring map $R \to S$ is smooth, \item the $S$-module $\Omega_{S/R}$ is free on $\text{d}x_{c + 1}, \ldots, \text{d}x_n$, \item the $S$-module $I/I^2$ is free on the classes of $f_1, \ldots, f_c$, \item for any $g \in S$ the ring map $R \to S_g$ is standard smooth, \item for any ring map $R \to R'$ the base change $R' \to R'\otimes_R S$ is standard smooth, \item if $f \in R$ maps to an invertible element in $S$, then $R_f \to S$ is standard smooth, and \item the ring $S$ is a relative global complete intersection over $R$. \end{enumerate} \end{lemma} \begin{proof} Consider the naive cotangent complex of the given presentation $$ (f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2 \longrightarrow \bigoplus\nolimits_{i = 1}^n S \text{d}x_i. $$ Let us compose this map with the projection onto the first $c$ direct summands of the direct sum. According to the definition of a standard smooth algebra the classes $f_i \bmod (f_1, \ldots, f_c)^2$ map to a basis of $\bigoplus_{i = 1}^c S\text{d}x_i$. We conclude that $(f_1, \ldots, f_c)/(f_1, \ldots, f_c)^2$ is free of rank $c$ with a basis given by the elements $f_i \bmod (f_1, \ldots, f_c)^2$, and that the homology in degree $0$, i.e., $\Omega_{S/R}$, of the naive cotangent complex is a free $S$-module with basis the images of $\text{d}x_{c + j}$, $j = 1, \ldots, n - c$. In particular, this proves $R \to S$ is smooth. \medskip\noindent The proofs of (4) and (6) are omitted. But see the example below and the proof of Lemma \ref{lemma-base-change-relative-global-complete-intersection}. \medskip\noindent Let $\varphi : R \to R'$ be any ring map. Set $S' = R'[x_1, \ldots, x_n]/(f_1^\varphi, \ldots, f_c^\varphi)$ where $f^\varphi$ is the polynomial obtained from $f \in R[x_1, \ldots, x_n]$ by applying $\varphi$ to all the coefficients. Then $S' \cong R' \otimes_R S$. Moreover, the determinant of Definition \ref{definition-standard-smooth} for $S'/R'$ is equal to $g^\varphi$. Its image in $S'$ is therefore the image of $g$ via $R[x_1, \ldots, x_n] \to S \to S'$ and hence invertible. This proves (5). \medskip\noindent To prove (7) it suffices to show that every nonzero fibre $S \otimes_R \kappa(\mathfrak p)$ has dimension $n - c$ for every prime $\mathfrak p \subset R$. By (5) it suffices to prove that any standard smooth algebra $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ over a field $k$, if nonzero, has dimension $n - c$. We already know that $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a local complete intersection by Lemma \ref{lemma-smooth-over-field}. Hence, since $I/I^2$ is free of rank $c$ we see that $k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ has dimension $n - c$, by Lemma \ref{lemma-lci} for example. \end{proof} \begin{example} \label{example-make-standard-smooth} Let $R$ be a ring. Let $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$. Let $$ h = \det \left( \begin{matrix} \partial f_1/\partial x_1 & \partial f_2/\partial x_1 & \ldots & \partial f_c/\partial x_1 \\ \partial f_1/\partial x_2 & \partial f_2/\partial x_2 & \ldots & \partial f_c/\partial x_2 \\ \ldots & \ldots & \ldots & \ldots \\ \partial f_1/\partial x_c & \partial f_2/\partial x_c & \ldots & \partial f_c/\partial x_c \end{matrix} \right). $$ Set $S = R[x_1, \ldots, x_{n + 1}]/(f_1, \ldots, f_c, x_{n + 1}h - 1)$. This is an example of a standard smooth algebra, except that the presentation is wrong and the variables should be in the following order: $x_1, \ldots, x_c, x_{n + 1}, x_{c + 1}, \ldots, x_n$. \end{example} \begin{lemma} \label{lemma-compose-standard-smooth} A composition of standard smooth ring maps is standard smooth. \end{lemma} \begin{proof} Suppose that $R \to S$ and $S \to S'$ are standard smooth. We choose presentations $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ and $S' = S[y_1, \ldots, y_m]/(g_1, \ldots, g_d)$. Choose elements $g_j' \in R[x_1, \ldots, x_n, y_1, \ldots, y_m]$ mapping to the $g_j$. In this way we see $S' = R[x_1, \ldots, x_n, y_1, \ldots, y_m]/ (f_1, \ldots, f_c, g'_1, \ldots, g'_d)$. To show that $S'$ is standard smooth it suffices to verify that the determinant $$ \det \left( \begin{matrix} \partial f_1/\partial x_1 & \ldots & \partial f_c/\partial x_1 & \partial g'_1/\partial x_1 & \ldots & \partial g'_d/\partial x_1 \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \partial f_1/\partial x_c & \ldots & \partial f_c/\partial x_c & \partial g'_1/\partial x_c & \ldots & \partial g'_d/\partial x_c \\ 0 & \ldots & 0 & \partial g_1/\partial y_1 & \ldots & \partial g_d/\partial y_1 \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & \ldots & 0 & \partial g_1/\partial y_d & \ldots & \partial g_d/\partial y_d \end{matrix} \right) $$ is invertible in $S'$. This is clear since it is the product of the two determinants which were assumed to be invertible by hypothesis. \end{proof} \begin{lemma} \label{lemma-smooth-syntomic} Let $R \to S$ be a smooth ring map. There exists an open covering of $\Spec(S)$ by standard opens $D(g)$ such that each $S_g$ is standard smooth over $R$. In particular $R \to S$ is syntomic. \end{lemma} \begin{proof} Choose a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I = (f_1, \ldots, f_m)$. For every subset $E \subset \{1, \ldots, m\}$ consider the open subset $U_E$ where the classes $f_e, e\in E$ freely generate the finite projective $S$-module $I/I^2$, see Lemma \ref{lemma-cokernel-flat}. We may cover $\Spec(S)$ by standard opens $D(g)$ each completely contained in one of the opens $U_E$. For such a $g$ we look at the presentation $$ \beta : R[x_1, \ldots, x_n, x_{n + 1}] \longrightarrow S_g $$ mapping $x_{n + 1}$ to $1/g$. Setting $J = \Ker(\beta)$ we use Lemma \ref{lemma-principal-localization-NL} to see that $J/J^2 \cong (I/I^2)_g \oplus S_g$ is free. We may and do replace $S$ by $S_g$. Then using Lemma \ref{lemma-huber} we may assume we have a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I = (f_1, \ldots, f_c)$ such that $I/I^2$ is free on the classes of $f_1, \ldots, f_c$. \medskip\noindent Using the presentation $\alpha$ obtained at the end of the previous paragraph, we more or less repeat this argument with the basis elements $\text{d}x_1, \ldots, \text{d}x_n$ of $\Omega_{R[x_1, \ldots, x_n]/R}$. Namely, for any subset $E \subset \{1, \ldots, n\}$ of cardinality $c$ we may consider the open subset $U_E$ of $\Spec(S)$ where the differential of $\NL(\alpha)$ composed with the projection $$ S^{\oplus c} \cong I/I^2 \longrightarrow \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \longrightarrow \bigoplus\nolimits_{i \in E} S\text{d}x_i $$ is an isomorphism. Again we may find a covering of $\Spec(S)$ by (finitely many) standard opens $D(g)$ such that each $D(g)$ is completely contained in one of the opens $U_E$. By renumbering, we may assume $E = \{1, \ldots, c\}$. For a $g$ with $D(g) \subset U_E$ we look at the presentation $$ \beta : R[x_1, \ldots, x_n, x_{n + 1}] \to S_g $$ mapping $x_{n + 1}$ to $1/g$. Setting $J = \Ker(\beta)$ we conclude from Lemma \ref{lemma-principal-localization-NL} that $J = (f_1, \ldots, f_c, fx_{n + 1} - 1)$ where $\alpha(f) = g$ and that the composition $$ J/J^2 \longrightarrow \Omega_{R[x_1, \ldots, x_{n + 1}]/R} \otimes_{R[x_1, \ldots, x_{n + 1}]} S_g \longrightarrow \bigoplus\nolimits_{i = 1}^c S_g\text{d}x_i \oplus S_g \text{d}x_{n + 1} $$ is an isomorphism. Reordering the coordinates as $x_1, \ldots, x_c, x_{n + 1}, x_{c + 1}, \ldots, x_n$ we conclude that $S_g$ is standard smooth over $R$ as desired. \medskip\noindent This finishes the proof as standard smooth algebras are syntomic (Lemmas \ref{lemma-standard-smooth} and \ref{lemma-relative-global-complete-intersection}) and being syntomic over $R$ is local on $S$ (Lemma \ref{lemma-local-syntomic}). \end{proof} \begin{definition} \label{definition-smooth-at-prime} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$. We say $R \to S$ is {\it smooth at $\mathfrak q$} if there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is smooth. \end{definition} \noindent For ring maps of finite presentation we can characterize this as follows. \begin{lemma} \label{lemma-smooth-at-point} Let $R \to S$ be of finite presentation. Let $\mathfrak q$ be a prime of $S$. The following are equivalent \begin{enumerate} \item $R \to S$ is smooth at $\mathfrak q$, \item $H_1(L_{S/R})_\mathfrak q = 0$ and $\Omega_{S/R, \mathfrak q}$ is a finite free $S_\mathfrak q$-module, \item $H_1(L_{S/R})_\mathfrak q = 0$ and $\Omega_{S/R, \mathfrak q}$ is a projective $S_\mathfrak q$-module, and \item $H_1(L_{S/R})_\mathfrak q = 0$ and $\Omega_{S/R, \mathfrak q}$ is a flat $S_\mathfrak q$-module. \end{enumerate} \end{lemma} \begin{proof} We will use without further mention that formation of the naive cotangent complex commutes with localization, see Section \ref{section-netherlander}, especially Lemma \ref{lemma-localize-NL}. Note that $\Omega_{S/R}$ is a finitely presented $S$-module, see Lemma \ref{lemma-differentials-finitely-presented}. Hence (2), (3), and (4) are equivalent by Lemma \ref{lemma-finite-projective}. It is clear that (1) implies the equivalent conditions (2), (3), and (4). Assume (2) holds. Writing $S_\mathfrak q$ as the colimit of principal localizations we see from Lemma \ref{lemma-colimit-category-fp-modules} that we can find a $g \in S$, $g \not \in \mathfrak q$ such that $(\Omega_{S/R})_g$ is finite free. Choose a presentation $\alpha : R[x_1, \ldots, x_n] \to S$ with kernel $I$. We may work with $\NL(\alpha)$ instead of $\NL_{S/R}$, see Lemma \ref{lemma-NL-homotopy}. The surjection $$ \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S \to \Omega_{S/R} \to 0 $$ has a right inverse after inverting $g$ because $(\Omega_{S/R})_g$ is projective. Hence the image of $\text{d} : (I/I^2)_g \to \Omega_{R[x_1, \ldots, x_n]/R} \otimes_{R[x_1, \ldots, x_n]} S_g$ is a direct summand, so the surjection onto this image has a right inverse. We conclude that $H_1(L_{S/R})_g$ is a quotient of $(I/I^2)_g$. In particular $H_1(L_{S/R})_g$ is a finite $S_g$-module. Thus the vanishing of $H_1(L_{S/R})_{\mathfrak q}$ implies the vanishing of $H_1(L_{S/R})_{gg'}$ for some $g' \in S$, $g' \not \in \mathfrak q$. Then $R \to S_{gg'}$ is smooth by definition. \end{proof} \begin{lemma} \label{lemma-locally-smooth} \begin{slogan} A ring map is smooth if and only if it is smooth at all primes of the target \end{slogan} Let $R \to S$ be a ring map. Then $R \to S$ is smooth if and only if $R \to S$ is smooth at every prime $\mathfrak q$ of $S$. \end{lemma} \begin{proof} The direct implication is trivial. Suppose that $R \to S$ is smooth at every prime $\mathfrak q$ of $S$. Since $\Spec(S)$ is quasi-compact, see Lemma \ref{lemma-quasi-compact}, there exists a finite covering $\Spec(S) = \bigcup D(g_i)$ such that each $S_{g_i}$ is smooth. By Lemma \ref{lemma-cover-upstairs} this implies that $S$ is of finite presentation over $R$. According to Lemma \ref{lemma-localize-NL} we see that $\NL_{S/R} \otimes_S S_{g_i}$ is quasi-isomorphic to a finite projective $S_{g_i}$-module placed in degree $0$. By Lemma \ref{lemma-finite-projective} this implies that $\NL_{S/R}$ is quasi-isomorphic to a finite projective $S$-module placed in degree $0$. \end{proof} \begin{lemma} \label{lemma-compose-smooth} A composition of smooth ring maps is smooth. \end{lemma} \begin{proof} You can prove this in many different ways. One way is to use the snake lemma (Lemma \ref{lemma-snake}), the Jacobi-Zariski sequence (Lemma \ref{lemma-exact-sequence-NL}), combined with the characterization of projective modules as being direct summands of free modules (Lemma \ref{lemma-characterize-projective}). Another proof can be obtained by combining Lemmas \ref{lemma-smooth-syntomic}, \ref{lemma-compose-standard-smooth} and \ref{lemma-locally-smooth}. \end{proof} \begin{lemma} \label{lemma-product-smooth} Let $R$ be a ring. Let $S = S' \times S''$ be a product of $R$-algebras. Then $S$ is smooth over $R$ if and only if both $S'$ and $S''$ are smooth over $R$. \end{lemma} \begin{proof} Omitted. Hints: By Lemma \ref{lemma-locally-smooth} we can check smoothness one prime at a time. Since $\Spec(S)$ is the disjoint union of $\Spec(S')$ and $\Spec(S'')$ by Lemma \ref{lemma-spec-product} we find that smoothness of $R \to S$ at $\mathfrak q$ corresponds to either smoothness of $R \to S'$ at the corresponding prime or smoothness of $R \to S''$ at the corresponding prime. \end{proof} \begin{lemma} \label{lemma-relative-global-complete-intersection-smooth} Let $R$ be a ring. Let $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ be a relative global complete intersection. Let $\mathfrak q \subset S$ be a prime. Then $R \to S$ is smooth at $\mathfrak q$ if and only if there exists a subset $I \subset \{1, \ldots, n\}$ of cardinality $c$ such that the polynomial $$ g_I = \det (\partial f_j/\partial x_i)_{j = 1, \ldots, c, \ i \in I} $$ does not map to an element of $\mathfrak q$. \end{lemma} \begin{proof} By Lemma \ref{lemma-relative-global-complete-intersection-conormal} we see that the naive cotangent complex associated to the given presentation of $S$ is the complex $$ \bigoplus\nolimits_{j = 1}^c S \cdot f_j \longrightarrow \bigoplus\nolimits_{i = 1}^n S \cdot \text{d}x_i, \quad f_j \longmapsto \sum \frac{\partial f_j}{\partial x_i} \text{d}x_i. $$ The maximal minors of the matrix giving the map are exactly the polynomials $g_I$. \medskip\noindent Assume $g_I$ maps to $g \in S$, with $g \not \in \mathfrak q$. Then the algebra $S_g$ is smooth over $R$. Namely, its naive cotangent complex is quasi-isomorphic to the complex above localized at $g$, see Lemma \ref{lemma-localize-NL}. And by construction it is quasi-isomorphic to a free rank $n - c$ module in degree $0$. \medskip\noindent Conversely, suppose that all $g_I$ end up in $\mathfrak q$. In this case the complex above tensored with $\kappa(\mathfrak q)$ does not have maximal rank, and hence there is no localization by an element $g \in S$, $g \not \in \mathfrak q$ where this map becomes a split injection. By Lemma \ref{lemma-localize-NL} again there is no such localization which is smooth over $R$. \end{proof} \begin{lemma} \label{lemma-flat-fibre-smooth} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p$ of $R$. Assume \begin{enumerate} \item there exists a $g \in S$, $g \not\in \mathfrak q$ such that $R \to S_g$ is of finite presentation, \item the local ring homomorphism $R_{\mathfrak p} \to S_{\mathfrak q}$ is flat, \item the fibre $S \otimes_R \kappa(\mathfrak p)$ is smooth over $\kappa(\mathfrak p)$ at the prime corresponding to $\mathfrak q$. \end{enumerate} Then $R \to S$ is smooth at $\mathfrak q$. \end{lemma} \begin{proof} By Lemmas \ref{lemma-syntomic} and \ref{lemma-smooth-over-field} we see that there exists a $g \in S$, $g \not \in \mathfrak q$, such that $S_g$ is a relative global complete intersection. Replacing $S$ by $S_g$ we may assume $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ is a relative global complete intersection. For any subset $I \subset \{1, \ldots, n\}$ of cardinality $c$ consider the polynomial $g_I = \det (\partial f_j/\partial x_i)_{j = 1, \ldots, c, i \in I}$ of Lemma \ref{lemma-relative-global-complete-intersection-smooth}. Note that the image $\overline{g}_I$ of $g_I$ in the polynomial ring $\kappa(\mathfrak p)[x_1, \ldots, x_n]$ is the determinant of the partial derivatives of the images $\overline{f}_j$ of the $f_j$ in the ring $\kappa(\mathfrak p)[x_1, \ldots, x_n]$. Thus the lemma follows by applying Lemma \ref{lemma-relative-global-complete-intersection-smooth} both to $R \to S$ and to $\kappa(\mathfrak p) \to S \otimes_R \kappa(\mathfrak p)$. \end{proof} \noindent Note that the sets $U, V$ in the following lemma are open by definition. \begin{lemma} \label{lemma-flat-base-change-locus-smooth} Let $R \to S$ be a ring map of finite presentation. Let $R \to R'$ be a flat ring map. Let $S' = R' \otimes_R S$ be the base change. Let $U \subset \Spec(S)$ be the set of primes at which $R \to S$ is smooth. Let $V \subset \Spec(S')$ be the set of primes at which $R' \to S'$ is smooth. Then $V$ is the inverse image of $U$ under the map $f : \Spec(S') \to \Spec(S)$. \end{lemma} \begin{proof} By Lemma \ref{lemma-change-base-NL} we see that $\NL_{S/R} \otimes_S S'$ is homotopy equivalent to $\NL_{S'/R'}$. This already implies that $f^{-1}(U) \subset V$. \medskip\noindent Let $\mathfrak q' \subset S'$ be a prime lying over $\mathfrak q \subset S$. Assume $\mathfrak q' \in V$. We have to show that $\mathfrak q \in U$. Since $S \to S'$ is flat, we see that $S_{\mathfrak q} \to S'_{\mathfrak q'}$ is faithfully flat (Lemma \ref{lemma-local-flat-ff}). Thus the vanishing of $H_1(L_{S'/R'})_{\mathfrak q'}$ implies the vanishing of $H_1(L_{S/R})_{\mathfrak q}$. By Lemma \ref{lemma-finite-projective-descends} applied to the $S_{\mathfrak q}$-module $(\Omega_{S/R})_{\mathfrak q}$ and the map $S_{\mathfrak q} \to S'_{\mathfrak q'}$ we see that $(\Omega_{S/R})_{\mathfrak q}$ is projective. Hence $R \to S$ is smooth at $\mathfrak q$ by Lemma \ref{lemma-smooth-at-point}. \end{proof} \begin{lemma} \label{lemma-smooth-field-change-local} Let $K/k$ be a field extension. Let $S$ be a finite type algebra over $k$. Let $\mathfrak q_K$ be a prime of $S_K = K \otimes_k S$ and let $\mathfrak q$ be the corresponding prime of $S$. Then $S$ is smooth over $k$ at $\mathfrak q$ if and only if $S_K$ is smooth at $\mathfrak q_K$ over $K$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-flat-base-change-locus-smooth}. \end{proof} \begin{lemma} \label{lemma-lift-smooth} Let $R$ be a ring and let $I \subset R$ be an ideal. Let $R/I \to \overline{S}$ be a smooth ring map. Then there exist elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{\overline{g}_i} \cong S_i/IS_i$ for some (standard) smooth ring $S_i$ over $R$. \end{lemma} \begin{proof} By Lemma \ref{lemma-smooth-syntomic} we find a collection of elements $\overline{g}_i \in \overline{S}$ which generate the unit ideal of $\overline{S}$ such that each $\overline{S}_{\overline{g}_i}$ is standard smooth over $R/I$. Hence we may assume that $\overline{S}$ is standard smooth over $R/I$. Write $\overline{S} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_c)$ as in Definition \ref{definition-standard-smooth}. Choose $f_1, \ldots, f_c \in R[x_1, \ldots, x_n]$ lifting $\overline{f}_1, \ldots, \overline{f}_c$. Set $S = R[x_1, \ldots, x_n, x_{n + 1}]/(f_1, \ldots, f_c, x_{n + 1}\Delta - 1)$ where $\Delta = \det(\frac{\partial f_j}{\partial x_i})_{i, j = 1, \ldots, c}$ as in Example \ref{example-make-standard-smooth}. This proves the lemma. \end{proof} \section{Formally smooth maps} \label{section-formally-smooth} % BEGIN ALGEBRA EDITORIAL ROUTE section-formally-smooth \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-formally-smooth}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-formally-smooth \noindent In this section we define formally smooth ring maps. It will turn out that a ring map of finite presentation is formally smooth if and only if it is smooth, see Proposition \ref{proposition-smooth-formally-smooth}. \begin{definition} \label{definition-formally-smooth} Let $R \to S$ be a ring map. We say $S$ is {\it formally smooth over $R$} if for every commutative solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[r] \ar[u] & A \ar[u] } $$ where $I \subset A$ is an ideal of square zero, a dotted arrow exists which makes the diagram commute. \end{definition} \begin{lemma} \label{lemma-base-change-fs} Let $R \to S$ be a formally smooth ring map. Let $R \to R'$ be any ring map. Then the base change $S' = R' \otimes_R S$ is formally smooth over $R'$. \end{lemma} \begin{proof} Let a solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rrd] & R' \otimes_R S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[u] \ar[r] & R' \ar[r] \ar[u] & A \ar[u] } $$ as in Definition \ref{definition-formally-smooth} be given. By assumption the longer dotted arrow exists. By the universal property of tensor product we obtain the shorter dotted arrow. \end{proof} \begin{lemma} \label{lemma-compose-formally-smooth} A composition of formally smooth ring maps is formally smooth. \end{lemma} \begin{proof} Omitted. (Hint: This is completely formal, and follows from considering a suitable diagram.) \end{proof} \begin{lemma} \label{lemma-polynomial-ring-formally-smooth} A polynomial ring over $R$ is formally smooth over $R$. \end{lemma} \begin{proof} Suppose we have a diagram as in Definition \ref{definition-formally-smooth} with $S = R[x_j; j \in J]$. Then there exists a dotted arrow simply by choosing lifts $a_j \in A$ of the elements in $A/I$ to which the elements $x_j$ map under the top horizontal arrow. \end{proof} \begin{lemma} \label{lemma-characterize-formally-smooth} Let $R \to S$ be a ring map. Let $P \to S$ be a surjective $R$-algebra map from a polynomial ring $P$ onto $S$. Denote by $J \subset P$ the kernel. Then $R \to S$ is formally smooth if and only if there exists an $R$-algebra map $\sigma : S \to P/J^2$ which is a right inverse to the surjection $P/J^2 \to S$. \end{lemma} \begin{proof} Assume $R \to S$ is formally smooth. Consider the commutative diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & P/J \\ R \ar[r] \ar[u] & P/J^2\ar[u] } $$ By assumption the dotted arrow exists. This proves that $\sigma$ exists. \medskip\noindent Conversely, suppose we have a $\sigma$ as in the lemma. Let a solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[r] \ar[u] & A \ar[u] } $$ as in Definition \ref{definition-formally-smooth} be given. Because $P$ is formally smooth by Lemma \ref{lemma-polynomial-ring-formally-smooth}, there exists an $R$-algebra homomorphism $\psi : P \to A$ which lifts the map $P \to S \to A/I$. Clearly $\psi(J) \subset I$ and since $I^2 = 0$ we conclude that $\psi(J^2) = 0$. Hence $\psi$ factors as $\overline{\psi} : P/J^2 \to A$. The desired dotted arrow is the composition $\overline{\psi} \circ \sigma : S \to A$. \end{proof} \begin{remark} \label{remark-lemma-characterize-formally-smooth} Lemma \ref{lemma-characterize-formally-smooth} holds more generally whenever $P$ is formally smooth over $R$. \end{remark} \begin{lemma} \label{lemma-characterize-formally-smooth-again} Let $R \to S$ be a ring map. Let $P \to S$ be a surjective $R$-algebra map from a polynomial ring $P$ onto $S$. Denote by $J \subset P$ the kernel. Then $R \to S$ is formally smooth if and only if the sequence $$ 0 \to J/J^2 \to \Omega_{P/R} \otimes_P S \to \Omega_{S/R} \to 0 $$ of Lemma \ref{lemma-differential-seq} is a split exact sequence. \end{lemma} \begin{proof} Assume $S$ is formally smooth over $R$. By Lemma \ref{lemma-characterize-formally-smooth} this means there exists an $R$-algebra map $S \to P/J^2$ which is a right inverse to the canonical map $P/J^2 \to S$. By Lemma \ref{lemma-differential-mod-power-ideal} we have $\Omega_{P/R} \otimes_P S = \Omega_{(P/J^2)/R} \otimes_{P/J^2} S$. By Lemma \ref{lemma-differential-seq-split} the sequence is split. \medskip\noindent Assume the exact sequence of the lemma is split exact. Choose a splitting $\sigma : \Omega_{S/R} \to \Omega_{P/R} \otimes_P S$. For each $\lambda \in S$ choose $x_\lambda \in P$ which maps to $\lambda$. Next, for each $\lambda \in S$ choose $f_\lambda \in J$ such that $$ \text{d}f_\lambda = \text{d}x_\lambda - \sigma(\text{d}\lambda) $$ in the middle term of the exact sequence. We claim that $s : \lambda \mapsto x_\lambda - f_\lambda \mod J^2$ is an $R$-algebra homomorphism $s : S \to P/J^2$. To prove this we will repeatedly use that if $h \in J$ and $\text{d}h = 0$ in $\Omega_{P/R} \otimes_P S$, then $h \in J^2$. Let $\lambda, \mu \in S$. Then $\sigma(\text{d}\lambda + \text{d}\mu - \text{d}(\lambda + \mu)) = 0$. This implies $$ \text{d}(x_\lambda + x_\mu - x_{\lambda + \mu} - f_\lambda - f_\mu + f_{\lambda + \mu}) = 0 $$ which means that $x_\lambda + x_\mu - x_{\lambda + \mu} - f_\lambda - f_\mu + f_{\lambda + \mu} \in J^2$, which in turn means that $s(\lambda) + s(\mu) = s(\lambda + \mu)$. Similarly, we have $\sigma(\lambda \text{d}\mu + \mu \text{d}\lambda - \text{d}(\lambda\mu)) = 0$ which implies that $$ \mu(\text{d}x_\lambda - \text{d}f_\lambda) + \lambda(\text{d}x_\mu - \text{d}f_\mu) - \text{d}x_{\lambda\mu} + \text{d}f_{\lambda\mu} = 0 $$ in the middle term of the exact sequence. Moreover we have $$ \text{d}(x_\lambda x_\mu) = x_\lambda \text{d}x_\mu + x_\mu \text{d}x_\lambda = \lambda \text{d}x_\mu + \mu \text{d} x_\lambda $$ in the middle term again. Combined these equations mean that $x_\lambda x_\mu - x_{\lambda\mu} - x_\mu f_\lambda - x_\lambda f_\mu + f_{\lambda\mu} \in J^2$, hence $(x_\lambda - f_\lambda)(x_\mu - f_\mu) - (x_{\lambda\mu} - f_{\lambda\mu}) \in J^2$ as $f_\lambda f_\mu \in J^2$, which means that $s(\lambda)s(\mu) = s(\lambda\mu)$. If $\lambda \in R$, then $\text{d}\lambda = 0$ and we see that $\text{d}f_\lambda = \text{d}x_\lambda$, hence $\lambda - x_\lambda + f_\lambda \in J^2$ and hence $s(\lambda) = \lambda$ as desired. At this point we can apply Lemma \ref{lemma-characterize-formally-smooth} to conclude that $S/R$ is formally smooth. \end{proof} \begin{proposition} \label{proposition-characterize-formally-smooth} Let $R \to S$ be a ring map. Consider a formally smooth $R$-algebra $P$ and a surjection $P \to S$ with kernel $J$. The following are equivalent \begin{enumerate} \item $S$ is formally smooth over $R$, \item for some $P \to S$ as above there exists a section to $P/J^2 \to S$, \item for all $P \to S$ as above there exists a section to $P/J^2 \to S$, \item for some $P \to S$ as above the sequence $0 \to J/J^2 \to \Omega_{P/R} \otimes S \to \Omega_{S/R} \to 0$ is split exact, \item for all $P \to S$ as above the sequence $0 \to J/J^2 \to \Omega_{P/R} \otimes S \to \Omega_{S/R} \to 0$ is split exact, and \item the naive cotangent complex $\NL_{S/R}$ is quasi-isomorphic to a projective $S$-module placed in degree $0$: this means that $H_1(\NL_{S/R}) = 0$ and that $\Omega_{S/R}$ is a projective $S$-module. \end{enumerate} \end{proposition} \begin{proof} It is clear that (1) implies (3) implies (2), see first part of the proof of Lemma \ref{lemma-characterize-formally-smooth}. It is also true that (3) implies (5) implies (4) and that (2) implies (4), see first part of the proof of Lemma \ref{lemma-characterize-formally-smooth-again}. Finally, Lemma \ref{lemma-characterize-formally-smooth-again} applied to the canonical surjection $R[S] \to S$ (\ref{equation-canonical-presentation}) shows that (1) implies (6). \medskip\noindent Assume (4) and let's prove (6). Consider the sequence of Lemma \ref{lemma-exact-sequence-NL} associated to the ring maps $R \to P \to S$. By the implication (1) $\Rightarrow$ (6) proved above we see that $\NL_{P/R} \otimes_P S$ is quasi-isomorphic to $\Omega_{P/R} \otimes_P S$ placed in degree $0$. Hence $H_1(\NL_{P/R} \otimes_P S) = 0$. Since $P \to S$ is surjective we see that $\NL_{S/P}$ is homotopy equivalent to $J/J^2$ placed in degree $1$ (Lemma \ref{lemma-NL-surjection}). Thus we obtain the exact sequence $0 \to H_1(L_{S/R}) \to J/J^2 \to \Omega_{P/R} \otimes_P S \to \Omega_{S/R} \to 0$. By assumption we see that $H_1(L_{S/R}) = 0$ and that $\Omega_{S/R}$ is a projective $S$-module. Thus (6) follows. \medskip\noindent Finally, let's prove that (6) implies (1). The assumption means that the complex $J/J^2 \to \Omega_{P/R} \otimes S$ where $P = R[S]$ and $P \to S$ is the canonical surjection (\ref{equation-canonical-presentation}) is quasi-isomorphic to a projective $S$-module placed in degree $0$. Hence Lemma \ref{lemma-characterize-formally-smooth-again} shows that $S$ is formally smooth over $R$. \end{proof} \begin{lemma} \label{lemma-ses-formally-smooth} Let $A \to B \to C$ be ring maps. Assume $B \to C$ is formally smooth. Then the sequence $$ 0 \to \Omega_{B/A} \otimes_B C \to \Omega_{C/A} \to \Omega_{C/B} \to 0 $$ of Lemma \ref{lemma-exact-sequence-differentials} is a split short exact sequence. \end{lemma} \begin{proof} Follows from Proposition \ref{proposition-characterize-formally-smooth} and Lemma \ref{lemma-exact-sequence-NL}. \end{proof} \begin{lemma} \label{lemma-differential-seq-formally-smooth} Let $A \to B \to C$ be ring maps with $A \to C$ formally smooth and $B \to C$ surjective with kernel $J \subset B$. Then the exact sequence $$ 0 \to J/J^2 \to \Omega_{B/A} \otimes_B C \to \Omega_{C/A} \to 0 $$ of Lemma \ref{lemma-differential-seq} is split exact. \end{lemma} \begin{proof} Follows from Proposition \ref{proposition-characterize-formally-smooth}, Lemma \ref{lemma-exact-sequence-NL}, and Lemma \ref{lemma-differential-seq}. \end{proof} \begin{lemma} \label{lemma-application-NL-formally-smooth} Let $A \to B \to C$ be ring maps. Assume $A \to C$ is surjective (so also $B \to C$ is) and $A \to B$ formally smooth. Let $I = \Ker(A \to C)$ and $J = \Ker(B \to C)$. Then the sequence $$ 0 \to I/I^2 \to J/J^2 \to \Omega_{B/A} \otimes_B B/J \to 0 $$ of Lemma \ref{lemma-application-NL} is split exact. \end{lemma} \begin{proof} Since $A \to B$ is formally smooth there exists a ring map $\sigma : B \to A/I^2$, lifting $B \to C$, whose composition with $A \to B$ equals the quotient map $A \to A/I^2$. Then $\sigma$ induces a map $J/J^2 \to I/I^2$ which is a left inverse to the map $I/I^2 \to J/J^2$. \end{proof} \begin{lemma} \label{lemma-lift-formal-smoothness} Let $R \to S$ be a ring map. Let $I \subset R$ be an ideal. Assume \begin{enumerate} \item $I^2 = 0$, \item $R \to S$ is flat, and \item $R/I \to S/IS$ is formally smooth. \end{enumerate} Then $R \to S$ is formally smooth. \end{lemma} \begin{proof} Assume (1), (2) and (3). Let $P = R[\{x_t\}_{t \in T}] \to S$ be a surjection of $R$-algebras with kernel $J$. Thus $0 \to J \to P \to S \to 0$ is a short exact sequence of flat $R$-modules. This implies that $I \otimes_R S = IS$, $I \otimes_R P = IP$ and $I \otimes_R J = IJ$ as well as $J \cap IP = IJ$. We will use throughout the proof that $$ \Omega_{(S/IS)/(R/I)} = \Omega_{S/R} \otimes_S (S/IS) = \Omega_{S/R} \otimes_R R/I = \Omega_{S/R} / I\Omega_{S/R} $$ and similarly for $P$ (see Lemma \ref{lemma-differentials-base-change}). By Lemma \ref{lemma-characterize-formally-smooth-again} the sequence \begin{equation} \label{equation-split} 0 \to J/(IJ + J^2) \to \Omega_{P/R} \otimes_P S/IS \to \Omega_{S/R} \otimes_S S/IS \to 0 \end{equation} is split exact. Of course the middle term is $\bigoplus_{t \in T} S/IS \text{d}x_t$. Choose a splitting $\sigma : \Omega_{P/R} \otimes_P S/IS \to J/(IJ + J^2)$. For each $t \in T$ choose an element $f_t \in J$ which maps to $\sigma(\text{d}x_t)$ in $J/(IJ + J^2)$. This determines a unique $S$-module map $$ \tilde \sigma : \Omega_{P/R} \otimes_P S = \bigoplus S\text{d}x_t \longrightarrow J/J^2 $$ with the property that $\tilde\sigma(\text{d}x_t) = f_t$. As $\sigma$ is a left inverse to $\text{d}$ the difference $$ \Delta = \text{id}_{J/J^2} - \tilde \sigma \circ \text{d} $$ is a self map $J/J^2 \to J/J^2$ whose image is contained in $(IJ + J^2)/J^2$. In particular $\Delta((IJ + J^2)/J^2) = 0$ because $I^2 = 0$. This means that $\Delta$ factors as $$ J/J^2 \to J/(IJ + J^2) \xrightarrow{\overline{\Delta}} (IJ + J^2)/J^2 \to J/J^2 $$ where $\overline{\Delta}$ is a $S/IS$-module map. Using again that the sequence (\ref{equation-split}) is split, we can find a $S/IS$-module map $\overline{\delta} : \Omega_{P/R} \otimes_P S/IS \to (IJ + J^2)/J^2$ such that $\overline{\delta} \circ d$ is equal to $\overline{\Delta}$. In the same manner as above the map $\overline{\delta}$ determines an $S$-module map $\delta : \Omega_{P/R} \otimes_P S \to J/J^2$. After replacing $\tilde \sigma$ by $\tilde \sigma + \delta$ a simple computation shows that $\Delta = 0$. In other words $\tilde \sigma$ is a left inverse to $J/J^2 \to \Omega_{P/R} \otimes_P S$. By Lemma \ref{lemma-characterize-formally-smooth-again} we conclude that $R \to S$ is formally smooth. \end{proof} \begin{proposition} \label{proposition-smooth-formally-smooth} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is of finite presentation and formally smooth, \item $R \to S$ is smooth. \end{enumerate} \end{proposition} \begin{proof} Follows from Proposition \ref{proposition-characterize-formally-smooth} and Definition \ref{definition-smooth}. (Note that $\Omega_{S/R}$ is a finitely presented $S$-module if $R \to S$ is of finite presentation, see Lemma \ref{lemma-differentials-finitely-presented}.) \end{proof} \begin{lemma} \label{lemma-finite-presentation-fs-Noetherian} Let $R \to S$ be a smooth ring map. Then there exists a subring $R_0 \subset R$ of finite type over $\mathbf{Z}$ and a smooth ring map $R_0 \to S_0$ such that $S \cong R \otimes_{R_0} S_0$. \end{lemma} \begin{proof} We are going to use that smooth is equivalent to finite presentation and formally smooth, see Proposition \ref{proposition-smooth-formally-smooth}. Write $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$ and denote $I = (f_1, \ldots, f_m)$. Choose a right inverse $\sigma : S \to R[x_1, \ldots, x_n]/I^2$ to the projection to $S$ as in Lemma \ref{lemma-characterize-formally-smooth}. Choose $h_i \in R[x_1, \ldots, x_n]$ such that $\sigma(x_i \bmod I) = h_i \bmod I^2$. Since $x_i - h_i \in I$, there exist $b_{ij} \in R[x_1, \ldots, x_n]$ such that $$ x_i - h_i = \sum\nolimits_j b_{ij} f_j $$ The fact that $\sigma$ is an $R$-algebra homomorphism $R[x_1, \ldots, x_n]/I \to R[x_1, \ldots, x_n]/I^2$ is equivalent to the condition that $$ f_j(h_1, \ldots, h_n) = \sum\nolimits_{j_1 j_2} a_{j_1 j_2} f_{j_1} f_{j_2} $$ for certain $a_{kl} \in R[x_1, \ldots, x_n]$. Let $R_0 \subset R$ be the subring generated over $\mathbf{Z}$ by all the coefficients of the polynomials $f_j, h_i, a_{kl}, b_{ij}$. Set $S_0 = R_0[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$, with $I_0 = (f_1, \ldots, f_m)$. Since the second displayed equation holds in $R_0[x_1, \ldots, x_n]$ we can let $\sigma_0 : S_0 \to R_0[x_1, \ldots, x_n]/I_0^2$ be the $R_0$-algebra map defined by the rule $x_i \mapsto h_i \bmod I_0^2$. Since the first displayed equation holds in $R_0[x_1, \ldots, x_n]$ we see that $\sigma_0$ is a right inverse to the projection $R_0[x_1, \ldots, x_n] / I_0^2 \to R_0[x_1, \ldots, x_n] / I_0 = S_0$. Thus by Lemma \ref{lemma-characterize-formally-smooth} the ring $S_0$ is formally smooth over $R_0$. \end{proof} \begin{lemma} \label{lemma-smooth-descends-through-colimit} Let $A = \colim A_i$ be a filtered colimit of rings. Let $A \to B$ be a smooth ring map. There exists an $i$ and a smooth ring map $A_i \to B_i$ such that $B = B_i \otimes_{A_i} A$. \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-finite-presentation-fs-Noetherian} since $R_0 \to A$ will factor through $A_i$ for some $i$ by Lemma \ref{lemma-characterize-finite-presentation}. \end{proof} \begin{lemma} \label{lemma-descent-formally-smooth} Let $R \to S$ be a ring map. Let $R \to R'$ be a faithfully flat ring map. Set $S' = S \otimes_R R'$. Then $R \to S$ is formally smooth if and only if $R' \to S'$ is formally smooth. \end{lemma} \begin{proof} If $R \to S$ is formally smooth, then $R' \to S'$ is formally smooth by Lemma \ref{lemma-base-change-fs}. To prove the converse, assume $R' \to S'$ is formally smooth. Note that $N \otimes_R R' = N \otimes_S S'$ for any $S$-module $N$. In particular $S \to S'$ is faithfully flat also. Choose a polynomial ring $P = R[\{x_i\}_{i \in I}]$ and a surjection of $R$-algebras $P \to S$ with kernel $J$. Note that $P' = P \otimes_R R'$ is a polynomial algebra over $R'$. Since $R \to R'$ is flat the kernel $J'$ of the surjection $P' \to S'$ is $J \otimes_R R'$. Hence the split exact sequence (see Lemma \ref{lemma-characterize-formally-smooth-again}) $$ 0 \to J'/(J')^2 \to \Omega_{P'/R'} \otimes_{P'} S' \to \Omega_{S'/R'} \to 0 $$ is the base change via $S \to S'$ of the corresponding sequence $$ J/J^2 \to \Omega_{P/R} \otimes_P S \to \Omega_{S/R} \to 0 $$ see Lemma \ref{lemma-differential-seq}. As $S \to S'$ is faithfully flat we conclude two things: (1) this sequence (without ${}'$) is exact too, and (2) $\Omega_{S/R}$ is a projective $S$-module. Namely, $\Omega_{S'/R'}$ is projective as a direct summand of the free module $\Omega_{P'/R'} \otimes_{P'} S'$ and $\Omega_{S/R} \otimes_S {S'} = \Omega_{S'/R'}$ by what we said above. Thus (2) follows by descent of projectivity through faithfully flat ring maps, see Theorem \ref{theorem-ffdescent-projectivity}. Hence the sequence $0 \to J/J^2 \to \Omega_{P/R} \otimes_P S \to \Omega_{S/R} \to 0$ is exact also and we win by applying Lemma \ref{lemma-characterize-formally-smooth-again} once more. \end{proof} \noindent It turns out that smooth ring maps satisfy the following strong lifting property. \begin{lemma} \label{lemma-smooth-strong-lift} Let $R \to S$ be a smooth ring map. Given a commutative solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[r] \ar[u] & A \ar[u] } $$ where $I \subset A$ is a locally nilpotent ideal, a dotted arrow exists which makes the diagram commute. \end{lemma} \begin{proof} By Lemma \ref{lemma-finite-presentation-fs-Noetherian} we can extend the diagram to a commutative diagram $$ \xymatrix{ S_0 \ar[r] & S \ar[r] \ar@{-->}[rd] & A/I \\ R_0 \ar[r] \ar[u] & R \ar[r] \ar[u] & A \ar[u] } $$ with $R_0 \to S_0$ smooth, $R_0$ of finite type over $\mathbf{Z}$, and $S = S_0 \otimes_{R_0} R$. Let $x_1, \ldots, x_n \in S_0$ be generators of $S_0$ over $R_0$. Let $a_1, \ldots, a_n$ be elements of $A$ which map to the same elements in $A/I$ as the elements $x_1, \ldots, x_n$. Denote by $A_0 \subset A$ the subring generated by the image of $R_0$ and the elements $a_1, \ldots, a_n$. Set $I_0 = A_0 \cap I$. Then $A_0/I_0 \subset A/I$ and $S_0 \to A/I$ maps into $A_0/I_0$. Thus it suffices to find the dotted arrow in the diagram $$ \xymatrix{ S_0 \ar[r] \ar@{-->}[rd] & A_0/I_0 \\ R_0 \ar[r] \ar[u] & A_0 \ar[u] } $$ The ring $A_0$ is of finite type over $\mathbf{Z}$ by construction. Hence $A_0$ is Noetherian, whence $I_0$ is nilpotent, see Lemma \ref{lemma-Noetherian-power}. Say $I_0^n = 0$. By Proposition \ref{proposition-smooth-formally-smooth} we can successively lift the $R_0$-algebra map $S_0 \to A_0/I_0$ to $S_0 \to A_0/I_0^2$, $S_0 \to A_0/I_0^3$, $\ldots$, and finally $S_0 \to A_0/I_0^n = A_0$. \end{proof} \section{Smoothness and differentials} \label{section-smooth-differential} % BEGIN ALGEBRA EDITORIAL ROUTE section-smooth-differential \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-smooth-differential}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-smooth-differential \noindent Some results on differentials and smooth ring maps. \begin{lemma} \label{lemma-triangle-differentials-smooth} Given ring maps $A \to B \to C$ with $B \to C$ smooth, the sequence $$ 0 \to C \otimes_B \Omega_{B/A} \to \Omega_{C/A} \to \Omega_{C/B} \to 0 $$ of Lemma \ref{lemma-exact-sequence-differentials} is exact. \end{lemma} \begin{proof} This follows from the more general Lemma \ref{lemma-ses-formally-smooth} because a smooth ring map is formally smooth, see Proposition \ref{proposition-smooth-formally-smooth}. But it also follows directly from Lemma \ref{lemma-exact-sequence-NL} since $H_1(L_{C/B}) = 0$ is part of the definition of smoothness of $B \to C$. \end{proof} \begin{lemma} \label{lemma-differential-seq-smooth} Let $A \to B \to C$ be ring maps with $A \to C$ smooth and $B \to C$ surjective with kernel $J \subset B$. Then the exact sequence $$ 0 \to J/J^2 \to \Omega_{B/A} \otimes_B C \to \Omega_{C/A} \to 0 $$ of Lemma \ref{lemma-differential-seq} is split exact. \end{lemma} \begin{proof} This follows from the more general Lemma \ref{lemma-differential-seq-formally-smooth} because a smooth ring map is formally smooth, see Proposition \ref{proposition-smooth-formally-smooth}. \end{proof} \begin{lemma} \label{lemma-application-NL-smooth} Let $A \to B \to C$ be ring maps. Assume $A \to C$ is surjective (so also $B \to C$ is) and $A \to B$ smooth. Let $I = \Ker(A \to C)$ and $J = \Ker(B \to C)$. Then the sequence $$ 0 \to I/I^2 \to J/J^2 \to \Omega_{B/A} \otimes_B B/J \to 0 $$ of Lemma \ref{lemma-application-NL} is exact. \end{lemma} \begin{proof} This follows from the more general Lemma \ref{lemma-application-NL-formally-smooth} because a smooth ring map is formally smooth, see Proposition \ref{proposition-smooth-formally-smooth}. \end{proof} \begin{lemma} \label{lemma-section-smooth} \begin{slogan} If $R$ is a summand of $S$ and $S$ is smooth over $R$, then the $I$-adic completion of $S$ is often a power series ring over $R$ where $I$ is the kernel of the projection map from $S$ to $R$. \end{slogan} Let $\varphi : R \to S$ be a smooth ring map. Let $\sigma : S \to R$ be a left inverse to $\varphi$. Set $I = \Ker(\sigma)$. Then \begin{enumerate} \item $I/I^2$ is a finite locally free $R$-module, and \item if $I/I^2$ is free, then $S^\wedge \cong R[[t_1, \ldots, t_d]]$ as $R$-algebras, where $S^\wedge$ is the $I$-adic completion of $S$. \end{enumerate} \end{lemma} \begin{proof} By Lemma \ref{lemma-differential-seq-split} applied to $R \to S \to R$ we see that $I/I^2 = \Omega_{S/R} \otimes_{S, \sigma} R$. Since by definition of a smooth morphism the module $\Omega_{S/R}$ is finite locally free over $S$ we deduce that (1) holds. If $I/I^2$ is free, then choose $f_1, \ldots, f_d \in I$ whose images in $I/I^2$ form an $R$-basis. Consider the $R$-algebra map defined by $$ \Psi : R[[x_1, \ldots, x_d]] \longrightarrow S^\wedge, \quad x_i \longmapsto f_i. $$ Let $P = R[[x_1, \ldots, x_d]]$ and $J = (x_1, \ldots, x_d) \subset P$. We write $\Psi_n : P/J^n \to S/I^n$ for the induced map of quotient rings. Note that $S/I^2 = \varphi(R) \oplus I/I^2$. Thus $\Psi_2$ is an isomorphism. Denote by $\sigma_2 : S/I^2 \to P/J^2$ the inverse of $\Psi_2$. We will prove by induction on $n$ that for all $n > 2$ there exists an inverse $\sigma_n : S/I^n \to P/J^n$ of $\Psi_n$. Namely, as $S$ is formally smooth over $R$ (by Proposition \ref{proposition-smooth-formally-smooth}) we see that in the solid diagram $$ \xymatrix{ S \ar@{..>}[r] \ar[rd]_{\sigma_{n - 1}} & P/J^n \ar[d] \\ & P/J^{n - 1} } $$ of $R$-algebras we can fill in the dotted arrow by some $R$-algebra map $\tau : S \to P/J^n$ making the diagram commute. This induces an $R$-algebra map $\overline{\tau} : S/I^n \to P/J^n$ which is equal to $\sigma_{n - 1}$ modulo $J^{n - 1}$. By construction the map $\Psi_n$ is surjective and now $\overline{\tau} \circ \Psi_n$ is an $R$-algebra endomorphism of $P/J^n$ which maps $x_i$ to $x_i + \delta_{i, n}$ with $\delta_{i, n} \in J^{n - 1}/J^n$. It follows that $\Psi_n$ is an isomorphism and hence it has an inverse $\sigma_n$. This proves the lemma. \end{proof} \section{Smooth algebras over fields} \label{section-smooth-over-field} % BEGIN ALGEBRA EDITORIAL ROUTE section-smooth-over-field \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-smooth-over-field}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-smooth-over-field \noindent Warning: The following two lemmas do not hold over nonperfect fields in general. \begin{lemma} \label{lemma-rank-omega} Let $k$ be an algebraically closed field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak m \subset S$ be a maximal ideal. Then $$ \dim_{\kappa(\mathfrak m)} \Omega_{S/k} \otimes_S \kappa(\mathfrak m) = \dim_{\kappa(\mathfrak m)} \mathfrak m/\mathfrak m^2. $$ \end{lemma} \begin{proof} Consider the exact sequence $$ \mathfrak m/\mathfrak m^2 \to \Omega_{S/k} \otimes_S \kappa(\mathfrak m) \to \Omega_{\kappa(\mathfrak m)/k} \to 0 $$ of Lemma \ref{lemma-differential-seq}. We would like to show that the first map is an isomorphism. Since $k$ is algebraically closed the composition $k \to \kappa(\mathfrak m)$ is an isomorphism by Theorem \ref{theorem-nullstellensatz}. So the surjection $S \to \kappa(\mathfrak m)$ splits as a map of $k$-algebras, and Lemma \ref{lemma-differential-seq-split} shows that the sequence above is exact on the left. Since $\Omega_{\kappa(\mathfrak m)/k} = 0$, we win. \end{proof} \begin{lemma} \label{lemma-characterize-smooth-kbar} Let $k$ be an algebraically closed field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak m \subset S$ be a maximal ideal. The following are equivalent: \begin{enumerate} \item The ring $S_{\mathfrak m}$ is a regular local ring. \item We have $\dim_{\kappa(\mathfrak m)} \Omega_{S/k} \otimes_S \kappa(\mathfrak m) \leq \dim(S_{\mathfrak m})$. \item We have $\dim_{\kappa(\mathfrak m)} \Omega_{S/k} \otimes_S \kappa(\mathfrak m) = \dim(S_{\mathfrak m})$. \item There exists a $g \in S$, $g \not \in \mathfrak m$ such that $S_g$ is smooth over $k$. In other words $S/k$ is smooth at $\mathfrak m$. \end{enumerate} \end{lemma} \begin{proof} Note that (1), (2) and (3) are equivalent by Lemma \ref{lemma-rank-omega} and Definition \ref{definition-regular}. \medskip\noindent Assume that $S$ is smooth at $\mathfrak m$. By Lemma \ref{lemma-smooth-syntomic} we see that $S_g$ is standard smooth over $k$ for a suitable $g \in S$, $g \not \in \mathfrak m$. Hence by Lemma \ref{lemma-standard-smooth} we see that $\Omega_{S_g/k}$ is free of rank $\dim(S_g)$. Hence by Lemma \ref{lemma-rank-omega} we see that $\dim(S_{\mathfrak m}) = \dim (\mathfrak m/\mathfrak m^2)$ in other words $S_\mathfrak m$ is regular. \medskip\noindent Conversely, suppose that $S_{\mathfrak m}$ is regular. Let $d = \dim(S_{\mathfrak m}) = \dim \mathfrak m/\mathfrak m^2$. Choose a presentation $S = k[x_1, \ldots, x_n]/I$ such that $x_i$ maps to an element of $\mathfrak m$ for all $i$. In other words, $\mathfrak m'' = (x_1, \ldots, x_n)$ is the corresponding maximal ideal of $k[x_1, \ldots, x_n]$. Note that we have a short exact sequence $$ I/\mathfrak m''I \to \mathfrak m''/(\mathfrak m'')^2 \to \mathfrak m/(\mathfrak m)^2 \to 0 $$ Pick $c = n - d$ elements $f_1, \ldots, f_c \in I$ such that their images in $\mathfrak m''/(\mathfrak m'')^2$ span the kernel of the map to $\mathfrak m/\mathfrak m^2$. This is clearly possible. Let $J = (f_1, \ldots, f_c)$. So $J \subset I$. Let $S' = k[x_1, \ldots, x_n]/J$ so there is a surjection $S' \to S$. Let $\mathfrak m' = \mathfrak m''S'$ be the corresponding maximal ideal of $S'$. Hence we have $$ \xymatrix{ k[x_1, \ldots, x_n] \ar[r] & S' \ar[r] & S \\ \mathfrak m'' \ar[u] \ar[r] & \mathfrak m' \ar[r] \ar[u] & \mathfrak m \ar[u] } $$ By our choice of $J$ the exact sequence $$ J/\mathfrak m''J \to \mathfrak m''/(\mathfrak m'')^2 \to \mathfrak m'/(\mathfrak m')^2 \to 0 $$ shows that $\dim( \mathfrak m'/(\mathfrak m')^2 ) = d$. Since $S'_{\mathfrak m'}$ surjects onto $S_{\mathfrak m}$ we see that $\dim(S'_{\mathfrak m'}) \geq d$. Hence by the discussion preceding Definition \ref{definition-regular-local} we conclude that $S'_{\mathfrak m'}$ is regular of dimension $d$ as well. Because $S'$ was cut out by $c = n - d$ equations we conclude that there exists a $g' \in S'$, $g' \not \in \mathfrak m'$ such that $S'_{g'}$ is a global complete intersection over $k$, see Lemma \ref{lemma-lci}. Also the map $S'_{\mathfrak m'} \to S_{\mathfrak m}$ is a surjection of Noetherian local domains of the same dimension and hence an isomorphism. Hence $S' \to S$ is surjective with finitely generated kernel and becomes an isomorphism after localizing at $\mathfrak m'$. Thus we can find $g' \in S'$, $g' \not \in \mathfrak m'$ such that $S'_{g'} \to S_{g'}$ is an isomorphism. All in all we conclude that after replacing $S$ by a principal localization we may assume that $S$ is a global complete intersection. \medskip\noindent At this point we may write $S = k[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$ with $\dim S = n - c$. Recall that the naive cotangent complex of this algebra is given by $$ \bigoplus S \cdot f_j \to \bigoplus S \cdot \text{d}x_i $$ see Lemma \ref{lemma-relative-global-complete-intersection-conormal}. By Lemma \ref{lemma-relative-global-complete-intersection-smooth} in order to show that $S$ is smooth at $\mathfrak m$ we have to show that one of the $c \times c$ minors $g_I$ of the matrix ``$A$'' giving the map above does not vanish at $\mathfrak m$. By Lemma \ref{lemma-rank-omega} the matrix $A \bmod \mathfrak m$ has rank $c$. Thus we win. \end{proof} \begin{lemma} \label{lemma-characterize-smooth-over-field} Let $k$ be any field. Let $S$ be a finite type $k$-algebra. Let $X = \Spec(S)$. Let $\mathfrak q \subset S$ be a prime corresponding to $x \in X$. The following are equivalent: \begin{enumerate} \item The $k$-algebra $S$ is smooth at $\mathfrak q$ over $k$. \item We have $\dim_{\kappa(\mathfrak q)} \Omega_{S/k} \otimes_S \kappa(\mathfrak q) \leq \dim_x X$. \item We have $\dim_{\kappa(\mathfrak q)} \Omega_{S/k} \otimes_S \kappa(\mathfrak q) = \dim_x X$. \end{enumerate} Moreover, in this case the local ring $S_{\mathfrak q}$ is regular. \end{lemma} \begin{proof} If $S$ is smooth at $\mathfrak q$ over $k$, then there exists a $g \in S$, $g \not \in \mathfrak q$ such that $S_g$ is standard smooth over $k$, see Lemma \ref{lemma-smooth-syntomic}. A standard smooth algebra over $k$ has a module of differentials which is free of rank equal to the dimension, see Lemma \ref{lemma-standard-smooth} (use that a relative global complete intersection over a field has dimension equal to the number of variables minus the number of equations). Thus we see that (1) implies (3). To finish the proof of the lemma it suffices to show that (2) implies (1) and that it implies that $S_{\mathfrak q}$ is regular. \medskip\noindent Assume (2). By Nakayama's Lemma \ref{lemma-NAK} we see that $\Omega_{S/k, \mathfrak q}$ can be generated by $\leq \dim_x X$ elements. We may replace $S$ by $S_g$ for some $g \in S$, $g \not \in \mathfrak q$ such that $\Omega_{S/k}$ is generated by at most $\dim_x X$ elements. Let $K/k$ be an algebraically closed field extension such that there exists a $k$-algebra map $\psi : \kappa(\mathfrak q) \to K$. Consider $S_K = K \otimes_k S$. Let $\mathfrak m \subset S_K$ be the maximal ideal corresponding to the surjection $$ \xymatrix{ S_K = K \otimes_k S \ar[r] & K \otimes_k \kappa(\mathfrak q) \ar[r]^-{\text{id}_K \otimes \psi} & K. } $$ Note that $\mathfrak m \cap S = \mathfrak q$, in other words $\mathfrak m$ lies over $\mathfrak q$. By Lemma \ref{lemma-dimension-at-a-point-preserved-field-extension} the dimension of $X_K = \Spec(S_K)$ at the point corresponding to $\mathfrak m$ is $\dim_x X$. By Lemma \ref{lemma-dimension-closed-point-finite-type-field} this is equal to $\dim((S_K)_{\mathfrak m})$. By Lemma \ref{lemma-differentials-base-change} the module of differentials of $S_K$ over $K$ is the base change of $\Omega_{S/k}$, hence also generated by at most $\dim_x X = \dim((S_K)_{\mathfrak m})$ elements. By Lemma \ref{lemma-characterize-smooth-kbar} we see that $S_K$ is smooth at $\mathfrak m$ over $K$. By Lemma \ref{lemma-flat-base-change-locus-smooth} this implies that $S$ is smooth at $\mathfrak q$ over $k$. This proves (1). Moreover, we know by Lemma \ref{lemma-characterize-smooth-kbar} that the local ring $(S_K)_{\mathfrak m}$ is regular. Since $S_{\mathfrak q} \to (S_K)_{\mathfrak m}$ is flat we conclude from Lemma \ref{lemma-flat-under-regular} that $S_{\mathfrak q}$ is regular. \end{proof} \noindent The following lemma can be significantly generalized (in several different ways). \begin{lemma} \label{lemma-computation-differential} Let $k$ be a field. Let $R$ be a Noetherian local ring containing $k$. Assume that the residue field $\kappa = R/\mathfrak m$ is a finitely generated separable extension of $k$. Then the map $$ \text{d} : \mathfrak m/\mathfrak m^2 \longrightarrow \Omega_{R/k} \otimes_R \kappa(\mathfrak m) $$ is injective. \end{lemma} \begin{proof} We may replace $R$ by $R/\mathfrak m^2$. Hence we may assume that $\mathfrak m^2 = 0$. By assumption we may write $\kappa = k(\overline{x}_1, \ldots, \overline{x}_r, \overline{y})$ where $\overline{x}_1, \ldots, \overline{x}_r$ is a transcendence basis of $\kappa$ over $k$ and $\overline{y}$ is separable algebraic over $k(\overline{x}_1, \ldots, \overline{x}_r)$. Let $P(T)$ in $k(\overline{x}_1, \ldots, \overline{x}_r)[T]$ be the minimal polynomial of $\overline{y}$ over $k(\overline{x}_1, \ldots, \overline{x}_r)$. Then $P(\overline{y}) = 0$ but $P'(\overline{y}) \not = 0$. Choose any lifts $x_i \in R$ of the elements $\overline{x}_i \in \kappa$. This gives a commutative diagram $$ \xymatrix{ R \ar[r] & \kappa \\ & k(\overline{x}_1, \ldots, \overline{x}_r) \ar[lu]^\varphi \ar[u] } $$ of $k$-algebras. We want to extend the left upwards arrow $\varphi$ to a $k$-algebra map from $\kappa$ to $R$. To do this choose any $y \in R$ lifting $\overline{y}$. To see that it defines a $k$-algebra map defined on $\kappa \cong k(\overline{x}_1, \ldots, \overline{x}_r)[T]/(P)$ all we have to show is that we may choose $y$ such that $P^\varphi(y) = 0$. If not then we compute for $\delta \in \mathfrak m$ that $$ P^\varphi(y + \delta) = P^\varphi(y) + (P')^\varphi(y)\delta $$ because $\mathfrak m^2 = 0$. Since $(P')^\varphi(y)$ is a unit of $R$ we see that we can adjust our choice as desired. This shows that $R \cong \kappa \oplus \mathfrak m$ as $k$-algebras! Now either a direct computation of $\Omega_{\kappa \oplus \mathfrak m/k}$ or an application of Lemma \ref{lemma-differential-seq-split} finishes the proof. \end{proof} \begin{lemma} \label{lemma-separable-smooth} Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q \subset S$ be a prime. Assume $\kappa(\mathfrak q)$ is separable over $k$. The following are equivalent: \begin{enumerate} \item The algebra $S$ is smooth at $\mathfrak q$ over $k$. \item The ring $S_{\mathfrak q}$ is regular. \end{enumerate} \end{lemma} \begin{proof} Let $R = S_{\mathfrak q}$ and denote its maximal ideal by $\mathfrak m$ and its residue field by $\kappa$. By Lemmas \ref{lemma-computation-differential} and \ref{lemma-differential-seq} we see that there is a short exact sequence $$ 0 \to \mathfrak m/\mathfrak m^2 \to \Omega_{R/k} \otimes_R \kappa \to \Omega_{\kappa/k} \to 0 $$ Note that $\Omega_{R/k} = \Omega_{S/k, \mathfrak q}$, see Lemma \ref{lemma-differentials-localize}. Moreover, since $\kappa$ is separable over $k$ we have $\dim_{\kappa} \Omega_{\kappa/k} = \text{trdeg}_k(\kappa)$. Hence we get $$ \dim_{\kappa} \Omega_{R/k} \otimes_R \kappa = \dim_\kappa \mathfrak m/\mathfrak m^2 + \text{trdeg}_k (\kappa) \geq \dim R + \text{trdeg}_k (\kappa) = \dim_{\mathfrak q} S $$ (see Lemma \ref{lemma-dimension-at-a-point-finite-type-field} for the last equality) with equality if and only if $R$ is regular. Thus we win by applying Lemma \ref{lemma-characterize-smooth-over-field}. \end{proof} \begin{lemma} \label{lemma-characteristic-zero} Let $R \to S$ be a $\mathbf{Q}$-algebra map with $S \not= 0$. Let $f \in S$ be such that $S \to S\text{d}f$, $a \mapsto a\text{d}f$, is an isomorphism and $\Omega_{S/R} = S \text{d}f \oplus C$ for some $S$-submodule $C$. Then \begin{enumerate} \item $f$ is not nilpotent, and \item if $S$ is a Noetherian local ring, then $f$ is a nonzerodivisor in $S$. \end{enumerate} \end{lemma} \begin{proof} For $a \in S$ write $\text{d}(a) = \theta(a)\text{d}f + c(a)$ for some $\theta(a) \in S$ and $c(a) \in C$. Consider the $R$-derivation $S \to S$, $a \mapsto \theta(a)$. Note that $\theta(f) = 1$. \medskip\noindent If $f^n = 0$ with $n \geq 1$ minimal, then $0 = \theta(f^n) = n f^{n - 1}$ contradicting the minimality of $n$. We conclude that $f$ is not nilpotent. \medskip\noindent Suppose $fa = 0$. If $f$ is a unit then $a = 0$ and we win. Assume $f$ is not a unit. Then $0 = \theta(fa) = f\theta(a) + a$ by the Leibniz rule and hence $a \in (f)$. By induction suppose we have shown $fa = 0 \Rightarrow a \in (f^n)$. Then writing $a = f^nb$ we get $0 = \theta(f^{n + 1}b) = (n + 1)f^nb + f^{n + 1}\theta(b)$. Hence $a = f^n b = -f^{n + 1}\theta(b)/(n + 1) \in (f^{n + 1})$. Since in the Noetherian local ring $S$ we have $\bigcap (f^n) = 0$, see Lemma \ref{lemma-intersect-powers-ideal-module-zero} we win. \end{proof} \noindent The following is probably quite useless in applications. \begin{lemma} \label{lemma-characteristic-zero-local-smooth} Let $k$ be a field of characteristic $0$. Let $S$ be a finite type $k$-algebra. Let $\mathfrak q \subset S$ be a prime. The following are equivalent: \begin{enumerate} \item The algebra $S$ is smooth at $\mathfrak q$ over $k$. \item The $S_{\mathfrak q}$-module $\Omega_{S/k, \mathfrak q}$ is (finite) free. \item The ring $S_{\mathfrak q}$ is regular. \end{enumerate} \end{lemma} \begin{proof} In characteristic zero any field extension is separable and hence the equivalence of (1) and (3) follows from Lemma \ref{lemma-separable-smooth}. Also (1) implies (2) by definition of smooth algebras. Assume that $\Omega_{S/k, \mathfrak q}$ is free over $S_{\mathfrak q}$. We are going to use the notation and observations made in the proof of Lemma \ref{lemma-separable-smooth}. So $R = S_{\mathfrak q}$ with maximal ideal $\mathfrak m$ and residue field $\kappa$. Our goal is to prove $R$ is regular. \medskip\noindent If $\mathfrak m/\mathfrak m^2 = 0$, then $\mathfrak m = 0$ and $R \cong \kappa$. Hence $R$ is regular and we win. \medskip\noindent If $\mathfrak m/ \mathfrak m^2 \not = 0$, then choose any $f \in \mathfrak m$ whose image in $\mathfrak m/ \mathfrak m^2$ is not zero. By Lemma \ref{lemma-computation-differential} we see that $\text{d}f$ has nonzero image in $\Omega_{R/k}/\mathfrak m\Omega_{R/k}$. By assumption $\Omega_{R/k} = \Omega_{S/k, \mathfrak q}$ is finite free and hence by Nakayama's Lemma \ref{lemma-NAK} we see that $\text{d}f$ generates a direct summand. We apply Lemma \ref{lemma-characteristic-zero} to deduce that $f$ is a nonzerodivisor in $R$. Furthermore, by Lemma \ref{lemma-differential-seq} we get an exact sequence $$ (f)/(f^2) \to \Omega_{R/k} \otimes_R R/fR \to \Omega_{(R/fR)/k} \to 0 $$ This implies that $\Omega_{(R/fR)/k}$ is finite free as well. Hence by induction we see that $R/fR$ is a regular local ring. Since $f \in \mathfrak m$ was a nonzerodivisor we conclude that $R$ is regular, see Lemma \ref{lemma-regular-mod-x}. \end{proof} \begin{example} \label{example-characteristic-p} Lemma \ref{lemma-characteristic-zero-local-smooth} does not hold in characteristic $p > 0$. The standard examples are the ring maps $$ \mathbf{F}_p \longrightarrow \mathbf{F}_p[x]/(x^p) $$ whose module of differentials is free but is clearly not smooth, and the ring map ($p > 2$) $$ \mathbf{F}_p(t) \to \mathbf{F}_p(t)[x, y]/(x^p + y^2 + t) $$ which is not smooth at the prime $\mathfrak q = (y, x^p + t)$ but is regular. \end{example} \noindent Using the material above we can characterize smoothness at the generic point in terms of field extensions. \begin{lemma} \label{lemma-smooth-at-generic-point} Let $R \to S$ be an injective finite type ring map with $R$ and $S$ domains. Then $R \to S$ is smooth at $\mathfrak q = (0)$ if and only if the induced extension $L/K$ of fraction fields is separable. \end{lemma} \begin{proof} Assume $R \to S$ is smooth at $(0)$. We may replace $S$ by $S_g$ for some nonzero $g \in S$ and assume that $R \to S$ is smooth. Then $K \to S \otimes_R K$ is smooth (Lemma \ref{lemma-base-change-smooth}). Moreover, for any field extension $K'/K$ the ring map $K' \to S \otimes_R K'$ is smooth as well. Hence $S \otimes_R K'$ is a regular ring by Lemma \ref{lemma-characterize-smooth-over-field}, in particular reduced. It follows that $S \otimes_R K$ is geometrically reduced over $K$. Hence $L$ is geometrically reduced over $K$, see Lemma \ref{lemma-geometrically-reduced-permanence}. Hence $L/K$ is separable by Lemma \ref{lemma-characterize-separable-field-extensions}. \medskip\noindent Conversely, assume that $L/K$ is separable. We may assume $R \to S$ is of finite presentation, see Lemma \ref{lemma-generic-finite-presentation}. It suffices to prove that $K \to S \otimes_R K$ is smooth at $(0)$, see Lemma \ref{lemma-flat-base-change-locus-smooth}. This follows from Lemma \ref{lemma-separable-smooth}, the fact that a field is a regular ring, and the assumption that $L/K$ is separable. \end{proof} \section{Smooth ring maps in the Noetherian case} \label{section-smooth-Noetherian} % BEGIN ALGEBRA EDITORIAL ROUTE section-smooth-Noetherian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-smooth-Noetherian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-smooth-Noetherian \begin{definition} \label{definition-small-extension} Let $\varphi : B' \to B$ be a ring map. We say $\varphi$ is a {\it small extension} if $B'$ and $B$ are local Artinian rings, $\varphi$ is surjective and $I = \Ker(\varphi)$ has length $1$ as a $B'$-module. \end{definition} \noindent Clearly this means that $I^2 = 0$ and that $I = (x)$ for some $x \in B'$ such that $\mathfrak m' x = 0$ where $\mathfrak m' \subset B'$ is the maximal ideal. \begin{lemma} \label{lemma-smooth-test-artinian} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime ideal of $S$ lying over $\mathfrak p \subset R$. Assume $R$ is Noetherian and $R \to S$ is of finite type. The following are equivalent: \begin{enumerate} \item $R \to S$ is smooth at $\mathfrak q$, \item for every surjection of local $R$-algebras $(B', \mathfrak m') \to (B, \mathfrak m)$ with $\Ker(B' \to B)$ having square zero and every solid commutative diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & B \\ R \ar[r] \ar[u] & B' \ar[u] } $$ such that $\mathfrak q = S \cap \mathfrak m$ there exists a dotted arrow making the diagram commute, \item same as in (2) but with $B' \to B$ ranging over small extensions, and \item same as in (2) but with $B' \to B$ ranging over small extensions such that in addition $S \to B$ induces an isomorphism $\kappa(\mathfrak q) \cong \kappa(\mathfrak m)$. \end{enumerate} \end{lemma} \begin{proof} Assume (1). This means there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is smooth. By Proposition \ref{proposition-smooth-formally-smooth} we know that $R \to S_g$ is formally smooth. Note that given any diagram as in (2) the map $S \to B$ factors automatically through $S_{\mathfrak q}$ and a fortiori through $S_g$. The formal smoothness of $S_g$ over $R$ gives us a morphism $S_g \to B'$ fitting into a similar diagram with $S_g$ at the upper left corner. Composing with $S \to S_g$ gives the desired arrow. In other words, we have shown that (1) implies (2). \medskip\noindent Clearly (2) implies (3) and (3) implies (4). \medskip\noindent Assume (4). We are going to show that (1) holds, thereby finishing the proof of the lemma. Choose a presentation $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$. This is possible as $S$ is of finite type over $R$ and therefore of finite presentation (see Lemma \ref{lemma-Noetherian-finite-type-is-finite-presentation}). Set $I = (f_1, \ldots, f_m)$. Consider the naive cotangent complex $$ \text{d} : I/I^2 \longrightarrow \bigoplus\nolimits_{j = 1}^n S\text{d}x_j $$ of this presentation (see Section \ref{section-netherlander}). It suffices to show that when we localize this complex at $\mathfrak q$ then the map becomes a split injection, see Lemma \ref{lemma-smooth-at-point}. Let $S' = R[x_1, \ldots, x_n]/I^2$. By Lemma \ref{lemma-differential-mod-power-ideal} we have $$ S \otimes_{S'} \Omega_{S'/R} = S \otimes_{R[x_1, \ldots, x_n]} \Omega_{R[x_1, \ldots, x_n]/R} = \bigoplus\nolimits_{j = 1}^n S\text{d}x_j. $$ Thus the map $$ \text{d} : I/I^2 \longrightarrow S \otimes_{S'} \Omega_{S'/R} $$ is the same as the map in the naive cotangent complex above. In particular the truth of the assertion we are trying to prove depends only on the three rings $R \to S' \to S$. Let $\mathfrak q' \subset R[x_1, \ldots, x_n]$ be the prime ideal corresponding to $\mathfrak q$. Since localization commutes with taking modules of differentials (Lemma \ref{lemma-differentials-localize}) we see that it suffices to show that the map \begin{equation} \label{equation-target-map} \text{d} : I_{\mathfrak q'}/I_{\mathfrak q'}^2 \longrightarrow S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R} \end{equation} coming from $R \to S'_{\mathfrak q'} \to S_{\mathfrak q}$ is a split injection. \medskip\noindent Let $N \in \mathbf{N}$ be an integer. Consider the ring $$ B'_N = S'_{\mathfrak q'} / (\mathfrak q')^N S'_{\mathfrak q'} = (S'/(\mathfrak q')^N S')_{\mathfrak q'} $$ and its quotient $B_N = B'_N/IB'_N$. Note that $B_N \cong S_{\mathfrak q}/\mathfrak q^NS_{\mathfrak q}$. Observe that $B'_N$ is an Artinian local ring since it is the quotient of a local Noetherian ring by a power of its maximal ideal. Consider a filtration of the kernel $I_N$ of $B'_N \to B_N$ by $B'_N$-submodules $$ 0 \subset J_{N, 1} \subset J_{N, 2} \subset \ldots \subset J_{N, n(N)} = I_N $$ such that each successive quotient $J_{N, i}/J_{N, i - 1}$ has length $1$. (As $B'_N$ is Artinian such a filtration exists.) This gives a sequence of small extensions $$ B'_N \to B'_N/J_{N, 1} \to B'_N/J_{N, 2} \to \ldots \to B'_N/J_{N, n(N)} = B'_N/I_N = B_N = S_{\mathfrak q}/\mathfrak q^NS_{\mathfrak q} $$ Applying condition (4) successively to these small extensions starting with the map $S \to B_N$ we see there exists a commutative diagram $$ \xymatrix{ S \ar[r] \ar[rd] & B_N \\ R \ar[r] \ar[u] & B'_N \ar[u] } $$ Clearly the ring map $S \to B'_N$ factors as $S \to S_{\mathfrak q} \to B'_N$ where $S_{\mathfrak q} \to B'_N$ is a local homomorphism of local rings. Moreover, since the maximal ideal of $B'_N$ to the $N$th power is zero we conclude that $S_{\mathfrak q} \to B'_N$ factors through $S_{\mathfrak q}/(\mathfrak q)^NS_{\mathfrak q} = B_N$. In other words we have shown that for all $N \in \mathbf{N}$ the surjection of $R$-algebras $B'_N \to B_N$ has a splitting. \medskip\noindent Consider the presentation $$ I_N \to B_N \otimes_{B'_N} \Omega_{B'_N/R} \to \Omega_{B_N/R} \to 0 $$ coming from the surjection $B'_N \to B_N$ with kernel $I_N$ (see Lemma \ref{lemma-differential-seq}). By the above the $R$-algebra map $B'_N \to B_N$ has a right inverse. Hence by Lemma \ref{lemma-differential-seq-split} we see that the sequence above is split exact! Thus for every $N$ the map $$ I_N \longrightarrow B_N \otimes_{B'_N} \Omega_{B'_N/R} $$ is a split injection. The rest of the proof is gotten by unwinding what this means exactly. Note that $$ I_N = I_{\mathfrak q'}/ (I_{\mathfrak q'}^2 + (\mathfrak q')^N \cap I_{\mathfrak q'}) $$ By Artin-Rees (Lemma \ref{lemma-Artin-Rees}) we find a $c \geq 0$ such that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} I_N = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} I_{\mathfrak q'}/I_{\mathfrak q'}^2 $$ for all $N \geq c$ (these tensor products are just a fancy way of dividing by $\mathfrak q^{N - c}$). We may of course assume $c \geq 1$. By Lemma \ref{lemma-differential-mod-power-ideal} we see that $$ S'_{\mathfrak q'}/(\mathfrak q')^{N - c}S'_{\mathfrak q'} \otimes_{S'_{\mathfrak q'}} \Omega_{B'_N/R} = S'_{\mathfrak q'}/(\mathfrak q')^{N - c}S'_{\mathfrak q'} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R}. $$ We can further tensor this by $B_N = S_{\mathfrak q}/\mathfrak q^N$ to see that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{B'_N/R} = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S'_{\mathfrak q'}} \Omega_{S'_{\mathfrak q'}/R}. $$ Since a split injection remains a split injection after tensoring with anything we see that $$ S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}} (\ref{equation-target-map}) = S_{\mathfrak q}/\mathfrak q^{N - c}S_{\mathfrak q} \otimes_{S_{\mathfrak q}/\mathfrak q^N S_{\mathfrak q}} (I_N \longrightarrow B_N \otimes_{B'_N} \Omega_{B'_N/R}) $$ is a split injection for all $N \geq c$. By Lemma \ref{lemma-split-injection-after-completion} we see that (\ref{equation-target-map}) is a split injection. This finishes the proof. \end{proof} \section{Overview of results on smooth ring maps} \label{section-smooth-overview} % BEGIN ALGEBRA EDITORIAL ROUTE section-smooth-overview \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-smooth-overview}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-smooth-overview \noindent Here is a list of results on smooth ring maps that we proved in the preceding sections. For more precise statements and definitions please consult the references given. \begin{enumerate} \item A ring map $R \to S$ is smooth if it is of finite presentation and the naive cotangent complex of $S/R$ is quasi-isomorphic to a finite projective $S$-module in degree $0$, see Definition \ref{definition-smooth}. \item If $S$ is smooth over $R$, then $\Omega_{S/R}$ is a finite projective $S$-module, see discussion following Definition \ref{definition-smooth}. \item The property of being smooth is local on $S$, see Lemma \ref{lemma-locally-smooth}. \item The property of being smooth is stable under base change, see Lemma \ref{lemma-base-change-smooth}. \item The property of being smooth is stable under composition, see Lemma \ref{lemma-compose-smooth}. \item A smooth ring map is syntomic, in particular flat, see Lemma \ref{lemma-smooth-syntomic}. \item A finitely presented, flat ring map with smooth fibre rings is smooth, see Lemma \ref{lemma-flat-fibre-smooth}. \item A finitely presented ring map $R \to S$ is smooth if and only if it is formally smooth, see Proposition \ref{proposition-smooth-formally-smooth}. \item If $R \to S$ is a finite type ring map with $R$ Noetherian then to check that $R \to S$ is smooth it suffices to check the lifting property of formal smoothness along small extensions of Artinian local rings, see Lemma \ref{lemma-smooth-test-artinian}. \item A smooth ring map $R \to S$ is the base change of a smooth ring map $R_0 \to S_0$ with $R_0$ of finite type over $\mathbf{Z}$, see Lemma \ref{lemma-finite-presentation-fs-Noetherian}. \item Formation of the set of points where a finitely presented ring map is smooth commutes with flat base change, see Lemma \ref{lemma-flat-base-change-locus-smooth}. \item If $S$ is of finite type over an algebraically closed field $k$, and $\mathfrak m \subset S$ is a maximal ideal, then the following are equivalent \begin{enumerate} \item $S$ is smooth over $k$ in a neighbourhood of $\mathfrak m$, \item $S_{\mathfrak m}$ is a regular local ring, \item $\dim(S_{\mathfrak m}) = \dim_{\kappa(\mathfrak m)} \Omega_{S/k} \otimes_S \kappa(\mathfrak m)$. \end{enumerate} see Lemma \ref{lemma-characterize-smooth-kbar}. \item If $S$ is of finite type over a field $k$, and $\mathfrak q \subset S$ is a prime ideal, then the following are equivalent \begin{enumerate} \item $S$ is smooth over $k$ in a neighbourhood of $\mathfrak q$, \item $\dim_{\mathfrak q}(S/k) = \dim_{\kappa(\mathfrak q)} \Omega_{S/k} \otimes_S \kappa(\mathfrak q)$. \end{enumerate} see Lemma \ref{lemma-characterize-smooth-over-field}. \item If $S$ is smooth over a field, then all its local rings are regular, see Lemma \ref{lemma-characterize-smooth-over-field}. \item If $S$ is of finite type over a field $k$, $\mathfrak q \subset S$ is a prime ideal, the field extension $\kappa(\mathfrak q)/k$ is separable and $S_{\mathfrak q}$ is regular, then $S$ is smooth over $k$ at $\mathfrak q$, see Lemma \ref{lemma-separable-smooth}. \item If $S$ is of finite type over a field $k$, if $k$ has characteristic $0$, if $\mathfrak q \subset S$ is a prime ideal, and if $\Omega_{S/k, \mathfrak q}$ is free, then $S$ is smooth over $k$ at $\mathfrak q$, see Lemma \ref{lemma-characteristic-zero-local-smooth}. \end{enumerate} Some of these results were proved using the notion of a standard smooth ring map, see Definition \ref{definition-standard-smooth}. This is the analogue of what a relative global complete intersection map is for the case of syntomic morphisms. It is also the easiest way to make examples. \section{\'Etale ring maps} \label{section-etale} % BEGIN ALGEBRA EDITORIAL ROUTE section-etale \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-etale}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-etale \noindent An \'etale ring map is a smooth ring map whose relative dimension is equal to zero. This is the same as the following slightly more direct definition. \begin{definition} \label{definition-etale} Let $R \to S$ be a ring map. We say $R \to S$ is {\it \'etale} if it is of finite presentation and the naive cotangent complex $\NL_{S/R}$ is quasi-isomorphic to zero: this means that $H_1(\NL_{S/R}) = 0$ and $\Omega_{S/R} = 0$. Given a prime $\mathfrak q$ of $S$ we say that $R \to S$ is {\it \'etale at $\mathfrak q$} if there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is \'etale. \end{definition} \noindent In particular we see that $\Omega_{S/R} = 0$ if $S$ is \'etale over $R$. If $R \to S$ is smooth, then $R \to S$ is \'etale if and only if $\Omega_{S/R} = 0$. From our results on smooth ring maps we automatically get a whole host of results for \'etale maps. We summarize these in Lemma \ref{lemma-etale} below. But before we do so we prove that {\it any} \'etale ring map is standard smooth. \begin{lemma} \label{lemma-etale-standard-smooth} Any \'etale ring map is standard smooth. More precisely, if $R \to S$ is \'etale, then there exists a presentation $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_n)$ such that the image of $\det(\partial f_j/\partial x_i)$ is invertible in $S$. \end{lemma} \begin{proof} Let $R \to S$ be \'etale. Choose a presentation $S = R[x_1, \ldots, x_n]/I$. As $R \to S$ is \'etale we know that $$ \text{d} : I/I^2 \longrightarrow \bigoplus\nolimits_{i = 1, \ldots, n} S\text{d}x_i $$ is an isomorphism, in particular $I/I^2$ is a free $S$-module. Thus by Lemma \ref{lemma-huber} we may assume (after possibly changing the presentation), that $I = (f_1, \ldots, f_c)$ such that the classes $f_i \bmod I^2$ form a basis of $I/I^2$. It follows immediately from the fact that the displayed map above is an isomorphism that $c = n$ and that $\det(\partial f_j/\partial x_i)$ is invertible in $S$. \end{proof} \begin{lemma} \label{lemma-etale} Results on \'etale ring maps. \begin{enumerate} \item The ring map $R \to R_f$ is \'etale for any ring $R$ and any $f \in R$. \item Compositions of \'etale ring maps are \'etale. \item A base change of an \'etale ring map is \'etale. \item The property of being \'etale is local: Given a ring map $R \to S$ and elements $g_1, \ldots, g_m \in S$ which generate the unit ideal such that $R \to S_{g_j}$ is \'etale for $j = 1, \ldots, m$ then $R \to S$ is \'etale. \item Given $R \to S$ of finite presentation, and a flat ring map $R \to R'$, set $S' = R' \otimes_R S$. The set of primes where $R' \to S'$ is \'etale is the inverse image via $\Spec(S') \to \Spec(S)$ of the set of primes where $R \to S$ is \'etale. \item An \'etale ring map is syntomic, in particular flat. \item If $S$ is finite type over a field $k$, then $S$ is \'etale over $k$ if and only if $\Omega_{S/k} = 0$. \item Any \'etale ring map $R \to S$ is the base change of an \'etale ring map $R_0 \to S_0$ with $R_0$ of finite type over $\mathbf{Z}$. \item Let $A = \colim A_i$ be a filtered colimit of rings. Let $A \to B$ be an \'etale ring map. Then there exists an \'etale ring map $A_i \to B_i$ for some $i$ such that $B \cong A \otimes_{A_i} B_i$. \item Let $A$ be a ring. Let $S$ be a multiplicative subset of $A$. Let $S^{-1}A \to B'$ be \'etale. Then there exists an \'etale ring map $A \to B$ such that $B' \cong S^{-1}B$. \item Let $A$ be a ring. Let $B = B' \times B''$ be a product of $A$-algebras. Then $B$ is \'etale over $A$ if and only if both $B'$ and $B''$ are \'etale over $A$. \end{enumerate} \end{lemma} \begin{proof} In each case we use the corresponding result for smooth ring maps with a small argument added to show that $\Omega_{S/R}$ is zero. \medskip\noindent Proof of (1). The ring map $R \to R_f$ is smooth and $\Omega_{R_f/R} = 0$. \medskip\noindent Proof of (2). The composition $A \to C$ of smooth maps $A \to B$ and $B \to C$ is smooth, see Lemma \ref{lemma-compose-smooth}. By Lemma \ref{lemma-exact-sequence-differentials} we see that $\Omega_{C/A}$ is zero as both $\Omega_{C/B}$ and $\Omega_{B/A}$ are zero. \medskip\noindent Proof of (3). Let $R \to S$ be \'etale and $R \to R'$ be arbitrary. Then $R' \to S' = R' \otimes_R S$ is smooth, see Lemma \ref{lemma-base-change-smooth}. Since $\Omega_{S'/R'} = S' \otimes_S \Omega_{S/R}$ by Lemma \ref{lemma-differentials-base-change} we conclude that $\Omega_{S'/R'} = 0$. Hence $R' \to S'$ is \'etale. \medskip\noindent Proof of (4). Assume the hypotheses of (4). By Lemma \ref{lemma-locally-smooth} we see that $R \to S$ is smooth. We are also given that $\Omega_{S_{g_i}/R} = (\Omega_{S/R})_{g_i} = 0$ for all $i$. Then $\Omega_{S/R} = 0$, see Lemma \ref{lemma-cover}. \medskip\noindent Proof of (5). The result for smooth maps is Lemma \ref{lemma-flat-base-change-locus-smooth}. In the proof of that lemma we used that $\NL_{S/R} \otimes_S S'$ is homotopy equivalent to $\NL_{S'/R'}$. This reduces us to showing that if $M$ is a finitely presented $S$-module the set of primes $\mathfrak q'$ of $S'$ such that $(M \otimes_S S')_{\mathfrak q'} = 0$ is the inverse image of the set of primes $\mathfrak q$ of $S$ such that $M_{\mathfrak q} = 0$. This follows from Lemma \ref{lemma-support-base-change}. \medskip\noindent Proof of (6). Follows directly from the corresponding result for smooth ring maps (Lemma \ref{lemma-smooth-syntomic}). \medskip\noindent Proof of (7). Follows from Lemma \ref{lemma-characterize-smooth-over-field} and the definitions. \medskip\noindent Proof of (8). Lemma \ref{lemma-finite-presentation-fs-Noetherian} gives the result for smooth ring maps. The resulting smooth ring map $R_0 \to S_0$ satisfies the hypotheses of Lemma \ref{lemma-relative-dimension-CM}, and hence we may replace $S_0$ by the factor of relative dimension $0$ over $R_0$. \medskip\noindent Proof of (9). Follows from (8) since $R_0 \to A$ will factor through $A_i$ for some $i$ by Lemma \ref{lemma-characterize-finite-presentation}. \medskip\noindent Proof of (10). Follows from (9), (1), and (2) since $S^{-1}A$ is a filtered colimit of principal localizations of $A$. \medskip\noindent Proof of (11). Use Lemma \ref{lemma-product-smooth} to see the result for smoothness and then use that $\Omega_{B/A}$ is zero if and only if both $\Omega_{B'/A}$ and $\Omega_{B''/A}$ are zero. \end{proof} \noindent Next we work out in more detail what it means to be \'etale over a field. \begin{lemma} \label{lemma-etale-over-field} Let $k$ be a field. A ring map $k \to S$ is \'etale if and only if $S$ is isomorphic as a $k$-algebra to a finite product of finite separable extensions of $k$. \end{lemma} \begin{proof} We are going to use without further mention: if $S = S_1 \times \ldots \times S_n$ is a finite product of $k$-algebras, then $S$ is \'etale over $k$ if and only if each $S_i$ is \'etale over $k$. See Lemma \ref{lemma-etale} part (11). \medskip\noindent If $k'/k$ is a finite separable field extension then we can write $k' = k(\alpha) \cong k[x]/(f)$. Here $f$ is the minimal polynomial of the element $\alpha$. Since $k'$ is separable over $k$ we have $\gcd(f, f') = 1$. This implies that $\text{d} : k'\cdot f \to k' \cdot \text{d}x$ is an isomorphism. Hence $k \to k'$ is \'etale. Thus if $S$ is a finite product of finite separable extensions of $k$, then $S$ is \'etale over $k$. \medskip\noindent Conversely, suppose that $k \to S$ is \'etale. Then $S$ is smooth over $k$ and $\Omega_{S/k} = 0$. By Lemma \ref{lemma-characterize-smooth-over-field} we see that $\dim_\mathfrak m \Spec(S) = 0$ for every maximal ideal $\mathfrak m$ of $S$. Thus $\dim(S) = 0$. By Proposition \ref{proposition-dimension-zero-ring} we find that $S$ is a finite product of Artinian local rings. By the already used Lemma \ref{lemma-characterize-smooth-over-field} these local rings are fields. Hence we may assume $S = k'$ is a field. By the Hilbert Nullstellensatz (Theorem \ref{theorem-nullstellensatz}) we see that the extension $k'/k$ is finite. The smoothness of $k \to k'$ implies by Lemma \ref{lemma-smooth-at-generic-point} that $k'/k$ is a separable extension and the proof is complete. \end{proof} \begin{lemma} \label{lemma-etale-at-prime} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p$ in $R$. If $S/R$ is \'etale at $\mathfrak q$ then \begin{enumerate} \item $\mathfrak p S_{\mathfrak q} = \mathfrak qS_{\mathfrak q}$ is the maximal ideal of the local ring $S_{\mathfrak q}$, and \item the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite separable. \end{enumerate} \end{lemma} \begin{proof} First we may replace $S$ by $S_g$ for some $g \in S$, $g \not \in \mathfrak q$ and assume that $R \to S$ is \'etale. Then the lemma follows from Lemma \ref{lemma-etale-over-field} by unwinding the fact that $S \otimes_R \kappa(\mathfrak p)$ is \'etale over $\kappa(\mathfrak p)$. \end{proof} \begin{lemma} \label{lemma-etale-quasi-finite} An \'etale ring map is quasi-finite. \end{lemma} \begin{proof} Let $R \to S$ be an \'etale ring map. By definition $R \to S$ is of finite type. For any prime $\mathfrak p \subset R$ the fibre ring $S \otimes_R \kappa(\mathfrak p)$ is \'etale over $\kappa(\mathfrak p)$ and hence a finite product of fields finite separable over $\kappa(\mathfrak p)$, in particular finite over $\kappa(\mathfrak p)$. Thus $R \to S$ is quasi-finite by Lemma \ref{lemma-quasi-finite}. \end{proof} \begin{lemma} \label{lemma-characterize-etale} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over a prime $\mathfrak p$ of $R$. If \begin{enumerate} \item $R \to S$ is of finite presentation, \item $R_{\mathfrak p} \to S_{\mathfrak q}$ is flat \item $\mathfrak p S_{\mathfrak q}$ is the maximal ideal of the local ring $S_{\mathfrak q}$, and \item the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite separable, \end{enumerate} then $R \to S$ is \'etale at $\mathfrak q$. \end{lemma} \begin{proof} Apply Lemma \ref{lemma-isolated-point-fibre} to find a $g \in S$, $g \not \in \mathfrak q$ such that $\mathfrak q$ is the only prime of $S_g$ lying over $\mathfrak p$. We may and do replace $S$ by $S_g$. Then $S \otimes_R \kappa(\mathfrak p)$ has a unique prime, hence is a local ring, hence is equal to $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} \cong \kappa(\mathfrak q)$. By Lemma \ref{lemma-flat-fibre-smooth} there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is smooth. Replacing $S$ by $S_g$ again, we may assume that $R \to S$ is smooth. By Lemma \ref{lemma-smooth-syntomic} we may even assume that $R \to S$ is standard smooth, say $S = R[x_1, \ldots, x_n]/(f_1, \ldots, f_c)$. Since $S \otimes_R \kappa(\mathfrak p) = \kappa(\mathfrak q)$ has dimension $0$ we conclude that $n = c$, i.e., $R \to S$ is \'etale. \end{proof} \noindent Here is a completely new phenomenon. \begin{lemma} \label{lemma-map-between-etale} Let $R \to S$ and $R \to S'$ be \'etale. Then any $R$-algebra map $S' \to S$ is \'etale. \end{lemma} \begin{proof} First of all we note that $S' \to S$ is of finite presentation by Lemma \ref{lemma-compose-finite-type}. Let $\mathfrak q \subset S$ be a prime ideal lying over the primes $\mathfrak q' \subset S'$ and $\mathfrak p \subset R$. By Lemma \ref{lemma-etale-at-prime} the ring map $S'_{\mathfrak q'}/\mathfrak p S'_{\mathfrak q'} \to S_{\mathfrak q}/\mathfrak p S_{\mathfrak q}$ is a map of finite separable extensions of $\kappa(\mathfrak p)$. In particular it is flat. Hence by Lemma \ref{lemma-criterion-flatness-fibre} we see that $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is flat. Thus $S' \to S$ is flat. Moreover, the above also shows that $\mathfrak q'S_{\mathfrak q}$ is the maximal ideal of $S_{\mathfrak q}$ and that the residue field extension of $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is finite separable. Hence from Lemma \ref{lemma-characterize-etale} we conclude that $S' \to S$ is \'etale at $\mathfrak q$. Since being \'etale is local (see Lemma \ref{lemma-etale}) we win. \end{proof} \begin{lemma} \label{lemma-surjective-flat-finitely-presented} Let $\varphi : R \to S$ be a ring map. If $R \to S$ is surjective, flat and finitely presented then there exists an idempotent $e \in R$ such that $S = R_e$. \end{lemma} \begin{proof}[First proof] Let $I$ be the kernel of $\varphi$. We have that $I$ is finitely generated by Lemma \ref{lemma-finite-presentation-independent} since $\varphi$ is of finite presentation. Moreover, since $S$ is flat over $R$, tensoring the exact sequence $0 \to I \to R \to S \to 0$ over $R$ with $S$ gives $I/I^2 = 0$. Now we conclude by Lemma \ref{lemma-ideal-is-squared-union-connected}. \end{proof} \begin{proof}[Second proof] Since $\Spec(S) \to \Spec(R)$ is a homeomorphism onto a closed subset (see Lemma \ref{lemma-spec-closed}) and is open (see Proposition \ref{proposition-fppf-open}) we see that the image is $D(e)$ for some idempotent $e \in R$ (see Lemma \ref{lemma-disjoint-decomposition}). Thus $R_e \to S$ induces a bijection on spectra. Now this map induces an isomorphism on all local rings for example by Lemmas \ref{lemma-finite-flat-local} and \ref{lemma-NAK}. Then it follows that $R_e \to S$ is also injective, for example see Lemma \ref{lemma-characterize-zero-local}. \end{proof} \begin{lemma} \label{lemma-lift-etale} \begin{slogan} \'Etale ring maps lift along surjections of rings \end{slogan} Let $R$ be a ring and let $I \subset R$ be an ideal. Let $R/I \to \overline{S}$ be an \'etale ring map. Then there exists an \'etale ring map $R \to S$ such that $\overline{S} \cong S/IS$ as $R/I$-algebras. \end{lemma} \begin{proof} By Lemma \ref{lemma-etale-standard-smooth} we can write $\overline{S} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_n)$ as in Definition \ref{definition-standard-smooth} with $\overline{\Delta} = \det(\frac{\partial \overline{f}_i}{\partial x_j})_{i, j = 1, \ldots, n}$ invertible in $\overline{S}$. Just take some lifts $f_i$ and set $S = R[x_1, \ldots, x_n, x_{n+1}]/(f_1, \ldots, f_n, x_{n + 1}\Delta - 1)$ where $\Delta = \det(\frac{\partial f_i}{\partial x_j})_{i, j = 1, \ldots, n}$ as in Example \ref{example-make-standard-smooth}. This proves the lemma. \end{proof} \begin{lemma} \label{lemma-lift-etale-infinitesimal} Consider a commutative diagram $$ \xymatrix{ 0 \ar[r] & J \ar[r] & B' \ar[r] & B \ar[r] & 0 \\ 0 \ar[r] & I \ar[r] \ar[u] & A' \ar[r] \ar[u] & A \ar[r] \ar[u] & 0 } $$ with exact rows where $B' \to B$ and $A' \to A$ are surjective ring maps whose kernels are ideals of square zero. If $A \to B$ is \'etale, and $J = I \otimes_A B$, then $A' \to B'$ is \'etale. \end{lemma} \begin{proof} By Lemma \ref{lemma-lift-etale} there exists an \'etale ring map $A' \to C$ such that $C/IC = B$. Then $A' \to C$ is formally smooth (by Proposition \ref{proposition-smooth-formally-smooth}) hence we get an $A'$-algebra map $\varphi : C \to B'$. Since $A' \to C$ is flat we have $I \otimes_A B = I \otimes_A C/IC = IC$. Hence the assumption that $J = I \otimes_A B$ implies that $\varphi$ induces an isomorphism $IC \to J$ and an isomorphism $C/IC \to B'/IB'$, whence $\varphi$ is an isomorphism. \end{proof} \begin{example} \label{example-factor-polynomials-etale} Let $n , m \geq 1$ be integers. Consider the ring map \begin{eqnarray*} R = \mathbf{Z}[a_1, \ldots, a_{n + m}] & \longrightarrow & S = \mathbf{Z}[b_1, \ldots, b_n, c_1, \ldots, c_m] \\ a_1 & \longmapsto & b_1 + c_1 \\ a_2 & \longmapsto & b_2 + b_1 c_1 + c_2 \\ \ldots & \ldots & \ldots \\ a_{n + m} & \longmapsto & b_n c_m \end{eqnarray*} of Example \ref{example-factor-polynomials}. Write symbolically $$ S = R[b_1, \ldots, c_m]/(\{a_k(b_i, c_j) - a_k\}_{k = 1, \ldots, n + m}) $$ where for example $a_1(b_i, c_j) = b_1 + c_1$. The matrix of partial derivatives is $$ \left( \begin{matrix} 1 & c_1 & \ldots & c_m & 0 & \ldots & \ldots & 0 \\ 0 & 1 & c_1 & \ldots & c_m & 0 & \ldots & 0 \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & \ldots & 0 & 1 & c_1 & c_2 & \ldots & c_m \\ 1 & b_1 & \ldots & b_{n - 1} & b_n & 0 & \ldots & 0 \\ 0 & 1 & b_1 & \ldots & b_{n - 1} & b_n & \ldots & 0 \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & \ldots & \ldots & 0 & 1 & b_1 & \ldots & b_n \end{matrix} \right) $$ The determinant $\Delta$ of this matrix is better known as the {\it resultant} of the polynomials $g = x^n + b_1 x^{n - 1} + \ldots + b_n$ and $h = x^m + c_1 x^{m - 1} + \ldots + c_m$, and the matrix above is known as the {\it Sylvester matrix} associated to $g, h$. In a formula $\Delta = \text{Res}_x(g, h)$. The Sylvester matrix is the transpose of the matrix of the linear map \begin{eqnarray*} S[x]_{< m} \oplus S[x]_{< n} & \longrightarrow & S[x]_{< n + m} \\ a \oplus b & \longmapsto & ag + bh \end{eqnarray*} Let $\mathfrak q \subset S$ be any prime. By the above the following are equivalent: \begin{enumerate} \item $R \to S$ is \'etale at $\mathfrak q$, \item $\Delta = \text{Res}_x(g, h) \not \in \mathfrak q$, \item the images $\overline{g}, \overline{h} \in \kappa(\mathfrak q)[x]$ of the polynomials $g, h$ are relatively prime in $\kappa(\mathfrak q)[x]$. \end{enumerate} The equivalence of (2) and (3) holds because the image of the Sylvester matrix in $\text{Mat}(n + m, \kappa(\mathfrak q))$ has a kernel if and only if the polynomials $\overline{g}, \overline{h}$ have a factor in common. We conclude that the ring map $$ R \longrightarrow S[\frac{1}{\Delta}] = S[\frac{1}{\text{Res}_x(g, h)}] $$ is \'etale. \end{example} \begin{lemma} \label{lemma-factor-mod-lift-etale} Let $R$ be a ring. Let $f \in R[x]$ be a monic polynomial. Let $\mathfrak p$ be a prime of $R$. Let $f \bmod \mathfrak p = \overline{g} \overline{h}$ be a factorization of the image of $f$ in $\kappa(\mathfrak p)[x]$. If $\gcd(\overline{g}, \overline{h}) = 1$, then there exist \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$, and \item a factorization $f = g h$ in $R'[x]$ \end{enumerate} such that \begin{enumerate} \item $\kappa(\mathfrak p) = \kappa(\mathfrak p')$, \item $\overline{g} = g \bmod \mathfrak p'$, $\overline{h} = h \bmod \mathfrak p'$, and \item the polynomials $g, h$ generate the unit ideal in $R'[x]$. \end{enumerate} \end{lemma} \begin{proof} Suppose $\overline{g} = \overline{b}_0 x^n + \overline{b}_1 x^{n - 1} + \ldots + \overline{b}_n$, and $\overline{h} = \overline{c}_0 x^m + \overline{c}_1 x^{m - 1} + \ldots + \overline{c}_m$ with $\overline{b}_0, \overline{c}_0 \in \kappa(\mathfrak p)$ nonzero. After localizing $R$ at some element of $R$ not contained in $\mathfrak p$ we may assume $\overline{b}_0$ is the image of an invertible element $b_0 \in R$. Replacing $\overline{g}$ by $\overline{g}/b_0$ and $\overline{h}$ by $b_0\overline{h}$ we reduce to the case where $\overline{g}$, $\overline{h}$ are monic (verification omitted). Say $\overline{g} = x^n + \overline{b}_1 x^{n - 1} + \ldots + \overline{b}_n$, and $\overline{h} = x^m + \overline{c}_1 x^{m - 1} + \ldots + \overline{c}_m$. Write $f = x^{n + m} + a_1 x^{n + m - 1} + \ldots + a_{n + m}$. Consider the fibre product $$ R' = R \otimes_{\mathbf{Z}[a_1, \ldots, a_{n + m}]} \mathbf{Z}[b_1, \ldots, b_n, c_1, \ldots, c_m] $$ where the map $\mathbf{Z}[a_k] \to \mathbf{Z}[b_i, c_j]$ is as in Examples \ref{example-factor-polynomials} and \ref{example-factor-polynomials-etale}. By construction there is an $R$-algebra map $$ R' = R \otimes_{\mathbf{Z}[a_1, \ldots, a_{n + m}]} \mathbf{Z}[b_1, \ldots, b_n, c_1, \ldots, c_m] \longrightarrow \kappa(\mathfrak p) $$ which maps $b_i$ to $\overline{b}_i$ and $c_j$ to $\overline{c}_j$. Denote by $\mathfrak p' \subset R'$ the kernel of this map. Since by assumption the polynomials $\overline{g}, \overline{h}$ are relatively prime we see that the element $\Delta = \text{Res}_x(g, h) \in \mathbf{Z}[b_i, c_j]$ (see Example \ref{example-factor-polynomials-etale}) does not map to zero in $\kappa(\mathfrak p)$ under the displayed map. We conclude that $R \to R'$ is \'etale at $\mathfrak p'$. In fact a solution to the problem posed in the lemma is the ring map $R \to R'[1/\Delta]$ and the prime $\mathfrak p' R'[1/\Delta]$. Because $\text{Res}_x(g, h)$ is invertible in this ring the Sylvester matrix is invertible over $R'[1/\Delta]$ and hence $1 = a g + b h$ for some $a, b \in R'[1/\Delta][x]$ see Example \ref{example-factor-polynomials-etale}. \end{proof} \section{Local structure of \'etale ring maps} \label{section-etale-local-structure} % BEGIN ALGEBRA EDITORIAL ROUTE section-etale-local-structure \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-etale-local-structure}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-etale-local-structure \noindent Lemma \ref{lemma-etale-standard-smooth} tells us that it does not really make sense to define a standard \'etale morphism to be a standard smooth morphism of relative dimension $0$. As a model for an \'etale morphism we take the example given by a finite separable extension $k'/k$ of fields. Namely, we can always find an element $\alpha \in k'$ such that $k' = k(\alpha)$ and such that the minimal polynomial $f(x) \in k[x]$ of $\alpha$ has derivative $f'$ which is relatively prime to $f$. \begin{definition} \label{definition-standard-etale} Let $R$ be a ring. Let $g , f \in R[x]$. Assume that $f$ is monic and the derivative $f'$ is invertible in the localization $R[x]_g/(f)$. In this case the ring map $R \to R[x]_g/(f)$ is said to be {\it standard \'etale}. \end{definition} \noindent In Proposition \ref{proposition-etale-locally-standard} we show that every \'etale ring map is locally standard \'etale. \begin{lemma} \label{lemma-standard-etale} Let $R \to R[x]_g/(f)$ be standard \'etale. \begin{enumerate} \item The ring map $R \to R[x]_g/(f)$ is \'etale. \item For any ring map $R \to R'$ the base change $R' \to R'[x]_g/(f)$ of the standard \'etale ring map $R \to R[x]_g/(f)$ is standard \'etale. \item Any principal localization of $R[x]_g/(f)$ is standard \'etale over $R$. \item A composition of standard \'etale maps is {\bf not} standard \'etale in general. \end{enumerate} \end{lemma} \begin{proof} Omitted. Here is an example for (4). The ring map $\mathbf{F}_2 \to \mathbf{F}_{2^2}$ is standard \'etale. The ring map $\mathbf{F}_{2^2} \to \mathbf{F}_{2^2} \times \mathbf{F}_{2^2} \times \mathbf{F}_{2^2} \times \mathbf{F}_{2^2}$ is standard \'etale. But the ring map $\mathbf{F}_2 \to \mathbf{F}_{2^2} \times \mathbf{F}_{2^2} \times \mathbf{F}_{2^2} \times \mathbf{F}_{2^2}$ is not standard \'etale. \end{proof} \noindent Standard \'etale morphisms are a convenient way to produce \'etale maps. Here is an example. \begin{lemma} \label{lemma-make-etale-map-prescribed-residue-field} Let $R$ be a ring. Let $\mathfrak p$ be a prime of $R$. Let $L/\kappa(\mathfrak p)$ be a finite separable field extension. There exists an \'etale ring map $R \to R'$ together with a prime $\mathfrak p'$ lying over $\mathfrak p$ such that the field extension $\kappa(\mathfrak p')/\kappa(\mathfrak p)$ is isomorphic to $\kappa(\mathfrak p) \subset L$. \end{lemma} \begin{proof} By the theorem of the primitive element we may write $L = \kappa(\mathfrak p)[\alpha]$. Let $\overline{f} \in \kappa(\mathfrak p)[x]$ denote the minimal polynomial for $\alpha$ (in particular this is monic). After replacing $\alpha$ by $c\alpha$ for some $c \in R$, $c\not \in \mathfrak p$ we may assume all the coefficients of $\overline{f}$ are in the image of $R \to \kappa(\mathfrak p)$ (verification omitted). Thus we can find a monic polynomial $f \in R[x]$ which maps to $\overline{f}$ in $\kappa(\mathfrak p)[x]$. Since $\kappa(\mathfrak p) \subset L$ is separable, we see that $\gcd(\overline{f}, \overline{f}') = 1$. Hence there is an element $\gamma \in L$ such that $\overline{f}'(\alpha) \gamma = 1$. Thus we get a $R$-algebra map \begin{eqnarray*} R[x, 1/f']/(f) & \longrightarrow & L \\ x & \longmapsto & \alpha \\ 1/f' & \longmapsto & \gamma \end{eqnarray*} The left hand side is a standard \'etale algebra $R'$ over $R$ and the kernel of the ring map gives the desired prime. \end{proof} \begin{proposition} \label{proposition-etale-locally-standard} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime. If $R \to S$ is \'etale at $\mathfrak q$, then there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is standard \'etale. \end{proposition} \begin{proof} The following proof is a little roundabout and there may be ways to shorten it. \medskip\noindent Step 1. By Definition \ref{definition-etale} there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is \'etale. Thus we may assume that $S$ is \'etale over $R$. \medskip\noindent Step 2. By Lemma \ref{lemma-etale} there exists an \'etale ring map $R_0 \to S_0$ with $R_0$ of finite type over $\mathbf{Z}$, and a ring map $R_0 \to R$ such that $S = R \otimes_{R_0} S_0$. Denote by $\mathfrak q_0$ the prime of $S_0$ corresponding to $\mathfrak q$. If we show the result for $(R_0 \to S_0, \mathfrak q_0)$ then the result follows for $(R \to S, \mathfrak q)$ by base change. Hence we may assume that $R$ is Noetherian. \medskip\noindent Step 3. Note that $R \to S$ is quasi-finite by Lemma \ref{lemma-etale-quasi-finite}. By Lemma \ref{lemma-quasi-finite-open-integral-closure} there exists a finite ring map $R \to S'$, an $R$-algebra map $S' \to S$, an element $g' \in S'$ such that $g' \not \in \mathfrak q$ and $S' \to S$ induces an isomorphism $S'_{g'} \cong S_{g'}$. (Note that of course $S'$ is not \'etale over $R$ in general.) Thus we may assume that (a) $R$ is Noetherian, (b) $R \to S$ is finite and (c) $R \to S$ is \'etale at $\mathfrak q$ (but no longer necessarily \'etale at all primes). \medskip\noindent Step 4. Let $\mathfrak p \subset R$ be the prime corresponding to $\mathfrak q$. Consider the fibre ring $S \otimes_R \kappa(\mathfrak p)$. This is a finite algebra over $\kappa(\mathfrak p)$. Hence it is Artinian (see Lemma \ref{lemma-finite-dimensional-algebra}) and so a finite product of local rings $$ S \otimes_R \kappa(\mathfrak p) = \prod\nolimits_{i = 1}^n A_i, $$ see Proposition \ref{proposition-dimension-zero-ring}. One of the factors, say $A_1$, is the local ring $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ which is isomorphic to $\kappa(\mathfrak q)$, see Lemma \ref{lemma-etale-at-prime}. The other factors correspond to the other primes, say $\mathfrak q_2, \ldots, \mathfrak q_n$ of $S$ lying over $\mathfrak p$. \medskip\noindent Step 5. We may choose a nonzero element $\alpha \in \kappa(\mathfrak q)$ which generates the finite separable field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ (so even if the field extension is trivial we do not allow $\alpha = 0$). Note that for any $\lambda \in \kappa(\mathfrak p)^*$ the element $\lambda \alpha$ also generates $\kappa(\mathfrak q)$ over $\kappa(\mathfrak p)$. Consider the element $$ \overline{t} = (\alpha, 0, \ldots, 0) \in \prod\nolimits_{i = 1}^n A_i = S \otimes_R \kappa(\mathfrak p). $$ After possibly replacing $\alpha$ by $\lambda \alpha$ as above we may assume that $\overline{t}$ is the image of $t \in S$. Let $I \subset R[x]$ be the kernel of the $R$-algebra map $R[x] \to S$ which maps $x$ to $t$. Set $S' = R[x]/I$, so $S' \subset S$. Here is a diagram $$ \xymatrix{ R[x] \ar[r] & S' \ar[r] & S \\ R \ar[u] \ar[ru] \ar[rru] & & } $$ By construction the primes $\mathfrak q_j$, $j \geq 2$ of $S$ all lie over the prime $(\mathfrak p, x)$ of $R[x]$, whereas the prime $\mathfrak q$ lies over a different prime of $R[x]$ because $\alpha \not = 0$. \medskip\noindent Step 6. Denote by $\mathfrak q' \subset S'$ the prime of $S'$ corresponding to $\mathfrak q$. By the above $\mathfrak q$ is the only prime of $S$ lying over $\mathfrak q'$. Thus we see that $S_{\mathfrak q} = S_{\mathfrak q'}$, see Lemma \ref{lemma-unique-prime-over-localize-below} (we have going up for $S' \to S$ by Lemma \ref{lemma-integral-going-up} since $S' \to S$ is finite as $R \to S$ is finite). It follows that $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is finite and injective as the localization of the finite injective ring map $S' \to S$. Consider the maps of local rings $$ R_{\mathfrak p} \to S'_{\mathfrak q'} \to S_{\mathfrak q} $$ The second map is finite and injective. We have $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} = \kappa(\mathfrak q)$, see Lemma \ref{lemma-etale-at-prime}. Hence a fortiori $S_{\mathfrak q}/\mathfrak q'S_{\mathfrak q} = \kappa(\mathfrak q)$. Since $$ \kappa(\mathfrak p) \subset \kappa(\mathfrak q') \subset \kappa(\mathfrak q) $$ and since $\alpha$ is in the image of $\kappa(\mathfrak q')$ in $\kappa(\mathfrak q)$ we conclude that $\kappa(\mathfrak q') = \kappa(\mathfrak q)$. Hence by Nakayama's Lemma \ref{lemma-NAK} applied to the $S'_{\mathfrak q'}$-module map $S'_{\mathfrak q'} \to S_{\mathfrak q}$, the map $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is surjective. In other words, $S'_{\mathfrak q'} \cong S_{\mathfrak q}$. \medskip\noindent Step 7. By Lemma \ref{lemma-isomorphic-local-rings} there exist $g \in S$, $g \not \in \mathfrak q$ and $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S'_{g'} \cong S_g$. As $R$ is Noetherian the ring $S'$ is finite over $R$ because it is an $R$-submodule of the finite $R$-module $S$. Hence after replacing $S$ by $S'$ we may assume that (a) $R$ is Noetherian, (b) $S$ is finite over $R$, (c) $S$ is \'etale over $R$ at $\mathfrak q$, and (d) $S = R[x]/I$. \medskip\noindent Step 8. Consider the ring $S \otimes_R \kappa(\mathfrak p) = \kappa(\mathfrak p)[x]/\overline{I}$ where $\overline{I} = I \cdot \kappa(\mathfrak p)[x]$ is the ideal generated by $I$ in $\kappa(\mathfrak p)[x]$. As $\kappa(\mathfrak p)[x]$ is a PID we know that $\overline{I} = (\overline{h})$ for some monic $\overline{h} \in \kappa(\mathfrak p)[x]$. After replacing $\overline{h}$ by $\lambda \cdot \overline{h}$ for some $\lambda \in \kappa(\mathfrak p)^*$ we may assume that $\overline{h}$ is the image of some $h \in I \subset R[x]$. (The problem is that we do not know if we may choose $h$ monic.) Also, as in Step 4 we know that $S \otimes_R \kappa(\mathfrak p) = A_1 \times \ldots \times A_n$ with $A_1 = \kappa(\mathfrak q)$ a finite separable extension of $\kappa(\mathfrak p)$ and $A_2, \ldots, A_n$ local. This implies that $$ \overline{h} = \lambda \overline{h}_1 \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} $$ for certain pairwise coprime irreducible monic polynomials $\overline{h}_i \in \kappa(\mathfrak p)[x]$ and certain $e_2, \ldots, e_n \geq 1$, with $e_1 = 1$. Here the numbering is chosen so that $A_i = \kappa(\mathfrak p)[x]/(\overline{h}_i^{e_i})$ as $\kappa(\mathfrak p)[x]$-algebras. Note that $\overline{h}_1$ is the minimal polynomial of $\alpha \in \kappa(\mathfrak q)$ and hence is a separable polynomial (its derivative is prime to itself). \medskip\noindent Step 9. Let $m \in I$ be a monic element; such an element exists because the ring extension $R \to R[x]/I$ is finite hence integral. Denote by $\overline{m}$ the image in $\kappa(\mathfrak p)[x]$. We may factor $$ \overline{m} = \overline{k} \overline{h}_1^{d_1} \overline{h}_2^{d_2} \ldots \overline{h}_n^{d_n} $$ for some $d_1 \geq 1$, $d_j \geq e_j$, $j = 2, \ldots, n$ and $\overline{k} \in \kappa(\mathfrak p)[x]$ prime to all the $\overline{h}_i$. Set $f = m^l + h$ where $l \deg(m) > \deg(h)$, and $l \geq 2$. Then $f$ is monic as a polynomial over $R$. Also, the image $\overline{f}$ of $f$ in $\kappa(\mathfrak p)[x]$ factors as $$ \overline{f} = \lambda \overline{h}_1 \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} + \overline{k}^l \overline{h}_1^{ld_1} \overline{h}_2^{ld_2} \ldots \overline{h}_n^{ld_n} = \overline{h}_1(\lambda \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} + \overline{k}^l \overline{h}_1^{ld_1 - 1} \overline{h}_2^{ld_2} \ldots \overline{h}_n^{ld_n}) = \overline{h}_1 \overline{w} $$ with $\overline{w}$ a polynomial relatively prime to $\overline{h}_1$. Set $g = f'$ (the derivative with respect to $x$). \medskip\noindent Step 10. The ring map $R[x] \to S = R[x]/I$ has the properties: (1) it maps $f$ to zero, and (2) it maps $g$ to an element of $S \setminus \mathfrak q$. The first assertion is clear since $f$ is an element of $I$. For the second assertion we just have to show that $g$ does not map to zero in $\kappa(\mathfrak q) = \kappa(\mathfrak p)[x]/(\overline{h}_1)$. The image of $g$ in $\kappa(\mathfrak p)[x]$ is the derivative of $\overline{f}$. Thus (2) is clear because $$ \overline{g} = \frac{\text{d}\overline{f}}{\text{d}x} = \overline{w}\frac{\text{d}\overline{h}_1}{\text{d}x} + \overline{h}_1\frac{\text{d}\overline{w}}{\text{d}x}, $$ $\overline{w}$ is prime to $\overline{h}_1$ and $\overline{h}_1$ is separable. \medskip\noindent Step 11. We conclude that $\varphi : R[x]/(f) \to S$ is a surjective ring map, $R[x]_g/(f)$ is \'etale over $R$ (because it is standard \'etale, see Lemma \ref{lemma-standard-etale}) and $\varphi(g) \not \in \mathfrak q$. Pick an element $g' \in R[x]/(f)$ such that also $\varphi(g') \not \in \mathfrak q$ and $S_{\varphi(g')}$ is \'etale over $R$ (which exists since $S$ is \'etale over $R$ at $\mathfrak q$). Then the ring map $R[x]_{gg'}/(f) \to S_{\varphi(gg')}$ is a surjective map of \'etale algebras over $R$. Hence it is \'etale by Lemma \ref{lemma-map-between-etale}. Hence it is a localization by Lemma \ref{lemma-surjective-flat-finitely-presented}. Thus a localization of $S$ at an element not in $\mathfrak q$ is isomorphic to a localization of a standard \'etale algebra over $R$ which is what we wanted to show. \end{proof} \noindent The following two lemmas say that the \'etale topology is coarser than the topology generated by Zariski coverings and finite flat morphisms. They should be skipped on a first reading. \begin{lemma} \label{lemma-standard-etale-finite-flat-Zariski} Let $R \to S$ be a standard \'etale morphism. There exists a ring map $R \to S'$ with the following properties \begin{enumerate} \item $R \to S'$ is finite, finitely presented, and flat (in other words $S'$ is finite projective as an $R$-module), \item $\Spec(S') \to \Spec(R)$ is surjective, \item for every prime $\mathfrak q \subset S$, lying over $\mathfrak p \subset R$ and every prime $\mathfrak q' \subset S'$ lying over $\mathfrak p$ there exists a $g' \in S'$, $g' \not \in \mathfrak q'$ such that the ring map $R \to S'_{g'}$ factors through a map $\varphi : S \to S'_{g'}$ with $\varphi^{-1}(\mathfrak q'S'_{g'}) = \mathfrak q$. \end{enumerate} \end{lemma} \begin{proof} Let $S = R[x]_g/(f)$ be a presentation of $S$ as in Definition \ref{definition-standard-etale}. Write $f = x^n + a_1 x^{n - 1} + \ldots + a_n$ with $a_i \in R$. By Lemma \ref{lemma-adjoin-roots} there exists a finite free and faithfully flat ring map $R \to S'$ such that $f = \prod (x - \alpha_i)$ for certain $\alpha_i \in S'$. Hence $R \to S'$ satisfies conditions (1), (2). Let $\mathfrak q \subset R[x]/(f)$ be a prime ideal with $g \not \in \mathfrak q$ (i.e., it corresponds to a prime of $S$). Let $\mathfrak p = R \cap \mathfrak q$ and let $\mathfrak q' \subset S'$ be a prime lying over $\mathfrak p$. Note that there are $n$ maps of $R$-algebras \begin{eqnarray*} \varphi_i : R[x]/(f) & \longrightarrow & S' \\ x & \longmapsto & \alpha_i \end{eqnarray*} To finish the proof we have to show that for some $i$ we have (a) the image of $\varphi_i(g)$ in $\kappa(\mathfrak q')$ is not zero, and (b) $\varphi_i^{-1}(\mathfrak q') = \mathfrak q$. Because then we can just take $g' = \varphi_i(g)$, and $\varphi = \varphi_i$ for that $i$. \medskip\noindent Let $\overline{f}$ denote the image of $f$ in $\kappa(\mathfrak p)[x]$. Note that as a point of $\Spec(\kappa(\mathfrak p)[x]/(\overline{f}))$ the prime $\mathfrak q$ corresponds to an irreducible factor $f_1$ of $\overline{f}$. Moreover, $g \not \in \mathfrak q$ means that $f_1$ does not divide the image $\overline{g}$ of $g$ in $\kappa(\mathfrak p)[x]$. Denote by $\overline{\alpha}_1, \ldots, \overline{\alpha}_n$ the images of $\alpha_1, \ldots, \alpha_n$ in $\kappa(\mathfrak q')$. Note that the polynomial $\overline{f}$ splits completely in $\kappa(\mathfrak q')[x]$, namely $$ \overline{f} = \prod\nolimits_i (x - \overline{\alpha}_i) $$ Moreover $\varphi_i(g)$ reduces to $\overline{g}(\overline{\alpha}_i)$. It follows we may pick $i$ such that $f_1(\overline{\alpha}_i) = 0$ and $\overline{g}(\overline{\alpha}_i) \not = 0$. For this $i$ properties (a) and (b) hold. Some details omitted. \end{proof} \begin{lemma} \label{lemma-etale-finite-flat-zariski} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is \'etale, and \item $\Spec(S) \to \Spec(R)$ is surjective. \end{enumerate} Then there exists a ring map $R \to S'$ such that \begin{enumerate} \item $R \to S'$ is finite, finitely presented, and flat (in other words it is finite projective as an $R$-module), \item $\Spec(S') \to \Spec(R)$ is surjective, \item for every prime $\mathfrak q' \subset S'$ there exists a $g' \in S'$, $g' \not \in \mathfrak q'$ such that the ring map $R \to S'_{g'}$ factors as $R \to S \to S'_{g'}$. \end{enumerate} \end{lemma} \begin{proof} By Proposition \ref{proposition-etale-locally-standard} and the quasi-compactness of $\Spec(S)$ (see Lemma \ref{lemma-quasi-compact}) we can find $g_1, \ldots, g_n \in S$ generating the unit ideal of $S$ such that each $R \to S_{g_i}$ is standard \'etale. If we prove the lemma for the ring map $R \to \prod_{i = 1, \ldots, n} S_{g_i}$ then the lemma follows for the ring map $R \to S$. Hence we may assume that $S = \prod_{i = 1, \ldots, n} S_i$ is a finite product of standard \'etale morphisms. \medskip\noindent For each $i$ choose a ring map $R \to S_i'$ as in Lemma \ref{lemma-standard-etale-finite-flat-Zariski} adapted to the standard \'etale morphism $R \to S_i$. Set $S' = S_1' \otimes_R \ldots \otimes_R S_n'$; we will use the $R$-algebra maps $S_i' \to S'$ without further mention below. We claim this works. Properties (1) and (2) are immediate. For property (3) suppose that $\mathfrak q' \subset S'$ is a prime. Denote by $\mathfrak p$ its image in $\Spec(R)$. Choose $i \in \{1, \ldots, n\}$ such that $\mathfrak p$ is in the image of $\Spec(S_i) \to \Spec(R)$; this is possible by assumption. Set $\mathfrak q_i' \subset S_i'$ to be the image of $\mathfrak q'$ in the spectrum of $S_i'$. By construction of $S'_i$ there exists a $g'_i \in S_i'$ such that $R \to (S_i')_{g_i'}$ factors as $R \to S_i \to (S_i')_{g_i'}$. Hence also $R \to S'_{g_i'}$ factors as $$ R \to S_i \to (S_i')_{g_i'} \to S'_{g_i'} $$ as desired. \end{proof} \section{\'Etale local structure of quasi-finite ring maps} \label{section-etale-local-quasi-finite} % BEGIN ALGEBRA EDITORIAL ROUTE section-etale-local-quasi-finite \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-etale-local-quasi-finite}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-etale-local-quasi-finite \noindent The following lemmas say roughly that after an \'etale extension a quasi-finite ring map becomes finite. To help interpret the results recall that the locus where a finite type ring map is quasi-finite is open (see Lemma \ref{lemma-quasi-finite-open}) and that formation of this locus commutes with arbitrary base change (see Lemma \ref{lemma-quasi-finite-base-change}). \begin{lemma} \label{lemma-produce-finite} Let $R \to S' \to S$ be ring maps. Let $\mathfrak p \subset R$ be a prime. Let $g \in S'$ be an element. Assume \begin{enumerate} \item $R \to S'$ is integral, \item $R \to S$ is finite type, \item $S'_g \cong S_g$, and \item $g$ is invertible in $S' \otimes_R \kappa(\mathfrak p)$. \end{enumerate} Then there exists $f \in R$, $f \not \in \mathfrak p$ such that $R_f \to S_f$ is finite. \end{lemma} \begin{proof} By assumption the image $T$ of $V(g) \subset \Spec(S')$ under the morphism $\Spec(S') \to \Spec(R)$ does not contain $\mathfrak p$. By Section \ref{section-going-up}, especially Lemma \ref{lemma-going-up-closed}, we see $T$ is closed. Pick $f \in R$, $f \not \in \mathfrak p$ such that $T \cap D(f) = \emptyset$. Then we see that $g$ becomes invertible in $S'_f$. Hence $S'_f \cong S_f$. Thus $S_f$ is both of finite type and integral over $R_f$, hence finite. \end{proof} \begin{lemma} \label{lemma-etale-makes-quasi-finite-finite-one-prime} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over the prime $\mathfrak p \subset R$. Assume $R \to S$ is finite type and quasi-finite at $\mathfrak q$. Then there exists \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$, \item a product decomposition $$ R' \otimes_R S = A \times B $$ \end{enumerate} with the following properties \begin{enumerate} \item $\kappa(\mathfrak p) = \kappa(\mathfrak p')$, \item $R' \to A$ is finite, \item $A$ has exactly one prime $\mathfrak r$ lying over $\mathfrak p'$, \item $\mathfrak r$ lies over $\mathfrak q$, and \item $B$ does not have a prime lying over $\mathfrak q$ and $\mathfrak p'$. \end{enumerate} \end{lemma} \begin{proof} Let $S' \subset S$ be the integral closure of $R$ in $S$. Let $\mathfrak q' = S' \cap \mathfrak q$. By Zariski's Main Theorem \ref{theorem-main-theorem} there exists a $g \in S'$, $g \not \in \mathfrak q'$ such that $S'_g \cong S_g$. Consider the fibre rings $F = S \otimes_R \kappa(\mathfrak p)$ and $F' = S' \otimes_R \kappa(\mathfrak p)$. Denote by $\overline{\mathfrak q}'$ the prime of $F'$ corresponding to $\mathfrak q'$. Since $F'$ is integral over $\kappa(\mathfrak p)$ we see that $\overline{\mathfrak q}'$ is a closed point of $\Spec(F')$, see Lemma \ref{lemma-integral-over-field}. Note that $\mathfrak q$ defines an isolated closed point $\overline{\mathfrak q}$ of $\Spec(F)$ (see Definition \ref{definition-quasi-finite}). Since $S'_g \cong S_g$ we have $F'_g \cong F_g$, so $\overline{\mathfrak q}$ and $\overline{\mathfrak q}'$ have isomorphic open neighbourhoods in $\Spec(F)$ and $\Spec(F')$. We conclude the set $\{\overline{\mathfrak q}'\} \subset \Spec(F')$ is open. Combined with $\overline{\mathfrak q}'$ being closed (shown above) we conclude that $\overline{\mathfrak q}'$ defines an isolated closed point of $\Spec(F')$ as well. \medskip\noindent An additional small remark is that under the map $\Spec(F) \to \Spec(F')$ the point $\overline{\mathfrak q}$ is the only point mapping to $\overline{\mathfrak q}'$. This follows from the discussion above. \medskip\noindent By Lemma \ref{lemma-disjoint-implies-product} we may write $F' = F'_1 \times F'_2$ with $\Spec(F'_1) = \{\overline{\mathfrak q}'\}$. Since $F' = S' \otimes_R \kappa(\mathfrak p)$, there exists an $s' \in S'$ which maps to the element $(r, 0) \in F'_1 \times F'_2 = F'$ for some $r \in R$, $r \not \in \mathfrak p$. In fact, what we will use about $s'$ is that it is an element of $S'$, not contained in $\mathfrak q'$, and contained in any other prime lying over $\mathfrak p$. \medskip\noindent Let $f(x) \in R[x]$ be a monic polynomial such that $f(s') = 0$. Denote by $\overline{f} \in \kappa(\mathfrak p)[x]$ the image. We can factor it as $\overline{f} = x^e \overline{h}$ where $\overline{h}(0) \not = 0$. After replacing $f$ by $x f$ if necessary, we may assume $e \geq 1$. By Lemma \ref{lemma-factor-mod-lift-etale} we can find an \'etale ring extension $R \to R'$, a prime $\mathfrak p'$ lying over $\mathfrak p$, and a factorization $f = h i$ in $R'[x]$ such that $\kappa(\mathfrak p) = \kappa(\mathfrak p')$, $\overline{h} = h \bmod \mathfrak p'$, $x^e = i \bmod \mathfrak p'$, and we can write $a h + b i = 1$ in $R'[x]$ (for suitable $a, b$). \medskip\noindent Consider the elements $h(s'), i(s') \in R' \otimes_R S'$. By construction we have $h(s')i(s') = f(s') = 0$. On the other hand they generate the unit ideal since $a(s')h(s') + b(s')i(s') = 1$. Thus we see that $R' \otimes_R S'$ is the product of the localizations at these elements: $$ R' \otimes_R S' = (R' \otimes_R S')_{i(s')} \times (R' \otimes_R S')_{h(s')} = S'_1 \times S'_2 $$ Moreover this product decomposition is compatible with the product decomposition we found for the fibre ring $F'$; this comes from our choices of $s', i, h$ which guarantee that $\overline{\mathfrak q}'$ is the only prime of $F'$ which does not contain the image of $i(s')$ in $F'$. Here we use that the fibre ring of $R'\otimes_R S'$ over $R'$ at $\mathfrak p'$ is the same as $F'$ due to the fact that $\kappa(\mathfrak p) = \kappa(\mathfrak p')$. It follows that $S'_1$ has exactly one prime, say $\mathfrak r'$, lying over $\mathfrak p'$ and that this prime lies over $\mathfrak q'$. Hence the element $g \in S'$ maps to an element of $S'_1$ not contained in $\mathfrak r'$. \medskip\noindent The base change $R'\otimes_R S$ inherits a similar product decomposition $$ R' \otimes_R S = (R' \otimes_R S)_{i(s')} \times (R' \otimes_R S)_{h(s')} = S_1 \times S_2 $$ It follows from the above that $S_1$ has exactly one prime, say $\mathfrak r$, lying over $\mathfrak p'$ (consider the fibre ring as above), and that this prime lies over $\mathfrak q$. \medskip\noindent Now we may apply Lemma \ref{lemma-produce-finite} to the ring maps $R' \to S'_1 \to S_1$, the prime $\mathfrak p'$ and the element $g$ to see that after replacing $R'$ by a principal localization we can assume that $S_1$ is finite over $R'$ as desired. \end{proof} \begin{lemma} \label{lemma-etale-makes-quasi-finite-finite} Let $R \to S$ be a ring map. Let $\mathfrak p \subset R$ be a prime. Assume $R \to S$ is finite type. Then there exists \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$, \item a product decomposition $$ R' \otimes_R S = A_1 \times \ldots \times A_n \times B $$ \end{enumerate} with the following properties \begin{enumerate} \item we have $\kappa(\mathfrak p) = \kappa(\mathfrak p')$, \item each $A_i$ is finite over $R'$, \item each $A_i$ has exactly one prime $\mathfrak r_i$ lying over $\mathfrak p'$, and \item $R' \to B$ is not quasi-finite at any prime lying over $\mathfrak p'$. \end{enumerate} \end{lemma} \begin{proof} Denote by $F = S \otimes_R \kappa(\mathfrak p)$ the fibre ring of $S/R$ at the prime $\mathfrak p$. As $F$ is of finite type over $\kappa(\mathfrak p)$ it is Noetherian and hence $\Spec(F)$ has finitely many isolated closed points. If there are no isolated closed points, i.e., no primes $\mathfrak q$ of $S$ over $\mathfrak p$ such that $S/R$ is quasi-finite at $\mathfrak q$, then the lemma holds. If there exists at least one such prime $\mathfrak q$, then we may apply Lemma \ref{lemma-etale-makes-quasi-finite-finite-one-prime}. This gives a diagram $$ \xymatrix{ S \ar[r] & R'\otimes_R S \ar@{=}[r] & A_1 \times B' \\ R \ar[r] \ar[u] & R' \ar[u] \ar[ru] } $$ as in said lemma. Since the residue fields at $\mathfrak p$ and $\mathfrak p'$ are the same, the fibre rings of $S/R$ and $(A_1 \times B')/R'$ are the same. Hence, by induction on the number of isolated closed points of the fibre we may assume that the lemma holds for $R' \to B'$ and $\mathfrak p'$. Thus we get an \'etale ring map $R' \to R''$, a prime $\mathfrak p'' \subset R''$ and a decomposition $$ R'' \otimes_{R'} B' = A_2 \times \ldots \times A_n \times B. $$ We omit the verification that the ring map $R \to R''$, the prime $\mathfrak p''$ and the resulting decomposition $$ R'' \otimes_R S = (R'' \otimes_{R'} A_1) \times A_2 \times \ldots \times A_n \times B $$ is a solution to the problem posed in the lemma. \end{proof} \begin{lemma} \label{lemma-etale-makes-quasi-finite-finite-variant} Let $R \to S$ be a ring map. Let $\mathfrak p \subset R$ be a prime. Assume $R \to S$ is finite type. Then there exists \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$, \item a product decomposition $$ R' \otimes_R S = A_1 \times \ldots \times A_n \times B $$ \end{enumerate} with the following properties \begin{enumerate} \item each $A_i$ is finite over $R'$, \item each $A_i$ has exactly one prime $\mathfrak r_i$ lying over $\mathfrak p'$, \item the finite field extensions $\kappa(\mathfrak r_i)/\kappa(\mathfrak p')$ are purely inseparable, and \item $R' \to B$ is not quasi-finite at any prime lying over $\mathfrak p'$. \end{enumerate} \end{lemma} \begin{proof} The strategy of the proof is to make two \'etale ring extensions: first we control the residue fields, then we apply Lemma \ref{lemma-etale-makes-quasi-finite-finite}. \medskip\noindent Denote by $F = S \otimes_R \kappa(\mathfrak p)$ the fibre ring of $S/R$ at the prime $\mathfrak p$. As in the proof of Lemma \ref{lemma-etale-makes-quasi-finite-finite} there are finitely many primes, say $\mathfrak q_1, \ldots, \mathfrak q_n$ of $S$ lying over $\mathfrak p$ at which the ring map $R \to S$ is quasi-finite. Let $\kappa(\mathfrak p) \subset L_i \subset \kappa(\mathfrak q_i)$ be the subfield such that $\kappa(\mathfrak p) \subset L_i$ is separable, and the field extension $\kappa(\mathfrak q_i)/L_i$ is purely inseparable. Let $L/\kappa(\mathfrak p)$ be a finite Galois extension into which $L_i$ embeds for $i = 1, \ldots, n$. By Lemma \ref{lemma-make-etale-map-prescribed-residue-field} we can find an \'etale ring extension $R \to R'$ together with a prime $\mathfrak p'$ lying over $\mathfrak p$ such that the field extension $\kappa(\mathfrak p')/\kappa(\mathfrak p)$ is isomorphic to $\kappa(\mathfrak p) \subset L$. Thus the fibre ring of $R' \otimes_R S$ at $\mathfrak p'$ is isomorphic to $F \otimes_{\kappa(\mathfrak p)} L$. The primes lying over $\mathfrak q_i$ correspond to primes of $\kappa(\mathfrak q_i) \otimes_{\kappa(\mathfrak p)} L$ which is a product of fields purely inseparable over $L$ by our choice of $L$ and elementary field theory. These are also the only primes over $\mathfrak p'$ at which $R' \to R' \otimes_R S$ is quasi-finite, by Lemma \ref{lemma-quasi-finite-base-change}. Hence after replacing $R$ by $R'$, $\mathfrak p$ by $\mathfrak p'$, and $S$ by $R' \otimes_R S$ we may assume that for all primes $\mathfrak q$ lying over $\mathfrak p$ for which $S/R$ is quasi-finite the field extensions $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ are purely inseparable. \medskip\noindent Next apply Lemma \ref{lemma-etale-makes-quasi-finite-finite}. The result is what we want since the field extensions do not change under this \'etale ring extension. \end{proof} \section{Local homomorphisms} \label{section-local-homomorphisms} % BEGIN ALGEBRA EDITORIAL ROUTE section-local-homomorphisms \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-local-homomorphisms}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-local-homomorphisms \noindent Some lemmas which don't have a natural section to go into. The first lemma says, loosely speaking, that an \'etale map of local rings is an isomorphism modulo all powers of a nonunit principal ideal. \begin{lemma} \label{lemma-lindel} \begin{reference} \cite[Lemma on page 321]{Lindel}, \cite[Lemma 4.1.5]{KC} \end{reference} Let $(R, \mathfrak m_R) \to (S, \mathfrak m_S)$ be a local homomorphism of local rings. Assume $S$ is the localization of an \'etale ring extension of $R$ and that $\kappa(\mathfrak m_R) \to \kappa(\mathfrak m_S)$ is an isomorphism. Then there exists a $t \in \mathfrak m_R$ such that $R/t^nR \to S/t^nS$ is an isomorphism for all $n \geq 1$. \end{lemma} \begin{proof} Write $S = T_{\mathfrak q}$ for some \'etale $R$-algebra $T$ and prime ideal $\mathfrak q \subset T$ lying over $\mathfrak m_R$. By Proposition \ref{proposition-etale-locally-standard} we may assume $R \to T$ is standard \'etale. Write $T = R[x]_g/(f)$ as in Definition \ref{definition-standard-etale}. By our assumption on residue fields, we may choose $a \in R$ such that $x$ and $a$ have the same image in $\kappa(\mathfrak q) = \kappa(\mathfrak m_S) = \kappa(\mathfrak m_R)$. Then after replacing $x$ by $x - a$ we may assume that $\mathfrak q$ is generated by $x$ and $\mathfrak m_R$ in $T$. In particular $t = f(0) \in \mathfrak m_R$. We will show that $t = f(0)$ works. \medskip\noindent Write $f = x^d + \sum_{i = 1, \ldots, d - 1} a_i x^i + t$. Since $R \to T$ is standard \'etale we find that $a_1$ is a unit in $R$: the derivative of $f$ is invertible in $T$ and in particular is not contained in $\mathfrak q$. Let $h = a_1 + a_2 x + \ldots + a_{d - 1} x^{d - 2} + x^{d - 1} \in R[x]$ so that $f = t + xh$ in $R[x]$. We see that $h \not \in \mathfrak q$ and hence we may replace $T$ by $R[x]_{hg}/(f)$. After this replacement we see that $$ T/tT = (R/tR)[x]_{hg}/(f) = (R/tR)[x]_{hg}/(xh) = (R/tR)[x]_{hg}/(x) $$ is a quotient of $R/tR$. By Lemma \ref{lemma-surjective-mod-locally-nilpotent} we conclude that $R/t^nR \to T/t^nT$ is surjective for all $n \geq 1$. On the other hand, we know that the flat local ring map $R/t^nR \to S/t^nS$ factors through $R/t^nR \to T/t^nT$ for all $n$, hence these maps are also injective (a flat local homomorphism of local rings is faithfully flat and hence injective, see Lemmas \ref{lemma-local-flat-ff} and \ref{lemma-faithfully-flat-universally-injective}). As $S$ is the localization of $T$ we see that $S/t^nS$ is the localization of $T/t^nT = R/t^nR$ at a prime lying over the maximal ideal, but this ring is already local and the proof is complete. \end{proof} \begin{lemma} \label{lemma-etale-under-finite-flat} Let $(R, \mathfrak m_R) \to (S, \mathfrak m_S)$ be a local homomorphism of local rings. Assume $S$ is the localization of an \'etale ring extension of $R$. Then there exists a finite, finitely presented, faithfully flat ring map $R \to S'$ such that for every maximal ideal $\mathfrak m'$ of $S'$ there is a factorization $$ R \to S \to S'_{\mathfrak m'} $$ of the ring map $R \to S'_{\mathfrak m'}$. \end{lemma} \begin{proof} Write $S = T_{\mathfrak q}$ for some \'etale $R$-algebra $T$. By Proposition \ref{proposition-etale-locally-standard} we may assume $T$ is standard \'etale. Apply Lemma \ref{lemma-standard-etale-finite-flat-Zariski} to the ring map $R \to T$ to get $R \to S'$. Then in particular for every maximal ideal $\mathfrak m'$ of $S'$ we get a factorization $\varphi : T \to S'_{g'}$ for some $g' \not \in \mathfrak m'$ such that $\mathfrak q = \varphi^{-1}(\mathfrak m'S'_{g'})$. Thus $\varphi$ induces the desired local ring map $S \to S'_{\mathfrak m'}$. \end{proof} \section{Integral closure and smooth base change} \label{section-integral-closure-smooth-base-change} % BEGIN ALGEBRA EDITORIAL ROUTE section-integral-closure-smooth-base-change \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-integral-closure-smooth-base-change}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-integral-closure-smooth-base-change \begin{lemma} \label{lemma-trick} Let $R$ be a ring. Let $f \in R[x]$ be a monic polynomial. Let $R \to B$ be a ring map. If $h \in B[x]/(f)$ is integral over $R$, then the element $f' h$ can be written as $f'h = \sum_i b_i x^i$ with $b_i \in B$ integral over $R$. \end{lemma} \begin{proof} Say $h^e + r_1 h^{e - 1} + \ldots + r_e = 0$ in the ring $B[x]/(f)$ with $r_i \in R$. There exists a finite free ring extension $B \subset B'$ such that $f = (x - \alpha_1) \ldots (x - \alpha_d)$ for some $\alpha_i \in B'$, see Lemma \ref{lemma-adjoin-roots}. Note that each $\alpha_i$ is integral over $R$. We may represent $h = h_0 + h_1 x + \ldots + h_{d - 1} x^{d - 1}$ with $h_i \in B$. Then it is a universal fact that $$ f' h = \sum\nolimits_{i = 1, \ldots, d} h(\alpha_i) (x - \alpha_1) \ldots \widehat{(x - \alpha_i)} \ldots (x - \alpha_d) $$ as elements of $B'[x]/(f)$. You prove this by evaluating both sides at the points $\alpha_i$ over the ring $B_{univ} = \mathbf{Z}[\alpha_i, h_j]$ (some details omitted). By our assumption that $h$ satisfies $h^e + r_1 h^{e - 1} + \ldots + r_e = 0$ in the ring $B[x]/(f)$ we see that $$ h(\alpha_i)^e + r_1 h(\alpha_i)^{e - 1} + \ldots + r_e = 0 $$ in $B'$. Hence $h(\alpha_i)$ is integral over $R$. Using the formula above we see that $f'h \equiv \sum_{j = 0, \ldots, d - 1} b'_j x^j$ in $B'[x]/(f)$ with $b'_j \in B'$ integral over $R$. However, since $f' h \in B[x]/(f)$ and since $1, x, \ldots, x^{d - 1}$ is a $B'$-basis for $B'[x]/(f)$ we see that $b'_j \in B$ as desired. \end{proof} \begin{lemma} \label{lemma-integral-closure-commutes-etale} Let $R \to S$ be an \'etale ring map. Let $R \to B$ be any ring map. Let $A \subset B$ be the integral closure of $R$ in $B$. Let $A' \subset S \otimes_R B$ be the integral closure of $S$ in $S \otimes_R B$. Then the canonical map $S \otimes_R A \to A'$ is an isomorphism. \end{lemma} \begin{proof} The map $S \otimes_R A \to A'$ is injective because $A \subset B$ and $R \to S$ is flat. We are going to use repeatedly that taking integral closure commutes with localization, see Lemma \ref{lemma-integral-closure-localize}. Hence we may localize on $S$, by Lemma \ref{lemma-cover} (the criterion for checking whether an $S$-module map is an isomorphism). Thus we may assume that $S = R[x]_g/(f) = (R[x]/(f))_g$ is standard \'etale over $R$, see Proposition \ref{proposition-etale-locally-standard}. Applying localization one more time we see that $A'$ is $(A'')_g$ where $A''$ is the integral closure of $R[x]/(f)$ in $B[x]/(f)$. Suppose that $a \in A''$. It suffices to show that $a$ is in $S \otimes_R A$. By Lemma \ref{lemma-trick} we see that $f' a = \sum a_i x^i$ with $a_i \in A$. Since $f'$ is invertible in $S$ (by definition of a standard \'etale ring map) we conclude that $a \in S \otimes_R A$ as desired. \end{proof} \begin{example} \label{example-fourier} Let $p$ be a prime number. The ring extension $$ R = \mathbf{Z}[1/p] \subset R' = \mathbf{Z}[1/p][x]/(x^{p - 1} + \ldots + x + 1) $$ has the following property: For $d < p$ there exist elements $\alpha_0, \ldots, \alpha_{d - 1} \in R'$ such that $$ \prod\nolimits_{0 \leq i < j < d} (\alpha_i - \alpha_j) $$ is a unit in $R'$. Namely, take $\alpha_i$ equal to the class of $x^i$ in $R'$ for $i = 0, \ldots, p - 1$. Then we have $$ T^p - 1 = \prod\nolimits_{i = 0, \ldots, p - 1} (T - \alpha_i) $$ in $R'[T]$. Namely, the ring $\mathbf{Q}[x]/(x^{p - 1} + \ldots + x + 1)$ is a field because the cyclotomic polynomial $x^{p - 1} + \ldots + x + 1$ is irreducible over $\mathbf{Q}$ and the $\alpha_i$ are pairwise distinct roots of $T^p - 1$, whence the equality. Taking derivatives on both sides and substituting $T = \alpha_i$ we obtain $$ p \alpha_i^{p - 1} = (\alpha_i - \alpha_0) \ldots \widehat{(\alpha_i - \alpha_i)} \ldots (\alpha_i - \alpha_{p - 1}) $$ and we see this is invertible in $R'$. \end{example} \begin{lemma} \label{lemma-integral-closure-commutes-smooth} Let $R \to S$ be a smooth ring map. Let $R \to B$ be any ring map. Let $A \subset B$ be the integral closure of $R$ in $B$. Let $A' \subset S \otimes_R B$ be the integral closure of $S$ in $S \otimes_R B$. Then the canonical map $S \otimes_R A \to A'$ is an isomorphism. \end{lemma} \begin{proof} Arguing as in the proof of Lemma \ref{lemma-integral-closure-commutes-etale} we may localize on $S$. Hence we may assume that $R \to S$ is a standard smooth ring map, see Lemma \ref{lemma-smooth-syntomic}. By definition of a standard smooth ring map we see that $S$ is \'etale over a polynomial ring $R[x_1, \ldots, x_n]$. Since we have seen the result in the case of an \'etale ring extension (Lemma \ref{lemma-integral-closure-commutes-etale}) this reduces us to the case where $S = R[x]$. Thus we have to show $$ f = \sum b_i x^i \text{ integral over }R[x] \Leftrightarrow \text{each }b_i\text{ integral over }R. $$ The implication from right to left holds because the set of elements in $B[x]$ integral over $R[x]$ is a ring (Lemma \ref{lemma-integral-closure-is-ring}) and contains $x$. \medskip\noindent Suppose that $f \in B[x]$ is integral over $R[x]$, and assume that $f = \sum_{i < d} b_i x^i$ has degree $< d$. Since integral closure and localization commute, it suffices to show there exist distinct primes $p, q$ such that each $b_i$ is integral both over $R[1/p]$ and over $R[1/q]$. Hence, we can find a finite free ring extension $R \subset R'$ such that $R'$ contains $\alpha_1, \ldots, \alpha_d$ with the property that $\prod_{i < j} (\alpha_i - \alpha_j)$ is a unit in $R'$, see Example \ref{example-fourier}. In this case we have the universal equality $$ f = \sum_i f(\alpha_i) \frac{(x - \alpha_1) \ldots \widehat{(x - \alpha_i)} \ldots (x - \alpha_d)} {(\alpha_i - \alpha_1) \ldots \widehat{(\alpha_i - \alpha_i)} \ldots (\alpha_i - \alpha_d)}. $$ OK, and the elements $f(\alpha_i)$ are integral over $R'$ since $(R' \otimes_R B)[x] \to R' \otimes_R B$, $h \mapsto h(\alpha_i)$ is a ring map. Hence we see that the coefficients of $f$ in $(R' \otimes_R B)[x]$ are integral over $R'$. Since $R'$ is finite over $R$ (hence integral over $R$) we see that they are integral over $R$ also, as desired. \end{proof} \begin{lemma} \label{lemma-integral-closure-commutes-colim-smooth} Let $R \to S$ and $R \to B$ be ring maps. Let $A \subset B$ be the integral closure of $R$ in $B$. Let $A' \subset S \otimes_R B$ be the integral closure of $S$ in $S \otimes_R B$. If $S$ is a filtered colimit of smooth $R$-algebras, then the canonical map $S \otimes_R A \to A'$ is an isomorphism. \end{lemma} \begin{proof} This follows from the straightforward fact that taking tensor products and taking integral closures commute with filtered colimits and Lemma \ref{lemma-integral-closure-commutes-smooth}. \end{proof} \section{Formally unramified maps} \label{section-formally-unramified} % BEGIN ALGEBRA EDITORIAL ROUTE section-formally-unramified \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-formally-unramified}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-formally-unramified \noindent It turns out to be logically more efficient to define the notion of a formally unramified map before introducing the notion of a formally \'etale one. \begin{definition} \label{definition-formally-unramified} Let $R \to S$ be a ring map. We say $S$ is {\it formally unramified over $R$} if for every commutative solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[r] \ar[u] & A \ar[u] } $$ where $I \subset A$ is an ideal of square zero, there exists at most one dotted arrow making the diagram commute. \end{definition} \begin{lemma} \label{lemma-base-change-formally-unramified} Let $R \to S$ be a formally unramified map. Let $R \to R'$ be any ring map. Then the base change $S' = R' \otimes_R S$ is formally unramified over $R'$. \end{lemma} \begin{proof} Let a solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rrd] & R' \otimes_R S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[u] \ar[r] & R' \ar[r] \ar[u] & A \ar[u] } $$ as in Definition \ref{definition-formally-unramified} be given. By assumption there exists at most one longer dotted arrow. By the universal property of tensor product we conclude there is at most one shorter dotted arrow. \end{proof} \begin{lemma} \label{lemma-characterize-formally-unramified} Let $R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item $R \to S$ is formally unramified, \item the module of differentials $\Omega_{S/R}$ is zero. \end{enumerate} \end{lemma} \begin{proof} Let $J = \Ker(S \otimes_R S \to S)$ be the kernel of the multiplication map. Let $A_{univ} = S \otimes_R S/J^2$. Recall that $I_{univ} = J/J^2$ is isomorphic to $\Omega_{S/R}$, see Lemma \ref{lemma-differentials-diagonal}. Moreover, the two $R$-algebra maps $\sigma_1, \sigma_2 : S \to A_{univ}$, $\sigma_1(s) = s \otimes 1 \bmod J^2$, and $\sigma_2(s) = 1 \otimes s \bmod J^2$ differ by the universal derivation $\text{d} : S \to \Omega_{S/R} = I_{univ}$. \medskip\noindent Assume $R \to S$ formally unramified. Then we see that $\sigma_1 = \sigma_2$. Hence $\text{d}(s) = 0$ for all $s \in S$. Hence $\Omega_{S/R} = 0$. \medskip\noindent Assume that $\Omega_{S/R} = 0$. Let $A, I, R \to A, S \to A/I$ be a solid diagram as in Definition \ref{definition-formally-unramified}. Let $\tau_1, \tau_2 : S \to A$ be two dotted arrows making the diagram commute. Consider the $R$-algebra map $A_{univ} \to A$ defined by the rule $s_1 \otimes s_2 \mapsto \tau_1(s_1)\tau_2(s_2)$. We omit the verification that this is well defined. Since $A_{univ} \cong S$ as $I_{univ} = \Omega_{S/R} = 0$ we conclude that $\tau_1 = \tau_2$. \end{proof} \begin{lemma} \label{lemma-formally-unramified-local} Let $R \to S$ be a ring map. The following are equivalent: \begin{enumerate} \item $R \to S$ is formally unramified, \item $R \to S_{\mathfrak q}$ is formally unramified for all primes $\mathfrak q$ of $S$, and \item $R_{\mathfrak p} \to S_{\mathfrak q}$ is formally unramified for all primes $\mathfrak q$ of $S$ with $\mathfrak p = R \cap \mathfrak q$. \end{enumerate} \end{lemma} \begin{proof} We have seen in Lemma \ref{lemma-characterize-formally-unramified} that (1) is equivalent to $\Omega_{S/R} = 0$. Similarly, by Lemma \ref{lemma-differentials-localize} we see that (2) and (3) are equivalent to $(\Omega_{S/R})_{\mathfrak q} = 0$ for all $\mathfrak q$. Hence the equivalence follows from Lemma \ref{lemma-characterize-zero-local}. \end{proof} \begin{lemma} \label{lemma-formally-unramified-localize} Let $A \to B$ be a formally unramified ring map. \begin{enumerate} \item For $S \subset A$ a multiplicative subset, $S^{-1}A \to S^{-1}B$ is formally unramified. \item For $S \subset B$ a multiplicative subset, $A \to S^{-1}B$ is formally unramified. \end{enumerate} \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-formally-unramified-local}. (You can also deduce it from Lemma \ref{lemma-characterize-formally-unramified} combined with Lemma \ref{lemma-differentials-localize}.) \end{proof} \begin{lemma} \label{lemma-colimit-formally-unramified} Let $R$ be a ring. Let $I$ be a directed set. Let $(S_i, \varphi_{ii'})$ be a system of $R$-algebras over $I$. If each $R \to S_i$ is formally unramified, then $S = \colim_{i \in I} S_i$ is formally unramified over $R$. \end{lemma} \begin{proof} Consider a diagram as in Definition \ref{definition-formally-unramified}. By assumption there exists at most one $R$-algebra map $S_i \to A$ lifting the compositions $S_i \to S \to A/I$. Since every element of $S$ is in the image of one of the maps $S_i \to S$ we see that there is at most one map $S \to A$ fitting into the diagram. \end{proof} \section{Conormal modules and universal thickenings} \label{section-conormal} % BEGIN ALGEBRA EDITORIAL ROUTE section-conormal \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-conormal}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-conormal \noindent It turns out that one can define the first infinitesimal neighbourhood not just for a closed immersion of schemes, but already for any formally unramified morphism. This is based on the following algebraic fact. \begin{lemma} \label{lemma-universal-thickening} Let $R \to S$ be a formally unramified ring map. There exists a surjection of $R$-algebras $S' \to S$ whose kernel is an ideal of square zero with the following universal property: Given any commutative diagram $$ \xymatrix{ S \ar[r]_a & A/I \\ R \ar[r]^b \ar[u] & A \ar[u] } $$ where $I \subset A$ is an ideal of square zero, there is a unique $R$-algebra map $a' : S' \to A$ such that $S' \to A \to A/I$ is equal to $S' \to S \to A/I$. \end{lemma} \begin{proof} Choose a set of generators $z_i \in S$, $i \in I$ for $S$ as an $R$-algebra. Let $P = R[\{x_i\}_{i \in I}]$ denote the polynomial ring on generators $x_i$, $i \in I$. Consider the $R$-algebra map $P \to S$ which maps $x_i$ to $z_i$. Let $J = \Ker(P \to S)$. Consider the map $$ \text{d} : J/J^2 \longrightarrow \Omega_{P/R} \otimes_P S $$ see Lemma \ref{lemma-differential-seq}. This is surjective since $\Omega_{S/R} = 0$ by assumption, see Lemma \ref{lemma-characterize-formally-unramified}. Note that $\Omega_{P/R}$ is free on $\text{d}x_i$, and hence the module $\Omega_{P/R} \otimes_P S$ is free over $S$. Thus we may choose a splitting of the surjection above and write $$ J/J^2 = K \oplus \Omega_{P/R} \otimes_P S. $$ Let $J^2 \subset J' \subset J$ be the ideal of $P$ such that $J'/J^2$ is the second summand in the decomposition above. Set $S' = P/J'$. We obtain a short exact sequence $$ 0 \to J/J' \to S' \to S \to 0 $$ and we see that $J/J' \cong K$ is a square zero ideal in $S'$. Hence $$ \xymatrix{ S \ar[r]_1 & S \\ R \ar[r] \ar[u] & S' \ar[u] } $$ is a diagram as above. In fact we claim that this is an initial object in the category of diagrams. Namely, let $(I \subset A, a, b)$ be an arbitrary diagram. We may choose an $R$-algebra map $\beta : P \to A$ such that $$ \xymatrix{ S \ar[r]_1 & S \ar[r]_a & A/I \\ R \ar[r] \ar@/_/[rr]_b \ar[u] & P \ar[u] \ar[r]^\beta & A \ar[u] } $$ is commutative. Now it may not be the case that $\beta(J') = 0$, in other words it may not be true that $\beta$ factors through $S' = P/J'$. But what is clear is that $\beta(J') \subset I$ and since $\beta(J) \subset I$ and $I^2 = 0$ we have $\beta(J^2) = 0$. Thus the ``obstruction'' to finding a morphism from $(J/J' \subset S', 1, R \to S')$ to $(I \subset A, a, b)$ is the corresponding $S$-linear map $\overline{\beta} : J'/J^2 \to I$. The choice in picking $\beta$ lies in the choice of $\beta(x_i)$. A different choice of $\beta$, say $\beta'$, is gotten by taking $\beta'(x_i) = \beta(x_i) + \delta_i$ with $\delta_i \in I$. In this case, for $g \in J'$, we obtain $$ \beta'(g) = \beta(g) + \sum\nolimits_i \delta_i \beta(\frac{\partial g}{\partial x_i}). $$ Since the map $\text{d}|_{J'/J^2} : J'/J^2 \to \Omega_{P/R} \otimes_P S$ given by $g \mapsto \sum_i \frac{\partial g}{\partial x_i}\text{d}x_i \otimes 1$ is an isomorphism by construction, we see that there is a unique choice of $\delta_i \in I$ such that $\beta'(g) = 0$ for all $g \in J'$. (Namely, $\delta_i$ is $-\overline{\beta}(g)$ where $g \in J'/J^2$ is the unique element mapped to $\text{d}x_i \otimes 1$ by $\text{d}|_{J'/J^2}$.) The uniqueness of the solution implies the uniqueness required in the lemma. \end{proof} \noindent In the situation of Lemma \ref{lemma-universal-thickening} the $R$-algebra map $S' \to S$ is unique up to unique isomorphism. \begin{definition} \label{definition-universal-thickening} Let $R \to S$ be a formally unramified ring map. \begin{enumerate} \item The {\it universal first order thickening} of $S$ over $R$ is the surjection of $R$-algebras $S' \to S$ of Lemma \ref{lemma-universal-thickening}. \item The {\it conormal module} of $R \to S$ is the kernel $I$ of the universal first order thickening $S' \to S$, seen as an $S$-module. \end{enumerate} We often denote the conormal module {\it $C_{S/R}$} in this situation. \end{definition} \begin{lemma} \label{lemma-universal-thickening-quotient} Let $I \subset R$ be an ideal of a ring. The universal first order thickening of $R/I$ over $R$ is the surjection $R/I^2 \to R/I$. The conormal module of $R/I$ over $R$ is $C_{(R/I)/R} = I/I^2$. \end{lemma} \begin{proof} Omitted. \end{proof} \begin{lemma} \label{lemma-universal-thickening-localize} Let $A \to B$ be a formally unramified ring map. Let $\varphi : B' \to B$ be the universal first order thickening of $B$ over $A$. \begin{enumerate} \item Let $S \subset A$ be a multiplicative subset. Then $S^{-1}B' \to S^{-1}B$ is the universal first order thickening of $S^{-1}B$ over $S^{-1}A$. In particular $S^{-1}C_{B/A} = C_{S^{-1}B/S^{-1}A}$. \item Let $S \subset B$ be a multiplicative subset. Then $S' = \varphi^{-1}(S)$ is a multiplicative subset in $B'$ and $(S')^{-1}B' \to S^{-1}B$ is the universal first order thickening of $S^{-1}B$ over $A$. In particular $S^{-1}C_{B/A} = C_{S^{-1}B/A}$. \end{enumerate} Note that the lemma makes sense by Lemma \ref{lemma-formally-unramified-localize}. \end{lemma} \begin{proof} With notation and assumptions as in (1). Let $(S^{-1}B)' \to S^{-1}B$ be the universal first order thickening of $S^{-1}B$ over $S^{-1}A$. Note that $S^{-1}B' \to S^{-1}B$ is a surjection of $S^{-1}A$-algebras whose kernel has square zero. Hence by definition we obtain a map $(S^{-1}B)' \to S^{-1}B'$ compatible with the maps towards $S^{-1}B$. Consider any commutative diagram $$ \xymatrix{ B \ar[r] & S^{-1}B \ar[r] & D/I \\ A \ar[r] \ar[u] & S^{-1}A \ar[r] \ar[u] & D \ar[u] } $$ where $I \subset D$ is an ideal of square zero. Since $B'$ is the universal first order thickening of $B$ over $A$ we obtain an $A$-algebra map $B' \to D$. But it is clear that the image of $S$ in $D$ is mapped to invertible elements of $D$, and hence we obtain a compatible map $S^{-1}B' \to D$. Applying this to $D = (S^{-1}B)'$ we see that we get a map $S^{-1}B' \to (S^{-1}B)'$. We omit the verification that this map is inverse to the map described above. \medskip\noindent With notation and assumptions as in (2). Let $(S^{-1}B)' \to S^{-1}B$ be the universal first order thickening of $S^{-1}B$ over $A$. Note that $(S')^{-1}B' \to S^{-1}B$ is a surjection of $A$-algebras whose kernel has square zero. Hence by definition we obtain a map $(S^{-1}B)' \to (S')^{-1}B'$ compatible with the maps towards $S^{-1}B$. Consider any commutative diagram $$ \xymatrix{ B \ar[r] & S^{-1}B \ar[r] & D/I \\ A \ar[r] \ar[u] & A \ar[r] \ar[u] & D \ar[u] } $$ where $I \subset D$ is an ideal of square zero. Since $B'$ is the universal first order thickening of $B$ over $A$ we obtain an $A$-algebra map $B' \to D$. But it is clear that the image of $S'$ in $D$ is mapped to invertible elements of $D$, and hence we obtain a compatible map $(S')^{-1}B' \to D$. Applying this to $D = (S^{-1}B)'$ we see that we get a map $(S')^{-1}B' \to (S^{-1}B)'$. We omit the verification that this map is inverse to the map described above. \end{proof} \begin{lemma} \label{lemma-differentials-universal-thickening} Let $R \to A \to B$ be ring maps. Assume $A \to B$ formally unramified. Let $B' \to B$ be the universal first order thickening of $B$ over $A$. Then $B'$ is formally unramified over $A$, and the canonical map $\Omega_{A/R} \otimes_A B \to \Omega_{B'/R} \otimes_{B'} B$ is an isomorphism. \end{lemma} \begin{proof} We are going to use the construction of $B'$ from the proof of Lemma \ref{lemma-universal-thickening} although in principle it should be possible to deduce these results formally from the definition. Namely, we choose a presentation $B = P/J$, where $P = A[x_i]$ is a polynomial ring over $A$. Next, we choose elements $f_i \in J$ such that $\text{d}f_i = \text{d}x_i \otimes 1$ in $\Omega_{P/A} \otimes_P B$. Having made these choices we have $B' = P/J'$ with $J' = (f_i) + J^2$, see proof of Lemma \ref{lemma-universal-thickening}. \medskip\noindent Consider the canonical exact sequence $$ J'/(J')^2 \to \Omega_{P/A} \otimes_P B' \to \Omega_{B'/A} \to 0 $$ see Lemma \ref{lemma-differential-seq}. By construction the classes of the $f_i \in J'$ map to elements of the module $\Omega_{P/A} \otimes_P B'$ which generate it modulo $J/J'$ by construction. Since $J/J'$ is a nilpotent ideal, we see that these elements generate the module altogether (by Nakayama's Lemma \ref{lemma-NAK}). This proves that $\Omega_{B'/A} = 0$ and hence that $B'$ is formally unramified over $A$, see Lemma \ref{lemma-characterize-formally-unramified}. \medskip\noindent Since $P$ is a polynomial ring over $A$ we have $\Omega_{P/R} = \Omega_{A/R} \otimes_A P \oplus \bigoplus P\text{d}x_i$. We are going to use this decomposition. Consider the following exact sequence $$ J'/(J')^2 \to \Omega_{P/R} \otimes_P B' \to \Omega_{B'/R} \to 0 $$ see Lemma \ref{lemma-differential-seq}. We may tensor this with $B$ and obtain the exact sequence $$ J'/(J')^2 \otimes_{B'} B \to \Omega_{P/R} \otimes_P B \to \Omega_{B'/R} \otimes_{B'} B \to 0. $$ If we remember that $J' = (f_i) + J^2$ then we see that the first arrow annihilates the submodule $J^2/(J')^2$. In terms of the direct sum decomposition $\Omega_{P/R} \otimes_P B = \Omega_{A/R} \otimes_A B \oplus \bigoplus B\text{d}x_i $ given above, we see that the image of the first arrow projects isomorphically onto the summand $\bigoplus B\text{d}x_i$. Hence what is left of this exact sequence is an isomorphism $\Omega_{A/R} \otimes_A B \to \Omega_{B'/R} \otimes_{B'} B$ as desired. \end{proof} \section{Formally \'etale maps} \label{section-formally-etale} % BEGIN ALGEBRA EDITORIAL ROUTE section-formally-etale \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-formally-etale}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-formally-etale \begin{definition} \label{definition-formally-etale} Let $R \to S$ be a ring map. We say $S$ is {\it formally \'etale over $R$} if for every commutative solid diagram $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & A/I \\ R \ar[r] \ar[u] & A \ar[u] } $$ where $I \subset A$ is an ideal of square zero, there exists a unique dotted arrow making the diagram commute. \end{definition} \noindent Clearly a ring map is formally \'etale if and only if it is both formally smooth and formally unramified. \begin{lemma} \label{lemma-base-change-formally-etale} Let $R \to S$ be a formally \'etale map. Let $R \to R'$ be any ring map. Then the base change $S' = R' \otimes_R S$ is formally \'etale over $R'$. \end{lemma} \begin{proof} Combine Lemmas \ref{lemma-base-change-fs} and \ref{lemma-base-change-formally-unramified}. \end{proof} \begin{lemma} \label{lemma-formally-etale-etale} Let $R \to S$ be a ring map of finite presentation. The following are equivalent: \begin{enumerate} \item $R \to S$ is formally \'etale, \item $R \to S$ is \'etale. \end{enumerate} \end{lemma} \begin{proof} Assume that $R \to S$ is formally \'etale. Then $R \to S$ is smooth by Proposition \ref{proposition-smooth-formally-smooth}. By Lemma \ref{lemma-characterize-formally-unramified} we have $\Omega_{S/R} = 0$. Hence $R \to S$ is \'etale by definition. \medskip\noindent Assume that $R \to S$ is \'etale. Then $R \to S$ is formally smooth by Proposition \ref{proposition-smooth-formally-smooth}. By Lemma \ref{lemma-characterize-formally-unramified} it is formally unramified. Hence $R \to S$ is formally \'etale. \end{proof} \begin{lemma} \label{lemma-colimit-formally-etale} Let $R$ be a ring. Let $I$ be a directed set. Let $(S_i, \varphi_{ii'})$ be a system of $R$-algebras over $I$. If each $R \to S_i$ is formally \'etale, then $S = \colim_{i \in I} S_i$ is formally \'etale over $R$. \end{lemma} \begin{proof} Consider a diagram as in Definition \ref{definition-formally-etale}. By assumption we get unique $R$-algebra maps $S_i \to A$ lifting the compositions $S_i \to S \to A/I$. Hence these are compatible with the transition maps $\varphi_{ii'}$ and define a lift $S \to A$. This proves existence. The uniqueness is clear by restricting to each $S_i$. \end{proof} \begin{lemma} \label{lemma-localization-formally-etale} Let $R$ be a ring. Let $S \subset R$ be any multiplicative subset. Then the ring map $R \to S^{-1}R$ is formally \'etale. \end{lemma} \begin{proof} Let $I \subset A$ be an ideal of square zero. What we are saying here is that given a ring map $\varphi : R \to A$ such that $\varphi(f) \mod I$ is invertible for all $f \in S$ we have also that $\varphi(f)$ is invertible in $A$ for all $f \in S$. This is true because $A^*$ is the inverse image of $(A/I)^*$ under the canonical map $A \to A/I$. \end{proof} \begin{lemma} \label{lemma-formally-etale-lift-infinitesimal} Let $R \to S$ be a ring map. Let $J \subset S$ be an ideal such that $R \to S/J$ is surjective; let $I \subset R$ be the kernel. If $R \to S$ is formally \'etale, then $R/I^n \to S/J^n$ is an isomorphism for all $n$ and $\bigoplus I^n/I^{n + 1} \to \bigoplus J^n/J^{n + 1}$ is an isomorphism of graded rings. \end{lemma} \begin{proof} Using the lifting property inductively we find dotted arrows $$ \xymatrix{ S \ar[r] \ar@{-->}[rd] & S/J = R/I \\ R \ar[r] \ar[u] & R/I^2 \ar[u] } \quad \xymatrix{ S \ar[r] \ar@{-->}[rd] & R/I^2 \\ R \ar[r] \ar[u] & R/I^3 \ar[u] } \quad \xymatrix{ S \ar[r] \ar@{-->}[rd] & R/I^3 \\ R \ar[r] \ar[u] & R/I^4 \ar[u] }. $$ The corresponding maps $S/J^n \to R/I^n$ are isomorphisms since the compositions $S/J^n \to R/I^n \to S/J^n$ are (inductively) the identity by the uniqueness in the lifting property of formally \'etale ring maps. \end{proof} \begin{lemma} \label{lemma-formally-etale-omega} Let $R \to S \to S'$ be ring maps. Let $J$, resp.\ $J'$ be the kernel of the multiplication map $S \otimes_R S \to S$, resp.\ $S' \otimes_R S' \to S'$. If $S \to S'$ is formally \'etale, then the map $$ S' \otimes_S \left((S \otimes_R S)/J^{k + 1}\right) \longrightarrow (S' \otimes_R S')/(J')^{k + 1} $$ is an isomorphism for all $k \geq 0$. In particular, the map $S' \otimes_S \Omega_{S/R} \to \Omega_{S'/R}$ is an isomorphism. \end{lemma} \begin{proof} Observe that $S' \otimes_S (S \otimes_R S) = S' \otimes_R S$ and the ideal $J$ generates in $S' \otimes_R S$ the kernel $I$ of the surjection $S' \otimes_R S \to S'$. Whence the left hand side is equal to $S' \otimes_R S/I^{k + 1}$. The map $S' \otimes_R S \to S' \otimes_R S'$ is formally \'etale by Lemma \ref{lemma-base-change-formally-etale}. Thus we conclude that the displayed arrow in the statement of the lemma is an isomorphism by Lemma \ref{lemma-formally-etale-lift-infinitesimal}. The final assertion follows from this and the fact that $\Omega_{S/R} = J/J^2$ and $\Omega_{S'/R} = J'/(J')^2$ by Lemma \ref{lemma-differentials-diagonal}. \end{proof} \begin{lemma} \label{lemma-formally-etale-principal-parts} Let $R \to S \to S'$ be ring maps with $S \to S'$ formally \'etale (for example \'etale). Let $M$ be an $S$-module. Set $M' = S' \otimes_S M$. Then we have $$ S' \otimes_S P^k_{S/R}(M) = P^k_{S'/R}(M'). $$ It follows that for any $S$-module $N$ and any finite order differential operator $D : M \to N$ there exists a unique extension $D' : M' \to S' \otimes_S N$ of $D$ to a differential operator (of the same or lesser order). \end{lemma} \begin{proof} Let $J$ and $J'$ be as in the statement of Lemma \ref{lemma-formally-etale-omega}. Then we have \begin{align*} S' \otimes_S P^k_{S/R}(M) & = S' \otimes_S \left((S \otimes_R M)/J^{k + 1}(S \otimes_R M)\right) \\ & = S' \otimes_S \left((S \otimes_R S)/J^{k + 1}\right) \otimes_S M \\ & = \left(S' \otimes_R S'/(J')^{k + 1}\right) \otimes_S M \\ & = \left(S' \otimes_R S'/(J')^{k + 1}\right) \otimes_{S'} M' \\ & = S' \otimes_R M'/(J')^{k + 1}(S' \otimes_R M') \\ & = P^k_{S'/R}(M') \end{align*} The first and the last equalities are from Lemma \ref{lemma-principal-parts-diagonal}. The third equality is Lemma \ref{lemma-formally-etale-omega}. The final assertion holds because if $D$ corresponds to the linear map $\gamma : P^k_{S/R}(M) \to N$, then we can let $D' : M' \to S' \otimes_S N$ correspond to the linear map $1 \otimes \gamma : S' \otimes_S P^k_{S/R}(M) \to S' \otimes_S N$. \end{proof} \begin{remark} \label{remark-formally-etale-differential-operators} Let $R \to S \to S'$ be ring maps with $S \to S'$ formally \'etale (for example \'etale). Let $M_i$, $i = 1, 2, 3$ be $S$-modules and let $D_i : M_i \to M_{i + 1}$, $i = 1, 2$ be differential operators of finite order. Then if $D'_i : M'_i \to M'_{i + 1}$, $i = 1, 2$ are the extensions of $D_i$ to $M'_i = S' \otimes_S M_i$ as in Lemma \ref{lemma-formally-etale-principal-parts}, then $D'_2 \circ D'_1$ is the extension of $D_2 \circ D_1$. In particular, if $M$ is an $S$-module, then $M' = S' \otimes_S M$ is a module over the (possibly noncommutative) $R$-algebra $\text{Diff}_{S/R}(M, M)$. \end{remark} \section{Unramified ring maps} \label{section-unramified} % BEGIN ALGEBRA EDITORIAL ROUTE section-unramified \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-unramified}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-unramified \noindent Our definition of an unramified ring map is the one from \cite{Henselian}. What we call a G-unramified ring map is what EGA calls an unramified map. \begin{definition} \label{definition-unramified} Let $R \to S$ be a ring map. \begin{enumerate} \item We say $R \to S$ is {\it unramified} if $R \to S$ is of finite type and $\Omega_{S/R} = 0$. \item We say $R \to S$ is {\it G-unramified} if $R \to S$ is of finite presentation and $\Omega_{S/R} = 0$. \item Given a prime $\mathfrak q$ of $S$ we say that $S$ is {\it unramified at $\mathfrak q$} if there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is unramified. \item Given a prime $\mathfrak q$ of $S$ we say that $S$ is {\it G-unramified at $\mathfrak q$} if there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is G-unramified. \end{enumerate} \end{definition} \noindent Of course a G-unramified map is unramified. \begin{lemma} \label{lemma-formally-unramified-unramified} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is formally unramified and of finite type, and \item $R \to S$ is unramified. \end{enumerate} Moreover, also the following are equivalent \begin{enumerate} \item $R \to S$ is formally unramified and of finite presentation, and \item $R \to S$ is G-unramified. \end{enumerate} \end{lemma} \begin{proof} Follows from Lemma \ref{lemma-characterize-formally-unramified} and the definitions. \end{proof} \begin{lemma} \label{lemma-unramified} Properties of unramified and G-unramified ring maps. \begin{enumerate} \item The base change of an unramified ring map is unramified. The base change of a G-unramified ring map is G-unramified. \item The composition of unramified ring maps is unramified. The composition of G-unramified ring maps is G-unramified. \item Any principal localization $R \to R_f$ is G-unramified and unramified. \item If $I \subset R$ is an ideal, then $R \to R/I$ is unramified. If $I \subset R$ is a finitely generated ideal, then $R \to R/I$ is G-unramified. \item An \'etale ring map is G-unramified and unramified. \item If $R \to S$ is of finite type (resp.\ finite presentation), $\mathfrak q \subset S$ is a prime and $(\Omega_{S/R})_{\mathfrak q} = 0$, then $R \to S$ is unramified (resp.\ G-unramified) at $\mathfrak q$. \item If $R \to S$ is of finite type (resp.\ finite presentation), $\mathfrak q \subset S$ is a prime and $\Omega_{S/R} \otimes_S \kappa(\mathfrak q) = 0$, then $R \to S$ is unramified (resp.\ G-unramified) at $\mathfrak q$. \item If $R \to S$ is of finite type (resp.\ finite presentation), $\mathfrak q \subset S$ is a prime lying over $\mathfrak p \subset R$ and $(\Omega_{S \otimes_R \kappa(\mathfrak p)/\kappa(\mathfrak p)})_{\mathfrak q} = 0$, then $R \to S$ is unramified (resp.\ G-unramified) at $\mathfrak q$. \item If $R \to S$ is of finite type (resp.\ finite presentation), $\mathfrak q \subset S$ is a prime lying over $\mathfrak p \subset R$ and $(\Omega_{S \otimes_R \kappa(\mathfrak p)/\kappa(\mathfrak p)}) \otimes_{S \otimes_R \kappa(\mathfrak p)} \kappa(\mathfrak q) = 0$, then $R \to S$ is unramified (resp.\ G-unramified) at $\mathfrak q$. \item If $R \to S$ is a ring map, $g_1, \ldots, g_m \in S$ generate the unit ideal and $R \to S_{g_j}$ is unramified (resp.\ G-unramified) for $j = 1, \ldots, m$, then $R \to S$ is unramified (resp.\ G-unramified). \item If $R \to S$ is a ring map which is unramified (resp.\ G-unramified) at every prime of $S$, then $R \to S$ is unramified (resp.\ G-unramified). \item If $R \to S$ is G-unramified, then there exists a finite type $\mathbf{Z}$-algebra $R_0$ and a G-unramified ring map $R_0 \to S_0$ and a ring map $R_0 \to R$ such that $S = R \otimes_{R_0} S_0$. \item If $R \to S$ is unramified, then there exists a finite type $\mathbf{Z}$-algebra $R_0$ and an unramified ring map $R_0 \to S_0$ and a ring map $R_0 \to R$ such that $S$ is a quotient of $R \otimes_{R_0} S_0$. \end{enumerate} \end{lemma} \begin{proof} We prove each point, in order. \medskip\noindent Ad (1). Follows from Lemmas \ref{lemma-differentials-base-change} and \ref{lemma-base-change-finiteness}. \medskip\noindent Ad (2). Follows from Lemmas \ref{lemma-exact-sequence-differentials} and \ref{lemma-compose-finite-type}. \medskip\noindent Ad (3). Follows by direct computation of $\Omega_{R_f/R}$ which we omit. \medskip\noindent Ad (4). We have $\Omega_{(R/I)/R} = 0$, see Lemma \ref{lemma-trivial-differential-surjective}, and the ring map $R \to R/I$ is of finite type. If $I$ is a finitely generated ideal then $R \to R/I$ is of finite presentation. \medskip\noindent Ad (5). See discussion following Definition \ref{definition-etale}. \medskip\noindent Ad (6). In this case $\Omega_{S/R}$ is a finite $S$-module (see Lemma \ref{lemma-differentials-finitely-generated}) and hence there exists a $g \in S$, $g \not \in \mathfrak q$ such that $(\Omega_{S/R})_g = 0$. By Lemma \ref{lemma-differentials-localize} this means that $\Omega_{S_g/R} = 0$ and hence $R \to S_g$ is unramified as desired. \medskip\noindent Ad (7). Use Nakayama's lemma (Lemma \ref{lemma-NAK}) to see that the condition is equivalent to the condition of (6). \medskip\noindent Ad (8) and (9). These are equivalent in the same manner that (6) and (7) are equivalent. Moreover $\Omega_{S \otimes_R \kappa(\mathfrak p)/\kappa(\mathfrak p)} = \Omega_{S/R} \otimes_S (S \otimes_R \kappa(\mathfrak p))$ by Lemma \ref{lemma-differentials-base-change}. Hence we see that (9) is equivalent to (7) since the $\kappa(\mathfrak q)$ vector spaces in both are canonically isomorphic. \medskip\noindent Ad (10). Follows from Lemmas \ref{lemma-cover} and \ref{lemma-differentials-localize}. \medskip\noindent Ad (11). Follows from (10), the definition of being unramified (resp.\ G-unramified) at a prime, and quasi-compactness of $\Spec(S)$. \medskip\noindent Ad (12). Write $S = R[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$. As $\Omega_{S/R} = 0$ we can write $$ \text{d}x_i = \sum h_{ij}\text{d}g_j + \sum a_{ijk}g_j\text{d}x_k $$ in $\Omega_{R[x_1, \ldots, x_n]/R}$ for some $h_{ij}, a_{ijk} \in R[x_1, \ldots, x_n]$. Choose a finitely generated $\mathbf{Z}$-subalgebra $R_0 \subset R$ containing all the coefficients of the polynomials $g_i, h_{ij}, a_{ijk}$. Set $S_0 = R_0[x_1, \ldots, x_n]/(g_1, \ldots, g_m)$. This works. \medskip\noindent Ad (13). Write $S = R[x_1, \ldots, x_n]/I$. As $\Omega_{S/R} = 0$ we can write $$ \text{d}x_i = \sum h_{ij}\text{d}g_{ij} + \sum g'_{ik}\text{d}x_k $$ in $\Omega_{R[x_1, \ldots, x_n]/R}$ for some $h_{ij} \in R[x_1, \ldots, x_n]$ and $g_{ij}, g'_{ik} \in I$. Choose a finitely generated $\mathbf{Z}$-subalgebra $R_0 \subset R$ containing all the coefficients of the polynomials $g_{ij}, h_{ij}, g'_{ik}$. Set $S_0 = R_0[x_1, \ldots, x_n]/(g_{ij}, g'_{ik})$. This works. \end{proof} \begin{lemma} \label{lemma-diagonal-unramified} Let $R \to S$ be a ring map. If $R \to S$ is unramified, then there exists an idempotent $e \in S \otimes_R S$ such that $S \otimes_R S \to S$ is isomorphic to $S \otimes_R S \to (S \otimes_R S)_e$. \end{lemma} \begin{proof} Let $J = \Ker(S \otimes_R S \to S)$. By assumption $J/J^2 = 0$, see Lemma \ref{lemma-differentials-diagonal}. Since $S$ is of finite type over $R$ we see that $J$ is finitely generated, namely by $x_i \otimes 1 - 1 \otimes x_i$, where $x_i$ generate $S$ over $R$. We win by Lemma \ref{lemma-ideal-is-squared-union-connected}. \end{proof} \begin{lemma} \label{lemma-unramified-at-prime} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p$ in $R$. If $S/R$ is unramified at $\mathfrak q$ then \begin{enumerate} \item we have $\mathfrak p S_{\mathfrak q} = \mathfrak qS_{\mathfrak q}$, which is the maximal ideal of the local ring $S_{\mathfrak q}$, and \item the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite separable. \end{enumerate} \end{lemma} \begin{proof} We may first replace $S$ by $S_g$ for some $g \in S$, $g \not \in \mathfrak q$ and assume that $R \to S$ is unramified. The base change $S \otimes_R \kappa(\mathfrak p)$ is unramified over $\kappa(\mathfrak p)$ by Lemma \ref{lemma-unramified}. By Lemma \ref{lemma-characterize-smooth-over-field} it is smooth hence \'etale over $\kappa(\mathfrak p)$. Hence $F = S \otimes_R \kappa(\mathfrak p)$ is a finite product of finite separable field extensions of $\kappa(\mathfrak p)$, see Lemma \ref{lemma-etale-over-field}. Using the notation and results of Remark \ref{remark-local-ring-fibre} we find that $F_{\overline{\mathfrak q}} = S_\mathfrak q/\mathfrak pS_\mathfrak q$ is equal to $\kappa(\mathfrak q)$. This implies the lemma. \end{proof} \begin{lemma} \label{lemma-unramified-quasi-finite} Let $R \to S$ be a finite type ring map. Let $\mathfrak q$ be a prime of $S$. If $R \to S$ is unramified at $\mathfrak q$ then $R \to S$ is quasi-finite at $\mathfrak q$. In particular, an unramified ring map is quasi-finite. \end{lemma} \begin{proof} An unramified ring map is of finite type. Thus it is clear that the second statement follows from the first. To see the first statement apply the characterization of Lemma \ref{lemma-isolated-point-fibre} part (2) using Lemma \ref{lemma-unramified-at-prime}. \end{proof} \begin{lemma} \label{lemma-characterize-unramified} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over a prime $\mathfrak p$ of $R$. If \begin{enumerate} \item $R \to S$ is of finite type, \item $\mathfrak p S_{\mathfrak q}$ is the maximal ideal of the local ring $S_{\mathfrak q}$, and \item the field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite separable, \end{enumerate} then $R \to S$ is unramified at $\mathfrak q$. \end{lemma} \begin{proof} By Lemma \ref{lemma-unramified} (8) it suffices to show that $\Omega_{S \otimes_R \kappa(\mathfrak p) / \kappa(\mathfrak p)}$ is zero when localized at $\mathfrak q$. Hence we may replace $S$ by $S \otimes_R \kappa(\mathfrak p)$ and $R$ by $\kappa(\mathfrak p)$. In other words, we may assume that $R = k$ is a field and $S$ is a finite type $k$-algebra. In this case the hypotheses imply that $S_{\mathfrak q} \cong \kappa(\mathfrak q)$. Thus $(\Omega_{S/k})_{\mathfrak q} = \Omega_{S_\mathfrak q/k} = \Omega_{\kappa(\mathfrak q)/k}$ is zero as desired (the first equality is Lemma \ref{lemma-differentials-localize}). \end{proof} \begin{lemma} \label{lemma-etale-flat-unramified-finite-presentation} Let $R \to S$ be a ring map. The following are equivalent \begin{enumerate} \item $R \to S$ is \'etale, \item $R \to S$ is flat and G-unramified, and \item $R \to S$ is flat, unramified, and of finite presentation. \end{enumerate} \end{lemma} \begin{proof} Parts (2) and (3) are equivalent by definition. The implication (1) $\Rightarrow$ (3) follows from the fact that \'etale ring maps are of finite presentation, Lemma \ref{lemma-etale} (flatness of \'etale maps), and Lemma \ref{lemma-unramified} (\'etale maps are unramified). Conversely, the characterization of \'etale ring maps in Lemma \ref{lemma-characterize-etale} and the structure of unramified ring maps in Lemma \ref{lemma-unramified-at-prime} show that (3) implies (1). (This uses that $R \to S$ is \'etale if $R \to S$ is \'etale at every prime $\mathfrak q \subset S$, see Lemma \ref{lemma-etale}.) \end{proof} \begin{lemma} \label{lemma-characterize-etale-over-polynomial-ring} Let $k$ be a field. Let $$ \varphi : k[x_1, \ldots, x_n] \to A, \quad x_i \longmapsto a_i $$ be a finite type ring map. Then $\varphi$ is \'etale if and only if we have the following two conditions: (a) the local rings of $A$ at maximal ideals have dimension $n$, and (b) the elements $\text{d}(a_1), \ldots, \text{d}(a_n)$ generate $\Omega_{A/k}$ as an $A$-module. \end{lemma} \begin{proof} Assume (a) and (b). Condition (b) implies that $\Omega_{A/k[x_1, \ldots, x_n]} = 0$ and hence $\varphi$ is unramified. Thus it suffices to prove that $\varphi$ is flat, see Lemma \ref{lemma-etale-flat-unramified-finite-presentation}. Let $\mathfrak m \subset A$ be a maximal ideal. Set $X = \Spec(A)$ and denote $x \in X$ the closed point corresponding to $\mathfrak m$. Then $\dim(A_\mathfrak m)$ is $\dim_x X$, see Lemma \ref{lemma-dimension-closed-point-finite-type-field}. Thus by Lemma \ref{lemma-characterize-smooth-over-field} we see that if (a) and (b) hold, then $A_\mathfrak m$ is a regular local ring for every maximal ideal $\mathfrak m$. Then $k[x_1, \ldots, x_n]_{\varphi^{-1}(\mathfrak m)} \to A_\mathfrak m$ is flat by Lemma \ref{lemma-CM-over-regular-flat} (and the fact that a regular local ring is CM, see Lemma \ref{lemma-regular-ring-CM}). Thus $\varphi$ is flat by Lemma \ref{lemma-flat-localization}. \medskip\noindent Assume $\varphi$ is \'etale. Then $\Omega_{A/k[x_1, \ldots, x_n]} = 0$ and hence (b) holds. On the other hand, \'etale ring maps are flat (Lemma \ref{lemma-etale}) and quasi-finite (Lemma \ref{lemma-etale-quasi-finite}). Hence for every maximal ideal $\mathfrak m$ of $A$ we may apply Lemma \ref{lemma-dimension-base-fibre-equals-total} to $k[x_1, \ldots, x_n]_{\varphi^{-1}(\mathfrak m)} \to A_\mathfrak m$ to see that $\dim(A_\mathfrak m) = n$ and hence (a) holds. \end{proof} \section{Local structure of unramified ring maps} \label{section-local-structure-unramified} % BEGIN ALGEBRA EDITORIAL ROUTE section-local-structure-unramified \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-local-structure-unramified}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-local-structure-unramified \noindent An unramified morphism is locally (in a suitable sense) the composition of a closed immersion and an \'etale morphism. The algebraic underpinnings of this fact are discussed in this section. \begin{proposition} \label{proposition-unramified-locally-standard} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime. If $R \to S$ is unramified at $\mathfrak q$, then there exist \begin{enumerate} \item a $g \in S$, $g \not \in \mathfrak q$, \item a standard \'etale ring map $R \to S'$, and \item a surjective $R$-algebra map $S' \to S_g$. \end{enumerate} \end{proposition} \begin{proof} This proof is the ``same'' as the proof of Proposition \ref{proposition-etale-locally-standard}. The proof is a little roundabout and there may be ways to shorten it. \medskip\noindent Step 1. By Definition \ref{definition-unramified} there exists a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is unramified. Thus we may assume that $S$ is unramified over $R$. \medskip\noindent Step 2. By Lemma \ref{lemma-unramified} there exists an unramified ring map $R_0 \to S_0$ with $R_0$ of finite type over $\mathbf{Z}$, and a ring map $R_0 \to R$ such that $S$ is a quotient of $R \otimes_{R_0} S_0$. Denote $\mathfrak q_0$ the prime of $S_0$ corresponding to $\mathfrak q$. If we show the result for $(R_0 \to S_0, \mathfrak q_0)$ then the result follows for $(R \to S, \mathfrak q)$ by base change. Hence we may assume that $R$ is Noetherian. \medskip\noindent Step 3. Note that $R \to S$ is quasi-finite by Lemma \ref{lemma-unramified-quasi-finite}. By Lemma \ref{lemma-quasi-finite-open-integral-closure} there exists a finite ring map $R \to S'$, an $R$-algebra map $S' \to S$, an element $g' \in S'$ whose image in $S$ does not belong to $\mathfrak q$, such that $S' \to S$ induces an isomorphism $S'_{g'} \cong S_{g'}$. (Note that $S'$ may not be unramified over $R$.) Thus we may assume that (a) $R$ is Noetherian, (b) $R \to S$ is finite and (c) $R \to S$ is unramified at $\mathfrak q$ (but no longer necessarily unramified at all primes). \medskip\noindent Step 4. Let $\mathfrak p \subset R$ be the prime corresponding to $\mathfrak q$. Consider the fibre ring $S \otimes_R \kappa(\mathfrak p)$. This is a finite algebra over $\kappa(\mathfrak p)$. Hence it is Artinian (see Lemma \ref{lemma-finite-dimensional-algebra}) and so a finite product of local rings $$ S \otimes_R \kappa(\mathfrak p) = \prod\nolimits_{i = 1}^n A_i $$ see Proposition \ref{proposition-dimension-zero-ring}. One of the factors, say $A_1$, is the local ring $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ which is isomorphic to $\kappa(\mathfrak q)$, see Lemma \ref{lemma-unramified-at-prime}. The other factors correspond to the other primes, say $\mathfrak q_2, \ldots, \mathfrak q_n$ of $S$ lying over $\mathfrak p$. \medskip\noindent Step 5. We may choose a nonzero element $\alpha \in \kappa(\mathfrak q)$ which generates the finite separable field extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ (so even if the field extension is trivial we do not allow $\alpha = 0$). Note that for any $\lambda \in \kappa(\mathfrak p)^*$ the element $\lambda \alpha$ also generates $\kappa(\mathfrak q)$ over $\kappa(\mathfrak p)$. Consider the element $$ \overline{t} = (\alpha, 0, \ldots, 0) \in \prod\nolimits_{i = 1}^n A_i = S \otimes_R \kappa(\mathfrak p). $$ After possibly replacing $\alpha$ by $\lambda \alpha$ as above we may assume that $\overline{t}$ is the image of $t \in S$. Let $I \subset R[x]$ be the kernel of the $R$-algebra map $R[x] \to S$ which maps $x$ to $t$. Set $S' = R[x]/I$, so $S' \subset S$. Here is a diagram $$ \xymatrix{ R[x] \ar[r] & S' \ar[r] & S \\ R \ar[u] \ar[ru] \ar[rru] & & } $$ By construction the primes $\mathfrak q_j$, $j \geq 2$ of $S$ all lie over the prime $(\mathfrak p, x)$ of $R[x]$, whereas the prime $\mathfrak q$ lies over a different prime of $R[x]$ because $\alpha \not = 0$. \medskip\noindent Step 6. Denote $\mathfrak q' \subset S'$ the prime of $S'$ corresponding to $\mathfrak q$. By the above $\mathfrak q$ is the only prime of $S$ lying over $\mathfrak q'$. Thus we see that $S_{\mathfrak q} = S_{\mathfrak q'}$, see Lemma \ref{lemma-unique-prime-over-localize-below} (we have going up for $S' \to S$ by Lemma \ref{lemma-integral-going-up} since $S' \to S$ is finite as $R \to S$ is finite). It follows that $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is finite and injective as the localization of the finite injective ring map $S' \to S$. Consider the maps of local rings $$ R_{\mathfrak p} \to S'_{\mathfrak q'} \to S_{\mathfrak q} $$ The second map is finite and injective. We have $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q} = \kappa(\mathfrak q)$, see Lemma \ref{lemma-unramified-at-prime}. Hence a fortiori $S_{\mathfrak q}/\mathfrak q'S_{\mathfrak q} = \kappa(\mathfrak q)$. Since $$ \kappa(\mathfrak p) \subset \kappa(\mathfrak q') \subset \kappa(\mathfrak q) $$ and since $\alpha$ is in the image of $\kappa(\mathfrak q')$ in $\kappa(\mathfrak q)$ we conclude that $\kappa(\mathfrak q') = \kappa(\mathfrak q)$. Hence by Nakayama's Lemma \ref{lemma-NAK} applied to the $S'_{\mathfrak q'}$-module map $S'_{\mathfrak q'} \to S_{\mathfrak q}$, the map $S'_{\mathfrak q'} \to S_{\mathfrak q}$ is surjective. In other words, $S'_{\mathfrak q'} \cong S_{\mathfrak q}$. \medskip\noindent Step 7. By Lemma \ref{lemma-isomorphic-local-rings} there exist $g \in S$, $g \not \in \mathfrak q$ and $g' \in S'$, $g' \not \in \mathfrak q'$ such that $S'_{g'} \cong S_g$. As $R$ is Noetherian the ring $S'$ is finite over $R$ because it is an $R$-submodule of the finite $R$-module $S$. Hence after replacing $S$ by $S'$ we may assume that (a) $R$ is Noetherian, (b) $S$ is finite over $R$, (c) $S$ is unramified over $R$ at $\mathfrak q$, and (d) $S = R[x]/I$. \medskip\noindent Step 8. Consider the ring $S \otimes_R \kappa(\mathfrak p) = \kappa(\mathfrak p)[x]/\overline{I}$ where $\overline{I} = I \cdot \kappa(\mathfrak p)[x]$ is the ideal generated by $I$ in $\kappa(\mathfrak p)[x]$. As $\kappa(\mathfrak p)[x]$ is a PID we know that $\overline{I} = (\overline{h})$ for some monic $\overline{h} \in \kappa(\mathfrak p)[x]$. After replacing $\overline{h}$ by $\lambda \cdot \overline{h}$ for some $\lambda \in \kappa(\mathfrak p)^*$ we may assume that $\overline{h}$ is the image of some $h \in I$. (The problem is that we do not know if we may choose $h$ monic.) Also, as in Step 4 we know that $S \otimes_R \kappa(\mathfrak p) = A_1 \times \ldots \times A_n$ with $A_1 = \kappa(\mathfrak q)$ a finite separable extension of $\kappa(\mathfrak p)$ and $A_2, \ldots, A_n$ local. This implies that $$ \overline{h} = \lambda \overline{h}_1 \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} $$ for certain pairwise coprime irreducible monic polynomials $\overline{h}_i \in \kappa(\mathfrak p)[x]$ and certain $e_2, \ldots, e_n \geq 1$; set $e_1 = 1$. Here the numbering is chosen so that $A_i = \kappa(\mathfrak p)[x]/(\overline{h}_i^{e_i})$ as $\kappa(\mathfrak p)[x]$-algebras. Note that $\overline{h}_1$ is the minimal polynomial of $\alpha \in \kappa(\mathfrak q)$ and hence is a separable polynomial (its derivative is prime to itself). \medskip\noindent Step 9. Let $m \in I$ be a monic element; such an element exists because the ring extension $R \to R[x]/I$ is finite hence integral. Denote $\overline{m}$ the image in $\kappa(\mathfrak p)[x]$. We may factor $$ \overline{m} = \overline{k} \overline{h}_1^{d_1} \overline{h}_2^{d_2} \ldots \overline{h}_n^{d_n} $$ for some $d_1 \geq 1$, $d_j \geq e_j$, $j = 2, \ldots, n$ and $\overline{k} \in \kappa(\mathfrak p)[x]$ prime to all the $\overline{h}_i$. Set $f = m^l + h$ where $l \deg(m) > \deg(h)$, and $l \geq 2$. Then $f$ is monic as a polynomial over $R$. Also, the image $\overline{f}$ of $f$ in $\kappa(\mathfrak p)[x]$ factors as $$ \overline{f} = \lambda \overline{h}_1 \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} + \overline{k}^l \overline{h}_1^{ld_1} \overline{h}_2^{ld_2} \ldots \overline{h}_n^{ld_n} = \overline{h}_1(\lambda \overline{h}_2^{e_2} \ldots \overline{h}_n^{e_n} + \overline{k}^l \overline{h}_1^{ld_1 - 1} \overline{h}_2^{ld_2} \ldots \overline{h}_n^{ld_n}) = \overline{h}_1 \overline{w} $$ with $\overline{w}$ a polynomial relatively prime to $\overline{h}_1$. Set $g = f'$ (the derivative with respect to $x$). \medskip\noindent Step 10. The ring map $R[x] \to S = R[x]/I$ has the properties: (1) it maps $f$ to zero, and (2) it maps $g$ to an element of $S \setminus \mathfrak q$. The first assertion is clear since $f$ is an element of $I$. For the second assertion we just have to show that $g$ does not map to zero in $\kappa(\mathfrak q) = \kappa(\mathfrak p)[x]/(\overline{h}_1)$. The image of $g$ in $\kappa(\mathfrak p)[x]$ is the derivative of $\overline{f}$. Thus (2) is clear because $$ \overline{g} = \frac{\text{d}\overline{f}}{\text{d}x} = \overline{w}\frac{\text{d}\overline{h}_1}{\text{d}x} + \overline{h}_1\frac{\text{d}\overline{w}}{\text{d}x}, $$ $\overline{w}$ is prime to $\overline{h}_1$ and $\overline{h}_1$ is separable. \medskip\noindent Step 11. We conclude that $\varphi : R[x]/(f) \to S$ is a surjective ring map, $R[x]_g/(f)$ is \'etale over $R$ (because it is standard \'etale, see Lemma \ref{lemma-standard-etale}) and $\varphi(g) \not \in \mathfrak q$. Thus the map $(R[x]/(f))_g \to S_{\varphi(g)}$ is the desired surjection. \end{proof} \begin{lemma} \label{lemma-etale-makes-unramified-closed-at-prime} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over $\mathfrak p \subset R$. Assume that $R \to S$ is of finite type and unramified at $\mathfrak q$. Then there exist \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$. \item a product decomposition $$ R' \otimes_R S = A \times B $$ \end{enumerate} with the following properties \begin{enumerate} \item $R' \to A$ is surjective, and \item $\mathfrak p'A$ is a prime of $A$ lying over $\mathfrak p'$ and over $\mathfrak q$. \end{enumerate} \end{lemma} \begin{proof} We may replace $(R \to S, \mathfrak p, \mathfrak q)$ with any base change $(R' \to R'\otimes_R S, \mathfrak p', \mathfrak q')$ by an \'etale ring map $R \to R'$ with a prime $\mathfrak p'$ lying over $\mathfrak p$, and a choice of $\mathfrak q'$ lying over both $\mathfrak q$ and $\mathfrak p'$. Note also that given $R \to R'$ and $\mathfrak p'$ a suitable $\mathfrak q'$ can always be found. \medskip\noindent The assumption that $R \to S$ is of finite type means that we may apply Lemma \ref{lemma-etale-makes-quasi-finite-finite-variant}. Thus we may assume that $S = A_1 \times \ldots \times A_n \times B$, that each $R \to A_i$ is finite with exactly one prime $\mathfrak r_i$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p) \subset \kappa(\mathfrak r_i)$ is purely inseparable and that $R \to B$ is not quasi-finite at any prime lying over $\mathfrak p$. Then clearly $\mathfrak q = \mathfrak r_i$ for some $i$, since an unramified morphism is quasi-finite (see Lemma \ref{lemma-unramified-quasi-finite}). Say $\mathfrak q = \mathfrak r_1$. By Lemma \ref{lemma-unramified-at-prime} we see that $\kappa(\mathfrak r_1)/\kappa(\mathfrak p)$ is separable hence the trivial field extension, and that $\mathfrak p(A_1)_{\mathfrak r_1}$ is the maximal ideal. Also, by Lemma \ref{lemma-unique-prime-over-localize-below} (which applies to $R \to A_1$ because a finite ring map satisfies going up by Lemma \ref{lemma-integral-going-up}) we have $(A_1)_{\mathfrak r_1} = (A_1)_{\mathfrak p}$. It follows from Nakayama's Lemma \ref{lemma-NAK} that the map of local rings $R_{\mathfrak p} \to (A_1)_{\mathfrak p} = (A_1)_{\mathfrak r_1}$ is surjective. Since $A_1$ is finite over $R$ we see that there exists a $f \in R$, $f \not \in \mathfrak p$ such that $R_f \to (A_1)_f$ is surjective. After replacing $R$ by $R_f$ we win. \end{proof} \begin{lemma} \label{lemma-etale-makes-unramified-closed} \begin{slogan} In an unramified ring map, one can separate the points in a fiber by passing to an \'etale neighbourhood. \end{slogan} Let $R \to S$ be a ring map. Let $\mathfrak p$ be a prime of $R$. If $R \to S$ is unramified then there exist \begin{enumerate} \item an \'etale ring map $R \to R'$, \item a prime $\mathfrak p' \subset R'$ lying over $\mathfrak p$. \item a product decomposition $$ R' \otimes_R S = A_1 \times \ldots \times A_n \times B $$ \end{enumerate} with the following properties \begin{enumerate} \item $R' \to A_i$ is surjective, \item $\mathfrak p'A_i$ is a prime of $A_i$ lying over $\mathfrak p'$, and \item there is no prime of $B$ lying over $\mathfrak p'$. \end{enumerate} \end{lemma} \begin{proof} We may apply Lemma \ref{lemma-etale-makes-quasi-finite-finite-variant}. Thus, after an \'etale base change, we may assume that $S = A_1 \times \ldots \times A_n \times B$, that each $R \to A_i$ is finite with exactly one prime $\mathfrak r_i$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p) \subset \kappa(\mathfrak r_i)$ is purely inseparable, and that $R \to B$ is not quasi-finite at any prime lying over $\mathfrak p$. Since $R \to S$ is quasi-finite (see Lemma \ref{lemma-unramified-quasi-finite}) we see there is no prime of $B$ lying over $\mathfrak p$. By Lemma \ref{lemma-unramified-at-prime} we see that $\kappa(\mathfrak r_i)/\kappa(\mathfrak p)$ is separable hence the trivial field extension, and that $\mathfrak p(A_i)_{\mathfrak r_i}$ is the maximal ideal. Also, by Lemma \ref{lemma-unique-prime-over-localize-below} (which applies to $R \to A_i$ because a finite ring map satisfies going up by Lemma \ref{lemma-integral-going-up}) we have $(A_i)_{\mathfrak r_i} = (A_i)_{\mathfrak p}$. It follows from Nakayama's Lemma \ref{lemma-NAK} that the map of local rings $R_{\mathfrak p} \to (A_i)_{\mathfrak p} = (A_i)_{\mathfrak r_i}$ is surjective. Since $A_i$ is finite over $R$ we see that there exists a $f \in R$, $f \not \in \mathfrak p$ such that $R_f \to (A_i)_f$ is surjective. After replacing $R$ by $R_f$ we win. \end{proof} \section{Henselian local rings} \label{section-henselian} % BEGIN ALGEBRA EDITORIAL ROUTE section-henselian \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-henselian}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-henselian \noindent In this section we discuss a bit the notion of a henselian local ring. Let $(R, \mathfrak m, \kappa)$ be a local ring. For $a \in R$ we denote $\overline{a}$ the image of $a$ in $\kappa$. For a polynomial $f \in R[T]$ we often denote $\overline{f}$ the image of $f$ in $\kappa[T]$. Given a polynomial $f \in R[T]$ we denote $f'$ the derivative of $f$ with respect to $T$. Note that $\overline{f}' = \overline{f'}$. \begin{definition} \label{definition-henselian} Let $(R, \mathfrak m, \kappa)$ be a local ring. \begin{enumerate} \item We say $R$ is {\it henselian} if for every monic $f \in R[T]$ and every root $a_0 \in \kappa$ of $\overline{f}$ such that $\overline{f'}(a_0) \not = 0$ there exists an $a \in R$ such that $f(a) = 0$ and $a_0 = \overline{a}$. \item We say $R$ is {\it strictly henselian} if $R$ is henselian and its residue field is separably algebraically closed. \end{enumerate} \end{definition} \noindent Note that the condition $\overline{f'}(a_0) \not = 0$ is equivalent to the condition that $a_0$ is a simple root of the polynomial $\overline{f}$. In fact, it implies that the lift $a \in R$, if it exists, is unique. \begin{lemma} \label{lemma-uniqueness} Let $(R, \mathfrak m, \kappa)$ be a local ring. Let $f \in R[T]$. Let $a, b \in R$ such that $f(a) = f(b) = 0$, $a = b \bmod \mathfrak m$, and $f'(a) \not \in \mathfrak m$. Then $a = b$. \end{lemma} \begin{proof} Write $f(x + y) - f(x) = f'(x)y + g(x, y) y^2$ in $R[x, y]$ (this is possible as one sees by expanding $f(x + y)$; details omitted). Then we see that $0 = f(b) - f(a) = f(a + (b - a)) - f(a) = f'(a)(b - a) + c (b - a)^2$ for some $c \in R$. By assumption $f'(a)$ is a unit in $R$. Hence $(b - a)(1 + f'(a)^{-1}c(b - a)) = 0$. By assumption $b - a \in \mathfrak m$, hence $1 + f'(a)^{-1}c(b - a)$ is a unit in $R$. Hence $b - a = 0$ in $R$. \end{proof} \noindent Here is the characterization of henselian local rings. \begin{lemma} \label{lemma-characterize-henselian} \begin{slogan} Characterizations of henselian local rings \end{slogan} Let $(R, \mathfrak m, \kappa)$ be a local ring. The following are equivalent \begin{enumerate} \item $R$ is henselian, \item for every $f \in R[T]$ and every root $a_0 \in \kappa$ of $\overline{f}$ such that $\overline{f'}(a_0) \not = 0$ there exists an $a \in R$ such that $f(a) = 0$ and $a_0 = \overline{a}$, \item for any monic $f \in R[T]$ and any factorization $\overline{f} = g_0 h_0$ with $\gcd(g_0, h_0) = 1$ there exists a factorization $f = gh$ in $R[T]$ such that $g_0 = \overline{g}$ and $h_0 = \overline{h}$, \item for any monic $f \in R[T]$ and any factorization $\overline{f} = g_0 h_0$ with $\gcd(g_0, h_0) = 1$ there exists a factorization $f = gh$ in $R[T]$ such that $g_0 = \overline{g}$ and $h_0 = \overline{h}$ and moreover $\deg_T(g) = \deg_T(g_0)$, \item for any $f \in R[T]$ and any factorization $\overline{f} = g_0 h_0$ with $\gcd(g_0, h_0) = 1$ there exists a factorization $f = gh$ in $R[T]$ such that $g_0 = \overline{g}$ and $h_0 = \overline{h}$, \item for any $f \in R[T]$ and any factorization $\overline{f} = g_0 h_0$ with $\gcd(g_0, h_0) = 1$ there exists a factorization $f = gh$ in $R[T]$ such that $g_0 = \overline{g}$ and $h_0 = \overline{h}$ and moreover $\deg_T(g) = \deg_T(g_0)$ if $g_0 \ne 0$, \item for any \'etale ring map $R \to S$ and prime $\mathfrak q$ of $S$ lying over $\mathfrak m$ with $\kappa = \kappa(\mathfrak q)$ there exists a retraction $\tau : S \to R$ of $R \to S$, \item for any \'etale ring map $R \to S$ and prime $\mathfrak q$ of $S$ lying over $\mathfrak m$ with $\kappa = \kappa(\mathfrak q)$ there exists a unique retraction $\tau : S \to R$ of $R \to S$ such that $\mathfrak q = \tau^{-1}(\mathfrak m)$, \item any finite $R$-algebra is a product of local rings, \item any finite $R$-algebra is a finite product of local rings, \item any finite type $R$-algebra $S$ can be written as $A \times B$ with $R \to A$ finite and $R \to B$ not quasi-finite at any prime lying over $\mathfrak m$, \item any finite type $R$-algebra $S$ can be written as $A \times B$ with $R \to A$ finite such that each irreducible component of $\Spec(B \otimes_R \kappa)$ has dimension $\geq 1$, and \item any quasi-finite $R$-algebra $S$ can be written as $S = A \times B$ with $R \to A$ finite such that $B \otimes_R \kappa = 0$. \end{enumerate} \end{lemma} \begin{proof} Here is a list of the easier implications: \begin{enumerate} \item 2$\Rightarrow$1 because in (2) we consider all polynomials and in (1) only monic ones, \item 5$\Rightarrow$3 because in (5) we consider all polynomials and in (3) only monic ones, \item 6$\Rightarrow$4 because in (6) we consider all polynomials and in (4) only monic ones, \item 4$\Rightarrow$3 is obvious, \item 6$\Rightarrow$5 is obvious, \item 8$\Rightarrow$7 is obvious, \item 10$\Rightarrow$9 is obvious, \item 11$\Leftrightarrow$12 by definition of being quasi-finite at a prime, \item 11$\Rightarrow$13 by definition of being quasi-finite, \end{enumerate} \noindent Proof of 1$\Rightarrow$8. Assume (1). Let $R \to S$ be \'etale, and let $\mathfrak q \subset S$ be a prime ideal such that $\kappa(\mathfrak q) \cong \kappa$. By Proposition \ref{proposition-etale-locally-standard} we can find a $g \in S$, $g \not \in \mathfrak q$ such that $R \to S_g$ is standard \'etale. After replacing $S$ by $S_g$ we may assume that $S = R[t]_g/(f)$ is standard \'etale (details omitted). Since the prime $\mathfrak q$ has residue field $\kappa$ it corresponds to a root $a_0$ of $\overline{f}$ which is not a root of $\overline{g}$. By definition of a standard \'etale algebra this also means that $\overline{f'}(a_0) \not = 0$. Since also $f$ is monic by definition of a standard \'etale algebra again we may use that $R$ is henselian to conclude that there exists an $a \in R$ with $a_0 = \overline{a}$ such that $f(a) = 0$. This implies that $g(a)$ is a unit of $R$ and we obtain the desired map $\tau : S = R[t]_g/(f) \to R$ by the rule $t \mapsto a$. By construction $\tau^{-1}(\mathfrak m) = \mathfrak q$. By Lemma \ref{lemma-uniqueness} the map $\tau$ is unique. This proves (8) holds. \medskip\noindent Proof of 7$\Rightarrow$8. (This is really unimportant and should be skipped.) Assume (7) holds and assume $R \to S$ is \'etale. Let $\mathfrak q_1, \ldots, \mathfrak q_r$ be the other primes of $S$ lying over $\mathfrak m$. Then we can find a $g \in S$, $g \not \in \mathfrak q$ and $g \in \mathfrak q_i$ for $i = 1, \ldots, r$. Namely, we can argue that $\bigcap_{i=1}^{r} \mathfrak{q}_{i} \not\subset \mathfrak{q}$ since otherwise $\mathfrak{q}_{i} \subset \mathfrak{q}$ for some $i$, but this cannot happen as the fiber of an \'etale morphism is discrete (use Lemma \ref{lemma-etale-over-field} for example). Apply (7) to the \'etale ring map $R \to S_g$ and the prime $\mathfrak qS_g$. This gives a retraction $\tau_g : S_g \to R$ such that the composition $\tau : S \to S_g \to R$ has the property $\tau^{-1}(\mathfrak m) = \mathfrak q$. Details omitted. \medskip\noindent Proof of 8$\Rightarrow$11. Assume (8) and let $R \to S$ be a finite type ring map. Apply Lemma \ref{lemma-etale-makes-quasi-finite-finite}. We find an \'etale ring map $R \to R'$ and a prime $\mathfrak m' \subset R'$ lying over $\mathfrak m$ with $\kappa = \kappa(\mathfrak m')$ such that $R' \otimes_R S = A' \times B'$ with $A'$ finite over $R'$ and $B'$ not quasi-finite over $R'$ at any prime lying over $\mathfrak m'$. Apply (8) to get a retraction $\tau : R' \to R$ with $\mathfrak m' = \tau^{-1}(\mathfrak m)$. Then use that $$ S = (S \otimes_R R') \otimes_{R', \tau} R = (A' \times B') \otimes_{R', \tau} R = (A' \otimes_{R', \tau} R) \times (B' \otimes_{R', \tau} R) $$ which gives a decomposition as in (11). \medskip\noindent Proof of 8$\Rightarrow$10. Assume (8) and let $R \to S$ be a finite ring map. Apply Lemma \ref{lemma-etale-makes-quasi-finite-finite}. We find an \'etale ring map $R \to R'$ and a prime $\mathfrak m' \subset R'$ lying over $\mathfrak m$ with $\kappa = \kappa(\mathfrak m')$ such that $R' \otimes_R S = A'_1 \times \ldots \times A'_n \times B'$ with $A'_i$ finite over $R'$ having exactly one prime over $\mathfrak m'$ and $B'$ not quasi-finite over $R'$ at any prime lying over $\mathfrak m'$. Apply (8) to get a retraction $\tau : R' \to R$ with $\mathfrak m' = \tau^{-1}(\mathfrak m)$. Then we obtain \begin{align*} S & = (S \otimes_R R') \otimes_{R', \tau} R \\ & = (A'_1 \times \ldots \times A'_n \times B') \otimes_{R', \tau} R \\ & = (A'_1 \otimes_{R', \tau} R) \times \ldots \times (A'_n \otimes_{R', \tau} R) \times (B' \otimes_{R', \tau} R) \\ & = A_1 \times \ldots \times A_n \times B \end{align*} The factor $B$ is finite over $R$ but $R \to B$ is not quasi-finite at any prime lying over $\mathfrak m$. Hence $B = 0$. The factors $A_i$ are finite $R$-algebras having exactly one prime lying over $\mathfrak m$, hence they are local rings. This proves that $S$ is a finite product of local rings. \medskip\noindent Proof of 9$\Rightarrow$10. This holds because if $S$ is finite over the local ring $R$, then it has at most finitely many maximal ideals. Namely, by going up for $R \to S$ the maximal ideals of $S$ all lie over $\mathfrak m$, and $S/\mathfrak mS$ is Artinian hence has finitely many primes. \medskip\noindent Proof of 10$\Rightarrow$1. Assume (10). Let $f \in R[T]$ be a monic polynomial and $a_0 \in \kappa$ a simple root of $\overline{f}$. Then $S = R[T]/(f)$ is a finite $R$-algebra. Applying (10) we get $S = A_1 \times \ldots \times A_r$ is a finite product of local $R$-algebras. In particular we see that $S/\mathfrak mS = \prod A_i/\mathfrak mA_i$ is the decomposition of $\kappa[T]/(\overline{f})$ as a product of local rings. This means that one of the factors, say $A_1/\mathfrak mA_1$ is the quotient $\kappa[T]/(\overline{f}) \to \kappa[T]/(T - a_0)$. Since $A_1$ is a summand of the finite free $R$-module $S$ it is a finite free $R$-module itself. As $A_1/\mathfrak mA_1$ is a $\kappa$-vector space of dimension 1 we see that $A_1 \cong R$ as an $R$-module. Clearly this means that $R \to A_1$ is an isomorphism. Let $a \in R$ be the image of $T$ under the map $R[T] \to S \to A_1 \to R$. Then $f(a) = 0$ and $\overline{a} = a_0$ as desired. \medskip\noindent Proof of 13$\Rightarrow$1. Assume (13). Let $f \in R[T]$ be a monic polynomial and $a_0 \in \kappa$ a simple root of $\overline{f}$. Then $S_1 = R[T]/(f)$ is a finite $R$-algebra. Let $g \in R[T]$ be any element such that $\overline{g} = \overline{f}/(T - a_0)$. Then $S = (S_1)_g$ is a quasi-finite $R$-algebra such that $S \otimes_R \kappa \cong \kappa[T]_{\overline{g}}/(\overline{f}) \cong \kappa[T]/(T - a_0) \cong \kappa$. Applying (13) to $S$ we get $S = A \times B$ with $A$ finite over $R$ and $B \otimes_R \kappa = 0$. In particular we see that $\kappa \cong S/\mathfrak mS = A/\mathfrak mA$. Since $A$ is a summand of the flat $R$-algebra $S$ we see that it is finite flat, hence free over $R$. As $A/\mathfrak mA$ is a $\kappa$-vector space of dimension 1 we see that $A \cong R$ as an $R$-module. Clearly this means that $R \to A$ is an isomorphism. Let $a \in R$ be the image of $T$ under the map $R[T] \to S \to A \to R$. Then $f(a) = 0$ and $\overline{a} = a_0$ as desired. \medskip\noindent Proof of 8$\Rightarrow$2. Assume (8). Let $f \in R[T]$ be any polynomial and let $a_0 \in \kappa$ be a simple root of $\overline{f}$. Then the algebra $S = R[T]_{f'}/(f)$ is \'etale over $R$. Let $\mathfrak q \subset S$ be the prime generated by $\mathfrak m$ and $T - b$ where $b \in R$ is any element such that $\overline{b} = a_0$. Apply (8) to $S$ and $\mathfrak q$ to get $\tau : S \to R$. Then the image $\tau(T) = a \in R$ works in (2). \medskip\noindent At this point we see that (1), (2), (7), (8), (9), (10), (11), (12), (13) are all equivalent. The weakest assertion of (3), (4), (5) and (6) is (3) and the strongest is (6). Hence we still have to prove that (3) implies (1) and (1) implies (6). \medskip\noindent Proof of 3$\Rightarrow$1. Assume (3). Let $f \in R[T]$ be monic and let $a_0 \in \kappa$ be a simple root of $\overline{f}$. This gives a factorization $\overline{f} = (T - a_0)h_0$ with $h_0(a_0) \not = 0$, so $\gcd(T - a_0, h_0) = 1$. Apply (3) to get a factorization $f = gh$ with $\overline{g} = T - a_0$ and $\overline{h} = h_0$. Set $S = R[T]/(f)$ which is a finite free $R$-algebra. We will write $g$, $h$ also for the images of $g$ and $h$ in $S$. Then $gS + hS = S$ by Nakayama's Lemma \ref{lemma-NAK} as the equality holds modulo $\mathfrak m$. Since $gh = f = 0$ in $S$ this also implies that $gS \cap hS = 0$. Hence by the Chinese Remainder theorem we obtain $S = S/(g) \times S/(h)$. This implies that $A = S/(g)$ is a summand of a finite free $R$-module, hence finite free. Moreover, the rank of $A$ is $1$ as $A/\mathfrak mA = \kappa[T]/(T - a_0)$. Thus the map $R \to A$ is an isomorphism. Setting $a \in R$ equal to the image of $T$ under the maps $R[T] \to S \to A \to R$ gives an element of $R$ with $f(a) = 0$ and $\overline{a} = a_0$. \medskip\noindent Proof of 1$\Rightarrow$6. Assume (1) or equivalently all of (1), (2), (7), (8), (9), (10), (11), (12), (13). Let $f \in R[T]$ be a polynomial. Suppose that $\overline{f} = g_0h_0$ is a factorization with $\gcd(g_0, h_0) = 1$. If $g_0 = 0$, then $h_0$ is a nonzero constant; lift it to a unit $h \in R$ and set $g = h^{-1}f$. If $h_0 = 0$, lift the nonzero constant $g_0$ to a unit $g \in R$ and set $h = g^{-1}f$. Thus we may assume that both residue factors are nonzero. We may and do assume that $g_0$ is monic. Consider $S = R[T]/(f)$. Because we have the factorization we see that the coefficients of $f$ generate the unit ideal in $R$. This implies that $S$ has finite fibres over $R$, hence is quasi-finite over $R$. It also implies that $S$ is flat over $R$ by Lemma \ref{lemma-grothendieck-general}. Combining (13) and (10) we may write $S = A_1 \times \ldots \times A_n \times B$ where each $A_i$ is local and finite over $R$, and $B \otimes_R \kappa = 0$. After reordering the factors $A_1, \ldots, A_n$ we may assume that $$ \kappa[T]/(g_0) = A_1/\mathfrak m A_1 \times \ldots \times A_r/\mathfrak mA_r, \ \kappa[T]/(h_0) = A_{r + 1}/\mathfrak mA_{r + 1} \times \ldots \times A_n/\mathfrak mA_n $$ as quotients of $\kappa[T]$. The finite flat $R$-algebra $A = A_1 \times \ldots \times A_r$ is free as an $R$-module, see Lemma \ref{lemma-finite-flat-local}. Its rank is $\deg_T(g_0)$. Let $g \in R[T]$ be the characteristic polynomial of the $R$-linear operator $T : A \to A$. Then $g$ is a monic polynomial of degree $\deg_T(g) = \deg_T(g_0)$ and moreover $\overline{g} = g_0$. By Cayley-Hamilton (Lemma \ref{lemma-charpoly}) we see that $g(T_A) = 0$ where $T_A$ indicates the image of $T$ in $A$. Hence we obtain a well defined surjective map $R[T]/(g) \to A$ which is an isomorphism by Nakayama's Lemma \ref{lemma-NAK}. The map $R[T] \to A$ factors through $R[T]/(f)$ by construction hence we may write $f = gh$ for some $h$. This finishes the proof. \end{proof} \begin{lemma} \label{lemma-finite-over-henselian} Let $(R, \mathfrak m, \kappa)$ be a henselian local ring. \begin{enumerate} \item If $R \to S$ is a finite ring map then $S$ is a finite product of henselian local rings each finite over $R$. \item If $R \to S$ is a finite ring map and $S$ is local, then $S$ is a henselian local ring and $R \to S$ is a (finite) local ring map. \item If $R \to S$ is a finite type ring map, and $\mathfrak q$ is a prime of $S$ lying over $\mathfrak m$ at which $R \to S$ is quasi-finite, then $S_{\mathfrak q}$ is henselian and finite over $R$. \item If $R \to S$ is quasi-finite then $S_{\mathfrak q}$ is henselian and finite over $R$ for every prime $\mathfrak q$ lying over $\mathfrak m$. \end{enumerate} \end{lemma} \begin{proof} Part (2) implies part (1) since $S$ as in part (1) is a finite product of its localizations at the primes lying over $\mathfrak m$ by Lemma \ref{lemma-characterize-henselian} part (10). Part (2) also follows from Lemma \ref{lemma-characterize-henselian} part (10) since any finite $S$-algebra is also a finite $R$-algebra (of course any finite ring map between local rings is local). \medskip\noindent Let $R \to S$ and $\mathfrak q$ be as in (3). Write $S = A \times B$ with $A$ finite over $R$ and $B$ not quasi-finite over $R$ at any prime lying over $\mathfrak m$, see Lemma \ref{lemma-characterize-henselian} part (11). Hence $S_\mathfrak q$ is a localization of $A$ at a maximal ideal and we deduce (3) from (1). Part (4) follows from part (3). \end{proof} \begin{lemma} \label{lemma-mop-up} Let $(R, \mathfrak m, \kappa)$ be a henselian local ring. Any finite type $R$-algebra $S$ can be written as $S = A_1 \times \ldots \times A_n \times B$ with $A_i$ local and finite over $R$ and $R \to B$ not quasi-finite at any prime of $B$ lying over $\mathfrak m$. \end{lemma} \begin{proof} This is a combination of parts (11) and (10) of Lemma \ref{lemma-characterize-henselian}. \end{proof} \begin{lemma} \label{lemma-mop-up-strictly-henselian} Let $(R, \mathfrak m, \kappa)$ be a strictly henselian local ring. Any finite type $R$-algebra $S$ can be written as $S = A_1 \times \ldots \times A_n \times B$ with $A_i$ local and finite over $R$ and $\kappa \subset \kappa(\mathfrak m_{A_i})$ finite purely inseparable and $R \to B$ not quasi-finite at any prime of $B$ lying over $\mathfrak m$. \end{lemma} \begin{proof} First write $S = A_1 \times \ldots \times A_n \times B$ as in Lemma \ref{lemma-mop-up}. The field extension $\kappa(\mathfrak m_{A_i})/\kappa$ is finite and $\kappa$ is separably algebraically closed, hence it is finite purely inseparable. \end{proof} \begin{lemma} \label{lemma-henselian-cat-finite-etale} Let $(R, \mathfrak m, \kappa)$ be a henselian local ring. The category of finite \'etale ring extensions $R \to S$ is equivalent to the category of finite \'etale algebras $\kappa \to \overline{S}$ via the functor $S \mapsto S/\mathfrak mS$. \end{lemma} \begin{proof} Denote $\mathcal{C} \to \mathcal{D}$ the functor of categories of the statement. Suppose that $R \to S$ is finite \'etale. Then we may write $$ S = A_1 \times \ldots \times A_n $$ with $A_i$ local and finite \'etale over $S$, use either Lemma \ref{lemma-mop-up} or Lemma \ref{lemma-characterize-henselian} part (10). In particular $A_i/\mathfrak mA_i$ is a finite separable field extension of $\kappa$, see Lemma \ref{lemma-etale-at-prime}. Thus we see that every object of $\mathcal{C}$ and $\mathcal{D}$ decomposes canonically into irreducible pieces which correspond via the given functor. Next, suppose that $S_1$, $S_2$ are finite \'etale over $R$ such that $\kappa_1 = S_1/\mathfrak mS_1$ and $\kappa_2 = S_2/\mathfrak mS_2$ are fields (finite separable over $\kappa$). Then $S_1 \otimes_R S_2$ is finite \'etale over $R$ and we may write $$ S_1 \otimes_R S_2 = A_1 \times \ldots \times A_n $$ as before. Then we see that $\Hom_R(S_1, S_2)$ is identified with the set of indices $i \in \{1, \ldots, n\}$ such that $S_2 \to A_i$ is an isomorphism. To see this use that given any $R$-algebra map $\varphi : S_1 \to S_2$ the map $\varphi \times 1 : S_1 \otimes_R S_2 \to S_2$ is surjective, and hence is equal to projection onto one of the factors $A_i$. But in exactly the same way we see that $\Hom_\kappa(\kappa_1, \kappa_2)$ is identified with the set of indices $i \in \{1, \ldots, n\}$ such that $\kappa_2 \to A_i/\mathfrak mA_i$ is an isomorphism. By the discussion above these sets of indices match, and we conclude that our functor is fully faithful. Finally, let $\kappa'/\kappa$ be a finite separable field extension. By Lemma \ref{lemma-make-etale-map-prescribed-residue-field} there exists an \'etale ring map $R \to S$ and a prime $\mathfrak q$ of $S$ lying over $\mathfrak m$ such that $\kappa \subset \kappa(\mathfrak q)$ is isomorphic to the given extension. By Lemma \ref{lemma-mop-up} we may write $S = A_1 \times \ldots \times A_n \times B$. Since $R \to S$ is quasi-finite we see that there exists no prime of $B$ over $\mathfrak m$. Hence $S_{\mathfrak q}$ is equal to $A_i$ for some $i$. Hence $R \to A_i$ is finite \'etale and produces the given residue field extension. Thus the functor is essentially surjective and we win. \end{proof} \begin{lemma} \label{lemma-unramified-over-strictly-henselian} Let $(R, \mathfrak m, \kappa)$ be a strictly henselian local ring. Let $R \to S$ be an unramified ring map. Then $$ S = A_1 \times \ldots \times A_n \times B $$ with each $R \to A_i$ surjective and no prime of $B$ lying over $\mathfrak m$. \end{lemma} \begin{proof} First write $S = A_1 \times \ldots \times A_n \times B$ as in Lemma \ref{lemma-mop-up}. Now we see that $R \to A_i$ is finite unramified and $A_i$ local. Hence the maximal ideal of $A_i$ is $\mathfrak mA_i$ and its residue field $A_i / \mathfrak m A_i$ is a finite separable extension of $\kappa$, see Lemma \ref{lemma-unramified-at-prime}. However, the condition that $R$ is strictly henselian means that $\kappa$ is separably algebraically closed, so $\kappa = A_i / \mathfrak m A_i$. By Nakayama's Lemma \ref{lemma-NAK} we conclude that $R \to A_i$ is surjective as desired. \end{proof} \begin{lemma} \label{lemma-complete-henselian} \begin{slogan} Complete local rings are Henselian by Newton's method \end{slogan} Let $(R, \mathfrak m, \kappa)$ be a complete local ring, see Definition \ref{definition-complete-local-ring}. Then $R$ is henselian. \end{lemma} \begin{proof} Let $f \in R[T]$ be monic. Denote $f_n \in R/\mathfrak m^{n + 1}[T]$ the image. Denote $f'_n$ the derivative of $f_n$ with respect to $T$. Let $a_0 \in \kappa$ be a simple root of $f_0$. We lift this to a solution of $f$ over $R$ inductively as follows: Suppose given $a_n \in R/\mathfrak m^{n + 1}$ such that $a_n \bmod \mathfrak m = a_0$ and $f_n(a_n) = 0$. Pick any element $b \in R/\mathfrak m^{n + 2}$ such that $a_n = b \bmod \mathfrak m^{n + 1}$. Then $f_{n + 1}(b) \in \mathfrak m^{n + 1}/\mathfrak m^{n + 2}$. Set $$ a_{n + 1} = b - f_{n + 1}(b)/f'_{n + 1}(b) $$ (Newton's method). This makes sense as $f'_{n + 1}(b) \in R/\mathfrak m^{n + 2}$ is invertible by the condition on $a_0$. Then we compute $f_{n + 1}(a_{n + 1}) = f_{n + 1}(b) - f_{n + 1}(b) = 0$ in $R/\mathfrak m^{n + 2}$. Since the system of elements $a_n \in R/\mathfrak m^{n + 1}$ so constructed is compatible we get an element $a \in \lim R/\mathfrak m^n = R$ (here we use that $R$ is complete). Moreover, $f(a) = 0$ since it maps to zero in each $R/\mathfrak m^n$. Finally $\overline{a} = a_0$ and we win. \end{proof} \begin{lemma} \label{lemma-local-dimension-zero-henselian} \begin{slogan} Local rings of dimension zero are henselian. \end{slogan} Let $(R, \mathfrak m)$ be a local ring of dimension $0$. Then $R$ is henselian. \end{lemma} \begin{proof} Let $R \to S$ be a finite ring map. By Lemma \ref{lemma-characterize-henselian} it suffices to show that $S$ is a product of local rings. By Lemma \ref{lemma-finite-finite-fibres} $S$ has finitely many primes $\mathfrak m_1, \ldots, \mathfrak m_r$ which all lie over $\mathfrak m$. There are no inclusions among these primes, see Lemma \ref{lemma-integral-no-inclusion}, hence they are all maximal. Every element of $\mathfrak m_1 \cap \ldots \cap \mathfrak m_r$ is nilpotent by Lemma \ref{lemma-Zariski-topology}. It follows $S$ is the product of the localizations of $S$ at the primes $\mathfrak m_i$ by Lemma \ref{lemma-product-local}. \end{proof} \noindent The following lemma will be the key to the uniqueness and functorial properties of henselization and strict henselization. \begin{lemma} \label{lemma-map-into-henselian} Let $R \to S$ be a ring map with $S$ henselian local. Given \begin{enumerate} \item an \'etale ring map $R \to A$, \item a prime $\mathfrak q$ of $A$ lying over $\mathfrak p = R \cap \mathfrak m_S$, \item a $\kappa(\mathfrak p)$-algebra map $\tau : \kappa(\mathfrak q) \to S/\mathfrak m_S$, \end{enumerate} then there exists a unique homomorphism of $R$-algebras $f : A \to S$ such that $\mathfrak q = f^{-1}(\mathfrak m_S)$ and $f$ induces the map $\tau$ on residue fields. \end{lemma} \begin{proof} Consider $A \otimes_R S$. This is an \'etale algebra over $S$, see Lemma \ref{lemma-etale}. Moreover, the kernel $$ \mathfrak q' = \Ker(A \otimes_R S \to \kappa(\mathfrak q) \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak m_S) \xrightarrow{\tau \otimes 1} \kappa(\mathfrak m_S)) $$ is a prime ideal lying over $\mathfrak m_S$ with residue field equal to the residue field of $S$. Hence by Lemma \ref{lemma-characterize-henselian} there exists a unique retraction $\sigma : A \otimes_R S \to S$ with $\sigma^{-1}(\mathfrak m_S) = \mathfrak q'$. Set $f$ equal to the composition $A \to A \otimes_R S \to S$. We omit the verification of the properties of $f$; the uniqueness of $f$ comes from the uniqueness of $\sigma$ (details omitted). \end{proof} \begin{lemma} \label{lemma-strictly-henselian-solutions} Let $\varphi : R \to S$ be a local homomorphism of strictly henselian local rings. Let $P_1, \ldots, P_n \in R[x_1, \ldots, x_n]$ be polynomials such that $R[x_1, \ldots, x_n]/(P_1, \ldots, P_n)$ is \'etale over $R$. Then the map $$ R^n \longrightarrow S^n, \quad (h_1, \ldots, h_n) \longmapsto (\varphi(h_1), \ldots, \varphi(h_n)) $$ induces a bijection between $$ \{ (r_1, \ldots, r_n) \in R^n \mid P_i(r_1, \ldots, r_n) = 0, \ i = 1, \ldots, n \} $$ and $$ \{ (s_1, \ldots, s_n) \in S^n \mid P^\varphi_i(s_1, \ldots, s_n) = 0, \ i = 1, \ldots, n \} $$ where $P^\varphi_i \in S[x_1, \ldots, x_n]$ are the images of the $P_i$ under $\varphi$. \end{lemma} \begin{proof} The first solution set is canonically isomorphic to the set $$ \Hom_R(R[x_1, \ldots, x_n]/(P_1, \ldots, P_n), R). $$ As $R$ is henselian the map $R \to R/\mathfrak m_R$ induces a bijection between this set and the set of solutions in the residue field $R/\mathfrak m_R$, see Lemma \ref{lemma-characterize-henselian}. The same is true for $S$. Now since $R[x_1, \ldots, x_n]/(P_1, \ldots, P_n)$ is \'etale over $R$ and $R/\mathfrak m_R$ is separably algebraically closed we see that $R/\mathfrak m_R[x_1, \ldots, x_n]/(\overline{P}_1, \ldots, \overline{P}_n)$ is a finite product of copies of $R/\mathfrak m_R$ where $\overline{P}_i$ is the image of $P_i$ in $R/\mathfrak m_R[x_1, \ldots, x_n]$. Hence the tensor product $$ R/\mathfrak m_R[x_1, \ldots, x_n]/(\overline{P}_1, \ldots, \overline{P}_n) \otimes_{R/\mathfrak m_R} S/\mathfrak m_S = S/\mathfrak m_S[x_1, \ldots, x_n]/ (\overline{P}^\varphi_1, \ldots, \overline{P}^\varphi_n) $$ is also a finite product of copies of $S/\mathfrak m_S$ with the same index set. This proves the lemma. \end{proof} \begin{lemma} \label{lemma-split-ML-henselian} Let $R$ be a henselian local ring. Any countably generated Mittag-Leffler module over $R$ is a direct sum of finitely presented $R$-modules. \end{lemma} \begin{proof} Let $M$ be a countably generated and Mittag-Leffler $R$-module. We claim that for any element $x \in M$ there exists a direct sum decomposition $M = N \oplus K$ with $x \in N$, the module $N$ finitely presented, and $K$ Mittag-Leffler. \medskip\noindent Suppose the claim is true. Choose generators $x_1, x_2, x_3, \ldots$ of $M$. By the claim we can inductively find direct sum decompositions $$ M = N_1 \oplus N_2 \oplus \ldots \oplus N_n \oplus K_n $$ with $N_i$ finitely presented, $x_1, \ldots, x_n \in N_1 \oplus \ldots \oplus N_n$, and $K_n$ Mittag-Leffler. Repeating ad infinitum we see that $M = \bigoplus N_i$. \medskip\noindent We still have to prove the claim. Let $x \in M$. By Lemma \ref{lemma-ML-countable} there exists an endomorphism $\alpha : M \to M$ such that $\alpha$ factors through a finitely presented module, and $\alpha (x) = x$. Say $\alpha$ factors as $$ \xymatrix{ M \ar[r]^\pi & P \ar[r]^i & M } $$ Set $a = \pi \circ \alpha \circ i : P \to P$, so $i \circ a \circ \pi = \alpha^3$. By Lemma \ref{lemma-charpoly-module} there exists a monic polynomial $P \in R[T]$ such that $P(a) = 0$. Note that this implies formally that $\alpha^2 P(\alpha^2) = 0$. Hence we may think of $M$ as a module over $R[T]/(T^2P(T^2))$. Assume that $x \not = 0$. Then $\alpha(x) = x$ implies that $0 = \alpha^2P(\alpha^2)x = P(1)x$ hence $P(1) = 0$ in $R/I$ where $I = \{r \in R \mid rx = 0\}$ is the annihilator of $x$. As $x \not = 0$ we see $I \subset \mathfrak m_R$, hence $1$ is a root of $\overline{P} = P \bmod \mathfrak m_R \in R/\mathfrak m_R[T]$. As $R$ is henselian we can find a factorization $$ T^2P(T^2) = (T^2 Q_1) Q_2 $$ for some $Q_1, Q_2 \in R[T]$ and integer $e \geq 1$ with $Q_2 = (T - 1)^e \bmod \mathfrak m_R R[T]$ and $Q_1(1) \not = 0 \bmod \mathfrak m_R$, see Lemma \ref{lemma-characterize-henselian}. Let $N = \Im(\alpha^2Q_1(\alpha) : M \to M)$ and $K = \Im(Q_2(\alpha) : M \to M)$. As $T^2Q_1$ and $Q_2$ generate the unit ideal of $R[T]$ we get a direct sum decomposition $M = N \oplus K$. Moreover, $Q_2$ acts as zero on $N$ and $T^2Q_1$ acts as zero on $K$. Note that $N$ is a quotient of $P$ hence is finitely generated. Also $x \in N$ because $\alpha^2Q_1(\alpha)x = Q_1(1)x$ and $Q_1(1)$ is a unit in $R$. By Lemma \ref{lemma-direct-sum-ML} the modules $N$ and $K$ are Mittag-Leffler. Finally, the finitely generated module $N$ is finitely presented as a finitely generated Mittag-Leffler module is finitely presented, see Example \ref{example-ML} part (1). \end{proof} \section{Filtered colimits of \'etale ring maps} \label{section-ind-etale} % BEGIN ALGEBRA EDITORIAL ROUTE section-ind-etale \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ind-etale}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ind-etale \noindent This section is a precursor to the section on ind-\'etale ring maps (Pro-\'etale Cohomology, Section \ref{proetale-section-ind-etale}). The material will also be useful to prove uniqueness properties of the henselization and strict henselization of a local ring. \begin{lemma} \label{lemma-base-change-colimit-etale} Let $R \to A$ and $R \to R'$ be ring maps. If $A$ is a filtered colimit of \'etale $R$-algebras, then $R' \otimes_R A$ is a filtered colimit of \'etale $R'$-algebras. \end{lemma} \begin{proof} This is true because colimits commute with tensor products and \'etale ring maps are preserved under base change (Lemma \ref{lemma-etale}). \end{proof} \begin{lemma} \label{lemma-composition-colimit-etale} Let $A \to B \to C$ be ring maps. If $B$ is a filtered colimit of \'etale $A$-algebras and $C$ is a filtered colimit of \'etale $B$-algebras, then $C$ is a filtered colimit of \'etale $A$-algebras. \end{lemma} \begin{proof} We will use the criterion of Lemma \ref{lemma-when-colimit}. Let $A \to P \to C$ be a factorization of $A \to C$ with $P$ of finite presentation over $A$. Write $B = \colim_{i \in I} B_i$ where $I$ is a directed set and where $B_i$ is an \'etale $A$-algebra. Write $C = \colim_{j \in J} C_j$ where $J$ is a directed set and where $C_j$ is an \'etale $B$-algebra. We can factor $P \to C$ as $P \to C_j \to C$ for some $j$ by Lemma \ref{lemma-characterize-finite-presentation}. By Lemma \ref{lemma-etale} we can find an $i \in I$ and an \'etale ring map $B_i \to C'_j$ such that $C_j = B \otimes_{B_i} C'_j$. Then $C_j = \colim_{i' \geq i} B_{i'} \otimes_{B_i} C'_j$ and again we see that $P \to C_j$ factors as $P \to B_{i'} \otimes_{B_i} C'_j \to C$. The map $A \to C' = B_{i'} \otimes_{B_i} C'_j$ is \'etale since compositions and tensor products of \'etale ring maps are \'etale. Hence we have factored $P \to C$ as $P \to C' \to C$ with $C'$ \'etale over $A$ and the criterion of Lemma \ref{lemma-when-colimit} applies. \end{proof} \begin{lemma} \label{lemma-colimit-colimit-etale} Let $R$ be a ring. Let $A = \colim A_i$ be a filtered colimit of $R$-algebras such that each $A_i$ is a filtered colimit of \'etale $R$-algebras. Then $A$ is a filtered colimit of \'etale $R$-algebras. \end{lemma} \begin{proof} Write $A_i = \colim_{j \in J_i} A_j$ where $J_i$ is a directed set and $A_j$ is an \'etale $R$-algebra. For each $i \leq i'$ and $j \in J_i$ there exists an $j' \in J_{i'}$ and an $R$-algebra map $\varphi_{jj'} : A_j \to A_{j'}$ making the diagram $$ \xymatrix{ A_i \ar[r] & A_{i'} \\ A_j \ar[u] \ar[r]^{\varphi_{jj'}} & A_{j'} \ar[u] } $$ commute. This is true because $R \to A_j$ is of finite presentation so that Lemma \ref{lemma-characterize-finite-presentation} applies. Let $\mathcal{J}$ be the category with objects $\coprod_{i \in I} J_i$ and morphisms triples $(j, j', \varphi_{jj'})$ as above (and obvious composition law). Then $\mathcal{J}$ is a filtered category and $A = \colim_\mathcal{J} A_j$. Details omitted. \end{proof} \begin{lemma} \label{lemma-colimit-colimit-etale-better} Let $I$ be a directed set. Let $i \mapsto (R_i \to A_i)$ be a system of arrows of rings over $I$. Set $R = \colim R_i$ and $A = \colim A_i$. If each $A_i$ is a filtered colimit of \'etale $R_i$-algebras, then $A$ is a filtered colimit of \'etale $R$-algebras. \end{lemma} \begin{proof} This is true because $A = A \otimes_R R = \colim A_i \otimes_{R_i} R$ and hence we can apply Lemma \ref{lemma-colimit-colimit-etale} because $R \to A_i \otimes_{R_i} R$ is a filtered colimit of \'etale ring maps by Lemma \ref{lemma-base-change-colimit-etale}. \end{proof} \begin{lemma} \label{lemma-colimits-of-etale} Let $R$ be a ring. Let $A \to B$ be an $R$-algebra homomorphism. If $A$ and $B$ are filtered colimits of \'etale $R$-algebras, then $B$ is a filtered colimit of \'etale $A$-algebras. \end{lemma} \begin{proof} Write $A = \colim A_i$ and $B = \colim B_j$ as filtered colimits with $A_i$ and $B_j$ \'etale over $R$. For each $i$ we can find a $j$ such that $A_i \to B$ factors through $B_j$, see Lemma \ref{lemma-characterize-finite-presentation}. The factorization $A_i \to B_j$ is \'etale by Lemma \ref{lemma-map-between-etale}. Since $A \to A \otimes_{A_i} B_j$ is \'etale (Lemma \ref{lemma-etale}) it suffices to prove that $B = \colim A \otimes_{A_i} B_j$ where the colimit is over pairs $(i, j)$ and factorizations $A_i \to B_j \to B$ of $A_i \to B$ (this is a directed system; details omitted). This is clear because colimits commute with tensor products and hence $\colim A \otimes_{A_i} B_j = A \otimes_A B = B$. \end{proof} \begin{lemma} \label{lemma-map-into-henselian-colimit} Let $R \to S$ be a ring map with $S$ henselian local. Given \begin{enumerate} \item an $R$-algebra $A$ which is a filtered colimit of \'etale $R$-algebras, \item a prime $\mathfrak q$ of $A$ lying over $\mathfrak p = R \cap \mathfrak m_S$, \item a $\kappa(\mathfrak p)$-algebra map $\tau : \kappa(\mathfrak q) \to S/\mathfrak m_S$, \end{enumerate} then there exists a unique homomorphism of $R$-algebras $f : A \to S$ such that $\mathfrak q = f^{-1}(\mathfrak m_S)$ and $f$ induces $\tau$ on residue fields. \end{lemma} \begin{proof} Write $A = \colim A_i$ as a filtered colimit of \'etale $R$-algebras. Set $\mathfrak q_i = A_i \cap \mathfrak q$. We obtain $f_i : A_i \to S$ by applying Lemma \ref{lemma-map-into-henselian}. Set $f = \colim f_i$. \end{proof} \begin{lemma} \label{lemma-uniqueness-henselian} Let $R$ be a ring. Given a commutative diagram of ring maps $$ \xymatrix{ S \ar[r] & K \\ R \ar[u] \ar[r] & S' \ar[u] } $$ where $S$, $S'$ are henselian local, $S$, $S'$ are filtered colimits of \'etale $R$-algebras, $K$ is a field and the arrows $S \to K$ and $S' \to K$ identify $K$ with the residue field of both $S$ and $S'$. Then there exists a unique $R$-algebra isomorphism $S \to S'$ compatible with the maps to $K$. \end{lemma} \begin{proof} Follows immediately from Lemma \ref{lemma-map-into-henselian-colimit}. \end{proof} \noindent The following lemma is not strictly speaking about colimits of \'etale ring maps. \begin{lemma} \label{lemma-colimit-henselian} A filtered colimit of (strictly) henselian local rings along local homomorphisms is (strictly) henselian. \end{lemma} \begin{proof} Categories, Lemma \ref{categories-lemma-directed-category-system} says that this is really just a question about a colimit of (strictly) henselian local rings over a directed set. Let $(R_i, \varphi_{ii'})$ be such a system with each $\varphi_{ii'}$ local. Then $R = \colim_i R_i$ is local, and its residue field $\kappa$ is $\colim \kappa_i$ (argument omitted). It is easy to see that $\colim \kappa_i$ is separably algebraically closed if each $\kappa_i$ is so; thus it suffices to prove $R$ is henselian if each $R_i$ is henselian. Suppose that $f \in R[T]$ is monic and that $a_0 \in \kappa$ is a simple root of $\overline{f}$. Then for some large enough $i$ there exists an $f_i \in R_i[T]$ mapping to $f$ and an $a_{0, i} \in \kappa_i$ mapping to $a_0$. Since $\overline{f_i}(a_{0, i}) \in \kappa_i$, resp.\ $\overline{f_i'}(a_{0, i}) \in \kappa_i$ maps to $0 = \overline{f}(a_0) \in \kappa$, resp.\ $0 \not = \overline{f'}(a_0) \in \kappa$ we conclude that $a_{0, i}$ is a simple root of $\overline{f_i}$. As $R_i$ is henselian we can find $a_i \in R_i$ such that $f_i(a_i) = 0$ and $a_{0, i} = \overline{a_i}$. Then the image $a \in R$ of $a_i$ is the desired solution. Thus $R$ is henselian. \end{proof} \section{Henselization and strict henselization} \label{section-henselization} % BEGIN ALGEBRA EDITORIAL ROUTE section-henselization \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-henselization}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-henselization \noindent In this section we construct the henselization. We encourage the reader to keep in mind the uniqueness already proved in Lemma \ref{lemma-uniqueness-henselian} and the functorial behaviour pointed out in Lemma \ref{lemma-map-into-henselian-colimit} while reading this material. \begin{lemma} \label{lemma-henselization} Let $(R, \mathfrak m, \kappa)$ be a local ring. There exists a local ring map $R \to R^h$ with the following properties \begin{enumerate} \item $R^h$ is henselian, \item $R^h$ is a filtered colimit of \'etale $R$-algebras, \item $\mathfrak m R^h$ is the maximal ideal of $R^h$, and \item $\kappa = R^h/\mathfrak m R^h$. \end{enumerate} \end{lemma} \begin{proof} Consider the category of pairs $(S, \mathfrak q)$ where $R \to S$ is an \'etale ring map, and $\mathfrak q$ is a prime of $S$ lying over $\mathfrak m$ with $\kappa = \kappa(\mathfrak q)$. A morphism of pairs $(S, \mathfrak q) \to (S', \mathfrak q')$ is given by an $R$-algebra map $\varphi : S \to S'$ such that $\varphi^{-1}(\mathfrak q') = \mathfrak q$. We set $$ R^h = \colim_{(S, \mathfrak q)} S. $$ Let us show that the category of pairs is filtered, see Categories, Definition \ref{categories-definition-directed}. The category contains the pair $(R, \mathfrak m)$ and hence is not empty, which proves part (1) of Categories, Definition \ref{categories-definition-directed}. For any pair $(S, \mathfrak q)$ the prime ideal $\mathfrak q$ is maximal with residue field $\kappa$ since the composition $\kappa \to S/\mathfrak q \to \kappa(\mathfrak q)$ is an isomorphism. Suppose that $(S, \mathfrak q)$ and $(S', \mathfrak q')$ are two objects. Set $S'' = S \otimes_R S'$ and $\mathfrak q'' = \mathfrak qS'' + \mathfrak q'S''$. Then $S''/\mathfrak q'' = S/\mathfrak q \otimes_R S'/\mathfrak q' = \kappa$ by what we said above. Moreover, $R \to S''$ is \'etale by Lemma \ref{lemma-etale}. This proves part (2) of Categories, Definition \ref{categories-definition-directed}. Next, suppose that $\varphi, \psi : (S, \mathfrak q) \to (S', \mathfrak q')$ are two morphisms of pairs. Then $\varphi$, $\psi$, and $S' \otimes_R S' \to S'$ are \'etale ring maps by Lemma \ref{lemma-map-between-etale}. Consider $$ S'' = (S' \otimes_{\varphi, S, \psi} S') \otimes_{S' \otimes_R S'} S' $$ with prime ideal $$ \mathfrak q'' = (\mathfrak q' \otimes S' + S' \otimes \mathfrak q') \otimes S' + (S' \otimes_{\varphi, S, \psi} S') \otimes \mathfrak q' $$ Arguing as above (base change of \'etale maps is \'etale, composition of \'etale maps is \'etale) we see that $S''$ is \'etale over $R$. Moreover, the canonical map $S' \to S''$ (using the right most factor for example) equalizes $\varphi$ and $\psi$. This proves part (3) of Categories, Definition \ref{categories-definition-directed}. Hence we conclude that $R^h$ consists of triples $(S, \mathfrak q, f)$ with $f \in S$, and two such triples $(S, \mathfrak q, f)$, $(S', \mathfrak q', f')$ define the same element of $R^h$ if and only if there exists a pair $(S'', \mathfrak q'')$ and morphisms of pairs $\varphi : (S, \mathfrak q) \to (S'', \mathfrak q'')$ and $\varphi' : (S', \mathfrak q') \to (S'', \mathfrak q'')$ such that $\varphi(f) = \varphi'(f')$. \medskip\noindent Suppose that $x \in R^h$. Represent $x$ by a triple $(S, \mathfrak q, f)$. Let $\mathfrak q_1, \ldots, \mathfrak q_r$ be the other primes of $S$ lying over $\mathfrak m$. Then $\mathfrak q \not \subset \mathfrak q_i$ as we have seen above that $\mathfrak q$ is maximal. Thus, since $\mathfrak q$ is a prime ideal, we can find a $g \in S$, $g \not \in \mathfrak q$ and $g \in \mathfrak q_i$ for $i = 1, \ldots, r$. Consider the morphism of pairs $(S, \mathfrak q) \to (S_g, \mathfrak qS_g)$. In this way we see that we may always assume that $x$ is given by a triple $(S, \mathfrak q, f)$ where $\mathfrak q$ is the only prime of $S$ lying over $\mathfrak m$, i.e., $\sqrt{\mathfrak mS} = \mathfrak q$. But since $R \to S$ is \'etale, we have $\mathfrak mS_{\mathfrak q} = \mathfrak qS_{\mathfrak q}$, see Lemma \ref{lemma-etale-at-prime}. Hence we actually get that $\mathfrak mS = \mathfrak q$. \medskip\noindent Suppose that $x \not \in \mathfrak mR^h$. Represent $x$ by a triple $(S, \mathfrak q, f)$ with $\mathfrak mS = \mathfrak q$. Then $f \not \in \mathfrak mS$, i.e., $f \not \in \mathfrak q$. Hence $(S, \mathfrak q) \to (S_f, \mathfrak qS_f)$ is a morphism of pairs such that the image of $f$ becomes invertible. Hence $x$ is invertible with inverse represented by the triple $(S_f, \mathfrak qS_f, 1/f)$. We conclude that $R^h$ is a local ring with maximal ideal $\mathfrak mR^h$. The residue field is $\kappa$ since we can define $R^h/\mathfrak mR^h \to \kappa$ by mapping a triple $(S, \mathfrak q, f)$ to the residue class of $f$ modulo $\mathfrak q$. \medskip\noindent We still have to show that $R^h$ is henselian. Namely, suppose that $P \in R^h[T]$ is a monic polynomial and $a_0 \in \kappa$ is a simple root of the reduction $\overline{P} \in \kappa[T]$. Then we can find a pair $(S, \mathfrak q)$ such that $P$ is the image of a monic polynomial $Q \in S[T]$. Set $S' = S[T]/(Q)$ and let $\mathfrak q' \subset S'$ be the maximal ideal $\mathfrak q' = \mathfrak qS' + (T - a')S'$ where $a' \in S$ is any element lifting $a_0$. By construction $S \to S'$ is \'etale at $\mathfrak q'$ and $\kappa = \kappa(\mathfrak q')$. Pick $g \in S'$, $g \not \in \mathfrak q'$ such that $S'' = S'_g$ is \'etale over $S$. Then $(S, \mathfrak q) \to (S'', \mathfrak q'S'')$ is a morphism of pairs. Now that triple $(S'', \mathfrak q'S'', \text{class of }T)$ determines an element $a \in R^h$ with the properties $P(a) = 0$, and $\overline{a} = a_0$ as desired. \end{proof} \begin{lemma} \label{lemma-strict-henselization} Let $(R, \mathfrak m, \kappa)$ be a local ring. Let $\kappa \subset \kappa^{sep}$ be a separable algebraic closure. There exists a commutative diagram $$ \xymatrix{ \kappa \ar[r] & \kappa \ar[r] & \kappa^{sep} \\ R \ar[r] \ar[u] & R^h \ar[r] \ar[u] & R^{sh} \ar[u] } $$ with the following properties \begin{enumerate} \item the map $R^h \to R^{sh}$ is local \item $R^{sh}$ is strictly henselian, \item $R^{sh}$ is a filtered colimit of \'etale $R$-algebras, \item $\mathfrak m R^{sh}$ is the maximal ideal of $R^{sh}$, and \item $\kappa^{sep} = R^{sh}/\mathfrak m R^{sh}$. \end{enumerate} \end{lemma} \begin{proof} This is proved by exactly the same proof as used for Lemma \ref{lemma-henselization}. The only difference is that, instead of pairs, one uses triples $(S, \mathfrak q, \alpha)$ where $R \to S$ \'etale, $\mathfrak q$ is a prime of $S$ lying over $\mathfrak m$, and $\alpha : \kappa(\mathfrak q) \to \kappa^{sep}$ is an embedding of extensions of $\kappa$. \end{proof} \begin{definition} \label{definition-henselization} Let $(R, \mathfrak m, \kappa)$ be a local ring. \begin{enumerate} \item The local ring map $R \to R^h$ constructed in Lemma \ref{lemma-henselization} is called the {\it henselization} of $R$. \item Given a separable algebraic closure $\kappa \subset \kappa^{sep}$ the local ring map $R \to R^{sh}$ constructed in Lemma \ref{lemma-strict-henselization} is called the {\it strict henselization of $R$ with respect to $\kappa \subset \kappa^{sep}$}. \item A local ring map $R \to R^{sh}$ is called a {\it strict henselization} of $R$ if it is isomorphic to one of the local ring maps constructed in Lemma \ref{lemma-strict-henselization}. \end{enumerate} \end{definition} \noindent The maps $R \to R^h \to R^{sh}$ are flat local ring homomorphisms. By Lemma \ref{lemma-uniqueness-henselian} the $R$-algebras $R^h$ and $R^{sh}$ are well defined up to unique isomorphism by the conditions that they are henselian local, filtered colimits of \'etale $R$-algebras with residue field $\kappa$ and $\kappa^{sep}$. In the rest of this section we mostly just discuss functoriality of the (strict) henselizations. We will discuss more intricate results concerning the relationship between $R$ and its henselization in More on Algebra, Section \ref{more-algebra-section-permanence-henselization}. \begin{remark} \label{remark-construct-sh-from-h} We can also construct $R^{sh}$ from $R^h$. Namely, for any finite separable subextension $\kappa^{sep}/\kappa'/\kappa$ there exists a unique (up to unique isomorphism) finite \'etale local ring extension $R^h \subset R^h(\kappa')$ whose residue field extension reproduces the given extension, see Lemma \ref{lemma-henselian-cat-finite-etale}. Hence we can set $$ R^{sh} = \bigcup\nolimits_{\kappa \subset \kappa' \subset \kappa^{sep}} R^h(\kappa') $$ The arrows in this system, compatible with the arrows on the level of residue fields, exist by Lemma \ref{lemma-henselian-cat-finite-etale}. This will produce a henselian local ring by Lemma \ref{lemma-colimit-henselian} since each of the rings $R^h(\kappa')$ is henselian by Lemma \ref{lemma-finite-over-henselian}. By construction the residue field extension induced by $R^h \to R^{sh}$ is the field extension $\kappa^{sep}/\kappa$. Hence $R^{sh}$ so constructed is strictly henselian. By Lemma \ref{lemma-composition-colimit-etale} the $R$-algebra $R^{sh}$ is a colimit of \'etale $R$-algebras. Hence the uniqueness of Lemma \ref{lemma-uniqueness-henselian} shows that $R^{sh}$ is the strict henselization. \end{remark} \begin{lemma} \label{lemma-henselian-functorial-prepare} Let $R \to S$ be a local map of local rings. Let $S \to S^h$ be the henselization. Let $R \to A$ be an \'etale ring map and let $\mathfrak q$ be a prime of $A$ lying over $\mathfrak m_R$ such that $R/\mathfrak m_R \cong \kappa(\mathfrak q)$. Then there exists a unique morphism of rings $f : A \to S^h$ fitting into the commutative diagram $$ \xymatrix{ A \ar[r]_f & S^h \\ R \ar[u] \ar[r] & S \ar[u] } $$ such that $f^{-1}(\mathfrak m_{S^h}) = \mathfrak q$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-map-into-henselian}. \end{proof} \begin{lemma} \label{lemma-henselian-functorial} Let $R \to S$ be a local map of local rings. Let $R \to R^h$ and $S \to S^h$ be the henselizations. There exists a unique local ring map $R^h \to S^h$ fitting into the commutative diagram $$ \xymatrix{ R^h \ar[r]_f & S^h \\ R \ar[u] \ar[r] & S \ar[u] } $$ \end{lemma} \begin{proof} Follows immediately from Lemma \ref{lemma-map-into-henselian-colimit}. \end{proof} \noindent Here is a slightly different construction of the henselization. \begin{lemma} \label{lemma-henselization-different} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime ideal. Consider the category of pairs $(S, \mathfrak q)$ where $R \to S$ is \'etale and $\mathfrak q$ is a prime lying over $\mathfrak p$ such that $\kappa(\mathfrak p) = \kappa(\mathfrak q)$. This category is filtered and $$ (R_{\mathfrak p})^h = \colim_{(S, \mathfrak q)} S = \colim_{(S, \mathfrak q)} S_{\mathfrak q} $$ canonically. \end{lemma} \begin{proof} A morphism of pairs $(S, \mathfrak q) \to (S', \mathfrak q')$ is given by an $R$-algebra map $\varphi : S \to S'$ such that $\varphi^{-1}(\mathfrak q') = \mathfrak q$. Let us show that the category of pairs is filtered, see Categories, Definition \ref{categories-definition-directed}. The category contains the pair $(R, \mathfrak p)$ and hence is not empty, which proves part (1) of Categories, Definition \ref{categories-definition-directed}. Suppose that $(S, \mathfrak q)$ and $(S', \mathfrak q')$ are two pairs. Note that $\mathfrak q$, resp.\ $\mathfrak q'$ correspond to primes of the fibre rings $S \otimes \kappa(\mathfrak p)$, resp.\ $S' \otimes \kappa(\mathfrak p)$ with residue fields $\kappa(\mathfrak p)$, hence they correspond to maximal ideals of $S \otimes \kappa(\mathfrak p)$, resp.\ $S' \otimes \kappa(\mathfrak p)$. Set $S'' = S \otimes_R S'$. By the above there exists a unique prime $\mathfrak q'' \subset S''$ lying over $\mathfrak q$ and over $\mathfrak q'$ whose residue field is $\kappa(\mathfrak p)$. The ring map $R \to S''$ is \'etale by Lemma \ref{lemma-etale}. This proves part (2) of Categories, Definition \ref{categories-definition-directed}. Next, suppose that $\varphi, \psi : (S, \mathfrak q) \to (S', \mathfrak q')$ are two morphisms of pairs. Then $\varphi$, $\psi$, and $S' \otimes_R S' \to S'$ are \'etale ring maps by Lemma \ref{lemma-map-between-etale}. Consider $$ S'' = (S' \otimes_{\varphi, S, \psi} S') \otimes_{S' \otimes_R S'} S' $$ Arguing as above (base change of \'etale maps is \'etale, composition of \'etale maps is \'etale) we see that $S''$ is \'etale over $R$. The fibre ring of $S''$ over $\mathfrak p$ is $$ F'' = (F' \otimes_{\varphi, F, \psi} F') \otimes_{F' \otimes_{\kappa(\mathfrak p)} F'} F' $$ where $F', F$ are the fibre rings of $S'$ and $S$. Since $\varphi$ and $\psi$ are morphisms of pairs the map $F' \to \kappa(\mathfrak p)$ corresponding to $\mathfrak q'$ extends to a map $F'' \to \kappa(\mathfrak p)$ and in turn corresponds to a prime ideal $\mathfrak q'' \subset S''$ whose residue field is $\kappa(\mathfrak p)$. The canonical map $S' \to S''$ (using the right most factor for example) is a morphism of pairs $(S', \mathfrak q') \to (S'', \mathfrak q'')$ which equalizes $\varphi$ and $\psi$. This proves part (3) of Categories, Definition \ref{categories-definition-directed}. Hence we conclude that the category is filtered. \medskip\noindent Recall that in the proof of Lemma \ref{lemma-henselization} we constructed $(R_{\mathfrak p})^h$ as the corresponding colimit but starting with $R_{\mathfrak p}$ and its maximal ideal $\mathfrak pR_{\mathfrak p}$. Now, given any pair $(S, \mathfrak q)$ for $(R, \mathfrak p)$ we obtain a pair $(S_{\mathfrak p}, \mathfrak qS_{\mathfrak p})$ for $(R_{\mathfrak p}, \mathfrak pR_{\mathfrak p})$. Moreover, in this situation $$ S_{\mathfrak p} = \colim_{f \in R, f \not \in \mathfrak p} S_f. $$ Hence in order to show the equalities of the lemma, it suffices to show that any pair $(S_{loc}, \mathfrak q_{loc})$ for $(R_{\mathfrak p}, \mathfrak pR_{\mathfrak p})$ is of the form $(S_{\mathfrak p}, \mathfrak qS_{\mathfrak p})$ for some pair $(S, \mathfrak q)$ over $(R, \mathfrak p)$ (some details omitted). This follows from Lemma \ref{lemma-etale}. \end{proof} \begin{lemma} \label{lemma-henselian-functorial-improve} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. Let $R \to R^h$ and $S \to S^h$ be the henselizations of $R_\mathfrak p$ and $S_\mathfrak q$. The local ring map $R^h \to S^h$ of Lemma \ref{lemma-henselian-functorial} identifies $S^h$ with the henselization of $R^h \otimes_R S$ at the unique prime lying over $\mathfrak m^h$ and $\mathfrak q$. \end{lemma} \begin{proof} By Lemma \ref{lemma-henselization-different} we see that $R^h$, resp.\ $S^h$ are filtered colimits of \'etale $R$, resp.\ $S$-algebras. Hence we see that $R^h \otimes_R S$ is a filtered colimit of \'etale $S$-algebras $A_i$ (Lemma \ref{lemma-etale}). By Lemma \ref{lemma-colimits-of-etale} we see that $S^h$ is a filtered colimit of \'etale $R^h \otimes_R S$-algebras. Since moreover $S^h$ is a henselian local ring with residue field equal to $\kappa(\mathfrak q)$, the statement follows from the uniqueness result of Lemma \ref{lemma-uniqueness-henselian}. \end{proof} \begin{lemma} \label{lemma-strictly-henselian-functorial-prepare} Let $\varphi : R \to S$ be a local map of local rings. Let $S/\mathfrak m_S \subset \kappa^{sep}$ be a separable algebraic closure. Let $S \to S^{sh}$ be the strict henselization of $S$ with respect to $S/\mathfrak m_S \subset \kappa^{sep}$. Let $R \to A$ be an \'etale ring map and let $\mathfrak q$ be a prime of $A$ lying over $\mathfrak m_R$. Given any commutative diagram $$ \xymatrix{ \kappa(\mathfrak q) \ar[r]_{\phi} & \kappa^{sep} \\ R/\mathfrak m_R \ar[r]^{\varphi} \ar[u] & S/\mathfrak m_S \ar[u] } $$ there exists a unique morphism of rings $f : A \to S^{sh}$ fitting into the commutative diagram $$ \xymatrix{ A \ar[r]_f & S^{sh} \\ R \ar[u] \ar[r]^{\varphi} & S \ar[u] } $$ such that $f^{-1}(\mathfrak m_{S^{sh}}) = \mathfrak q$ and the induced map $\kappa(\mathfrak q) \to \kappa^{sep}$ is the given one. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-map-into-henselian}. \end{proof} \begin{lemma} \label{lemma-strictly-henselian-functorial} Let $R \to S$ be a local map of local rings. Choose separable algebraic closures $R/\mathfrak m_R \subset \kappa_1^{sep}$ and $S/\mathfrak m_S \subset \kappa_2^{sep}$. Let $R \to R^{sh}$ and $S \to S^{sh}$ be the corresponding strict henselizations. Given any commutative diagram $$ \xymatrix{ \kappa_1^{sep} \ar[r]_{\phi} & \kappa_2^{sep} \\ R/\mathfrak m_R \ar[r]^{\varphi} \ar[u] & S/\mathfrak m_S \ar[u] }, $$ there exists a unique local ring map $R^{sh} \to S^{sh}$ fitting into the commutative diagram $$ \xymatrix{ R^{sh} \ar[r]_f & S^{sh} \\ R \ar[u] \ar[r] & S \ar[u] } $$ and inducing $\phi$ on the residue fields of $R^{sh}$ and $S^{sh}$. \end{lemma} \begin{proof} Follows immediately from Lemma \ref{lemma-map-into-henselian-colimit}. \end{proof} \begin{lemma} \label{lemma-strict-henselization-different} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime ideal. Let $\kappa(\mathfrak p) \subset \kappa^{sep}$ be a separable algebraic closure. Consider the category of triples $(S, \mathfrak q, \phi)$ where $R \to S$ is \'etale, $\mathfrak q$ is a prime lying over $\mathfrak p$, and $\phi : \kappa(\mathfrak q) \to \kappa^{sep}$ is a $\kappa(\mathfrak p)$-algebra map. This category is filtered and $$ (R_{\mathfrak p})^{sh} = \colim_{(S, \mathfrak q, \phi)} S = \colim_{(S, \mathfrak q, \phi)} S_{\mathfrak q} $$ canonically. \end{lemma} \begin{proof} A morphism of triples $(S, \mathfrak q, \phi) \to (S', \mathfrak q', \phi')$ is given by an $R$-algebra map $\varphi : S \to S'$ such that $\varphi^{-1}(\mathfrak q') = \mathfrak q$ and such that $\phi' \circ \varphi = \phi$. Let us show that the category of triples is filtered, see Categories, Definition \ref{categories-definition-directed}. The category contains the triple $(R, \mathfrak p, \kappa(\mathfrak p) \subset \kappa^{sep})$ and hence is not empty, which proves part (1) of Categories, Definition \ref{categories-definition-directed}. Suppose that $(S, \mathfrak q, \phi)$ and $(S', \mathfrak q', \phi')$ are two triples. Note that $\mathfrak q$, resp.\ $\mathfrak q'$ correspond to primes of the fibre rings $S \otimes \kappa(\mathfrak p)$, resp.\ $S' \otimes \kappa(\mathfrak p)$ with residue fields finite separable over $\kappa(\mathfrak p)$ and $\phi$, resp.\ $\phi'$ correspond to maps into $\kappa^{sep}$. Hence this data corresponds to $\kappa(\mathfrak p)$-algebra maps $$ \phi : S \otimes_R \kappa(\mathfrak p) \longrightarrow \kappa^{sep}, \quad \phi' : S' \otimes_R \kappa(\mathfrak p) \longrightarrow \kappa^{sep}. $$ Set $S'' = S \otimes_R S'$. Combining the maps above, we get a unique $\kappa(\mathfrak p)$-algebra map $$ \phi'' = \phi \otimes \phi' : S'' \otimes_R \kappa(\mathfrak p) \longrightarrow \kappa^{sep} $$ whose kernel corresponds to a prime $\mathfrak q'' \subset S''$ lying over $\mathfrak q$ and over $\mathfrak q'$, and whose residue field maps via $\phi''$ to the compositum of $\phi(\kappa(\mathfrak q))$ and $\phi'(\kappa(\mathfrak q'))$ in $\kappa^{sep}$. The ring map $R \to S''$ is \'etale by Lemma \ref{lemma-etale}. Hence $(S'', \mathfrak q'', \phi'')$ is a triple dominating both $(S, \mathfrak q, \phi)$ and $(S', \mathfrak q', \phi')$. This proves part (2) of Categories, Definition \ref{categories-definition-directed}. Next, suppose that $\varphi, \psi : (S, \mathfrak q, \phi) \to (S', \mathfrak q', \phi')$ are two morphisms of triples. Then $\varphi$, $\psi$, and $S' \otimes_R S' \to S'$ are \'etale ring maps by Lemma \ref{lemma-map-between-etale}. Consider $$ S'' = (S' \otimes_{\varphi, S, \psi} S') \otimes_{S' \otimes_R S'} S' $$ Arguing as above (base change of \'etale maps is \'etale, composition of \'etale maps is \'etale) we see that $S''$ is \'etale over $R$. The fibre ring of $S''$ over $\mathfrak p$ is $$ F'' = (F' \otimes_{\varphi, F, \psi} F') \otimes_{F' \otimes_{\kappa(\mathfrak p)} F'} F' $$ where $F', F$ are the fibre rings of $S'$ and $S$. Since $\varphi$ and $\psi$ are morphisms of triples the map $\phi' : F' \to \kappa^{sep}$ extends to a map $\phi'' : F'' \to \kappa^{sep}$ which in turn corresponds to a prime ideal $\mathfrak q'' \subset S''$. The canonical map $S' \to S''$ (using the right most factor for example) is a morphism of triples $(S', \mathfrak q', \phi') \to (S'', \mathfrak q'', \phi'')$ which equalizes $\varphi$ and $\psi$. This proves part (3) of Categories, Definition \ref{categories-definition-directed}. Hence we conclude that the category is filtered. \medskip\noindent We still have to show that the colimit $R_{colim}$ of the system is equal to the strict henselization of $R_{\mathfrak p}$ with respect to $\kappa^{sep}$. To see this note that the system of triples $(S, \mathfrak q, \phi)$ contains as a subsystem the pairs $(S, \mathfrak q)$ of Lemma \ref{lemma-henselization-different}. Hence $R_{colim}$ contains $R_{\mathfrak p}^h$ by the result of that lemma. Moreover, it is clear that $R_{\mathfrak p}^h \subset R_{colim}$ is a directed colimit of \'etale ring extensions. It follows that $R_{colim}$ is henselian by Lemmas \ref{lemma-finite-over-henselian} and \ref{lemma-colimit-henselian}. Finally, by Lemma \ref{lemma-make-etale-map-prescribed-residue-field} we see that the residue field of $R_{colim}$ is equal to $\kappa^{sep}$. Hence we conclude that $R_{colim}$ is strictly henselian and hence equals the strict henselization of $R_{\mathfrak p}$ as desired. Some details omitted. \end{proof} \begin{lemma} \label{lemma-strictly-henselian-functorial-improve} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$. Choose separable algebraic closures $\kappa(\mathfrak p) \subset \kappa_1^{sep}$ and $\kappa(\mathfrak q) \subset \kappa_2^{sep}$. Let $R^{sh}$ and $S^{sh}$ be the corresponding strict henselizations of $R_\mathfrak p$ and $S_\mathfrak q$. Given any commutative diagram $$ \xymatrix{ \kappa_1^{sep} \ar[r]_{\phi} & \kappa_2^{sep} \\ \kappa(\mathfrak p) \ar[r]^{\varphi} \ar[u] & \kappa(\mathfrak q) \ar[u] }, $$ the local ring map $R^{sh} \to S^{sh}$ of Lemma \ref{lemma-strictly-henselian-functorial} identifies $S^{sh}$ with the strict henselization of $R^{sh} \otimes_R S$ at a prime lying over $\mathfrak q$ and the maximal ideal $\mathfrak m^{sh} \subset R^{sh}$. \end{lemma} \begin{proof} The proof is identical to the proof of Lemma \ref{lemma-henselian-functorial-improve} except that it uses Lemma \ref{lemma-strict-henselization-different} instead of Lemma \ref{lemma-henselization-different}. \end{proof} \begin{lemma} \label{lemma-sh-from-h-map} Let $R \to S$ be a ring map. Let $\mathfrak q \subset S$ be a prime lying over $\mathfrak p \subset R$ such that $\kappa(\mathfrak p) \to \kappa(\mathfrak q)$ is an isomorphism. Choose a separable algebraic closure $\kappa^{sep}$ of $\kappa(\mathfrak p) = \kappa(\mathfrak q)$. Then $$ (S_\mathfrak q)^{sh} = (S_\mathfrak q)^h \otimes_{(R_\mathfrak p)^h} (R_\mathfrak p)^{sh} $$ \end{lemma} \begin{proof} This follows from the alternative construction of the strict henselization of a local ring in Remark \ref{remark-construct-sh-from-h} and the fact that the residue fields are equal. Some details omitted. \end{proof} \section{Henselization and quasi-finite ring maps} \label{section-henselization-quasi-finite} % BEGIN ALGEBRA EDITORIAL ROUTE section-henselization-quasi-finite \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-henselization-quasi-finite}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-henselization-quasi-finite \noindent In this section we prove some results concerning the functorial maps between (strict) henselizations for quasi-finite ring maps. \begin{lemma} \label{lemma-quasi-finite-henselization} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over $\mathfrak p$ in $R$. Assume $R \to S$ is quasi-finite at $\mathfrak q$. The commutative diagram $$ \xymatrix{ R_{\mathfrak p}^h \ar[r] & S_{\mathfrak q}^h \\ R_{\mathfrak p} \ar[u] \ar[r] & S_{\mathfrak q} \ar[u] } $$ of Lemma \ref{lemma-henselian-functorial} identifies $S_{\mathfrak q}^h$ with the localization of $R_{\mathfrak p}^h \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$ at the prime generated by $\mathfrak q$. Moreover, the ring map $R_{\mathfrak p}^h \to S_{\mathfrak q}^h$ is finite. \end{lemma} \begin{proof} Note that $R_{\mathfrak p}^h \otimes_R S$ is quasi-finite over $R_{\mathfrak p}^h$ at the prime ideal corresponding to $\mathfrak q$, see Lemma \ref{lemma-four-rings}. Hence the localization $S'$ of $R_{\mathfrak p}^h \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$ is henselian and finite over $R_{\mathfrak p}^h$, see Lemma \ref{lemma-finite-over-henselian}. As a localization $S'$ is a filtered colimit of \'etale $R_{\mathfrak p}^h \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$-algebras. By Lemma \ref{lemma-henselian-functorial-improve} we see that $S_\mathfrak q^h$ is the henselization of $R_{\mathfrak p}^h \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$. Thus $S' = S_\mathfrak q^h$ by the uniqueness result of Lemma \ref{lemma-uniqueness-henselian}. \end{proof} \begin{lemma} \label{lemma-quotient-henselization} \begin{slogan} Henselization is compatible with quotients. \end{slogan} Let $R$ be a local ring with henselization $R^h$. Let $I \subset \mathfrak m_R$. Then $R^h/IR^h$ is the henselization of $R/I$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-quasi-finite-henselization}. \end{proof} \begin{lemma} \label{lemma-quasi-finite-strict-henselization} Let $R \to S$ be a ring map. Let $\mathfrak q$ be a prime of $S$ lying over $\mathfrak p$ in $R$. Assume $R \to S$ is quasi-finite at $\mathfrak q$. Let $\kappa_2^{sep}/\kappa(\mathfrak q)$ be a separable algebraic closure and denote $\kappa_1^{sep} \subset \kappa_2^{sep}$ the subfield of elements separable algebraic over $\kappa(\mathfrak p)$ (Fields, Lemma \ref{fields-lemma-separable-first}). The commutative diagram $$ \xymatrix{ R_{\mathfrak p}^{sh} \ar[r] & S_{\mathfrak q}^{sh} \\ R_{\mathfrak p} \ar[u] \ar[r] & S_{\mathfrak q} \ar[u] } $$ of Lemma \ref{lemma-strictly-henselian-functorial} identifies $S_{\mathfrak q}^{sh}$ with the localization of $R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$ at the prime ideal $\mathfrak q'$ which is the kernel of the map $$ R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q} \longrightarrow \kappa_1^{sep} \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak q) \longrightarrow \kappa_2^{sep} $$ Moreover, the ring map $R_{\mathfrak p}^{sh} \to S_{\mathfrak q}^{sh}$ is a finite local homomorphism of local rings whose residue field extension is the extension $\kappa_2^{sep}/\kappa_1^{sep}$ which is both finite and purely inseparable. \end{lemma} \begin{proof} Since $R \to S$ is quasi-finite at $\mathfrak q$ we see that the extension $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is finite, see Definition \ref{definition-quasi-finite} and Lemma \ref{lemma-isolated-point-fibre}. Hence $\kappa_1^{sep}$ is a separable algebraic closure of $\kappa(\mathfrak p)$ (small detail omitted). In particular Lemma \ref{lemma-strictly-henselian-functorial} does really apply. Next, the compositum of $\kappa(\mathfrak q)$ and $\kappa_1^{sep}$ in $\kappa_2^{sep}$ is separably algebraically closed and hence equal to $\kappa_2^{sep}$. We conclude that $\kappa_2^{sep}/\kappa_1^{sep}$ is finite. By construction the extension $\kappa_2^{sep}/\kappa_1^{sep}$ is purely inseparable. The ring map $R_{\mathfrak p}^{sh} \to S_{\mathfrak q}^{sh}$ is indeed local and induces the residue field extension $\kappa_2^{sep}/\kappa_1^{sep}$ which is indeed finite purely inseparable. \medskip\noindent Note that $R_{\mathfrak p}^{sh} \otimes_R S$ is quasi-finite over $R_{\mathfrak p}^{sh}$ at the inverse image of $\mathfrak q'$ under the canonical map $R_{\mathfrak p}^{sh} \otimes_R S \to R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$, see Lemma \ref{lemma-four-rings}. Hence the localization $S'$ of $R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$ at $\mathfrak q'$ is henselian and finite over $R_{\mathfrak p}^{sh}$, see Lemma \ref{lemma-finite-over-henselian}. Note that the residue field of $S'$ is $\kappa_2^{sep}$ as the map $\kappa_1^{sep} \otimes_{\kappa(\mathfrak p)} \kappa(\mathfrak q) \to \kappa_2^{sep}$ is surjective by the discussion in the previous paragraph. Furthermore, as a localization $S'$ is a filtered colimit of \'etale $R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$-algebras. By Lemma \ref{lemma-strictly-henselian-functorial-improve} we see that $S_{\mathfrak q}^{sh}$ is the strict henselization of $R_{\mathfrak p}^{sh} \otimes_{R_{\mathfrak p}} S_{\mathfrak q}$ at $\mathfrak q'$. Thus $S' = S_\mathfrak q^{sh}$ by the uniqueness result of Lemma \ref{lemma-uniqueness-henselian}. \end{proof} \begin{lemma} \label{lemma-quotient-strict-henselization} Let $R$ be a local ring with strict henselization $R^{sh}$. Let $I \subset \mathfrak m_R$. Then $R^{sh}/IR^{sh}$ is a strict henselization of $R/I$. \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-quasi-finite-strict-henselization}. \end{proof} \begin{lemma} \label{lemma-local-tensor-with-integral} Let $A \to B$ and $A \to C$ be local homomorphisms of local rings. If $A \to C$ is integral and either $\kappa(\mathfrak m_C)/\kappa(\mathfrak m_A)$ or $\kappa(\mathfrak m_B)/\kappa(\mathfrak m_A)$ is purely inseparable, then $D = B \otimes_A C$ is a local ring and $B \to D$ and $C \to D$ are local. \end{lemma} \begin{proof} Any maximal ideal of $D$ lies over the maximal ideal of $B$ by going up for the integral ring map $B \to D$ (Lemma \ref{lemma-integral-going-up}). Now $D/\mathfrak m_B D = \kappa(\mathfrak m_B) \otimes_A C = \kappa(\mathfrak m_B) \otimes_{\kappa(\mathfrak m_A)} C/\mathfrak m_A C$. The spectrum of $C/\mathfrak m_A C$ consists of a single point, namely $\mathfrak m_C$. Thus the spectrum of $D/\mathfrak m_B D$ is the same as the spectrum of $\kappa(\mathfrak m_B) \otimes_{\kappa(\mathfrak m_A)} \kappa(\mathfrak m_C)$ which is a single point by our assumption that either $\kappa(\mathfrak m_C)/\kappa(\mathfrak m_A)$ or $\kappa(\mathfrak m_B)/\kappa(\mathfrak m_A)$ is purely inseparable. This proves that $D$ is local and that the ring maps $B \to D$ and $C \to D$ are local. \end{proof} \begin{lemma} \label{lemma-base-change-strict-henselization-quasi-finite} Let $A \to B$ and $A \to C$ be ring maps. Let $\kappa$ be a separably algebraically closed field and let $B \otimes_A C \to \kappa$ be a ring homomorphism. Denote $$ \xymatrix{ B^{sh} \ar[r] & (B \otimes_A C)^{sh} \\ A^{sh} \ar[u] \ar[r] & C^{sh} \ar[u] } $$ the corresponding maps of strict henselizations (see proof). If \begin{enumerate} \item $A \to B$ is quasi-finite at the prime $\mathfrak p_B = \Ker(B \to \kappa)$, or \item $B$ is a filtered colimit of quasi-finite $A$-algebras, or \item $B_{\mathfrak p_B}$ is a filtered colimit of quasi-finite algebras over $A_{\mathfrak p_A}$, or \item $B$ is integral over $A$, \end{enumerate} then $B^{sh} \otimes_{A^{sh}} C^{sh} \to (B \otimes_A C)^{sh}$ is an isomorphism. \end{lemma} \begin{proof} Write $D = B \otimes_A C$. Denote $\mathfrak p_A = \Ker(A \to \kappa)$ and similarly for $\mathfrak p_B$, $\mathfrak p_C$, and $\mathfrak p_D$. Denote $\kappa_A \subset \kappa$ the separable algebraic closure of $\kappa(\mathfrak p_A)$ in $\kappa$ and similarly for $\kappa_B$, $\kappa_C$, and $\kappa_D$. Denote $A^{sh}$ the strict henselization of $A_{\mathfrak p_A}$ constructed using the separable algebraic closure $\kappa_A/\kappa(\mathfrak p_A)$. Similarly for $B^{sh}$, $C^{sh}$, and $D^{sh}$. We obtain the commutative diagram of the lemma from the functoriality of Lemma \ref{lemma-strictly-henselian-functorial}. \medskip\noindent Consider the map $$ c : B^{sh} \otimes_{A^{sh}} C^{sh} \to D^{sh} = (B \otimes_A C)^{sh} $$ we obtain from the commutative diagram. If $A \to B$ is quasi-finite at $\mathfrak p_B = \Ker(B \to \kappa)$, then the ring map $C \to D$ is quasi-finite at $\mathfrak p_D$ by Lemma \ref{lemma-four-rings}. Hence by Lemma \ref{lemma-quasi-finite-strict-henselization} (and Lemma \ref{lemma-base-change-integral}) the ring map $c$ is a homomorphism of finite $C^{sh}$-algebras and $$ B^{sh} = (B \otimes_A A^{sh})_{\mathfrak q} \quad\text{and}\quad D^{sh} = (D \otimes_C C^{sh})_{\mathfrak r} = (B \otimes_A C^{sh})_{\mathfrak r} $$ for some primes $\mathfrak q$ and $\mathfrak r$. Since $$ B^{sh} \otimes_{A^{sh}} C^{sh} = (B \otimes_A A^{sh})_{\mathfrak q} \otimes_{A^{sh}} C^{sh} = \text{a localization of } B \otimes_A C^{sh} $$ we conclude that source and target of $c$ are both localizations of $B \otimes_A C^{sh}$ (compatibly with the map). Hence it suffices to show that $B^{sh} \otimes_{A^{sh}} C^{sh}$ is local (small detail omitted). This follows from Lemma \ref{lemma-local-tensor-with-integral} and the fact that $A^{sh} \to B^{sh}$ is finite with purely inseparable residue field extension by the already used Lemma \ref{lemma-quasi-finite-strict-henselization}. This proves case (1) of the lemma. \medskip\noindent In case (2) write $B = \colim B_i$ as a filtered colimit of quasi-finite $A$-algebras. We correspondingly get $D = \colim D_i$ with $D_i = B_i \otimes_A C$. Observe that $B^{sh} = \colim B_i^{sh}$. Namely, the ring $\colim B_i^{sh}$ is a strictly henselian local ring by Lemma \ref{lemma-colimit-henselian}. Also $\colim B_i^{sh}$ is a filtered colimit of \'etale $B$-algebras by Lemma \ref{lemma-colimit-colimit-etale-better}. Finally, the residue field of $\colim B_i^{sh}$ is a separable algebraic closure of $\kappa(\mathfrak p_B)$ (details omitted). Hence we conclude that $B^{sh} = \colim B_i^{sh}$, see discussion following Definition \ref{definition-henselization}. Similarly, we have $D^{sh} = \colim D_i^{sh}$. Then we conclude by case (1) because $$ D^{sh} = \colim D_i^{sh} = \colim B_i^{sh} \otimes_{A^{sh}} C^{sh} = B^{sh} \otimes_{A^{sh}} C^{sh} $$ since filtered colimits commute with tensor products. \medskip\noindent Case (3). We may replace $A$, $B$, $C$ by their localizations at $\mathfrak p_A$, $\mathfrak p_B$, and $\mathfrak p_C$. Thus (3) follows from (2). \medskip\noindent Since an integral ring map is a filtered colimit of finite ring maps, we see that (4) follows from (2) as well. \end{proof} \section{Serre's criterion for normality} \label{section-serre-criterion} % BEGIN ALGEBRA EDITORIAL ROUTE section-serre-criterion \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-serre-criterion}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-serre-criterion \noindent We introduce the following properties of Noetherian rings. \begin{definition} \label{definition-conditions} Let $R$ be a Noetherian ring. Let $k \geq 0$ be an integer. \begin{enumerate} \item We say $R$ has property {\it $(R_k)$} if for every prime $\mathfrak p$ of height $\leq k$ the local ring $R_{\mathfrak p}$ is regular. We also say that $R$ is {\it regular in codimension $\leq k$}. \item We say $R$ has property {\it $(S_k)$} if for every prime $\mathfrak p$ the local ring $R_{\mathfrak p}$ has depth at least $\min\{k, \dim(R_{\mathfrak p})\}$. \item Let $M$ be a finite $R$-module. We say $M$ has property $(S_k)$ if for every prime $\mathfrak p$ the module $M_{\mathfrak p}$ has depth at least $\min\{k, \dim(\text{Supp}(M_{\mathfrak p}))\}$. \end{enumerate} \end{definition} \noindent Any Noetherian ring has property $(S_0)$ and so does any finite module over it. Our convention that the depth of the zero module is $\infty$ (see Section \ref{section-depth}) and the dimension of the empty set is $-\infty$ (see Topology, Section \ref{topology-section-krull-dimension}) guarantees that the zero module has property $(S_k)$ for all $k$. \begin{lemma} \label{lemma-criterion-no-embedded-primes} Let $R$ be a Noetherian ring. Let $M$ be a finite $R$-module. The following are equivalent: \begin{enumerate} \item $M$ has no embedded associated prime, and \item $M$ has property $(S_1)$. \end{enumerate} \end{lemma} \begin{proof} Let $\mathfrak p$ be an embedded associated prime of $M$. Then there exists another associated prime $\mathfrak q$ of $M$ such that $\mathfrak p \supset \mathfrak q$. In particular this implies that $\dim(\text{Supp}(M_{\mathfrak p})) \geq 1$ (since $\mathfrak q$ is in the support as well). On the other hand $\mathfrak pR_{\mathfrak p}$ is associated to $M_{\mathfrak p}$ (Lemma \ref{lemma-associated-primes-localize}) and hence $\text{depth}(M_{\mathfrak p}) = 0$ (see Lemma \ref{lemma-ideal-nonzerodivisor}). In other words $(S_1)$ does not hold. Conversely, if $(S_1)$ does not hold then there exists a prime $\mathfrak p$ such that $\dim(\text{Supp}(M_{\mathfrak p})) \geq 1$ and $\text{depth}(M_{\mathfrak p}) = 0$. Since $\text{depth}(M_{\mathfrak p}) = 0$, we see that $\mathfrak p \in \text{Ass}(M)$ by the two Lemmas \ref{lemma-associated-primes-localize} and \ref{lemma-ideal-nonzerodivisor}. Since $\dim(\text{Supp}(M_{\mathfrak p})) \geq 1$, there is a prime $\mathfrak q \in \text{Supp}(M)$ with $\mathfrak q \subset \mathfrak p$, $\mathfrak q \not = \mathfrak p$. We can take such a $\mathfrak q$ that is minimal in $\text{Supp}(M)$. Then by Proposition \ref{proposition-minimal-primes-associated-primes} we have $\mathfrak q \in \text{Ass}(M)$ and hence $\mathfrak p$ is an embedded associated prime. \end{proof} \begin{lemma} \label{lemma-criterion-reduced} \begin{slogan} Reduced equals R0 plus S1. \end{slogan} Let $R$ be a Noetherian ring. The following are equivalent: \begin{enumerate} \item $R$ is reduced, and \item $R$ has properties $(R_0)$ and $(S_1)$. \end{enumerate} \end{lemma} \begin{proof} Suppose that $R$ is reduced. Then $R_{\mathfrak p}$ is a field for every minimal prime $\mathfrak p$ of $R$, according to Lemma \ref{lemma-minimal-prime-reduced-ring}. Hence we have $(R_0)$. Let $\mathfrak p$ be a prime of height $\geq 1$. Then $A = R_{\mathfrak p}$ is a reduced local ring of dimension $\geq 1$. Hence its maximal ideal $\mathfrak m$ is not an associated prime since this would mean there exists an $x \in \mathfrak m$ with annihilator $\mathfrak m$ so $x^2 = 0$. Hence the depth of $A = R_{\mathfrak p}$ is at least one, by Lemma \ref{lemma-ass-zero-divisors}. This shows that $(S_1)$ holds. \medskip\noindent Conversely, assume that $R$ satisfies $(R_0)$ and $(S_1)$. If $\mathfrak p$ is a minimal prime of $R$, then $R_{\mathfrak p}$ is a field by $(R_0)$, and hence is reduced. If $\mathfrak p$ is not minimal, then we see that $R_{\mathfrak p}$ has depth $\geq 1$ by $(S_1)$ and we conclude there exists an element $t \in \mathfrak pR_{\mathfrak p}$ such that $R_{\mathfrak p} \to R_{\mathfrak p}[1/t]$ is injective. Now $R_\mathfrak p[1/t]$ is contained in the product of its localizations at prime ideals, see Lemma \ref{lemma-characterize-zero-local}. This implies that $R_{\mathfrak p}$ is a subring of a product of localizations of $R$ at $\mathfrak p \supset \mathfrak q$ with $t \not \in \mathfrak q$. Since these primes have smaller height by induction on the height we conclude that $R$ is reduced. \end{proof} \begin{lemma}[Serre's criterion for normality] \label{lemma-criterion-normal} \begin{reference} \cite[IV, Theorem 5.8.6]{EGA} \end{reference} \begin{slogan} Normal equals R1 plus S2. \end{slogan} Let $R$ be a Noetherian ring. The following are equivalent: \begin{enumerate} \item $R$ is a normal ring, and \item $R$ has properties $(R_1)$ and $(S_2)$. \end{enumerate} \end{lemma} \begin{proof} Proof of (1) $\Rightarrow$ (2). Assume $R$ is normal, i.e., all localizations $R_{\mathfrak p}$ at primes are normal domains. In particular we see that $R$ has $(R_0)$ and $(S_1)$ by Lemma \ref{lemma-criterion-reduced}. Hence it suffices to show that a local Noetherian normal domain $R$ of dimension $d$ has depth $\geq \min(2, d)$ and is regular if $d = 1$. The assertion if $d = 1$ follows from Lemma \ref{lemma-characterize-dvr}. \medskip\noindent Let $R$ be a local Noetherian normal domain with maximal ideal $\mathfrak m$ and dimension $d \geq 2$. Apply Lemma \ref{lemma-hart-serre-loc-thm} to $R$. It is clear that $R$ does not fall into cases (1) or (2) of the lemma. Let $R \to R'$ as in (4) of the lemma. Since $R$ is a domain we have $R \subset R'$. Since $\mathfrak m$ is not an associated prime of $R'$ there exists an $x \in \mathfrak m$ which is a nonzerodivisor on $R'$. Then $R_x = R'_x$ so $R$ and $R'$ are domains with the same fraction field. But finiteness of $R \subset R'$ implies every element of $R'$ is integral over $R$ (Lemma \ref{lemma-finite-is-integral}) and we conclude that $R = R'$ as $R$ is normal. This means (4) does not happen. Thus we get the remaining possibility (3), i.e., $\text{depth}(R) \geq 2$ as desired. \medskip\noindent Proof of (2) $\Rightarrow$ (1). Assume $R$ satisfies $(R_1)$ and $(S_2)$. By Lemma \ref{lemma-criterion-reduced} we conclude that $R$ is reduced. Hence it suffices to show that if $R$ is a reduced local Noetherian ring of dimension $d$ satisfying $(S_2)$ and $(R_1)$ then $R$ is a normal domain. If $d = 0$, the result is clear. If $d = 1$, then the result follows from Lemma \ref{lemma-characterize-dvr}. \medskip\noindent Let $R$ be a reduced local Noetherian ring with maximal ideal $\mathfrak m$ and dimension $d \geq 2$ which satisfies $(R_1)$ and $(S_2)$. By Lemma \ref{lemma-characterize-reduced-ring-normal} it suffices to show that $R$ is integrally closed in its total ring of fractions $Q(R)$. Pick $x \in Q(R)$ which is integral over $R$. Then $R' = R[x]$ is a finite ring extension of $R$ (Lemma \ref{lemma-characterize-finite-in-terms-of-integral}). Because $\dim(R_\mathfrak p) < d$ for every nonmaximal prime $\mathfrak p \subset R$ we have $R_\mathfrak p = R'_\mathfrak p$ by induction. Hence the support of $R'/R$ is contained in $\{\mathfrak m\}$. It follows that $R'/R$ is annihilated by a power of $\mathfrak m$ (Lemma \ref{lemma-Noetherian-power-ideal-kills-module}). If $x \in R$, there is nothing to prove, so assume $x \notin R$. Then $R \to R'$ is not an isomorphism and has zero kernel. Since $\text{depth}(R) \geq 2$, there is a nonzerodivisor $t \in \mathfrak m$ on $R$. As $t$ is invertible in $Q(R)$, it is a nonzerodivisor on $R' \subset Q(R)$. Thus $\mathfrak m$ is not an associated prime of $R'$, and $R' \not = 0$. By~Lemma~\ref{lemma-hart-serre-loc-thm} this contradicts the assumption that the depth of $R$ is $\geq 2 = \min(2, d)$ and the proof is complete. \end{proof} \begin{lemma} \label{lemma-regular-normal} A regular ring is normal. \end{lemma} \begin{proof} Let $R$ be a regular ring. By Lemma \ref{lemma-criterion-normal} it suffices to prove that $R$ is $(R_1)$ and $(S_2)$. As a regular local ring is Cohen-Macaulay, see Lemma \ref{lemma-regular-ring-CM}, it is clear that $R$ is $(S_2)$. Property $(R_1)$ is immediate. \end{proof} \begin{lemma} \label{lemma-normal-domain-intersection-localizations-height-1} Let $R$ be a Noetherian normal domain with fraction field $K$. Then \begin{enumerate} \item for any nonzero $a \in R$ the quotient $R/aR$ has no embedded primes, and all its associated primes have height $1$. \item $$ R = \bigcap\nolimits_{\text{height}(\mathfrak p) = 1} R_{\mathfrak p} $$ \item For any nonzero $x \in K$ the quotient $R/(R \cap xR)$ has no embedded primes, and all its associated primes have height $1$. \end{enumerate} \end{lemma} \begin{proof} By Lemma \ref{lemma-criterion-normal} we see that $R$ has $(S_2)$. Hence for any nonzero element $a \in R$ we see that $R/aR$ has $(S_1)$ (use Lemma \ref{lemma-depth-in-ses} for example). Hence $R/aR$ has no embedded primes (Lemma \ref{lemma-criterion-no-embedded-primes}). We conclude the associated primes of $R/aR$ are exactly the minimal primes $\mathfrak p$ over $(a)$, which have height $1$ as $a$ is not zero (Lemma \ref{lemma-minimal-over-1}). This proves (1). \medskip\noindent Thus, given $b \in R$ we have $b \in aR$ if and only if $b \in aR_{\mathfrak p}$ for every minimal prime $\mathfrak p$ over $(a)$ (see Lemma \ref{lemma-zero-at-ass-zero}). These primes all have height $1$ as seen above so $b/a \in R$ if and only if $b/a \in R_{\mathfrak p}$ for all height 1 primes. Hence (2) holds. \medskip\noindent For (3) write $x = a/b$. Let $\mathfrak p_1, \ldots, \mathfrak p_r$ be the minimal primes over $(ab)$. These all have height 1 by the above. Then we see that $R \cap xR = \bigcap_{i = 1, \ldots, r} (R \cap xR_{\mathfrak p_i})$ by part (2) of the lemma. Hence $R/(R \cap xR)$ is a submodule of $\bigoplus R/(R \cap xR_{\mathfrak p_i})$. As $R_{\mathfrak p_i}$ is a discrete valuation ring (by property $(R_1)$ for the Noetherian normal domain $R$, see Lemma \ref{lemma-criterion-normal}) we have $xR_{\mathfrak p_i} = \mathfrak p_i^{e_i}R_{\mathfrak p_i}$ for some $e_i \in \mathbf{Z}$. Hence the direct sum is equal to $\bigoplus_{e_i > 0} R/\mathfrak p_i^{(e_i)}$, see Definition \ref{definition-symbolic-power}. By Lemma \ref{lemma-symbolic-power-associated} the only associated prime of the module $R/\mathfrak p^{(n)}$ is $\mathfrak p$. Hence the set of associated primes of $R/(R \cap xR)$ is a subset of $\{\mathfrak p_i\}$ and there are no inclusion relations among them. This proves (3). \end{proof} \section{Formal smoothness of fields} \label{section-p-bases} % BEGIN ALGEBRA EDITORIAL ROUTE section-p-bases \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-p-bases}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-p-bases \noindent In this section we show that field extensions are formally smooth if and only if they are separable. However, we first prove finitely generated field extensions are separable algebraic if and only if they are formally unramified. \begin{lemma} \label{lemma-characterize-separable-algebraic-field-extensions} Let $K/k$ be a finitely generated field extension. The following are equivalent \begin{enumerate} \item $K$ is a finite separable field extension of $k$, \item $\Omega_{K/k} = 0$, \item $K$ is formally unramified over $k$, \item $K$ is unramified over $k$, \item $K$ is formally \'etale over $k$, \item $K$ is \'etale over $k$. \end{enumerate} \end{lemma} \begin{proof} The equivalence of (2) and (3) is Lemma \ref{lemma-characterize-formally-unramified}. By Lemma \ref{lemma-etale-over-field} we see that (1) is equivalent to (6). Property (6) implies (5) and (4) which both in turn imply (3) (Lemmas \ref{lemma-formally-etale-etale}, \ref{lemma-unramified}, and \ref{lemma-formally-unramified-unramified}). Thus it suffices to show that (2) implies (1). Choose a finitely generated $k$-subalgebra $A \subset K$ such that $K$ is the fraction field of the domain $A$. Set $S = A \setminus \{0\}$. Since $0 = \Omega_{K/k} = S^{-1}\Omega_{A/k}$ (Lemma \ref{lemma-differentials-localize}) and since $\Omega_{A/k}$ is finitely generated (Lemma \ref{lemma-differentials-finitely-generated}), we can replace $A$ by a localization $A_f$ to reduce to the case that $\Omega_{A/k} = 0$ (details omitted). Then $A$ is unramified over $k$, hence $K/k$ is finite separable for example by Lemma \ref{lemma-unramified-at-prime} applied with $\mathfrak q = (0)$. \end{proof} \begin{lemma} \label{lemma-derivative-zero-pth-power} Let $k$ be a perfect field of characteristic $p > 0$. Let $K/k$ be an extension. Let $a \in K$. Then $\text{d}a = 0$ in $\Omega_{K/k}$ if and only if $a$ is a $p$th power. \end{lemma} \begin{proof} By Lemma \ref{lemma-colimit-differentials} we see that there exists a subfield $k \subset L \subset K$ such that $L/k$ is a finitely generated field extension and such that $\text{d}a$ is zero in $\Omega_{L/k}$. Hence we may assume that $K$ is a finitely generated field extension of $k$. \medskip\noindent Choose a transcendence basis $x_1, \ldots, x_r \in K$ such that $K$ is finite separable over $k(x_1, \ldots, x_r)$. This is possible by the definitions, see Definitions \ref{definition-perfect} and \ref{definition-separable-field-extension}. We remark that the result holds for the purely transcendental subfield $k(x_1, \ldots, x_r) \subset K$. Namely, $$ \Omega_{k(x_1, \ldots, x_r)/k} = \bigoplus\nolimits_{i = 1}^r k(x_1, \ldots, x_r) \text{d}x_i $$ and any rational function all of whose partial derivatives are zero is a $p$th power. Moreover, we also have $$ \Omega_{K/k} = \bigoplus\nolimits_{i = 1}^r K\text{d}x_i $$ since $k(x_1, \ldots, x_r) \subset K$ is finite separable (computation omitted). Suppose $a \in K$ is an element such that $\text{d}a = 0$ in the module of differentials. By our choice of $x_i$ we see that the minimal polynomial $P(T) \in k(x_1, \ldots, x_r)[T]$ of $a$ is separable. Write $$ P(T) = T^d + \sum\nolimits_{i = 1}^d a_i T^{d - i} $$ and hence $$ 0 = \text{d}P(a) = \sum\nolimits_{i = 1}^d a^{d - i}\text{d}a_i $$ in $\Omega_{K/k}$. By the description of $\Omega_{K/k}$ above and the fact that $P$ was the minimal polynomial of $a$, we see that this implies $\text{d}a_i = 0$. Hence $a_i = b_i^p$ for each $i$. Therefore by Fields, Lemma \ref{fields-lemma-pth-root} we see that $a$ is a $p$th power. \end{proof} \begin{lemma} \label{lemma-size-extension-pth-roots} Let $k$ be a field of characteristic $p > 0$. Let $a_1, \ldots, a_n \in k$ be elements such that $\text{d}a_1, \ldots, \text{d}a_n$ are linearly independent in $\Omega_{k/\mathbf{F}_p}$. Then the field extension $k(a_1^{1/p}, \ldots, a_n^{1/p})$ has degree $p^n$ over $k$. \end{lemma} \begin{proof} By induction on $n$. If $n = 1$ the result is Lemma \ref{lemma-derivative-zero-pth-power}. For the induction step, suppose that $k(a_1^{1/p}, \ldots, a_{n - 1}^{1/p})$ has degree $p^{n - 1}$ over $k$. We have to show that $a_n$ does not map to a $p$th power in $k(a_1^{1/p}, \ldots, a_{n - 1}^{1/p})$. If it does then we can write \begin{align*} a_n & = \left(\sum\nolimits_{I = (i_1, \ldots, i_{n - 1}),\ 0 \leq i_j \leq p - 1} \lambda_I a_1^{i_1/p} \ldots a_{n - 1}^{i_{n - 1}/p}\right)^p \\ & = \sum\nolimits_{I = (i_1, \ldots, i_{n - 1}),\ 0 \leq i_j \leq p - 1} \lambda_I^p a_1^{i_1} \ldots a_{n - 1}^{i_{n - 1}} \end{align*} Applying $\text{d}$ we see that $\text{d}a_n$ is linearly dependent on $\text{d}a_i$, $i < n$. This is a contradiction. \end{proof} \begin{lemma} \label{lemma-separable-differentials} Let $k$ be a field of characteristic $p > 0$. Let $K/k$ be a field extension. The following are equivalent: \begin{enumerate} \item the field extension $K/k$ is separable (see Definition \ref{definition-separable-field-extension}), and \item the map $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective. \end{enumerate} \end{lemma} \begin{proof} Write $K$ as a directed colimit $K = \colim_i K_i$ of finitely generated field extensions $K_i/k$. By definition $K$ is separable if and only if each $K_i$ is separable over $k$, and by Lemma \ref{lemma-colimit-differentials} we see that $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective if and only if each $K_i \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K_i/\mathbf{F}_p}$ is injective. Hence we may assume that $K/k$ is a finitely generated field extension. \medskip\noindent Assume $K/k$ is a finitely generated field extension which is separable. Choose $x_1, \ldots, x_{r + 1} \in K$ as in Lemma \ref{lemma-generating-finitely-generated-separable-field-extensions}. In this case there exists an irreducible polynomial $G(X_1, \ldots, X_{r + 1}) \in k[X_1, \ldots, X_{r + 1}]$ such that $G(x_1, \ldots, x_{r + 1}) = 0$ and such that $\partial G/\partial X_{r + 1}$ is not identically zero. Moreover $K$ is the field of fractions of the domain $S = k[X_1, \ldots, X_{r + 1}]/(G)$. Write $$ G = \sum a_I X^I, \quad X^I = X_1^{i_1}\ldots X_{r + 1}^{i_{r + 1}}. $$ Using the presentation of $S$ above we see that $$ \Omega_{S/\mathbf{F}_p} = \frac{ S \otimes_k \Omega_{k/\mathbf{F}_p} \oplus \bigoplus\nolimits_{i = 1, \ldots, r + 1} S\text{d}X_i }{ \langle \sum X^I \text{d}a_I + \sum \partial G/\partial X_i \text{d}X_i \rangle } $$ Since $\Omega_{K/\mathbf{F}_p}$ is the localization of the $S$-module $\Omega_{S/\mathbf{F}_p}$ (see Lemma \ref{lemma-differentials-localize}) we conclude that $$ \Omega_{K/\mathbf{F}_p} = \frac{ K \otimes_k \Omega_{k/\mathbf{F}_p} \oplus \bigoplus\nolimits_{i = 1, \ldots, r + 1} K\text{d}X_i }{ \langle \sum X^I \text{d}a_I + \sum \partial G/\partial X_i \text{d}X_i \rangle } $$ Now, since the polynomial $\partial G/\partial X_{r + 1}$ is not identically zero we conclude that the map $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective as desired. \medskip\noindent Assume $K/k$ is a finitely generated field extension and that $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective. (This part of the proof is the same as the argument proving Lemma \ref{lemma-characterize-separable-field-extensions}.) Let $x_1, \ldots, x_r$ be a transcendence basis of $K$ over $k$ such that the degree of inseparability of the finite extension $k(x_1, \ldots, x_r) \subset K$ is minimal. If $K$ is separable over $k(x_1, \ldots, x_r)$ then we win. Assume this is not the case to get a contradiction. Then there exists an element $\alpha \in K$ which is not separable over $k(x_1, \ldots, x_r)$. Let $P(T) \in k(x_1, \ldots, x_r)[T]$ be its minimal polynomial. Because $\alpha$ is not separable actually $P$ is a polynomial in $T^p$. Clear denominators to get an irreducible polynomial $$ G(X_1, \ldots, X_r, T) = \sum a_{I, i} X^I T^i \in k[X_1, \ldots, X_r, T] $$ such that $G(x_1, \ldots, x_r, \alpha) = 0$ in $K$. Note that this means $k[X_1, \ldots, X_r, T]/(G) \subset K$. We may assume that for some pair $(I_0, i_0)$ the coefficient $a_{I_0, i_0} = 1$. We claim that $\text{d}G/\text{d}X_i$ is not identically zero for at least one $i$. Namely, if this is not the case, then $G$ is actually a polynomial in $X_1^p, \ldots, X_r^p, T^p$. Then this means that $$ \sum\nolimits_{(I, i) \not = (I_0, i_0)} x^I\alpha^i \text{d}a_{I, i} $$ is zero in $\Omega_{K/\mathbf{F}_p}$. Note that there is no $k$-linear relation among the elements $$ \{x^I\alpha^i \mid a_{I, i} \not = 0 \text{ and } (I, i) \not = (I_0, i_0)\} $$ of $K$. Hence the assumption that $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective implies that $\text{d}a_{I, i} = 0$ in $\Omega_{k/\mathbf{F}_p}$ for all $(I, i)$. By Lemma \ref{lemma-derivative-zero-pth-power} we see that each $a_{I, i}$ is a $p$th power, which implies that $G$ is a $p$th power contradicting the irreducibility of $G$. Thus, after renumbering, we may assume that $\text{d}G/\text{d}X_1$ is not zero. Then we see that $x_1$ is separably algebraic over $k(x_2, \ldots, x_r, \alpha)$, and that $x_2, \ldots, x_r, \alpha$ is a transcendence basis of $K$ over $k$. This means that the degree of inseparability of the finite extension $k(x_2, \ldots, x_r, \alpha) \subset K$ is less than the degree of inseparability of the finite extension $k(x_1, \ldots, x_r) \subset K$, which is a contradiction. \end{proof} \begin{lemma} \label{lemma-formally-smooth-implies-separable} Let $K/k$ be an extension of fields. If $K$ is formally smooth over $k$, then $K$ is a separable extension of $k$. \end{lemma} \begin{proof} Assume $K$ is formally smooth over $k$. If $k$ has characteristic zero, then $K/k$ is separable. Thus we may assume that $k$ has characteristic $p > 0$. By Lemma \ref{lemma-ses-formally-smooth} we see that $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective. Hence $K$ is separable over $k$ by Lemma \ref{lemma-separable-differentials}. \end{proof} \begin{lemma} \label{lemma-characterize-formally-smooth-field-extension} Let $K/k$ be an extension of fields. Then $K$ is formally smooth over $k$ if and only if $H_1(L_{K/k}) = 0$. \end{lemma} \begin{proof} This follows from Proposition \ref{proposition-characterize-formally-smooth} and the fact that a vector space is free (hence projective). \end{proof} \begin{lemma} \label{lemma-formally-smooth-extensions-easy} Let $K/k$ be an extension of fields. \begin{enumerate} \item If $K$ is purely transcendental over $k$, then $K$ is formally smooth over $k$. \item If $K$ is separable algebraic over $k$, then $K$ is formally smooth over $k$. \item If $K$ is separable over $k$, then $K$ is formally smooth over $k$. \end{enumerate} \end{lemma} \begin{proof} For (1) write $K = k(x_j; j \in J)$. Suppose that $A$ is a $k$-algebra, and $I \subset A$ is an ideal of square zero. Let $\varphi : K \to A/I$ be a $k$-algebra map. Let $a_j \in A$ be an element such that $a_j \mod I = \varphi(x_j)$. Then it is easy to see that there is a unique $k$-algebra map $K \to A$ which maps $x_j$ to $a_j$ and which reduces to $\varphi$ mod $I$. Hence $k \subset K$ is formally smooth. \medskip\noindent In case (2) we see that $k \subset K$ is a colimit of \'etale ring extensions. An \'etale ring map is formally \'etale (Lemma \ref{lemma-formally-etale-etale}). Hence this case follows from Lemma \ref{lemma-colimit-formally-etale} and the trivial observation that a formally \'etale ring map is formally smooth. \medskip\noindent In case (3), write $K = \colim K_i$ as the filtered colimit of its finitely generated $k$-subextensions. By Definition \ref{definition-separable-field-extension} each $K_i$ is separable algebraic over a purely transcendental extension of $k$. Hence $K_i/k$ is formally smooth by cases (1) and (2) and Lemma \ref{lemma-compose-formally-smooth}. Thus $H_1(L_{K_i/k}) = 0$ by Lemma \ref{lemma-characterize-formally-smooth-field-extension}. Hence $H_1(L_{K/k}) = 0$ by Lemma \ref{lemma-colimits-NL}. Hence $K/k$ is formally smooth by Lemma \ref{lemma-characterize-formally-smooth-field-extension} again. \end{proof} \begin{lemma} \label{lemma-fields-are-formally-smooth} \begin{slogan} Formally smooth equals separable for field extensions. \end{slogan} Let $k$ be a field. \begin{enumerate} \item If the characteristic of $k$ is zero, then any extension field of $k$ is formally smooth over $k$. \item If the characteristic of $k$ is $p > 0$, then $K/k$ is formally smooth if and only if it is a separable field extension. \end{enumerate} \end{lemma} \begin{proof} Combine Lemmas \ref{lemma-formally-smooth-implies-separable} and \ref{lemma-formally-smooth-extensions-easy}. \end{proof} \noindent Here we put together all the different characterizations of separable field extensions. \begin{proposition} \label{proposition-characterize-separable-field-extensions} Let $K/k$ be a field extension. If the characteristic of $k$ is zero then \begin{enumerate} \item $K$ is separable over $k$, \item $K$ is geometrically reduced over $k$, \item $K$ is formally smooth over $k$, \item $H_1(L_{K/k}) = 0$, and \item the map $K \otimes_k \Omega_{k/\mathbf{Z}} \to \Omega_{K/\mathbf{Z}}$ is injective. \end{enumerate} If the characteristic of $k$ is $p > 0$, then the following are equivalent: \begin{enumerate} \item $K$ is separable over $k$, \item the ring $K \otimes_k k^{1/p}$ is reduced, \item $K$ is geometrically reduced over $k$, \item the map $K \otimes_k \Omega_{k/\mathbf{F}_p} \to \Omega_{K/\mathbf{F}_p}$ is injective, \item $H_1(L_{K/k}) = 0$, and \item $K$ is formally smooth over $k$. \end{enumerate} \end{proposition} \begin{proof} This is a combination of Lemmas \ref{lemma-characterize-separable-field-extensions}, \ref{lemma-fields-are-formally-smooth}, \ref{lemma-characterize-formally-smooth-field-extension}, \ref{lemma-formally-smooth-implies-separable}, and \ref{lemma-separable-differentials}. \end{proof} \noindent Here is yet another characterization of finitely generated separable field extensions. \begin{lemma} \label{lemma-localization-smooth-separable} Let $K/k$ be a finitely generated field extension. Then $K$ is separable over $k$ if and only if $K$ is the localization of a smooth $k$-algebra. \end{lemma} \begin{proof} Choose a finite type $k$-algebra $R$ which is a domain whose fraction field is $K$. Lemma \ref{lemma-smooth-at-generic-point} says that $k \to R$ is smooth at $(0)$ if and only if $K/k$ is separable. This proves the lemma. \end{proof} \begin{lemma} \label{lemma-colimit-syntomic} Let $K/k$ be a field extension. Then $K$ is a filtered colimit of global complete intersection algebras over $k$. If $K/k$ is separable, then $K$ is a filtered colimit of smooth algebras over $k$. \end{lemma} \begin{proof} Suppose that $E \subset K$ is a finite subset. It suffices to show that there exists a $k$ subalgebra $A \subset K$ which contains $E$ and which is a global complete intersection (resp.\ smooth) over $k$. The separable/smooth case follows from Lemma \ref{lemma-localization-smooth-separable}. In general let $L \subset K$ be the subfield generated by $E$. Pick a transcendence basis $x_1, \ldots, x_d \in L$ over $k$. The extension $L/k(x_1, \ldots, x_d)$ is finite. Say $L = k(x_1, \ldots, x_d)[y_1, \ldots, y_r]$. Pick inductively polynomials $P_i \in k(x_1, \ldots, x_d)[Y_1, \ldots, Y_r]$ such that $P_i = P_i(Y_1, \ldots, Y_i)$ is monic in $Y_i$ over $k(x_1, \ldots, x_d)[Y_1, \ldots, Y_{i - 1}]$ and maps to the minimal polynomial of $y_i$ in $k(x_1, \ldots, x_d)[y_1, \ldots, y_{i - 1}][Y_i]$. Then it is clear that $P_1, \ldots, P_r$ are a regular sequence in $k(x_1, \ldots, x_d)[Y_1, \ldots, Y_r]$ and that $L = k(x_1, \ldots, x_d)[Y_1, \ldots, Y_r]/(P_1, \ldots, P_r)$. If $h \in k[x_1, \ldots, x_d]$ is a polynomial such that $P_i \in k[x_1, \ldots, x_d, 1/h, Y_1, \ldots, Y_r]$, then we see that $P_1, \ldots, P_r$ is a regular sequence in $k[x_1, \ldots, x_d, 1/h, Y_1, \ldots, Y_r]$ and $A = k[x_1, \ldots, x_d, 1/h, Y_1, \ldots, Y_r]/(P_1, \ldots, P_r)$ is a global complete intersection. After adjusting our choice of $h$ we may assume $E \subset A$ and we win. \end{proof} \section{Constructing flat ring maps} \label{section-constructing-flat} % BEGIN ALGEBRA EDITORIAL ROUTE section-constructing-flat \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-constructing-flat}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-constructing-flat \noindent The following lemma is occasionally useful. \begin{lemma} \label{lemma-flat-local-given-residue-field} Let $(R, \mathfrak m, k)$ be a local ring. Let $K/k$ be a field extension. There exists a local ring $(R', \mathfrak m', k')$, a flat local ring map $R \to R'$ such that $\mathfrak m' = \mathfrak mR'$ and such that $k'$ is isomorphic to $K$ as an extension of $k$. \end{lemma} \begin{proof} Suppose that $k' = k(\alpha)$ is a monogenic extension of $k$. Then $k'$ is the residue field of a flat local extension $R \subset R'$ as in the lemma. Namely, if $\alpha$ is transcendental over $k$, then we let $R'$ be the localization of $R[x]$ at the prime $\mathfrak mR[x]$. If $\alpha$ is algebraic with minimal polynomial $T^d + \sum \overline{\lambda}_iT^{d - i}$, then we let $R' = R[T]/(T^d + \sum \lambda_i T^{d - i})$. \medskip\noindent Consider the collection of triples $(k', R \to R', \phi)$, where $k \subset k' \subset K$ is a subfield, $R \to R'$ is a local ring map as in the lemma, and $\phi : R' \to k'$ induces an isomorphism $R'/\mathfrak mR' \cong k'$ of $k$-extensions. These form a ``big'' category $\mathcal{C}$ with morphisms $(k_1, R_1, \phi_1) \to (k_2, R_2, \phi_2)$ given by $R$-algebra maps $\psi : R_1 \to R_2$ such that $$ \xymatrix{ R_1 \ar[d]_\psi \ar[r]_{\phi_1} & k_1 \ar[r] & K \ar@{=}[d] \\ R_2 \ar[r]^{\phi_2} & k_2 \ar[r] & K } $$ commutes. This implies that $k_1 \subset k_2$. \medskip\noindent Suppose that $I$ is a directed set, and $((k_i, R_i, \phi_i), \psi_{ii'})$ is a system over $I$, see Categories, Section \ref{categories-section-posets-limits}. In this case we can consider $$ R' = \colim_{i \in I} R_i $$ This is a local ring with maximal ideal $\mathfrak mR'$, and residue field $k' = \bigcup_{i \in I} k_i$. Moreover, the ring map $R \to R'$ is flat as it is a colimit of flat maps (and tensor products commute with directed colimits). Hence we see that $(k', R', \phi')$ is an ``upper bound'' for the system. \medskip\noindent An almost trivial application of Zorn's Lemma would finish the proof if $\mathcal{C}$ was a set, but it isn't. (Actually, you can make this work by finding a reasonable bound on the cardinals of the local rings occurring.) To get around this problem we choose a well ordering on $K$ with a greatest element. For $x \in K$ we let $K(x)$ be the subfield of $K$ generated over $k$ by all elements of $K$ which are $\leq x$. By transfinite recursion on $x \in K$ we will produce ring maps $R \subset R(x)$ as in the lemma with residue field extension $K(x)/k$. Moreover, by construction we will have that $R(x)$ will contain $R(y)$ for all $y \leq x$. Namely, if $x$ has a predecessor $x'$, then $K(x) = K(x')(x)$ and hence we can let $R(x') \subset R(x)$ be the local ring extension constructed in the first paragraph of the proof. If $x$ does not have a predecessor, then we set $R'(x) = R$ and $K'(x) = k$ if $x$ is the least element. Otherwise, we set $R'(x) = \colim_{x' < x} R(x')$ as in the third paragraph of the proof. In this case the residue field of $R'(x)$ is $K'(x) = \bigcup_{x' < x} K(x')$. Since $K(x) = K'(x)(x)$ we see that we can use the construction of the first paragraph of the proof to produce $R'(x) \subset R(x)$. For the greatest element $x$ of the chosen ordering we have $K(x) = K$. Thus $R(x)$ is the extension required by the lemma. \end{proof} \begin{lemma} \label{lemma-colimit-finite-etale-given-residue-field} Let $(R, \mathfrak m, k)$ be a local ring. If $k \subset K$ is a separable algebraic extension, then there exists a directed set $I$ and a system of finite \'etale extensions $R \subset R_i$, $i \in I$ of local rings such that $R' = \colim R_i$ has residue field $K$ (as extension of $k$). \end{lemma} \begin{proof} Let $R \subset R'$ be the extension constructed in the proof of Lemma \ref{lemma-flat-local-given-residue-field}. By construction $R' = \colim_{\alpha \in A} R_\alpha$ where $A$ is a well-ordered set and the transition maps $R_\alpha \to R_{\alpha + 1}$ are finite \'etale and $R_\alpha = \colim_{\beta < \alpha} R_\beta$ if $\alpha$ is not a successor. We will prove the result by transfinite induction. \medskip\noindent Suppose the result holds for $R_\alpha$, i.e., $R_\alpha = \colim R_i$ with $R_i$ finite \'etale over $R$. Since $R_\alpha \to R_{\alpha + 1}$ is finite \'etale there exists an $i$ and a finite \'etale extension $R_i \to R_{i, 1}$ such that $R_{\alpha + 1} = R_\alpha \otimes_{R_i} R_{i, 1}$. The map $R_i \to R_\alpha$ is flat local, hence faithfully flat. Since $R_{\alpha + 1}$ is the base change of $R_{i, 1}$, faithfully flat descent of locality shows that $R_{i, 1}$ is local. More generally, for every $i' \geq i$, the map $R_{i'} \to R_\alpha$ is flat local, hence faithfully flat, and the base change of $R_{i'} \otimes_{R_i} R_{i, 1}$ to $R_\alpha$ is $R_{\alpha + 1}$. Hence all these rings are local, and $R_{\alpha + 1} = \colim_{i' \geq i} R_{i'} \otimes_{R_i} R_{i, 1}$. Thus the result holds for $\alpha + 1$. Suppose $\alpha$ is not a successor and the result holds for $R_\beta$ for all $\beta < \alpha$. Since every finite subset $E \subset R_\alpha$ is contained in $R_\beta$ for some $\beta < \alpha$, we see that $E$ is contained in a finite \'etale subextension by assumption. Thus the result holds for $R_\alpha$. \end{proof} \begin{lemma} \label{lemma-finite-free-given-residue-field-extension} Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime and let $L/\kappa(\mathfrak p)$ be a finite extension of fields. Then there exists a finite free ring map $R \to S$ such that $\mathfrak q = \mathfrak pS$ is prime and $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is isomorphic to the given extension $L/\kappa(\mathfrak p)$. \end{lemma} \begin{proof} By induction on the degree of $\kappa(\mathfrak p) \subset L$. If the degree is $1$, then we take $R = S$. In general, if there exists a sub extension $\kappa(\mathfrak p) \subset L' \subset L$ with both inclusions strict, then we win by induction on the degree (by first constructing $R \subset S'$ corresponding to $L'/\kappa(\mathfrak p)$ and then constructing $S' \subset S$ corresponding to $L/L'$). Thus we may assume that $L \supset \kappa(\mathfrak p)$ is generated by a single element $\alpha \in L$. Let $X^d + \sum_{i < d} a_iX^i$ be the minimal polynomial of $\alpha$ over $\kappa(\mathfrak p)$, so $a_i \in \kappa(\mathfrak p)$. We may write $a_i$ as the image of $f_i/g$ for some $f_i, g \in R$ and $g \not \in \mathfrak p$. After replacing $\alpha$ by $g\alpha$ (and correspondingly replacing $a_i$ by $g^{d - i}a_i$) we may assume that $a_i$ is the image of some $f_i \in R$. Then we simply take $S = R[x]/(x^d + \sum f_ix^i)$. \end{proof} \begin{lemma} \label{lemma-cofinal-system-flat} Let $A$ be a ring. Let $\kappa = \max(|A|, \aleph_0)$. Then every flat $A$-algebra $B$ is the filtered colimit of its flat $A$-subalgebras $B' \subset B$ of cardinality $|B'| \leq \kappa$. (Observe that $B'$ is faithfully flat over $A$ if $B$ is faithfully flat over $A$.) \end{lemma} \begin{proof} If $B$ has cardinality $\leq \kappa$ then this is true. Let $E \subset B$ be an $A$-subalgebra with $|E| \leq \kappa$. We will show that $E$ is contained in a flat $A$-subalgebra $B'$ with $|B'| \leq \kappa$. The lemma follows because (a) every finite subset of $B$ is contained in an $A$-subalgebra of cardinality at most $\kappa$ and (b) every pair of $A$-subalgebras of $B$ of cardinality at most $\kappa$ is contained in an $A$-subalgebra of cardinality at most $\kappa$. Details omitted. \medskip\noindent We will inductively construct a sequence of $A$-subalgebras $$ E = E_0 \subset E_1 \subset E_2 \subset \ldots $$ each having cardinality $\leq \kappa$ and we will show that $B' = \bigcup E_k$ is flat over $A$ to finish the proof. \medskip\noindent The construction is as follows. Set $E_0 = E$. Given $E_k$ for $k \geq 0$ we consider the set $S_k$ of relations between elements of $E_k$ with coefficients in $A$. Thus an element $s \in S_k$ is given by an integer $n \geq 1$ and $a_1, \ldots, a_n \in A$, and $e_1, \ldots, e_n \in E_k$ such that $\sum a_i e_i = 0$ in $E_k$. The flatness of $A \to B$ implies by Lemma \ref{lemma-flat-eq} that for every $s = (n, a_1, \ldots, a_n, e_1, \ldots, e_n) \in S_k$ we may choose $$ (m_s, b_{s, 1}, \ldots, b_{s, m_s}, a_{s, 11}, \ldots, a_{s, nm_s}) $$ where $m_s \geq 0$ is an integer, $b_{s, j} \in B$, $a_{s, ij} \in A$, and $$ e_i = \sum\nolimits_j a_{s, ij} b_{s, j}, \forall i, \quad\text{and}\quad 0 = \sum\nolimits_i a_i a_{s, ij}, \forall j. $$ Given these choices, we let $E_{k + 1} \subset B$ be the $A$-subalgebra generated by \begin{enumerate} \item $E_k$ and \item the elements $b_{s, 1}, \ldots, b_{s, m_s}$ for every $s \in S_k$. \end{enumerate} Some set theory (omitted) shows that $E_{k + 1}$ has cardinality at most $\kappa$ (this uses that we inductively know $|E_k| \leq \kappa$ and consequently the cardinality of $S_k$ is also at most $\kappa$). \medskip\noindent To show that $B' = \bigcup E_k$ is flat over $A$ we consider a relation $\sum_{i = 1, \ldots, n} a_i b'_i = 0$ in $B'$ with coefficients in $A$. Choose $k$ large enough so that $b'_i \in E_k$ for $i = 1, \ldots, n$. Then $(n, a_1, \ldots, a_n, b'_1, \ldots, b'_n) \in S_k$ and hence we see that the relation is trivial in $E_{k + 1}$ and a fortiori in $B'$. Thus $A \to B'$ is flat by Lemma \ref{lemma-flat-eq}. \end{proof} \section{The Cohen structure theorem} \label{section-cohen-structure-theorem} % BEGIN ALGEBRA EDITORIAL ROUTE section-cohen-structure-theorem \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-cohen-structure-theorem}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-cohen-structure-theorem \noindent Here is a fundamental notion in commutative algebra. \begin{definition} \label{definition-complete-local-ring} Let $(R, \mathfrak m)$ be a local ring. We say $R$ is a {\it complete local ring} if the canonical map $$ R \longrightarrow \lim_n R/\mathfrak m^n $$ to the completion of $R$ with respect to $\mathfrak m$ is an isomorphism\footnote{This includes the condition that $\bigcap \mathfrak m^n = (0)$; in some texts this may be indicated by saying that $R$ is complete and separated. Warning: It can happen that the completion $\lim_n R/\mathfrak m^n$ of a local ring is non-complete, see Examples, Lemma \ref{examples-lemma-noncomplete-completion}. This does not happen when $\mathfrak m$ is finitely generated; see Lemma \ref{lemma-hathat-finitely-generated}. In this case the completion is Noetherian; see Lemma \ref{lemma-completion-Noetherian}.}. \end{definition} \noindent Note that an Artinian local ring $R$ is a complete local ring because $\mathfrak m_R^n = 0$ for some $n > 0$. In this section we mostly focus on Noetherian complete local rings. \begin{lemma} \label{lemma-quotient-complete-local} Let $R$ be a Noetherian complete local ring. Any quotient of $R$ by a proper ideal is also a Noetherian complete local ring. Given a finite ring map $R \to S$, $S$ is a product of Noetherian complete local rings. \end{lemma} \begin{proof} The ring $S$ is Noetherian by Lemma \ref{lemma-Noetherian-permanence}. As an $R$-module $S$ is complete by Lemma \ref{lemma-completion-tensor}. Hence $S$ is the product of the completions at its maximal ideals by Lemma \ref{lemma-completion-finite-extension}. \end{proof} \begin{lemma} \label{lemma-complete-local-ring-Noetherian} Let $(R, \mathfrak m)$ be a complete local ring. If $\mathfrak m$ is a finitely generated ideal then $R$ is Noetherian. \end{lemma} \begin{proof} See Lemma \ref{lemma-completion-Noetherian}. \end{proof} \begin{definition} \label{definition-coefficient-ring} Let $(R, \mathfrak m)$ be a complete local ring. A subring $\Lambda \subset R$ is called a {\it coefficient ring} if the following conditions hold: \begin{enumerate} \item $\Lambda$ is a complete local ring with maximal ideal $\Lambda \cap \mathfrak m$, \item the residue field of $\Lambda$ maps isomorphically to the residue field of $R$, and \item $\Lambda \cap \mathfrak m = p\Lambda$, where $p$ is the characteristic of the residue field of $R$. \end{enumerate} \end{definition} \noindent Let us make some remarks on this definition. We split the discussion into the following cases: \begin{enumerate} \item The local ring $R$ contains a field. This happens if either $\mathbf{Q} \subset R$, or $pR = 0$ where $p$ is the characteristic of $R/\mathfrak m$. In this case a coefficient ring $\Lambda$ is a field contained in $R$ which maps isomorphically to $R/\mathfrak m$. \item The characteristic of $R/\mathfrak m$ is $p > 0$ but no power of $p$ is zero in $R$. In this case $\Lambda$ is a complete discrete valuation ring with uniformizer $p$ and residue field $R/\mathfrak m$. \item The characteristic of $R/\mathfrak m$ is $p > 0$, and for some $n > 1$ we have $p^{n - 1} \not = 0$, $p^n = 0$ in $R$. In this case $\Lambda$ is an Artinian local ring whose maximal ideal is generated by $p$ and which has residue field $R/\mathfrak m$. \end{enumerate} The complete discrete valuation rings with uniformizer $p$ above play a special role and we baptize them as follows. \begin{definition} \label{definition-cohen-ring} A {\it Cohen ring} is a complete discrete valuation ring whose uniformizer $p$ is a prime number. \end{definition} \begin{lemma} \label{lemma-cohen-rings-exist} Let $p$ be a prime number. Let $k$ be a field of characteristic $p$. There exists a Cohen ring $\Lambda$ with $\Lambda/p\Lambda \cong k$. \end{lemma} \begin{proof} First note that the $p$-adic integers $\mathbf{Z}_p$ form a Cohen ring for $\mathbf{F}_p$. Let $k$ be an arbitrary field of characteristic $p$. Let $\mathbf{Z}_p \to R$ be a flat local ring map such that $\mathfrak m_R = pR$ and $R/pR = k$, see Lemma \ref{lemma-flat-local-given-residue-field}. By Lemma \ref{lemma-completion-Noetherian} the completion $\Lambda = R^\wedge$ is Noetherian. Since $\Lambda/p\Lambda = R/pR$ is a field we conclude $\Lambda$ is a complete Noetherian local ring with maximal ideal $(p)$ (equality and completeness by Lemma \ref{lemma-hathat-finitely-generated}). For every $n$ the map $\mathbf{Z}/p^n\mathbf{Z} \to \Lambda/p^n\Lambda = R/p^nR$ is flat (equality by Lemma \ref{lemma-hathat-finitely-generated} again). Hence $\mathbf{Z}_p \to \Lambda$ is flat for example by Lemma \ref{lemma-flat-module-powers}. Hence $p$ is a nonzerodivisor in $\Lambda$. Hence $\Lambda$ has dimension $\geq 1$ (Lemma \ref{lemma-one-equation}) and we conclude that $\Lambda$ is regular of dimension $1$, i.e., a discrete valuation ring by Lemma \ref{lemma-characterize-dvr}. We conclude $\Lambda$ is a Cohen ring for $k$. \end{proof} \begin{lemma} \label{lemma-cohen-ring-formally-smooth} Let $p > 0$ be a prime. Let $\Lambda$ be a Cohen ring with residue field of characteristic $p$. For every $n \geq 1$ the ring map $$ \mathbf{Z}/p^n\mathbf{Z} \to \Lambda/p^n\Lambda $$ is formally smooth. \end{lemma} \begin{proof} If $n = 1$, this follows from Proposition \ref{proposition-characterize-separable-field-extensions}. For general $n$ we argue by induction on $n$. Namely, if $\mathbf{Z}/p^n\mathbf{Z} \to \Lambda/p^n\Lambda$ is formally smooth, then we can apply Lemma \ref{lemma-lift-formal-smoothness} to the ring map $\mathbf{Z}/p^{n + 1}\mathbf{Z} \to \Lambda/p^{n + 1}\Lambda$ and the ideal $I = (p^n) \subset \mathbf{Z}/p^{n + 1}\mathbf{Z}$. \end{proof} \begin{theorem}[Cohen structure theorem] \label{theorem-cohen-structure-theorem} Let $(R, \mathfrak m)$ be a complete local ring. \begin{enumerate} \item $R$ has a coefficient ring (see Definition \ref{definition-coefficient-ring}), \item if $\mathfrak m$ is a finitely generated ideal, then $R$ is isomorphic to a quotient $$ \Lambda[[x_1, \ldots, x_n]]/I $$ where $\Lambda$ is either a field or a Cohen ring. \end{enumerate} \end{theorem} \begin{proof} Let us prove a coefficient ring exists. First we prove this in case the characteristic of the residue field $\kappa$ is zero. Namely, in this case we will prove by induction on $n > 0$ that there exists a section $$ \varphi_n : \kappa \longrightarrow R/\mathfrak m^n $$ to the canonical map $R/\mathfrak m^n \to \kappa = R/\mathfrak m$. This is trivial for $n = 1$. If $n > 1$, let $\varphi_{n - 1}$ be given. The field extension $\kappa/\mathbf{Q}$ is formally smooth by Proposition \ref{proposition-characterize-separable-field-extensions}. Hence we can find the dotted arrow in the following diagram $$ \xymatrix{ R/\mathfrak m^{n - 1} & R/\mathfrak m^n \ar[l] \\ \kappa \ar[u]^{\varphi_{n - 1}} \ar@{..>}[ru] & \mathbf{Q} \ar[l] \ar[u] } $$ This proves the induction step. Putting these maps together $$ \lim_n\ \varphi_n : \kappa \longrightarrow R = \lim_n\ R/\mathfrak m^n $$ gives a map whose image is the desired coefficient ring. \medskip\noindent Next, we prove the existence of a coefficient ring in the case where the characteristic of the residue field $\kappa$ is $p > 0$. Namely, choose a Cohen ring $\Lambda$ with $\kappa = \Lambda/p\Lambda$, see Lemma \ref{lemma-cohen-rings-exist}. In this case we will prove by induction on $n > 0$ that there exists a map $$ \varphi_n : \Lambda/p^n\Lambda \longrightarrow R/\mathfrak m^n $$ whose composition with the reduction map $R/\mathfrak m^n \to \kappa$ produces the given isomorphism $\Lambda/p\Lambda = \kappa$. This is trivial for $n = 1$. If $n > 1$, let $\varphi_{n - 1}$ be given, and also write $\varphi_{n - 1}$ for the composite $\Lambda/p^n\Lambda \to \Lambda/p^{n - 1}\Lambda \xrightarrow{\varphi_{n - 1}} R/\mathfrak m^{n - 1}$. The ring map $\mathbf{Z}/p^n\mathbf{Z} \to \Lambda/p^n\Lambda$ is formally smooth by Lemma \ref{lemma-cohen-ring-formally-smooth}. Hence we can find the dotted arrow in the following diagram $$ \xymatrix{ R/\mathfrak m^{n - 1} & R/\mathfrak m^n \ar[l] \\ \Lambda/p^n\Lambda \ar[u]^{\varphi_{n - 1}} \ar@{..>}[ru] & \mathbf{Z}/p^n\mathbf{Z} \ar[l] \ar[u] } $$ This proves the induction step. Putting these maps together $$ \lim_n\ \varphi_n : \Lambda = \lim_n\ \Lambda/p^n\Lambda \longrightarrow R = \lim_n\ R/\mathfrak m^n $$ gives a map whose image is the desired coefficient ring. \medskip\noindent The final statement of the theorem follows readily. Namely, if $y_1, \ldots, y_n$ are generators of the ideal $\mathfrak m$, then we can use the map $\Lambda \to R$ just constructed to get a map $$ \Lambda[[x_1, \ldots, x_n]] \longrightarrow R, \quad x_i \longmapsto y_i. $$ Since the source and target are complete with respect to the ideals $(x_1, \ldots, x_n)$ and $(y_1, \ldots, y_n) = \mathfrak m$, respectively, this map is surjective by Lemma \ref{lemma-completion-generalities} as the induced map modulo these respective ideals is surjective by construction. \end{proof} \begin{remark} \label{remark-Noetherian-complete-local-ring-universally-catenary} If $k$ is a field then the power series ring $k[[X_1, \ldots, X_d]]$ is a Noetherian complete local regular ring of dimension $d$. If $\Lambda$ is a Cohen ring then $\Lambda[[X_1, \ldots, X_d]]$ is a complete local Noetherian regular ring of dimension $d + 1$. Hence the Cohen structure theorem implies that any Noetherian complete local ring is a quotient of a regular local ring. In particular we see that a Noetherian complete local ring is universally catenary, see Lemma \ref{lemma-CM-ring-catenary} and Lemma \ref{lemma-regular-ring-CM}. \end{remark} \begin{lemma} \label{lemma-regular-complete-containing-coefficient-field} Let $(R, \mathfrak m)$ be a Noetherian complete local ring. Assume $R$ is regular. \begin{enumerate} \item If $R$ contains either $\mathbf{F}_p$ or $\mathbf{Q}$, then $R$ is isomorphic to a power series ring over its residue field. \item If $k$ is a field and $k \to R$ is a ring map inducing an isomorphism $k \to R/\mathfrak m$, then $R$ is isomorphic as a $k$-algebra to a power series ring over $k$. \end{enumerate} \end{lemma} \begin{proof} In case (1), by the Cohen structure theorem (Theorem \ref{theorem-cohen-structure-theorem}) there exists a coefficient ring which must be a field mapping isomorphically to the residue field. Thus it suffices to prove (2). In case (2) we pick $f_1, \ldots, f_d \in \mathfrak m$ which map to a basis of $\mathfrak m/\mathfrak m^2$ and we consider the continuous $k$-algebra map $k[[x_1, \ldots, x_d]] \to R$ sending $x_i$ to $f_i$. As both source and target are $(x_1, \ldots, x_d)$-adically complete, this map is surjective by Lemma \ref{lemma-completion-generalities}. On the other hand, it has to be injective because otherwise the dimension of $R$ would be $< d$ by Lemma \ref{lemma-one-equation}. \end{proof} \begin{lemma} \label{lemma-complete-local-Noetherian-domain-finite-over-regular} Let $(R, \mathfrak m)$ be a Noetherian complete local domain. Then there exists a subring $R_0 \subset R$ with the following properties \begin{enumerate} \item $R_0$ is a regular complete local ring, \item $R_0 \subset R$ is finite and induces an isomorphism on residue fields, \item $R_0$ is either isomorphic to $k[[X_1, \ldots, X_d]]$ where $k$ is a field or $\Lambda[[X_1, \ldots, X_d]]$ where $\Lambda$ is a Cohen ring. \end{enumerate} \end{lemma} \begin{proof} Let $\Lambda$ be a coefficient ring of $R$. Since $R$ is a domain we see that either $\Lambda$ is a field or $\Lambda$ is a Cohen ring. \medskip\noindent Case I: $\Lambda = k$ is a field. Let $d = \dim(R)$. Choose $x_1, \ldots, x_d \in \mathfrak m$ which generate an ideal of definition $I \subset R$. (See Section \ref{section-dimension}.) By Lemma \ref{lemma-change-ideal-completion} we see that $R$ is $I$-adically complete as well. Consider the map $R_0 = k[[X_1, \ldots, X_d]] \to R$ which maps $X_i$ to $x_i$. Note that $R_0$ is complete with respect to the ideal $I_0 = (X_1, \ldots, X_d)$, and that $R/I_0R \cong R/IR$ is finite over $k = R_0/I_0$ (because $\dim(R/I) = 0$, see Section \ref{section-dimension}.) Hence we conclude that $R_0 \to R$ is finite by Lemma \ref{lemma-finite-over-complete-ring}. Since $\dim(R) = \dim(R_0)$ this implies that $R_0 \to R$ is injective (see Lemma \ref{lemma-integral-dim-up}). This proves Case I. \medskip\noindent Case II: $\Lambda$ is a Cohen ring. Let $d + 1 = \dim(R)$. Let $p > 0$ be the characteristic of the residue field $k$. As $R$ is a domain we see that $p$ is a nonzerodivisor in $R$. Hence $\dim(R/pR) = d$, see Lemma \ref{lemma-one-equation}. Choose $x_1, \ldots, x_d \in R$ which generate an ideal of definition in $R/pR$. Then $I = (p, x_1, \ldots, x_d)$ is an ideal of definition of $R$. By Lemma \ref{lemma-change-ideal-completion} we see that $R$ is $I$-adically complete as well. Consider the map $R_0 = \Lambda[[X_1, \ldots, X_d]] \to R$ which maps $X_i$ to $x_i$. Note that $R_0$ is complete with respect to the ideal $I_0 = (p, X_1, \ldots, X_d)$, and that $R/I_0R \cong R/IR$ is finite over $k = R_0/I_0$ (because $\dim(R/I) = 0$, see Section \ref{section-dimension}.) Hence we conclude that $R_0 \to R$ is finite by Lemma \ref{lemma-finite-over-complete-ring}. Since $\dim(R) = \dim(R_0)$ this implies that $R_0 \to R$ is injective (see Lemma \ref{lemma-integral-dim-up}), and the lemma is proved. \end{proof} \section{Japanese rings} \label{section-japanese} % BEGIN ALGEBRA EDITORIAL ROUTE section-japanese \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-japanese}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-japanese \noindent In this section we begin to discuss finiteness of integral closure. \begin{definition} \label{definition-N} \begin{reference} \cite[Chapter 0, Definition 23.1.1]{EGA} \end{reference} Let $R$ be a domain with field of fractions $K$. \begin{enumerate} \item We say $R$ is {\it N-1} if the integral closure of $R$ in $K$ is a finite $R$-module. \item We say $R$ is {\it N-2} or {\it Japanese} if for any finite extension $L/K$ of fields the integral closure of $R$ in $L$ is finite over $R$. \end{enumerate} \end{definition} \noindent The main interest in these notions is for Noetherian rings, but here is a non-Noetherian example. \begin{example} \label{example-Japanese-not-Noetherian} Let $k$ be a field. The domain $R = k[x_1, x_2, x_3, \ldots]$ is N-2, but not Noetherian. The reason is the following. Suppose that $R \subset L$ and the field $L$ is a finite extension of the fraction field of $R$. Then there exists an integer $n$ such that $L$ comes from a finite extension $L_0/k(x_1, \ldots, x_n)$ by adjoining the (transcendental) elements $x_{n + 1}, x_{n + 2}$, etc. Let $S_0$ be the integral closure of $k[x_1, \ldots, x_n]$ in $L_0$. By Proposition \ref{proposition-ubiquity-nagata} below it is true that $S_0$ is finite over $k[x_1, \ldots, x_n]$. Moreover, the integral closure of $R$ in $L$ is $S = S_0[x_{n + 1}, x_{n + 2}, \ldots]$ (use Lemma \ref{lemma-polynomial-domain-normal}) and hence finite over $R$. The same argument works for $R = \mathbf{Z}[x_1, x_2, x_3, \ldots]$. \end{example} \begin{lemma} \label{lemma-localize-N} Let $R$ be a domain. If $R$ is N-1 then so is any nonzero localization of $R$. Same for N-2. \end{lemma} \begin{proof} These statements hold because taking integral closure commutes with localization, see Lemma \ref{lemma-integral-closure-localize}. \end{proof} \begin{lemma} \label{lemma-Japanese-local} Let $R$ be a domain. Let $f_1, \ldots, f_n \in R$ generate the unit ideal. If each domain $R_{f_i}$ is N-1 then so is $R$. Same for N-2. \end{lemma} \begin{proof} Assume $R_{f_i}$ is N-2 (or N-1). Let $L$ be a finite extension of the fraction field of $R$ (equal to the fraction field in the N-1 case). Let $S$ be the integral closure of $R$ in $L$. By Lemma \ref{lemma-integral-closure-localize} we see that $S_{f_i}$ is the integral closure of $R_{f_i}$ in $L$. Hence $S_{f_i}$ is finite over $R_{f_i}$ by assumption. Thus $S$ is finite over $R$ by Lemma \ref{lemma-cover}. \end{proof} \begin{lemma} \label{lemma-quasi-finite-over-Noetherian-japanese} Let $R$ be a domain. Let $R \subset S$ be a quasi-finite extension of domains (for example finite). Assume $R$ is N-2 and Noetherian. Then $S$ is N-2. \end{lemma} \begin{proof} Let $L/K$ be the induced extension of fraction fields. Note that this is a finite field extension (for example by Lemma \ref{lemma-isolated-point-fibre} (2) applied to the fibre $S \otimes_R K$, and the definition of a quasi-finite ring map). Let $S'$ be the integral closure of $R$ in $S$. Then $S'$ is contained in the integral closure of $R$ in $L$ which is finite over $R$ by assumption. As $R$ is Noetherian this implies $S'$ is finite over $R$. By Lemma \ref{lemma-quasi-finite-open-integral-closure} there exist elements $g_1, \ldots, g_n \in S'$ such that $S'_{g_i} \cong S_{g_i}$ and such that $g_1, \ldots, g_n$ generate the unit ideal in $S$. Hence it suffices to show that $S'$ is N-2 by Lemmas \ref{lemma-localize-N} and \ref{lemma-Japanese-local}. Thus we have reduced to the case where $S$ is finite over $R$. \medskip\noindent Assume $R \subset S$ with hypotheses as in the lemma and moreover that $S$ is finite over $R$. Let $M$ be a finite field extension of the fraction field of $S$. Then $M$ is also a finite field extension of $K$ and we conclude that the integral closure $T$ of $R$ in $M$ is finite over $R$. By Lemma \ref{lemma-integral-closure-transitive} we see that $T$ is also the integral closure of $S$ in $M$ and we win by Lemma \ref{lemma-integral-permanence}. \end{proof} \begin{lemma} \label{lemma-Laurent-ring-N-1} Let $R$ be a Noetherian domain. If $R[z, z^{-1}]$ is N-1, then so is $R$. \end{lemma} \begin{proof} Let $R'$ be the integral closure of $R$ in its field of fractions $K$. Let $S'$ be the integral closure of $R[z, z^{-1}]$ in its field of fractions. Clearly $R' \subset S'$. Since $K[z, z^{-1}]$ is a normal domain we see that $S' \subset K[z, z^{-1}]$. Suppose that $f_1, \ldots, f_n \in S'$ generate $S'$ as $R[z, z^{-1}]$-module. Say $f_i = \sum a_{ij}z^j$ (finite sum), with $a_{ij} \in K$. For any $x \in R'$ we can write $$ x = \sum h_i f_i $$ with $h_i \in R[z, z^{-1}]$. Thus we see that $R'$ is contained in the finite $R$-submodule $\sum Ra_{ij} \subset K$. Since $R$ is Noetherian we conclude that $R'$ is a finite $R$-module. \end{proof} \begin{lemma} \label{lemma-finite-extension-N-2} Let $R$ be a Noetherian domain, and let $R \subset S$ be a finite extension of domains. If $S$ is N-1, then so is $R$. If $S$ is N-2, then so is $R$. \end{lemma} \begin{proof} Omitted. (Hint: Integral closures of $R$ in extension fields are contained in integral closures of $S$ in extension fields.) \end{proof} \begin{lemma} \label{lemma-Noetherian-normal-domain-finite-separable-extension} Let $R$ be a Noetherian normal domain with fraction field $K$. Let $L/K$ be a finite separable field extension. Then the integral closure of $R$ in $L$ is finite over $R$. \end{lemma} \begin{proof} Consider the trace pairing (Fields, Definition \ref{fields-definition-trace-pairing}) $$ L \times L \longrightarrow K, \quad (x, y) \longmapsto \langle x, y\rangle := \text{Trace}_{L/K}(xy). $$ Since $L/K$ is separable this is nondegenerate (Fields, Lemma \ref{fields-lemma-separable-trace-pairing}). Moreover, if $x \in L$ is integral over $R$, then $\text{Trace}_{L/K}(x)$ is in $R$. This is true because the minimal polynomial of $x$ over $K$ has coefficients in $R$ (Lemma \ref{lemma-minimal-polynomial-normal-domain}) and because $\text{Trace}_{L/K}(x)$ is an integer multiple of one of these coefficients (Fields, Lemma \ref{fields-lemma-trace-and-norm-from-minimal-polynomial}). Pick $x_1, \ldots, x_n \in L$ which are integral over $R$ and which form a $K$-basis of $L$. Then the integral closure $S \subset L$ is contained in the $R$-module $$ M = \{y \in L \mid \langle x_i, y\rangle \in R, \ i = 1, \ldots, n\} $$ By linear algebra we see that $M \cong R^{\oplus n}$ as an $R$-module. Hence $S \subset R^{\oplus n}$ is a finitely generated $R$-module as $R$ is Noetherian. \end{proof} \begin{example} \label{example-bad-invariants} Lemma \ref{lemma-Noetherian-normal-domain-finite-separable-extension} does not work if the ring is not Noetherian. For example consider the action of $G = \{+1, -1\}$ on $A = \mathbf{C}[x_1, x_2, x_3, \ldots]$ where $-1$ acts by mapping $x_i$ to $-x_i$. The invariant ring $R = A^G$ is the $\mathbf{C}$-algebra generated by all $x_ix_j$. Hence $R \subset A$ is not finite. But $R$ is a normal domain with fraction field $K = L^G$, the subfield of $G$-invariants in the fraction field $L$ of $A$. And clearly $A$ is the integral closure of $R$ in $L$. \end{example} \noindent The following lemma can sometimes be used as a substitute for Lemma \ref{lemma-Noetherian-normal-domain-finite-separable-extension} in case of purely inseparable extensions. \begin{lemma} \label{lemma-Noetherian-normal-domain-insep-extension} Let $R$ be a Noetherian normal domain with fraction field $K$ of characteristic $p > 0$. Let $a \in K$ be an element such that there exists a derivation $D : R \to R$ whose unique extension to the fraction field satisfies $D(a) \not = 0$. Then the integral closure of $R$ in $L = K[x]/(x^p - a)$ is finite over $R$. \end{lemma} \begin{proof} After replacing $x$ by $fx$ and $a$ by $f^pa$ for some $f \in R$ we may assume $a \in R$. Hence also $D(a) \in R$. We will show by induction on $i \leq p - 1$ that if $$ y = a_0 + a_1x + \ldots + a_i x^i,\quad a_j \in K $$ is integral over $R$, then $D(a)^i a_j \in R$. Thus the integral closure is contained in the finite $R$-module with basis $D(a)^{-p + 1}x^j$, $j = 0, \ldots, p - 1$. Since $R$ is Noetherian this proves the lemma. \medskip\noindent If $i = 0$, then $y = a_0$ is integral over $R$ if and only if $a_0 \in R$ and the statement is true. Suppose the statement holds for some $i < p - 1$ and suppose that $$ y = a_0 + a_1x + \ldots + a_{i + 1} x^{i + 1},\quad a_j \in K $$ is integral over $R$. Then $$ y^p = a_0^p + a_1^p a + \ldots + a_{i + 1}^pa^{i + 1} $$ is an element of $R$ (as it is in $K$ and integral over $R$). Applying $D$ we obtain $$ (a_1^p + 2a_2^p a + \ldots + (i + 1)a_{i + 1}^p a^i)D(a) $$ is in $R$. Hence it follows that $$ D(a)a_1 + 2D(a) a_2 x + \ldots + (i + 1)D(a) a_{i + 1} x^i $$ is integral over $R$. By induction we find $D(a)^{i + 1}a_j \in R$ for $j = 1, \ldots, i + 1$. (Here we use that $1, \ldots, i + 1$ are invertible.) Hence $D(a)^{i + 1}a_0$ is also in $R$: it is the difference of $D(a)^{i + 1}y$ and $\sum_{j > 0} D(a)^{i + 1}a_jx^j$, both of which are integral over $R$ (since $x$ is integral over $R$ as $a \in R$). Their difference also lies in the fraction field, so normality shows that it belongs to the ring. \end{proof} \begin{lemma} \label{lemma-domain-char-zero-N-1-2} A Noetherian domain whose fraction field has characteristic zero is N-1 if and only if it is N-2 (i.e., Japanese). \end{lemma} \begin{proof} This is clear from Lemma \ref{lemma-Noetherian-normal-domain-finite-separable-extension} since every field extension in characteristic zero is separable. \end{proof} \begin{lemma} \label{lemma-domain-char-p-N-1-2} Let $R$ be a Noetherian domain with fraction field $K$ of characteristic $p > 0$. Then $R$ is N-2 if and only if for every finite purely inseparable extension $L/K$ the integral closure of $R$ in $L$ is finite over $R$. \end{lemma} \begin{proof} Assume the integral closure of $R$ in every finite purely inseparable field extension of $K$ is finite. Let $L/K$ be any finite extension. We have to show the integral closure of $R$ in $L$ is finite over $R$. Choose a finite normal field extension $M/K$ containing $L$. As $R$ is Noetherian it suffices to show that the integral closure of $R$ in $M$ is finite over $R$. By Fields, Lemma \ref{fields-lemma-normal-case} there exists a subextension $M/M_{insep}/K$ such that $M_{insep}/K$ is purely inseparable, and $M/M_{insep}$ is separable. By assumption the integral closure $R'$ of $R$ in $M_{insep}$ is finite over $R$. By Lemma \ref{lemma-Noetherian-normal-domain-finite-separable-extension} the integral closure $R''$ of $R'$ in $M$ is finite over $R'$. Then $R''$ is finite over $R$ by Lemma \ref{lemma-finite-transitive}. Since $R''$ is also the integral closure of $R$ in $M$ (see Lemma \ref{lemma-integral-closure-transitive}) we win. \end{proof} \begin{lemma} \label{lemma-polynomial-ring-N-2} Let $R$ be a Noetherian domain. If $R$ is N-1 then $R[x]$ is N-1. If $R$ is N-2 then $R[x]$ is N-2. \end{lemma} \begin{proof} Assume $R$ is N-1. Let $R'$ be the integral closure of $R$ which is finite over $R$. Hence also $R'[x]$ is finite over $R[x]$. The ring $R'[x]$ is normal (see Lemma \ref{lemma-polynomial-domain-normal}), hence N-1. This proves the first assertion. \medskip\noindent For the second assertion, by Lemma \ref{lemma-finite-extension-N-2} it suffices to show that $R'[x]$ is N-2. In other words we may and do assume that $R$ is a normal N-2 domain. In characteristic zero we are done by Lemma \ref{lemma-domain-char-zero-N-1-2}. In characteristic $p > 0$ we have to show that the integral closure of $R[x]$ in every finite purely inseparable field extension $L/K(x)$ is finite, where $K$ is the fraction field of $R$. There exists a finite purely inseparable field extension $L'/K$ and $q = p^e$ such that $L \subset L'(x^{1/q})$; some details omitted. As $R[x]$ is Noetherian it suffices to show that the integral closure of $R[x]$ in $L'(x^{1/q})$ is finite over $R[x]$. And this integral closure is equal to $R'[x^{1/q}]$ with $R \subset R' \subset L'$, where the middle ring is the integral closure of $R$ in $L'$. Since $R$ is N-2 we see that $R'$ is finite over $R$ and hence $R'[x^{1/q}]$ is finite over $R[x]$. \end{proof} \begin{lemma} \label{lemma-openness-normal-locus} Let $R$ be a Noetherian domain. If there exists a nonzero $f \in R$ such that $R_f$ is normal then $$ U = \{\mathfrak p \in \Spec(R) \mid R_{\mathfrak p} \text{ is normal}\} $$ is open in $\Spec(R)$. \end{lemma} \begin{proof} It is clear that the standard open $D(f)$ is contained in $U$. By Serre's criterion Lemma \ref{lemma-criterion-normal} we see that $\mathfrak p \not \in U$ implies that for some $\mathfrak q \subset \mathfrak p$ we have either \begin{enumerate} \item Case I: $\text{depth}(R_{\mathfrak q}) < 2$ and $\dim(R_{\mathfrak q}) \geq 2$, or \item Case II: $R_{\mathfrak q}$ is not regular and $\dim(R_{\mathfrak q}) = 1$. \end{enumerate} This in particular also means that $R_{\mathfrak q}$ is not normal, and hence $f \in \mathfrak q$. In case I we see that $\text{depth}(R_{\mathfrak q}) = \text{depth}(R_{\mathfrak q}/fR_{\mathfrak q}) + 1$. Hence such a prime $\mathfrak q$ is the same thing as an embedded associated prime of $R/fR$. In case II $\mathfrak q$ is an associated prime of $R/fR$ of height 1. Thus there is a finite set $E$ of such primes $\mathfrak q$ (see Lemma \ref{lemma-finite-ass}) and $$ \Spec(R) \setminus U = \bigcup\nolimits_{\mathfrak q \in E} V(\mathfrak q) $$ as desired. \end{proof} \begin{lemma} \label{lemma-characterize-N-1} Let $R$ be a Noetherian domain. Then $R$ is N-1 if and only if the following two conditions hold \begin{enumerate} \item there exists a nonzero $f \in R$ such that $R_f$ is normal, and \item for every maximal ideal $\mathfrak m \subset R$ the local ring $R_{\mathfrak m}$ is N-1. \end{enumerate} \end{lemma} \begin{proof} First assume $R$ is N-1. Let $R'$ be the integral closure of $R$ in its field of fractions $K$. By assumption we can find $x_1, \ldots, x_n$ in $R'$ which generate $R'$ as an $R$-module. Since $R' \subset K$ we can find $f_i \in R$ nonzero such that $f_i x_i \in R$. Then $R_f \cong R'_f$ where $f = f_1 \ldots f_n$. Hence $R_f$ is normal and we have (1). Part (2) follows from Lemma \ref{lemma-localize-N}. \medskip\noindent Assume (1) and (2). Let $K$ be the fraction field of $R$. Suppose that $R \subset R' \subset K$ is a finite extension of $R$ contained in $K$. Note that $R_f = R'_f$ since $R_f$ is already normal. Hence by Lemma \ref{lemma-openness-normal-locus} the set of primes $\mathfrak p' \in \Spec(R')$ with $R'_{\mathfrak p'}$ non-normal is closed in $\Spec(R')$. Since $\Spec(R') \to \Spec(R)$ is closed the image of this set is closed in $\Spec(R)$. For such a ring $R'$, denote this image by $Z_{R'} \subset \Spec(R)$. \medskip\noindent Pick a maximal ideal $\mathfrak m \subset R$. Let $R_{\mathfrak m} \subset R_{\mathfrak m}'$ be the integral closure of the local ring in $K$. By assumption this is a finite ring extension. By Lemma \ref{lemma-integral-closure-localize} we can find finitely many elements $x_1, \ldots, x_n \in K$ integral over $R$ such that $R_{\mathfrak m}'$ is generated by $x_1, \ldots, x_n$ over $R_{\mathfrak m}$. Let $R' = R[x_1, \ldots, x_n] \subset K$. With this choice it is clear that $\mathfrak m \not \in Z_{R'}$. \medskip\noindent As $\Spec(R)$ is quasi-compact, the above shows that we can find a finite collection $R \subset R'_i \subset K$ such that $\bigcap Z_{R'_i} = \emptyset$. Let $R'$ be the subring of $K$ generated by all of these. It is finite over $R$. Also $Z_{R'} = \emptyset$. Namely, let $\mathfrak p' \in \Spec(R')$ and set $\mathfrak p = \mathfrak p' \cap R$. Choose $i$ such that $\mathfrak p \not \in Z_{R'_i}$ and set $\mathfrak p'_i = \mathfrak p' \cap R'_i$. Then $(R'_i)_{\mathfrak p'_i}$ is normal. Set $T = R'_i \setminus \mathfrak p'_i$. The extension $R'_i \subset R'$ is integral, and hence $T^{-1}R'$ is integral over $(R'_i)_{\mathfrak p'_i}$. Both rings are contained in $K$, the fraction field of $(R'_i)_{\mathfrak p'_i}$, so normality gives $T^{-1}R' = (R'_i)_{\mathfrak p'_i}$. Localizing at $\mathfrak p'$ gives $R'_{\mathfrak p'} = (R'_i)_{\mathfrak p'_i}$, which is normal. Hence $R'$ is normal, in other words $R'$ is the integral closure of $R$ in $K$. \end{proof} \begin{lemma}[Tate] \label{lemma-tate-japanese} \begin{reference} \cite[Theorem 23.1.3]{EGA} \end{reference} Let $R$ be a ring. Let $x \in R$. Assume \begin{enumerate} \item $R$ is a normal Noetherian domain, \item $R/xR$ is a domain and N-2, \item $R \cong \lim_n R/x^nR$ is complete with respect to $x$. \end{enumerate} Then $R$ is N-2. \end{lemma} \begin{proof} We may assume $x \not = 0$ since otherwise the lemma is trivial. Let $K$ be the fraction field of $R$. If the characteristic of $K$ is zero the lemma follows from (1), see Lemma \ref{lemma-domain-char-zero-N-1-2}. Hence we may assume that the characteristic of $K$ is $p > 0$, and we may apply Lemma \ref{lemma-domain-char-p-N-1-2}. Thus given $L/K$ a finite purely inseparable field extension we have to show that the integral closure $S$ of $R$ in $L$ is finite over $R$. \medskip\noindent Let $q$ be a power of $p$ such that $L^q \subset K$. Choose a $q$th root $y$ of $x$ in an algebraic closure of $K$, set $\widetilde L = L(y)$, and let $\widetilde S$ be the integral closure of $R$ in $\widetilde L$. Then $\widetilde L/K$ is a finite purely inseparable extension and $\widetilde L^q \subset K$. Moreover, $S = \widetilde S \cap L$, so $S$ is an $R$-submodule of $\widetilde S$. Thus, if $\widetilde S$ is finite over $R$, then $S$ is finite over $R$ because $R$ is Noetherian. Replacing $L$ by $\widetilde L$ and $S$ by $\widetilde S$, we may therefore assume that $y \in L$ and $y^q = x$. Since $R \to S$ induces a homeomorphism of spectra (see Lemma \ref{lemma-p-ring-map}) there is a unique prime ideal $\mathfrak q \subset S$ lying over the prime ideal $\mathfrak p = xR$. It is clear that $$ \mathfrak q = \{f \in S \mid f^q \in \mathfrak p\} = yS $$ since $y^q = x$. Observe that $R_{\mathfrak p}$ is a discrete valuation ring by Lemma \ref{lemma-characterize-dvr}. Then $S_{\mathfrak q}$ is Noetherian by Krull-Akizuki (Lemma \ref{lemma-krull-akizuki}). Whereupon we conclude $S_{\mathfrak q}$ is a discrete valuation ring by Lemma \ref{lemma-characterize-dvr} once again. By Lemma \ref{lemma-finite-extension-residue-fields-dimension-1} we see that $\kappa(\mathfrak q)/\kappa(\mathfrak p)$ is a finite field extension. Hence the integral closure $S' \subset \kappa(\mathfrak q)$ of $R/xR$ is finite over $R/xR$ by assumption (2). Since $S/yS \subset S'$ this implies that $S/yS$ is finite over $R$. Note that $S/y^nS$ has a finite filtration whose subquotients are the modules $y^iS/y^{i + 1}S \cong S/yS$. Hence we see that each $S/y^nS$ is finite over $R$. In particular $S/xS$ is finite over $R$. Also, it is clear that $\bigcap x^nS = (0)$ since an element in the intersection has $q$th power contained in $\bigcap x^nR = (0)$ (Lemma \ref{lemma-intersect-powers-ideal-module-zero}). Thus we may apply Lemma \ref{lemma-finite-over-complete-ring} to conclude that $S$ is finite over $R$, and we win. \end{proof} \begin{lemma} \label{lemma-power-series-over-N-2} Let $R$ be a ring. If $R$ is Noetherian, a domain, and N-2, then so is $R[[x]]$. \end{lemma} \begin{proof} Observe that $R[[x]]$ is Noetherian by Lemma \ref{lemma-Noetherian-power-series}. Let $R' \supset R$ be the integral closure of $R$ in its fraction field. Because $R$ is N-2 this is finite over $R$. Hence $R'[[x]]$ is finite over $R[[x]]$. By Lemma \ref{lemma-power-series-over-Noetherian-normal-domain} we see that $R'[[x]]$ is a normal domain. Apply Lemma \ref{lemma-tate-japanese} to the element $x \in R'[[x]]$ to see that $R'[[x]]$ is N-2. Then Lemma \ref{lemma-finite-extension-N-2} shows that $R[[x]]$ is N-2. \end{proof} \section{Nagata rings} \label{section-nagata} % BEGIN ALGEBRA EDITORIAL ROUTE section-nagata \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-nagata}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-nagata \noindent Here is the definition. \begin{definition} \label{definition-nagata} Let $R$ be a ring. \begin{enumerate} \item We say $R$ is {\it universally Japanese} if for any finite type ring map $R \to S$ with $S$ a domain we have that $S$ is N-2 (i.e., Japanese). \item We say that $R$ is a {\it Nagata ring} if $R$ is Noetherian and for every prime ideal $\mathfrak p$ the ring $R/\mathfrak p$ is N-2. \end{enumerate} \end{definition} \noindent It is clear that a Noetherian universally Japanese ring is a Nagata ring. It is our goal to show that a Nagata ring is universally Japanese. This is not obvious at all, and requires some work. But first, here is a useful lemma. \begin{lemma} \label{lemma-nagata-in-reduced-finite-type-finite-integral-closure} Let $R$ be a Nagata ring. Let $R \to S$ be essentially of finite type with $S$ reduced. Then the integral closure $A$ of $R$ in $S$ is finite over $R$. \end{lemma} \begin{proof} As $S$ is essentially of finite type over $R$ it is Noetherian and has finitely many minimal primes $\mathfrak q_1, \ldots, \mathfrak q_m$, see Lemma \ref{lemma-Noetherian-irreducible-components}. Since $S$ is reduced we have $S \subset \prod S_{\mathfrak q_i}$ and each $S_{\mathfrak q_i} = K_i$ is a field, see Lemmas \ref{lemma-total-ring-fractions-no-embedded-points} and \ref{lemma-minimal-prime-reduced-ring}. It suffices to show that the integral closure $A_i'$ of $R$ in each $K_i$ is finite over $R$. This is true because $R$ is Noetherian and $A \subset \prod A_i'$. Let $\mathfrak p_i \subset R$ be the prime of $R$ corresponding to $\mathfrak q_i$. As $S$ is essentially of finite type over $R$ we see that $K_i = S_{\mathfrak q_i} = \kappa(\mathfrak q_i)$ is a finitely generated field extension of $\kappa(\mathfrak p_i)$. Hence the algebraic closure $L_i$ of $\kappa(\mathfrak p_i)$ in $K_i$ is finite over $\kappa(\mathfrak p_i)$, see Fields, Lemma \ref{fields-lemma-algebraic-closure-in-finitely-generated}. It is clear that $A_i'$ is the integral closure of $R/\mathfrak p_i$ in $L_i$, and hence we win by definition of a Nagata ring. \end{proof} \begin{lemma} \label{lemma-check-universally-japanese} Let $R$ be a ring. To check that $R$ is universally Japanese it suffices to show: If $R \to S$ is of finite type, and $S$ a domain then $S$ is N-1. \end{lemma} \begin{proof} Namely, assume the condition of the lemma. Let $R \to S$ be a finite type ring map with $S$ a domain. Let $L$ be a finite extension of the fraction field of $S$. Then there exists a finite ring extension $S \subset S' \subset L$ such that $L$ is the fraction field of $S'$. By assumption $S'$ is N-1, and hence the integral closure $S''$ of $S'$ in $L$ is finite over $S'$. Thus $S''$ is finite over $S$ (Lemma \ref{lemma-finite-transitive}) and $S''$ is the integral closure of $S$ in $L$ (Lemma \ref{lemma-integral-closure-transitive}). We conclude that $R$ is universally Japanese. \end{proof} \begin{lemma} \label{lemma-universally-japanese} If $R$ is universally Japanese then any algebra essentially of finite type over $R$ is universally Japanese. \end{lemma} \begin{proof} The case of an algebra of finite type over $R$ is immediate from the definition. The general case follows on applying Lemma \ref{lemma-localize-N}. \end{proof} \begin{lemma} \label{lemma-quasi-finite-over-nagata} Let $R$ be a Nagata ring. If $R \to S$ is a quasi-finite ring map (for example finite) then $S$ is a Nagata ring also. \end{lemma} \begin{proof} First note that $S$ is Noetherian as $R$ is Noetherian and a quasi-finite ring map is of finite type. Let $\mathfrak q \subset S$ be a prime ideal, and set $\mathfrak p = R \cap \mathfrak q$. Then $R/\mathfrak p \subset S/\mathfrak q$ is quasi-finite and hence we conclude that $S/\mathfrak q$ is N-2 by Lemma \ref{lemma-quasi-finite-over-Noetherian-japanese} as desired. \end{proof} \begin{lemma} \label{lemma-nagata-localize} A localization of a Nagata ring is a Nagata ring. \end{lemma} \begin{proof} Clear from Lemma \ref{lemma-localize-N}. \end{proof} \begin{lemma} \label{lemma-nagata-local} Let $R$ be a ring. Let $f_1, \ldots, f_n \in R$ generate the unit ideal. \begin{enumerate} \item If each $R_{f_i}$ is universally Japanese then so is $R$. \item If each $R_{f_i}$ is Nagata then so is $R$. \end{enumerate} \end{lemma} \begin{proof} Let $\varphi : R \to S$ be a finite type ring map so that $S$ is a domain. Then $\varphi(f_1), \ldots, \varphi(f_n)$ generate the unit ideal in $S$. Hence if each nonzero $S_{f_i} = S_{\varphi(f_i)}$ is N-1 then so is $S$, see Lemma \ref{lemma-Japanese-local}. This proves (1). \medskip\noindent If each $R_{f_i}$ is Nagata, then each $R_{f_i}$ is Noetherian and hence $R$ is Noetherian, see Lemma \ref{lemma-cover}. And if $\mathfrak p \subset R$ is a prime, then for every $i$ such that $f_i \not \in \mathfrak p$ we see $R_{f_i}/\mathfrak pR_{f_i} = (R/\mathfrak p)_{f_i}$ is N-2. The images of these $f_i$ in $R/\mathfrak p$ generate the unit ideal, and hence we conclude $R/\mathfrak p$ is N-2 by Lemma \ref{lemma-Japanese-local}. This proves (2). \end{proof} \begin{lemma} \label{lemma-Noetherian-complete-local-Nagata} A Noetherian complete local ring is a Nagata ring. \end{lemma} \begin{proof} Let $R$ be a complete local Noetherian ring. Let $\mathfrak p \subset R$ be a prime. Then $R/\mathfrak p$ is also a complete local Noetherian ring, see Lemma \ref{lemma-quotient-complete-local}. Hence it suffices to show that a Noetherian complete local domain $R$ is N-2. By Lemmas \ref{lemma-quasi-finite-over-Noetherian-japanese} and \ref{lemma-complete-local-Noetherian-domain-finite-over-regular} we reduce to the case $R = k[[X_1, \ldots, X_d]]$ where $k$ is a field or $R = \Lambda[[X_1, \ldots, X_d]]$ where $\Lambda$ is a Cohen ring. \medskip\noindent In the case $k[[X_1, \ldots, X_d]]$ we reduce to the statement that a field is N-2 by Lemma \ref{lemma-power-series-over-N-2}. This is clear. In the case $\Lambda[[X_1, \ldots, X_d]]$ we reduce to the statement that a Cohen ring $\Lambda$ is N-2. Applying Lemma \ref{lemma-tate-japanese} once more with $x = p \in \Lambda$ we reduce yet again to the case of a field. Thus we win. \end{proof} \begin{definition} \label{definition-analytically-unramified} Let $(R, \mathfrak m)$ be a Noetherian local ring. We say $R$ is {\it analytically unramified} if its completion $R^\wedge = \lim_n R/\mathfrak m^n$ is reduced. A prime ideal $\mathfrak p \subset R$ is said to be {\it analytically unramified} if $R/\mathfrak p$ is analytically unramified. \end{definition} \noindent At this point we know the following are true for any Noetherian local ring $R$: The map $R \to R^\wedge$ is a faithfully flat local ring homomorphism (Lemma \ref{lemma-completion-faithfully-flat}). The completion $R^\wedge$ is Noetherian (Lemma \ref{lemma-completion-Noetherian}) and complete (Lemma \ref{lemma-completion-complete}). Hence the completion $R^\wedge$ is a Nagata ring (Lemma \ref{lemma-Noetherian-complete-local-Nagata}). Moreover, we have seen in Section \ref{section-cohen-structure-theorem} that $R^\wedge$ is a quotient of a regular local ring (Theorem \ref{theorem-cohen-structure-theorem}), and hence universally catenary (Remark \ref{remark-Noetherian-complete-local-ring-universally-catenary}). \begin{lemma} \label{lemma-analytically-unramified-easy} Let $(R, \mathfrak m)$ be a Noetherian local ring. \begin{enumerate} \item If $R$ is analytically unramified, then $R$ is reduced. \item If $R$ is analytically unramified, then each minimal prime of $R$ is analytically unramified. \item If $R$ is reduced with minimal primes $\mathfrak q_1, \ldots, \mathfrak q_t$, and each $\mathfrak q_i$ is analytically unramified, then $R$ is analytically unramified. \item If $R$ is analytically unramified, then the integral closure of $R$ in its total ring of fractions $Q(R)$ is finite over $R$. \item If $R$ is a domain and analytically unramified, then $R$ is N-1. \end{enumerate} \end{lemma} \begin{proof} In this proof we will use the remarks immediately following Definition \ref{definition-analytically-unramified}. As $R \to R^\wedge$ is a faithfully flat local ring homomorphism it is injective and (1) follows. \medskip\noindent Let $\mathfrak q$ be a minimal prime of $R$, and assume $R$ is analytically unramified. Then $\mathfrak q$ is an associated prime of $R$ (see Proposition \ref{proposition-minimal-primes-associated-primes}). Hence there exists an $f \in R$ such that $\{x \in R \mid fx = 0\} = \mathfrak q$. Note that $(R/\mathfrak q)^\wedge = R^\wedge/\mathfrak q^\wedge$, and that $\{x \in R^\wedge \mid fx = 0\} = \mathfrak q^\wedge$, because completion is exact (Lemma \ref{lemma-completion-flat}). If $x \in R^\wedge$ is such that $x^2 \in \mathfrak q^\wedge$, then $fx^2 = 0$ hence $(fx)^2 = 0$ hence $fx = 0$ hence $x \in \mathfrak q^\wedge$. Thus $\mathfrak q$ is analytically unramified and (2) holds. \medskip\noindent Assume $R$ is reduced with minimal primes $\mathfrak q_1, \ldots, \mathfrak q_t$, and each $\mathfrak q_i$ is analytically unramified. Then $R \to R/\mathfrak q_1 \times \ldots \times R/\mathfrak q_t$ is injective. Since completion is exact (see Lemma \ref{lemma-completion-flat}) we see that $R^\wedge \subset (R/\mathfrak q_1)^\wedge \times \ldots \times (R/\mathfrak q_t)^\wedge$. Hence (3) is clear. \medskip\noindent Assume $R$ is analytically unramified. Let $\mathfrak p_1, \ldots, \mathfrak p_s$ be the minimal primes of $R^\wedge$. Then we see that $$ Q(R^\wedge) = R^\wedge_{\mathfrak p_1} \times \ldots \times R^\wedge_{\mathfrak p_s} $$ with each $R^\wedge_{\mathfrak p_i}$ a field as $R^\wedge$ is reduced (see Lemma \ref{lemma-total-ring-fractions-no-embedded-points}). Hence the integral closure $S$ of $R^\wedge$ in $Q(R^\wedge)$ is equal to $S = S_1 \times \ldots \times S_s$ with $S_i$ the integral closure of $R^\wedge/\mathfrak p_i$ in its fraction field. By Lemma \ref{lemma-Noetherian-complete-local-Nagata} the ring $S_i$ is finite over $R^\wedge/\mathfrak p_i$. Thus $S$ is finite over $R^\wedge$. Denote by $R'$ the integral closure of $R$ in $Q(R)$. As $R \to R^\wedge$ is flat we see that $R' \otimes_R R^\wedge \subset Q(R) \otimes_R R^\wedge \subset Q(R^\wedge)$. Moreover $R' \otimes_R R^\wedge$ is integral over $R^\wedge$ (Lemma \ref{lemma-base-change-integral}). Hence $R' \otimes_R R^\wedge \subset S$ is an $R^\wedge$-submodule. As $R^\wedge$ is Noetherian it is a finite $R^\wedge$-module. Thus we may find $f_1, \ldots, f_n \in R'$ such that $R' \otimes_R R^\wedge$ is generated by the elements $f_i \otimes 1$ as a $R^\wedge$-module. By faithful flatness we see that $R'$ is generated by $f_1, \ldots, f_n$ as an $R$-module. This proves (4). \medskip\noindent Part (5) is a special case of part (4). \end{proof} \begin{lemma} \label{lemma-codimension-1-analytically-unramified} Let $R$ be a Noetherian local ring. Let $\mathfrak p \subset R$ be a prime. Assume \begin{enumerate} \item $R_{\mathfrak p}$ is a discrete valuation ring, and \item $\mathfrak p$ is analytically unramified. \end{enumerate} Then for any associated prime $\mathfrak q$ of $R^\wedge/\mathfrak pR^\wedge$ the local ring $(R^\wedge)_{\mathfrak q}$ is a discrete valuation ring. \end{lemma} \begin{proof} Assumption (2) says that $R^\wedge/\mathfrak pR^\wedge$ is a reduced ring. Hence an associated prime $\mathfrak q \subset R^\wedge$ of $R^\wedge/\mathfrak pR^\wedge$ is the same thing as a minimal prime over $\mathfrak pR^\wedge$. In particular we see that the maximal ideal of $(R^\wedge)_{\mathfrak q}$ is $\mathfrak p(R^\wedge)_{\mathfrak q}$. Choose $x \in R$ such that $xR_{\mathfrak p} = \mathfrak pR_{\mathfrak p}$. By the above we see that $x \in (R^\wedge)_{\mathfrak q}$ generates the maximal ideal. As $R \to R^\wedge$ is faithfully flat we see that $x$ is a nonzerodivisor in $(R^\wedge)_{\mathfrak q}$. Hence we win. \end{proof} \begin{lemma} \label{lemma-criterion-analytically-unramified} Let $(R, \mathfrak m)$ be a Noetherian local domain. Let $x \in \mathfrak m$. Assume \begin{enumerate} \item $x \not = 0$, \item $R/xR$ has no embedded primes, and \item for each associated prime $\mathfrak p \subset R$ of $R/xR$ we have \begin{enumerate} \item the local ring $R_{\mathfrak p}$ is regular, and \item $\mathfrak p$ is analytically unramified. \end{enumerate} \end{enumerate} Then $R$ is analytically unramified. \end{lemma} \begin{proof} Let $\mathfrak p_1, \ldots, \mathfrak p_t$ be the associated primes of the $R$-module $R/xR$. Since $R/xR$ has no embedded primes we see that each $\mathfrak p_i$ has height $1$, and is a minimal prime over $(x)$. For each $i$, let $\mathfrak q_{i1}, \ldots, \mathfrak q_{is_i}$ be the associated primes of the $R^\wedge$-module $R^\wedge/\mathfrak p_iR^\wedge$. By Lemma \ref{lemma-codimension-1-analytically-unramified} we see that $(R^\wedge)_{\mathfrak q_{ij}}$ is regular. By Lemma \ref{lemma-bourbaki} we see that $$ \text{Ass}_{R^\wedge}(R^\wedge/xR^\wedge) = \bigcup\nolimits_{\mathfrak p \in \text{Ass}_R(R/xR)} \text{Ass}_{R^\wedge}(R^\wedge/\mathfrak pR^\wedge) = \{\mathfrak q_{ij}\}. $$ Let $y \in R^\wedge$ with $y^2 = 0$. As $(R^\wedge)_{\mathfrak q_{ij}}$ is regular, and hence a domain (Lemma \ref{lemma-regular-domain}) we see that $y$ maps to zero in $(R^\wedge)_{\mathfrak q_{ij}}$. Hence $y$ maps to zero in $R^\wedge/xR^\wedge$ by Lemma \ref{lemma-zero-at-ass-zero}. Hence $y = xy'$. Since $x$ is a nonzerodivisor (as $R \to R^\wedge$ is flat) we see that $(y')^2 = 0$. Hence we conclude that $y \in \bigcap x^nR^\wedge = (0)$ (Lemma \ref{lemma-intersect-powers-ideal-module-zero}). \end{proof} \begin{lemma} \label{lemma-local-nagata-domain-analytically-unramified} Let $(R, \mathfrak m)$ be a local ring. If $R$ is Noetherian, a domain, and Nagata, then $R$ is analytically unramified. \end{lemma} \begin{proof} By induction on $\dim(R)$. The case $\dim(R) = 0$ is trivial. Hence we assume $\dim(R) = d$ and that the lemma holds for all Noetherian Nagata domains of dimension $< d$. \medskip\noindent Let $R \subset S$ be the integral closure of $R$ in the field of fractions of $R$. By assumption $S$ is a finite $R$-module. By Lemma \ref{lemma-quasi-finite-over-nagata} we see that $S$ is Nagata. By Lemma \ref{lemma-integral-sub-dim-equal} we see $\dim(R) = \dim(S)$. Let $\mathfrak m_1, \ldots, \mathfrak m_t$ be the maximal ideals of $S$. Each of these lies over the maximal ideal $\mathfrak m$ of $R$. Moreover $$ (\mathfrak m_1 \cap \ldots \cap \mathfrak m_t)^n \subset \mathfrak mS $$ for sufficiently large $n$ as $S/\mathfrak mS$ is Artinian. By Lemma \ref{lemma-completion-flat} $R^\wedge \to S^\wedge$ is an injective map, and by the Chinese Remainder Lemma \ref{lemma-chinese-remainder} combined with Lemma \ref{lemma-change-ideal-completion} we have $S^\wedge = \prod S^\wedge_i$ where $S^\wedge_i$ is the completion of $S$ with respect to the maximal ideal $\mathfrak m_i$. Hence it suffices to show that $S_{\mathfrak m_i}$ is analytically unramified. In other words, we have reduced to the case where $R$ is a Noetherian normal Nagata domain. \medskip\noindent Assume $R$ is a Noetherian, normal, local Nagata domain. Pick a nonzero $x \in \mathfrak m$ in the maximal ideal. We are going to apply Lemma \ref{lemma-criterion-analytically-unramified}. We have to check properties (1), (2), (3)(a) and (3)(b). Property (1) is clear. We have that $R/xR$ has no embedded primes by Lemma \ref{lemma-normal-domain-intersection-localizations-height-1}. Thus property (2) holds. The same lemma also tells us each associated prime $\mathfrak p$ of $R/xR$ has height $1$. Hence $R_{\mathfrak p}$ is a $1$-dimensional normal domain hence regular (Lemma \ref{lemma-characterize-dvr}). Thus (3)(a) holds. Finally (3)(b) holds by induction hypothesis, since $R/\mathfrak p$ is Nagata (by Lemma \ref{lemma-quasi-finite-over-nagata} or directly from the definition). Thus we conclude $R$ is analytically unramified. \end{proof} \begin{lemma} \label{lemma-local-nagata-and-analytically-unramified} Let $(R, \mathfrak m)$ be a Noetherian local ring. The following are equivalent: \begin{enumerate} \item $R$ is Nagata, \item for $R \to S$ finite with $S$ a domain and $\mathfrak m' \subset S$ maximal the local ring $S_{\mathfrak m'}$ is analytically unramified, \item for $(R, \mathfrak m) \to (S, \mathfrak m')$ finite local homomorphism with $S$ a domain, $S$ is analytically unramified. \end{enumerate} \end{lemma} \begin{proof} Assume $R$ is Nagata and let $R \to S$ and $\mathfrak m' \subset S$ be as in (2). Then $S$ is Nagata by Lemma \ref{lemma-quasi-finite-over-nagata}. Hence the local ring $S_{\mathfrak m'}$ is Nagata (Lemma \ref{lemma-nagata-localize}). Thus it is analytically unramified by Lemma \ref{lemma-local-nagata-domain-analytically-unramified}. It is clear that (2) implies (3). \medskip\noindent Assume (3) holds. Let $\mathfrak p \subset R$ be a prime ideal and let $L/\kappa(\mathfrak p)$ be a finite extension of fields. To prove (1) we have to show that the integral closure of $R/\mathfrak p$ is finite over $R/\mathfrak p$. If $\mathfrak p = \mathfrak m$, then $R/\mathfrak p$ is a field and the assertion is immediate. Thus we may assume $\mathfrak p \not = \mathfrak m$ and choose $g \in \mathfrak m \setminus \mathfrak p$. Choose $x_1, \ldots, x_n \in L$ which generate $L$ over $\kappa(\mathfrak p)$. For each $i$ let $P_i(T) = T^{d_i} + a_{i, 1} T^{d_i - 1} + \ldots + a_{i, d_i}$ be the minimal polynomial for $x_i$ over $\kappa(\mathfrak p)$. After replacing $x_i$ by $f_i x_i$ for a suitable $f_i \in R$, $f_i \not \in \mathfrak p$ we may assume $a_{i, j} \in R/\mathfrak p$. After further replacing each $x_i$ by $g x_i$, we may assume $a_{i, j} \in \mathfrak m/\mathfrak p \subset R/\mathfrak p$ for all $i, j$. Having done this let $S = (R/\mathfrak p)[x_1, \ldots, x_n] \subset L$. Then $S$ is finite over $R$, a domain, and $S/\mathfrak m S$ is a quotient of $(R/\mathfrak m)[T_1, \ldots, T_n]/(T_1^{d_1}, \ldots, T_n^{d_n})$. Hence $S$ is local. By (3) $S$ is analytically unramified and by Lemma \ref{lemma-analytically-unramified-easy} we find that its integral closure $S'$ in $L$ is finite over $S$. Since $S'$ is also the integral closure of $R/\mathfrak p$ in $L$ we win. \end{proof} \noindent The following proposition says in particular that an algebra of finite type over a Nagata ring is a Nagata ring. \begin{proposition}[Nagata] \label{proposition-nagata-universally-japanese} Let $R$ be a ring. The following are equivalent: \begin{enumerate} \item $R$ is a Nagata ring, \item any finite type $R$-algebra is Nagata, and \item $R$ is universally Japanese and Noetherian. \end{enumerate} \end{proposition} \begin{proof} It is clear that a Noetherian universally Japanese ring is universally Nagata (i.e., condition (2) holds). Let $R$ be a Nagata ring. We will show that any finitely generated $R$-algebra $S$ is Nagata. This will prove the proposition. \medskip\noindent Step 1. There exists a sequence of ring maps $R = R_0 \to R_1 \to R_2 \to \ldots \to R_n = S$ such that each $R_i \to R_{i + 1}$ is generated by a single element. Hence by induction it suffices to prove $S$ is Nagata if $S \cong R[x]/I$. \medskip\noindent Step 2. Let $\mathfrak q \subset S$ be a prime of $S$, and let $\mathfrak p \subset R$ be the corresponding prime of $R$. We have to show that $S/\mathfrak q$ is N-2. Hence we have reduced to proving the following: (*) Given a Nagata domain $R$ and a monogenic extension $R \subset S$ of domains then $S$ is N-2. \medskip\noindent Step 3: Let $R$ be a Nagata domain and let $R \subset S$ be a monogenic extension of domains. Suppose the induced extension of fraction fields of $R$ and $S$ is purely transcendental of positive transcendence degree. In this case $S = R[x]$. By Lemma \ref{lemma-polynomial-ring-N-2} we see that $S$ is N-2. Hence we have reduced to proving the following: (**) Given a Nagata domain $R$ and a monogenic extension $R \subset S$ of domains inducing a finite extension of fraction fields then $S$ is N-2. \medskip\noindent Step 4. Let $R$ be a Nagata domain and let $R \subset S$ be a monogenic extension of domains inducing a finite extension of fraction fields $L/K$. Choose an element $x \in S$ which generates $S$ as an $R$-algebra. Let $M/L$ be a finite extension of fields. Let $R'$ be the integral closure of $R$ in $M$. Then the integral closure $S'$ of $S$ in $M$ is equal to the integral closure of $R'[x]$ in $M$. Also the fraction field of $R'$ is $M$ and $R \subset R'$ is finite (by the Nagata property of $R$). This implies that $R'$ is a Nagata ring (Lemma \ref{lemma-quasi-finite-over-nagata}). To show that $S'$ is finite over $S$ is the same as showing that $S'$ is finite over $R'[x]$. Replace $R$ by $R'$ and $S$ by $R'[x]$ to reduce to the following statement: (***) Given a normal Nagata domain $R$ with fraction field $K$, and $x \in K$, the ring $S \subset K$ generated by $R$ and $x$ is N-1. \medskip\noindent Step 5. Let $R$ be a normal Nagata domain with fraction field $K$. Let $x = b/a \in K$. We have to show that the ring $S \subset K$ generated by $R$ and $x$ is N-1. Note that $S_a \cong R_a$ is normal. Hence by Lemma \ref{lemma-characterize-N-1} it suffices to show that $S_{\mathfrak m}$ is N-1 for every maximal ideal $\mathfrak m$ of $S$. \medskip\noindent With assumptions as in the preceding paragraph, pick such a maximal ideal and set $\mathfrak n = R \cap \mathfrak m$. The residue field extension $\kappa(\mathfrak m)/\kappa(\mathfrak n)$ is finite (Theorem \ref{theorem-nullstellensatz}) and generated by the image of $x$. After replacing $R$ by $R_a$ for some $a \in R$, $a \not \in \mathfrak n$ and $S$ by $S_a$, we may assume there exists a monic polynomial $f(X) = X^d + \sum_{i = 1, \ldots, d} a_iX^{d - i}$ in $R[X]$ with $f(x) \in \mathfrak m$ (details omitted). Let $K''/K$ be a finite extension of fields such that the polynomial $f(X)$ splits completely in $K''[X]$. Let $R'$ be the integral closure of $R$ in $K''$. Let $S' \subset K''$ be the subring generated by $R'$ and $x$. As $R$ is Nagata we see $R'$ is finite over $R$ and Nagata (Lemma \ref{lemma-quasi-finite-over-nagata}). Moreover, $S'$ is finite over $S$. If for every maximal ideal $\mathfrak m'$ of $S'$ lying over $\mathfrak m$ the local ring $S'_{\mathfrak m'}$ is N-1, then $S'_{\mathfrak m}$ is N-1 by Lemma \ref{lemma-characterize-N-1}, which in turn implies that $S_{\mathfrak m}$ is N-1 by Lemma \ref{lemma-finite-extension-N-2}. After replacing $R$ by $R'$ and $S$ by $S'$, and $\mathfrak m$ by any of the maximal ideals $\mathfrak m'$ lying over $\mathfrak m$ we reach the situation where the polynomial $f$ above splits completely: $f(X) = \prod_{i = 1, \ldots, d} (X - a_i)$ with $a_i \in R$. Since $f(x) \in \mathfrak m$ we see that $x - a_i \in \mathfrak m$ for some $i$. Finally, after replacing $x$ by $x - a_i$ we may assume that $x \in \mathfrak m$. \medskip\noindent To recapitulate: $R$ is a normal Nagata domain with fraction field $K$, $x \in K$ and $S$ is the subring of $K$ generated by $x$ and $R$, finally $\mathfrak m \subset S$ is a maximal ideal with $x \in \mathfrak m$. We have to show $S_{\mathfrak m}$ is N-1. If $x = 0$, then $S = R$ and there is nothing to prove. Thus we may and do assume $x \not = 0$. \medskip\noindent We will show that Lemma \ref{lemma-criterion-analytically-unramified} applies to the local ring $S_{\mathfrak m}$ and the element $x$. This will imply that $S_{\mathfrak m}$ is analytically unramified, whereupon we see that it is N-1 by Lemma \ref{lemma-analytically-unramified-easy}. \medskip\noindent We have to check properties (1), (2), (3)(a) and (3)(b). Property (1) is trivial. Let $I = \Ker(R[X] \to S)$ where $X \mapsto x$. We claim that $I$ is generated by all linear forms $aX - b$ such that $ax = b$ in $K$. Clearly all these linear forms are in $I$. If $g = a_d X^d + \ldots + a_1 X + a_0 \in I$, then we see that $a_dx$ is integral over $R$ (Lemma \ref{lemma-make-integral-trivial}) and hence $b := a_dx \in R$ as $R$ is normal. Then $g - (a_dX - b)X^{d - 1} \in I$ and we win by induction on the degree. As a consequence we see that $$ S/xS = R[X]/(X, I) = R/J $$ where $$ J = \{b \in R \mid ax = b \text{ for some }a \in R\} = xR \cap R $$ By Lemma \ref{lemma-normal-domain-intersection-localizations-height-1} we see that $S/xS = R/J$ has no embedded primes as an $R$-module, hence as an $R/J$-module, hence as an $S/xS$-module, hence as an $S$-module. This proves property (2). Take such an associated prime $\mathfrak q \subset S$ with the property $\mathfrak q \subset \mathfrak m$ (so that it is an associated prime of $S_{\mathfrak m}/xS_{\mathfrak m}$ -- it does not matter for the arguments). Then $\mathfrak q$ is minimal over $xS$ and hence has height $1$. By the sequence of equalities above we see that $\mathfrak p = R \cap \mathfrak q$ is an associated prime of $R/J$, and so has height $1$ (see Lemma \ref{lemma-normal-domain-intersection-localizations-height-1}). Thus $R_{\mathfrak p}$ is a discrete valuation ring and therefore $R_{\mathfrak p} \subset S_{\mathfrak q}$ is an equality. This shows that $S_{\mathfrak q}$ is regular. This proves property (3)(a). Finally, $(S/\mathfrak q)_{\mathfrak m}$ is a localization of $S/\mathfrak q$, which is a quotient of $S/xS = R/J$. Hence $(S/\mathfrak q)_{\mathfrak m}$ is a localization of a quotient of the Nagata ring $R$, hence Nagata (Lemmas \ref{lemma-quasi-finite-over-nagata} and \ref{lemma-nagata-localize}) and hence analytically unramified (Lemma \ref{lemma-local-nagata-domain-analytically-unramified}). This shows (3)(b) holds and we are done. \end{proof} \begin{proposition} \label{proposition-ubiquity-nagata} The following types of rings are Nagata and in particular universally Japanese: \begin{enumerate} \item fields, \item Noetherian complete local rings, \item $\mathbf{Z}$, \item Dedekind domains with fraction field of characteristic zero, \item finite type ring extensions of any of the above. \end{enumerate} \end{proposition} \begin{proof} The Noetherian complete local ring case is Lemma \ref{lemma-Noetherian-complete-local-Nagata}. In the other cases you just check if $R/\mathfrak p$ is N-2 for every prime ideal $\mathfrak p$ of the ring. This is clear whenever $R/\mathfrak p$ is a field, i.e., $\mathfrak p$ is maximal. Hence for the Dedekind ring case we only need to check it when $\mathfrak p = (0)$. But since we assume the fraction field has characteristic zero Lemma \ref{lemma-domain-char-zero-N-1-2} kicks in. \end{proof} \begin{example} \label{example-nonjapanese-dvr} A discrete valuation ring is Nagata if and only if it is N-2 (because the quotient by the maximal ideal is a field and hence N-2). The discrete valuation ring $A$ of Example \ref{example-bad-dvr-char-p} is not Nagata, i.e., it is not N-2. Namely, the finite extension $A \subset R = A[f]$ is not N-1. To see this say $f = \sum a_i x^i$. For every $n \geq 1$ set $g_n = \sum_{i < n} a_i x^i \in A$. Then $h_n = (f - g_n)/x^n$ is an element of the fraction field of $R$ and $h_n^p \in k^p[[x]] \subset A$. Hence the integral closure $R'$ of $R$ contains $h_1, h_2, h_3, \ldots$. Now, if $R'$ were finite over $R$ and hence $A$, then $f = x^n h_n + g_n$ would be contained in the submodule $A + x^nR'$ for all $n$. By Artin-Rees this would imply $f \in A$ (Lemma \ref{lemma-intersect-powers-ideal-module-zero}), a contradiction. \end{example} \begin{lemma} \label{lemma-nagata-pth-roots} Let $(A, \mathfrak m)$ be a Noetherian local domain which is Nagata and has fraction field of characteristic $p$. If $a \in A$ has a $p$th root in $A^\wedge$, then $a$ has a $p$th root in $A$. \end{lemma} \begin{proof} Let $\alpha \in A^\wedge$ be a $p$th root of $a$. To get a contradiction, assume $a$ does not have a $p$th root in $A$. Then $a$ does not have a $p$th root in the fraction field $K$ of $A$. Namely, if $\beta = b/c$ with $b, c \in A$ and $c \not = 0$ satisfies $\beta^p = a$, then $\alpha = b/c$ in $A^\wedge$ which implies that $c$ divides $b$ in $A$ by faithful flatness of $A \to A^\wedge$ and hence $\beta \in A$, contradiction. Thus $B = A[x]/(x^p - a)$ is a domain because $K[x]/(x^p - a)$ is a field. The ring $B$ is local because its special fibre $B/\mathfrak mB = \kappa(\mathfrak m)[x]/(x^p - \overline{a})$ has a unique prime ideal. Moreover, the maximal-adic and $\mathfrak mB$-adic topologies on $B$ agree. However, the completion of $B$ isn't reduced by the assumed existence of $\alpha$. This contradicts our earlier results, as $B$ is a Nagata ring (Proposition \ref{proposition-nagata-universally-japanese}) and hence analytically unramified by Lemma \ref{lemma-local-nagata-domain-analytically-unramified}. \end{proof} \section{Ascending properties} \label{section-ascending-properties} % BEGIN ALGEBRA EDITORIAL ROUTE section-ascending-properties \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-ascending-properties}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-ascending-properties \noindent In this section we start proving some algebraic facts concerning the ``ascent'' of properties of rings. To do this for depth of rings one uses the following result on ascending depth of modules, see \cite[IV, Proposition 6.3.1]{EGA}. \begin{lemma} \label{lemma-apply-grothendieck-module} \begin{reference} \cite[IV, Proposition 6.3.1]{EGA} \end{reference} We have $$ \text{depth}(M \otimes_R N) = \text{depth}(M) + \text{depth}(N/\mathfrak m_RN) $$ where $R \to S$ is a local homomorphism of local Noetherian rings, $M$ is a finite $R$-module, and $N$ is a finite $S$-module flat over $R$. \end{lemma} \begin{proof} In the statement and in the proof below, we take the depth of $M$ as an $R$-module, the depth of $M \otimes_R N$ as an $S$-module, and the depth of $N/\mathfrak m_RN$ as an $S/\mathfrak m_RS$-module. If $M = 0$ or $N = 0$, then both sides of the formula are infinite, and there is nothing to prove. Thus we may assume that $M$ and $N$ are nonzero. Denote by $n$ the right hand side. First assume that $n$ is zero. Then both $\text{depth}(M) = 0$ and $\text{depth}(N/\mathfrak m_RN) = 0$. This means there is a $z \in M$ whose annihilator is $\mathfrak m_R$ and a $\overline{y} \in N/\mathfrak m_RN$ whose annihilator is $\mathfrak m_S/\mathfrak m_RS$. Let $y \in N$ be a lift of $\overline{y}$. Since $N$ is flat over $R$ the map $z : R/\mathfrak m_R \to M$ produces an injective map $N/\mathfrak m_RN \to M \otimes_R N$. Hence the annihilator of $z \otimes y$ is $\mathfrak m_S$. Thus $\text{depth}(M \otimes_R N) = 0$ as well. \medskip\noindent Assume $n > 0$. If $\text{depth}(N/\mathfrak m_RN) > 0$, then we may choose $f \in \mathfrak m_S$ mapping to $\overline{f} \in S/\mathfrak m_RS$ which is a nonzerodivisor on $N/\mathfrak m_RN$. Then $\text{depth}(N/\mathfrak m_RN) = \text{depth}(N/(f, \mathfrak m_R)N) + 1$ by Lemma \ref{lemma-depth-drops-by-one}. According to Lemma \ref{lemma-mod-injective} the element $f \in S$ is a nonzerodivisor on $N$ and $N/fN$ is flat over $R$. Hence by induction on $n$ we have $$ \text{depth}(M \otimes_R N/fN) = \text{depth}(M) + \text{depth}(N/(f, \mathfrak m_R)N). $$ Because $N/fN$ is flat over $R$ the sequence $$ 0 \to M \otimes_R N \to M \otimes_R N \to M \otimes_R N/fN \to 0 $$ is exact where the first map is multiplication by $f$ (Lemma \ref{lemma-flat-tor-zero}). Hence by Lemma \ref{lemma-depth-drops-by-one} we find that $\text{depth}(M \otimes_R N) = \text{depth}(M \otimes_R N/fN) + 1$ and we conclude that equality holds in the formula of the lemma. \medskip\noindent If $n > 0$, but $\text{depth}(N/\mathfrak m_RN) = 0$, then we can choose $f \in \mathfrak m_R$ which is a nonzerodivisor on $M$. As $N$ is flat over $R$ it is also the case that $f$ is a nonzerodivisor on $M \otimes_R N$. By induction on $n$ again we have $$ \text{depth}(M/fM \otimes_R N) = \text{depth}(M/fM) + \text{depth}(N/\mathfrak m_RN). $$ In this case $\text{depth}(M \otimes_R N) = \text{depth}(M/fM \otimes_R N) + 1$ and $\text{depth}(M) = \text{depth}(M/fM) + 1$ by Lemma \ref{lemma-depth-drops-by-one} and we conclude that equality holds in the formula of the lemma. \end{proof} \begin{lemma} \label{lemma-apply-grothendieck} Suppose that $R \to S$ is a flat and local ring homomorphism of Noetherian local rings. Then $$ \text{depth}(S) = \text{depth}(R) + \text{depth}(S/\mathfrak m_RS). $$ \end{lemma} \begin{proof} This is a special case of Lemma \ref{lemma-apply-grothendieck-module}. \end{proof} \begin{lemma} \label{lemma-CM-goes-up} Let $R \to S$ be a flat local homomorphism of local Noetherian rings. Then the following are equivalent: \begin{enumerate} \item $S$ is Cohen-Macaulay, and \item $R$ and $S/\mathfrak m_RS$ are Cohen-Macaulay. \end{enumerate} \end{lemma} \begin{proof} Follows from the definitions and Lemmas \ref{lemma-apply-grothendieck} and \ref{lemma-dimension-base-fibre-equals-total}. \end{proof} \begin{lemma} \label{lemma-Sk-goes-up} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $R$ is Noetherian, \item $S$ is Noetherian, \item $\varphi$ is flat, \item the fibre rings $S \otimes_R \kappa(\mathfrak p)$ are $(S_k)$, and \item $R$ has property $(S_k)$. \end{enumerate} Then $S$ has property $(S_k)$. \end{lemma} \begin{proof} Let $\mathfrak q$ be a prime of $S$ lying over a prime $\mathfrak p$ of $R$. By Lemma \ref{lemma-apply-grothendieck} we have $$ \text{depth}(S_{\mathfrak q}) = \text{depth}(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + \text{depth}(R_{\mathfrak p}). $$ On the other hand, we have $$ \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) \geq \dim(S_{\mathfrak q}) $$ by Lemma \ref{lemma-dimension-base-fibre-total}. (Actually equality holds, by Lemma \ref{lemma-dimension-base-fibre-equals-total} but strictly speaking we do not need this.) Finally, as the fibre rings of the map are assumed $(S_k)$ we see that $\text{depth}(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) \geq \min(k, \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}))$. Thus the lemma follows by the following string of inequalities \begin{eqnarray*} \text{depth}(S_{\mathfrak q}) & = & \text{depth}(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + \text{depth}(R_{\mathfrak p}) \\ & \geq & \min(k, \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q})) + \min(k, \dim(R_{\mathfrak p})) \\ & = & \min(2k, \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + k, k + \dim(R_\mathfrak p), \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + \dim(R_{\mathfrak p})) \\ & \geq & \min(k, \dim(S_{\mathfrak q})) \end{eqnarray*} as desired. \end{proof} \begin{lemma} \label{lemma-Rk-goes-up} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $R$ is Noetherian, \item $S$ is Noetherian, \item $\varphi$ is flat, \item the fibre rings $S \otimes_R \kappa(\mathfrak p)$ have property $(R_k)$, and \item $R$ has property $(R_k)$. \end{enumerate} Then $S$ has property $(R_k)$. \end{lemma} \begin{proof} Let $\mathfrak q$ be a prime of $S$ lying over a prime $\mathfrak p$ of $R$. Assume that $\dim(S_{\mathfrak q}) \leq k$. Since $\dim(S_{\mathfrak q}) = \dim(R_{\mathfrak p}) + \dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q})$ by Lemma \ref{lemma-dimension-base-fibre-equals-total} we see that $\dim(R_{\mathfrak p}) \leq k$ and $\dim(S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) \leq k$. Hence $R_{\mathfrak p}$ and $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ are regular by assumption. It follows that $S_{\mathfrak q}$ is regular by Lemma \ref{lemma-flat-over-regular-with-regular-fibre}. \end{proof} \begin{lemma} \label{lemma-reduced-goes-up-noetherian} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $R$ is Noetherian, \item $S$ is Noetherian, \item $\varphi$ is flat, \item the fibre rings $S \otimes_R \kappa(\mathfrak p)$ are reduced, \item $R$ is reduced. \end{enumerate} Then $S$ is reduced. \end{lemma} \begin{proof} For Noetherian rings reduced is the same as having properties $(S_1)$ and $(R_0)$, see Lemma \ref{lemma-criterion-reduced}. Thus we know $R$ and the fibre rings have these properties. Hence we may apply Lemmas \ref{lemma-Sk-goes-up} and \ref{lemma-Rk-goes-up} and we see that $S$ is $(S_1)$ and $(R_0)$, in other words reduced by Lemma \ref{lemma-criterion-reduced} again. \end{proof} \begin{lemma} \label{lemma-reduced-goes-up} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ is smooth, \item $R$ is reduced. \end{enumerate} Then $S$ is reduced. \end{lemma} \begin{proof} Observe that $R \to S$ is flat with regular fibres (see the list of results on smooth ring maps in Section \ref{section-smooth-overview}). In particular, the fibres are reduced. Thus if $R$ is Noetherian, then $S$ is Noetherian and we get the result from Lemma \ref{lemma-reduced-goes-up-noetherian}. \medskip\noindent In the general case we may find a finitely generated $\mathbf{Z}$-subalgebra $R_0 \subset R$ and a smooth ring map $R_0 \to S_0$ such that $S \cong R \otimes_{R_0} S_0$, see remark (10) in Section \ref{section-smooth-overview}. Now, if $x \in S$ is an element with $x^2 = 0$, then we can enlarge $R_0$ and assume that $x$ comes from an element $x_0 \in S_0$. After enlarging $R_0$ once more we may assume that $x_0^2 = 0$ in $S_0$. However, since the subring $R_0 \subset R$ is reduced, we see that $S_0$ is reduced and hence $x_0 = 0$ as desired. \end{proof} \begin{lemma} \label{lemma-normal-goes-up-noetherian} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $R$ is Noetherian, \item $S$ is Noetherian, \item $\varphi$ is flat, \item the fibre rings $S \otimes_R \kappa(\mathfrak p)$ are normal, and \item $R$ is normal. \end{enumerate} Then $S$ is normal. \end{lemma} \begin{proof} For a Noetherian ring being normal is the same as having properties $(S_2)$ and $(R_1)$, see Lemma \ref{lemma-criterion-normal}. Thus we know $R$ and the fibre rings have these properties. Hence we may apply Lemmas \ref{lemma-Sk-goes-up} and \ref{lemma-Rk-goes-up} and we see that $S$ is $(S_2)$ and $(R_1)$, in other words normal by Lemma \ref{lemma-criterion-normal} again. \end{proof} \begin{lemma} \label{lemma-normal-goes-up} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ is smooth, \item $R$ is normal. \end{enumerate} Then $S$ is normal. \end{lemma} \begin{proof} Observe that $R \to S$ is flat with regular fibres (see the list of results on smooth ring maps in Section \ref{section-smooth-overview}). In particular, the fibres are normal. Thus if $R$ is Noetherian, then $S$ is Noetherian and we get the result from Lemma \ref{lemma-normal-goes-up-noetherian}. \medskip\noindent The general case. First note that $R$ is reduced and hence $S$ is reduced by Lemma \ref{lemma-reduced-goes-up}. Let $\mathfrak q$ be a prime of $S$ and let $\mathfrak p$ be the corresponding prime of $R$. Note that $R_{\mathfrak p}$ is a normal domain. We have to show that $S_{\mathfrak q}$ is a normal domain. To do this we may replace $R$ by $R_{\mathfrak p}$ and $S$ by $S_{\mathfrak p}$. Hence we may assume that $R$ is a normal domain. \medskip\noindent Assume $R \to S$ smooth, and $R$ a normal domain. We may find a finitely generated $\mathbf{Z}$-subalgebra $R_0 \subset R$ and a smooth ring map $R_0 \to S_0$ such that $S \cong R \otimes_{R_0} S_0$, see remark (10) in Section \ref{section-smooth-overview}. As $R_0$ is a Nagata domain (see Proposition \ref{proposition-ubiquity-nagata}) we see that its integral closure $R_0'$ is finite over $R_0$. Moreover, as $R$ is a normal domain it is clear that $R_0' \subset R$. Hence we may replace $R_0$ by $R_0'$ and $S_0$ by $R_0' \otimes_{R_0} S_0$ and assume that $R_0$ is a normal Noetherian domain. By the first paragraph of the proof we conclude that $S_0$ is a normal ring (it need not be a domain of course). In this way we see that $R = \bigcup R_\lambda$ is the union of normal Noetherian domains and correspondingly $S = \colim R_\lambda \otimes_{R_0} S_0$ is the colimit of normal rings. This implies that $S$ is a normal ring. Some details omitted. \end{proof} \begin{lemma} \label{lemma-regular-goes-up} \begin{slogan} Regularity ascends along smooth maps of rings. \end{slogan} Let $\varphi : R \to S$ be a ring map. Assume \begin{enumerate} \item $\varphi$ is smooth, \item $R$ is a regular ring. \end{enumerate} Then $S$ is regular. \end{lemma} \begin{proof} This follows by applying Lemma \ref{lemma-Rk-goes-up} for every $k \geq 0$ using Lemma \ref{lemma-characterize-smooth-over-field} to see that the hypotheses are satisfied. \end{proof} \section{Descending properties} \label{section-descending-properties} % BEGIN ALGEBRA EDITORIAL ROUTE section-descending-properties \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-descending-properties}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-descending-properties \noindent In this section we start proving some algebraic facts concerning the ``descent'' of properties of rings. It turns out that it is often ``easier'' to descend properties than it is to ascend them. In other words, the assumption on the ring map $R \to S$ is often weaker than the assumptions in the corresponding lemma of the preceding section. However, we warn the reader that the results on descent are often useless unless the corresponding ascent can also be shown! Here is a typical result which illustrates this phenomenon. \begin{lemma} \label{lemma-descent-Noetherian} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is Noetherian. \end{enumerate} Then $R$ is Noetherian. \end{lemma} \begin{proof} Let $I_0 \subset I_1 \subset I_2 \subset \ldots$ be a growing sequence of ideals of $R$. By assumption we have $I_nS = I_{n+1}S = I_{n+2}S = \ldots$ for some $n$. By faithful flatness, extending and contracting gives the same ideal, meaning that $I = R \cap IS$ for each ideal $I$ in $R$ (Lemma \ref{lemma-faithfully-flat-universally-injective}). So $I_n = I_{n+1} = I_{n+2} = \ldots$ as desired. \end{proof} \begin{lemma} \label{lemma-descent-reduced} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is reduced. \end{enumerate} Then $R$ is reduced. \end{lemma} \begin{proof} This is clear as $R \to S$ is injective, by Lemma \ref{lemma-faithfully-flat-universally-injective}. \end{proof} \begin{lemma} \label{lemma-descent-normal} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is a normal ring. \end{enumerate} Then $R$ is a normal ring. \end{lemma} \begin{proof} Since $S$ is reduced it follows that $R$ is reduced. Let $\mathfrak p$ be a prime of $R$. We have to show that $R_{\mathfrak p}$ is a normal domain. Since $S_{\mathfrak p}$ is faithfully flat over $R_{\mathfrak p}$ too we may assume that $R$ is local with maximal ideal $\mathfrak m$. Let $\mathfrak q$ be a prime of $S$ lying over $\mathfrak m$. Then we see that $R \to S_{\mathfrak q}$ is faithfully flat (Lemma \ref{lemma-local-flat-ff}). Hence we may assume $S$ is local as well. In particular $S$ is a normal domain. Since $R \to S$ is faithfully flat and $S$ is a normal domain we see that $R$ is a domain. Next, suppose that $a/b$ is integral over $R$ with $a, b \in R$. Then $a/b \in S$ as $S$ is normal. Hence $a \in bS$. This means that $a : R \to R/bR$ becomes the zero map after base change to $S$. By faithful flatness we see that $a \in bR$, so $a/b \in R$. Hence $R$ is normal. \end{proof} \begin{lemma} \label{lemma-descent-regular} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is a regular ring. \end{enumerate} Then $R$ is a regular ring. \end{lemma} \begin{proof} We see that $R$ is Noetherian by Lemma \ref{lemma-descent-Noetherian}. Let $\mathfrak p \subset R$ be a prime. Choose a prime $\mathfrak q \subset S$ lying over $\mathfrak p$. Then Lemma \ref{lemma-flat-under-regular} applies to $R_\mathfrak p \to S_\mathfrak q$ and we conclude that $R_\mathfrak p$ is regular. Since $\mathfrak p$ was arbitrary we see $R$ is regular. \end{proof} \begin{lemma} \label{lemma-descent-Sk} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is Noetherian and has property $(S_k)$. \end{enumerate} Then $R$ is Noetherian and has property $(S_k)$. \end{lemma} \begin{proof} We have already seen that (1) and (2) imply that $R$ is Noetherian, see Lemma \ref{lemma-descent-Noetherian}. Let $\mathfrak p \subset R$ be a prime ideal. Choose a prime $\mathfrak q \subset S$ lying over $\mathfrak p$ which corresponds to a minimal prime of the fibre ring $S \otimes_R \kappa(\mathfrak p)$. Then $A = R_{\mathfrak p} \to S_{\mathfrak q} = B$ is a flat local ring homomorphism of Noetherian local rings with $\mathfrak m_AB$ an ideal of definition of $B$. Hence $\dim(A) = \dim(B)$ (Lemma \ref{lemma-dimension-base-fibre-equals-total}) and $\text{depth}(A) = \text{depth}(B)$ (Lemma \ref{lemma-apply-grothendieck}). Hence since $B$ has $(S_k)$ we see that $A$ has $(S_k)$. \end{proof} \begin{lemma} \label{lemma-descent-Rk} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is faithfully flat, and \item $S$ is Noetherian and has property $(R_k)$. \end{enumerate} Then $R$ is Noetherian and has property $(R_k)$. \end{lemma} \begin{proof} We have already seen that (1) and (2) imply that $R$ is Noetherian, see Lemma \ref{lemma-descent-Noetherian}. Let $\mathfrak p \subset R$ be a prime ideal and assume $\dim(R_{\mathfrak p}) \leq k$. Choose a prime $\mathfrak q \subset S$ lying over $\mathfrak p$ which corresponds to a minimal prime of the fibre ring $S \otimes_R \kappa(\mathfrak p)$. Then $A = R_{\mathfrak p} \to S_{\mathfrak q} = B$ is a flat local ring homomorphism of Noetherian local rings with $\mathfrak m_AB$ an ideal of definition of $B$. Hence $\dim(A) = \dim(B)$ (Lemma \ref{lemma-dimension-base-fibre-equals-total}). As $S$ has $(R_k)$ we conclude that $B$ is a regular local ring. By Lemma \ref{lemma-flat-under-regular} we conclude that $A$ is regular. \end{proof} \begin{lemma} \label{lemma-descent-nagata} Let $R \to S$ be a ring map. Assume that \begin{enumerate} \item $R \to S$ is smooth and surjective on spectra, and \item $S$ is a Nagata ring. \end{enumerate} Then $R$ is a Nagata ring. \end{lemma} \begin{proof} Recall that a Nagata ring is the same thing as a Noetherian universally Japanese ring (Proposition \ref{proposition-nagata-universally-japanese}). We have already seen that $R$ is Noetherian in Lemma \ref{lemma-descent-Noetherian}. Let $R \to A$ be a finite type ring map into a domain. According to Lemma \ref{lemma-check-universally-japanese} it suffices to check that $A$ is N-1. It is clear that $B = A \otimes_R S$ is a finite type $S$-algebra and hence Nagata (Proposition \ref{proposition-nagata-universally-japanese}). Since $A \to B$ is smooth (Lemma \ref{lemma-base-change-smooth}) we see that $B$ is reduced (Lemma \ref{lemma-reduced-goes-up}). Since $B$ is Noetherian it has only a finite number of minimal primes $\mathfrak q_1, \ldots, \mathfrak q_t$ (see Lemma \ref{lemma-Noetherian-irreducible-components}). As $A \to B$ is flat each of these lies over $(0) \subset A$ (by going down, see Lemma \ref{lemma-flat-going-down}). The total ring of fractions $Q(B)$ is the product of the $L_i = \kappa(\mathfrak q_i)$ (Lemmas \ref{lemma-total-ring-fractions-no-embedded-points} and \ref{lemma-minimal-prime-reduced-ring}). Moreover, the integral closure $B'$ of $B$ in $Q(B)$ is the product of the integral closures $B_i'$ of the $B/\mathfrak q_i$ in the factors $L_i$ (compare with Lemma \ref{lemma-characterize-reduced-ring-normal}). Since $B$ is universally Japanese the ring extensions $B/\mathfrak q_i \subset B_i'$ are finite and we conclude that $B' = \prod B_i'$ is finite over $B$. Since $A \to B$ is flat we see that any nonzerodivisor on $A$ maps to a nonzerodivisor on $B$. The corresponding map $$ Q(A) \otimes_A B = (A \setminus \{0\})^{-1}A \otimes_A B = (A \setminus \{0\})^{-1}B \to Q(B) $$ is injective (we used Lemma \ref{lemma-tensor-localization}). Let $A'$ be the integral closure of $A$ in $Q(A)$. Via this map $A'$ maps into $B'$. This induces a map $$ A' \otimes_A B \longrightarrow B' $$ which is injective (by the above and the flatness of $A \to B$). Since $B'$ is a finite $B$-module and $B$ is Noetherian we see that $A' \otimes_A B$ is a finite $B$-module. Hence there exist finitely many elements $x_i \in A'$ such that the elements $x_i \otimes 1$ generate $A' \otimes_A B$ as a $B$-module. Finally, by faithful flatness of $A \to B$ we conclude that the $x_i$ also generate $A'$ as an $A$-module, and we win. \end{proof} \begin{remark} \label{remark-universally-catenary-does-not-descend} The property of being ``universally catenary'' does not descend; not even along \'etale ring maps. In Examples, Section \ref{examples-section-non-catenary-Noetherian-local} there is a construction of a finite ring map $A \to B$ with $A$ local Noetherian and not universally catenary, $B$ semi-local with two maximal ideals $\mathfrak m$, $\mathfrak n$ with $B_{\mathfrak m}$ and $B_{\mathfrak n}$ regular of dimension $2$ and $1$ respectively, and each has the same residue field as $A$. Moreover, $\mathfrak m_A$ generates the maximal ideal in both $B_{\mathfrak m}$ and $B_{\mathfrak n}$ (so $A \to B$ is unramified as well as finite). By Lemma \ref{lemma-etale-makes-unramified-closed} there exists a local \'etale ring map $A \to A'$ such that $B \otimes_A A' = B_1 \times B_2$ decomposes with $A' \to B_i$ surjective. This shows that $A'$ has two minimal primes $\mathfrak q_i$ with $A'/\mathfrak q_i \cong B_i$. Since $B_i$ is regular local (since it is \'etale over either $B_{\mathfrak m}$ or $B_{\mathfrak n}$) we conclude that $A'$ is universally catenary. \end{remark} \section{Geometrically normal algebras} \label{section-geometrically-normal} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-normal \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-normal}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-normal \noindent In this section we put some applications of ascent and descent of properties of rings. \begin{lemma} \label{lemma-geometrically-normal} Let $k$ be a field. Let $A$ be a $k$-algebra. The following properties of $A$ are equivalent: \begin{enumerate} \item $k' \otimes_k A$ is a normal ring for every field extension $k'/k$, \item $k' \otimes_k A$ is a normal ring for every finitely generated field extension $k'/k$, \item $k' \otimes_k A$ is a normal ring for every finite purely inseparable extension $k'/k$, \item $k^{perf} \otimes_k A$ is a normal ring. \end{enumerate} Here normal ring is defined in Definition \ref{definition-ring-normal}. \end{lemma} \begin{proof} It is clear that (1) $\Rightarrow$ (2) $\Rightarrow$ (3) and (1) $\Rightarrow$ (4). \medskip\noindent If $k'/k$ is a finite purely inseparable extension, then there is an embedding $k' \to k^{perf}$ of $k$-extensions. The ring map $k' \otimes_k A \to k^{perf} \otimes_k A$ is faithfully flat, hence $k' \otimes_k A$ is normal if $k^{perf} \otimes_k A$ is normal by Lemma \ref{lemma-descent-normal}. In this way we see that (4) $\Rightarrow$ (3). \medskip\noindent Assume (2) and let $k'/k$ be any field extension. Then we can write $k' = \colim_i k_i$ as a directed colimit of finitely generated field extensions. Hence we see that $k' \otimes_k A = \colim_i k_i \otimes_k A$ is a directed colimit of normal rings. Thus we see that $k' \otimes_k A$ is a normal ring by Lemma \ref{lemma-colimit-normal-ring}. Hence (1) holds. \medskip\noindent Assume (3) and let $K/k$ be a finitely generated field extension. By Lemma \ref{lemma-make-separable} we can find a diagram $$ \xymatrix{ K \ar[r] & K' \\ k \ar[u] \ar[r] & k' \ar[u] } $$ where $k'/k$, $K'/K$ are finite purely inseparable field extensions such that $K'/k'$ is separable. By Lemma \ref{lemma-localization-smooth-separable} there exists a smooth $k'$-algebra $B$ such that $K'$ is the fraction field of $B$. Now we can argue as follows: Step 1: $k' \otimes_k A$ is a normal ring because we assumed (3). Step 2: $B \otimes_{k'} k' \otimes_k A$ is a normal ring as $k' \otimes_k A \to B \otimes_{k'} k' \otimes_k A$ is smooth (Lemma \ref{lemma-base-change-smooth}) and ascent of normality along smooth maps (Lemma \ref{lemma-normal-goes-up}). Step 3. $K' \otimes_{k'} k' \otimes_k A = K' \otimes_k A$ is a normal ring as it is a localization of a normal ring (Lemma \ref{lemma-localization-normal-ring}). Step 4. Finally $K \otimes_k A$ is a normal ring by descent of normality along the faithfully flat ring map $K \otimes_k A \to K' \otimes_k A$ (Lemma \ref{lemma-descent-normal}). This proves the lemma. \end{proof} \begin{definition} \label{definition-geometrically-normal} Let $k$ be a field. A $k$-algebra $R$ is called {\it geometrically normal} over $k$ if the equivalent conditions of Lemma \ref{lemma-geometrically-normal} hold. \end{definition} \begin{lemma} \label{lemma-localization-geometrically-normal-algebra} \begin{slogan} Localization preserves geometric normality. \end{slogan} Let $k$ be a field. A localization of a geometrically normal $k$-algebra is geometrically normal. \end{lemma} \begin{proof} This is clear as being a normal ring is checked at the localizations at prime ideals. \end{proof} \begin{lemma} \label{lemma-separable-field-extension-geometrically-normal} Let $k$ be a field. Let $K/k$ be a separable field extension. Then $K$ is geometrically normal over $k$. \end{lemma} \begin{proof} This is true because $k^{perf} \otimes_k K$ is a field. Namely, it is reduced by Lemma \ref{lemma-separable-extension-preserves-reducedness}. By Lemma \ref{lemma-perfection} (or by Definition \ref{definition-perfection}) the field extension $k^{perf}/k$ is purely inseparable. Hence by Lemma \ref{lemma-radicial-integral-bijective} the ring $k^{perf} \otimes_k K$ has a unique prime ideal. A reduced ring with a unique prime ideal is a field. \end{proof} \begin{lemma} \label{lemma-geometrically-normal-tensor-normal} Let $k$ be a field. Let $A, B$ be $k$-algebras. Assume $A$ is geometrically normal over $k$ and $B$ is a normal ring. Then $A \otimes_k B$ is a normal ring. \end{lemma} \begin{proof} Let $\mathfrak r$ be a prime ideal of $A \otimes_k B$. Denote by $\mathfrak p$, resp.\ $\mathfrak q$ the corresponding prime of $A$, resp.\ $B$. Then $(A \otimes_k B)_{\mathfrak r}$ is a localization of $A_{\mathfrak p} \otimes_k B_{\mathfrak q}$. Hence it suffices to prove the result for the ring $A_{\mathfrak p} \otimes_k B_{\mathfrak q}$, see Lemma \ref{lemma-localization-normal-ring} and Lemma \ref{lemma-localization-geometrically-normal-algebra}. Thus we may assume $A$ and $B$ are domains. \medskip\noindent Assume that $A$ and $B$ are domains with fraction fields $K$ and $L$. Note that $B$ is the filtered colimit of its finite type normal $k$-subalgebras (as $k$ is a Nagata ring, see Proposition \ref{proposition-ubiquity-nagata}, and hence the integral closure of a finite type $k$-subalgebra is still a finite type $k$-subalgebra by Proposition \ref{proposition-nagata-universally-japanese}). By Lemma \ref{lemma-colimit-normal-ring} we reduce to the case that $B$ is of finite type over $k$. \medskip\noindent Assume that $A$ and $B$ are domains with fraction fields $K$ and $L$ and $B$ of finite type over $k$. In this case the ring $K \otimes_k B$ is of finite type over $K$, hence Noetherian (Lemma \ref{lemma-Noetherian-permanence}). In particular $K \otimes_k B$ has finitely many minimal primes (Lemma \ref{lemma-Noetherian-irreducible-components}). Since $A \to A \otimes_k B$ is flat, this implies that $A \otimes_k B$ has finitely many minimal primes (by going down for flat ring maps -- Lemma \ref{lemma-flat-going-down} -- these primes all lie over $(0) \subset A$). Thus it suffices to prove that $A \otimes_k B$ is integrally closed in its total ring of fractions (Lemma \ref{lemma-characterize-reduced-ring-normal}). \medskip\noindent We claim that $K \otimes_k B$ and $A \otimes_k L$ are both normal rings. If this is true then any element $x$ of $Q(A \otimes_k B)$ which is integral over $A \otimes_k B$ is (by Lemma \ref{lemma-normal-ring-integrally-closed}) contained in $K \otimes_k B \cap A \otimes_k L = A \otimes_k B$ and we're done. Since $A \otimes_k L$ is a normal ring by assumption, it suffices to prove that $K \otimes_k B$ is normal. \medskip\noindent As $A$ is geometrically normal over $k$ we see $K$ is geometrically normal over $k$ (Lemma \ref{lemma-localization-geometrically-normal-algebra}) hence $K$ is geometrically reduced over $k$. Hence $K = \bigcup K_i$ is the union of finitely generated field extensions of $k$ which are geometrically reduced (Lemma \ref{lemma-subalgebra-separable}). Each $K_i$ is the localization of a smooth $k$-algebra (Lemma \ref{lemma-localization-smooth-separable}). So $K_i \otimes_k B$ is the localization of a smooth $B$-algebra hence normal (Lemma \ref{lemma-normal-goes-up}). Thus $K \otimes_k B$ is a normal ring (Lemma \ref{lemma-colimit-normal-ring}) and we win. \end{proof} \begin{lemma} \label{lemma-geometrically-normal-over-separable-algebraic} Let $k'/k$ be a separable algebraic field extension. Let $A$ be an algebra over $k'$. Then $A$ is geometrically normal over $k$ if and only if it is geometrically normal over $k'$. \end{lemma} \begin{proof} Let $L/k$ be a finite purely inseparable field extension. Then $L' = k' \otimes_k L$ is a field (see material in Fields, Section \ref{fields-section-algebraic}) and $A \otimes_k L = A \otimes_{k'} L'$. Hence if $A$ is geometrically normal over $k'$, then $A$ is geometrically normal over $k$. \medskip\noindent Assume $A$ is geometrically normal over $k$. Let $K/k'$ be a field extension. Then $$ K \otimes_{k'} A = (K \otimes_k A) \otimes_{(k' \otimes_k k')} k' $$ Since $k' \otimes_k k' \to k'$ is a localization by Lemma \ref{lemma-separable-algebraic-diagonal}, we see that $K \otimes_{k'} A$ is a localization of a normal ring, hence normal. \end{proof} \section{Geometrically regular algebras} \label{section-geometrically-regular} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-regular \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-regular}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-regular \noindent Let $k$ be a field. Let $A$ be a Noetherian $k$-algebra. Let $K/k$ be a finitely generated field extension. Then the ring $K \otimes_k A$ is Noetherian as well, see Lemma \ref{lemma-Noetherian-field-extension}. Thus the following lemma makes sense. \begin{lemma} \label{lemma-geometrically-regular} Let $k$ be a field. Let $A$ be a $k$-algebra. Assume $A$ is Noetherian. The following properties of $A$ are equivalent: \begin{enumerate} \item $k' \otimes_k A$ is regular for every finitely generated field extension $k'/k$, and \item $k' \otimes_k A$ is regular for every finite purely inseparable extension $k'/k$. \end{enumerate} Here regular ring is as in Definition \ref{definition-regular}. \end{lemma} \begin{proof} The lemma makes sense by the remarks preceding the lemma. It is clear that (1) $\Rightarrow$ (2). \medskip\noindent Assume (2) and let $K/k$ be a finitely generated field extension. By Lemma \ref{lemma-make-separable} we can find a diagram $$ \xymatrix{ K \ar[r] & K' \\ k \ar[u] \ar[r] & k' \ar[u] } $$ where $k'/k$, $K'/K$ are finite purely inseparable field extensions such that $K'/k'$ is separable. By Lemma \ref{lemma-localization-smooth-separable} there exists a smooth $k'$-algebra $B$ such that $K'$ is the fraction field of $B$. Now we can argue as follows: Step 1: $k' \otimes_k A$ is a regular ring because we assumed (2). Step 2: $B \otimes_{k'} k' \otimes_k A$ is a regular ring as $k' \otimes_k A \to B \otimes_{k'} k' \otimes_k A$ is smooth (Lemma \ref{lemma-base-change-smooth}) and ascent of regularity along smooth maps (Lemma \ref{lemma-regular-goes-up}). Step 3. $K' \otimes_{k'} k' \otimes_k A = K' \otimes_k A$ is a regular ring as it is a localization of a regular ring (immediate from the definition). Step 4. Finally $K \otimes_k A$ is a regular ring by descent of regularity along the faithfully flat ring map $K \otimes_k A \to K' \otimes_k A$ (Lemma \ref{lemma-descent-regular}). This proves the lemma. \end{proof} \begin{definition} \label{definition-geometrically-regular} Let $k$ be a field. Let $R$ be a Noetherian $k$-algebra. The $k$-algebra $R$ is called {\it geometrically regular} over $k$ if the equivalent conditions of Lemma \ref{lemma-geometrically-regular} hold. \end{definition} \noindent It is clear from the definition that $K \otimes_k R$ is a geometrically regular algebra over $K$ for any finitely generated field extension $K$ of $k$. We will see later (More on Algebra, Proposition \ref{more-algebra-proposition-characterization-geometrically-regular}) that it suffices to check $R \otimes_k k'$ is regular whenever $k \subset k' \subset k^{1/p}$ (finite). \begin{lemma} \label{lemma-geometrically-regular-descent} \begin{slogan} Geometric regularity descends through faithfully flat maps of algebras \end{slogan} Let $k$ be a field. Let $A \to B$ be a faithfully flat $k$-algebra map. If $B$ is geometrically regular over $k$, so is $A$. \end{lemma} \begin{proof} Assume $B$ is geometrically regular over $k$. Let $k'/k$ be a finite, purely inseparable extension. Then $A \otimes_k k' \to B \otimes_k k'$ is faithfully flat as a base change of $A \to B$ (by Lemmas \ref{lemma-surjective-spec-radical-ideal} and \ref{lemma-flat-base-change}) and $B \otimes_k k'$ is regular by our assumption on $B$ over $k$. Then $A \otimes_k k'$ is regular by Lemma \ref{lemma-descent-regular}. \end{proof} \begin{lemma} \label{lemma-geometrically-regular-goes-up} Let $k$ be a field. Let $A \to B$ be a smooth ring map of $k$-algebras. If $A$ is geometrically regular over $k$, then $B$ is geometrically regular over $k$. \end{lemma} \begin{proof} Let $k'/k$ be a finitely generated field extension. Then $A \otimes_k k' \to B \otimes_k k'$ is a smooth ring map (Lemma \ref{lemma-base-change-smooth}) and $A \otimes_k k'$ is regular. Hence $B \otimes_k k'$ is regular by Lemma \ref{lemma-regular-goes-up}. \end{proof} \begin{lemma} \label{lemma-geometrically-regular-over-subfields} Let $k$ be a field. Let $A$ be an algebra over $k$. Let $k = \colim k_i$ be a directed colimit of subfields. If $A$ is geometrically regular over each $k_i$, then $A$ is geometrically regular over $k$. \end{lemma} \begin{proof} Let $k'/k$ be a finite purely inseparable field extension. We can get $k'$ by adjoining finitely many variables to $k$ and imposing finitely many polynomial relations. Hence we see that there exists an $i$ and a finite purely inseparable field extension $k_i'/k_i$ such that $k' = k \otimes_{k_i} k_i'$. Thus $A \otimes_k k' = A \otimes_{k_i} k_i'$ and the lemma is clear. \end{proof} \begin{lemma} \label{lemma-geometrically-regular-over-separable-algebraic} Let $k'/k$ be a separable algebraic field extension. Let $A$ be an algebra over $k'$. Then $A$ is geometrically regular over $k$ if and only if it is geometrically regular over $k'$. \end{lemma} \begin{proof} Let $L/k$ be a finite purely inseparable field extension. Then $L' = k' \otimes_k L$ is a field (see material in Fields, Section \ref{fields-section-algebraic}) and $A \otimes_k L = A \otimes_{k'} L'$. Hence if $A$ is geometrically regular over $k'$, then $A$ is geometrically regular over $k$. \medskip\noindent Assume $A$ is geometrically regular over $k$. Since $k'$ is the filtered colimit of finite extensions of $k$ we may assume by Lemma \ref{lemma-geometrically-regular-over-subfields} that $k'/k$ is finite separable. Consider the ring maps $$ k' \to A \otimes_k k' \to A. $$ Note that $A \otimes_k k'$ is geometrically regular over $k'$ as a base change of $A$ to $k'$. Note that $A \otimes_k k' \to A$ is the base change of $k' \otimes_k k' \to k'$ by the map $k' \to A$. Since $k'/k$ is an \'etale extension of rings, we see that $k' \otimes_k k' \to k'$ is \'etale (Lemma \ref{lemma-etale}). Hence $A$ is geometrically regular over $k'$ by Lemma \ref{lemma-geometrically-regular-goes-up}. \end{proof} \section{Geometrically Cohen-Macaulay algebras} \label{section-geometrically-CM} % BEGIN ALGEBRA EDITORIAL ROUTE section-geometrically-CM \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-geometrically-CM}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-geometrically-CM \noindent This section is a bit of a misnomer, since Cohen-Macaulay algebras are automatically geometrically Cohen-Macaulay. Namely, see Lemma \ref{lemma-extend-field-CM-locus} and Lemma \ref{lemma-CM-geometrically-CM} below. \begin{lemma} \label{lemma-tensor-fields-CM} Let $k$ be a field and let $K/k$ and $L/k$ be two field extensions such that one of them is a field extension of finite type. Then $K \otimes_k L$ is a Noetherian Cohen-Macaulay ring. \end{lemma} \begin{proof} The ring $K \otimes_k L$ is Noetherian by Lemma \ref{lemma-Noetherian-field-extension}. Say $K$ is a finite extension of the purely transcendental extension $k(t_1, \ldots, t_r)$. Then $k(t_1, \ldots, t_r) \otimes_k L \to K \otimes_k L$ is a finite free ring map. By Lemma \ref{lemma-finite-flat-over-regular-CM} it suffices to show that $k(t_1, \ldots, t_r) \otimes_k L$ is Cohen-Macaulay. This is clear because it is a localization of the polynomial ring $L[t_1, \ldots, t_r]$. (See for example Lemma \ref{lemma-CM-polynomial-algebra} for the fact that a polynomial ring is Cohen-Macaulay.) \end{proof} \begin{lemma} \label{lemma-CM-geometrically-CM} Let $k$ be a field. Let $S$ be a Noetherian $k$-algebra. Let $K/k$ be a finitely generated field extension, and set $S_K = K \otimes_k S$. Let $\mathfrak q \subset S$ be a prime of $S$. Let $\mathfrak q_K \subset S_K$ be a prime of $S_K$ lying over $\mathfrak q$. Then $S_{\mathfrak q}$ is Cohen-Macaulay if and only if $(S_K)_{\mathfrak q_K}$ is Cohen-Macaulay. \end{lemma} \begin{proof} By Lemma \ref{lemma-Noetherian-field-extension} the ring $S_K$ is Noetherian. Hence $S_{\mathfrak q} \to (S_K)_{\mathfrak q_K}$ is a flat local homomorphism of Noetherian local rings. Note that the fibre $$ (S_K)_{\mathfrak q_K} / \mathfrak q (S_K)_{\mathfrak q_K} \cong (\kappa(\mathfrak q) \otimes_k K)_{\mathfrak q'} $$ is the localization of the Cohen-Macaulay (Lemma \ref{lemma-tensor-fields-CM}) ring $\kappa(\mathfrak q) \otimes_k K$ at a suitable prime ideal $\mathfrak q'$. Hence the lemma follows from Lemma \ref{lemma-CM-goes-up}. \end{proof} \section{Colimits and maps of finite presentation, II} \label{section-colimits-finite-presentation} % BEGIN ALGEBRA EDITORIAL ROUTE section-colimits-finite-presentation \medskip\noindent\textit{Editorial companion.} \href{algebra-editorial.pdf\#nameddest=algebra-source-section-colimits-finite-presentation}{Source-linked corrections and supplementary arguments for this section.} \medskip % END ALGEBRA EDITORIAL ROUTE section-colimits-finite-presentation \noindent This section is a continuation of Section \ref{section-colimits-flat}. \medskip\noindent We start with an application of the openness of flatness. It says that we can approximate flat modules by flat modules which is useful. \begin{lemma} \label{lemma-flat-finite-presentation-limit-flat} Let $R \to S$ be a ring map. Let $M$ be an $S$-module. Assume that \begin{enumerate} \item $R \to S$ is of finite presentation, \item $M$ is a finitely presented $S$-module, and \item $M$ is flat over $R$. \end{enumerate} In this case we have the following: \begin{enumerate} \item There exists a finite type $\mathbf{Z}$-algebra $R_0$ and a finite type ring map $R_0 \to S_0$ and a finite $S_0$-module $M_0$ such that $M_0$ is flat over $R_0$, together with ring maps $R_0 \to R$ and $S_0 \to S$ and an $S_0$-module map $M_0 \to M$ such that $S \cong R \otimes_{R_0} S_0$ and $M = S \otimes_{S_0} M_0$. \item If $R = \colim_{\lambda \in \Lambda} R_\lambda$ is written as a directed colimit, then there exists a $\lambda$ and a ring map $R_\lambda \to S_\lambda$ of finite presentation, and an $S_\lambda$-module $M_\lambda$ of finite presentation such that $M_\lambda$ is flat over $R_\lambda$ and such that $S = R \otimes_{R_\lambda} S_\lambda$ and $M = S \otimes_{S_{\lambda}} M_\lambda$. \item If $$ (R \to S, M) = \colim_{\lambda \in \Lambda} (R_\lambda \to S_\lambda, M_\lambda) $$ is written as a directed colimit such that \begin{enumerate} \item $R_\mu \otimes_{R_\lambda} S_\lambda \to S_\mu$ and $S_\mu \otimes_{S_\lambda} M_\lambda \to M_\mu$ are isomorphisms for $\mu \geq \lambda$, \item $R_\lambda \to S_\lambda$ is of finite presentation, \item $M_\lambda$ is a finitely presented $S_\lambda$-module, \end{enumerate} then for all sufficiently large $\lambda$ the module $M_\lambda$ is flat over $R_\lambda$. \end{enumerate} \end{lemma} \begin{proof} We first write $(R \to S, M)$ as the directed colimit of a system $(R_\lambda \to S_\lambda, M_\lambda)$ as in Lemma \ref{lemma-limit-module-finite-presentation}. Let $\mathfrak q \subset S$ be a prime. Let $\mathfrak p \subset R$, $\mathfrak q_\lambda \subset S_\lambda$, and $\mathfrak p_\lambda \subset R_\lambda$ the corresponding primes. As seen in the proof of Theorem \ref{theorem-openness-flatness} $$ ((R_\lambda)_{\mathfrak p_\lambda}, (S_\lambda)_{\mathfrak q_\lambda}, (M_\lambda)_{\mathfrak q_{\lambda}}) $$ is a system as in Lemma \ref{lemma-limit-module-essentially-finite-presentation}, and hence by Lemma \ref{lemma-colimit-eventually-flat} we see that for some $\lambda_{\mathfrak q} \in \Lambda$ for all $\lambda \geq \lambda_{\mathfrak q}$ the module $M_\lambda$ is flat over $R_\lambda$ at the prime $\mathfrak q_{\lambda}$. \medskip\noindent By Theorem \ref{theorem-openness-flatness}, the set $U_\lambda \subset \Spec(S_\lambda)$ of primes at which $M_\lambda$ is flat over $R_\lambda$ is open. Denote by $V_\lambda \subset \Spec(S)$ the inverse image of $U_\lambda$ under the map $\Spec(S) \to \Spec(S_\lambda)$. The argument above shows that for every $\mathfrak q \in \Spec(S)$ there exists a $\lambda_{\mathfrak q}$ such that $\mathfrak q \in V_\lambda$ for all $\lambda \geq \lambda_{\mathfrak q}$. Since $\Spec(S)$ is quasi-compact we see this implies there exists a single $\lambda_0 \in \Lambda$ such that $V_{\lambda_0} = \Spec(S)$. \medskip\noindent The complement $\Spec(S_{\lambda_0}) \setminus U_{\lambda_0}$ is $V(I)$ for some ideal $I \subset S_{\lambda_0}$. As $V_{\lambda_0} = \Spec(S)$ we see that $IS = S$. Choose $f_1, \ldots, f_r \in I$ and $s_1, \ldots, s_r \in S$ such that $\sum f_i s_i = 1$. Since $\colim S_\lambda = S$, after increasing $\lambda_0$ we may assume there exist $s_{i, \lambda_0} \in S_{\lambda_0}$ such that $\sum f_i s_{i, \lambda_0} = 1$. Hence for this $\lambda_0$ we have $U_{\lambda_0} = \Spec(S_{\lambda_0})$. This proves (1). \medskip\noindent Proof of (2). Let $(R_0 \to S_0, M_0)$ be as in (1) and suppose that $R = \colim R_\lambda$. Since $R_0$ is a finite type $\mathbf{Z}$ algebra, there exists a $\lambda$ and a map $R_0 \to R_\lambda$ such that $R_0 \to R_\lambda \to R$ is the given map $R_0 \to R$ (see Lemma \ref{lemma-characterize-finite-presentation}). Then, part (2) follows by taking $S_\lambda = R_\lambda \otimes_{R_0} S_0$ and $M_\lambda = S_\lambda \otimes_{S_0} M_0$. \medskip\noindent Finally, we come to the proof of (3). Let $(R_\lambda \to S_\lambda, M_\lambda)$ be as in (3). Choose $(R_0 \to S_0, M_0)$ and $R_0 \to R$ as in (1). As in the proof of (2), there exists a $\lambda_0$ and a ring map $R_0 \to R_{\lambda_0}$ such that $R_0 \to R_{\lambda_0} \to R$ is the given map $R_0 \to R$. Since $S_0$ is of finite presentation over $R_0$ and since $S = \colim S_\lambda$ we see that for some $\lambda_1 \geq \lambda_0$ we get an $R_0$-algebra map $S_0 \to S_{\lambda_1}$ such that the composition $S_0 \to S_{\lambda_1} \to S$ is the given map $S_0 \to S$ (see Lemma \ref{lemma-characterize-finite-presentation}). For all $\lambda \geq \lambda_1$ this gives maps $$ \Psi_{\lambda} : R_\lambda \otimes_{R_0} S_0 \longrightarrow R_\lambda \otimes_{R_{\lambda_1}} S_{\lambda_1} \cong S_\lambda $$ the last isomorphism by assumption. By construction $\colim_\lambda \Psi_\lambda$ is an isomorphism. Hence $\Psi_\lambda$ is an isomorphism for all $\lambda$ large enough by Lemma \ref{lemma-colimit-category-fp-algebras}. In the same vein, there exists a $\lambda_2 \geq \lambda_1$ and an $S_0$-module map $M_0 \to M_{\lambda_2}$ such that $M_0 \to M_{\lambda_2} \to M$ is the given map $M_0 \to M$ (see Lemma \ref{lemma-module-map-property-in-colimit}). For $\lambda \geq \lambda_2$ there is an induced map $$ S_\lambda \otimes_{S_0} M_0 \longrightarrow S_\lambda \otimes_{S_{\lambda_2}} M_{\lambda_2} \cong M_\lambda $$ and for $\lambda$ large enough this map is an isomorphism by Lemma \ref{lemma-colimit-category-fp-modules}. This implies (3) because $M_0$ is flat over $R_0$. \end{proof} \begin{lemma} \label{lemma-descend-faithfully-flat-finite-presentation} Let $R \to A \to B$ be ring maps. Assume $A \to B$ is faithfully flat of finite presentation. Then there exists a commutative diagram $$ \xymatrix{ R \ar[r] \ar@{=}[d] & A_0 \ar[d] \ar[r] & B_0 \ar[d] \\ R \ar[r] & A \ar[r] & B } $$ with $R \to A_0$ of finite presentation, $A_0 \to B_0$ faithfully flat of finite presentation and $B = A \otimes_{A_0} B_0$. \end{lemma} \begin{proof} We first prove the lemma with $R$ replaced by $\mathbf{Z}$. By Lemma \ref{lemma-flat-finite-presentation-limit-flat} there exists a diagram $$ \xymatrix{ A_0 \ar[r] \ar[d] & A \ar[d] \\ B_0 \ar[r] & B } $$ where $A_0$ is of finite type over $\mathbf{Z}$, $B_0$ is flat of finite presentation over $A_0$ such that $B = A \otimes_{A_0} B_0$. As $A_0 \to B_0$ is flat of finite presentation we see that the image of $\Spec(B_0) \to \Spec(A_0)$ is open, see Proposition \ref{proposition-fppf-open}. Hence the complement of the image is $V(I_0)$ for some ideal $I_0 \subset A_0$. As $A \to B$ is faithfully flat the map $\Spec(B) \to \Spec(A)$ is surjective, see Lemma \ref{lemma-ff-rings}. Now we use that the base change of the image is the image of the base change. Hence $I_0A = A$. Pick a relation $\sum f_i r_i = 1$, with $r_i \in A$, $f_i \in I_0$. Then after enlarging $A_0$ to contain the elements $r_i$ (and correspondingly enlarging $B_0$) we see that $A_0 \to B_0$ is surjective on spectra also, i.e., faithfully flat. \medskip\noindent Thus the lemma holds in case $R = \mathbf{Z}$. In the general case, take the solution $A_0' \to B_0'$ just obtained and set $A_0 = A_0' \otimes_{\mathbf{Z}} R$, $B_0 = B_0' \otimes_{\mathbf{Z}} R$. \end{proof} \begin{lemma} \label{lemma-colimit-finite} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is finite, \item $C_0$ is of finite type over $B_0$. \end{enumerate} Then there exists an $i \geq 0$ such that the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is finite. \end{lemma} \begin{proof} Let $x_1, \ldots, x_m$ be generators for $C_0$ over $B_0$. Pick monic polynomials $P_j \in A \otimes_{A_0} B_0[T]$ such that $P_j(1 \otimes x_j) = 0$ in $A \otimes_{A_0} C_0$. For some $i \geq 0$ we can find $P_{j, i} \in A_i \otimes_{A_0} B_0[T]$ mapping to $P_j$. Since $\otimes$ commutes with colimits we see that $P_{j, i}(1 \otimes x_j)$ is zero in $A_i \otimes_{A_0} C_0$ after possibly increasing $i$. Then this $i$ works. \end{proof} \begin{lemma} \label{lemma-colimit-surjective} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is surjective, \item $C_0$ is of finite type over $B_0$. \end{enumerate} Then for some $i \geq 0$ the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is surjective. \end{lemma} \begin{proof} Let $x_1, \ldots, x_m$ be generators for $C_0$ over $B_0$. Pick $b_j \in A \otimes_{A_0} B_0$ mapping to $1 \otimes x_j$ in $A \otimes_{A_0} C_0$. For some $i \geq 0$ we can find $b_{j, i} \in A_i \otimes_{A_0} B_0$ mapping to $b_j$. After increasing $i$ we may assume that $b_{j, i}$ maps to $1 \otimes x_j$ in $A_i \otimes_{A_0} C_0$ for all $j = 1, \ldots, m$. Then this $i$ works. \end{proof} \begin{lemma} \label{lemma-colimit-unramified} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is unramified, \item $C_0$ is of finite type over $B_0$. \end{enumerate} Then for some $i \geq 0$ the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is unramified. \end{lemma} \begin{proof} Set $B_i = A_i \otimes_{A_0} B_0$, $C_i = A_i \otimes_{A_0} C_0$, $B = A \otimes_{A_0} B_0$, and $C = A \otimes_{A_0} C_0$. Let $x_1, \ldots, x_m$ be generators for $C_0$ over $B_0$. Then $\text{d}x_1, \ldots, \text{d}x_m$ generate $\Omega_{C_0/B_0}$ over $C_0$ and their images generate $\Omega_{C_i/B_i}$ over $C_i$ (Lemmas \ref{lemma-differentials-polynomial-ring} and \ref{lemma-differential-seq}). Observe that $0 = \Omega_{C/B} = \colim \Omega_{C_i/B_i}$ (Lemma \ref{lemma-colimit-differentials}). Thus there is an $i$ such that $\text{d}x_1, \ldots, \text{d}x_m$ map to zero and hence $\Omega_{C_i/B_i} = 0$ as desired. \end{proof} \begin{lemma} \label{lemma-colimit-isomorphism} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is an isomorphism, \item $B_0 \to C_0$ is of finite presentation. \end{enumerate} Then for some $i \geq 0$ the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is an isomorphism. \end{lemma} \begin{proof} By Lemma \ref{lemma-colimit-surjective} there exists an $i$ such that $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is surjective. Since the map is of finite presentation the kernel is a finitely generated ideal. Let $g_1, \ldots, g_r \in A_i \otimes_{A_0} B_0$ generate the kernel. Then we may pick $i' \geq i$ such that $g_j$ map to zero in $A_{i'} \otimes_{A_0} B_0$. Then $A_{i'} \otimes_{A_0} B_0 \to A_{i'} \otimes_{A_0} C_0$ is an isomorphism. \end{proof} \begin{lemma} \label{lemma-colimit-etale} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is \'etale, \item $B_0 \to C_0$ is of finite presentation. \end{enumerate} Then for some $i \geq 0$ the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is \'etale. \end{lemma} \begin{proof} Write $C_0 = B_0[x_1, \ldots, x_n]/(f_{1, 0}, \ldots, f_{m, 0})$. Write $B_i = A_i \otimes_{A_0} B_0$ and $C_i = A_i \otimes_{A_0} C_0$. Note that $C_i = B_i[x_1, \ldots, x_n]/(f_{1, i}, \ldots, f_{m, i})$ where $f_{j, i}$ is the image of $f_{j, 0}$ in the polynomial ring over $B_i$. Write $B = A \otimes_{A_0} B_0$ and $C = A \otimes_{A_0} C_0$. Note that $C = B[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$ where $f_j$ is the image of $f_{j, 0}$ in the polynomial ring over $B$. The assumption is that the map $$ \text{d} : (f_1, \ldots, f_m)/(f_1, \ldots, f_m)^2 \longrightarrow \bigoplus C \text{d}x_k $$ is an isomorphism. Thus for sufficiently large $i$ we can find elements $$ \xi_{k, i} \in (f_{1, i}, \ldots, f_{m, i})/(f_{1, i}, \ldots, f_{m, i})^2 $$ with $\text{d}\xi_{k, i} = \text{d}x_k$ in $\bigoplus C_i \text{d}x_k$. Moreover, on increasing $i$ if necessary, we see that $\sum (\partial f_{j, i}/\partial x_k) \xi_{k, i} = f_{j, i} \bmod (f_{1, i}, \ldots, f_{m, i})^2$ since this is true in the limit. Then this $i$ works. \end{proof} \begin{lemma} \label{lemma-colimit-smooth} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is smooth, \item $B_0 \to C_0$ is of finite presentation. \end{enumerate} Then for some $i \geq 0$ the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is smooth. \end{lemma} \begin{proof} Write $C_0 = B_0[x_1, \ldots, x_n]/(f_{1, 0}, \ldots, f_{m, 0})$. Write $B_i = A_i \otimes_{A_0} B_0$ and $C_i = A_i \otimes_{A_0} C_0$. Note that $C_i = B_i[x_1, \ldots, x_n]/(f_{1, i}, \ldots, f_{m, i})$ where $f_{j, i}$ is the image of $f_{j, 0}$ in the polynomial ring over $B_i$. Write $B = A \otimes_{A_0} B_0$ and $C = A \otimes_{A_0} C_0$. Note that $C = B[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$ where $f_j$ is the image of $f_{j, 0}$ in the polynomial ring over $B$. The assumption is that the map $$ \text{d} : (f_1, \ldots, f_m)/(f_1, \ldots, f_m)^2 \longrightarrow \bigoplus C \text{d}x_k $$ is a split injection. Let $\xi_k \in (f_1, \ldots, f_m)/(f_1, \ldots, f_m)^2$ be elements such that $\sum (\partial f_j/\partial x_k) \xi_k = f_j \bmod (f_1, \ldots, f_m)^2$. Then for sufficiently large $i$ we can find elements $$ \xi_{k, i} \in (f_{1, i}, \ldots, f_{m, i})/(f_{1, i}, \ldots, f_{m, i})^2 $$ with $\sum (\partial f_{j, i}/\partial x_k) \xi_{k, i} = f_{j, i} \bmod (f_{1, i}, \ldots, f_{m, i})^2$ since this is true in the limit. Then this $i$ works. \end{proof} \begin{lemma} \label{lemma-colimit-lci} Let $A = \colim_{i \in I} A_i$ be a directed colimit of rings. Let $0 \in I$ and $\varphi_0 : B_0 \to C_0$ be a map of $A_0$-algebras. Assume \begin{enumerate} \item $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is syntomic (resp.\ a relative global complete intersection), \item $C_0$ is of finite presentation over $B_0$. \end{enumerate} Then there exists an $i \geq 0$ such that the map $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is syntomic (resp.\ a relative global complete intersection). \end{lemma} \begin{proof} Assume $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is a relative global complete intersection. By Lemma \ref{lemma-relative-global-complete-intersection-Noetherian} there exists a finite type $\mathbf{Z}$-algebra $R$, a ring map $R \to A \otimes_{A_0} B_0$, a relative global complete intersection $R \to S$, and an isomorphism $$ (A \otimes_{A_0} B_0) \otimes_R S \longrightarrow A \otimes_{A_0} C_0 $$ Because $R$ is of finite type (and hence finite presentation) over $\mathbf{Z}$, there exists an $i$ and a map $R \to A_i \otimes_{A_0} B_0$ lifting the map $R \to A \otimes_{A_0} B_0$, see Lemma \ref{lemma-characterize-finite-presentation}. Using the same lemma, there exists an $i' \geq i$ such that $(A_i \otimes_{A_0} B_0) \otimes_R S \to A \otimes_{A_0} C_0$ comes from a map $(A_i \otimes_{A_0} B_0) \otimes_R S \to A_{i'} \otimes_{A_0} C_0$. Thus we may assume, after replacing $i$ by $i'$, that the displayed map comes from an $A_i \otimes_{A_0} B_0$-algebra map $$ (A_i \otimes_{A_0} B_0) \otimes_R S \longrightarrow A_i \otimes_{A_0} C_0 $$ By Lemma \ref{lemma-colimit-isomorphism} after increasing $i$ this map is an isomorphism. This finishes the proof in this case because the base change of a relative global complete intersection is a relative global complete intersection by Lemma \ref{lemma-base-change-relative-global-complete-intersection}. \medskip\noindent Assume $A \otimes_{A_0} B_0 \to A \otimes_{A_0} C_0$ is syntomic. Then there exist elements $g_1, \ldots, g_m$ in $A \otimes_{A_0} C_0$ generating the unit ideal such that $A \otimes_{A_0} B_0 \to (A \otimes_{A_0} C_0)_{g_j}$ is a relative global complete intersection, see Lemma \ref{lemma-syntomic}. We can find an $i$ and elements $g_{i, j} \in A_i \otimes_{A_0} C_0$ mapping to $g_j$. After increasing $i$ we may assume $g_{i, 1}, \ldots, g_{i, m}$ generate the unit ideal of $A_i \otimes_{A_0} C_0$. The result of the previous paragraph implies that, after increasing $i$, we may assume the maps $A_i \otimes_{A_0} B_0 \to (A_i \otimes_{A_0} C_0)_{g_{i, j}}$ are relative global complete intersections. Then $A_i \otimes_{A_0} B_0 \to A_i \otimes_{A_0} C_0$ is syntomic by Lemma \ref{lemma-local-syntomic} (and the already used Lemma \ref{lemma-syntomic}). \end{proof} \noindent The following lemma is an application of the results above which doesn't seem to fit well anywhere else. \begin{lemma} \label{lemma-fppf-fpqf} Let $R \to S$ be a faithfully flat ring map of finite presentation. Then there exists a commutative diagram $$ \xymatrix{ S \ar[rr] & & S' \\ & R \ar[lu] \ar[ru] } $$ where $R \to S'$ is quasi-finite, faithfully flat and of finite presentation. \end{lemma} \begin{proof} As a first step we reduce this lemma to the case where $R$ is of finite type over $\mathbf{Z}$. By Lemma \ref{lemma-descend-faithfully-flat-finite-presentation} there exists a diagram $$ \xymatrix{ S_0 \ar[r] & S \\ R_0 \ar[u] \ar[r] & R \ar[u] } $$ where $R_0$ is of finite type over $\mathbf{Z}$, and $S_0$ is faithfully flat of finite presentation over $R_0$ such that $S = R \otimes_{R_0} S_0$. If we prove the lemma for the ring map $R_0 \to S_0$, then the lemma follows for $R \to S$ by base change, as the base change of a quasi-finite ring map is quasi-finite, see Lemma \ref{lemma-quasi-finite-base-change}. (Of course we also use that base changes of flat maps are flat and base changes of maps of finite presentation are of finite presentation.) \medskip\noindent Assume $R \to S$ is a faithfully flat ring map of finite presentation and that $R$ is Noetherian (which we may assume by the preceding paragraph). Let $W \subset \Spec(S)$ be the open set of Lemma \ref{lemma-finite-presentation-flat-CM-locus-open}. As $R \to S$ is faithfully flat the map $\Spec(S) \to \Spec(R)$ is surjective, see Lemma \ref{lemma-ff-rings}. By Lemma \ref{lemma-generic-CM-flat-finite-presentation} the map $W \to \Spec(R)$ is also surjective. Hence by replacing $S$ with a product $S_{g_1} \times \ldots \times S_{g_m}$ we may assume $W = \Spec(S)$; here we use that $\Spec(R)$ is quasi-compact (Lemma \ref{lemma-quasi-compact}), and that the map $\Spec(S) \to \Spec(R)$ is open (Proposition \ref{proposition-fppf-open}). Suppose that $\mathfrak p \subset R$ is a prime. Choose a prime $\mathfrak q \subset S$ lying over $\mathfrak p$ which corresponds to a maximal ideal of the fibre ring $S \otimes_R \kappa(\mathfrak p)$. The Noetherian local ring $\overline{S}_{\mathfrak q} = S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ is Cohen-Macaulay, say of dimension $d$. We may choose $f_1, \ldots, f_d$ in the maximal ideal of $S_{\mathfrak q}$ which map to a regular sequence in $\overline{S}_{\mathfrak q}$. Choose a common denominator $g \in S$, $g \not \in \mathfrak q$ of $f_1, \ldots, f_d$, and consider the $R$-algebra $$ S' = S_g/(f_1, \ldots, f_d). $$ By construction there is a prime ideal $\mathfrak q' \subset S'$ lying over $\mathfrak p$ and corresponding to $\mathfrak q$ (via $S_g \to S'_g$). Also by construction the ring map $R \to S'$ is quasi-finite at $\mathfrak q'$ as the local ring $$ S'_{\mathfrak q'}/\mathfrak pS'_{\mathfrak q'} = S_{\mathfrak q}/\big((f_1, \ldots, f_d) + \mathfrak pS_{\mathfrak q}\big) = \overline{S}_{\mathfrak q}/(\overline{f}_1, \ldots, \overline{f}_d) $$ has dimension zero, see Lemma \ref{lemma-isolated-point-fibre}. Also by construction $R \to S'$ is of finite presentation. Finally, by Lemma \ref{lemma-grothendieck-regular-sequence} the local ring map $R_{\mathfrak p} \to S'_{\mathfrak q'}$ is flat (this is where we use that $R$ is Noetherian). Hence, by openness of flatness (Theorem \ref{theorem-openness-flatness}), and openness of quasi-finiteness (Lemma \ref{lemma-quasi-finite-open}) we may after replacing $g$ by $gg'$ for a suitable $g' \in S$, $g' \not \in \mathfrak q$ assume that $R \to S'$ is flat and quasi-finite. The image $\Spec(S') \to \Spec(R)$ is open and contains $\mathfrak p$. In other words we have shown a ring $S'$ as in the statement of the lemma exists (except possibly the faithfulness part) whose image contains any given prime. Using one more time the quasi-compactness of $\Spec(R)$ we see that a finite product of such rings does the job. \end{proof} \input{chapters} \bibliography{my} \bibliographystyle{amsalpha} \end{document}