\chapter{\'Etale, unramified, and smooth morphisms}


In this chapter, we shall introduce three classes of morphisms of rings
defined by lifting properties and study their properties.
Although in the case of morphisms of finite presentation, the three types of
morphisms (unramified, smooth, and \'etale) can be defined directly (without
lifting properties), in practice, in algebraic geometry, the functorial
criterion given by lifts matter: if one wants to show an algebra is
representable, then one can just study the \emph{corepresentable functor},
which may be more accessible.

\section{Unramified morphisms}
\label{section-formally-unramified}


\subsection{Definition}

Formal \'etaleness, smoothness, and unramifiedness all deal with the existence
or uniqueness of liftings under nilpotent extensions. We start with formal
unramifiedness. 

\begin{definition}
\label{definition-formally-unramified}
Let $R \to S$ be a ring map.
We say $S$ is {\bf formally unramified over $R$} if for every
commutative solid diagram
\begin{equation} \label{inflift}
\xymatrix{
S \ar[r] \ar@{-->}[rd] & A/I \\
R \ar[r] \ar[u] & A \ar[u]
}
\end{equation}
where $I \subset A$ is an ideal of square zero, there exists
at most one dotted arrow making the diagram commute.

We say that $S$ is \textbf{unramified over $R$} if $S$ is formally unramified
over $R$ and is a finitely generated $R$-algebra.
\end{definition}

In other words, an $R$-algebra $S$ is formally unramified if and only if
whenever $A$ is an $R$-algebra and $I \subset A$ an ideal of square zero, the
map of sets
\[ \hom_R(S, A) \to \hom_R(S, A/I)  \]
is injective.
Restated again, for such $A, I$, there is \emph{at most one}  lift of a given
$R$-homomorphism $S \to A/I$ to $S \to A$.
This is a statement purely about the associated ``functor of points.''
Namely, let $S$ be an $R$-algebra, and consider the functor $F:
R\text{--}\mathbf{alg}
\to \mathbf{Sets}$ given by $F(X) = \hom_R(S, X)$.
This is the ``functor of points.''
Then $S$ is formally unramified over $R$ if $F(A) \to F(A/I)$ is injective for each
$A, I$ as above. 

The intuition is that maps from $S$ into $T$ are like ``tangent vectors,'' and
consequently the condition geometrically means something like that tangent
vectors can be lifted uniquely: that is, the associated map is an immersion.
More formally, if $R\to  S$ is a morphism of algebras of finite type
over $\mathbb{C}$, which corresponds to a map $\spec S \to \spec R$ of
\emph{smooth} varieties (this is a condition on $R, S$!), then $R \to S$ is
unramified if and only if the  associated map of complex manifolds is an
immersion. (We are not proving this, just stating it for intuition.)

Note also that we can replace ``$I$ of square zero'' with the weaker condition
``$I$ nilpotent.'' That is, the map $R \to S$ (if it is formally unramified)
still has the same lifting property. This follows because one can factor $A \to
A/I$ into the \emph{finite} sequence $\dots \to A/I^{n+1} \to A/I^{n} \to \dots
\to A/I$, and each step is a square-zero extension.


We now show that the module of K\"ahler differentials provides a simple
criterion for an extension to be formally unramified.
\begin{proposition} \label{formalunrmeansomegazero}
An $R$-algebra $S$ is formally unramified if and only if $\Omega_{S/R} = 0$.
\end{proposition} 

Suppose $R, S$ are both algebras over some smaller ring $k$. 
Then there is an exact sequence
\[ \Omega_{R/k}\otimes_R S \to \Omega_{S/k} \to \Omega_{S/R} \to 0,  \]
and consequently, we see that formal unramifiedness corresponds to surjectivity
of the map on ``cotangent spaces'' $\Omega_{R/k} \otimes_R S \to \Omega_{S/k}$. 
This is part of the intuition that formally unramified maps are geometrically
like immersions (since surjectivity on the cotangent spaces corresponds to
injectivity on the tangent spaces).

\begin{proof} 
Suppose first $\Omega_{S/R}=0$. This is equivalent to the statement that
\emph{any} $R$-derivation of $S$ into an $S$-module is trivial, because
$\Omega_{S/R}$ is the recipient of the ``universal'' $R$-derivation.
If given an $R$-algebra $T$ with an ideal $I \subset T$ of square zero and a
morphism 
\[ S \to T/I,  \]
and two liftings $f,g: S \to T$, then we find that $f-g$ maps $S$ into $I$.
Since $T/I$ is naturally an $S$-algebra, it is easy to see (since $I$ has
square zero) that $I$ is naturally an $S$-module and $f-g$ is an
$R$-derivation $S \to I$. 
Thus $f-g \equiv 0$ and $f=g$.

Conversely, suppose $S$ has the property that liftings in \eqref{inflift} are
unique.
Consider the $S$-module $T=S \oplus \Omega_{S/R}$ with the multiplicative
structure $(a,a')(b,b') = (ab, ab' + a'b)$ that makes it into an algebra.
(This is a general construction one can do with an $S$-module $M$: $S \oplus
M$ is an algebra where $M$ becomes an ideal of square zero.)

Consider the ideal $\Omega_{S/R} \subset T$, which has
square zero; the quotient is $S$. We will find two liftings of the identity $S
\to S$. For the first, define $S \to T$ sending $s \to (s,0)$. For the second,
define $S \to T$ sending $s \to (s, ds)$; the derivation property of $b$ shows
that this is a morphism of algebras.

By the lifting property, the two morphisms $S \to T$ are equal. In particular,
the map $S \to \Omega_{S/R}$ sending $s \to ds$ is trivial. This implies that
$\Omega_{S/R}=0$.

\end{proof} 

Here is the essential point of the above argument. Let $I \subset T$ be an
ideal of square zero in the $R$-algebra $T$. 
Suppose given a homomorphism $g: S \to T/I$.
Then the set of lifts $S \to T$ of $g$ (which are $R$-algebra morphisms)
is either empty or a torsor over 
$\mathrm{Der}_R(S, I)$ (by adding a derivation to
a homomorphism). 
Note that $I$ is naturally a $T/I$-module (because $I^2 = 0$), and hence an
$S$-module by $g$.

This means that if the object $\mathrm{Der}_R(S, I)$ is trivial, then
injectivity of the above map must hold. 
Conversely, if injectivity of the above map always holds (i.e. $S$ is formally
unramified),
then we must have $\mathrm{Der}_R(S, I) = 0$ for all such $I \subset T$; since
we can obtain any $S$-module in this manner, it follows that there is no such
thing as  a nontrivial $R$-derivation out of $S$.
%most of the code below was contributed by the Stacks project authors


We next show that formal unramifiedness is a local property.
\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
\cref{formalunrmeansomegazero}
that (1) is equivalent to
$\Omega_{S/R} = 0$. Similarly, since K\"ahler differentials localize, we see that (2) and (3)
are equivalent to $(\Omega_{S/R})_{\mathfrak q} = 0$ for all
$\mathfrak q$. 
As a result, the statement of this lemma is simply the fact that an $S$-module
is zero if and only if all its localizations at prime ideals are zero. 
\end{proof}

We shall now give the typical list of properties (``le sorite'') of unramified morphisms.

\begin{proposition} \label{locunramified}
Any map $R \to R_f$ for $f \in  R$ is unramified.
More generally, a map from a ring to any localization is \emph{formally}
unramified, but not necessarily unramified. 
\end{proposition} 
\begin{proof} 
Indeed, we know that $\Omega_{R/R}  = 0$ and $\Omega_{R_f/R } =
(\Omega_{R/R})_f=0$, and the map is clearly of finite type.
\end{proof} 

\begin{proposition} \label{epiunr}
A surjection of rings is unramified.
More generally, a categorical epimorphism of rings is formally unramified.
\end{proposition} 
\begin{proof} 
Obvious from the lifting property: if $R \to S$ is a categorical epimorphism,
then given any $R$-algebra $T$, there can be \emph{at most one} map of
$R$-algebras $S \to T$ (regardless of anything involving square-zero ideals).
\end{proof} 

In the proof of \cref{epiunr}, we could have alternatively argued as follows. If $R \to S$ is an epimorphism
in the category of rings, then $S \otimes_R S \to S$ is an isomorphism. 
This is a general categorical fact, the dual of which for monomorphisms is
perhaps simpler: if $X \to Y$ is a monomorphism of objects in any category,
then $X \to X \times_Y X$ is an isomorphism. See \cref{}. By the alternate
construction of $\Omega_{S/R}$ (\cref{alternateOmega}), it follows that this must vanish.


\begin{proposition} 
\label{sorite1unr}
If $R \to S$ and $S \to T$ are unramified (resp. formally unramified), so is $R \to T$.
\end{proposition} 
\begin{proof} 
Since morphisms of finite type are preserved under composition, we only need
to prove the result about formally unramified maps. So let $R \to S, S \to T$
be formally unramified. We need to check that
$\Omega_{T/R}  = 0$. However, we have an exact sequence (see
\cref{firstexactseq}):
\[ \Omega_{S/R}\otimes_S T \to \Omega_{T/R} \to \Omega_{T/S} \to 0,  \]
and since $\Omega_{S/R} = 0, \Omega_{T/S} = 0$, we find that $\Omega_{T/R}  =
0$. This shows that $R \to T$ is formally unramified.
\end{proof} 
More elegantly, we could have proved this by using the lifting property (and
this is what we will do for formal \'etaleness and smoothness).
Then this is simply a formal argument.

\begin{proposition}  \label{unrbasechange}
If $R \to S$ is unramified (resp. formally unramified), so is $R' \to S' = S \otimes_R R'$ for any $R$-algebra
$R'$.
\end{proposition} 
\begin{proof} 
This follows from the fact that $\Omega_{S'/R'} = \Omega_{S/R} \otimes_S S'$
(see \cref{basechangediff}).
Alternatively, it can be checked easily using the lifting criterion.
For instance, suppose given an $R'$-algebra $T$ and an ideal $I \subset T$ of
square zero. We want to show that a morphism of $R'$-algebras
$S' \to T/I$ lifts in at most one way to a map $S' \to T$. But if we had two
distinct liftings, then we could restrict to $S$ to get two liftings  of $S \to
S' \to T/I$. These are easily seen to be distinct, a contradiction as $R \to
S$ was assumed formally unramified. 
\end{proof} 


In fact, the question of what unramified morphisms look like can be reduced to
the case where the ground ring is a \emph{field} in view of the previous and
the following result.
Given $\mathfrak{p} \in \spec R$, we let $k(\mathfrak{p})$ to be the residue
field of $R_{\mathfrak{p}}$.


\begin{proposition} \label{reduceunrtofield} 
Let $\phi: R \to S$ be a morphism of finite type. Then $\phi$ is unramified if
and only if for every $\mathfrak{p} \in \spec R$, we have
\( k(\mathfrak{p}) \to S \otimes_R k(\mathfrak{p})  \)
unramified.
\end{proposition} 
The classification of unramified extensions of a field is very simple, so this
will be useful.
\begin{proof} 
One direction is clear by \cref{unrbasechange}. For the other, suppose
$k(\mathfrak{p}) \to S \otimes_R k(\mathfrak{p})$ unramified for all $\mathfrak{p} \subset R$.
We then know that 
\( \Omega_{S/R} \otimes_R k(\mathfrak{p}) = \Omega_{S \otimes_R
k(\mathfrak{p})/k(\mathfrak{p})} = 0  \)
for all $\mathfrak{p}$. By localization, it follows that
\begin{equation} \label{auxdiff} \mathfrak{p}
\Omega_{S_{\mathfrak{q}}/R_{\mathfrak{p}}} =
\Omega_{S_{\mathfrak{q}}/R_{\mathfrak{p}}} = \Omega_{S_{\mathfrak{q}}/R}  \end{equation}
for any $\mathfrak{q} \in \spec S$ lying over $\mathfrak{p}$.

Let $\mathfrak{q} \in \spec S$. We will now show that
$(\Omega_{S/R})_{\mathfrak{q}} = 0$. 
Given this, we will find that $\Omega_{S/R} =0$, which will prove the
assertion of the corollary. 
Indeed, let $\mathfrak{p} \in \spec R$ be
the image of $\mathfrak{q}$, so that there is a \emph{local} homomorphism 
$R_{\mathfrak{p}} \to S_{\mathfrak{q}}$. By \eqref{auxdiff}, we find that
\[ \mathfrak{q} \Omega_{S_{\mathfrak{q}}/R} = \Omega_{S_{\mathfrak{q}}/R}.  \]
and since $\Omega_{S_{\mathfrak{q}}/R}$ is a finite $S_{\mathfrak{q}}$-module
(\cref{finitelygeneratedOmega}),
Nakayama's lemma now implies that $\Omega_{S_{\mathfrak{q}}/R}=0$, proving
what we wanted. 
\end{proof} 


The following is simply a combination of the various results proved:
\begin{corollary}
\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{corollary}

\subsection{Unramified extensions of a field}
Motivated by \cref{reduceunrtofield}, we classify unramified morphisms out of a
field; we are going to see that these are just finite products of separable
extensions. Let us first consider the case when the field is \emph{algebraically
closed.}

\begin{proposition} \label{unrextalgclosedfld}
Suppose $k$ is algebraically closed. If $A$ is an unramified $k$-algebra, then
$A$ is a product of copies of $k$.
\end{proposition} 
\begin{proof} 
Let us
show first that $A$ is necessarily finite-dimensional. 
If not, 


So let us now assume that $A$ is finite-dimensional over $k$, hence \emph{artinian}. 
Then $A$ is a direct product of artinian local $k$-algebras.
Each of these is unramified over $k$. So we need to study what local,
artinian, unramified extensions of $k$ look like; we shall show that any such
is isomorphic to $k$ with:

\begin{lemma} 
A finite-dimensional, local $k$-algebra which is unramified over $k$ (for $k$ 
algebraically closed) is isomorphic to $k$.
\end{lemma} 
\begin{proof} 
First, if $\mathfrak{m} \subset A$ is the maximal ideal, then $\mathfrak{m}$
is nilpotent, and $A/\mathfrak{m}\simeq k$ by the Hilbert Nullstellensatz. Thus the ideal
$\mathfrak{M}=\mathfrak{m}
\otimes A + A \otimes \mathfrak{m} \subset A \otimes_k A$ is nilpotent and
$(A \otimes_k A)/\mathfrak{M} = k \otimes_k k = k$. In particular, $\mathfrak{M}$ is maximal and
$A \otimes_k A$ is also local.
(We could see this as follows: $A$ is associated to a one-point variety, so the
fibered product $\spec A \times_k \spec A$ is also associated to a one-point
variety. It really does matter that we are working  over an
algebraically closed field here!)

By assumption, $\Omega_{A/k} = 0$. So if $I = \ker(A \otimes_k A \to A)$, then
$I = I^2$.
 But from \cref{idemlemma}, we find that if  we had $I \neq 0$, then $\spec A \otimes_k A$
would be disconnected. This is clearly false (a local ring has no nontrivial
idempotents), so $I  = 0$ and 
$A \otimes_k A \simeq A$. Since $A$ is finite-dimensional over $k$,
necessarily $A \simeq k$.
\end{proof} 
\end{proof} 

Now let us drop the assumption of algebraic closedness to get:

\begin{theorem} \label{unrfield} 
An unramified $k$-algebra for $k$ any field is isomorphic to a product $\prod
k_i$ of finite separable extensions $k_i$ of $k$.
\end{theorem} 
\begin{proof} 
Let $k$ be a field, and $\overline{k}$ its algebraic closure. Let $A$ be an
unramified $k$-algebra. Then $A \otimes_k \overline{k}$ is an unramified
$\overline{k}$-algebra by \cref{unrbasechange}, so is a  finite product of copies of
$\overline{k}$.
It is thus natural that we need to study tensor products of fields to
understand this problem.

\begin{lemma} \label{productoffields}
Let $E/k$ be a finite extension, and $L/k$ any extension.
If $E/k$ is separable, then $L \otimes_k E$ is isomorphic (as a $L$-algebra) to a product of
copies of separable extensions of $L$.
\end{lemma} 
\begin{proof} 
By the primitive element theorem, we have $E = k(\alpha)$ for some $\alpha \in
E$ satisfying a separable irreducible polynomial $P \in k[X]$.
Thus 
\[ E = k[X]/(P),  \]
so
\[ E \otimes_k L = L[X]/(P).  \]
But $P$ splits into several irreducible factors $\left\{P_i\right\}$ in
$L[X]$, no two of which are the same by separability. 
Thus by the Chinese remainder theorem,
\[ E \otimes_k L = L(X)/(\prod P_i) = \prod L[X]/(P_i),  \]
and each $L[X]/(P_i)$ is a finite separable extension of $L$.
\end{proof} 

As a result of this, we can easily deduce that any $k$-algebra of the form
$A=\prod k_i$ for the $k_i$ separable over $k$ is unramified.
Indeed, we have
\[ \Omega_{A/k}\otimes_k \overline{k} = \Omega_{A \otimes_k
\overline{k}/\overline{k}}, \]
so it suffices to prove that $A \otimes_k \overline{k}$ is unramified over
$\overline{k}$. However, from \cref{productoffields}, $A \otimes_k
\overline{k}$ is isomorphic as a $\overline{k}$-algebra to a product of copies
of $\overline{k}$. Thus $A \otimes_k \overline{k}$ is obviously unramified
over $\overline{k}$.

On the other hand, suppose $A/k$ is unramified. We shall show it is of the
form given as in the theorem. Then $A \otimes_k
\overline{k}$ is unramified over $\overline{k}$, so it follows by
\cref{unrextalgclosedfld} that $A$ is finite-dimensional over $k$. In
particular, $A$ is \emph{artinian}, and thus decomposes as a product of
finite-dimensional unramified $k$-algebras.

We are thus reduced to showing that a local, finite-dimensional $k$-algebra
that is unramified is a separable extension of $k$. Let $A$ be one such. Then
$A$ can have no nilpotents because then $A \otimes_k \overline{k}$ would have
nilpotents, and could not be isomorphic to a product of copies of
$\overline{k}$. 
Thus the unique maximal ideal of $A$ is zero, and $A$ is a field.
We need only show that $A$ is separable over $k$. This is accomplished by:

\begin{lemma} 
Let $E/k$ be a finite inseparable extension. Then $E \otimes_k \overline{k}$
contains nonzero nilpotents. 
\end{lemma} 

\begin{proof} There exists an $\alpha \in E$ which is inseparable over $k$,
i.e. whose minimal polynomial has multiple roots. 
Let $E' = k(\alpha)$. We will show that $E' \otimes_k \overline{k}$ has
nonzero nilpotents; since the map $E' \otimes_k \overline{k} \to E \otimes_k
\overline{k}$ is an injection, we will be done. 
Let $P$ be the minimal polynomial of $\alpha$, so that $E' = k[X]/(P)$. 
Let $P = \prod P_i^{e_i}$ be the factorization of $P$ in $\overline{k}$ for
the $P_i \in \overline{k}[X]$ irreducible (i.e. linear). By
assumption, one of the $e_i$ is greater than one.
It follows that 
\[ E' \otimes_k \overline{k} = \overline{k}[X]/(P) = \prod
\overline{k}[X]/(P_i^{e_i})  \]
has nilpotents corresponding to the $e_i$'s that are greater than one.
\end{proof} 

\end{proof} 
\begin{comment}
We now come to the result that explains why the present theory is connected
with Zariski's Main Theorem.
\begin{corollary} \label{unrisqf} 
An unramified morphism $A \to B$ is quasi-finite.
\end{corollary} 
\begin{proof} 
Recall that a morphism of rings is \emph{quasi-finite} if the associated map
on spectra is. Equivalently, the morphism must be of finite type and have
finite fibers. But by assumption $A \to B$ is of finite type. Moreover, if
$\mathfrak{p} \in \spec A$ and $k(\mathfrak{p})$ is the residue field, then
$k(\mathfrak{p}) \to B \otimes_A k(\mathfrak{p})$ is \emph{finite} by the
above results, so the fibers are finite. 
\end{proof} 


\end{comment} 


\subsection{Conormal modules and universal thickenings}
\label{section-conormal}

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$.
\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 = \text{Ker}(P \to S)$. Consider the map
$$
\text{d} : J/J^2 \longrightarrow \Omega_{P/R} \otimes_P S
$$
see
\rref{lemma-differential-seq}.
This is surjective since $\Omega_{S/R} = 0$ by assumption, see
\rref{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 \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 \frac{\partial g}{\partial x_i}\text{d}x_i$
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 with $\frac{\partial g}{\partial x_j} = 1$ if
$i = j$ and $0$ else.) The uniqueness of the solution implies the
uniqueness required in the lemma.
\end{proof}

\noindent
In the situation of
\rref{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
\rref{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 a $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
\rref{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
\rref{lemma-universal-thickening}
allthough 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
\rref{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
\rref{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^2$ by construction. Since $J'/J^2$ is a nilpotent ideal, we see
that these elements generate the module alltogether (by
Nakayama's \rref{lemma-NAK}). This proves that $\Omega_{B'/A} = 0$
and hence that $B'$ is formally unramified over $A$, see
\rref{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
\rref{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
we see that the submodule $(f_i)/(J')^2 \otimes_{B'} B$ maps
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{Smooth morphisms}

\subsection{Definition}
The idea of a \emph{smooth} morphism in algebraic geometry is one that is
surjective on the tangent space, at least if one is working with smooth
varieties over an algebraically closed field. So this means that one should be
able to lift tangent vectors, which are given by maps from the ring into
$k[\epsilon]/\epsilon^2$.

This makes the following definition seem more plausible:

\begin{definition} 
Let $S$ be an $R$-algebra. Then $S$ is \textbf{formally smooth} over $R$ (or
the map $R \to S$ is formally smooth) if given any
$R$-algebra $A$ and ideal $I \subset A $ of square zero, the map
\[ \hom_R(S, A) \to \hom_R(S, A/I)\]
is a surjection.
We shall say that $S$ is \textbf{smooth} (over $R$) if it is formally smooth and of finite
presentation.
\end{definition} 

So this means that in any diagram 
$$
\xymatrix{
S \ar[r] \ar@{-->}[rd] & A/I \\
R \ar[r] \ar[u] & A, \ar[u]
}
$$
with $I$ an ideal of square zero in $A$, there exists a dotted arrow making the diagram commute.
As with formal unramifiedness, this is a purely functorial statement: if $F$ is
the corepresentable functor associated to $S$, then we want $F(A) \to F(A/I)$
to be a \emph{surjection} for each $I \subset A$ of square zero and each
$R$-algebra $A$. Also, again we can replace ``$I$ of square zero'' with ``$I$
nilpotent.''


\begin{example}
The basic example of a formally smooth $R$-algebra is the polynomial ring
$R[x_1, \dots, x_n]$. For to give a map $R[x_1, \dots, x_n] \to A/I$ is to give
$n$ elements of $A/I$; each of these elements can clearly be lifted to $A$.
This is analogous to the statement that a free module is projective.

More generally, if $P$ is a projective $R$-module (not necessarily of finite
type), then the symmetric algebra $\Sym P$ is a formally smooth $R$-algebra.
This follows by the same reasoning. 
\end{example}

We can state the usual list of properties of formally smooth morphisms:

\begin{proposition}
\label{smoothsorite}
Smooth (resp. formally smooth) morphisms are preserved under base extension and
composition.
If $R$ is a ring, then any localization  is formally smooth over $R$.
\end{proposition} 
\begin{proof}  As usual, only the statements about \emph{formal} smoothness are
interesting.
The statements about base extension and composition will be mostly left to the reader:
they are an exercise in diagram-chasing. (Note that we cannot argue as we did
for formally unramified morphisms, where we had a simple criterion in terms of
the module of K\"ahler differentials and various properties of them.) 
For example, let $R \to S, S \to T$ be formally smooth. 
Given a diagram (with $I \subset A$ an ideal of square zero)
\[ \xymatrix{
T \ar[r]  \ar@{-->}[rdd]  & A/I \\
S  \ar[u] \ar@{-->}[rd] & \\
R \ar[r] \ar[u] & A, \ar[uu]
}\]
we start by finding a dotted arrow $S \to A$ by using formal smoothness of $R
\to S$. Then we find a dotted arrow $T \to A$ making the top quadrilateral
commute. This proves that the composite is formally smooth. 
\end{proof} 
\subsection{Quotients of formally smooth rings}

Now, ultimately, we want to show that this somewhat abstract definition of
smoothness will give us something nice and geometric. In particular, in this case we want to show
that $B$ is \emph{flat,} and the fibers are smooth varieties (in the old sense).
To do this, we will need to do a bit of work, but we can argue in a fairly
elementary manner. On the one hand, we will first need to give a criterion for when a
quotient of a formally smooth ring is formally smooth.



\begin{theorem}
\label{smoothconormal}
Let $A$ be a ring, $B$ an $A$-algebra. Suppose $B$ is formally smooth over $A$,
and let $I \subset B$ be an ideal. 
Then $C = B/I$ is a formally smooth $A$-algebra if and only if the canonical map
\[ I/I^2 \to \Omega_{B/A} \otimes_B C  \]
has a section.
In other words, $C$ is formally smooth precisely when the conormal sequence
\[  I/I^2 \to \Omega_{B/A} \otimes_B C \to \Omega_{C/A} \to 0 \]
is split exact.
\end{theorem} 

This result is stated in more generality  for \emph{topological} rings, and uses
some functors on ring extensions, in \cite{EGA}, 0-IV, 22.6.1. 

\begin{proof} 
Suppose first $C$ is formally smooth over $A$.
Then we have a map
\( B/I^2 \to C  \)
given by the quotient. The claim is that there is a section of this map.
There is a diagram of $A$-algebras
\[ \xymatrix{
B/I & \ar[l] B/I^2 \\
C \ar[u]^{=} \ar@{-->}[ru]
}\]
and the lifting $s: C \to B/I^2$ exists by formal smoothness. 
This is a section of the natural projection $B/I^2 \to C = B/I$.


In particular, the combination of the natural inclusion $I/I^2 \to B/I^2$ and
the section $s$ gives an isomorphism  of \emph{rings} (even $A$-algebras)
\( B/I^2 \simeq C \oplus I/I^2 . \)
Here $I/I^2$ squares to zero.

We are interested in showing that $I/I^2 \to \Omega_{B/A} \otimes_B C$ is a
split injection of $C$-modules. To see this, we will show that any map out of the former
extends to a map out of the latter.
Now suppose given a map
of $C$-modules
\[ \phi:  I/I^2 \to M \]
into a $C$-module $M$.
Then we get an $A$-derivation
\[ \delta:  B/I^2 \to M  \]
by using the splitting $B/I^2 = C \oplus I/I^2$.
(Namely, we just extend the map by zero on $C$.)
Since $I/I^2$ is imbedded in $B/I^2$ by the canonical injection, this
derivation restricts on $I/I^2$ to $\phi$. In other words there is a
commutative diagram
\[ \xymatrix{
I/I^2 \ar[d]^{\phi}  \ar[r] &  B/I^2 \ar[ld]^{\delta} \\
M
}.\]
It follows thus that we may define, by pulling back, an $A$-derivation $B \to
M$ that restricts on $I$ to the map $I \to I/I^2 \stackrel{\phi}{\to} M$. 
By the universal property of the differentials, this is the same thing as a
homomorphism $\Omega_{B/A} \to M$, or equivalently $\Omega_{B/A} \otimes_B C
\to M$ since $M$ is a $C$-module.
Pulling back this derivation to $I/I^2$ corresponds to pulling back via $I/I^2
\to \Omega_{B/A} \otimes_B C$.

It follows that the map
\[ \hom_C(\Omega_{B/A} \otimes_B C, M) \to \hom_C(I/I^2, M)  \]
is a surjection. This proves one half of the result.

Now for the other.
Suppose that there is a section of the conormal map.
This translates, as above, to saying that
any map $I/I^2 \to M$  (of $C$-modules) for a $C$-module $M$
 can be extended to an $A$-derivation $B \to M$.
We must deduce from this formal smoothness.

Let $E$ be any $A$-algebra, and $J \subset E$
an ideal of square zero.
We suppose given an $A$-homomorphism $C \to E/J$
and would like to lift it to $C \to E$; in other words, we must 
find a lift in the diagram
\[ \xymatrix{
& C \ar@{-->}[ld] \ar[d]  \\
E \ar[r] & E/J
}.\]
Let us pull this map back by the surjection 
$B \twoheadrightarrow C$; we get a diagram
\[ \xymatrix{
& B \ar@{-->}[ldd]^{\phi}\ar[d] \\
& C \ar@{-->}[ld] \ar[d]  \\
E \ar[r] & E/J
}.\]
In this diagram, we know that a lifting $\phi: B \to E$ does exist because $B$ is
formally smooth over $A$.
So we can find a dotted arrow from $B \to E$ in the diagram.
The problem is that it might not send
$I = \ker(B \to C) $ into zero.
If we can show that there \emph{exists} a lifting that does factor through $C$
(i.e. sends $I$ to zero), then we are done.

In any event, we have a morphism of $A$-modules
$  I \to E$  given by restricting $\phi: B \to E$.
This lands in $J$, so we get a map $I \to J$. Note that $J$ is an $E/J$-module,
hence a $C$-module, because $J$ has square zero. Moreover $I^2$ gets sent to
zero because $J^2 = 0$, and we have a morphism of
$C$-modules $I/I^2 \to J$.
Now by hypothesis, there is an $A$-derivation
$\delta: B \to J$ such that $\delta|_I = \phi$.
Since $J$ has square zero, it follows that
\[ \phi - \delta: B \to E  \]
is an $A$-homomorphism of algebras, and it kills $I$.
Consequently this factors through $C$ and gives the desired lifting $C \to E$.



\end{proof} 

\begin{corollary} \label{fsOmegaprojective}
If $A \to B$ is formally smooth, then 
$\Omega_{B/A}$ is a projective $B$-module.
\end{corollary} 
The intuition is that projective modules correspond to vector bundles
over the $\spec$ (unlike general modules, the rank is locally constant,
which should happen in a vector bundle). But a smooth algebra is like a
manifold, and for a manifold the cotangent bundle is very much a vector
bundle, whose dimension is locally constant. 
\begin{proof} 
Indeed, we can write $B$ as a quotient of a polynomial ring $D$ over $A$; this
is formally smooth. Suppose $B = D/I$.
Then we know that there is a split exact sequence
\[ 0 \to I/I^2 \to \Omega_{D/A} \otimes_D B \to \Omega_{B/A} \to 0.  \]
But the middle term is free as $D/A$ is a polynomial ring; hence the last term
is projective.
\end{proof} 

In particular, we can rewrite the criterion for formal smoothness of $C= B/I$,
if $B$ is formally smooth over $A$:
\begin{enumerate}
\item $\Omega_{C/A} $ is a projective $C$-module.
\item $I/I^2 \to \Omega_{B/A} \otimes_B C$ is a monomorphism.
\end{enumerate}
Indeed, these two are equivalent to the splitting of the conormal sequence
(since the middle term is always projective by \cref{fsOmegaprojective}).

In particular, we can check that smoothness is \emph{local}:
\begin{corollary} \label{fsislocal}
Let $A$ be a ring, $B$ a finitely presented $A$-algebra. Then $B$ is smooth
over $A$ if and only if for each $\mathfrak{q} \in \spec B$ with $\mathfrak{p}
\in \spec A$ the inverse image, the map $A_{\mathfrak{p}} \to B_{\mathfrak{q}}$
is formally smooth.
\end{corollary} 
\begin{proof} 
Indeed, we see that $B = D/I$ for a polynomial ring $D = A[x_1,\dots, x_n]$ in finitely many
variables, and $I \subset D$ a finitely generated ideal.
We have just seen that we just need to check that the conormal map $I/I^2 \to
\Omega_{D/A} \otimes_D B$ is injective, and that $\Omega_{B/A}$ is a projective
$B$-module, if and only if the analogs hold over the localizations. This
follows by the criterion for formal smoothness just given above.

But both can be checked locally. Namely, the conormal map is an injection if
and only if, for all $\mathfrak{q} \in \spec B$ corresponding to $\mathfrak{Q}
\in \spec D$, the map $(I/I^2)_{\mathfrak{q}} \to
\Omega_{D_{\mathfrak{Q}}/A_{\mathfrak{p}}} \otimes_{D_{\mathfrak{Q}}}
B_{\mathfrak{q}}$ is an injection.
Moreover, we know that for a finitely presented module over a  ring,
like $\Omega_{B/A}$, projectivity is equivalent to projectivity (or freeness) of all the stalks
(\cref{}). So we can check projectivity on the localizations too. 
\end{proof} 

In fact, the method of proof of \cref{fsislocal} yields the following
observation: \emph{formal} smoothness ``descends'' under faithfully flat base change.
That is:
\begin{corollary} 
If $B$ is an $A$-algebra, and $A'$ a faithfully flat algebra, then $B$ is
formally smooth over $A$ if and only if $B \otimes_A A'$ is formally smooth
over $A'$.
\end{corollary} 
We shall not give a complete proof, except in the case when $B$ is finitely
presented over $A$ (so that the question is of smoothness).
\begin{proof} 
One direction is  just the ``sorite'' (see \cref{}). We want to show that
formal smoothness ``descends.'' 
The claim is that the two conditions for formal smoothness above (that
$\Omega_{B/A}$ be projective and the conormal map be a monomorphism) descend
under faithfully flat base-change. Namely, the fact about the conormal maps is
clear (by faithful flatness). 

Now let $B' = B \otimes_A A'$.
So we need to argue that if $\Omega_{B'/A'} = \Omega_{B/A} \otimes_B
B'$ is projective as a $B'$-module, then so is $\Omega_{B/A}$. Here we use the
famous result of Raynaud-Gruson (see \cite{RG71}), which states that
projectivity descends under faithfully flat extensions, to complete the proof.

If $B$ is finitely presented over $A$, then $\Omega_{B/A}$ is finitely
presented as a $B$-module. 
We can run most of the same proof as before, but we want to avoid using the
Raynaud-Gruson theorem: we must give a separate argument that $\Omega_{B/A}$ is
projective if $\Omega_{B'/A'}$ is. However, for a finitely presented module,
projectivity is \emph{equivalent} to flatness, by \cref{fpflatmeansprojective}. Moreover, since $\Omega_{B'/A'}$
is $B'$-flat, faithful flatness enables us to conclude that $\Omega_{B/A}$ is
$B$-flat, and hence projective.
\end{proof} 



\subsection{The Jacobian criterion}


Now we want  a characterization of when a morphism is smooth. Let us
motivate this with an analogy from standard differential topology. 
Consider real-valued functions $f_1, \dots, f_p \in C^{\infty}(\mathbb{R}^n)$.
Now, if $f_1, f_2, \dots, f_p$ are such that their gradients $\nabla f_i$ form a
matrix of rank $p$, then we can define a manifold near zero
which is the common zero set of all the $f_i$.
We are going to give a relative version of this in the algebraic setting.



Recall that a map of rings $A \to B$ is \emph{essentially of finite
presentation} if $B$ is the localization of a finitely presented $A$-algebra.


\begin{proposition} \label{smoothjac}
Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be a local homomorphism of local
rings such that $B$ is essentially of finite presentation.
Suppose $B = (A[X_1, \dots, X_n])_{\mathfrak{q}}/I$ for some finitely generated
ideal $I \subset A[X_1, \dots, X_n]_{\mathfrak{q}}$, where $\mathfrak{q}$ is a
prime ideal in the polynomial ring.

Then $I/I^2$ is generated as a $B$-module by polynomials
$f_1, \dots, f_k \in I \subset A[X_1, \dots, X_n]$ whose Jacobian matrix has maximal rank
in $C/\mathfrak{q} = B/\mathfrak{n}$ if and only if $B$ is formally smooth over $A$.
In this case, $I/I^2$ is even freely generated by the $f_i$.
\end{proposition} 

The Jacobian matrix $\frac{\partial f_i}{\partial X_j}$ is a matrix of
elements of $A[X_1, \dots, X_n]$, and we can take the associated images in
$B/\mathfrak{n}$. 

\begin{example} 
Suppose $A$ is an algebraically closed field $k$. 
Then $I$ corresponds to some ideal in the polynomial ring $k[X_1, \dots,
X_n]$, which cuts out a variety $X$.
Suppose $\mathfrak{q}$ is a maximal ideal in the polynomial ring.

Then $B$ is the  local 
ring of the  algebraic variety $X$ at $\mathfrak{q}$. 
Then \cref{smoothjac} states that $\mathfrak{q}$ is  a ``smooth point''
of the variety (i.e., the Jacobian matrix has maximal rank) if and only if
$B$ is formally smooth over $k$. 
We will expand on this later. 
\end{example} 


\begin{proof} 
Indeed, we know that polynomial rings are formally smooth. 
In particular $D = A[X_1, \dots, X_n]_{\mathfrak{q}}$ is formally smooth over
$A$, because localization preserves formal smoothness.  Note also that $\Omega_{D/A}$ is a free $D$-module, because
this is true for a polynomial ring and K\"ahler differentials commute with
localization.

So \cref{smoothconormal} implies that
\[ I/I^2 \to \Omega_{D/A} \otimes_D B  \]
is a split injection precisely when $B$ is formally smooth over $A$. Suppose
that this holds.
Now $I/I^2$ is then a summand of the free module $\Omega_{D/A} \otimes_D B$, so it
is projective, hence free as $B$ is local.
Let $K = B/\mathfrak{n}$. It follows that the map
\[ I/I^2 \otimes_D K \to \Omega_{D/A} \otimes_D  K = K^n \]
is an injection. This map sends a polynomial to its gradient (reduced
modulo $\mathfrak{q}$, or $\mathfrak{n}$). Hence the assertion is
clear: choose polynomials $f_1, \dots, f_k \in I$ that generate
$(I/I^2)_{\mathfrak{q}}$, and their gradients in $B/\mathfrak{n}$ must be
linearly independent.

Conversely, suppose that $I/I^2$ has such generators. 
Then the map 
\[ I/I^2 \otimes K \to K^n, \quad f\mapsto df  \]
is a split injection. 
However, if a map of finitely generated modules over a local ring, with the
target free, is such that tensoring with
the residue field makes it an injection, then it is a split injection. (We
shall prove this below.) Thus $I/I^2 \to \Omega_{D/A} \otimes_D B$ is a split
injection. In view
of the criterion for formal smoothness, we find that $B$ is formally smooth.
\end{proof} 

Here is the promised lemma necessary to complete the proof:
\begin{lemma} 
\label{splitinjreduce}
If $(A, \mathfrak{m})$ is a local ring with residue field $k$, $M$ a finitely
generated $A$-module, $N$ a finitely
generated projective $A$-module, then a map
\( \phi: M \to N  \)
is a split injection if and only if
\(M \otimes_A k \to N \otimes_A k  \)
is an injection.
\end{lemma} 
\begin{proof} 
One direction is clear, so it suffices to show that $M \to N$ is a split
injection if the map on fibers is an injection.


Let $L$ be a ``free approximation'' to $M$, that is, a free module $L$ together
with a map $L \to M$ which is an isomorphism modulo $k$. By Nakayama's lemma,
$L \to M$ is surjective.
Then the map
$L \to M \to N$ is such that the $L \otimes k \to N \otimes k$ is injective, so
$L \to N$ is a split injection (by an elementary criterion).
It follows that we can find a splitting $N \to L$, which when composed with $L
\to M$ is a splitting of $M \to N$.
\end{proof}

\subsection{The fiberwise criterion for smoothness}

We shall now prove that a smooth morphism is flat. In fact, we will get
a general ``fiberwise'' criterion for smoothness (i.e., a morphism is smooth
if and only if it is flat and the fibers are smooth), which will enable
us to reduce smoothness questions, in some cases, to the situation where the
base is a field. 

We shall need some lemmas on regular sequences. 
The first will give a useful criterion for checking $M$-regularity of an
element by checking on the fiber.
For our purposes, it will also give a criterion for when quotienting by a
regular element preserves flatness over a smaller ring.

\begin{lemma} 
Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be a local homomorphism
of local noetherian 
rings.
Let $M$ be a finitely generated $B$-module, which is flat over $A$. 

Let $f \in B$. Then the following are equivalent:
\begin{enumerate}
\item $M/fM$ is flat over $A$ and $f: M \to M$ is injective.
\item $f: M \otimes_A k \to M \otimes_A k$ is injective where $k = A/\mathfrak{m}$.
\end{enumerate}
\end{lemma} 

For instance, let us consider the case $M = B$. The lemma states that if
multiplication by $f$ is regular on $B \otimes_A k$, then the hypersurface cut
out by $f$ (i.e., corresponding to the ring $B/fB$) is flat over $A$. 

\begin{proof} All $\tor$ functors here will be over $A$. 
If $M/fM$ is $A$-flat and $f: M \to M$ is injective, then the sequence
\[ 0 \to M \stackrel{f}{\to} M \to M/fM \to 0 \]
leads to a long exact sequence
\[ \tor_1(k, M/fM) \to M \otimes_A k \stackrel{f}{\to} M \otimes_A k \to (M/fM)
\otimes_A k \to 0. \]
But since $M/fM$ is flat, the first term is zero, and  it follows that $M \otimes k \stackrel{f}{\to} M
\otimes k$ is injective.

The other direction is more subtle. Suppose multiplication by $f$ is a
monomorphism on $M \otimes_A k$. Now write the exact sequence
\[ 0 \to P \to M \stackrel{f}{\to} M \to Q \to 0 \]
where $P, Q$ are the kernel and cokernel. We want to show that $P = 0$
and $Q$ is flat over $A$.

We can also consider the image $I = fM \subset M$, to split this into two
exact sequences
\[ 0 \to P \to M \to I \to 0  \]
and 
\[ 0 \to I \to M \to Q \to 0.  \]
Here the map $M \otimes_A k \to I \otimes_A k \to M \otimes_A k$ is given by
multiplication by $f$, so it is injective by hypothesis. This implies
that $M \otimes_A k \to I
\otimes_A k$ is injective. So $M \otimes k \to I \otimes k$ is actually an isomorphism because it
is obviously surjective, and we have just seen it is injective.
Moreover, $I \otimes_A k \to M \otimes_A k$ is isomorphic to the
homothety $f: M \otimes_A k \to M \otimes_A k$, and consequently is
injective.
To summarize:
\begin{enumerate}
\item $M \otimes_A k \to I \otimes_A k$ is an isomorphism. 
\item $I \otimes_A k \to M \otimes_A k$ is an injection.
\end{enumerate}

Let us tensor these two exact sequences with $k$. We get
\[ 0 \to  \tor_1(k, I) \to P \otimes_A k \to M  \otimes_A k \to I \otimes_A k \to 0   \]
because $M$ is flat. We also get
\[ 0 \to  \tor_1(k, Q) \to I \otimes_A k \to M  \otimes_A k \to Q \otimes_A k \to 0
.\]
We'll start by using the second sequence. Now $I \otimes_A k \to M
\otimes_A k$
was just said to be injective, so that $\tor_1(k, Q) = 0$. By the local
criterion for flatness, it follows that $Q$ is a flat 
$A$-module as well. 
But $Q = M/fM$, so this gives one part of what we wanted.

Now, we want to show finally that $P = 0$. 
Now, $I$ is flat; indeed, it is the kernel of a surjection of flat maps $M \to
Q$, so the long exact sequence shows that it is flat. So we have a short exact
sequence
\[ 0 \to P \otimes_A k \to M \otimes_A k \to I \otimes_A k \to 0,  \]
which shows now that $P \otimes_A k  = 0$ (as $M \otimes_A k \to I \otimes_A k$ was
just shown to be an isomorphism earlier). By Nakayama $P = 0$.
This implies that $f$ is $M$-regular.
\end{proof}

\begin{corollary} \label{regseqflat} Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be a morphism
of noetherian local rings.
Suppose $M$ is a finitely generated $B$-module, which is flat over $A$.

Let $f_1, \dots, f_k \in \mathfrak{n}$. Suppose that $f_1, \dots, f_k$ is a
regular sequence on $M \otimes_A k$. Then it is a regular sequence on $M$ and,
in fact, $M/(f_1, \dots, f_k ) M$ is flat over $A$.
\end{corollary} 
\begin{proof} 
This is now clear by induction. 
\end{proof} 


\begin{theorem}\label{smoothflat1} Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be
a morphism of local  rings such that $B$ is the localization of
a finitely presented $A$-algebra at a prime
ideal, $B = (A[X_1, \dots, X_n])_{\mathfrak{q}}/I$. Then if $A \to B$ is formally smooth, $B$ is a flat $A$-algebra.
\end{theorem} 

The strategy is that $B$ is going to be written as the quotient of a
localization of a  polynomial
ring by a sequence $\left\{f_i\right\}$
whose gradients are independent (modulo the maximal ideal), i.e. modulo
$B/\mathfrak{n}$. 
If we were working modulo a field, then we could use arguments about regular
local rings to argue that the $\left\{f_i\right\}$ formed a regular
sequence. We will use \cref{regseqflat} to bootstrap from this case to the
general situation.

\begin{proof} 
Let us first assume that $A$ is \emph{noetherian.}

Let $C = (A[X_1, \dots, X_n])_{\mathfrak{q}}$. Then $C$ is a local ring,
smooth over $A$, and we have morphisms of local rings
\[ (A, \mathfrak{m}) \to (C, \mathfrak{q}) \twoheadrightarrow (B,
\mathfrak{n}).  \]
Moroever, $C$ is a \emph{flat} $A$-module, and we are going to apply the
fiberwise criterion for regularity to $C$ and a suitable sequence.

Now we know that $I/I^2$ is a $B$-module generated by polynomials $f_1,
\dots, f_m
\in A[X_1, \dots, X_n]$
whose Jacobian matrix has maximal rank in $B/\mathfrak{n}$ (by the Jacobian
criterion, \cref{smoothjac}).
The claim is that the $f_i$ are linearly independent in
$\mathfrak{q}/\mathfrak{q}^2$. This will be the first key step in the proof.
In other words, if $\left\{u_i\right\}$ is a family of elements of $C$, not all
non-units, we do not have
\[ \sum u_i f_i \in \mathfrak{q}^2.  \]
For if we did, then we could take derivatives
and find
\[ \sum u_i \partial_j f_i \in \mathfrak{q}  \]
for each $j$. This contradicts the gradients of the $f_i$ being linearly
independent in $B/\mathfrak{n} = C/\mathfrak{q}$. 

Now we want to show that the $\left\{f_i\right\}$ form a regular sequence in
$C$. To do this, we shall reduce to the case where $A$ is a field. Indeed, let
us make the base-change $A \to k = A/\mathfrak{m}, B \to \overline{B} = B
\otimes_A k, C \to \overline{C}=C \otimes_A k$ where $k  =
A/\mathfrak{m}$ is the residue field.
Then $\overline{B},\overline{C}$ are  formally smooth local rings over a
field $k$. We also know that $\overline{C}$ is a \emph{regular} local ring,
since it is a localization of a polynomial ring over a field. 


Let us denote the maximal ideal of
$\overline{C}$ by
$\overline{\mathfrak{q}}$; this is just the image of $\mathfrak{q}$.


Now the $\left\{f_i\right\}$ have images in $\overline{C}$ that are linearly
independent
in $\overline{\mathfrak{q}}/\overline{\mathfrak{q}}^2 =
\mathfrak{q}/\mathfrak{q}^2$. It follows that the $\left\{f_i\right\}$ form a
regular sequence in $\overline{C}$, by general facts about regular local
rings (see, e.g. \cref{quotientreg44}); indeed, each of the successive quotients $\overline{C}/(f_1, \dots,
f_i)$ will then be regular.
It follows from the fiberwise criterion ($C$ being flat) that the
$\left\{f_i\right\}$ form a regular sequence in $C$ itself, and that the
quotient $C/(f_i) = B$ is $A$-flat.
\end{proof} 

The proof in fact showed a bit more: we expressed $B$ as the quotient of a
localized 
polynomial ring by a regular sequence. 
In other words:

\begin{corollary}[Smooth maps are local complete intersections]
Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be an essentially of
finite presentation, formally smooth map. Then there exists a localization
of a polynomial ring, $C$, such that $B$ can be expressed as
$C/(f_1, \dots, f_n)$ for the $\left\{f_i\right\}$ forming  a regular
sequence in the maximal ideal of $C$.
\end{corollary} 

We also get the promised result:
\begin{theorem} \label{smoothflat}
Let $A \to B$ be a smooth morphism of rings. Then $B$ is flat over $A$.
\end{theorem} 
\begin{proof} 
Indeed, we immediately reduce to \cref{smoothflat1} by checking locally at each
prime (which gives formally smooth maps).
\end{proof} 

In fact, we can get a general criterion now:

\begin{theorem} \label{fiberwisesmooth}
Let $(A, \mathfrak{m}) \to (B, \mathfrak{n})$ be a (local) morphism of local
noetherian rings such that $B$ is the localization of a finitely presented $A$-algebra at a prime
ideal, $B = (A[X_1, \dots, X_n])_{\mathfrak{q}}/I$. Then $B$ is formally
smooth over $A$ if $B$ is $A$-flat and $B/\mathfrak{m}B$ is formally smooth
over $A/\mathfrak{m}$.
\end{theorem} 

\begin{proof} 
One direction is immediate from what we have already shown. Now we need to
show that if $B$ is $A$-flat, and $B/\mathfrak{m}B$ is formally smooth over
$A/\mathfrak{m}$, then $B$ is itself formally smooth over $A$.
This will be comparatively easy, with all the machinery developed.
This will be comparatively easy, with all the machinery developed.

As before, write the sequence
\[ (A, \mathfrak{m}) \to (C, \mathfrak{q}) \twoheadrightarrow
(B,\mathfrak{n}),
\]
where $C$ is a localization of a polynomial ring at a prime ideal, and in
particular is formally smooth over $A$. 
We know that $B = C/I$, where $I \subset \mathfrak{q}$.

To check that $B$ is formally smooth over $A$, we need to show ($C$ being
formally smooth) that the conormal sequence
\begin{equation} \label{thisexact1} I/I^2 \to  \Omega_{C/A} \otimes_C B \to
\Omega_{C/B} \to 0. \end{equation}
is split exact. 

Let $\overline{A}, \overline{C}, \overline{B}$ be the base changes of $A, B,
C$ to $k = A/\mathfrak{m}$; let $\overline{I}$ be the kernel of $\overline{C}
\twoheadrightarrow \overline{B}$.
Note that $\overline{I} = I/\mathfrak{m}I$ by flatness of $B$.
Then we know that the sequence
\begin{equation} \label{thisexact2} \overline{I}/\overline{I}^2 \to  \Omega_{\overline{C}/k} / \overline{I}
\Omega_{\overline{C}/k} \to \Omega_{\overline{C}/\overline{B}} \to
0\end{equation}
is split exact, because $\overline{C}$ is a formally smooth $k$-algebra (in
view of \cref{smoothconormal}).

But \eqref{thisexact2} is the reduction of \eqref{thisexact1}. Since the middle
term of \eqref{thisexact1} is finitely generated and projective over $B$, we can check
splitting modulo the maximal ideal (see \cref{splitinjreduce}).
\end{proof} 

In particular, we get the global version of the fiberwise criterion:

\begin{theorem} 
Let $A \to B$ be a finitely presented morphism of rings. Then $B$ is a smooth
$A$-algebra if and only if $B$ is a flat $A$-algebra and, for each
$\mathfrak{p} \in \spec A$, the morphism $k(\mathfrak{p}) \to B \otimes_A
k(\mathfrak{p})$ is  smooth.
\end{theorem} 
Here $k(\mathfrak{p})$ denotes the residue field of $A_{\mathfrak{p}}$, as
usual.
\begin{proof} 
One direction is clear. For the other, we recall 
that smoothness is \emph{local}: $A \to B$ is smooth if and only if, for each
$\mathfrak{q} \in \spec B$ with image $\mathfrak{p} \in \spec A$, we have $A_{\mathfrak{p}} \to B_{\mathfrak{q}}$
formally smooth (see \cref{fsislocal}).
But, by \cref{fiberwisesmooth}, this is the case if and only if, for each such
pair $(\mathfrak{p}, \mathfrak{q})$, the morphism $k(\mathfrak{p}) \to
B_{\mathfrak{q}} \otimes_{A_{\mathfrak{p}}} k(\mathfrak{p})$ is formally smooth.
Now if $k(\mathfrak{p}) \to B \otimes_A k(\mathfrak{p})$ is smooth for each
$\mathfrak{p}$, then this condition is clearly satisfied.
\end{proof} 

\subsection{Formal smoothness and regularity}

We now want to explore the connection between formal smoothness and regularity.
In general, the intuition is that a variety over an algebraically closed field
is \emph{smooth} if and only if the local rings at closed points (and thus at
all points by \cref{locofregularloc}) are regular local rings. 
Over a non-algebraically closed field, only one direction is still true: we
want the local rings to be \emph{geometrically regular.}
So far we will just prove one direction, though.

\begin{theorem} 
Let $(A, \mathfrak{m})$ be a noetherian local ring containing a copy of its
residue field $A/\mathfrak{m}= k$. Then if $A$ is formally smooth over $k$, $A$
is regular.
\end{theorem} 
\begin{proof} 
We are going to compare the quotients $A/\mathfrak{m}^m$ to the quotients of
$R= k[x_1, \dots, x_n]$ where  $n$ is the \emph{embedding dimension} of
$A$.
Let $\mathfrak{n} \subset k[x_1, \dots, x_n]$ be the ideal $(x_1, \dots, x_n)$. 
We are going to give surjections
\[ A/\mathfrak{m}^m \twoheadrightarrow R/\mathfrak{n}^m  \]
for each $m \geq 2$.

Let $t_1, \dots, t_n \in \mathfrak{m}$ be a $k$-basis for
$\mathfrak{m}/\mathfrak{m}^2$.
Consider the map $A \twoheadrightarrow R/\mathfrak{n}^2 $ that goes
$A  \twoheadrightarrow A/\mathfrak{m}^2 \simeq  k \oplus
\mathfrak{m}/\mathfrak{m}^2 \simeq R/\mathfrak{n}^2$, where $t_i$ is sent to
$x_i$. This is well-defined, and gives a surjection $A \twoheadrightarrow
R/\mathfrak{n}^2$.
Using the infinitesimal lifting property, we can lift this map to
$k$-algebra maps
\[ A \to R/\mathfrak{n}^m  \]
for each $k$, which necessarily factor through $A/\mathfrak{m}^m$ (as they send
$\mathfrak{m}$ into $\mathfrak{n}$). They are surjective by Nakayama's lemma.
It follows that
\[ \dim_k A/\mathfrak{m}^m \geq \dim_k R/\mathfrak{n}^m,  \]
and since $R_{\mathfrak{n}}$ is a regular local ring, the last term grows
asymptotically like $m^n$. It follows that $\dim R \geq n$, and since $\dim R$
is always at most the embedding dimension, we are done.
\end{proof} 


\subsection{A counterexample}

It is in fact true that a formally smooth morphism between \emph{arbitrary} noetherian rings is
flat, although we have only proved this in the case of a morphism of finite
type.
This is false if we do not assume noetherian hypotheses.
A formally smooth morphism need not be flat.

\begin{example} \label{fsisn'tflat}
Consider a field $k$, and consider $R = k[T^{x}]_{x \in \mathbb{Q}_{>0}}$. 
This is the filtered colimit of the polynomial rings $k[T^{1/n}]$ over all $n$. There is a
natural map $R \to k$ sending each power of $T$ to zero.
The claim is that $R \to k$ is a formally smooth morphism which is not flat.
It is a \emph{surjection}, so it is a lot different from the intuitive idea of
a smooth map.

Yet it turns out to be \emph{formally} smooth. To see this, consider an $R$-algebra $S$ and an ideal $I \subset S$ such that $S^2 =
0$. The claim is that an $R$-homomorphism $k \to S/I$ lifts to $k \to S$.
Consider the diagram
\[ \xymatrix{ \\
& & S \ar[d]  \\
R  \ar[rru] \ar[r] & k \ar@{-->}[ru] \ar[r] & S/I,
}\]
in which we have to show that a dotted arrow exists.

However, there can be at most one $R$-homomorphism $k \to S/I$, since $k$ is a
quotient of $R$. It follows that each $T^{x}, x \in \mathbb{Q}_{>0}$ is mapped
to zero in $S/I$.
So each $T^x, x \in I$ maps to elements of $I$ (by the map $R \to S$ assumed to
exist). It follows that $T^x = (T^{x/2})^2$ maps to zero in $S$, as $I^2 =0$.
Thus the map $R \to S$ annihilates each $T^x$, which means that there is a
(unique) dotted arrow.

Note that $R \to k$ is not flat. Indeed, multiplication by $T$ is injective on
$R$, but it acts by zero on $k$.
\end{example} 

This example was described by Anton Geraschenko on MathOverflow; see
\cite{MO200}.
The same reasoning shows more generally:

\begin{proposition} 
Let $R$ be a ring, $I \subset R$ an ideal such that $I = I^2$. Then the
projection $R \to R/I$ is formally \'etale.
\end{proposition} 

For a noetherian ring, if $I = I^2$, then we know that $I$ is generated by an
idempotent in $R$ (see \cref{idempotentideal}), and the projection $R \to R/I$ is projection on the
corresponding direct factor (actually, the complementary one).
In this case, the projection is flat, and this is to be expected: as stated
earlier, formally \'etale implies flat for noetherian rings.
But in the non-noetherian case, we can get interesting examples. 

\begin{example} We shall now give an example showing that formally \'etale
morphisms do not necessarily preserve reducedness. We shall later see that this
is true in the \emph{\'etale} case (see \cref{reducedetale}).

Let $k$ be a field of characteristic $\neq 2$.
Consider the ring $R = k[T^x]_{x \in \mathbb{Q}_{>0}}$ as before. 
Take $S = R[X]/(X^2 - T)$, and consider the ideal $I$ generated by all the positive
powers $T^x, x > 0$. As before, clearly $I=I^2$, and thus $S \to S/I$ is
formally \'etale.
The claim is that $S$ is reduced; clearly $S/I = k[X]/(X^2)$ is not. 
Indeed, an element of $S$ can be  uniquely described by $\alpha = P(T) + Q(T)X$ where $P, Q$ are
``polynomials'' in $T$---in actuality, they are allowed to have terms $T^x, x
\in \mathbb{Q}_{>0}$.
Then $\alpha^2 = P(T)^2 + Q(T)^2 T + 2 P(T) Q(T) X$. It is thus easy to see
that if $\alpha^2 = 0$, then $\alpha = 0$.
\end{example} 


\section{\'Etale morphisms}
\label{section-formally-etale}

\subsection{Definition}
The definition is just another nilpotent lifting property:
\begin{definition}
\label{definition-formally-etale}
Let $S$ be an $R$-algebra. Then $S$ is \textbf{formally \'etale} over $R$ (or
the map $R \to S$ is formally \'etale) if given any
$R$-algebra $A$ and ideal $I \subset A $ of square zero, the map
\[ \hom_R(S, A) \to \hom_R(S, A/I)\]
is a bijection.
A ring homomorphism is \textbf{\'etale} if and only if it is formally \'etale
and of finite presentation. 
\end{definition}

So $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. As before, the functor
of points can be used to test formal \'etaleness.
Moreover, clearly a ring map is formally \'etale if and only if
it is both formally smooth and formally unramified.

We have the usual:
\begin{proposition} 
\'Etale (resp. formally \'etale) morphisms are closed under composition
and base change.
\end{proposition} 
\begin{proof} 
Either a combination of the corresponding results for formal
smoothness and formal unramifiedness (i.e.  \cref{sorite1unr}, 
\cref{unrbasechange}, and  \cref{smoothsorite}), or easy to verify
directly.
\end{proof} 

Filtered colimits preserve formal \'etaleness:
\begin{lemma}
\label{lemma-colimit-formally-etale}
Let $R$ be a ring. Let $I$ be a directed partially ordered 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 = \text{colim}_{i \in I}\ S_i$ is formally \'etale over $R$
\end{lemma}
The idea is that we can make the lifts on each piece, and glue them
automatically.
\begin{proof}
Consider a diagram as in \rref{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}


We now want to give the standard example of an \'etale morphism;
geometrically, this corresponds to a hypersurface in affine 1-space given by
a nonsingular equation. We will eventually show that any \'etale
morphism looks like this, locally. 


\begin{example} 
Let $R$ be a ring, $P \in R[X]$ a polynomial. Suppose $Q \in R[X]/P$ is such that in the
localization $(R[X]/P)_Q$, the image of the derivative $P' \in R[X]$ is a unit. Then the map
\[ R \to (R[X]/P)_Q  \]
is called a \textbf{standard \'etale morphism.}
\end{example} 



The name is justified by:
\begin{proposition} 
A standard \'etale morphism is \'etale.
\end{proposition} 
\begin{proof} 
It is sufficient to check the condition on the K\"ahler differentials, since a
standard \'etale morphism is evidently flat and of finite presentation. 
Indeed, we have that
\[ \Omega_{(R[X]/P)_Q/R} = Q^{-1} \Omega_{(R[X]/P)/R} = Q^{-1}
\frac{R[X]}{(P'(X), P(X)) R[X]}  \]
by basic properties of K\"ahler differentials. Since $P'$ is a unit after
localization at $Q$, this last object is clearly zero. 
\end{proof} 

\begin{example} \label{etalefield}
A separable algebraic extension of a field  $k$ is formally \'etale. 
Indeed, we just need to check this 
for a finite separable extension $L/k$, in view of \cref{lemma-colimit-formally-etale}, and then we can write $L = k[X]/(P(X))$
for $P$ a separable polynomial. But it is easy to see that this is a special
case of a standard \'etale morphism.
In particular, any unramified extension of a field is \'etale, in view of the
structure theory for unramified extensions of fields (\cref{unrfield}).
\end{example} 


\begin{example} 
The example of \cref{fsisn'tflat} is a formally \'etale morphism, because we
showed the map was formally smooth and it was clearly surjective. 
It follows that a formally \'etale morphism is not necessarily flat!
\end{example} 


We also want a slightly different characterization of an \'etale morphism. This
criterion will be of extreme importance for us in the sequel.
\begin{theorem} 
An $R$-algebra $S$ of finite presentation is \'etale if and only if
it is flat and unramified.
\end{theorem} 
This is in fact how \'etale morphisms are defined in \cite{SGA1} and in
\cite{Ha77}.
\begin{proof} 
An \'etale morphism is smooth, hence flat (\cref{smoothflat}). Conversely,
suppose $S$ is flat and unramified over $R$. We just need to show that $S$ is
smooth over $R$. But this follows by the fiberwise criterion for smoothness,
\cref{fiberwisesmooth}, and the fact that an unramified extension of a
field is automatically \'etale, by \cref{etalefield}.
\end{proof} 


Finally, we would like a criterion for when a morphism of \emph{smooth}
algebras is \'etale.
We state it in the local case first.
\begin{proposition} \label{etalecotangent}
Let $B, C$ be local, formally smooth, essentially of finite presentation
$A$-algebras and let $f: B \to C$ be a local $A$-morphism.
Then $f$ is formally \'etale if and only if and only if the map $\Omega_{B/A}\otimes_B C \to \Omega_{C/A}$ is an isomorphism.
\end{proposition} 
The intuition is that $f$ induces an isomorphism on the cotangent spaces; this
is analogous to the definition of an \emph{\'etale} morphism of smooth
manifolds (i.e. one that induces an isomorphism on each tangent space, so is a
local isomorphism at each point).
\begin{proof} 
We prove this for $A$ noetherian. 

We just need to check that $f$ is flat if the map on differentials is an
isomorphism.
Since $B, C$ are flat $A$-algebras, it suffices (by the general criterion,
\cref{fiberwiseflat}), to show that $B
\otimes_A k \to C \otimes_A k$ is flat for $k$ the residue field of $A$. 
We will also be done if we show that $B \otimes_A \overline{k} \to C \otimes_A
\overline{k}$ is flat. Note that the same hypotheses (that 

So we have reduced to a question about rings essentially of finite type over a
\emph{field}. Namely, we have local rings $\overline{B}, \overline{C}$ which
are both formally smooth, essentially of finite-type $k$-algebras, and a map $\overline{B} \to \overline{C}$ that
induces an isomorphism on the K\"ahler differentials as above.

The claim is that $\overline{B} \to \overline{C}$ is flat (even local-\'etale). 
Note that both $\overline{B}, \overline{C}$ are \emph{regular} local rings, and
the condition about K\"ahler differentials implies that they of the same
dimension. Consequently, $\overline{B} \to \overline{C}$ is \emph{injective}:
if it were not injective, then the dimension of $\im(\overline{B} \to
\overline{C})$ would be \emph{less} than $\dim \overline{B} = \dim \overline{C}$.
But since $\overline{C}$ is unramified over $\im(\overline{B} \to
\overline{C})$, the dimension can only drop: $\dim \overline{C} \leq \dim
\im(\overline{B} \to \overline{C})$.\footnote{This follows by the surjection of
modules of K\"ahler differentials, in view of \cref{}.}
This contradicts $\dim \overline{B} = \dim\overline{C}$. It follows that
$\overline{B} \to \overline{C}$ is injective, and hence flat by \cref{} below
(one can check that there is no circularity).


\end{proof} 

\subsection{The local structure theory}
We know two easy ways of getting an unramified morphism out of a ring $R$.
First, we can take a standard \'etale morphism, which is necessarily
unramified; next we can take a quotient of that. The local structure theory
states that this is all we can have, locally.

\textbf{Warning: this section will use Zariski's Main Theorem, which is not in
this book yet.}


For this we introduce a definition.

\begin{definition} 
Let $R$ be a commutative ring, $S$ an $R$-algebra of finite type. Let $\mathfrak{q} \in \spec
S$ and $\mathfrak{p} \in \spec R$ be the image. Then $S$ is called
\textbf{unramified at $\mathfrak{q}$} (resp. \textbf{\'etale at
$\mathfrak{p}$}) if $\Omega_{S_{\mathfrak{q}}/R_{\mathfrak{p}}} = 0$ (resp.
that and $S_{\mathfrak{q}}$ is $R_{\mathfrak{p}}$-flat).
\end{definition} 

Now when works with finitely generated algebras, the module of K\"ahler
differentials is always finitely generated over the top ring. 
In particular, if 
$\Omega_{S_{\mathfrak{q}}/R_{\mathfrak{p}}} = (\Omega_{S/R} )_{\mathfrak{q}} =
0$, then there is $f \in S - \mathfrak{q}$ with $\Omega_{S_f/R} = 0$.
So being unramified at $\mathfrak{q}$ is equivalent to the existence of $f \in
S-\mathfrak{q}$ such that $S_f$ is unramified over $R$.
Clearly if $S$ is unramified over $R$, then it is unramified at all primes,
and conversely.


\begin{theorem} 
Let $\phi: R \to S$ be  morphism of finite type, and $\mathfrak{q} \subset S$ prime
with $\mathfrak{p} = \phi^{-1}(\mathfrak{q})$. Suppose $\phi$ is unramified at
$\mathfrak{q}$.
Then there is $f \in R- \mathfrak{p}$ and $g \in S - \mathfrak{q}$ (divisible
by $\phi(f)$) such that
the morphism
\[ R_f \to S_g  \]
factors as a composite
\[ R_f \to (R_f[x]/P)_{h} \twoheadrightarrow S_g  \]
where the first is a standard \'etale morphism and the second is a
surjection. Moreover, we can arrange things such that the fibers above
$\mathfrak{p}$ are isomorphic.
\end{theorem} 


\begin{proof}We shall assume that $R$ is \emph{local} with maximal ideal
$\mathfrak{p}$. Then the question reduces to finding
$g \in S$ such that $S_g$ is a quotient of an algebra standard \'etale over $R$. 
This reduction is justified by the following argument: if $R$ is 
not necessarily local, then the morphism $R_{\mathfrak{p}} \to
S_{\mathfrak{p}}$ is still unramified. If we can show that there is $g \in
S_{\mathfrak{p}} - \mathfrak{q}S_{\mathfrak{p}}$ such
that $(S_{\mathfrak{p}})_g$ is a quotient of a standard \'etale
$R_{\mathfrak{p}}$-algebra, it 
will follow that there is $f \notin \mathfrak{p}$ such that the same works
with $R_f \to S_{gf}$.

\emph{We shall now reduce to the case where $S$ is a finite $R$-algebra.}
Let $R$ be local, and let $R \to S$ be unramified at $\mathfrak{q}$. By assumption, $S$ is finitely generated over $R$.
We have seen by \cref{unrisqf} that $S$ is quasi-finite over $R$ at
$\mathfrak{q}$.
By Zariski's Main Theorem (\cref{zmtCA}), there is a finite
$R$-algebra $S'$ and $\mathfrak{q} ' \in \spec S'$ such that $S$ near
$\mathfrak{q}$ and $S'$ near $\mathfrak{q}'$ are isomorphic (in
the sense that there are $g \in S-\mathfrak{q}$, $h \in S' -
\mathfrak{q}'$ with $S_g \simeq S'_h$). 
Since $S'$ must be unramified at $\mathfrak{q}'$, we can assume at
the outset, by
replacing $S$ by $S'$, that $R
\to S$ is finite and unramified at $\mathfrak{q}$.


\emph{We shall now reduce to the case where $S$ is generated by one element as
$R$-algebra}. This will occupy us for a few paragraphs.

We have assumed that $R$ is a local ring with maximal ideal $\mathfrak{p} \subset R$; the
maximal ideals of $S$ are finite, say, $\mathfrak{q},\mathfrak{q}_1, \dots,
\mathfrak{q}_r$ because $S$ is finite over $R$; these all contain $\mathfrak{p}$ by Nakayama. 
These are no inclusion relations among $\mathfrak{q}$ and the $\mathfrak{q}_i$
as $S/\mathfrak{p}S$ is an artinian ring.

Now $S/\mathfrak{q}$ is a finite separable field extension of
$R/\mathfrak{p}$ by \cref{unrfield}; indeed, the morphism $R/\mathfrak{p}
\to S/\mathfrak{p}S \to S/\mathfrak{q}$ is a composite of
unramified extensions and is thus unramified. In particular, by the primitive element theorem, there is $x \in S$ such that $x$ is a
generator of the field extension $R/\mathfrak{p} \to S/\mathfrak{q}$.
We can also choose $x$ to lie in the other $\mathfrak{q}_i$ by the Chinese
remainder theorem. 
Consider the subring $C=R[x] \subset S$.
It has a maximal ideal $\mathfrak{s}$ which is the intersection of
$\mathfrak{q}$ with $C$.
We are going to show that locally, $C$ and $S$ look the same.

\begin{lemma}[Reduction to the monogenic case]
Let $(R, \mathfrak{p})$ be a local ring and $S$ a finite $R$-algebra. Let
$\mathfrak{q}, \mathfrak{q}_1, \dots, \mathfrak{q}_r \in \spec S$ be the prime ideals
lying above $\mathfrak{p}$. Suppose $S$ is unramified at $\mathfrak{q}$.

Then there is $x \in S$ such that the rings $R[x] \subset S$ and $S$ are
isomorphic near $\mathfrak{q}$: more precisely, there is $g \in R[x] -
\mathfrak{q}$ with $R[x]_g = S_g$.
\end{lemma} 
\begin{proof} Choose $x$ as in the paragraph preceding the statement of
the lemma.
Define $\mathfrak{s}$ in the same way.
We have  morphisms
\[ R \to C_{\mathfrak{s}} \to S_{\mathfrak{s}}  \]
where $S_{\mathfrak{s}}$ denotes $S$ localized at $C-\mathfrak{s}$, as usual.
The second morphism here is finite. 
However, we claim that $S_{\mathfrak{s}}$ is in fact a local ring with maximal
ideal $\mathfrak{q} S_{\mathfrak{s}}$; in particular, $S_{\mathfrak{s}} =
S_{\mathfrak{q}}$.
Indeed, $S$ can have no maximal ideals other than
$\mathfrak{q}$ lying above $\mathfrak{s}$; for, 
if $\mathfrak{q}_i$ lay over $\mathfrak{s}$ for some $i$, then $x \in
\mathfrak{q}_i \cap C = \mathfrak{s}$. But $x \notin\mathfrak{s}$ because $x$
is not zero in $S/\mathfrak{q}$.


It thus follows that $S_{\mathfrak{s}}$ is a local ring with maximal ideal
$\mathfrak{q}S_{\mathfrak{s}}$. In particular, it is
equal to $S_{\mathfrak{q}}$, which is a localization of
$S_{\mathfrak{s}}$ at the maximal ideal.
In particular, the morphism 
\[ C_{\mathfrak{s}} \to S_{\mathfrak{s}} = S_{\mathfrak{q}}  \]
is finite. Moreover, we have $\mathfrak{s} S_{\mathfrak{q}} =
\mathfrak{q}S_{\mathfrak{q}}$ by unramifiedness of $R \to S$.
So since the residue fields are the same by choice of $x$, we have
$\mathfrak{s}S_{\mathfrak{q}} + C_{\mathfrak{s}} = S_{\mathfrak{q}}$.
Thus by Nakyama's lemma, we find that $S_{\mathfrak{s}} = S_{\mathfrak{q}} = C_{\mathfrak{s}}$.


There is thus an element $g \in C - \mathfrak{r}$ such that $S_g = C_g$.
In particular, $S$ and $C$ are isomorphic near $\mathfrak{q}$.
\end{proof} 

We can thus replace $S$ by $C$ and assume that $C$ has one generator. 

\emph{With this reduction now made, we proceed.} We are now considering the
case where $S$ is generated by one element, so a quotient $S = R[X]$ for
some monic polynomial $P$. 
Now $\overline{S} = S/\mathfrak{p}S$ is thus a quotient of $k[X]$, where $k =
R/\mathfrak{p}$ is the residue field.
It thus follows that
\[ \overline{S} = k[X]/(\overline{P})  \]
for $\overline{P}$ a monic polynomial, as $\overline{S}$ is a finite
$k$-vector space. 

Suppose $\overline{P}$ has degree $n$.
Let $x \in S$ be a generator of $S/R$.
We know that $1, x, \dots, x^{n-1}$ has reductions that form a $k$-basis for
$S \otimes_R k$, so by Nakayama they generate $S$ as an $R$-module.
In particular, we can find a monic polynomial $P$ of degree $n$ such that
$P(x) = 0$. 
It follows that the reduction of $P$ is necessarily $\overline{P}$.
So we have a surjection
\[ R[X]/(P) \twoheadrightarrow S  \]
which induces an isomorphism modulo $\mathfrak{p}$ (i.e. on the fiber).

Finally, we claim that we can modify $R[X]/P$ to make a standard \'etale
algebra. Now, 
if we let $\mathfrak{q}'$ be the preimage of $\mathfrak{q}$ in
$R[X]/P$, then we have morphisms of local rings
\[ R \to (R[X]/P)_{\mathfrak{q}'} \to S_{\mathfrak{q}}. \]
The claim is that $R[X]/(P)$ is unramified
over $R$ at $\mathfrak{q}'$.


To see this, let $T = (R[X]/P)_{\mathfrak{q}'}$. Then, since the fibers of $T$ and $S_{\mathfrak{q}}$ are the same at
$\mathfrak{p}$,  we have that
\[ \Omega_{T/R} \otimes_R k(\mathfrak{p}) = \Omega_{T \otimes_R
k(\mathfrak{p})/k(\mathfrak{p})} = 
\Omega_{(S_{\mathfrak{q}}/\mathfrak{p}S_{\mathfrak{q}})/k(\mathfrak{p})} = 0   \]
as $S$ is $R$-unramified at $\mathfrak{q}$.
It follows that $\Omega_{T/R} = \mathfrak{p} \Omega_{T/R}$, so a fortiori
$\Omega_{T/R} = \mathfrak{q} \Omega_{T/R}$; since this is a finitely generated
$T$-module, Nakayama's lemma implies that is zero. 
 We conclude
that $R[X]/P$ is unramified at $\mathfrak{q}'$; in particular, by the
K\"ahler differential criterion, the image of the derivative $P'$ is not in
$\mathfrak{q}'$. If we localize at the image of $P'$, we then get what we
wanted in the theorem.
\end{proof} 

We now want to deduce a corresponding (stronger) result for \emph{\'etale}
morphisms. Indeed, we prove:

\begin{theorem} 
If $R \to S$ is \'etale at $\mathfrak{q} \in \spec S$ (lying over
$\mathfrak{p} \in \spec R$), then there are $f \in R-\mathfrak{p}, g \in S -
\mathfrak{q}$ such that the morphism $R_f \to S_g$ is a standard \'etale
morphism.
\end{theorem} 
\begin{proof} 
By localizing suitably, we can assume that   $(R, \mathfrak{p})$ is local,
and  (in view of \cref{}),
$R \to S$ is a quotient of a standard \'etale morphism 
\[ (R[X]/P)_h \twoheadrightarrow S  \]
with the kernel some ideal $I$. We may assume that the surjection is an
isomorphism modulo $\mathfrak{p}$, moreover.
By localizing $S$ enough\footnote{We are not assuming $S$ finite over $R$ here,}
we may suppose that $S$ is a \emph{flat} $R$-module as well.

Consider the exact sequence of $(R[X]/P)_h$-modules
\[ 0 \to I \to  (R[X]/P)_h/I \to S \to 0. \]

Let $\mathfrak{q}'$ be the image of $\mathfrak{q}$ in $\spec (R[X]/P)_h$.
We are going to show that the first term vanishes upon localization at
$\mathfrak{q}'$.
Since everything here is finitely generated, 
it will follow that after further localization by some element in
$(R[X]/P)_h - \mathfrak{q}'$, the first term will vanish. In particular, we
will then be done.

Everything here is a module over $(R[X]/P)_h$, and certainly a module over
$R$. Let us tensor everything over $R$ with
$R/\mathfrak{p}$; we find an exact sequence
\[  I \to  S/\mathfrak{p}S \to S/\mathfrak{p}S \to 0 ;\]
we have used the fact that the morphism $(R[X]/P)_h \to S$ was assumed to
induce an isomorphism modulo $\mathfrak{p}$.

However, by \'etaleness we assumed that $S$ was \emph{$R$-flat}, so we find that exactness holds at the left too. 
It follows that 
\[ I  = \mathfrak{p}I,  \]
so a fortiori
\[ I = \mathfrak{q}'I,  \]
which implies by Nakayama that $I_{\mathfrak{q}'} = 0$. Localizing at a
further element of $(R[X]/P)_h - \mathfrak{q}'$, we can assume that $I=0$;
after this localization, we find that $S$ looks \emph{precisely} a standard
\'etale algebra.
\end{proof} 

\subsection{Permanence properties of \'etale morphisms}
We shall now return to (more elementary) commutative algebra, and discuss the
properties that an \'etale extension $A \to B$ has. An \'etale extension is
not supposed to make $B$ differ too much from $A$, so we might expect some of
the same properties to be satisfied.

We might not necessarily expect global properties to be preserved
(geometrically, an open imbedding of schemes is \'etale, and that does
not necessarily preserve global properties), but local ones should be.

Thus the right definition for us will be the following:
\begin{definition} 
A morphism of local rings $(A, \mathfrak{m}_A) \to (B, \mathfrak{m}_B)$ is \textbf{local-unramified}
$\mathfrak{m}_A B$ is the maximal ideal of $B$ and $B/\mathfrak{m}_B$ is a
finite separable extension of $A/\mathfrak{m}_A$.

A morphism of local rings $A \to B$ is \textbf{local-\'etale} if it is flat
and local-unramified.
\end{definition} 



\begin{proposition}  \label{dimpreserved}
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a local-\'etale morphism of noetherian local
rings. Then $\dim R = \dim S$. 
\end{proposition} 
\begin{proof} 
Indeed, we know that $\mathfrak{m}S = \mathfrak{n}$ because $R \to S$ is
local-unramified.
Also $R/\mathfrak{m}\to S/\mathfrak{n}$ is a finite separable extension.
We have a natural morphism
\[ \mathfrak{m} \otimes_R S \to \mathfrak{n}  \]
which is injective (as the map $\mathfrak{m} \otimes_R S \to S$ is injective by
flatness) and consequently is an isomorphism.
More generally, $\mathfrak{m}^n \otimes_R S \simeq \mathfrak{n}^n$ for each $n$.
By flatness again, it follows that
\begin{equation} \label{thisiso} \mathfrak{m}^n/\mathfrak{m}^{n+1} \otimes_{R/\mathfrak{m}}
(S/\mathfrak{n}) =  \mathfrak{m}^n/\mathfrak{m}^{n+1} \otimes_R S \simeq
\mathfrak{n}^n/\mathfrak{n}^{n+1}. \end{equation}
Now if we take the dimensions of these vector spaces, we get polynomials in
$n$; these polynomials are the dimensions of $R, S$, respectively. It follows
that $\dim R = \dim S$.
\end{proof} 



\begin{proposition} \label{depthpreserved}
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a local-\'etale morphism of noetherian local
rings. 
Then $\depth R = \depth S$.
\end{proposition} 
\begin{proof} 
We know that a nonzerodivisor in $R$ maps to a nonzerodivisor in $S$. Thus by
an easy induction we reduce to the case where $\depth R = 0$. 
This means that $\mathfrak{m}$ is an associated prime of $R$; there is thus
some $x \in R$, nonzero (and necessarily a non-unit) such that the annihilator
of $x$ is all of $\mathfrak{m}$. Now $x$ is a nonzero element of $S$, too, as
the map $R \to S$ is an inclusion by flatness. 
It is then clear that $\mathfrak{n} = \mathfrak{m}S$ is the annilhilator of
$x$ in $S$, so $\mathfrak{n}$ is an associated prime of $S$ too.
\end{proof} 

\begin{corollary} 
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a local-\'etale morphism of noetherian local
rings. 
Then $R$ is regular (resp. Cohen-Macaulay) if and only if $S$ is.
\end{corollary} 
\begin{proof} 
The  results \cref{depthpreserved} and \cref{dimpreserved} immediately give
the result about Cohen-Macaulayness.
For regularity, we use \eqref{thisiso} with $n=1$ to see at once that the
embedding dimensions of $R$ and $S$ are the same.
\end{proof} 

Recall, however, that regularity of $S$ implies that of $R$ if we just assume
that $R \to S$ is \emph{flat} (by Serre's characterization of regular
local rings as those having finite global dimension).


We shall next show that reducedness is preserved
under \'etale extensions.
We shall need another hypothesis, though, that the map of local rings 
be essentially of finite type.
This will always be the case in situations of interest, when we are looking at
the map on local rings induced by a morphism of rings of finite type.

\begin{proposition} 
\label{reducedetale}
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a local-\'etale morphism of noetherian local
rings. 
Suppose $S$ is essentially of finite type over $R$.
Then $S$ is reduced if and only if $R$ is reduced.
\end{proposition} 
\begin{proof} 
As $R \to S$ is injective by (faithful) flatness, it suffices to show that if
$R$ is reduced, so is $S$.
Now there is an imbedding $R \to \prod_{\mathfrak{p} \ \mathrm{minimal}}
R/\mathfrak{p}$ of $R$ into a product of local domains. We get an imbedding of
$S$ into a product of local rings $\prod S/\mathfrak{p}S$.
Each $S/\mathfrak{p}S$ is essentially of finite type over $R/\mathfrak{p}$,
and local-\'etale over it too.

We are reduced to showing that each $S/\mathfrak{p}S$ is reduced. So we need
only show that a local-\'etale, essentially of finite type local ring over a
local noetherian domain is reduced. 

So suppose $A$ is a local noetherian domain, $B$ a 
local-\'etale, essentially of finite type local $A$-algebra.
We want to show that $B$ is reduced, and then we will be done. Now $A$ imbeds into its field of
fractions $K$; thus $B$ imbeds into $B \otimes_A K$. 
Then $B \otimes_A K$ is formally unramified over $K$ and is essentially of
finite type over $K$. This means that $B \otimes_A K$ is a product of fields
by the usual classification, and is in particular reduced. Thus $B$ was itself
reduced.
\end{proof} 


To motivate the proof that normality is preserved, though, we indicate another
proof of this fact, which does not even use the essentially of finite type
hypothesis.
Recall that a noetherian ring $A$ is reduced if and only if
for every prime $\mathfrak{p} \in \spec A$ of height zero,
$A_{\mathfrak{p}}$ is regular (i.e., a field), and for every 
prime $\mathfrak{p}$ of height $>0$, $R_{\mathfrak{p}}$ has depth
at least one. See \cref{reducedserrecrit}.

So suppose $R \to S$ is a local-\'etale and suppose $R$ is reduced.
We are going to apply the above criterion, together with the results already
proved, to show that $S$ is reduced.

Let $\mathfrak{q} \in \spec S$ be a minimal prime, whose image in 
$\spec R$ is $\mathfrak{p}$.
Then we have a morphism
\[ R_{\mathfrak{p}} \to S_{\mathfrak{q}}  \]
which is locally of finite type, flat, and indeed local-\'etale, as it is
formally unramified (as $R \to S$ was).
We know that $\dim R_{\mathfrak{p}}  = \dim S_{\mathfrak{q}}$
by \cref{dimpreserved}, and consequently 
since $R_{\mathfrak{p}}$ is regular, so is $S_{\mathfrak{q}}$.
Thus the localization of $S$ at any minimal prime is regular.

Next, if $\mathfrak{q} \in \spec S$ is such that $S_{\mathfrak{q}}$ has height
has positive dimension, then $R_{\mathfrak{p}} \to S_{\mathfrak{q}}$ (where
$\mathfrak{p}$ is as above) is local-\'etale and consequently $\dim
R_{\mathfrak{q}} = \dim S_{\mathfrak{q}} > 0$. 
Thus, 
$\depth R_{\mathfrak{p}} = \depth S_{\mathfrak{q}} >0$ because $R$ was reduced.
It follows that the above criterion is valid for $S$.


Recall that a noetherian ring is a \emph{normal} domain if it is integrally closed 
in its quotient field, and simply \emph{normal} if all its localizations are
normal domains; this equates to the ring being a product of normal domains.
We want to show that this is preserved under \'etaleness.
To do this, we shall use a criterion similar to that used at the end of the
last section.
We have the following important criterion for normality.

\begin{theorem*}[Serre] Let $A$ be a noetherian ring. Then $A$ is normal if
and only if for all $\mathfrak{p} \in \spec R$:
\begin{enumerate}
\item  If $\dim A_{\mathfrak{p}} \leq 1$, then $A_{\mathfrak{p}}$ is regular.
\item If $\dim A_{\mathfrak{p}} \geq 2$, then $\depth A_{\mathfrak{p}} \geq 2$.
\end{enumerate}
\end{theorem*} 
This is discussed in \cref{realserrecrit}.

From this, we will be able to prove without difficulty the next result.
\begin{proposition} \label{normalitypreserved}
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a local-\'etale morphism of noetherian local
rings. 
Suppose $S$ is essentially of finite type over $R$.
Then $S$ is normal if and only if $R$ is normal.
\end{proposition} 
\begin{proof} 
This is proved in the same manner as the result for reducedness was proved at
the end of the previous subsection.
For instance, suppose $R$ normal. Let $\mathfrak{q} \in \spec S$ be arbitrary,
contracting to $\mathfrak{p} \in \spec R$. If $\dim S_{\mathfrak{q}} \leq 1$,
then $\dim R_{\mathfrak{p}} \leq 1$ so that $R_{\mathfrak{p}}$, hence
$S_{\mathfrak{q}}$ is regular. If $\dim S_{\mathfrak{q}} \geq 2$, then $\dim
R_{\mathfrak{p}} \geq 2$, so 
$\depth S_{\mathfrak{q}} = \depth R_{\mathfrak{p}} \geq 2$.
\end{proof} 

We mention a harder result:

\begin{theorem} 
\label{injunrflat}
If $f:(R, \mathfrak{m}) \to (S, \mathfrak{n})$ is local-unramified, injective,
and essentially of finite type, with $R$ normal and noetherian, then $R \to S$ is
local-\'etale.
Thus, an injective unramified morphism of finite type between noetherian rings,
whose source is a normal domain, is \'etale.
\end{theorem} 

A priori, it is not obvious at all that $R \to S$ should be flat. In fact,
proving flatness directly seems to be difficult, and we will have to use the
local structure theory for \emph{unramified} morphisms together with nontrivial
facts about \'etale morphisms to establish this result.
\begin{proof} 
We essentially follow \cite{Mi67} in the proof.
Clearly, only the local statement needs to be proved.

We shall use the (non-elementary, relying on ZMT) structure theory of unramified morphisms, 
which implies that there is a factorization of $R \to S$ via
\[ (R, \mathfrak{m}) \stackrel{g}{\to} (T, \mathfrak{q}) \stackrel{h}{\to} (S, \mathfrak{n}),  \]
where all morphisms are local homomorphisms of local rings, $g: R \to T$ is
local-\'etale and essentially of finite type, and $h:T \to S$ is surjective.
This was established in \cref{}.

We are going to show that $h$ is an isomorphism, which will complete the proof.
Let $K$ be the quotient field of $R$.
Consider the diagram
\[ \xymatrix{
R \ar[d] \ar[r]^g &  T \ar[r]^h \ar[d]  &  S \ar[d] \\
K \ar[r]^{g \otimes 1} & T \otimes_R K \ar[r]^{h \otimes 1}&   S
\otimes_R K.
}\]
Now the strategy is to show that $h$ is injective.
We will prove this by chasing around the diagram.

Here $R \to S$ is formally unramified and essentially of finite type, so $K \to S
\otimes_R K$ is too, and $S \otimes_R K$ is in particular a finite product of
separable extensions of $K$. The claim is that it is nonzero; this follows
because $f: R \to S$ is injective, and $S \to S \otimes_R K$ is injective
because localization is exact. Consequently $R \to S \otimes_R K$ is injective,
and the target must be nonzero.

As a result, the surjective map $h \otimes 1: T \otimes_R K \to S \otimes_R K$
is nonzero. Now we claim that  $T \otimes_R K$ is a field. Indeed, it is an \'etale extension
of $K$ (by base-change), so it is a product of fields.  Moreover, $T$ is a
normal domain since $R$ is (by \cref{normalitypreserved}) and $R \to T$ is injective by flatness,
so the localization $T \otimes_R K$ is a domain as well.
Thus it must be a field. In particular, the map $h \otimes 1: T \otimes_R K \to
S \otimes_R K$ is a surjection from a field to a product of fields. It is thus
an \emph{isomorphism.}

Finally, we can show that $h$ is injective. Indeed, it suffices to show that
the composite $T \to T \otimes_R K \to S \otimes_R K$ is injective. But the
first map is injective as it is a map from a domain to a localization, and the
second is an isomorphism (as we have just seen). So $h$ is injective, hence an
isomorphism. Thus $T \simeq S$, and we are done.
\end{proof} 

Note that this \emph{fails} if the source is not normal.
\begin{example} 
Consider a nodal cubic $C$ given by $y^2 = x^2 (x-1)$ in $\mathbb{A}^2_k$ over an
algebraically closed field $k$. As is well-known, this curve is smooth except
at the origin. There is a map $\overline{C} \to C$ where $\overline{C}$ is
the normalization; this is a finite map, and a local isomorphism outside of
the origin. 

The claim is that $\overline{C} \to C$ is unramified but not \'etale. If it
were \'etale, then $C$ would be smooth since $\overline{C}$ is. So it is not
\'etale. We just need to see that it is unramified, and for this we need only
see that the map is unramified at the origin.

We may compute: the normalization of $C$ is given by $\overline{C} =
\mathbb{A}^1_k$, with the map
\[ t \mapsto (t^2+1, t (t^2 + 1)).  \]
Now the two points $\pm 1$ are both mapped to $0$.
We will show that
\[ \mathcal{O}_{C, 0} \to \mathcal{O}_{\mathbb{A}^1_k, 1}  \]
is local-unramified; the other case is similar.
Indeed, any line through the origin which is not a tangent direction will be
something in $\mathfrak{m}_{C, 0}$ that is mapped to a uniformizer in $
\mathcal{O}_{\mathbb{A}^1_k, 1}$.
For instance, the local function $x \in \mathcal{O}_{C,0}$ is mapped to 
the function $t \mapsto t^2 + 1$ on $\mathbb{A}^1_k$, which has a simple zero
at $1$ (or $-1$).
It follows that the maximal ideal $\mathfrak{m}_{C,0}$ generates the maximal
ideal of $\mathcal{O}_{\mathbb{A}^1_k, 1}$ (and similarly for $-1$).
\end{example} 

\subsection{Application to smooth morphisms}

We now want to show that the class of \'etale morphisms essentially determines
the class of smooth morphisms. Namely, we are going to show that 
smooth morphisms are those that look \'etale-locally like \'etale morphisms
followed by projection from affine space. (Here ``projection from affine
space'' is the geometric picture: in terms of commutative rings, this is the
embedding $A \hookrightarrow A[x_1, \dots, x_n]$.)

Here is the first goal:
\begin{theorem} 
Let $f: (A, \mathfrak{m}) \to (B, \mathfrak{n})$ be an essentially of finite
presentation, local morphism of local rings.
Then $f$ is formally smooth
if and only if there exists a factorization
\[ A \to C \to B  \]
where $(C, \mathfrak{q})$ is a localization of the polynomial ring $A[X_1,
\dots, X_n]$ at a prime ideal with $A \to C$ the natural embedding, and $C \to
B$ a formally \'etale morphism.
\end{theorem} 

For convenience, we have stated this result for local rings, but we can get a
more general criterion as well (see below). This states that smooth
morphisms, \'etale locally, look like the imbedding of a ring into a
polynomial ring.
In \cite{SGA1}, this is in fact how smooth morphisms are \emph{defined.}

\begin{proof} First assume $f$ smooth.
We know then that $\Omega_{B/A}$ is a finitely generated projective $B$-module,
hence free, say of rank $n$. 
There are $t_1, \dots, t_n \in B$ such that $\left\{dt_i\right\}$ forms a basis
for $\Omega_{B/A}$: namely, just choose a set of such elements that forms a
basis for $\Omega_{B/A} \otimes_B B/\mathfrak{n}$ (since these elements
generate $\Omega_{B/A}$).

Now these elements $\left\{t_i\right\}$ give a map of rings $A[X_1, \dots, X_n]
\to B$. We let $\mathfrak{q}$ be the pre-image of $\mathfrak{n}$ (so
$\mathfrak{n}$ contains the image of $\mathfrak{m} \subset A$), and take $C =
C = A[X_1,\dots, X_n]_{\mathfrak{q}}$. This gives local homomorphisms $A \to C,
C \to B$. We only need to check that $C \to B$ is \'etale. 
But the map
\[ \Omega_{C/A} \otimes_C B \to \Omega_{B/A}  \]
is an isomorphism, by construction. Since $C, B$ are both formally smooth over
$A$, we find that $C \to B$ is \'etale by the characterization of \'etaleness
via cotangent vectors
(\cref{etalecotangent}).

The other direction, that $f$ is formally smooth if it admits such a
factorization, is clear because the localization of a polynomial algebra is
formally smooth, and a formally \'etale map is clearly formally smooth.
\end{proof} 

\begin{corollary} 
Let $(R, \mathfrak{m}) \to (S, \mathfrak{n})$ be a formally smooth, essentially
of finite type morphism of noetherian rings. Then if $R$ is normal, so is $S$.
Ditto for reduced.
\end{corollary} 
\begin{proof} 

\end{proof} 

\subsection{Lifting under nilpotent extensions}

In this subsection, we consider the following question. Let $A$ be a ring, $I
\subset A$ an ideal of square zero, and let $A_0 = A/I$. Suppose $B_0$ is a
flat $A_0$-algebra (possibly satisfying other conditions).
Then, we ask if there exists a flat $A$-algebra $B$ such that $B_0 \simeq B
\otimes_A A_0 = B/IB$.
If there is, we say that $B$ can be \emph{lifted} along the nilpotent
thickening from $B_0$ to $B$---we think of $B$ as the mostly the same as $B_0$,
but with some additional ``fuzz'' (given by the additional nilpotents).

We are going to show that this can \emph{always} be done for \'etale
algebras, and that this always can be done \emph{locally} for smooth
algebras. As a result, we will get a very simple characterization of what
finite\'etale algebras over a complete (and later, henselian) local ring look like:
they are the same as \'etale extensions of the residue field (which we have
classified completely).

In algebraic geometry, one spectacular application of these ideas is
Grothendieck's proof in \cite{SGA1} that a smooth projective curve over a field
of characteristic $p$ can be ``lifted'' to characteristic zero. The idea is to
lift it successively along nilpotent thickenings of the base field, bit by bit
(for instance, $\mathbb{Z}/p^n \mathbb{Z}$ of $\mathbb{Z}/p\mathbb{Z}$),
by using the techniques of this subsection; then, he uses hard existence
results in formal geometry to show that this compatible system of nilpotent
thickenings comes from a curve over a DVR (e.g. the $p$-adic numbers). The
application in mind is the (partial) computation of the \'etale fundamental
group of a smooth projective curve over a field of positive characteristic.
We will only develop some of the more basic ideas in commutative algebra. 

Namely, here is the main result.
For a ring $A$, let $\et(A)$ denote the category of \'etale $A$-algebras (and
$A$-morphisms). Given $A \to A'$, there is  a natural functor $\et(A) \to
\et(A')$  given by base-change.
\begin{theorem} 
Let $A \to A_0$ be a surjective morphism whose kernel is nilpotent. Then
$\et(A) \to \et(A_0)$ is an equivalence of categories.
\end{theorem} 

$\spec A$ and $\spec A_0$ are identical topologically, so this result is
sometimes called the topological invariance of the \'etale site.
Let us sketch the idea before giving the proof. Full faithfulness is the easy
part, and is essentially a restatement of the nilpotent lifting property.
The essential surjectivity is the non-elementary part, and relies on the local
structure theory. Namely, we will show that a standard \'etale morphism can be
lifted (this is essentially trivial). Since an \'etale morphism is locally
standard \'etale, we can \emph{locally} lift an \'etale $A_0$-algebra to an
\'etale $A$-algebra. 
We next ``glue'' the local liftings using the full faithfulness.
\begin{proof} Without loss of generality, we can assume that the ideal defining
$A_0$ has square zero.
Let $B, B'$ be \'etale $A$-algebras. We need to show that
\[ \hom_A(B, B') = \hom_{A_0}(B_0, B_0'),  \]
where $B_0, B_0'$ denote the reductions to $A_0$ (i.e. the base change).
But $\hom_{A_0}(B_0, B_0') = \hom_{A}(B, B_0')$, and this is clearly the same
as $\hom_A(B, B')$ by the definition of an \'etale morphism. So full
faithfulness is automatic.

The trickier part is to show that any \'etale $A_0$-algebra can be lifted 
to an \'etale $A$-algebra.
First, note that  a standard \'etale $A_0$-algebra of the form
$(A_0[X]/(P(X))_{Q}$ can be lifted to $A$---just lift $P$ and $Q$. The condition
that it be standard \'etale is invertibility of $P'$, which is unaffected by
nilpotents.

Now the strategy is to glue these appropriately.
The details should be added at some point, but they are not. \add{details}
\end{proof} 



