\chapter{Completions}
\label{completions}

The algebraic version of completion is essentially analogous to the familiar
process of completing a metric space as in analysis, i.e. the process whereby $\mathbb{R}$ is constructed from
$\mathbb{Q}$. Here, however, the emphasis will be on how the algebraic properties and
structure pass to the completion. For instance, we will see that the
dimension is invariant under completion for noetherian local rings.


Completions are used in geometry and number theory in order to give a finer picture of local structure; for example, taking completions of rings allows for the recovery of a topology that looks more like the Euclidean topology as it has more open sets than the Zariski topology. Completions are also used in algebraic number theory to allow for the study of fields around a prime number (or prime ideal). 

\section{Introduction}

\subsection{Motivation}

Let $R$ be a commutative ring. Consider a maximal ideal $\mathfrak{m} \in \spec
R$. If one thinks of $\spec R$ as a space, and $R$ as a collection of functions
on that space, then $R_{\mathfrak{m}}$ is to be interpreted as the collection of ``germs'' of
functions defined near the point $\mathfrak{m}$. (In the language of schemes,
$R_{\mathfrak{m}}$ is the \emph{stalk} of the structure sheaf.)

However, the Zariski topology is coarse, making it difficult small neighborhoods of $\mathfrak{m}$.
Thus the word ``near'' is to be taken with a grain of salt. 

\begin{example} 
Let $X$ be a compact Riemann surface, and let $x \in X$. Let $R$ be the ring of
holomorphic functions on $X - \left\{x\right\}$ which are meromorphic at $x$.
In this case, $\spec R$ has the ideal $(0)$ and maximal ideals corresponding
to functions vanishing at some point in $X - \left\{x\right\}$. So $\spec R$ is $X -
\left\{x\right\}$ together with a ``generic'' point.

Let us just look at the closed points.  If we pick $y \in X - \left\{x\right\}$,
then we can consider the local ring $R_y = \left\{s^{-1}r, s(y) \neq
0\right\}$. This ring is a direct limit of the rings $\mathcal{O}(U)$ of holomorphic functions
on open sets $U$ that extend meromorphically to $X$. Here, however, $U$ ranges
only over open
subsets of $X$ containing $y$ that  are the nonzero loci of elements $R$. Thus $U$ really ranges over complements of
finite subsets. It does not range over open sets in the \emph{complex} topology.

Near $y$, $X$ looks like $\mathbb{C}$ in the \emph{complex} topology. In the Zariski topology, this
is not the case. Each localization $R_y$ actually remembers the whole Riemann
surface. Indeed, the  quotient field of $R_y$ is the rational function field of
$X$, which determines  $X$. Thus $R_y$ remembers too much, and it fails to
give a truly local picture near $y$. 
\end{example} 

We would like a variant of localization that would remember much less about the
global topology.

\subsection{Definition}

\begin{definition} \label{defcompletion}
Let $R$ be a commutative ring and $I \subset R$ an ideal. Then we define the
\textbf{completion of $R$ at $I$} as
\[ \hat{R}_I = \varprojlim R/I^n.  \]
By definition, this is the inverse limit of the quotients $R/I^n$, via the tower of
commutative rings
\[ \dots \to  R/I^3 \to R/I^2 \to R/I   \]
where each map is the natural reduction map. Note that $\hat{R}_I$ is
naturally an $R$-algebra. If the map $R \to \hat{R}_I$ is an isomorphism, then
$R$ is said to be \textbf{$I$-adically complete.}
\end{definition} 

In general, though, we can be more general. Suppose $R$ is a commutative ring
with a linear topology. Consider a neighborhood basis at the origin consisting
of ideals
$\left\{I_\alpha\right\}$. 

\begin{definition} 
The \textbf{completion} $\hat{R}$ of the topological ring $R$ is the inverse limit
$R$-algebra
\[ \varprojlim R/I_\alpha,  \]
where the maps $R/I_\alpha \to R/I_\beta$ for $I_\alpha \subset I_\beta$ are
the obvious ones. $\hat{R}$ is given a structure of a topological ring via the
inverse limit topology.

If the map $R \to \hat{R}$ is an isomorphism, then $R$ is said to be
\textbf{complete.}
\end{definition} 

The collection of ideals $\left\{I_\alpha\right\}$ is a directed set, so we
can talk about inverse limits over it. 
When we endow $R$ with the $I$-adic topology, we see that the above definition
is a generalization of \rref{defcompletion}.

\begin{exercise} 
Let $R$ be a linearly topologized ring. Then the map $R \to \hat{R}$ is injective if
and only if $\bigcap I_\alpha = 0$ for the $I_\alpha$ open ideals; that is, if
and only if $R$ is \emph{Hausdorff.}
\end{exercise} 

\begin{exercise} 
If $R/I_\alpha$ is finite for each open ideal $I_\alpha \subset R$, then
$\hat{R}$ is compact as a topological ring. (Hint: Tychonoff's theorem.)
\end{exercise} 

\add{Notation needs to be worked out for the completion}

The case of a local ring is particularly
important. Let $R$ be a local ring and $\mathfrak{m}$ its maximal ideal. Then
the completion of $R$ with respect to $\mathfrak{m}$, denoted $\hat{R}$, is the inverse limit 
$
\hat{R}=\lim_{\leftarrow}(R/\mathfrak{m}^nR)$.  We then topologize $\hat{R}$ by setting powers of $\mathfrak{m}$ to be basic open sets around $0$. The topology formed by these basic open sets is called the ``Krull'' or ``$\mathfrak{m}$-adic topology.''

In fact, the case of local rings is the most important one.
Usually, we will complete $R$ at \emph{maximal} ideals.
If we wanted to study $R$ near a prime $\mathfrak{p} \in \spec R$, we might
first replace $R$ by $R_{\mathfrak{p}}$, which is a local ring; we might
make another approximation to $R$ by completing $R_{\mathfrak{p}}$. Then we
get a \emph{complete} local ring.

\begin{definition} 
Let $R$ be a ring, $M$ an $R$-module, $I \subset R$ an ideal. We define the
\textbf{completion of $M$ at $I$} as 
\[ \hat{M}_I =  \varprojlim M/I^n M.  \]

This is an inverse limit of $R$-modules, so it is an $R$-module. Furthermore,
it is even an $\hat{R}_I$-module, as one easily checks. It is also functorial.
\end{definition} 

In fact, we get a functor 
\[ R-\mathrm{modules} \to \hat{R}_I - \mathrm{modules}.  \]


\subsection{Classical examples}
Let us give some examples.
\begin{example}
Recall that in algebraic number theory, a number field is a 
finite dimensional algebraic extension of $\mathbb{Q}$. 
Sitting inside of $\mathbb{Q}$ is the ring of integers, $\mathbb{Z}$. For any prime number $p\in \mathbb{Z}$, we can localize $\mathbb{Z}$ to the 
 prime ideal $(p)$ giving us a local ring $\mathbb{Z}_(p)$. 
 If we take the completion of this local ring we get the $p$-adic numbers $\mathbb{Q}_p$. Notice that since $\mathbb{Z}_(p)/p^n\cong\mathbb{Z}/p$, this is really the same as taking the inverse limit $\lim_{\leftarrow}\mathbb{Z}/p^n$.
\end{example}

\begin{example} 
Let $X$ be a Riemann surface. Let $ x \in X$ be as before, and let $R$ be as
before: the ring of meromorphic functions on $X$ with poles only at $x$. We can
complete $R$ at the ideal $\mathfrak{m}_y \subset R$ corresponding to $y \in X - \left\{x\right\}$. This
is always isomorphic to a power series ring
\[ \mathbb{C}[[t]]  \]
where $t$ is a holomorphic coordinate at $y$. 

The reason is that if one considers $R/\mathfrak{m}_y^n$, one always gets
$\mathbb{C}[t]/(t^n)$, where $t$ corresponds to a local coordinate at $y$. Thus
\emph{these} rings don't remember much about the Riemann surface. They're all
isomorphic, for instance. 
\end{example} 

\begin{remark} 
There is always a map $R \to \hat{R}_I$ by taking the limit of the maps $R/I^i$.
\end{remark} 

\subsection{Noetherianness and completions}

A priori, one might think this operation of completion gives  a big mess. The amazing thing is that for
noetherian rings, completion is surprisingly well-behaved.


\begin{proposition} 
Let $R$ be noetherian, $I \subset R$ an ideal. Then $\hat{R}_I$ is noetherian.
\end{proposition} 
\begin{proof} 
Choose generators $x_1, \dots, x_n \in I$. This can be done as $I$ is finitely generated
Consider a power series ring 
\[ R[[t_1, \dots, t_n]] ; \]
the claim is that there is a map $R[[t_1\dots t_n]] \to \hat{R}_I$ sending each
$t_i$ to $x_i  \in \hat{R}_I$. This is not trivial, since we aren't talking
about a polynomial ring, but a power series ring. 

To build this map, we  want a compatible family of maps
\[ R[[t_1, \dots, t_n]] \to R[t_1, \dots, t_n]/(t_1, \dots, t_n)^k  \to R/I^k.  \]
where the second ring is the polynomial ring where homogeneous
polynomials of degree $\geq k$ are killed. There is a map from $R[[t_1, \dots, t_n]]$ to
the second ring that kills monomials of degree $ \geq k$. The second map
$R[t_1, \dots, t_n]/(t_1, \dots, t_n)^k \to R/I^k$ sends $t_i \to x_i$ and is
obviously well-defined.

So we get the map
\[ \phi:  R[[t_1, \dots, t_n]] \to \hat{R}_I ,  \]
which I claim is surjective. Let us prove this. Suppose $a \in \hat{R}_I$. Then $a$ can be thought
of as a collection of elements $(a_k) \in R/I^k$ which are compatible with one
another.  We can lift each $a_k$ to some $\overline{a_k} \in R$ in a
compatible manner, such that
\[ \overline{a_{k+1}} = \overline{a_k} + b_k, \quad b_k \in I^k.  \]
Since $b_k \in I^k$, we can write it as
\[ b_k = f_k(x_1, \dots, x_n)  \]
for $f_k$ a polynomial in $R$ of degree $k$, by definition of the generators in
$I^k$. 

I claim now that 
\[ a = \phi\left( \sum f_k(t_1, \dots, t_n)  \right).  \]
The proof is just to check modulo $I^k$ for each $k$. This we  do by induction.
When one reduces modulo $I^k$, one gets $a_k$ (as one easily checks).

As we have seen, $\hat{R}_I$ is the quotient of a power series ring. In the
homework, it was seen that $R[[t_1, \dots, t_n]]$ is noetherian; this is a
variant of the Hilbert basis theorem proved in class. So $\hat{R}_I$ is
noetherian.
\end{proof} 


In fact, following \cite{Se65}, we shall sometimes find it convenient to note a generalization of the
above argument.

\begin{lemma} \label{grsurjective}
Suppose $A$ is a filtered ring, $M, N$ filtered $A$-modules and $\phi: M \to N$ a
morphism of filtered modules. Suppose $\gr(\phi)$ surjective and $M, N$
complete; then $\phi$ is surjective.
\end{lemma} 
\begin{proof} This will be a straightforward ``successive approximation''
argument. 
Indeed, let $\left\{M_n\right\}, \left\{N_n\right\}$ be the filtrations on $M,
N$. 
Suppose $n \in N$.
We know that there is $m_0 \in M$ such that
\[ n -  \phi(m_0) \in N_1  \]
since $M/M_1 \to N/N_1 $ is surjective. 
Similarly, we can choose $m_1 \in M_1$ such that 
\[ n - \phi(m_0) -  \phi(m_1)  \in M_2  \]
because $n - \phi(m_0) \in N_1$ and $M_1/M_2 \to N_1/N_2$ is surjective. We
inductively continue the sequence $m_2, m_3, \dots$ such that it tends to zero
rapidly; we then have that $n - \phi\left( \sum m_i \right) \in \bigcap N_i$,
so $n = \phi\left(\sum m_i\right)$ as $N$ is complete.
\end{proof} 



\begin{theorem} \label{grnoetherian}
Suppose $A$ is a filtered ring. Let $M$ be a filtered $A$-module, separated
with respect to its topology.
If $\gr(M)$ is noetherian over $\gr(A)$, then $M$ is a noetherian $A$-module. 
\end{theorem} 
\begin{proof}
If $N \subset M$, then we can obtain an induced filtration on $N$ such that
$\gr(N)$ is a submodule of $\gr(M)$. Since noetherianness equates to the
finite generation of each submodule, it suffices to show that if $\gr(M)$ is
finitely generated, so is $M$.

Suppose $\gr(M)$ is generated by homogeneous elements $\overline{e}_1, \dots,
\overline{e}_n$ of
degrees $d_1, \dots, d_n$, represented by elements $e_1, \dots, e_n \in M$. From this we can define a map
\[ A^n \to M  \]
sending the $i$th basis vector to $e_i$. This will induce a  surjection
$\gr(A^n) \to \gr(M)$. We will have to be careful, though, exactly how we
define the filtration on $A^n$, because the $d_i$ may have large degrees, and
if we are not careful, the map on $\gr$'s will be zero.

We choose the filtration such that at the $m$th level, we get the subgroup of
$A^n$ such that the $i$th coordinate is in $I_{n-d_i}$ (for
$\left\{I_n\right\}$ the filtration of $A$). It is then clear that the
associated map
\[ \gr(A^n ) \to \gr(M)  \]
has image containing each $\overline{e}_i$. Since $A^n$ is complete with
respect to this topology, we find that $A^n \to M$ is surjective by
\cref{grsurjective}.
This shows that $M$ is finitely generated and completes the proof.
\end{proof} 


\begin{corollary} \label{completenoetherian}
Suppose $A$ is a ring, complete with respect to the $I$-adic topology. If
$A/I$ is noetherian and $I/I^2$ a finitely generated $A$-module, then $A$ is
noetherian.
\end{corollary} 
\begin{proof} 
Indeed, we need to show that $\gr(A)$ is a noetherian ring (by
\cref{grnoetherian}). But this is the ring
\[ A/I \oplus I/I^2 \oplus I^2/I^3 \oplus \dots.  \]
It is easy to see that this is generated by $I/I^2$ as an $A/I$-algebra. By
Hilbert's basis theorem, this is noetherian under the conditions of the result.
\end{proof} 

\cref{completenoetherian} gives another means of showing that if a ring $A$ is
noetherian, then its completion $\hat{A}$ with respect to an ideal $I \subset A$ is
noetherian. For the algebra $\gr(A)$ (where $A$ is given the $I$-adic
topology) is noetherian because it is finitely generated over $A/I$. Moreover,
$\gr(\hat{A}) = \gr(A)$, so $\hat{A}$ is noetherian. 

\section{Exactness properties}

The principal result of this section is:
\begin{theorem} \label{completionisexact}
If $R$ is noetherian and $I \subset R$ an ideal, then the construction $M \to
\hat{M}_I$ is exact when restricted to finitely generated modules.
\end{theorem} 


Let's be more precise.  If $M$ is finitely generated, and 
\( 0 \to M' \to M \to M'' \to 0  \)
is an exact sequence,\footnote{The ends are finitely generated by noetherianness.} then
\[ 0 \to \hat{M'}_I \to \hat{M}_I \to \hat{M''}_I \to 0  \]
is also exact. 

We shall prove this theorem in several pieces.

\subsection{Generalities on inverse limits}
For a moment, let us step back and think about exact sequences of inverse
limits of abelian groups. Say we have a tower of exact sequences of abelian
groups
\[ 
\xymatrix{
0 \ar[r] &  \vdots \ar[d]  \ar[r] &  \vdots \ar[d]  \ar[r] & \vdots \ar[d]
\ar[r] &  0 \\
0 \ar[r] &  A_2 \ar[d]  \ar[r] &  B_2 \ar[d]  \ar[r] &  C_2 \ar[d]  \ar[r] &  0
\\
0 \ar[r] &  A_1 \ar[d]  \ar[r] &  B_1 \ar[d]  \ar[r] &  C_1 \ar[d]  \ar[r] &  0
\\
0 \ar[r] &  A_0 \ar[r] &  B_0 \ar[r] &  C_0 \ar[r] &  0
}.
\]
Then we get a sequence
\[ 0 \to \varprojlim A_n \to \varprojlim B_n \to \varprojlim C_n \to 0.  \]
In general, it is \emph{not} exact. But it is left-exact. 

\begin{proposition} 
Hypotheses as above, $ 0 \to \varprojlim A_n \to \varprojlim B_n \to
\varprojlim C_n$ is exact. 
\end{proposition} 
\begin{proof} 
It is obvious that $\phi \circ \psi = 0$. 

Let us first show that $\phi: \varprojlim A_n \to \varprojlim B_n$ is
injective. So suppose $a $ is in the projective limit, represented by a
compatible sequence of elements $(a_k )\in A_k$. If $\phi$ maps to zero, all
the $a_k$ go to zero in $B_k$. Injectivity of $A_k \to B_k$ implies that each
$a_k$ is zero. This implies $\phi$ is injective. 

Now let us show exactness at the next step. Let $\psi:  \varprojlim B_n \to
\varprojlim C_n$ and let $b = (b_k)$ be in $\ker \psi$. This means that each
$b_k$ gets killed when it maps to $C_k$. This means that each $b_k$ comes from
something in $a_k$. These $a_k$ are unique by injectivity of $A_k \to B_k$. It
follows that the $a_k$ have no choice but to be compatible. Thus $(a_k)$ maps
into $(b_k)$. So $b$ is in the image of $\phi$. 
\end{proof} 

So far, so good. We get some level of exactness. But the map on the end is not
necessarily surjective. Nonetheless:

\begin{proposition} 
$\psi: \varprojlim B_n \to \varprojlim C_n$ is surjective if each $A_{n+1} \to
A_n$ is surjective.
\end{proposition} 
\begin{proof} 
Say $c \in \varprojlim C_n$, represented by a compatible family $(c_k)$. We
have to show that there is a compatible family $(b_k) \in \varprojlim B_n$
which maps into $c$. It is easy to choose the $b_k$ \emph{individually} since
$B_k \to C_k$ is surjective. The problem is that a priori we may not get
something compatible.

We construct $b_k$ by induction on then, therefore. Assume that $b_k$ which
lifts $c_k$ has been constructed. 
We know that $c_k$ receives  a map from $c_{k+1}$. 
\[ \xymatrix{
& & c_{k+1 } \ar[d] \\
& b_k \ar[r] &  c_k
}.\]
Choose any $x \in B_{k+1}$ which maps to $c_{k+1}$. However, $x$ might not map
down to $b_k$, which would screw up the compatibility conditions. Next, we try to adjust $x$. 
Consider $x' \in B_k$ to be the image of $x$ under $B_{k+1} \to B_k$. We know
that $x' - b_k$ maps to zero in $C_k$, because $c_{k+1}$ maps to $c_k$.
So $x' - b_k$ comes from something in $A_k$, call it $a$. 
\[ \xymatrix{
& x \ar[r] &  c_{k+1 } \ar[d] \\
& b_k \ar[r] &  c_k
}.\]
But $a$ comes from some $\overline{a} \in A_{k+1}$. Then we define
\[ b_{k+1} = x - \overline{a},  \]
which adjustment doesn't change the fact that $b_{k+1}$ maps to $c_{k+1}$.
However, this adjustment makes $b_{k+1}$ compatible with $b_k$. Then we
construct the family $b_k$ by induction. We have seen surjectivity.
\end{proof} 

Now, let us study the exactness of completions.
\begin{proof}[Proof of \rref{completionisexact}]

Let us try to apply the general remarks above to studying the sequence 
\[ 0 \to \hat{M'}_I \to \hat{M}_I \to \hat{M''}_I \to 0.  \]
Now $\hat{M}_I = \varprojlim M/I^n$. We can construct  surjective maps
\[ M/I^n \twoheadrightarrow M''/I^n  \]
whose inverse limits lead to $\hat{M}_I \to \hat{M''}_I$. The image is
$M/(M' + I^n M)$. What is the kernel?
Well, it is $M' + I^n M/ I^n M$.  This is equivalently
\[ M'/M' \cap I^n M.  \]
So we get an exact sequence
\[ 0 \to M'/M' \cap I^n M \to M/I^n M \to M''/I^n M'' \to 0.  \]
By the above analysis of exactness of inverse limits, we get an exact sequence
\[ 0 \to \varprojlim M'/(I^n M \cap M') \to \hat{M}_I \to \hat{M''}_I \to 0.  \]
We of course have surjective maps $M'/I^n M' \to M'/(I^n M \cap M') $ though
these are generally not isomorphisms. Something ``divisible by $I^n$'' in $M$ but
in $M'$ is generally not divisible by $I^n$ in $M'$.
Anyway, we get a map
\[ \varprojlim M'/I^n M' \to \varprojlim M'/I^n M \cap M'  \]
where the individual maps are not necessarily isomorphisms. Nonetheless, I
claim that the map on inverse limits is an isomorphism. This will imply that
completion is indeed an exact functor.

But this follows because the filtrations $\left\{I^n M'\right\},
\left\{I^n M \cap M'\right\}$ are equivalent in view of the Artin-Rees lemma,
\cref{artinrees}.
\end{proof} 

Last time, we were talking about completions. We showed that if $R$ is
noetherian and $I \subset R$ an ideal, an exact sequence
\[ 0 \to M' \to M \to M \to 0   \]
of finitely generated $R$-modules leads to a sequence
\[ 0 \to \hat{M'}_I \to \hat{M}_I \to \hat{M;}_I \to 0  \]
which is also exact. We showed this using the Artin-Rees lemma.

\begin{remark}
In particular, for finitely generated modules over a noetherian ring, completion is an \textbf{exact functor}: if $A \to B \to C$ is
exact, so is the sequence of completions. This can be seen by drawing in
kernels and cokernels, and using the fact that completions preserve short
exact sequences. 
\end{remark}

\subsection{Completions and flatness}

Suppose that $M$ is a finitely generated $R$-module. Then there is a surjection $R^n
\twoheadrightarrow M$, whose kernel is also finitely generated as $R$ is
noetherian. It follows that
$M$ is finitely presented. In particular, there is a sequence
\[ R^m \to R^n \to M \to 0.  \]
We get an exact sequence
\[ \hat{R}^m \to \hat{R}^n \to \hat{M} \to 0  \]
where the second map is just multiplication by the same $m$-by-$n$ matrix as in
the first case.

\begin{corollary} 
If $M$ is finitely generated and $R$ noetherian, there is a canonical isomorphism
\[ \hat{M}_I \simeq M \otimes_R \hat{R}_I.  \]
\end{corollary} 

\begin{proof} 
We know that there is a map $M \to \hat{M}_I$, so the canonical morphism
$\phi_M: M \otimes_R \hat{R}_{I} \to \hat{M}_I$ exists
(because this induces a map from $M \otimes_R \hat{R}_I$). We
need to check that it is an isomorphism. 

If there is an exact sequence $M' \to M \to M'' \to 0$, there is a commutative
diagram
\[ \xymatrix{
M' \otimes_R \hat{R}_I \ar[d]^{\phi_{M'}}  \ar[r] & M \otimes_R \hat{R}_I
\ar[d]^{\phi_M}  \ar[r] &
M'' \otimes_R \hat{R}_I \ar[d] \ar[r] &  0 \\
\hat{M'}_I \ar[r] &  \hat{M}_I \ar[r] &  \hat{M''}_I \ar[r] &  0
}.\]
Exactness of completion and right-exactness of $\otimes$ implies that this
diagram is exact. It follows that if $\phi_M, \phi_{M'}$ are isomorphisms, so
is $\phi_{M''}$. 

But any $M''$ appears at the end of such a sequence with $M', M$ are free by
the finite presentation argument above. So it suffices to prove $\phi$ an
isomorphism for finite frees, which reduces to the case of $\phi_R$ an
isomorphism. That is obvious. 
\end{proof} 

\begin{corollary} 
If $R$ is noetherian, then $\hat{R}_I$ is a flat $R$-module.
\end{corollary} 
\begin{proof} 
Indeed, tensoring with $\hat{R}_I$ is exact (because it is completion, and
completion is exact) on the category of finitely generated $R$-modules.
Exactness on the category of all $R$-modules follows by taking direct limits,
since every module is a direct limit of finitely generated modules, and
direct limits preserve exactness. 
\end{proof} 


\begin{remark} 
Warning: $\hat{M}_I$ is, in general, not $M \otimes_R \hat{R}_I$ when $M$ is
not finitely generated. One example to think about is $M  = \mathbb{Z}[t]$,
$R = \mathbb{Z}$. The
completion of $M$ at $I = (p)$ is the completion of $\mathbb{Z}[t]$ at $p
\mathbb{Z}[t]$, which contains elements like
\[ 1 + pt + p^2 t^2 + \dots,  \]
which belong to the completion but not to $\hat{R}_I \otimes M = \mathbb{Z}_p
[t]$. 
\end{remark} 

\begin{remark} 
By the Krull intersection theorem, if $R$ is a local noetherian ring, then the
map from $R \to \hat{R}$ is an injection.
\end{remark} 


\section{Hensel's lemma} One thing that you might be interested in doing is solving
Diophantine equations. Say $R = \mathbb{Z}$; you want to find solutions to a
polynomial $f(X) \in \mathbb{Z}[X]$. Generally, it is very hard to find
solutions. However, there are easy tests you can do that will tell you if there
are no solutions. For instance, reduce mod a prime. One way you can prove that
there are no solutions is to show that there are no solutions mod 2. 

But there might be solutions mod 2 and yet you might not be sure about
solutions in $\mathbb{Z}$. So you might try mod 4, mod 8, and so on---you get a
whole tower of problems to consider. If you manage to solve all these equations, you can solve the equations in the 2-adic integers $\mathbb{Z}_2 =
\hat{\mathbb{Z}}_{(2)}$.
But the Krull intersection theorem implies that $\mathbb{Z} \to \mathbb{Z}_2$
is injective. So if you expected that there was a unique solution in
$\mathbb{Z}$, you might try looking at the solutions in $\mathbb{Z}_2$ to be
the solutions in $\mathbb{Z}$.



The moral is that solving an equation over $\mathbb{Z}_2$ is intermediate in
difficulty between $\mathbb{Z}/2$ and $\mathbb{Z}$. Nonetheless, it turns out
that solving an equation mod $\mathbb{Z}/2$ is very close to solving it over
$\mathbb{Z}_2$, thanks to Hensel's lemma.

\subsection{The result}

\begin{theorem}[Hensel's Lemma]
Let $R$ be a noetherian ring, $I \subset R$ an ideal. Let $f(X) \in R[X]$ be a
polynomial such that the equation $f(X)=0$ has a solution $ a \in R/I$.
Suppose, moreover, that $f'(a)$ is invertible in $R/I$. 

Then $a$ lifts uniquely to a solution of the equation $f(X) = 0$ in $\hat{R}_I$.
\end{theorem} 

\begin{example} 
Let $R = \mathbb{Z}, I = (5)$. Consider the equation $f(x) = x^2 + 1 = 0$ in $R$. This
has a solution modulo five, namely $2$. Then $f'(2) = 4$ is invertible in
$\mathbb{Z}/5$. So the equation $x^2 + 1 = 0$ has a solution in $\mathbb{Z}_5$.
In other words, $\sqrt{-1} \in \mathbb{Z}_5$.
\end{example} 

Let's prove Hensel's lemma.
\begin{proof} 
Now we have $a \in R/I$ such that $f(a) = 0 \in R/I$ and $f'(a)$ is invertible. 
The claim is going to be that for each $m \geq 1$, there is a \emph{unique}
element $a_n \in R/I^n$ such that
\[ a_n \to a \ (I), \quad f(a_n)  = 0 \in R/I^n.  \]
Uniqueness implies that this sequence $(a_n)$ is compatible, and thus gives the
required element of the completion.
It will be a solution of $f(X) = 0$ since it is a solution at each element of
the tower.

Let us now prove the claim.
For $n=1$, $a_1 = a$ necessarily. 
The proof is induction on $n$. Assume that $a_n$ exists and is unique. We would like to show
that $a_{n+1}$ exists and is unique. Well, if it is going to exist, when we
reduce $a_{n+1}$ modulo $I^n$, we must get $a_n$ or uniqueness at the $n$-th
step would fail. 

So let $\overline{a}$ be any lifting of $a_n$ to $R/I^{n+1}$.  Then $a_{n+1}$
is going to be that lifting plus some $\epsilon \in I^n/I^{n+1}$. We want
\[ f(\overline{a} + \epsilon) = 0 \in R/I^{n+1}.  \]
But this is 
\[ f(\overline{a}) +  \epsilon f'(\overline{a})  \]
because $\epsilon^2 = 0 \in R/I^{n+1}$. However, this lets us solve for
$\epsilon$, because then necessarily $\epsilon =
\frac{-f(\overline{a})}{f'(\overline{a})} \in I^n$.
Note that $f'(\overline{a}) \in R/I^{n+1}$ is invertible. If you believe this
for a moment, then we have seen that $\epsilon$ exists and is unique; note
that $\epsilon \in I^n$ because $f(\overline{a}) \in I^n$. 


\begin{lemma} 
$f'(\overline{a}) \in R/I^{n+1}$ is invertible.
\end{lemma} 
\begin{proof} 
If we reduce this modulo $R/I$, we get the invertible element $f'(a) \in R/I$.
Note also that the $I/I^{n+1}$ is a nilpotent ideal in $R/I^{n+1}$. So we are
reduced to showing, more generally:

\begin{lemma} 
Let $A$ be a ring,\footnote{E.g. $R/I^{n+1}$.} $J$ a nilpotent
ideal.\footnote{E.g. $J = I/I^{n+1}$.} Then an element $x \in A$ is invertible
if and only if its reduction in $A/J$ is invertible.
\end{lemma} 
\begin{proof} 
One direction is obvious. For the converse, say $x \in A$  has an invertible
image. This implies that there is $y \in A$ such that $xy \equiv 1 \mod J$. Say
$$xy = 1+m,$$ where $m \in J$. But $1+m$ is invertible because 
\[ \frac{1}{1+m} = 1 - m + m^2 \pm \dots.  \]
The expression makes sense as the high powers of $m$ are zero. 
So this means that $y(1+m)^{-1}$ is the inverse to $x$. 
\end{proof} 
\end{proof} 
\end{proof} 

This was one of many versions of Hensel's lemma. There are many ways you can
improve on a statement. The above version says something about
``nondegenerate'' cases, where the derivative is invertible. There are better
versions which handle degenerate cases.

\begin{example} 
Consider $x^2 - 1$; let's try to solve this in $\mathbb{Z}_2$. Well,
$\mathbb{Z}_2$ is a domain, so the only solutions can be $\pm 1$. But these
have the same reduction in $\mathbb{Z}/2$. The lifting of the solution is
non-unique.

The reason why Hensel's lemma fails is that $f'(\pm 1) = \pm 2$ is not
invertible in $\mathbb{Z}/2$. But it is not far off. If you go to
$\mathbb{Z}/4$, we do get two solutions, and the derivative is at least nonzero
at those places.
\end{example} 

One possible extension of Hensel's lemma is to allow the derivative to be
noninvertible, but at least to bound the degree to which it is noninvertible.
From this you can get interesting information. 
But then you may have to look at equations $R/I^n$ instead of just $R/I$, where
$n$ depends on the level of noninvertibility.

Let us describe the multivariable Hensel lemma.

\begin{theorem} 
Let $f_1, \dots, f_n$ be polynomials in $n$ variables over the ring $R$. Let
$J$ be the Jacobian matrix $( \frac{\partial f_i}{\partial x_j})$. Suppose
$\Delta = \det J \in R[x_1, \dots, x_n]$. 

If the system $\left\{f_i(x) = 0\right\}$ has a solution $a \in (R/I)^n$ in $R/I$ for some
ideal $I$ satisfying the condition that $\Delta(a)$ is invertible, then there
is a unique solution of $\left\{f_i(x) =0\right\}$ in $\hat{R}_I^n$ which lifts $a$. 
\end{theorem} 
The proof is the same idea: successive approximation, using the invertibility
of $\Delta$. 

\subsection{The classification of complete DVRs (characteristic zero)}
Let $R$ be a complete DVR with maximal ideal $\mathfrak{m}$ and quotient field
$F$.  We let $k:=R/\mathfrak{m}$; this is the \textbf{residue field} and is,
e.g., the integers mod $p$ for the $p$-adic integers.

The main result that we shall prove is the following:
\begin{theorem} Suppose $k$ is of characteristic zero.  Then $R \simeq k[[X]]$, the power series ring in one variable, with respect to the usual discrete valuation on $k[[X]]$.
\end{theorem}

The ``usual discrete valuation'' on the power series ring is the order at zero.  Incidentally, this applies to the (non-complete) subring of $\mathbb{C}[[X]]$ consisting of power series that converge in some neighborhood of zero, which is the ring of germs of holomorphic functions at zero; the valuation again measures the zero at $z=0$. 


To prove it (following \cite{Se79}), we need to introduce another concept.  A \textbf{system of representatives} is a set $S  \subset R$ such that the reduction map $S \to k$ is bijective.  A \textbf{uniformizer} is a generator of the maximal ideal $\mathfrak{m}$.  Then:

\begin{proposition} If $S$ is a system of representatives and $\pi$ a uniformizer, we can write each $x \in R$ uniquely as
\[ x=  \sum_{i=0}^\infty s_i \pi^i, \quad \mathrm{where} \ s_i \in S.\]
\end{proposition}
\begin{proof} 
Given $x$, we can find by the definitions $s_0 \in S$ with $x-s_0 \in \pi R$.  Repeating, we can write ${x-s_0}\ {\pi} \in R$ as ${x-s_0}\ {\pi} - s_1 \in \pi R$, or $x - s_0 - s_1 \pi \in \pi^2 R$.  Repeat the process inductively and note that the differences $x - \sum_{i=0}^{n} s_i \pi^i \in \pi^{n+1}R$ tend to zero.

In the $p$-adic numbers, we can take $\{0, \dots, p-1\}$ as a system of representatives, so we find each $p$-adic integer has a unique $p$-adic expansion $x = \sum_{i=0}^\infty x_i p^i$ for $x_i \in \{0, \dots, p-1\}$.
\end{proof} 

We now prove the first theorem.

\begin{proof} 
Note that $\mathbb{Z}-0 \subset R$ gets sent to nonzero elements in the residue field $k$, which is of characteristic zero.  This means that $\mathbb{Z}-0 \subset R$ consists of units, so $\mathbb{Q} \subset R$.

Let $L \subset R$ be a subfield.  Then $L \simeq \overline{L} \subset k$; if $t \in k - \overline{ L}$, I claim that there is $L' \supset R$ containing $L$ with $t \in \overline{L'}$.

If $t$ is transcendental, lift it to $T \in R$; then $T$ is transcendental over $L$ and is invertible in $R$, so we can take $L' := L(T)$.

If the minimal polynomial of $t$ over $\overline{L}$ is $\overline{f}(X) \in k[X]$, we have $\overline{f}(t) = 0$.  Moreover, $\overline{f}'(t) \neq 0$ because these fields are of characteristic zero and all extensions are separable.
So lift $\overline{f}(X)$ to $f(X) \in R[X]$; by Hensel lift $t$ to $u \in R$ with $f(u) = 0$.  Then $f$ is irreducible in $L[X]$ (otherwise we could reduce a factoring to get one of $\overline{f} \in \overline{L}[X]$), so $L[u] = L[X]/(f(X))$, which is a field $L'$.

So if $K \subset R$ is the maximal subfield (use Zorn's lemma), this is our system of representatives by the above argument.
\end{proof} 


\section{Henselian rings}



There is a substitute for completeness that captures the essential
properties: Henselianness. A ring is Henselian if it satisfies
Hensel's lemma, more or less. We mostly follow \cite{Ra70} in the treatment.

\subsection{Semilocal rings}

To start with, we shall need a few preliminaries on semi-local rings.

Fix a local ring $A$ with maximal ideal $\mathfrak{m} \subset A$.
Fix a finite $A$-algebra $B$; by definition, $B $ is a finitely
generated $A$-module.

\begin{proposition} 
Hypotheses as above, the maximal ideals of $B$ are in bijection with
the prime ideals of $B $ containing $\mathfrak{m} B$, or equivalently
the prime ideals of $\overline{B} = B \otimes_A A/\mathfrak{m}$.
\end{proposition}

\begin{proof} 
We have to show that every maximal ideal of $B$ contains $\mathfrak{m}
B$. Suppose $\mathfrak{n} \subset B$ was maximal and was otherwise.
Then by Nakayama's lemma, $\mathfrak{n} + \mathfrak{m} B \neq B$ is a
proper ideal strictly containing $\mathfrak{n}$; this contradicts
maximality.

It is now clear that the maximal ideals of $B$ are in bijection
naturally with those of $\overline{B}$. 
However, $\overline{B}$ is an artinian ring, as it is finite over the
field $A/\mathfrak{m}$, so every prime ideal in it is maximal.
\end{proof}



The next thing to observe is that $\overline{B}$, as an artinian ring,
decomposes  as a product of local artinian rings.
In fact, this decomposition is unique.
However, this does not mean that $B$ itself 
is a product of local rings ($B$ is not necessarily artinian).
Nonetheless, if such a splitting exists, it is necessarily unique.

\begin{proposition} 
Suppose $R = \prod R_i$ is a finite product of local rings $R_i$. Then
the $R_i$ are unique.
\end{proposition}
\begin{proof} 
To give a decomposition $R = \prod R_i$ is equivalent to giving
idempotents $e_i$. If we had another decomposition $R = \prod S_j$,
then we would have new idempotents $f_j$. The image of each $f_j$ in
each $R_i$ is either zero or one as a local ring has no nontrivial
idempotents. From this, one can easily deduce that the $f_j$'s are
sums of the $e_i$'s, and if the $S_j$ are local, one sees that the
$S_j$'s are just the $R_i$'s permuted. 
\end{proof}

In fact, there is a canonical way of determining the factors $R_i$. 
A finite product of local rings as above is \textit{semi-local}; 
the maximal ideals $\mathfrak{m_i}$ are finite in number, and, furthermore, the
canonical map
\[ R \to \prod R_{\mathfrak{m_i}} \]
is an isomorphism.


In general, this splitting \textbf{fails} for semi-local rings, and in
particular for rings finite over a local ring.
We have seen that this splitting nonetheless works for rings finite
over a field.


To recapitulate, we can give a criterion for when a semi-local ring splits as
above.
\begin{proposition} \label{whatissplitting}
Let $R$ be a semilocal ring with maximal ideals $\mathfrak{m}_1, \dots,
\mathfrak{m}_k$. Then $R$ splits into local factors if and only if, for each
$i$, there is an idempotent $e_i \in \bigcap_{j \neq i} \mathfrak{m}_j -
\mathfrak{m}_i$. Then the rings $Re_i$ are local and $R = \prod Re_i$.
\end{proposition} 
\begin{proof} 
If $R$ splits into local factors, then clearly we can find such idempotents.
Conversely, suppose given the $e_i$.
Then for each $i \neq j$, $e_i e_j$ is an idempotent  $e_{ij}$ that belongs to all the
maximal ideals $\mathfrak{m}_k$. So it is in the Jacobson radical. But then $1 -
e_{ij}$ is invertible, so $e_{ij}(1-e_{ij})=0$ implies that $e_{ij} = 0$. 

It follows that the $\left\{e_i\right\}$ are \emph{orthogonal} idempotents. To
see that $R = \prod Re_i$ as rings, we now need only to see that the
$\left\{e_i\right\}$ form a \emph{complete} set; that is, $\sum e_i = 1$. But
the sum $\sum e_i$ is an idempotent itself since the $e_i$ are mutually
orthogonal. Moreover, the sum $\sum e_i$ belongs to no $\mathfrak{m}_i$, so it
is invertible, thus equal to $1$. The claim is now clear, since each $Re_i$ is
local by assumption.
\end{proof} 

Note that if we can decompose a semilocal ring into a product of local rings,
then we can go no further in a sense---it is easy to check that a local ring has
no nontrivial idempotents. 

\subsection{Henselian rings}

\begin{definition}
A local ring $(R, \mathfrak{m})$ is \textbf{henselian} if every finite
$R$-algebra is a product of local $R$-algebras.
\end{definition}


It is clear from the remarks of the previous section that the 
decomposition as a product of local algebras is unique.
Furthermore, we have already seen:

\begin{proposition} 
A field is henselian. 
\end{proposition}
\begin{proof} 
Indeed, then any finite algebra over a field is artinian (as a
finite-dimensional vector space).
\end{proof} 

This result was essentially a corollary of basic facts about artinian
rings. In general, though, henselian rings are very far from artinian. For
instance, we will see that every \emph{complete} local ring is henselian.

We continue with a couple of further easy claims. 
\begin{proposition}  \label{finitehenselian}
A local ring that is finite over a henselian ring is henselian. 
\end{proposition} 
\begin{proof} 
Indeed, if $R$ is a henselian local ring and $S$ a finite $R$-algebra, then
every finite $S$-algebra is a finite $R$-algebra, and thus splits into a product
of local rings.
\end{proof} 

We have seen that henselianness of a local ring $(R, \mathfrak{m})$ with residue
field $k$ is equivalent to the condition that every finite $R$-algebra $S$ splits
into a product of local rings. Since $S \otimes_R k$ always splits into a
product of local rings, and this splitting is unique, we see that if a splitting
of $S$ exists, it necessarily lifts the splitting of $S \otimes_R k$. 

Since a ``splitting'' is the same thing (by \cref{whatissplitting}) as a
complete collection of idempotents, one for each maximal ideal, we are going to
characterize henselian rings by the property that one can lift idempotents from
the residue ring.

\begin{definition}
A local ring $(R, \mathfrak{m})$ \textbf{satisfies lifting
  idempotents} if for every finite $R$-algebra $S$, the canonical
(reduction) map
between idempotents of $S$ and those of $S/\mathfrak{m}S$ is surjective.
\end{definition}

Recall that there is a functor $\idem$ from rings to sets that sends each ring
to its collection of idempotents. So the claim is that the natural map $\idem(S)
\to \idem(S/\mathfrak{m}S)$ is a surjection.

In fact, in this case, we shall see that the map $\idem(S) \to
\idem(S/\mathfrak{m}S)$ is even injective.
\begin{proposition} 
The map from idempotents of $S$ to those of $S/\mathfrak{m} S$ is
always injective.
\end{proposition}
We shall not even use the fact that $S$ is a finite $R$-algebra here.

\begin{proof} 
Suppose $e, e' \in S$ are  idempotents whose images in $S/\mathfrak{m}S$ are the
same. Then 
\[ (e-e')^3 = e^3 -3e^2 e' + 3e'^2 e- e'^3 = e^3 - e'^3 = e - e. \]
Thus if we let $x = e - e'$, we have $x^3 - x =0$, and $x $ belongs to
$\mathfrak{m}S$. Thus
\[ x(1-x^2) = 0,  \]
and $1-x^2$ is invertible in $S$ (because $x^2$ belongs to the Jacobson radical
of $S$). Thus $x =0 $ and $e = e'$.
\end{proof}


With this, we now want a characterization of henselian rings in terms of the
lifting idempotents property.

\begin{proposition} \label{orthogonallifts}
Suppose $(R, \mathfrak{m})$ satisfies lifting idempotents, and let $S$ be a
finite $R$-algebra. Then given
orthogonal idempotents $\overline{e}_1, \dots, \overline{e}_n$ of $S/\mathfrak{m}S$, there are
mutually orthogonal lifts $\left\{e_i\right\} \in S$. 
\end{proposition} 

The point is that we can make the lifts mutually orthogonal. (Recall that
idempotents are \emph{orthogonal} if their product is zero.)
\begin{proof} 
Indeed, by assumption we can get lifts $\left\{e_i\right\}$ which are
idempotent; we need to show that they are mutually orthogonal. But in any case
$e_i e_j$ for $i \neq j$ is an idempotent, which lies in 
$\mathfrak{m}S \subset S$ and thus in the Jacobson radical. It follows that
$e_i e_j = 0$, proving the orthogonality.
\end{proof} 

\begin{proposition} 
A local ring is henselian if and only if it satisfies lifting idempotents. 
\end{proposition}
\begin{proof} 
Suppose first $(R, \mathfrak{m} )$ satisfies lifting idempotents. 
Let $S$ be any finite $R$-algebra. Then $S/\mathfrak{m}S$ is artinian,
so factors as a product of local artinian rings $\prod \overline{S}_i$. This
factorization corresponds to idempotents $\overline{e}_i \in
S/\mathfrak{m}S$.
We can lift these to orthogonal idempotents $e_i \in S$ by
\cref{orthogonallifts}. 
These idempotents correspond to a decomposition 
\[ S = \prod S_i  \]
which lifts the decomposition $\overline{S} = \prod \overline{S}_i$. Since the
$\overline{S_i}$ are local, so are the $S_i$.
Thus $R$ is henselian.

Conversely, suppose $R$ henselian. 
Let $S$ be a finite $R$-algebra and let $\overline{e} \in \overline{S} =
S/\mathfrak{m}S$ be idempotent. Since $\overline{S}$ is a product of local
rings, $\overline{e}$ is a finite sum of the primitive idempotents in
$\overline{S}$. By henselianness, each of these primitive idempotents lifts to
$S$, so $\overline{e}$ does too.
\end{proof}


\begin{proposition} 
Let $R$ be a local ring and $I \subset R$ an ideal consisting of nilpotent
elements. Then $R$ is henselian if and only if
$R/I$ is.
\end{proposition} 
\begin{proof} One direction is clear by \cref{finitehenselian}. For the other,
suppose $R/I$ is henselian. Let $\mathfrak{m} \subset R$ be the maximal ideal.
Let $S$ be any finite $R$-algebra; we have to show surjectivity of 
\[ \idem(S) \to \idem(S/\mathfrak{m}S).  \]
However, we are given that, by henselianness of $S/I$,
\[ \idem(S/IS ) \to \idem(S/\mathfrak{m}S)  \]
is a surjection. Now we need only observe that $\idem(S) \to \idem(S/IS)$ is a 
bijection. This follows because idempotents in $S$ (resp. $S/IS$) correspond
to disconnections of $\spec S$ (resp. $\spec S/IS$) by \cref{}. However, as
$I$ consists of nilpotents, $\spec S$ and $\spec S/IS$ are homeomorphic
naturally.
\end{proof} 

\subsection{Hensel's lemma}

We now want to show that Hensel's lemma is essentially what characterizes
henselian rings, which explains the name.
Throughout, we use the $\overline{}$ symbol to denote reduction mod an ideal
(usually $\mathfrak{m}$ or $\mathfrak{m}$ times another ring).

\begin{proposition}  \label{factorcriterion}
Let $(R, \mathfrak{m})$ be a local ring with residue field $k$. Then $R$ is henselian if and only if,
whenever a monic polynomial $P \in R[X]$ satisfies
\[ \overline{P} = \overline{Q}\overline{R} \in k[X], \]
for some relatively prime polynomials $\overline{Q}, \overline{R} \in k[X]$,
then the factorization lifts to a factorization 
\[ P = QR \in R[X].  \]
\end{proposition} 
\textbf{This notation should be improved.}
\begin{proof} 
Suppose $R$ henselian and suppose $P$ is a polynomial whose reduction admits
such a factorization.
Consider the finite $R$-algebra
\( S = R[X]/(P);  \)
since $\overline{S } = S/\mathfrak{m}S $ can be represented as
$k[X]/(\overline{P})$, it admits a splitting into components
\[ \overline{S} = k[X]/(\overline{Q}) \times k[X]/(\overline{R}).  \]
Since $R$ is henselian, this splitting lifts to $S$, and we get a splitting
\[ S = S_1 \times S_2.  \]
Here $S_1 \otimes k \simeq k[X]/(\overline{Q})$ and $S_2 \otimes k \simeq
k[X]/(\overline{R})$. 
The image of $X$ in $S_1 \otimes k$ is annihilated by $\overline{Q}$, and the
image of $X$ in $S_2 \otimes k$ is annihilated by $\overline{R}$.

\begin{lemma} 
Suppose $R$ is a local ring, $S$ a finite $R$-algebra generated
by an element $x \in S$. Suppose the image $\overline{x} \in \overline{S}=S
\otimes_R
k$ satisfies a monic polynomial equation $u(\overline{x}) = 0$. Then
there is a monic polynomial $U$ lifting $u$ such that $U(x) = 0$ (in $S$). \end{lemma} 
\begin{proof} 
Let $\overline{x} \in \overline{S}$ be the generating element that satisfies
$u(\overline{x})=0$, and let $x \in S$ be a lift of it.  Suppose $u$ has
rank $n$. Then $1, x, \dots,
x^{n-1}$ spans $S$ by Nakayama's lemma. Thus there is a monic polynomial $U$ of
degree $n$ that annihilates $x$; the reduction must be a multiple of $u$,
hence $u$.\end{proof}


Returning to the proposition, we see that the image of the generator $X$ in $S_1, S_2$ 
must satisfy polynomial equations $Q, R$ that lift $\overline{Q},
\overline{R}$. Thus $X$ satisfies $QR$ in $S[X]/(P)$; in other words, $QR$ is a
multiple of $P$, hence equal to $P$. Thus we have lifted the factorization
$\overline{P} = \overline{Q} \overline{R}$.
This proves that factorizations can be lifted.

Now, let us suppose that factorizations can always be lifted for finite
$R$-algebras. We are now going
to show that $R$ satisfies lifting idempotents. 
Suppose $S$ is a finite $R$-algebra, $\overline{e}$ a primitive idempotent in
$\overline{S}$. 
We can lift $\overline{e}$ to some element $e' \in S$. Since $e'$ is contained
in a finite $R$-algebra that contains $R$, we know that $e'$ is \emph{integral} over $R$, 
so that we can find a map $R[X]/(P) \to S$ sending the generator $X \mapsto
e'$, for some polynomial $P$.
We are going to use the fact that $R[X]/(P)$ splits to lift the idempotent
$\overline{e}$.

Let $\mathfrak{m}_1, \dots, \mathfrak{m}_k$ be the maximal ideals of $S$.
These equivalently correspond to the points of $\spec \overline{S}$. We know
that $e'$ belongs precisely to one of the $\mathfrak{m_i}$ (because a
primitive idempotent in $\overline{S}$ is one on one maximal ideal and zero
elsewhere). Call this $\mathfrak{m}_1$, say.

We have a map $\spec S \to \spec R[X]/(P)$ coming from the map $\phi:
R[X]/(P) \to S$. We claim that the image of
$\mathfrak{m}_1$ is different from the images of the $\mathfrak{m}_j, j > 1$.
Indeed, $b \in \mathfrak{m}_j$ precisely for $j > 1$, so the image of
$\mathfrak{m}_1$ does not contain $X$. However, the image of $\mathfrak{m}_j,
j> 1$ does contain $X$.

Consider a primitive idempotent for $R[X]/(P)$ corresponding to
$\phi^{-1}(\mathfrak{m}_1)$, say $f$.  Then $f$ belongs to every other maximal
ideal of $R[X]/(P)$ but not to $\phi^{-1}(\mathfrak{m}_1)$. Thus $\phi(f)$,
which is idempotent,
belongs to $\mathfrak{m}_1$ but not to any other maximal ideal of $S$. 
It follows that  $\phi(f)$ must lift $\overline{e} $, and we have completed
the proof.
\end{proof} 


\begin{corollary} 
If every monogenic,\footnote{That is, generated by one element.} finitely
presented and finite $R$-algebra is a product of local rings, then $R$ is
henselian.
\end{corollary} 
\begin{proof} 
Indeed, the proof of the above result shows that if $R[X]/(P)$ splits for
every monic $P$, then $R$ is henselian.
\end{proof} 


From the above result, we can get a quick example of a non-complete henselian
ring:

\begin{example} 
The integral closure of the localization $\mathbb{Z}_{(p)}$ in the
ring $\mathbb{Z}_p$ of $p$-adic integers is a henselian ring. Indeed, it is
first of all a discrete valuation ring (as we can restrict the valuation on
$\mathbb{Z}_p$; note that an element of $\mathbb{Q}_p$ which is algebraic over
$\mathbb{Q}$ and has norm at most one is \emph{integral} over
$\mathbb{Z}_{(p)}$). This follows from the criterion of
\cref{factorcriterion}. If a monic polynomial $P$ factors in the residue field, then
it factors in $\mathbb{Z}_p$, and if $P$ has coefficients integral over
$\mathbb{Z}_{(p)}$, so does any factor.
\end{example} 


\begin{example} 
If $k$ is a complete field with a nontrivial absolute value and $X$ is any
topological space, we can consider for each open subset $U \subset X$ the
ring $\mathcal{A}(U)$ of continuous maps $U \to k$. As $U$ ranges over the open subsets
containing an element $x$, the colimit $\varinjlim \mathcal{A}(U)$ (the
``local ring'' at $x$) is a local henselian ring. See \cite{Ra70}.
\end{example} 


\begin{proposition} 
Let $(R_i, \mathfrak{m}_i)$ be an inductive system of local rings and local
homomorphisms. If each $R_i$ is henselian, then the colimit $\varinjlim R_i$
is henselian too.
\end{proposition} 
\begin{proof} 
We already know (\cref{}) that the colimit is a local ring, and that
the maximal ideal of $\varinjlim R_i$ is the colimit $\varinjlim
\mathfrak{m}_i$. 
Finally, given any monic polynomial in $\varinjlim R_i$ with a factoring in the residue
field, the polynomial and the factoring come from some finite $R_i$; the
henselianness of $R_i$ allows us to lift the factoring. 
\end{proof} 


\subsection{Example: Puiseux's theorem}

Using the machinery developed here, we are going to prove:

\begin{theorem} 
Let $K$ be an algebraically closed field of characteristic zero. Then any
finite extension of the field of meromorphic power
series\footnote{That is, the quotient field of $K[[T]]$.} $K((T))$ is of the
form $K((T^{1/n}))$ for some $n$.
\end{theorem} 
In particular, we see that any finite extension of $K((T))$ is abelian, even
cyclic. The idea is going to be to look at the integral closure of $K[[T]]$ in
the finite extension, argue that it itself is a DVR, and then refine an
``approximate'' root in this DVR of the equation $\alpha^n = T$ to an exact one.

\begin{proof} 
Let $R = K[[T]]$ be the power series ring; it is a complete, and thus
henselian, DVR. Let $L$ be a finite extension of $K((T))$ of degree $n$ and $S$ the integral
closure of $R$ in $S$, which we know to be a DVR. This is a finite $R$-algebra (cf. \cref{}), so $S$ is a
product of local domains. Since $S$ is a domain, it is itself local. It is
easy to see that if $\mathfrak{n} \subset S$ is the maximal ideal, then $S$ is
$\mathfrak{n}$-adically complete (for instance because the maximal ideal of
$R$ is a power of $\mathfrak{n}$, and $S$ is a free $R$-module).

Let $\mathfrak{m} \subset R$ be the maximal ideal.
We have the formula $ef = n$, because there is only one prime of $S$ lying
above $\mathfrak{m}$. But $f = 1$ as the residue field of $R$ is algebraically
closed. Hence $e = n$, and the extension is \emph{totally} ramified.

Let $\alpha \in S$ be a uniformizer; we know that $\alpha$ is congruent,
modulo $\mathfrak{n}^2$, to something in $R$ as the residue extension is trivial. Then $\alpha^n $ is congruent to something in $R$, which must be a
uniformizer by looking at the valuation. By rescaling, we may assume
\[ \alpha^n \equiv T \mod \mathfrak{n}^2.  \]
Since the polynomial $X^n - T$ is separable in the residue field, we can
(using Hensel's lemma) refine $\alpha$ to a new $\alpha' \equiv \alpha \mod
\mathfrak{n}^2$ with 
\[ \alpha'^n = T.  \]
Then $\alpha'$ is also a uniformizer at $\mathfrak{n}$ (as $\alpha' \equiv
\alpha \mod \mathfrak{n}^2$).
It follows that $R[\alpha']$ must in fact be equal to $S$,\footnote{\cref{};
a citation here is needed.}  and thus $L$ is
equal to $K((T))(\alpha') = K((T^{1/n}))$.
\end{proof} 
