\def\module{M4P55 Commutative Algebra}
\def\lecturer{Prof Alexei Skorobogatov}
\def\term{Autumn 2019}
\def\cover{
$$
\begin{tikzcd}[ampersand replacement=\&, column sep=tiny, row sep=large]
\& \& \text{\begin{tabular}{c} Commutative \\ modules \end{tabular}} \& \& \\
\& \& \text{\begin{tabular}{c} Commutative \\ rings \end{tabular}} \arrow[hookrightarrow]{u} \& \& \\
\& \text{\begin{tabular}{c} Noetherian \\ rings \end{tabular}} \arrow[hookrightarrow]{ur} \arrow{ddl} \arrow{ddrrr} \& \text{\begin{tabular}{c} Integral \\ domains \end{tabular}} \arrow[hookrightarrow]{u} \& \text{\begin{tabular}{c} $ \le 1 $-dimensional \\ rings \end{tabular}} \arrow[hookrightarrow]{ul} \arrow{ddr} \& \\
\text{\begin{tabular}{c} $ 0 $-dimensional \\ rings \end{tabular}} \arrow[hookrightarrow]{urrr} \arrow{d} \arrow{dddr} \& \& \text{\begin{tabular}{c} Normal \\ rings \end{tabular}} \arrow[hookrightarrow]{u} \arrow{drr} \& \& \text{\begin{tabular}{c} $ 1 $-dimensional \\ rings \end{tabular}} \arrow[hookrightarrow]{ul} \arrow{dddl} \\
\text{\begin{tabular}{c} Artinian \\ rings \end{tabular}} \& \& \text{\begin{tabular}{c} Unique \\ factorisation \\ domains \end{tabular}} \arrow{dl} \arrow[hookrightarrow]{u} \& \text{\begin{tabular}{c} Local \\ rings \end{tabular}} \arrow[hookrightarrow]{uuul} \& \text{\begin{tabular}{c} Dedekind \\ rings \end{tabular}} \arrow{dlll} \\
\& \text{\begin{tabular}{c} Principal \\ ideal \\ domains \end{tabular}} \& \text{\begin{tabular}{c} Regular \\ local \\ rings \end{tabular}} \arrow[hookrightarrow]{uuul} \arrow[hookrightarrow]{u} \arrow[hookrightarrow]{ur} \arrow{dl} \arrow{dr} \& \& \\
\& \text{Fields} \arrow[hookrightarrow]{uul} \arrow[hookrightarrow]{uurrr} \arrow[hookrightarrow]{u} \& \& \text{\begin{tabular}{c} Discrete \\ valuation \\ rings \end{tabular}} \arrow[hookrightarrow]{uur} \arrow[hookrightarrow]{ull} \&
\end{tikzcd}
$$
}
\def\syllabus{Generalities on rings. Radicals of rings. Localisations of rings. Spectra of rings. Modules over rings. Finiteness conditions of Noetherian rings and Artinian rings. Primary decompositions of ideals in rings. Integral closure and normal rings. Discrete valuation rings. Completions of rings with topology.}
\def\thm{section}

\input{../style/header}

\begin{document}

\input{../style/cover}

\section{Introduction}

\lecture{1}{Thursday}{03/10/19}

The prerequisites are
\begin{itemize}
\item groups,
\item rings,
\item fields, and
\item a solid linear algebra.
\end{itemize}

This course is good for
\begin{itemize}
\item algebraic geometry, and
\item algebraic number theory.
\end{itemize}

The following are books.
\begin{itemize}
\item M Reid, Undergraduate commutative algebra, 1995
\item M F Atiyah and I G Macdonald, Introduction to commutative algebra, 1969
\end{itemize}

The following is the structure of the course.
\begin{itemize}
\item Generalities on rings, such as ideals, and examples.
\item Localisations of rings between a ring $ R $ and the fraction field $ K $ of $ R $, such as $ \ZZ $ and $ \QQ $.
\item Finiteness conditions of Noetherian rings and Artinian rings.
\item Integral closure and normal rings, such as $ \ZZ\sbr{i} \subset \QQ\br{i} $ and $ \ZZ\sbr{\sqrt{-3}} \subset \ZZ\sbr{\tfrac{1 + \sqrt{-3}}{2}} \subset \QQ\br{\sqrt{-3}} $.
\item Discrete valuation rings.
\item Completions of rings with topology.
\end{itemize}

\pagebreak

\section{Rings and ideals}

\begin{definition}
A \textbf{commutative ring} is a set $ \br{A, +, \cdot, 0, 1} $ such that
\begin{enumerate}
\item $ \br{A, +, 0} $ is an abelian group,
\item for all $ x, y, z \in A $,
\begin{itemize}
\item $ \br{x \cdot y} \cdot z = x \cdot \br{y \cdot z} $,
\item $ x \cdot y = y \cdot x $,
\item $ x \cdot \br{y + z} = x \cdot y + x \cdot z $, and
\end{itemize}
\item for all $ x \in A $, $ x \cdot 1 = 1 \cdot x = x $.
\end{enumerate}
\end{definition}

\begin{remark}
\hfill
\begin{itemize}
\item $ 1 $ is uniquely determined by $ 3 $, since $ 1' = 1' \cdot 1 = 1 $.
\item If $ 1 = 0 $, then $ 0 = x \cdot 0 = x \cdot 1 = x $, since $ x \cdot 0 = x \cdot \br{0 + 0} = x \cdot 0 + x \cdot 0 $, so $ x \cdot 0 = 0 $. So every element is zero. Hence $ A = \cbr{0} $.
\end{itemize}
\end{remark}

\begin{definition}
A \textbf{homomorphism of rings} $ f : A \to B $ is a map such that
$$ f\br{x + y} = f\br{x} + f\br{y}, \qquad f\br{xy} = f\br{x}f\br{y}, \qquad f\br{1} = 1, \qquad x, y \in A. $$
\end{definition}

\begin{example*}
If $ A \subset B $ is closed under $ + $ and $ \cdot $, and $ 1 \in A $, then
$$ \function{A}{B}{x}{x} $$
is a homomorphism.
\end{example*}

\begin{remark}
\hfill
\begin{itemize}
\item A composition of homomorphisms is a homomorphism.
\item An \textbf{isomorphism} is a bijective homomorphism.
\end{itemize}
\end{remark}

\begin{definition}
A subset $ I $ of a ring $ A $ is an \textbf{ideal} if $ I $ is a subgroup of the additive group $ \br{A, +} $ which is closed under multiplication by elements of $ A $, so $ xI \subset I $ for any $ x \in A $. Sometimes this is written as $ I \triangleleft A $. In this case the \textbf{quotient group} $ A / I $ is naturally a ring, where $ \br{x + I}\br{y + I} $ is defined as $ xy + I $.
\end{definition}

\begin{proposition}
Let $ I $ be an ideal of a commutative ring $ A $. Then there is a natural bijection between the ideals $ J \subset A $ such that $ I \subset J $ and the ideals of $ A / I $.
\end{proposition}

\begin{proof}
Let
$$ \function{A}{A / I}{x}{x + I} $$
be the natural surjective map. Send $ J $ to its image under this map.
\end{proof}

\begin{definition}
If $ f : A \to B $ is a homomorphism, then
$$ \ker f = \cbr{x \in A \st f\br{x} = 0} $$
is an ideal in $ A $, and
$$ \im f = f\br{A} \cong A / \ker f \subset B. $$
\end{definition}

\pagebreak

\section{Polynomials and formal power series}

\lecture{2}{Tuesday}{08/10/19}

\begin{definition}
Let $ R $ be a ring. The \textbf{polynomial ring} with coefficients in $ R $ is the set
$$ R\sbr{x} = \cbr{a_0 + \dots + a_nx^n \st a_i \in R, \ n \in \ZZ_{\ge 0}}. $$
The addition is coefficient-wise, and the multiplication is given by the formula
$$ \br{\sum_{i \ge 0} a_ix^i}\br{\sum_{j \ge 0} b_jx^j} = \sum_{i \ge 0} \br{\sum_{j + k = i, \ j \ge 0, \ k \ge 0} a_jb_k}x^i, $$
where all but finitely many coefficients are equal to zero. Define
$$ R\sbr{x_1, \dots, x_n} = R\sbr{x_1} \dots \sbr{x_n} = \cbr{\sum_{i_1, \dots, i_n \ge 0} a_{i_1, \dots, i_n}x_1^{i_1} \dots x_n^{i_n} \st a_{i_1, \dots, i_n} \in R}, $$
where all but finitely many coefficients are equal to zero.
\end{definition}

\begin{definition}
The \textbf{ring of formal power series} with coefficients in $ R $ is the set
$$ R\sbr{\sbr{t}} = \cbr{a_0 + a_1t + \dots \st a_i \in R}. $$
The addition is coefficient-wise, and the multiplication is given by the formula
$$ \br{\sum_{i \ge 0} a_it^i}\br{\sum_{j \ge 0} b_jt^j} = \sum_{i \ge 0} \br{\sum_{j + k = i, \ j \ge 0, \ k \ge 0} a_jb_k}t^i. $$
Define
$$ R\sbr{\sbr{t_1, \dots, t_n}} = R\sbr{\sbr{t_1}} \dots \sbr{\sbr{t_n}}. $$
\end{definition}

\begin{example*}
$ \br{1 - t}\br{1 + t + \dots} = 1 $, so in $ R\sbr{\sbr{t}} $ many products equal one unlike in $ R\sbr{t} $.
\end{example*}

\section{Zero-divisors, nilpotents, units}

\begin{definition}
Let $ A $ be a ring. An element $ x \in A $ is a \textbf{zero-divisor} if $ x \ne 0 $ but $ xy = 0 $ for some $ y \ne 0 $ in $ A $. A ring without zero-divisors is called an \textbf{integral domain}. An element $ x \in A $ is \textbf{nilpotent} if $ x \cdot \dots \cdot x = x^n = 0 $ for some $ n \in \ZZ_{> 0} $. A \textbf{unit} $ x \in A $ is an element such that $ xy = 1 $ for some $ y \in A $. Then we write $ y = x^{-1} $. The units of $ A $ form a group under multiplication, denoted by $ A^* $, or $ A^\times $.
\end{definition}

\begin{definition}
Let $ x \in A $. Then the set
$$ \abr{x} = \cbr{xy \st y \in A} $$
is an ideal. Such ideals are called \textbf{principal ideals}.
\end{definition}

\begin{remark*}
$ x \in A^* $ if and only if $ \abr{x} = A $, and $ A $ is a field if and only if $ A^* = A \setminus \cbr{0} $.
\end{remark*}

\begin{proposition}
Let $ A $ be a non-zero ring. Then the following are equivalent.
\begin{enumerate}
\item $ A $ is a field.
\item There are no ideals in $ A $ other than zero and $ A $.
\item Every non-zero homomorphism $ f : A \to B $ is injective.
\end{enumerate}
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}[leftmargin=0.5in]
\item[$ 1 \implies 2 $.] Obvious.
\item[$ 2 \implies 3 $.] $ \ker f \subset A $ is an ideal. Since $ f \ne 0 $, $ \ker f \ne A $. Hence $ \ker f = 0 $.
\item[$ 3 \implies 1 $.] Take any $ x \ne 0 $ in $ A $. Look at $ \abr{x} $. Define $ B = A / \abr{x} $. Then take $ f : A \to B $ to be the natural surjective map. If $ f $ is not identically zero, we get a contradiction with $ 3 $.
\end{itemize}
\end{proof}

\pagebreak

\section{Prime ideals and maximal ideals}

\begin{definition}
An ideal $ I \subset A $ is called \textbf{prime} if $ I \ne A $ and if whenever $ xy \in I $, then $ x \in I $ or $ y \in I $. An ideal $ J \subset A $ is called \textbf{maximal} if there is no ideal $ J' $ such that $ J \subsetneq J' \subsetneq A $.
\end{definition}

\begin{lemma}
An ideal $ I \subset A $ is prime if and only if $ A / I $ is an integral domain.
\end{lemma}

\begin{proof}
Obvious.
\end{proof}

\begin{lemma}
An ideal $ J \subset A $ is maximal if and only if $ A / J $ is a field.
\end{lemma}

\begin{proof}
Obvious.
\end{proof}

\begin{definition}
The set of prime ideals of $ A $ is called the \textbf{spectrum} of $ A $ and is denoted by $ \Spec A $.
\end{definition}

\begin{proposition}
If $ f : A \to B $ is a ring homomorphism and $ I \subset B $ is a prime ideal, then $ f^{-1}\br{I} $ is a prime ideal of $ A $.
\end{proposition}

\begin{proof}
It is easy to see that $ f^{-1}\br{I} $ is an ideal in $ A $. Suppose $ xy \in f^{-1}\br{I} $ for some $ x, y \in A $. Then $ f\br{x}f\br{y} = f\br{xy} \in I $. Since $ I $ is prime, $ f\br{x} \in I $ or $ f\br{y} \in I $, so $ x \in f^{-1}\br{I} $ or $ y \in f^{-1}\br{I} $.
\end{proof}

So we get a canonical map
$$ \function[f^*]{\Spec B}{\Spec A}{I \subset B}{f^{-1}\br{I} \subset A}. $$

\lecture{3}{Wednesday}{09/10/19}

\begin{remark}
If $ f : A \to B $ is a ring homomorphism, then $ f^{-1}\br{\ppp} $, where $ \ppp \subset B $ is a prime ideal, is a prime ideal. But this is false for maximal ideals. Let $ A = \ZZ $, let $ B = \QQ $, and let $ f\br{x} = x $. Then $ 0 \subset \QQ $ is a maximal ideal and $ f^{-1}\br{0} = 0 \subset \ZZ $ is not a maximal ideal. For example, $ 0 \subsetneq \abr{2} \subsetneq \ZZ $.
\end{remark}

\begin{theorem}
\label{thm:4.6}
Let $ A $ be a non-zero ring. Then $ A $ has at least one maximal ideal. In particular, $ \Spec A $ is not empty.
\end{theorem}

The proof is based on Zorn's lemma. Let $ S $ be a set. Then a \textbf{partial order} is a binary relation $ \le $ such that
\begin{itemize}
\item $ x \le x $ for all $ x \in S $,
\item $ x \le y \le z $ implies that $ x \le z $, and
\item $ x \le y $ and $ y \le x $ imply that $ x = y $,
\end{itemize}
where not all pairs are comparable. A \textbf{chain} $ T \subset S $ is a subset in which every two elements are comparable.

\begin{lemma}[Zorn]
Suppose that $ S $ is a partially ordered set such that every chain $ T \subset S $ has an upper bound, that is an element $ t \in S $ such that $ x \le t $ for all $ x \in T $. Then $ S $ has a maximal element, that is there exists $ s \in S $ such that if $ x \in S $ and $ x \ge s $, then $ x = s $.
\end{lemma}

Zorn's lemma is equivalent to the axiom of choice.

\begin{proof}[Proof of Theorem \ref{thm:4.6}]
Let $ \Sigma $ be the set of all ideals of $ A $ which are not equal to $ A $. Then $ 0 \in \Sigma $, so $ \Sigma \ne \emptyset $. Equip $ \Sigma $ with partial order given by inclusion. It is enough to check the assumption of Zorn's lemma. Suppose $ T $ is a chain of ideals, so it is a collection of ideals $ J_i $ for $ i \in T $. Consider instead
$$ I = \bigcup_{i \in T} J_i. $$
Claim that since $ T $ is a chain, $ I $ is an ideal. Then $ x \in I $ implies that $ x \in J_i $ for some $ i $. Take any $ x, y \in I $. Then $ x \in J_i $ and $ y \in J_k $ for some $ i, k \in T $. Since $ T $ is a chain, $ i \le k $ or $ k \le i $, so $ J_i \subset J_k $ or $ J_k \subset J_i $. Without loss of generality assume $ J_i \subset J_k $. Then $ x, y \in J_k $, so $ x + y \in J_k \subset I $. Clearly, $ I $ is an upper bound.
\end{proof}

\pagebreak

\begin{corollary}
\label{cor:4.8}
Any ideal of $ A $ is contained in a maximal ideal of $ A $.
\end{corollary}

\begin{proof}
If $ I \subset A $ is an ideal, apply Theorem \ref{thm:4.6} to $ A / I $.
\end{proof}

\begin{corollary}
\label{cor:4.9}
Any non-unit of $ A $ is contained in a maximal ideal.
\end{corollary}

\begin{proof}
Apply Corollary \ref{cor:4.8} to $ \abr{a} $.
\end{proof}

\begin{example*}
The maximal ideals of $ \ZZ $ are $ \abr{p} $, where $ p $ is prime.
\end{example*}

\begin{definition}
A ring $ A $ is \textbf{local} if $ A $ has exactly one maximal ideal.
\end{definition}

\begin{example*}
Any field is a local ring. If $ k $ is a field, then $ k\sbr{\sbr{t}} $ is a local ring.
\end{example*}

\begin{lemma}[Prime avoidance]
\label{lem:4.12}
Let $ A $ be a ring and let $ \ppp \subset A $ be a prime ideal. Suppose that $ I_1, \dots, I_n $ are ideals in $ A $ such that $ \bigcap_{j = 1}^n I_j \subset \ppp $. Then $ I_j \subset \ppp $ for some $ j $. If, moreover, $ \bigcap_{j = 1}^k I_j = \ppp $, then $ I_j = \ppp $ for some $ j $.
\end{lemma}

\begin{proof}
Suppose that $ I_j $ is not a subset of $ \ppp $ for any $ j $. Then there exists $ x_j \in I_j $ such that $ x_j \notin \ppp $. Hence $ x_1 \dots x_n \in I_1 \dots I_n \subset \bigcap_{j = 1}^n I_j \subset \ppp $. Since $ x_1\br{x_2 \dots x_n} \in \ppp $ and $ x_1 \notin \ppp $, $ x_2 \dots x_n \in \ppp $. Since $ \ppp $ is prime we get a contradiction. For the second claim, we know that some $ I_j \subset \ppp $. But $ \ppp = \bigcap_{j = 1}^k I_j \subset I_k $ for all $ k $. Hence $ \ppp = I_j $.
\end{proof}

\section{Nilradical and the Jacobson radical}

\lecture{4}{Thursday}{10/10/19}

\begin{proposition}
The set $ \NNN\br{A} $ consisting of all nilpotents of the ring $ A $ and zero is an ideal, called the \textbf{nilradical} of $ A $. The quotient $ A / \NNN\br{A} $ has no nilpotents.
\end{proposition}

\begin{proof}
Suppose $ x \in A $ is nilpotent, so $ x^n = 0 $. For any $ a \in A $, $ \br{ax}^n = a^nx^n = 0 $. Let $ x $ and $ y $ be nilpotents. Say $ x^n = y^m = 0 $. Then
$$ \br{x + y}^{n + m} = \sum_{i, j \ge 0, \ i + j = n + m} a_{ij}x^iy^j, \qquad a_{ij} \in A. $$
Clearly, either $ i \ge n $ or $ j \ge m $. Then $ a_{ij}x^iy^j = 0 $. Therefore, $ \br{x + y}^{n + m} = 0 $, hence $ x + y \in \NNN\br{A} $. If $ x + \NNN\br{A} $ is nilpotent in $ A / \NNN\br{A} $, then $ x^n + \NNN\br{A} = \NNN\br{A} $ is the trivial coset. Hence $ x^n \in \NNN\br{A} $. Thus $ \br{x^n}^m = 0 $ for some $ m $.
\end{proof}

A ring $ A $ such that $ \NNN\br{A} = 0 $ is called a \textbf{reduced ring}.

\begin{proposition}
\label{prop:5.3}
$ \NNN\br{A} $ is the intersection of all prime ideals of $ A $.
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \subset $] Let $ I $ be the intersection of all prime ideals of $ A $. Let $ f \in A $ be such that $ f^n = 0 $. Take any prime ideal $ \ppp \subset A $. We know that $ f^n = 0 \in \ppp $. Then $ f\br{f \dots f} \in \ppp $ and $ \ppp $ prime implies that $ f \in \ppp $, so $ f \in I $.
\item[$ \supset $] Let us prove the converse. Suppose $ f $ is not nilpotent, so $ f^n \ne 0 $ for all $ n \ge 1 $. We will show that there exists a prime ideal $ \ppp \subset A $ that does not contain $ f $. Let us consider all ideals of $ A $ that do not contain $ f^m $, where $ m \in \ZZ_{> 0} $. Let $ \Sigma $ be the set of ideals $ J \subset A $ such that $ J \cap \cbr{f^m \st m \ge 1} = \emptyset $. The zero ideal is in $ \Sigma $. So $ \Sigma \ne \emptyset $. Equip $ \Sigma $ with a partial order given by inclusion. Applying Zorn's lemma we obtain that $ \Sigma $ contains a maximal element. Call it $ \ppp $. By construction,
$$ \ppp \cap \cbr{f^m \st m \ge 1} = \emptyset, $$
so $ f \notin \ppp $. It remains to prove that $ \ppp $ is prime. It is enough to prove that if $ x \notin \ppp $ and $ y \notin \ppp $, then $ xy \notin \ppp $. Consider the ideal $ \ppp + \abr{x} \supsetneq \ppp $. Since $ \ppp $ is maximal in $ \Sigma $, thus $ \ppp + \abr{x} $ is not in $ \Sigma $. By definition of $ \Sigma $ there exists $ n \ge 1 $ such that $ f^n \in \ppp + \abr{x} $. Similarly, there exists $ m \ge 1 $ such that $ f^m \in \ppp + \abr{y} $. Then $ \br{\ppp + \abr{x}}\br{\ppp + \abr{y}} \subset \ppp + \abr{xy} $. In particular, $ f^{n + m} = f^nf^m \in \ppp + \abr{xy} $. If $ xy \in \ppp $, then $ f^{n + m} \in \ppp $, which is not possible. Therefore, $ xy \notin \ppp $. So $ \ppp $ is a prime ideal that does not contain $ f $.
\end{itemize}
\end{proof}

\pagebreak

The \textbf{Jacobson radical} $ \JJJ\br{A} $ is the intersection of all maximal ideals of $ A $.

\begin{proposition}
$ x \in \JJJ\br{A} $ if and only if $ 1 - xy \in A^* $ for all $ y \in A $.
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Let $ x \in \JJJ\br{A} $. Suppose there exists $ y \in A $ such that $ 1 - xy $ is not a unit. By Corollary \ref{cor:4.9} every non-unit is contained in a maximal ideal. Say $ \mmm \subset A $ is a maximal ideal and $ 1 - xy \in \mmm $. But $ x \in \JJJ\br{A} \subset \mmm $. Then $ 1 = \br{1 - xy} + xy \in \mmm $, but then $ \mmm \ne A $. A contradiction.
\item[$ \impliedby $] Given $ x \in A $ such that $ 1 - xy \in A^* $ for all $ y \in A $, we must have $ x \in \JJJ\br{A} $. If $ x \notin \JJJ\br{A} $, then there exists a maximal ideal $ \mmm \subset A $ such that $ x \notin \mmm $. Then $ \mmm + \abr{x} = A \ni 1 $. Thus $ 1 = m + xy $, where $ y \in A $. But by assumption $ 1 - xy \in A^* $, so $ m \in A^* $. But then $ \mmm = A $. A contradiction.
\end{itemize}
\end{proof}

Let $ I $ be an ideal of $ A $. The \textbf{radical} of $ I $ is the set
$$ \rad I = \cbr{x \in A \st \exists n \ge 1, \ x^n \in I}. $$

\begin{proposition}
The radical of $ I $ is the intersection of all prime ideals of $ A $ that contain $ I $.
\end{proposition}

\begin{proof}
Apply Proposition \ref{prop:5.3} to $ A / I $.
\end{proof}

\lecture{5}{Tuesday}{15/10/19}

\begin{definition}
Let $ I $ be an indexing set. For each $ i \in I $ we are given a ring $ R_i $. Consider the product set
$$ \prod_{i \in I} R_i = \cbr{\br{x_i}_{i \in I} \st x_i \in R_i}. $$
Define
$$ 0 = \br{0, 0, \dots} \in \prod_{i \in I} R_i, \qquad 1 = \br{1, 1, \dots} \in \prod_{i \in I} R_i. $$
Define addition and multiplication coordinate-wise, so
$$ \br{a_i}_{i \in I} + \br{b_i}_{i \in I} = \br{a_i + b_i}_{i \in I}, \qquad \br{a_i}_{i \in I} \cdot \br{b_i}_{i \in I} = \br{a_i \cdot b_i}_{i \in I}, \qquad \br{a_i}_{i \in I}, \br{b_i}_{i \in I} \in \prod_{i \in I} R_i. $$
Then $ \prod_{i \in I} R_i $ is a ring, the \textbf{product of rings}.
\end{definition}

A warning is if $ I $ has at least two elements, then $ \prod_{i \in I} R_i $ has zero-divisors.

\begin{example*}
$ R_1 \times R_2 $ has $ \br{1, 0} \cdot \br{0, 1} = \br{0, 0} = 0 $.
\end{example*}

If $ h_i : R \to R_i $ is a ring homomorphism for $ i \in I $, then $ \br{h_i}_{i \in I} $ is a ring homomorphism $ R \to \prod_{i \in I} R_i $.

\begin{remark}
Let $ \ppp_i $ for $ i \in I $ be all prime ideals of $ R $. Let $ h_i : R \to R / \ppp_i $. Then
$$ h = \br{h_i}_{i \in I} : R \to \prod_{i \in I} R / \ppp_i $$
is a homomorphism, and
$$ \ker h = \bigcap_{i \in I} \ker h_i = \bigcap_{i \in I} \ppp_i = \NNN\br{R}. $$
So there is an injective map
$$ R / \NNN\br{R} \hookrightarrow \prod_{i \in I} R / \ppp_i, $$
a product of integral domains. Now take $ f_j : R \to R / \mmm_j $, so if we take the indexing set $ J $ to be the set of all maximal ideals of $ R $, then we obtain an injective map
$$ R / \JJJ\br{R} \hookrightarrow \prod_{j \in J} R / \mmm_j, $$
a product of fields.
\end{remark}

\pagebreak

\section{Localisation of rings}

\begin{example*}
Fix a prime $ p $. Then
$$ \ZZ \subset \cbr{\dfrac{m}{p^k} \st m \in \ZZ, \ k \in \ZZ_{\ge 0}} \subset \QQ. $$
\end{example*}

\begin{definition}
A subset $ S $ of a ring $ A $ is called a \textbf{multiplicative set} if $ 1 \in S $ and $ 0 \notin S $, and $ S $ is closed under multiplication.
\end{definition}

\begin{example}
\hfill
\begin{itemize}
\item Let $ a \in A $ be a non-nilpotent. Then $ \cbr{1, a, \dots} $ is a multiplicative set.
\item Let $ \ppp \subsetneq A $ be a prime ideal. Then $ A \setminus \ppp $ is a multiplicative set. Indeed, if $ x \notin \ppp $ and $ y \notin \ppp $ then $ xy \notin \ppp $ by the definition of a prime ideal.
\item If we have a family $ \ppp_i $ for $ i \in I $ of prime ideals, then $ A \setminus \bigcup_{i \in I} \ppp_i $ is a multiplicative set.
\item $ A^* $ is a multiplicative set.
\item All non-zero-divisors in $ A $ form a multiplicative set.
\item Let $ I \subsetneq A $ be an ideal. Then $ 1 + I = \cbr{1 + x \st x \in I} $ is a multiplicative set.
\end{itemize}
\end{example}

\begin{definition}
Consider $ A \times S $ and the equivalence relation on $ A \times S $ defined as
$$ \br{a, s} \sim \br{b, t} \qquad \iff \qquad \exists u \in S, \ u\br{at - bs} = 0. $$
Check that this is indeed an equivalence relation. \footnote{Exercise} The following is some notation.
\begin{itemize}
\item The equivalence class of $ \br{a, s} $ is written as $ a / s $. For example, if $ t \in S $, then $ a / s = at / st $.
\item The set of equivalence classes is denoted by $ S^{-1}A $.
\end{itemize}
Define
$$ \dfrac{a}{s} + \dfrac{b}{t} = \dfrac{at + bs}{st}, \qquad \dfrac{a}{s} \cdot \dfrac{b}{t} = \dfrac{ab}{st}, \qquad a, b \in A, \qquad s, t \in S. $$
Need to check that these operations are well-defined. Define $ 0 / 1 $ as the zero of $ S^{-1}A $, and $ 1 / 1 $ as the one of $ S^{-1}A $. Then $ S^{-1}A $ is a ring, the \textbf{localisation of $ A $ with respect to $ S $}.
\end{definition}

\begin{lemma}
There is a ring homomorphism
$$ \function[f]{A}{S^{-1}A}{x}{\dfrac{x}{1}}. $$
This $ f $ is injective if and only if $ S $ has no zero-divisors.
\end{lemma}

\begin{proof}
If $ S $ contains a zero-divisor, say $ u $, then there exists $ 0 \ne a \in A $ such that $ ua = 0 $. Then
$$ f\br{a} = \dfrac{a}{1} = \dfrac{au}{u} = \dfrac{0}{u} = 0. $$
So $ \ker f $ contains $ a $, hence $ f $ is not injective. If $ f $ has no zero-divisors, then $ ua = u\br{a - 0} \ne 0 $ if $ a \ne 0 $ and any $ u \in S $. Hence $ f\br{a} \ne 0 $.
\end{proof}

\lecture{6}{Wednesday}{16/10/19}

If $ A $ is an integral domain, then $ \ker f = 0 $. So $ A \hookrightarrow S^{-1}A $.

\pagebreak

\begin{example*}
Let $ R = \ZZ $.
\begin{itemize}
\item If $ S = \cbr{1, a, \dots} $, then
$$ S^{-1}\ZZ = \cbr{\dfrac{n}{a^m} \st n \in \ZZ, \ m \in \ZZ_{\ge 0}}. $$
\item If $ S = \ZZ \setminus p\ZZ $, then
$$ S^{-1}\ZZ = \cbr{\dfrac{n}{m} \st p \nmid m}. $$
\item If $ S = \ZZ \setminus \bigcup_{p_i \ \text{prime}} p_i\ZZ $, then
$$ S^{-1}\ZZ = \cbr{\dfrac{n}{m} \st p_i \nmid m}. $$
\item If $ S = \ZZ^* = \cbr{\pm 1} $, then $ S^{-1}\ZZ = \ZZ $.
\item If $ S = \cbr{\text{all non-zero elements}} $, then $ S^{-1}\ZZ = \QQ $.
\item If $ S = \cbr{1 + I \st I \subset \ZZ \ \text{ideal}} = \cbr{1 + nk \st k \in \ZZ} $, then
$$ S^{-1}\ZZ = \cbr{\dfrac{m}{1 + nk} \st m, k \in \ZZ}, $$
where $ n $ is fixed.
\end{itemize}
\end{example*}

\begin{example*}
Let $ R = k\sbr{x} $, where $ k $ is a field.
\begin{itemize}
\item If $ S = k\sbr{x}^* = k^* $, then $ S^{-1}k\sbr{x} = k\sbr{x} $.
\item If $ S = \cbr{\text{all non-zero elements}} $, then
$$ S^{-1}k\sbr{x} = k\br{x} = \cbr{\dfrac{f\br{x}}{g\br{x}} \st g\br{x} \ \text{arbitrary non-zero polynomial}}. $$
\end{itemize}
\end{example*}

\begin{example}
Let $ k $ be a field, and let $ A = k\sbr{x, y} / \abr{xy} $. Note that $ A $ has zero-divisors, since $ xy = 0 $ in $ A $, but $ x \ne 0 $ in $ A $ and $ y \ne 0 $ in $ A $. Then $ S = \cbr{1, x, \dots} $ is a multiplicative set, since $ x^n \ne 0 $ in $ A $ for $ n = 1, 2, \dots $, because no power of the polynomial $ x $ is in $ \abr{xy} $. What is $ S^{-1}A $? Let $ f : A \to S^{-1}A $. Then $ a \in \ker f $ if and only if $ a / 1 = 0 / 1 $, if and only if $ u \cdot \br{a \cdot 1 - 0 \cdot 1} = 0 $ for some $ u \in S $, if and only if $ ua = 0 $. Let $ a \ne 0 $. Then $ u = 1 $ is not interesting. Take $ u = x $ and $ a = y $, then $ xy = 0 $, hence $ y \in \ker f $. Since $ f $ is a homomorphism, $ \ker f $ is an ideal. So $ \abr{y} = yA \subset \ker f $. In general,
$$ a = \sum_{i, j \ge 0} a_{ij}x^iy^j \equiv a_{00} + \sum_{i \ge 1} a_{i0}x^i + \sum_{j \ge 1} a_{0j}y^j \mod \abr{xy}. $$
Then $ \ker f = yA = \abr{y} $, since $ \sum_{j \ge 1} a_{0j}y^j $ goes to zero, since it is annihilated by $ x $, and $ x^n\sum_{i \ge 0} a_{i0}x^i $ is never zero in $ A $. Thus $ f\br{A} = k\sbr{x} $, and
$$ S^{-1}A = \cbr{\dfrac{f\br{x}}{x^n} \st f\br{x} \in k\sbr{x}, \ n \ge 0} = k\sbr{x, x^{-1}} = \cbr{\sum_{i \in \ZZ, \ a_i = 0 \ \text{for almost all} \ i} a_ix^i \st a_i \in k}. $$
\end{example}

\lecture{7}{Thursday}{17/10/19}

\begin{lemma}[Universal property of localisation]
Let $ A $ be a ring, and $ S \subset A $ a multiplicative set. Let $ g : A \to B $ be a ring homomorphism such that $ g\br{s} $ is a unit in $ B $ for all $ s \in S $. Then there exists a unique ring homomorphism $ h : S^{-1}A \to B $ such that $ g = h \circ f $ where $ f : A \to S^{-1}A $ is the canonical map, so
$$
\begin{tikzcd}
A \arrow{d}[swap]{f} \arrow{dr}{g} & \\
S^{-1}A \arrow{r}[swap]{\exists !h} & B
\end{tikzcd}.
$$
\end{lemma}

\pagebreak

\begin{proof}
Define
$$ \function[h]{S^{-1}A}{B}{\dfrac{a}{s}}{\dfrac{g\br{a}}{g\br{s}}}, \qquad a \in A, \qquad s \in S. $$
This is well-defined, that is if $ a / s = b / t $ then $ g\br{a} / g\br{s} = g\br{b} / g\br{t} $. \footnote{Exercise} This is a ring homomorphism. \footnote{Exercise} Now easy to check that
$$ \br{h \circ f}\br{a} = h\br{\dfrac{a}{1}} = \dfrac{g\br{a}}{g\br{1}} = \dfrac{g\br{a}}{1} = g\br{a}, \qquad a \in A. $$
Moreover, if $ h' : S^{-1}A \to B $ and $ g = h' \circ f $ then for all $ a \in A $ we have $ \br{h' \circ f}\br{a} = g\br{a} $. Since $ h' $ is a ring homomorphism, for all $ s \in S $, $ h'\br{1 / s} = 1 / h'\br{s / 1} = 1 / g\br{s} $. Hence
$$ h'\br{\dfrac{a}{s}} = h'\br{\dfrac{a}{1}}h'\br{\dfrac{1}{s}} = \dfrac{h'\br{f\br{a}}}{h'\br{f\br{s}}} = \dfrac{g\br{a}}{g\br{s}} = h\br{\dfrac{a}{s}}. $$
\end{proof}

For all ideals $ I \subset A $, set
$$ S^{-1}I = \cbr{\dfrac{i}{s} \in S^{-1}A \st i \in I, \ s \in S}, $$
the ideal of $ S^{-1}A $ generated by $ f\br{I} $.

\begin{proposition}
Let $ S \subset A $ be a multiplicative subset, and let $ I_1, \dots, I_n $ be ideals of $ A $. Then
\begin{enumerate}
\item $ S^{-1}\br{I_1 + \dots + I_n} = S^{-1}I_1 + \dots + S^{-1}I_n $,
\item $ S^{-1}\br{I_1 \cdot \dots \cdot I_n} = S^{-1}I_1 \cdot \dots \cdot S^{-1}I_n $,
\item $ S^{-1}\br{\bigcap_{i = 1}^n I_i} = \bigcap_{j = 1}^n S^{-1}I_j $, and
\item $ S^{-1}\br{\rad I} = \rad S^{-1}I $ for every ideal $ I $.
\end{enumerate}
\end{proposition}

\begin{proof}
Exercise. \footnote{Exercise}
\end{proof}

There is a map
$$ \cbr{\text{ideals} \ I \ \text{of} \ A} \to \cbr{\text{ideals} \ S^{-1}I \ \text{of} \ S^{-1}A}. $$

\begin{proposition}
Every ideal of $ S^{-1}A $ is of the form $ S^{-1}I $ for some ideal $ I \subset A $.
\end{proposition}

\begin{proof}
Let $ J $ be any ideal of $ S^{-1}A $. Define $ I = f^{-1}\br{J} $. Know $ I $ is an ideal of $ A $. Claim that $ J = S^{-1}I $. Say $ a / s \in J $. Since $ J $ is an ideal, $ s\br{a / s} \in J $, so $ a / 1 \in J $, so $ a \in I $. Hence $ a / s \in S^{-1}I $. So $ J \subset S^{-1}I $. Conversely, $ f\br{I} = f\br{f^{-1}\br{J}} \subset J $. Thus $ S^{-1}I \subset J $.
\end{proof}

\begin{theorem}
\label{thm:6.9}
The only prime ideals of $ S^{-1}A $ are of the form $ S^{-1}\ppp $ where $ \ppp $ is a prime ideal of $ A $ such that $ \ppp \cap S = \emptyset $. Hence there is a bijection
$$ \correspondence{\text{prime ideals of} \ S^{-1}A}{\text{prime ideals of} \ A \ \text{that do not intersect} \ S}. $$
\end{theorem}

\begin{proof}
Prove $ S^{-1}\ppp $ is prime if $ \ppp $ is prime and $ \ppp \cap S = \emptyset $. Say $ a / s \cdot b / t \in S^{-1}\ppp $ for $ a / s, b / t \in S^{-1}A $. This implies $ v\br{abu - cst} = 0 $ for some $ u, v \in S $ and $ c \in \ppp $. Hence $ abuv = cstv \in \ppp $, so $ ab \in \ppp $, as $ u $ and $ v $ are units, so $ a \in \ppp $ or $ b \in \ppp $. Hence $ S^{-1}\ppp $ is prime. Next note that $ f^{-1}\br{S^{-1}\ppp} = \ppp $, assuming $ \ppp \cap S = \emptyset $. For if $ a \in A $ lies in $ S^{-1}\ppp $ then by definition there exists $ s \in S $ such that $ sa \in \ppp $. Since $ s $ is a unit, $ a \in \ppp $. Hence $ \ppp $ is uniquely determined by $ S^{-1}\ppp $. Now let $ \qqq $ be an arbitrary prime ideal of $ S^{-1}A $. Then certainly $ \qqq = S^{-1}I $ for $ I = f^{-1}\br{\qqq} $. But the preimage of a prime ideal is prime. So $ I $ is prime. Moreover, $ I \cap S = \emptyset $ as no $ s \in S $ is in $ \qqq $, since $ \qqq $ is prime, so $ \qqq $ contains no units.
\end{proof}

\pagebreak

\section{\texorpdfstring{$ \Spec R $}{Spec R} as a topological space}

\lecture{8}{Tuesday}{22/10/19}

A set $ X $ with a collection $ \UUU $ of subsets $ U \subset X $ is called a \textbf{topological space} if the following properties hold.
\begin{enumerate}
\item $ \UUU $ contains $ \emptyset $ and $ X $.
\item If $ U $ and $ U' $ are in $ \UUU $, then $ U \cap U' $ is in $ \UUU $.
\item If $ U_i $ are in $ \UUU $, where $ i $ is an element of an indexing set $ S $, then $ \bigcup_{i \in S} U_i $ is in $ \UUU $.
\end{enumerate}
Then the elements of $ \UUU $ are called \textbf{open subsets} of $ X $. The following is an equivalent definition. A set $ X $ with a family $ \VVV $ of subsets $ V \subset X $ is called a \textbf{topological space} if the following properties hold.
\begin{enumerate}
\item $ \VVV $ contains $ \emptyset $ and $ X $.
\item If $ V $ and $ V' $ are in $ \VVV $, then $ V \cup V' $ is in $ \VVV $.
\item If $ V_i $ are in $ \VVV $, where $ i $ is an element of an indexing set $ S $, then $ \bigcap_{i \in S} V_i $ is in $ \VVV $.
\end{enumerate}
Then the elements of $ \UUU $ are called \textbf{closed subsets} of $ X $. For the equivalence, if $ U $ is in $ \UUU $, then define the closed subsets as $ X \setminus U $ for $ U $ in $ \UUU $, and vice versa. Let $ R $ be a ring with unity. Let $ I \subset R $ be an ideal. Let $ \V_I $ be the set of all prime ideals in $ R $ that contain $ I $. Define $ \U_I = \Spec R \setminus \V_I $.

\begin{proposition}
The collection of subsets $ \V_I \subset \Spec R $, for all ideals $ I \subset R $, satisfies $ 1 $, $ 2 $, $ 3 $ of closed subsets, hence defines a topology on $ \Spec R $.
\end{proposition}

\begin{proof}
\hfill
\begin{enumerate}
\item If $ I = 0 $ is the zero ideal, then $ \V_0 = \Spec R $, all prime ideals of $ R $. If $ I = R $, then no prime ideals of $ R $ contain $ R $, so $ \V_R = \emptyset $, so $ 1 $ holds.
\item It is enough to check that $ \V_I \cup \V_J = \V_{IJ} = \V_{I \cap J} $. Note that $ IJ \subset I \cap J $. An element of $ \V_I $ is a prime ideal $ \ppp \supset I $, so $ \ppp \supset IJ $. Conversely, let $ \ppp $ be a prime ideal such that $ IJ \subset \ppp $. Claim that $ I \subset \ppp $ or $ J \subset \ppp $. Suppose not. Then there exists $ x \in I $ such that $ x \notin \ppp $ and there exists $ y \in J $ such that $ y \notin \ppp $. Then $ xy \in IJ \subset \ppp $. This contradicts the definition of prime ideals. So the claim is proved. Thus $ 2 $ holds.
\item Let $ J_i $ for $ i \in S $ be a collection of ideals. Claim that $ \bigcap_{i \in S} \V_{J_i} = \V_J $, where $ J = \sum_{i \in S} J_i $ is the smallest ideal of $ R $ containing all $ J_i $ for $ i \in S $. The elements of $ J $ are finite sums, where each summand is in some $ J_i $. If $ \ppp \supset J_i $ for $ i \in S $, then $ \ppp \supset J $. Conversely, if $ \ppp \supset J \supset J_i $, then $ \ppp \supset J_i $ for all $ i \in S $.
\end{enumerate}
\end{proof}

Recall that if $ f : A \to B $ is a homomorphism of rings, then for any prime ideal $ \ppp \subset B $ the inverse image $ f^{-1}\br{\ppp} $ is a prime ideal. This breaks down for maximal ideals.

\begin{example*}
Take $ f : \ZZ \to \QQ $, then $ f^{-1}\br{0} = 0 $, which is not maximal in $ \ZZ $.
\end{example*}

Then $ f^* : \Spec B \to \Spec A $ sends $ \ppp \subset B $ to $ f^{-1}\br{\ppp} $, which is prime in $ A $. A map of topological spaces is \textbf{continuous} if the inverse image of any open set is open. Equivalently, the inverse images of closed sets are closed.

\begin{proposition}
$ f^* $ is a continuous map.
\end{proposition}

\begin{proof}
Let $ I $ be an ideal in $ A $. We need to show that $ \br{f^*}^{-1}\br{\V_I} = \V_J $ for some ideal $ J $ in $ B $. Let $ J $ be the smallest ideal in $ B $ containing $ f\br{I} $.
\begin{itemize}
\item[$ \subset $] Fix $ \ppp $ in $ \V_I $, a prime ideal in $ A $ such that $ \ppp \supset I $. The elements of the left hand side that are mapped to $ \ppp $ by $ f^* $ are the prime ideals $ \qqq \subset B $ such that $ \ppp = f^{-1}\br{\qqq} $. We have $ I \subset \ppp $, so $ f\br{I} \subset f\br{\ppp} \subset \qqq $, so $ J \subset \qqq $, by definition of $ J $.
\item[$ \supset $] Take any prime ideal $ \qqq \subset B $ such that $ J \subset \qqq $. We have $ I \subset f^{-1}\br{f\br{I}} \subset f^{-1}\br{J} \subset f^{-1}\br{\qqq} $, so $ f^{-1}\br{\qqq} $ is a prime ideal in $ A $ containing $ I $. This ideal is exactly $ f^*\br{\qqq} $, so $ f^*\br{\qqq} $ is in $ \V_I $. Since $ \qqq \in \br{f^*}^{-1}\br{f^*\br{\qqq}} \subset \br{f^*}^{-1}\br{\V_I} $, so we are done.
\end{itemize}
\end{proof}

\pagebreak

\lecture{9}{Wednesday}{23/10/19}

The following are particular cases.
\begin{itemize}
\item Assume $ f $ is surjective. Then $ B \cong A / \ker f $, so
$$ \function{\cbr{\text{prime ideals in} \ B}}{\cbr{\text{prime ideals in} \ A \ \text{containing} \ \ker f}}{\ppp \subset B}{f^{-1}\br{\ppp}}. $$
So in this case $ f^* $ is injective and its image is $ \V_{\ker f} $.
\item Let $ S $ be a multiplicative set in $ A $. Let $ f : A \to S^{-1}A $ be the associated canonical map. By Theorem \ref{thm:6.9} the prime ideals of $ S^{-1}A $ are $ S^{-1}\ppp $, where $ \ppp $ is a prime ideal in $ A $ such that $ \ppp \cap S = \emptyset $. Thus $ f^* : \Spec S^{-1}A \to \Spec A $ is injective and its image consists of $ \ppp \subset A $ such that $ \ppp \cap S = \emptyset $.
\end{itemize}

\begin{example*}
\hfill
\begin{itemize}
\item Let $ k $ be a field. Then $ \Spec k $ is one point.
\item Let $ R = k\sbr{x} $, an integral domain. This is a PID, so every ideal is $ \abr{p\br{x}} $, where $ p\br{x} \in k\sbr{x} $ is monic. Then $ \abr{p\br{x}} $ is prime if and only if $ p\br{x} $ is irreducible, so
$$ \Spec k\sbr{x} = \cbr{0} \cup \cbr{\abr{p\br{x}} \st p\br{x} \ \text{is monic and irreducible}}. $$
In particular, if $ k $ is algebraically closed, such as $ k = \CC $, then
$$ \Spec \CC\sbr{x} = \cbr{0} \cup \cbr{\abr{x - a} \st a \in k} = \CC \cup \cbr{0}. $$
\item Let $ R = \ZZ $, a PID. Then
$$ \Spec \ZZ = \cbr{0} \cup \cbr{\abr{p} \st p \ \text{is a prime number}}. $$
\item Let $ R = \ZZ\sbr{i} $ be the Gaussian integers, a PID. The tautological map $ f : \ZZ \to \ZZ\sbr{i} $ gives rise to $ f^* : \Spec \ZZ\sbr{i} \to \Spec \ZZ $. Take a usual prime $ p $ and decompose $ p $ into a product of primes in $ \ZZ\sbr{i} $.
\begin{itemize}
\item $ 2 = \br{1 + i}\br{1 - i} = -i\br{1 + i}^2 $, where $ 1 + i $ is a prime in $ \ZZ\sbr{i} $.
\item If $ p \equiv 1 \mod 4 $, then $ p = \br{a + bi}\br{a - bi} $. In this case $ a + bi $ and $ a - bi $ are not associated primes.
\item If $ p \equiv 3 \mod 4 $, then $ p $ stays prime in $ \ZZ\sbr{i} $.
\end{itemize}
Then
$$
\begin{array}{cccl}
\Spec \ZZ\sbr{i} & \longrightarrow & \Spec \ZZ & \\
0 & \longmapsto & 0 & \\
\abr{1 + i} & \longmapsto & \abr{2} & \text{ramified} \\
\abr{3} & \longmapsto & \abr{3} & \text{inert} \\
\abr{1 + 2i}, \abr{1 - 2i} & \longmapsto & \abr{5} & \text{split}
\end{array}.
$$
\item Let $ R $ be an integral domain and let $ k $ be the fraction field of $ R $, so $ f : R \hookrightarrow k $. Then $ \Spec k = \cbr{0} $ and $ f^* : \Spec k \to \Spec R $.
\item Let $ k $ be a field, so $ f : k \hookrightarrow k\sbr{x} $. Then $ f^* : \Spec k\sbr{x} \to \Spec k $. If $ \ppp \subset k\sbr{x} $, then $ \ppp \cap k = 0 $, otherwise if $ \ppp $ contains a unit of $ k\sbr{x} $ then $ \ppp = k\sbr{x} $, a contradiction.
\end{itemize}
\end{example*}

Usually, every point of a topological space is a closed subset. But this is not always true. Recall that if $ Y $ is a subset of a topological space $ X $, then the \textbf{closure} of $ Y $ is the smallest closed subset of $ X $ containing $ Y $. It is the same as the intersection of all closed subsets containing $ Y $. Claim that if $ \ppp \subset R $ is a prime ideal, then the closure of $ \ppp $ is $ \V_\ppp $. Any closed subset of $ \Spec R $ containing $ \ppp $ is $ \V_J $, where $ J \subset \ppp $. This $ \V_J $ visibly contains $ \V_\ppp $. Hence $ \V_\ppp $ is the intersection of all such $ \V_J $.

\begin{example*}
In $ \Spec \ZZ $, the point $ \abr{p} $ is closed, because $ \V_{\abr{p}} = \cbr{\abr{p}} $. The point zero is not closed, as $ \V_{0} = \Spec \ZZ $. The closure of zero is all of $ \Spec \ZZ $.
\end{example*}

\begin{example*}
Let $ R = k\sbr{\sbr{t}} $. By sheet $ 1 $, this is a local ring. Its unique maximal ideal is $ \abr{t} $. This is also a unique non-zero prime ideal. \footnote{Exercise} All ideals are zero and $ \abr{t^n} $. Then $ \Spec k\sbr{\sbr{t}} = \cbr{0, \abr{t}} $, where zero is not a closed point, since its closure is $ \Spec k\sbr{\sbr{t}} $, and $ \abr{t} $ is a closed point.
\end{example*}

\pagebreak

\section{Determinants}

\lecture{10}{Thursday}{24/10/19}

Let $ R $ be a commutative ring with unity. Let $ A $ be a matrix $ A = \br{a_{ij}}_{i, j = 1}^n $ for $ a_{ij} \in R $.

\begin{definition}
The \textbf{determinant} of $ A $ is
$$ \det A = \sum_{\pi \in \SSS_n} \sgn \pi \cdot a_{1\pi\br{1}} \cdot \dots \cdot a_{n\pi\br{n}} \in R, $$
where $ \SSS_n $ is the symmetric group and $ \sgn : \SSS_n \to \cbr{\pm 1} $.
\end{definition}

\begin{definition}
The \textbf{$ i, j $-minor} of $ A $ is
$$ \M_{ij} = \det\br{A \ \text{without $ j $-th column and $ i $-th row}} \in R. $$
\end{definition}

\begin{proposition}
$$ \br{-1}^{j + 1}a_{i1}\M_{j1} + \dots + \br{-1}^{j + n}a_{in}\M_{jn} =
\begin{cases}
\det A & i = j \\
0 & i \ne j
\end{cases}.
$$
\end{proposition}

\begin{definition}
The \textbf{adjoint matrix} of $ A $ is the $ n \times n $ matrix $ A^\vee $ with entries
$$ \br{A^\vee}_{ij} = \br{-1}^{i + j}\M_{ji} \qquad \iff \qquad A^\vee = \br{\br{-1}^{i + j}\M_{ij}}^\intercal. $$
\end{definition}

\begin{theorem}[Determinant trick]
\label{thm:8.5}
$$ A \cdot A^\vee = A^\vee \cdot A = \det A \cdot \I_n, $$
where $ \I_n $ is the identity matrix.
\end{theorem}

\section{Modules}

\begin{definition}
Let $ A $ be a commutative ring with unity. An \textbf{$ A $-module} $ M $ is an abelian group with an additional structure $ A \times M \to M $ such that
$$ \lambda\br{x + y} = \lambda x + \lambda y, \qquad \br{\mu + \lambda}x = \mu x + \lambda x, \qquad \mu\br{\lambda x} = \br{\mu\lambda}x, \qquad 1x = x, \qquad \lambda, \mu \in R, \qquad x, y \in M. $$
\end{definition}

\begin{example}
\hfill
\begin{itemize}
\item If $ R $ is a field, then an $ R $-module is the same as a vector space.
\item If $ R = \ZZ $, then an $ R $-module is the same as an abelian group. Remark that if $ G $ is an abelian group then $ n \cdot g = g + \dots + g $ for $ n \in \ZZ_{> 0} $, and $ 0 \cdot g = 0 $ and $ \br{-n} \cdot g = -\br{n \cdot g} $.
\item If $ R $ is any ring, then subgroups of $ R $ that are $ R $-modules are the same as ideals.
\item If $ k $ is a field, then $ k\sbr{x} $-modules are vector spaces $ V $ over $ k $ equipped with a linear transformation $ L : V \to V $. Here $ x $ acts on $ V $ as $ L $.
\end{itemize}
\end{example}

\begin{definition}
If $ M $ and $ N $ are $ R $-modules, then a \textbf{homomorphism of $ R $-modules} $ f : M \to N $ is a homomorphism of abelian groups such that $ f\br{rx} = rf\br{x} $ for all $ x \in M $ and $ r \in R $.
\end{definition}

Then $ \ker f $, $ \im f $, and $ \coker f = N / \im f $ are $ R $-modules.

\begin{definition}
Let $ \Hom_R\br{M, N} $ be the set of $ R $-module homomorphisms $ M \to N $.
\end{definition}

This is an abelian group. Moreover, it is an $ R $-module. If $ r \in R $ and $ f \in \Hom_R\br{M, N} $ then $ r \cdot f $ sends $ x \in M $ to $ rf\br{x} \in N $. A warning is if $ R $ is not commutative $ \Hom_R\br{M, N} $ is just an abelian group.

\begin{definition}
Let $ M $ and $ N $ be submodules of an $ R $-module. Define
$$ \br{N : M} = \cbr{r \in R \st rM \subset N}. $$
\end{definition}

This is an ideal in $ R $.

\begin{example*}
The \textbf{annihilator} of $ M $ is
$$ \Ann M = \br{0 : M} = \cbr{r \in R \st rM = 0}. $$
\end{example*}

\pagebreak

\begin{definition}
An $ R $-module $ M $ is \textbf{finitely generated} if there are elements $ x_1, \dots, x_n \in M $ such that for any $ m \in M $ there are $ r_1, \dots, r_n \in R $ such that $ m = r_1x_1 + \dots + r_nx_n $.
\end{definition}

\begin{example*}
There is a \textbf{free} finitely generated module
$$ R^{\oplus n} = \cbr{\br{t_1, \dots, t_n} \st t_i \in R}, $$
with coordinate-wise addition and multiplication.
\end{example*}

\begin{remark*}
Any finitely generated $ R $-module is a quotient of a free finitely generated $ R $-module. Indeed, define
$$ \function[f]{R^{\oplus n}}{M}{\br{t_1, \dots, t_n}}{t_1x_1 + \dots + t_nx_n}. $$
\end{remark*}

\begin{remark*}
$ JM $ is the smallest submodule of $ M $ containing all elements $ rm $ for $ r \in J $ and $ m \in M $, so
$$ JM = \cbr{\text{finite sums} \ r_1m_1 + \dots + r_km_k} \subset M. $$
\end{remark*}

\begin{lemma}
\label{lem:9.7}
Let $ A $ be a ring. Let $ M $ be a finitely generated $ A $-module. Let $ J \subset A $ be an ideal such that $ JM = M $. Then there is an $ a \in J $ such that $ \br{1 - a}M = 0 $.
\end{lemma}

\begin{proof}
If $ M = 0 $, then it is fine. Suppose $ M \ne 0 $ and $ m_1, \dots, m_n $ are generators of $ M $. Since $ m_i \in M = JM $,
$$ m_1 = x_{11}m_1 + \dots + x_{1n}m_n, \qquad \dots, \qquad m_n = x_{n1}m_1 + \dots + x_{nn}m_n, \qquad x_{ij} \in J. $$
Define $ X = \br{x_{ij}}_{i, j = 1}^n $. Then
$$ \threebyone{m_1}{\vdots}{m_n} = X\threebyone{m_1}{\vdots}{m_n} \qquad \iff \qquad \br{\I_n - X}\threebyone{m_1}{\vdots}{m_n} = 0. $$
Consider the adjoint matrix $ \br{\I_n - X}^\vee $. Then
$$ \br{\I_n - X}^\vee\br{\I_n - X}\threebyone{m_1}{\vdots}{m_n} = 0 \qquad \iff \qquad \det \br{\I_n - X}\threebyone{m_1}{\vdots}{m_n} = 0. $$
We have $ \det \br{\I_n - X} \in A $. Then $ \det \br{\I_n - X} $ is a product of diagonal entries $ \prod_{i = 1}^n \br{1 - x_{ii}} $, plus other terms but every non-diagonal term contains at least one factor in $ J $, so is in $ J $. Finally, $ \det \br{\I_n - X} = 1 - a $, where $ a \in J $. Now, $ \br{1 - a}m_i = 0 $ for $ i = 1, \dots, n $. Hence $ \br{1 - a}M = 0 $.
\end{proof}

\lecture{11}{Tuesday}{29/10/19}

\begin{remark*}
If $ M $ is not finitely generated then this is false. For example, let $ A = \ZZ $ and $ M = \QQ $. If $ p $ is a prime, then $ p\QQ = \QQ $. So for $ J = \abr{p} $ we have $ JM = M $. But no non-zero integer annihilates $ \QQ $, since $ \QQ $ is not a finitely generated $ \ZZ $-module.
\end{remark*}

\begin{corollary}
Let $ R $ be a ring and let $ M $ be a finitely generated $ R $-module. If $ f : M \to M $ is a surjective $ R $-module endomorphism, then $ f $ is an isomorphism.
\end{corollary}

\begin{proof}
Define $ A = R\sbr{t} $. Let us equip $ M $ with the structure of an $ A $-module. Define $ t \cdot m = f\br{m} $ for $ m \in M $. This makes sense because $ f\br{rx} = rf\br{x} $ for all $ r \in R $. Then $ M $ is finitely generated also as an $ A $-module. Since $ f\br{M} = M $, $ tM = M $. Take $ J = \abr{t} \subset A $. By Lemma \ref{lem:9.7} there exists $ a \in \abr{t} $ such that $ \br{1 - a}M = 0 $. Take $ v \in M $ such that $ f\br{v} = 0 $. Then $ tv = 0 $, so $ av = 0 $. Since $ \br{1 - a}v = 0 $, we conclude $ v = 0 $.
\end{proof}

\begin{theorem}[Nakayama's lemma]
\label{thm:9.9}
Let $ A $ be a ring and let $ J \subset A $ be an ideal contained in the Jacobson radical $ \JJJ\br{A} $. If $ M $ is a finitely generated $ A $-module such that $ JM = M $, then $ M = 0 $.
\end{theorem}

\begin{proof}
By Lemma \ref{lem:9.7}, there exists $ a \in J $ such that $ \br{1 - a}M = 0 $. But $ a \in \JJJ\br{A} $, so $ 1 - a $ is a unit in $ A $. Then there exists $ u \in A $ such that $ u\br{1 - a} = 1 $. Hence $ M = u\br{1 - a}M = 0 $.
\end{proof}

\begin{corollary}
\label{cor:9.10}
Let $ A $ be a ring and $ J $ an ideal contained in the Jacobson radical of $ A $. Suppose $ M $ is an $ A $-module, and $ N \subset M $ is a submodule such that $ M / N $ is a finitely generated $ A $-module. Then $ M = N + JM $ implies $ M = N $.
\end{corollary}

\begin{proof}
Apply Nakayama's lemma to $ M / N $. Indeed, we have $ M / N = J\br{M / N} $, so $ M / N = 0 $.
\end{proof}

\pagebreak

Recall that a ring is local when it has a unique maximal ideal. The quotient is called the \textbf{residue field}.

\begin{example*}
For $ k $ a field, $ k\sbr{\sbr{t}} \supset \abr{t} $ and $ k\sbr{\sbr{t_1, \dots, t_n}} \supset \abr{t_1, \dots, t_n} $ are local rings. \footnote{Exercise} If $ A $ is a ring with a prime ideal $ \ppp $, and $ S = A \setminus \ppp $, then $ S^{-1}A $ is a local ring, such as $ A = \ZZ $ and $ \ppp = \abr{p} \subseteq \ZZ_\ppp = \cbr{a / b \st \br{b, p} = 1} $.
\end{example*}

\begin{theorem}
\label{thm:9.11}
Let $ R $ be a local ring with maximal ideal $ J \subset R $ and residue field $ k = R / J $. Let $ M $ be a finitely generated $ R $-module.
\begin{enumerate}
\item $ M / JM $ is a finite-dimensional vector space over $ k $.
\item Let $ v_1, \dots, v_n $ be a basis of $ M / JM $ as a vector space over $ k $. Choose $ \widetilde{v_1}, \dots, \widetilde{v_n} \in M $ to be representatives of $ v_1, \dots, v_n $ respectively, that is $ v_i = \widetilde{v_i} + JM $. Then $ \widetilde{v_1}, \dots, \widetilde{v_n} $ generate $ M $ as an $ R $-module. Moreover, this is a minimal set of generators of $ M $, that is no proper subset generates $ M $.
\item All minimal sets of generators of $ M $ are obtained in this way. In particular, all such minimal sets of generators have $ n $ elements, where $ n = \dim_k M / JM $.
\end{enumerate}
\end{theorem}

\begin{proof}
$ J $ is the Jacobson radical of $ A $.
\begin{enumerate}
\item Any quotient of a finitely generated $ R $-module is a finitely generated $ R $-module. Hence $ M / JM $ is a finitely generated $ R $-module. But if $ x \in J $ then $ x \cdot M / JM = 0 $. So $ R $ acts on $ M / JM $ via the quotient $ k = R / J $. One says that the action of $ R $ descends to an action of $ k $. Thus $ M / JM $ is a $ k $-module, which is finitely generated. In other words, $ M / JM $ is a finite-dimensional $ k $-vector space.
\item Consider
$$ N = R\widetilde{v_1} + \dots + R\widetilde{v_n} = \cbr{r_1\widetilde{v_1} + \dots + r_n\widetilde{v_n} \st r_i \in R} \subset M. $$
Since $ M / JM $ is generated by $ v_1, \dots, v_n $, $ M = N + JM $, since $ M / JM = N / JN $. By Corollary \ref{cor:9.10} we have $ M = N $. If a proper subset of $ \widetilde{v_1}, \dots, \widetilde{v_n} $ generates $ M $, then a proper subset of $ v_1, \dots, v_n $ generates an $ n $-dimensional vector space. A contradiction.

\lecture{12}{Wednesday}{30/10/19}

\item Suppose $ m_1, \dots, m_n $ is any minimal generating set of the $ R $-module $ M $. Consider $ \overline{m_1}, \dots, \overline{m_n} \in M / JM $. Then $ \overline{m_1}, \dots, \overline{m_n} $ span the vector space $ M / JM $. If this is not a basis, then $ M / JM $ is spanned by a proper subset of $ \overline{m_1}, \dots, \overline{m_n} $. In particular, a basis is a proper subset. By part $ 2 $ a proper subset of $ m_1, \dots, m_n $ generates $ M $. This contradicts the minimality of $ m_1, \dots, m_n $.
\end{enumerate}
\end{proof}

The moral of the story is any finitely generated module $ M $ over a local ring $ R $ has a minimal set of generators. Then $ m_1, \dots, m_n $ is a minimal set of generators of $ M $ if and only if $ \overline{m_1}, \dots, \overline{m_n} $ is a basis of the $ k $-vector space $ M / JM $, and $ n $ is well-defined.

\section{Localisation of modules}

Let $ A $ be a ring with a multiplicative set $ S \subset A $.

\begin{definition}
Let $ M $ be an $ A $-module. Consider the set $ M \times S $. Equip it with a relation $ \sim $ such that
$$ \br{m, s} \sim \br{n, t} \qquad \iff \qquad \exists u \in S, \ u\br{mt - ns} = 0. $$
This is an equivalence relation.
\begin{itemize}
\item Define $ S^{-1}M $ as the set of equivalence classes.
\item The equivalence class of $ \br{m, s} $ is written as $ m / s $.
\end{itemize}
Turn $ S^{-1}M $ into a $ S^{-1}A $-module as follows. Let $ 0 / 1 \in S^{-1}M $, and
$$ \dfrac{m}{s} + \dfrac{b}{t} = \dfrac{mt + bs}{st}, \qquad \dfrac{a}{s} \cdot \dfrac{m}{t} = \dfrac{am}{st}, \qquad a \in A, \qquad m \in M, \qquad s, t \in S. $$
This is the \textbf{localisation of $ M $ with respect to $ S $}.
\end{definition}

\pagebreak

Now let us consider a particular kind of multiplicative set.

\begin{definition}
Let $ \ppp \subset A $ be a prime ideal. Let $ S = A \setminus \ppp $. This is a multiplicative set. Then the \textbf{localisation $ S^{-1}A $ of $ A $ at $ \ppp $} is written as $ A_\ppp $.
\end{definition}

\begin{theorem}
Let $ \ppp \subset A $ be a prime ideal. Then $ A_\ppp $ is a local ring with unique maximal ideal
$$ \ppp A_\ppp = \cbr{\dfrac{x}{y} \st x \in \ppp, \ y \notin \ppp}. $$
\end{theorem}

\begin{remark*}
In general, a ring $ R $ with an ideal $ J $ is a local ring with maximal ideal $ J $ if and only if $ R^* = R \setminus J $. Indeed, if $ J \subset R $ is a maximal ideal, then for any $ x \in R \setminus J $, $ J + xR $ contains one. This forces $ x $ to be a unit. Conversely, if $ R^* = R \setminus J $ then $ J $ is maximal and is a unique maximal ideal.
\end{remark*}

\begin{proof}
Suppose $ a / s \in A_\ppp^* $. Then $ a / s \cdot b / t = 1 / 1 $ for some $ b \in A $ and $ t \in A \setminus \ppp $. By definition $ u\br{ab - st} = 0 $ for $ u \in A \setminus \ppp $, so $ uab = ust \notin \ppp $, since all factors are in $ S = A \setminus \ppp $. Therefore, $ a \notin \ppp $, hence $ a / s \notin \ppp A_\ppp $. Conversely, if $ a / s \notin \ppp A_\ppp $ for $ s \notin \ppp $, then $ a \notin \ppp $. Thus $ a / s $ is a unit in $ A_\ppp $ because $ a / s \cdot s / a = 1 $.
\end{proof}

\begin{example}
Let $ R = \ZZ $ and $ \ppp = \abr{p} $. Then
$$ p\ZZ_{\abr{p}} = \cbr{\dfrac{x}{y} \st p \mid x, \ p \nmid y} \subset \cbr{\dfrac{x}{y} \st x \in \ZZ, \ p \nmid y} = \ZZ_{\abr{p}} $$
is the unique maximal ideal.
\end{example}

\begin{proposition}
Let $ M $ be an $ A $-module. Consider $ M_\mmm = \br{A \setminus \mmm}^{-1}M $, where $ \mmm \subset A $ is a maximal ideal. Then $ M = 0 $ if and only if $ M_\mmm = 0 $ for any maximal ideal $ \mmm \subset A $.
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Obvious.
\item[$ \impliedby $] Assume $ M \ne 0 $, so there exists $ 0 \ne x \in M $. Define
$$ I = \Ann x = \cbr{a \in A \st ax = 0}, $$
so $ 1 \notin I $ since $ x \ne 0 $. Choose a maximal ideal $ \mmm $ containing $ I $. If $ M_\mmm = 0 $, then $ x / 1 = 0 $. We know that $ x \in \ker \br{M \to M_\mmm} $ if and only if $ ux = 0 $ for some $ u \in A \setminus \mmm $. A contradiction, since $ I \subset \mmm $.
\end{itemize}
\end{proof}

The following is a corollary. Let $ M $ be a finitely generated $ A $-module. Then $ m_1, \dots, m_n $ generate $ M $ if and only if $ m_1, \dots, m_n $ generate the $ A_\mmm $-module $ M_\mmm $ for any maximal ideal $ \mmm \subset A $. By Theorem \ref{thm:9.11} applied to $ A_\mmm $, this is if and only if the images $ \overline{m_1}, \dots, \overline{m_n} $ in $ M / \mmm M \cong M_\mmm / \mmm M_\mmm $ generate the $ k\br{\mmm} $-vector space, where $ k\br{\mmm} = A / \mmm $, for every maximal ideal $ \mmm \subset A $.

\begin{corollary}
\label{cor:10.6}
Assume $ A $ is an integral domain with field of fractions $ K $. In this case $ A $ is a subring of $ K $. For any prime ideal $ \ppp \subset A $ the local ring $ A_\ppp $ is also a subring of $ K $. Then
$$ A = \bigcap_{\text{all prime ideals} \ \ppp \subset A} A_\ppp, $$
as subsets of $ K $.
\end{corollary}

\begin{proof}
Clearly, $ A \subset A_\ppp $, so the left hand side is in the right hand side. Let us prove that if $ x \in K $ is contained in each $ A_\ppp $, then $ x \in A $. Consider
$$ I = \cbr{a \in A \st ax \in A}. $$
Visibly, $ I $ is an ideal in $ A $. We are given that $ x = m / s $, where $ m \in A $ and $ s \in A \setminus \ppp $. Hence $ s \in I $. So $ I $ contains an element not in $ \ppp $ for every $ \ppp $. Then $ I = A $, because otherwise $ I $ is contained in some maximal ideal but maximal ideals are prime. Hence $ 1 \in I $, so $ x \in A $.
\end{proof}

\lecture{13}{Thursday}{31/10/19}

Lecture 13 is a problems class.

\lecture{14}{Tuesday}{05/11/19}

Lecture 14 is a class test.

\pagebreak

\section{Chain conditions}

\lecture{15}{Wednesday}{06/11/19}

\begin{lemma}
\label{lem:11.1}
Let $ \Sigma $ be a partially ordered set. The following are equivalent.
\begin{itemize}
\item Every maximal non-empty subset of $ \Sigma $ has a maximal element, so no element of the subset is bigger.
\item Every ascending chain of elements of $ \Sigma $ is stationary, so there exists $ i_0 \in I $ such that $ a_{i_0} = a_i $ for all $ i > i_0 $.
\end{itemize}
\end{lemma}

\begin{proof}
\hfill
\begin{enumerate}
\item[$ \implies $] Take a maximal element of the chain, say $ a_{i_0} $. Then for any $ i \ge i_0 $ we have $ a_i = a_{i_0} $.
\item[$ \impliedby $] Suppose $ S \subset \Sigma $ has no maximal element. Then choose any element in $ S $, say $ a_1 $. This is not maximal, so can choose $ a_2 \in S $ such that $ a_1 < a_2 $. Keep doing this, get an infinite chain which is not stationary, because $ a_i \ne a_j $ for all $ i \ne j $.
\end{enumerate}
\end{proof}

\begin{definition}
Let $ A $ be a ring and let $ M $ be an $ A $-module. Then $ M $ is called \textbf{Noetherian} if any ascending chain of submodules of $ M $ is stationary. In other words, if $ M_1 \subset M_2 \subset \dots \subset M $ are $ A $-submodules, then there exists $ n $ such that $ M_n = M_{n + 1} = \dots $. Then $ M $ is called \textbf{Artinian} if any descending chain of submodules of $ M $ is stationary. The ring $ A $ is \textbf{Noetherian}, or \textbf{Artinian}, if such is the $ A $-module $ A $.
\end{definition}

\begin{proposition}
Let $ A $ be a ring and let $ M $ be an $ A $-module. The following are equivalent.
\begin{itemize}
\item $ M $ is Noetherian.
\item Every $ A $-submodule of $ M $ is finitely generated.
\end{itemize}
In particular, $ A $ is a Noetherian ring if and only if every ideal in $ A $ is finitely generated.
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Suppose that $ N \subset M $ is a submodule which is not finitely generated. Let $ N_1 = 0 $. Since $ N $ is not finitely generated we can find $ 0 \ne x \in N $ such that $ N_2 = Ax $, the submodule generated by $ x $, and $ N \ne N_2 $. So we continue. If $ 0 = N_1 \subsetneq \dots \subsetneq N_m $ are constructed, then $ N_m \ne N $, so there exists $ y \in N $ such that $ y \notin N_m $. Define $ N_{m + 1} = N_m + Ay $, the smallest module containing $ N_m $ and $ y $. Since $ N $ is not finitely generated, this chain is not stationary.
\item[$ \impliedby $] Let $ M_1 \subset M_2 \subset \dots \subset M $. Must prove that this chain is stationary. Define
$$ N = \bigcup_{i \in I} M_i. $$
This is a submodule of $ M $. We know that $ N = Rx_1 + \dots + Rx_n $ where $ x_1, \dots, x_n \in N $. Then $ x_k $ is contained in some $ M_{i_k} $. Suppose that $ i_0 = \max\cbr{i_1, \dots, i_n} $. Then $ x_{i_1}, \dots, x_{i_n} \in M_{i_0} $, since $ M_{i_1} \subset M_{i_0}, \dots, M_{i_k} \subset M_{i_0} $. But now we see that $ M_{i_0} \supset N $. Since $ M_{i_0} \subset N $, we must have $ N = M_{i_0} $. Hence $ M_{i_0} = M_{i_0 + 1} = \dots $.
\end{itemize}
\end{proof}

\begin{proposition}
\label{prop:11.4}
Suppose $ M $ is an $ A $-module. Let $ N \subset M $ be a submodule. Then $ M $ is Noetherian if and only if $ N $ and $ M / N $ are both Noetherian, and $ M $ is Artinian if and only if $ N $ and $ M / N $ are both Artinian.
\end{proposition}

\begin{proof}
The Noetherian case.
\begin{itemize}
\item[$ \implies $] Suppose $ M $ is Noetherian. Ascending chains of submodules of $ N $ are ascending chains of submodules of $ M $, so must be stationary. Let $ f : M \twoheadrightarrow N $ be the canonical map. If $ L_1 \subset L_2 \subset \dots $ is a chain of submodules of $ M / N $, then $ f^{-1}\br{L_1} \subset f^{-1}\br{L_2} \subset \dots $ is a chain of submodules of $ M $. This is stationary. Since $ f\br{f^{-1}\br{L_i}} = L_i $, the original chain of $ L_i $'s is stationary.

\lecture{16}{Thursday}{07/11/19}

\item[$ \impliedby $] Now assume that $ N $ and $ M / N $ are Noetherian. We need to prove that an ascending chain $ M_1 \subset M_2 \subset \dots $ of submodules of $ M $ is stationary. Then $ N \cap M_1 \subset N \cap M_2 \subset \dots $ is a chain of submodules of $ N $. Similarly, $ M_1 / \br{N \cap M_1} \subset M_2 / \br{N \cap M_2} \subset \dots $. Indeed, $ M_1 \to M_2 $ is clearly injective, and $ \ker \br{M_1 \to M_2 / \br{N \cap M_2}} = N \cap M_1 $. Therefore, $ M_1 / \br{N \cap M_1} $ injectively maps to $ M_2 / \br{N \cap M_2} $.

\pagebreak

Then
$$
\begin{tikzcd}[row sep=small]
M_1 / \br{M_1 \cap N} \arrow[hookrightarrow]{r} & M_2 / \br{M_2 \cap N} \arrow[hookrightarrow]{r} & \dots \arrow[hookrightarrow]{r} & M / N \\
M_1 \arrow[twoheadrightarrow]{u} \arrow[hookrightarrow]{r} & M_2 \arrow[twoheadrightarrow]{u} \arrow[hookrightarrow]{r} & \dots \arrow[hookrightarrow]{r} & M \arrow[twoheadrightarrow]{u} \\
M_1 \cap N \arrow[hookrightarrow]{u} \arrow[hookrightarrow]{r} & M_2 \cap N \arrow[hookrightarrow]{u} \arrow[hookrightarrow]{r} & \dots \arrow[hookrightarrow]{r} & M \arrow[hookrightarrow]{u}
\end{tikzcd}.
$$
If $ F $ and $ G $ are submodules of $ H $, then we have a natural map
$$ \function{F}{\br{F + G} / G}{x}{x + G}. $$
The kernel of this map is $ F \cap G $. The map $ F \to \br{F + G} / G $ is surjective. So we have a canonical isomorphism $ F / \br{F \cap G} \xrightarrow{\sim} \br{F + G} / G $. Apply this to $ F = M_i $, $ G = N $, and $ H = M $. Then
$$
\begin{tikzcd}[row sep=small]
\br{M_1 + N} / N \arrow[hookrightarrow]{r} & \br{M_2 + N} / N \arrow[hookrightarrow]{r} & \dots \arrow[hookrightarrow]{r} & M / N \\
M_1 / \br{M_1 \cap N} \arrow{u}{\sim} \arrow[hookrightarrow]{r} & M_2 / \br{M_2 \cap N} \arrow{u}{\sim} \arrow[hookrightarrow]{r} & \dots \arrow[hookrightarrow]{r} & M / N \arrow{u}{\sim}
\end{tikzcd}.
$$
There exists $ a \in \NN $ such that $ M_i \cap N = M_a \cap N $ for all $ i \ge a $. There exists $ b \in \NN $ such that $ \br{M_i + N} / N = \br{M_b + N} / N $ for all $ i \ge b $. Define $ c = \max\cbr{a, b} $. Then
$$
\begin{tikzcd}[row sep=small]
\br{M_c + N} / N \arrow{r}{\sim} & \br{M_i + N} / N \\
y \in M_c \arrow[twoheadrightarrow]{u} \arrow[hookrightarrow]{r} & M_i \ni x \arrow[twoheadrightarrow]{u} \\
M_c \cap N \arrow[hookrightarrow]{u} \arrow{r}[swap]{\sim} & M_i \cap N \arrow[hookrightarrow]{u}
\end{tikzcd}.
$$
Claim that $ M_i = M_c $ for all $ i \ge c $. It remains to show that any $ x \in M_i $ is in fact in $ M_c $. Since the top arrow is an isomorphism, and $ M_c \to \br{M_c + N} / N $ is surjective, we can find $ y \in M_c $ whose image in $ \br{M_i + N} / N $ is equal to the image of $ x $. Then $ x - y \in M_i $ goes to zero in $ \br{M_i + N} / N $. Thus $ x - y \in M_i \cap N $. Hence $ x - y \in M_c \cap N \subset M_c $. Hence $ x = \br{x - y} + y \in M_c $. Therefore, $ M_c = M_i $.
\end{itemize}
\end{proof}

\begin{corollary}
Let $ A $ be a Noetherian ring and let $ M $ be a finitely generated $ A $-module. Then $ M $ is Noetherian. Similarly, if $ A $ is Artinian, then any finitely generated $ A $-module is Artinian.
\end{corollary}

\begin{proof}
Recall that any finitely generated $ A $-module is a quotient of a free module $ A^{\oplus n} = A \oplus \dots \oplus A $. Proposition \ref{prop:11.4} implies that since $ A $ is a submodule of $ A^{\oplus 2} $ via $ x \mapsto \br{x, 0} $, and the quotient is isomorphic to $ A $, that $ A^{\oplus 2} $ is Noetherian. Hence $ A^{\oplus n} $ is Noetherian. Applying Proposition \ref{prop:11.4} to the surjective map $ A^{\oplus n} \to M $ we prove that $ M $ is Noetherian.
\end{proof}

\begin{corollary}
\label{cor:11.6}
Let $ M $ be an $ A $-module. If $ 0 = M_0 \subset \dots \subset M_n = M $ are $ A $-submodules such that $ M_{i + 1} / M_i $ is a Noetherian $ A $-module, then $ M $ is also a Noetherian $ A $-module. The same statement is true for Artinian modules.
\end{corollary}

\begin{proof}
Apply Proposition \ref{prop:11.4}. Since $ M_1 / M_0 $ is Noetherian and $ M_2 / M_1 $ is Noetherian, $ M_2 $ is Noetherian, etc.
\end{proof}

\begin{lemma}
\label{lem:11.7}
Let $ A $ be a Noetherian ring. Let $ S \subset A $ be a multiplicative set. Then $ S^{-1}A $ is Noetherian.
\end{lemma}

\begin{proof}
By Lemma \ref{lem:11.1} it is enough to prove that any non-empty set of ideals of $ S^{-1}A $ has a maximal element. So take $ J $ a non-empty set of ideals of $ S^{-1}A $. Let
$$ \function[f]{A}{S^{-1}A}{a}{\dfrac{a}{1}}. $$
Consider $ \cbr{f^{-1}\br{I} \st I \in J} $. This is a set of ideals of $ A $. It has a maximal element, say $ I_0 $, since $ A $ is Noetherian. Then $ I_0 = S^{-1}f\br{I_0} $ is a maximal element of $ J $.
\end{proof}

\pagebreak

\section{Primary decomposition}

\begin{definition}
An ideal $ I \subsetneq R $ is called \textbf{primary} if for all $ x, y \in R $ such that $ xy \in I $ we have either $ x \in I $ or $ y^n \in I $ for some $ n \ge 1 $. Equivalently, every zero-divisor in $ R / I $ is a nilpotent element of $ R / I $.
\end{definition}

\begin{example*}
If $ R = \ZZ $ and $ p $ a prime number then $ \abr{p^n} $ is a primary ideal.
\end{example*}

\lecture{17}{Tuesday}{12/11/19}

\begin{proposition}
\label{prop:12.2}
If $ \rad I $ is a maximal ideal, then $ I $ is primary. In particular, any power of a maximal ideal is primary.
\end{proposition}

\begin{proof}
Recall $ \rad I $ is the intersection of all prime ideals containing $ I $. In particular, if $ \rad I $ is a maximal ideal, then it is a unique prime ideal containing $ I $. Then $ R / I $ has a unique prime ideal $ \rad I / I $, so $ R / I $ is a local ring. Hence $ \NNN\br{R / I} = \JJJ\br{R / I} = \rad I / I $. Clearly, $ \br{R / I} \setminus \br{\rad I / I} = \br{R / I}^* $. Thus any element of $ R / I $ is either a unit, or a nilpotent element. Hence $ I $ is primary. If $ \mmm \subset R $ is a maximal ideal, then $ \rad \mmm^n = \mmm $.
\end{proof}

\begin{proposition}
Let $ I \subset R $ be a primary ideal. Then $ \rad I $ is a prime ideal. This is the smallest prime ideal of $ R $ that contains $ I $.
\end{proposition}

\begin{remark*}
$$ \cbr{\text{ideals} \ I \subset R \st \rad I \ \text{is a maximal ideal}} \subset \cbr{\text{primary ideals}} \subset \cbr{\text{ideals} \ I \subset R \st \rad I \ \text{is a prime ideal}}. $$
\end{remark*}

\begin{proof}
Suppose $ xy \in \rad I $, so $ x^my^m = \br{xy}^m \in I $, but $ x \notin \rad I $, so $ x^m \notin I $. So in $ R / I $ we have $ x^my^m = 0 $ and $ x^m \ne 0 $. Since $ I $ is primary, every zero-divisor in $ R / I $ is nilpotent. Hence $ \br{y^m}^n = 0 $ for some $ n \ge 1 $. But then in $ R $ we have $ y^{mn} \in I $, so $ y \in \rad I $. This proves that $ \rad I $ is prime. Recall that $ \rad I $ is the intersection of all prime ideals containing $ I $. If $ \rad I $ is already a prime ideal, it is the smallest ideal containing $ I $.
\end{proof}

A \textbf{primary decomposition} of an ideal $ I \subset R $ is the representation
$$ I = \bigcap_{m = 1} J_m, $$
where $ J_1, \dots, J_m $ are primary ideals of $ R $. The aim is that any ideal in a Noetherian ring has a primary decomposition.

\begin{example*}
Let $ R = \ZZ $. Then $ n = \prod_{i = 1}^m p_i^{a_i} $, where $ p_i $'s are prime numbers, and $ a_i \ge 1 $, so
$$ \abr{n} = \prod_{i = 1}^m \abr{p_i^{a_i}} = \bigcap_{i = 1}^m \abr{p_i^{a_i}}. $$
Clearly, $ \abr{p_i} $ are maximal ideals of $ \ZZ $. So, $ \abr{p_i^{a_i}} $ are primary ideals of $ \ZZ $.
\end{example*}

\begin{definition}
Let $ I \subsetneq R $ be an ideal. Then $ I $ is called \textbf{irreducible} if for any ideals $ J $ and $ K $ of $ R $ such that $ I = J \cap K $ we have $ I = J $ or $ I = K $. In other words, $ I $ is irreducible if $ I \ne J \cap K $, where $ I \subsetneq J $ and $ I \subsetneq K $.
\end{definition}

\begin{proposition}
\hfill
\begin{enumerate}
\item Any prime ideal is irreducible.
\item In a Noetherian ring, any irreducible ideal is primary.
\end{enumerate}
\end{proposition}

Thus
$$ \cbr{\text{prime ideals}} \subset \cbr{\text{irreducible ideals}} \subset \cbr{\text{primary ideals}}. $$

\begin{exercise*}
Show that these are strict in general.
\end{exercise*}

\pagebreak

\begin{proof}
\hfill
\begin{enumerate}
\item Suppose $ \ppp \subset R $ is a prime ideal such that $ \ppp = J \cap K $, where $ \ppp \ne J $ and $ \ppp \ne K $. Let $ x \in J \setminus \ppp $ and $ y \in K \setminus \ppp $. Then $ xy \in JK \subset J \cap K = \ppp $. This is a contradiction, since $ \ppp $ is prime.
\item Let $ I $ be an irreducible ideal of a Noetherian ring $ R $. Consider $ R / I $. Suppose $ x, y \in R / I $ such that $ xy = 0 $ and $ x \ne 0 $. The task is to show that $ y^n = 0 $ for some $ n \ge 1 $. Since $ R $ is Noetherian, $ R / I $ is Noetherian. Consider
$$ \Ann y^m = \cbr{\alpha \in R / I \st \alpha y^m = 0}. $$
Then $ \Ann y \subset \Ann y^2 \subset \dots \subset R / I $. There exists $ n $ such that $ \Ann y^n = \Ann y^{n + i} $, for all $ i \ge 0 $. Claim that $ \abr{x} \cap \abr{y^n} = 0 $. Suppose $ 0 \ne a \in \abr{x} \cap \abr{y^n} $. Then $ ay = 0 $ and also $ a = by^n $ for some $ b \in R / I $. Then $ 0 = ay = by^{n + 1} $. This says that $ b \in \Ann y^{n + 1} = \Ann y^n $. Hence $ by^n = 0 $, so $ a = 0 $, a contradiction. But the ideal $ I \subset R $ is irreducible, hence the ideal $ 0 \subset R / I $ is irreducible. We know that $ \abr{x} \ne 0 $. Thus $ \abr{y^n} = 0 $, so $ y^n = 0 $. This finishes the proof.
\end{enumerate}
\end{proof}

\lecture{18}{Wednesday}{13/11/19}

\begin{theorem}[Noether]
Every ideal in a Noetherian ring has a primary decomposition.
\end{theorem}

\begin{proof}
We shall in fact prove that every ideal is a finite intersection of irreducible ideals. Suppose this does not hold for a Noetherian ring $ R $. Let $ \Sigma $ be the set of proper ideals of $ R $ that are not finite intersections of irreducible ideals. Assume $ \Sigma \ne \emptyset $. In a Noetherian ring every non-empty set of ideals has a maximal element. Take a maximal element of $ \Sigma $. This is an ideal $ I \subsetneq R $. Then $ I $ is not a finite intersection of irreducible ideals, in particular $ I $ is not irreducible. Thus $ I = J \cap K $, where $ J \supsetneq I $ and $ K \supsetneq I $ are ideals of $ R $. Since $ I $ is a maximal element of $ \Sigma $, we can write $ J = \bigcap_{m = 1}^n J_m $ and $ K = \bigcap_{s = 1}^r K_s $, where each $ J_m $ and each $ K_s $ is irreducible. Hence
$$ I = \br{\bigcap_{m = 1}^n J_m} \cap \br{\bigcap_{s = 1}^r K_s} $$
is a finite intersection of irreducible ideals. This is a contradiction. This shows that $ \Sigma = \emptyset $.
\end{proof}

\begin{lemma}
\label{lem:12.7}
Let $ I_1, \dots, I_n $ be primary ideals in $ R $ such that $ \rad I_1 = \dots = \rad I_n $. Then $ \bigcap_{j = 1}^n I_j $ is also a primary ideal and
$$ \rad \bigcap_{j = 1}^n I_j = \rad I_1 = \dots = \rad I_n. $$
\end{lemma}

\begin{proof}
Let $ \ppp = \rad I_j $ for $ j = 1, \dots, n $, and let $ I = \bigcap_{j = 1}^n I_j $. Suppose $ x, y \in R $ such that $ xy \in I $, but $ x \notin I $. Hence $ x \notin I_j $ for some $ j $. We have $ xy \in I_j $ but $ x \notin I_j $ thus $ y \in \rad I_j $, since $ I_j $ is primary. So $ y \in \ppp $. Then
$$ \rad I = \rad \bigcap_{j = 1}^n I_j = \bigcap_{j = 1}^n \rad I_j = \ppp, $$
by problem sheet $ 2 $ question $ 2 $(b). Hence $ y \in \rad I $. This shows that $ I $ is primary. Moreover, $ \rad I = \ppp $.
\end{proof}

\begin{lemma}
\label{lem:12.8}
Let $ I $ be a primary ideal of $ R $ such that $ \rad I $ is a prime ideal $ \ppp $. We say that $ I $ is a \textbf{$ \ppp $-primary ideal}. Then
$$ \br{I : \abr{x}} =
\begin{cases}
R & x \in I \\
\text{a $ \ppp $-primary ideal} & x \notin I
\end{cases}.
$$
\end{lemma}

\begin{proof}
If $ x \in I $, then $ 1 \in \br{I : \abr{x}} $. Hence $ \br{I : \abr{x}} = R $. Now assume $ x \notin I $. Then $ \br{I : \abr{x}} = \cbr{y \in R \st xy \in I} $. Since $ I $ is primary, this implies $ y^n \in I $ and $ y \in \rad I = \ppp $. So $ I \subset \br{I : \abr{x}} \subset \ppp $, so $ \ppp = \rad I \subset \rad \br{I : \abr{x}} \subset \ppp $, so $ \rad \br{I : \abr{x}} = \ppp $. It remains to show that $ \br{I : \abr{x}} $ is primary. Assume $ yz \in \br{I : \abr{x}} $ whereas $ y \notin \rad \br{I : \abr{x}} = \ppp $. We must show that $ z \in \br{I : \abr{x}} $. Since $ yz \in \br{I : \abr{x}} $, $ y\br{xz} = xyz \in I $. Then $ I $ is primary and $ y \notin \ppp = \rad I $. So no power of $ y $ is contained in $ I $, therefore $ xz \in I $, so $ z \in \br{I : \abr{x}} $.
\end{proof}

\pagebreak

Call a primary decomposition $ I = \bigcap_{j = 1}^k I_j $ \textbf{minimal} if
\begin{enumerate}
\item $ \rad I_j \ne \rad I_k $ for $ j \ne k $, and
\item for every $ j = 1, \dots, n $, $ \bigcap_{k = 1, \ k \ne j}^n I_k \not\subset I_j $.
\end{enumerate}
Can achieve $ 1 $ by Lemma \ref{lem:12.7}.

\begin{theorem}[First uniqueness theorem]
Let $ I = \bigcap_{j = 1}^n I_j $ be a minimal primary decomposition. Write $ \ppp_j = \rad I_j $ for $ j = 1, \dots, n $. Then the prime ideals $ \ppp_1, \dots, \ppp_n $ are precisely recovered as the prime ideals of $ R $ of the form $ \rad \br{I : \abr{x}} $, where $ x \in R $. In particular, $ \ppp_1, \dots, \ppp_n $ do not depend on the primary decomposition chosen.
\end{theorem}

\lecture{19}{Thursday}{14/11/19}

\begin{proof}
Take any $ x \in R $. Then
$$ \br{I : \abr{x}} = \br{\bigcap_{j = 1}^k I_j : \abr{x}} = \cbr{y \in R \st xy \in \bigcap_{j = 1}^k I_j} = \bigcap_{j = 1}^k \cbr{y \in R \st xy \in I_j} = \bigcap_{j = 1}^k \br{I_j : \abr{x}}. $$
Take the radicals of these ideals. Problem sheet $ 2 $ question $ 2 $(b) says that the radical of an intersection is the intersection of their radicals, so $ \rad \br{I : \abr{x}} = \bigcap_{j = 1}^k \rad \br{I_j : \abr{x}} $. Note that by Lemma \ref{lem:12.8}
$$ \rad \br{I_j : \abr{x}} =
\begin{cases}
R & x \in I_j \\
\ppp_j & x \notin I_j
\end{cases},
$$
so $ \rad \br{I : \abr{x}} = \bigcap_{x \notin I_j} \ppp_j $. Lemma \ref{lem:4.12} says that $ \ppp = \bigcap_{i = 1}^m J_i $ is prime implies that $ \ppp $ is one of the $ J_i $'s. Hence if $ \rad \br{I : \abr{x}} $ is a prime ideal, then it is one of $ \ppp_j = \rad \br{I_j : \abr{x}} $ for $ x \notin I_j $. So we recover all of $ \ppp_1, \dots, \ppp_n $ and nothing else.
\end{proof}

\begin{remark*}
These prime ideals $ \ppp_1, \dots, \ppp_n $ are called the \textbf{associated primes} of $ I $.
\end{remark*}

\begin{example*}
\hfill
\begin{itemize}
\item Let $ R = \ZZ $. Then
$$ \cbr{\text{prime ideals}} = \cbr{0} \cup \cbr{\text{maximal ideals}} = \cbr{0} \cup \cbr{\abr{p} \st p \ \text{prime}}, $$
$$ \cbr{\text{primary ideals}} = \cbr{\text{irreducible ideals}} = \cbr{0} \cup \cbr{\abr{p^n} \st p \ \text{prime}}. $$
For example, $ \abr{4} \subsetneq \abr{2} \subsetneq \ZZ $ is irreducible.
\item Let $ R = k\sbr{x} $ for $ k $ a field. Then
$$ \cbr{\text{prime ideals}} = \cbr{0} \cup \cbr{\text{maximal ideals}} = \cbr{0} \cup \cbr{\abr{p\br{x}} \st p\br{x} \ \text{monic irreducible polynomial}}, $$
$$ \cbr{\text{primary ideals}} = \cbr{\text{irreducible ideals}} = \cbr{0} \cup \cbr{\abr{p\br{x}^n} \st p\br{x} \ \text{monic irreducible polynomial}}. $$
\item Let $ R = k\sbr{x, y} $.
\begin{itemize}
\item $ \abr{x} $ is prime, since $ k\sbr{x, y} / \abr{x} \cong k\sbr{y} $ is an integral domain.
\item $ \abr{x, y} $ is maximal, since $ k\sbr{x, y} / \abr{x, y} \cong k $ is a field.
\item $ \abr{x, y^2} $ is not prime, since $ k\sbr{x, y} / \abr{x, y^2} \cong k \oplus ky $ is not an integral domain, where $ y^2 = 0 $. Then $ \rad \abr{x, y^2} = \abr{x, y} $, so Proposition \ref{prop:12.2} implies that $ \abr{x, y^2} $ is primary.
\item $ \abr{xy} $ is not prime, since $ x^n, y^n \notin \abr{xy} $ for all $ n \ge 1 $ and $ xy \in \abr{xy} $, and $ k\sbr{x, y} / \abr{xy} $ has zero-divisors which are not nilpotent, so $ \abr{xy} $ is also not primary. Then $ \abr{xy} = \abr{x}\abr{y} = \abr{x} \cap \abr{y} $ is a primary decomposition, where $ \abr{x} $ and $ \abr{y} $ are prime, hence primary.
\item $ \abr{x^ay^b} = \abr{x^a} \cap \abr{y^b} $ for $ a, b \ge 1 $ is a primary decomposition, since $ \abr{x^a} $ and $ \abr{y^b} $ are primary, for example since $ k\sbr{x, y} / \abr{x^a} \cong k\sbr{y} \oplus \dots \oplus k\sbr{y}x^{a - 1} $ has no non-nilpotent zero-divisors.
\item $ \abr{x^2, xy^2} = \abr{x}\abr{x, y^2} $ is not primary, since $ y $ gives a zero-divisor in $ k\sbr{x, y} / \abr{x^2, xy^2} $ which is not nilpotent. Find a primary decomposition. \footnote{Exercise}
\item $ \abr{x^2, xy, y^2} = \abr{x, y}^2 $, so it is primary but not irreducible, since $ \abr{x^2, xy, y^2} = \abr{x^2, y} \cap \abr{x, y^2} $.
\end{itemize}
\end{itemize}
\end{example*}

\pagebreak

\section{Artinian rings and modules}

\lecture{20}{Tuesday}{19/11/19}

\begin{definition}
Let $ A $ be a ring and let $ M $ be an $ A $-module. Then $ M $ is called a \textbf{simple} $ A $-module if the only proper submodule of $ M $ is zero. A \textbf{composition series} is a descending chain of submodules $ M = M_0 \supsetneq \dots \supsetneq M_n = 0 $ such that $ M_i / M_{i + 1} $ is a simple $ A $-module for $ i = 0, \dots, n - 1 $.
\end{definition}

\begin{proposition}
The following are equivalent.
\begin{itemize}
\item $ M $ is both Noetherian and Artinian.
\item $ M $ has a composition series.
\end{itemize}
\end{proposition}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Look at all proper submodules of $ M $. Since $ M $ is Noetherian, this set has a maximal element. Call it $ M_1 $. It is also Noetherian, so continue and build a descending chain. Since $ M_1 $ is maximal, $ M / M_1 $ is simple. All $ M_i / M_{i + 1} $ are simple. Since $ M $ is Artinian, this chain is stationary, so $ M_n = 0 $ for some $ n $.
\item[$ \impliedby $] Corollary \ref{cor:11.6} says that if $ M_i / M_{i + 1} $ is both Noetherian and Artinian, then so is $ M $. A simple module is both Noetherian and Artinian.
\end{itemize}
\end{proof}

\begin{proposition}
If $ M $ has a composition series of length $ n $, then any composition series of $ M $ has length $ n $.
\end{proposition}

\begin{proof}
Let us denote by $ \l\br{M} $ the smallest length of a composition series of $ M $.
\begin{enumerate}[leftmargin=0.5in, label=Step \arabic*.]
\item For a proper submodule $ N \subsetneq M $ we have $ \l\br{N} < \l\br{M} $. Indeed, let $ \br{M_i} $ be a composition series of length $ \l\br{M} $. Define $ N_i = N \cap M_i $, so
$$
\begin{tikzcd}[row sep=small]
M = M_0 & \dots \arrow[subset]{l} & M_{n - 1} \arrow[subset]{l} & M_n = 0 \arrow[subset]{l} \\
N = N_0 \arrow[subset]{u} & \dots \arrow[subset]{l} & N_{n - 1} \arrow[subset]{u} \arrow[subset]{l} & N_n = 0 \arrow[cong]{u} \arrow[subset]{l}
\end{tikzcd}.
$$
Then $ \ker \br{N_i \to M_i / M_{i + 1}} = N_{i + 1} $, so $ N_i / N_{i + 1} \subset M_i / M_{i + 1} $, which is simple. After eliminating repetitions we get a composition series for $ N $ of length at most $ \l\br{M} $. If the length is exactly $ \l\br{M} $, then $ N_{n - 1} = M_{n - 1} $, $ N_{n - 2} = M_{n - 2} $, etc, and finally $ N = M $.
\item Any proper chain of submodules of $ M $ has length at most $ \l\br{M} $. Passing to a proper submodule decreases $ \l\br{M} $ at least by one. So the chain contains no more than $ \l\br{M} $ terms.
\item So consider any composition series of $ M $. By step $ 2 $, it has length at most $ \l\br{M} $. By minimality of $ \l\br{M} $, it has length equal to $ \l\br{M} $.
\end{enumerate}
\end{proof}

Define the \textbf{length} of a Noetherian and Artinian module $ M $ to be $ \l\br{M} $, the length of any composition series of $ M $.

\begin{exercise*}
Any chain of submodules of $ M $ can be made into a composition series by inserting some submodules.
\end{exercise*}

\begin{proposition}
Let $ M $ be a Noetherian and Artinian module. If $ N \subset M $ is a submodule, then
$$ \l\br{M} = \l\br{N} + \l\br{M / N}. $$
\end{proposition}

\begin{proof}
Exercise. \footnote{Exercise}
\end{proof}

\pagebreak

\lecture{21}{Wednesday}{20/11/19}

\begin{example}
Suppose $ R $ is a $ k $-algebra, that is $ k $ is a field contained in $ R $ and $ R $ is a vector space over $ k $. For example, $ R = k $ or $ R = k\sbr{x_1, \dots, x_n} / I $, where $ I $ is an ideal in $ k\sbr{x_1, \dots, x_n} $.
\begin{itemize}
\item If $ \dim_k R < \infty $, then $ R $ is an Artinian ring. Indeed, ideals of $ R $ are vector subspaces, so any chain of ideals has finite length. Hence $ R $ is both Artinian and Noetherian.
\item If $ R $ is a finite set, then $ R $ is Artinian and Noetherian.
\item If $ R = k\sbr{\sbr{x}} $, then $ \abr{x} \supsetneq \abr{x^2} \supsetneq \dots $ is an infinite descending chain. So $ k\sbr{\sbr{x}} $ is not Artinian. Similarly, $ k\sbr{x} $ is not Artinian.
\end{itemize}
\end{example}

\begin{remark*}
Hilbert's basis theorem says that if $ R $ is Noetherian, then so is $ R\sbr{x} $. The analogue of this does not hold for Artinian rings.
\end{remark*}

\begin{lemma}
An Artinian integral domain is a field.
\end{lemma}

\begin{proof}
Take $ x \ne 0 $ in an Artinian ring $ A $. Consider $ \abr{x} \supset \abr{x^2} \supset \dots $, which is stationary, so for some $ n \ge 0 $, $ \abr{x^n} = \abr{x^{n + 1}} $. Therefore, $ x^n = ax^{n + 1} $, so $ x^n\br{ax - 1} = 0 $. Since $ x^n \ne 0 $, $ ax = 1 $, so $ x $ is invertible, that is $ x \in A^* $.
\end{proof}

\begin{corollary}
\label{cor:13.7}
In an Artinian ring every prime ideal is maximal.
\end{corollary}

\begin{corollary}
In an Artinian ring the nilradical is the same as the Jacobson radical.
\end{corollary}

\begin{lemma}
\label{lem:13.9}
An Artinian ring has only finitely many maximal ideals.
\end{lemma}

\begin{proof}
Assume this is false, so $ \mmm_1, \mmm_2, \dots $ are pairwise different maximal ideals. Then $ \mmm_1 \supset \mmm_1 \cap \mmm_2 \supset \dots $ is stationary, so for some $ n \ge 1 $ we have $ \mmm_1 \cap \dots \cap \mmm_n = \br{\mmm_1 \cap \dots \cap \mmm_n} \cap \mmm_{n + 1} $, so $ \mmm_1 \cap \dots \cap \mmm_n \subset \mmm_{n + 1} $. By the prime avoidance lemma, $ \mmm_{n + 1} $ contains some $ \mmm_i $, where $ i \in \cbr{1, \dots, n} $. These are maximal ideals, hence $ \mmm_i = \mmm_{n + 1} $. This is a contradiction.
\end{proof}

An ideal $ I \subset R $ is called \textbf{nilpotent} if $ I^n = 0 $ for some $ n \ge 1 $.

\begin{lemma}
\label{lem:13.10}
If $ A $ is an Artinian or Noetherian ring, then the nilradical $ \NNN\br{A} $ is a nilpotent ideal, that is $ \NNN\br{A}^m = 0 $ for some $ m $.
\end{lemma}

\begin{proof}
\hfill
\begin{itemize}
\item Assume $ A $ is Artinian. Consider $ \NNN\br{A} \supset \NNN\br{A}^2 \supset \dots $. There exists $ n \ge 1 $ such that $ \NNN\br{A}^n = \NNN\br{A}^{n + 1} $. Claim that $ \NNN\br{A}^n = 0 $. Assume $ \NNN\br{A}^n \ne 0 $. Consider all ideals
$$ \cbr{I \subset A \st I \cdot \NNN\br{A}^n \ne 0}. $$
This set is non-empty. It contains $ \NNN\br{A} $, since $ \NNN\br{A}^{n + 1} = \NNN\br{A}^n \ne 0 $. Then $ A $ is Artinian, so this set has a minimal element. Call it $ I $. So we have $ I \cdot \NNN\br{A}^n \ne 0 $ hence $ x\NNN\br{A}^n \ne 0 $ for some $ x \in I $. We have $ \abr{x}\NNN\br{A}^n \ne 0 $ where $ \abr{x} \subset I $. Then $ \abr{x} $ belongs to our set, so by minimality of $ I $ we must have $ I = \abr{x} $. We have $ 0 \ne x\NNN\br{A}^n = x\NNN\br{A}^n\NNN\br{A}^n $, since $ \NNN\br{A}^n = \NNN\br{A}^m $, for any $ m \ge n $. So $ x\NNN\br{A}^n $ is an ideal in our set. Then $ x \in I $ so $ x\NNN\br{A}^n \subset I $. By minimality of $ I $ we must have $ x\NNN\br{A}^n = I $. Therefore $ \abr{x}\NNN\br{A}^n = I = \abr{x} $, so $ x $ can be written as $ xy $ for some $ y \in \NNN\br{A}^n \subset \NNN\br{A} $. Thus $ y^r = 0 $ for some $ r \ge 1 $. Then $ x = \dots = xy^r = 0 $. This says that $ I = \abr{x} = 0 $. This is a contradiction because $ I \cdot \NNN\br{A}^n \ne 0 $. Therefore, $ \NNN\br{A}^n = 0 $.
\item Now assume $ A $ is Noetherian. Then every ideal is finitely generated, in particular $ \NNN\br{A} = \abr{x_1, \dots, x_n} $. Since each $ x_i $ is nilpotent there exists $ m \ge 1 $ such that $ x_i^m = 0 $ for all $ i $. Then any product of $ mn $ elements of $ \NNN\br{A} $ is $ \sum_{a_1 + \dots + a_n = mn} cx_1^{a_1} \dots x_n^{a_n} $. So there exists $ i $, for $ 1 \le i \le n $, such that $ a_i \ge m $. Hence $ x_1^{a_1} \dots x_n^{a_n} = 0 $, so $ \NNN\br{A}^{mn} = 0 $.
\end{itemize}
\end{proof}

\lecture{22}{Thursday}{21/11/19}

\begin{corollary}
\label{cor:13.11}
Every ideal in a Noetherian or Artinian ring contains some power of its radical.
\end{corollary}

\begin{proof}
If $ A $ is Noetherian, then $ A / I $ is also Noetherian. We have $ \rad I / I = \NNN\br{A / I} $. By Lemma \ref{lem:13.10} there exists $ m \ge 1 $ such that $ \NNN\br{A / I}^m = 0 $. Then $ \rad I^m \subset I $. The same proof works in the Artinian case.
\end{proof}

\pagebreak

\begin{lemma}
\label{lem:13.12}
Let $ V $ be a vector space over a field $ k $. The following are equivalent.
\begin{itemize}
\item $ \dim_k V < \infty $.
\item $ V $ is a Noetherian $ k $-module.
\item $ V $ is an Artinian $ k $-module.
\end{itemize}
\end{lemma}

\begin{proof}
Obvious.
\end{proof}

\begin{lemma}
\label{lem:13.13}
Let $ A $ be a ring. Let $ I_1, \dots, I_n $ be maximal ideals of $ A $, possibly with repetitions. Suppose $ I_1 \dots I_n = 0 $. Then $ A $ is Noetherian if and only if $ A $ is Artinian.
\end{lemma}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Define $ M_r = I_1 \dots I_r $ for $ r = 1, \dots, n $, so
$$ A \supset M_1 = I_1 \supset \dots \supset M_n = \prod_{r = 1}^n I_r = 0. $$
Since $ A $ is a Noetherian $ A $-module, every subquotient module is also Noetherian. In particular, $ M_i / M_{i + 1} $ is a Noetherian $ A $-module. Since $ I_{r + 1}M_r = M_{r + 1} $, $ I_{r + 1} $ acts trivially on $ M_r / M_{r + 1} $. Therefore, $ M_r / M_{r + 1} $ is naturally an $ A / I_{r + 1} $-module. But $ A / I_{r + 1} $ is a field. Call it $ k $. The $ A $-submodules of $ M_r / M_{r + 1} $ are the same as the $ k $-submodules of $ M_r / M_{r + 1} $. By Lemma \ref{lem:13.12} $ M_r / M_{r + 1} $ is an Artinian $ k $-module hence $ M_r / M_{r + 1} $ is an Artinian $ A $-module. Now Proposition \ref{prop:11.4} implies that $ A $ is Artinian.
\item[$ \impliedby $] Similar.
\end{itemize}
\end{proof}

\begin{definition}
The \textbf{Krull dimension} of a ring $ A $ is the supremum of all $ n \ge 0 $ such that $ A $ has an ascending chain of prime ideals $ \ppp_0 \subsetneq \dots \subsetneq \ppp_n $. If the supremum does not exist, the dimension is infinite. It is denoted $ \dim A $.
\end{definition}

\begin{example*}
\hfill
\begin{itemize}
\item Any field has dimension zero.
\item If $ A $ is Artinian, then every prime ideal is maximal, hence $ \dim A = 0 $.
\item $ \dim \ZZ = 1 $, since $ 0 \subsetneq \abr{p} $ for $ p $ a prime number.
\item If $ k $ is a field, then $ \dim k\sbr{t} = 1 $.
\item If $ k $ is a field, then $ \dim k\sbr{\sbr{t}} = 1 $.
\item If $ k $ is a field, then $ \dim k\sbr{t_1, \dots, t_n} = n $.
\end{itemize}
\end{example*}

\begin{theorem}
\label{thm:13.15}
A ring is Artinian if and only if it is Noetherian and has dimension zero.
\end{theorem}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Suppose $ A $ is Artinian. Corollary \ref{cor:13.7} says that every prime ideal is maximal, hence $ \dim A = 0 $. Lemma \ref{lem:13.9} says that $ A $ has only finitely many maximal ideals, say $ I_1, \dots, I_n $. Then $ I_1 \dots I_n \subset I_1 \cap \dots \cap I_n = \NNN\br{A} $. Lemma \ref{lem:13.10} says $ \NNN\br{A}^m = 0 $ for some $ m \ge 1 $. Hence $ I_1^m \dots I_n^m = 0 $. Lemma \ref{lem:13.13} now implies that $ A $ is Noetherian.
\item[$ \impliedby $] Now assume that $ A $ is Noetherian and $ \dim A = 0 $. By Emmy Noether's theorem the ideal zero has a primary decomposition, that is $ 0 = J_1 \cap \dots \cap J_n $, where $ J_i $'s are primary. Recall $ \rad J_i $ is a prime ideal of $ A $. Since $ \dim A = 0 $, this ideal is maximal. The associated primes of zero are maximal ideals. By Corollary \ref{cor:13.11} each $ J_i $ contains a power of $ \rad J_i $. Therefore, the product of these powers of these maximal ideals is contained in $ \prod_{i = 1}^n J_i \subset \bigcap_{i = 1}^n J_i = 0 $. Now Lemma \ref{lem:13.13} implies that $ A $ is Artinian.
\end{itemize}
\end{proof}

\pagebreak

\begin{theorem}
\label{thm:13.16}
Every Artinian ring is a finite direct product of local Artinian rings.
\end{theorem}

\begin{definition}
Two ideals $ I, J \subset R $ are \textbf{coprime} if $ I + J = R $.
\end{definition}

\begin{example*}
Two distinct maximal ideals are coprime.
\end{example*}

Suppose $ I_1, \dots, I_n $ are ideals of $ R $. Define
$$ \function[\phi]{R}{\prod_{j = 1}^n R / I_j}{x}{\br{x + I_1, \dots, x + I_n}}. $$

\begin{lemma}[Chinese remainder theorem]
\label{lem:13.18}
\hfill
\begin{itemize}
\item If $ I_r $ and $ I_s $ are coprime whenever $ r \ne s $, then
$$ \prod_{j = 1}^n I_j = \bigcap_{j = 1}^n I_j. $$
\item $ \phi $ is surjective if and only if $ I_r $ and $ I_s $ are coprime for $ r \ne s $.
\item $ \phi $ is injective if and only if $ \bigcap_{j = 1}^n I_j = 0 $.
\end{itemize}
\end{lemma}

\begin{proof}
See problem sheet $ 4 $ question $ 2 $.
\end{proof}

\lecture{23}{Tuesday}{26/11/19}

Lecture 23 is a class test.

\lecture{24}{Wednesday}{27/11/19}

\begin{proof}[Proof of Theorem \ref{thm:13.16}]
Let $ R $ be an Artinian ring. Then $ R $ has only finitely many maximal ideals, say $ J_1, \dots, J_n $. In the proof of Theorem \ref{thm:13.15} we have seen that for some $ k \ge 1 $, $ \prod_{i = 1}^n J_i^k = 0 $. Since the $ J_i $'s are maximal ideals, we have $ J_r + J_s = R $, whenever $ r \ne s $. This implies $ J_r^k + J_s^k = R $. Indeed, we can write $ 1 = x + y $ for $ x \in J_r $ and $ y \in J_s $, so
$$ 1 = 1^{2k} = \sum_{i = 0}^{2k} \binom{2k}{i}x^iy^{2k - i}. $$
Hence $ i \ge k $ or $ 2k - i \ge k $, so $ x^i \in J_r^k $ or $ y^{2k - i} \in J_s^k $, so $ x^iy^{2k - i} \in J_r^k $ or $ x^iy^{2k - i} \in J_s^k $. Hence $ 1 \in J_r^k + J_s^k $. Let
$$ \phi : R \to \prod_{i = 1}^n R / J_i^k. $$
Then $ \phi $ is surjective since $ R = J_r^k + J_s^k $ for $ r \ne s $, by Lemma \ref{lem:13.18}, and $ \phi $ is injective since $ \bigcap_{i = 1}^n J_i^k = \prod_{i = 1}^n J_i^k = 0 $, by Lemma \ref{lem:13.18}.$ 1 $ and we have chosen $ k $ so this holds. Therefore $ \phi $ is an isomorphism of rings. It remains to show that each $ R / J_i^k $ is a local Artinian ring. Since $ R $ is Artinian, $ R / J_i^k $ is Artinian, so $ J_i / J_i^k \subset R / J_i^k $ is a maximal ideal of $ R / J_i^k $. The nilradical of $ R / J_i^k $ is $ J_i / J_i^k $. Indeed, every element is $ J_i / J_i^k $ is nilpotent, since $ \br{J_i / J_i^k}^k = 0 $ in $ R / J_i^k $. But the nilradical cannot be larger than $ J_i / J_i^k $ because this ideal is maximal. Thus $ \NNN\br{R / J_i^k} = J_i / J_i^k $. This is the intersection of all prime ideals of $ R / J_i^k $, so each prime ideal of $ R / J_i^k $ is equal to $ J_i / J_i^k $. So $ R / J_i^k $ is indeed a local ring.
\end{proof}

\begin{example*}
Let $ R = k\sbr{x_1, \dots, x_n} / I $, where $ I $ is an ideal. Any finitely generated $ k $-algebra is like this. Then $ k\sbr{x_1, \dots, x_n} $ is Noetherian, so
$$ I = \abr{f_1, \dots, f_m}, \qquad f_i\br{x_1, \dots, x_n} \in k\sbr{x_1, \dots, x_n}, \qquad i = 1, \dots, m. $$
We know that $ R $ is Artinian if the dimension of the $ k $-vector space $ \dim_k R < \infty $. Then $ R = \prod_{i = 1}^n R / J_i^k $, for some $ k $, where $ J_i $'s are all maximal ideals. Assume $ k $ is algebraically closed, such as $ k = \CC $. Then the maximal ideals are precisely
$$ \abr{x_1 - a_1, \dots, x_n - a_n}, \qquad a = \br{a_1, \dots, a_n} \in k^n, \qquad f_1\br{a} = \dots = f_m\br{a} = 0. $$
\end{example*}

\pagebreak

\section{Integral closure and normal rings}

Let $ R $ be a ring and let $ A \subset R $ be a subring. In other words, $ R $ is an $ A $-algebra.

\begin{theorem}
\label{thm:14.1}
Let $ x \in R $. The following are equivalent.
\begin{enumerate}
\item There are $ a_0, \dots, a_{n - 1} \in A $ such that $ x^n + a_{n - 1}x^{n - 1} + \dots + a_0 = 0 $.
\item The $ A $-module $ A\sbr{x} $ is finitely generated. We have that $ A\sbr{x} \subset R $, and $ x $ is not an independent variable.
\item There is a subring $ B $ in $ R $ such that $ A \subset B $, $ x \in B $, and $ B $ is finitely generated as an $ A $-module.
\end{enumerate}
\end{theorem}

\begin{proof}
\hfill
\begin{itemize}[leftmargin=0.5in]
\item[$ 1 \implies 2 $.] $ x^{n + j} = -a_{n - 1}x^{n + j - 1} - \dots - a_0x^j $. By repeating this we express all powers of $ x $ as linear combinations of $ 1, \dots, x^{n - 1} $ with coefficients in $ A $. Hence $ A\sbr{x} $ is generated by $ 1, \dots, x^{n - 1} $.
\item[$ 2 \implies 3 $.] Take $ B = A\sbr{x} $.
\item[$ 3 \implies 1 $.] $ B $ is finitely generated as an $ A $-module, so suppose $ y_1, \dots, y_n $ are generators of $ B $. Then $ x, y_i \in B $ and $ B $ is a subring, hence $ xy_i \in B $ for $ i = 1, \dots, n $. Hence $ xy_i = \sum_{j = 1}^n a_{ij}y_j $ for $ a_{ij} \in A $. Let $ \AAA = \br{a_{ij}}_{1 \le i, j \le n} $. Consider $ d = \det \br{x\I_n - \AAA} \in B $, where $ \I_n $ is the identity matrix. By Theorem \ref{thm:8.5}, the determinant trick, we have $ dy_i = 0 $ for $ i = 1, \dots, n $. Hence $ dy = 0 $ for any $ y \in B $. But $ 1 \in B $, so taking $ y = 1 $ we get $ d = 0 $, in $ B $. Now let $ f\br{t} = \det \br{t\I_n - \AAA} \in A\sbr{t} $ be a characteristic polynomial of $ \AAA $. We obtain $ f\br{x} = 0 $, and $ f\br{t} $ is monic in $ A\sbr{t} $.
\end{itemize}
\end{proof}

\lecture{25}{Thursday}{28/11/19}

\begin{definition}
An element $ x \in R $ is \textbf{integral} over $ A $ if $ x^n + a_{n - 1}x^{n - 1} + \dots + a_0 = 0 $, for some $ a_{n - 1}, \dots, a_0 \in A $. Equivalently, $ A\sbr{x} $ is a finitely generated $ A $-module. Such a polynomial is called an \textbf{integral dependence relation}. Then $ R $ is called an \textbf{integral $ A $-algebra} if every element of $ R $ is integral over $ A $.
\end{definition}

\begin{example*}
\hfill
\begin{itemize}
\item Suppose $ k \subset K $ is an extension of fields. Thus $ K $ is a $ k $-algebra. Then $ K $ is integral over $ k $ if and only if $ K $ is algebraic over $ k $. For example, if $ \sbr{K : k} = \dim_k K < \infty $, then $ K $ is integral over $ k $.
\item Let $ R = k\sbr{x} $ and $ A = k\sbr{x^2} \subset R $. Then $ R $ is integral over $ A $. For example, $ x \in R $ satisfies the equation $ t^2 - x^2 = 0 $, so $ x $ is integral over $ A $. Show that any element of $ R $ is integral over $ A $. \footnote{Exercise}
\item Let $ R = \ZZ\sbr{\tfrac{1 + \sqrt{-3}}{2}} $. Then $ \zeta_3 = \tfrac{1 + \sqrt{-3}}{2} $ satisfies $ t^2 + t + 1 = 0 $, so $ R $ is in integral over $ \ZZ $. Theorem \ref{thm:14.1}.$ 3 $ says that $ r \in R $ is integral as long as $ R $ contains a subring $ B $ such that $ A \subset B $, $ r \in B $, and $ B $ is a finitely generated $ A $-module.
\item $ \ZZ\sbr{\tfrac{1}{2}} = \cbr{n / 2^m \st n \in \ZZ, \ m \ge 0} $ is not an integral $ \ZZ $-algebra, since $ \tfrac{1}{2} $ is not integral over $ \ZZ $.
\end{itemize}
\end{example*}

\begin{lemma}
\label{lem:14.3}
\hfill
\begin{enumerate}
\item If $ A \subset B \subset C $ are rings and $ C $ is a finitely generated $ B $-module, and $ B $ is a finitely generated $ A $-module, then $ C $ is a finitely generated $ A $-module.
\item If $ A \subset B $ are rings and $ x_1, \dots, x_n \in B $ are integral over $ A $, then $ A\sbr{x_1, \dots, x_n} $ is a finitely generated $ A $-module. Hence $ A\sbr{x_1, \dots, x_n} $ is an integral $ A $-algebra.
\item If $ A \subset B \subset C $ are rings such that $ C $ is integral over $ B $ and $ B $ is integral over $ A $, then $ C $ is integral over $ A $.
\item If $ A \subset B $ are rings, then the set of all elements in $ B $ that are integral over $ A $ is a subring of $ B $. Denote it by $ \widetilde{A} $ and call it the \textbf{integral closure} of $ A $ in $ B $. Then $ \widetilde{\widetilde{A}} = \widetilde{A} $, that is the integral closure of $ \widetilde{A} $ is equal to $ \widetilde{A} $.
\end{enumerate}
\end{lemma}

\pagebreak

\begin{proof}
\hfill
\begin{enumerate}
\item If $ c_1, \dots, c_n $ generate $ C $ as a $ B $-module and $ b_1, \dots, b_m $ generate $ B $ as an $ A $-module, then $ c_ib_j $ generate $ C $ as an $ A $-module.
\item $ A\sbr{x_1} $ is a finitely generated $ A $-module. Next, $ x_2 $ is integral over $ A $, hence also over $ A\sbr{x_1} $. Thus $ A\sbr{x_1, x_2} $ is a finitely generated $ A\sbr{x_1} $-module. Using $ 1 $ we see that $ A\sbr{x_1, x_2} $ is also a finitely generated $ A $-module. Repeat and show that $ A\sbr{x_1, \dots, x_n} $ is a finitely generated $ A $-module. By Theorem \ref{thm:14.1}.$ 3 $ every element of $ A\sbr{x_1, \dots, x_n} $ is integral over $ A $, so $ A\sbr{x_1, \dots, x_n} $ is an integral $ A $-algebra.
\item Pick up any $ x \in C $. Then $ x^n + b_{n - 1}x^{n - 1} + \dots + b_0 = 0 $ for $ b_i \in B $. Since $ b_0, \dots, b_{n - 1} $ are integral over $ A $, by $ 2 $ we get that $ A\sbr{b_0, \dots, b_{n - 1}} $ is a finitely generated $ A $-module. Then $ A\sbr{b_0, \dots, b_{n - 1}, x} $ is also finitely generated as a module over $ A\sbr{b_0, \dots, b_{n - 1}} $. By $ 1 $, $ A\sbr{b_0, \dots, b_{n - 1}, x} $ is a finitely generated as an $ A $-module. Now Theorem \ref{thm:14.1}.$ 3 $ says that $ x $ is integral over $ A $.
\item Let $ x, y \in B $ be integral over $ A $. Want to prove that $ -x, x + y, xy $ are integral over $ A $. Look at $ A\sbr{x, y} $. By $ 2 $ this is an integral $ A $-algebra. Hence everything contained in $ A\sbr{x, y} $, such as $ xy $ and $ x + y $, are integral over $ A $. Hence $ \widetilde{A} $ is a ring. Consider $ A \subset \widetilde{A} \subset \widetilde{\widetilde{A}} $, which are both integral. Now $ 3 $ says that $ \widetilde{\widetilde{A}} $ is integral over $ A $. Thus $ \widetilde{\widetilde{A}} = \widetilde{A} $.
\end{enumerate}
\end{proof}

\begin{example*}
If $ x = \sqrt{a} $, $ y = \sqrt{b} $, and $ z = \sqrt{c} $ for $ a, b, c \in \QQ $, then $ \sqrt{a} + \sqrt{b} + \sqrt{c} $ is algebraic over $ \QQ $. This follows immediately from Lemma \ref{lem:14.3}.$ 4 $.
\end{example*}

\begin{definition}
The set of elements of $ B $ which are integral over $ A $ is called the \textbf{integral closure} of $ A $ in $ B $. Then $ A $ is called \textbf{integrally closed} in $ B $ if $ A $ equals its integral closure in $ B $. Now let $ R $ be an integral domain. Let $ F $ be the fraction field of $ R $, so $ R \subset F $. Then $ R $ is called \textbf{normal} if $ R $ equals its integral closure in $ F $. The integral closure of $ R $ in $ F $ is called the \textbf{normalisation}.
\end{definition}

\lecture{26}{Tuesday}{03/12/19}

\begin{example*}
Integral closure in number theory. The integral closure of $ \QQ $ in $ \CC $ is $ \overline{\QQ} $, the algebraic numbers in $ \CC $, which is algebraically closed. Let $ \QQ \subset F $ be a finite extension of fields. Then $ F $ is called a \textbf{number field}. Let $ \OOO_F $ be the integral closure of $ \ZZ $ in $ F $.
\begin{itemize}
\item Let $ F = \QQ\br{\zeta} $, where $ \zeta $ is a primitive $ d $-th root of unity. Then $ \OOO_F = \ZZ\sbr{\zeta} $.
\item Let $ F = \QQ\br{\sqrt{a}} $ for $ 0, 1 \ne a \in \ZZ $ square-free. Then
$$ \OOO_F =
\begin{cases}
\ZZ\sbr{\sqrt{a}} & d \equiv 2, 3 \mod 4 \\
\ZZ\sbr{\tfrac{1 + \sqrt{a}}{2}} & d \equiv 1 \mod 4
\end{cases},
$$
so $ \ZZ\sbr{\sqrt{a}} \subsetneq \ZZ\sbr{\tfrac{1 + \sqrt{a}}{2}} $ is not normal if $ d \equiv 1 \mod 4 $.
\end{itemize}
\end{example*}

\begin{example*}
Integral closure in algebraic geometry. Let $ C $ be a plane curve. Non-singular curves give rise to normal rings. Let $ f\br{x, y} $ be the equation of $ C $. Look at $ k\sbr{x, y} / \abr{f\br{x, y}} $.
\begin{itemize}
\item Let $ R = k\sbr{x, y} / \abr{x^3 - y^2} $, and let $ t = y / x \in K $, the field of fractions of $ R $. We have $ t^2 = y^2 / x^2 = x $ in $ R $. So $ t \notin R $ and yet $ t $ is integral over $ R $. Note that $ k\sbr{t} $ is a UFD. Any UFD is normal. \footnote{Exercise} We have $ R \subset k\sbr{t} \subset K $. Therefore, $ k\sbr{t} $ is the integral closure of $ R $.
\end{itemize}
\end{example*}

\begin{proposition}
\label{prop:14.5}
An integral domain $ A $ is normal if and only if $ A_\ppp = \br{A \setminus \ppp}^{-1}A $ is normal for each prime ideal $ \ppp \subset A $, if and only if $ A_\mmm $ is normal for each maximal ideal $ \mmm \subset A $.
\end{proposition}

\begin{proof}
Let $ S \subset A $ be any multiplicative set. Claim that $ S^{-1}A $ is normal. Since $ A $ is an integral domain, $ A \subset S^{-1}A \subset K $, the field of fractions of $ A $. Pick any $ x \in K $ which is integral over $ S^{-1}A $, that is $ x^n + a_{n - 1}x^{n - 1} + \dots + a_0 = 0 $, where $ a_i \in S^{-1}A $, that is $ a_i = b_i / s_i $, where $ b_i \in A $ and $ s_i \in S $. Define $ y = \br{s_0 \dots s_{n - 1}}x $. Then $ y $ is integral over $ A $, so $ y \in A $. Hence $ x \in S^{-1}A $. It remains to prove that if $ A_\mmm $ is normal for every $ \mmm $, then $ A $ is normal. Take any $ x \in K $ which is integral over $ A $. Since $ A \subset A_\mmm \subset K $, $ x $ is integral over $ A_\mmm $, hence $ x \in A_\mmm $. Thus $ x \in \bigcap_\mmm A_\mmm = A $, by Corollary \ref{cor:10.6}.
\end{proof}

\pagebreak

\section{Discrete valuation rings}

\begin{example*}
$ k\sbr{\sbr{x}} $ and $ \ZZ_{\abr{p}} $.
\end{example*}

\begin{theorem}
\label{thm:15.1}
Let $ R $ be an integral domain. The following are equivalent.
\begin{itemize}
\item $ R $ is a UFD with only one irreducible element, up to multiplication by units.
\item $ R $ is a Noetherian local ring such that the unique maximal ideal is principal.
\end{itemize}
\end{theorem}

\begin{proof}
\hfill
\begin{itemize}
\item[$ \implies $] Choose an irreducible element. Call it $ t $. Then $ R = \cbr{0} \cup \abr{t} \cup R^* $. Hence $ \abr{t} $ is a maximal ideal. Claim that all proper non-zero ideals of $ R $ are $ \abr{t^n} $ for $ n \ge 1 $. Indeed, let $ I \subset R $ be a non-zero ideal. Take $ rt^n \in I $ for $ r \in R^* $ with minimal $ n $. Hence $ \abr{rt^n} = \abr{t^n} \subset I $. Then $ I = \abr{t^n} $. Hence $ \abr{t} $ is the unique maximal ideal of $ R $. Thus $ R $ is a local ring. All ideals are finitely generated, hence $ R $ is Noetherian.

\lecture{27}{Wednesday}{04/12/19}

\item[$ \impliedby $] Let $ t \in R $ be a generator of the unique maximal ideal. Then $ R \setminus \abr{t} = R^* $. Claim that for every non-zero $ a \in R $, there exists a largest $ n \ge 0 $ such that $ a \in \abr{t^n} $. If $ a \notin \abr{t} $, then $ a \in R^* $, so $ n = 0 $. If $ a \in \abr{t} $, then $ a = a_1t $ for some $ a_1 \in R $. Two possibilities can occur. If $ a_1 \in R^* $, then $ a \notin \abr{t^2} $. If $ a_1 \notin R^* $, then $ \abr{a_1} $ is a proper ideal of $ R $. We have $ \abr{a} = \abr{a_1t} \subsetneq \abr{a_1} \subsetneq R $. The inclusion $ \abr{a} \subsetneq \abr{a_1} $ is strict, because if $ \abr{a} = \abr{a_1} $, then for some $ u \in R^* $ we must have $ uta_1 = a_1 $, so $ t \in R^* $, a contradiction. We continue, since $ a_1 $ is not a unit, $ a_1 \in \abr{t} $ and we write $ a_1 = a_2t $ and we analyse $ a_2 $ as we analysed $ a_1 $. Either, after finitely many steps, we get $ a_n \in R^* $, so that $ a = a_nt^n $ and we are done, or we build an ascending chain of ideals $ \abr{a} \subsetneq \abr{a_1} \subsetneq \abr{a_2} \subsetneq \dots $ that is not stationary. The second possibility cannot occur in a Noetherian ring.
\end{itemize}
\end{proof}

\begin{remark*}
$ R = \cbr{0} \cup \cbr{at^n \st a \in R^*, \ n \ge 0} $. Define
$$ \function[v]{R \setminus \cbr{0}}{\ZZ_{\ge 0}}{at^n}{n}. $$
Then $ v\br{at^n \cdot bt^m} = n + m = v\br{at^n} + v\br{bt^m} $, and $ v $ obviously extends to a surjective homomorphism $ K^* \to \ZZ $, where $ K $ is the field of fractions of $ R $. Note that
$$ v\br{at^n + bt^m} \ge \min\cbr{v\br{at^n}, v\br{bt^m}}, \qquad a, b \in R^*, $$
since say $ n \le m $, then $ at^n + bt^m = t^n\br{a + bt^{m - n}} $, and $ a + bt^{m - n} \in R $.
\end{remark*}

Recall that a \textbf{total order} on a set is a binary relation, written as $ x < y $, such that for any $ a $ and $ b $ exactly one of
$$ a < b, \qquad a = b, \qquad a > b $$
holds. An \textbf{ordered abelian group} is an abelian group $ G $ with a total order $ < $ compatible with the group structure, so $ a < b $ implies that $ a + c < b + c $ for all $ c \in G $.

\begin{example*}
$ \ZZ \subset \QQ \subset \RR $, with the usual order.
\end{example*}

\begin{exercise*}
Any ordered group is torsion-free, so no non-zero elements of finite order.
\end{exercise*}

\begin{definition}
Let $ K $ be a field. A \textbf{valuation} is a surjective homomorphism $ v : K^* \to G $, where $ G $ is an ordered group such that
$$ v\br{x \pm y} \ge \min\cbr{v\br{x}, v\br{y}}. $$
\end{definition}

\begin{exercise*}
Suppose given $ \br{K, v: K^* \to G} $. Then
$$ R = \cbr{x \in K \st v\br{x} \ge 0} $$
is a ring. It is called the \textbf{valuation ring} of $ v $. Prove that
$$ R^* = \cbr{x \in K \st v\br{x} = 0}. $$
Hence
$$ R \setminus R^* = \cbr{x \in K \st v\br{x} > 0} $$
is a unique maximal ideal of $ R $, so $ R $ is a local ring.
\end{exercise*}

\pagebreak

\begin{exercise*}
Suppose $ R $ is a subring of a field $ K $. When is $ R $ a valuation ring? This is so if and only if for any $ x \in K^* $ we have $ x \in R $ or $ x^{-1} \in R $. A hint is $ G = K^* / R^* $ so you just need to define a total order on $ G $.
\end{exercise*}

\begin{example*}
\hfill
\begin{itemize}
\item $ \ZZ_{\abr{p}} = \cbr{a / b \st p \nmid b, \ b \ne 0, \ a, b \in \ZZ} $ is a valuation ring with $ G = \ZZ $.
\item Likewise, $ k\sbr{\sbr{x}} $ is a valuation ring with $ G = \ZZ $.
\item The field of fractions of $ k\sbr{\sbr{x}} = \cbr{\sum_{i \ge 0} a_ix^i \st a_i \in k} $ is the \textbf{field of Laurent formal power series}
$$ k\br{\br{x}} = \cbr{\sum_{i \ge m} a_ix^i \st a_i \in k, \ m \in \ZZ}. $$
Consider the \textbf{field of Puiseux series}
$$ K = \bigcup_{n \ge 1} k\br{\br{x^{\tfrac{1}{n}}}} = \cbr{\sum_{i \ge m} a_it^{\tfrac{i}{N}} \st a_i \in k, \ m \in \ZZ, \ N \ \text{fixed}}. $$
Define $ v $ to be the smallest power of $ t $ such that the coefficient is non-zero. Then $ v : K^* \to \QQ $ is a valuation. The valuation ring is
$$ R = \bigcup_{n \ge 1} k\sbr{\sbr{t^{\tfrac{1}{n}}}}. $$
Then $ R $ is not Noetherian. Indeed, $ \abr{t^{1 / 2^n}} $ is an infinite ascending chain of ideals.
\end{itemize}
\end{example*}

\lecture{28}{Thursday}{05/12/19}

\begin{definition}
A \textbf{discrete valuation ring (DVR)} is a valuation ring of a discrete valuation, so $ G = \ZZ $.
\end{definition}

\begin{theorem}
\label{thm:15.4}
Let $ K $ be a field. Let $ v : K^* \to G $ be a valuation, where $ G $ is an ordered group. The valuation ring of $ K $ attached to $ v $ is Noetherian if and only if $ G = \ZZ $. In other words, a valuation ring is Noetherian if and only if it is a DVR.
\end{theorem}

\begin{proof}
Let $ R $ be the valuation ring attached to $ \br{K, v} $, that is $ R = \cbr{x \in K \st v\br{x} \ge 0} $.
\begin{itemize}
\item[$ \implies $] Assume $ R $ is Noetherian. Let us show that every ideal is principal. Since $ R $ is Noetherian, every ideal $ I = \abr{a_1, \dots, a_n} $ for $ a_i \in R $. It is enough to prove that for all $ 0 \ne x, y \in R $, $ \abr{x, y} = \abr{x} $ or $ \abr{x, y} = \abr{y} $. Since $ G $ is totally ordered, one of
$$ v\br{x} < v\br{y}, \qquad v\br{x} = v\br{y}, \qquad v\br{x} > v\br{y} $$
holds. Thus $ v\br{x} \ge v\br{y} $ or $ v\br{y} \ge v\br{x} $. Without loss of generality assume $ v\br{y} \ge v\br{x} $. Then $ v\br{y / x} = v\br{y} - v\br{x} \ge 0 $, hence $ y / x \in R $. Hence $ y \in \abr{x} $. In particular, as $ R $ is a local ring, the maximal ideal is $ \abr{t} $, for some $ t \in R $. Theorem \ref{thm:15.1} implies that $ R $ is a UFD and $ t $ is a unique irreducible element of $ R $. Then
$$ R = \cbr{0} \cup \cbr{rt^n \st n \ge 0, \ r \in R^*}, \qquad K = \cbr{0} \cup \cbr{rt^n \st n \in \ZZ, \ r \in R^*}, $$
so $ R $ is a valuation ring attached to the valuation that sends $ rt^n $ to $ n $.
\item[$ \impliedby $] Conversely, assume that $ v : K^* \to \ZZ $. Choose $ t \in R $ with $ v\br{t} = 1 $. For all $ x \in K^* $, if $ v\br{x} \ge 1 $ then $ x / t \in R $, so $ x \in \abr{t} $. Then $ R^* = \cbr{x \in K \st v\br{x} = 0} = R \setminus \abr{t} $. Thus $ \abr{t} $ is a maximal ideal. Claim that all proper non-zero ideals of $ R $ are $ \abr{t^n} $ for $ n \ge 1 $. Indeed, let $ I \subset R $ be a non-zero proper ideal. Choose $ x \in I $ with the least possible $ v\br{x} $. Say, $ v\br{x} = n $. Then $ v\br{t^n} = n $. Then $ v\br{x / t^n} = 0 $, so $ x / t^n \in R^* $, hence $ t^n \in I $. For any $ 0 \ne y \in I $, $ v\br{y / t^n} = v\br{y} - n \ge 0 $, hence $ y \in \abr{t^n} $, so $ I = \abr{t^n} $. Therefore, any ascending chain of ideals $ \abr{t^n} $ must be stationary, since $ \abr{t^n} \subsetneq \abr{t^m} $ implies that $ m < n $. Hence $ R $ is Noetherian.
\end{itemize}
\end{proof}

\pagebreak

\begin{theorem}[Main theorem about DVRs]
\label{thm:15.5}
Let $ R $ be an integral domain. The following are equivalent.
\begin{enumerate}
\item $ R $ is a DVR.
\item $ R $ is a UFD with only one irreducible element, up to a unit.
\item $ R $ is a Noetherian local ring with principal maximal ideal.
\item $ R $ is a Noetherian normal local ring of Krull dimension one.
\end{enumerate}
\end{theorem}

\begin{proof}
\hfill
\begin{itemize}[leftmargin=0.5in]
\item[$ 1 \implies 3 $.] The second part of the proof of Theorem \ref{thm:15.4}.
\item[$ 3 \implies 2 $.] Theorem \ref{thm:15.1}.
\item[$ 2 \implies 1 $.] Easy, since $ v\br{rt^n} = n $.
\item[$ 1 \implies 4 $.] Any UFD is Noetherian and normal. All non-zero ideals in a DVR are $ \abr{t^n} $. Hence zero and $ \abr{t} $ are the only prime ideals. Since $ 0 \subsetneq \abr{t} $, the Krull dimension is one.
\item[$ 4 \implies 3 $.] We must prove that the maximal ideal is principal.
\begin{enumerate}[leftmargin=0.5in, label=Step \arabic*.]
\item Let $ I \subset R $ be the maximal ideal. Recall that Nakayama's lemma for a Noetherian ring $ R $ implies that if $ I^2 = I $, then $ I = 0 $, by Theorem \ref{thm:9.9}. If $ I = 0 $, then $ R $ is a field. But the Krull dimension of a field is zero, so $ R $ is not a field. Thus $ I \ne 0 $. Hence $ I^2 \subsetneq I $. Choose $ t \in I $ such that $ t \notin I^2 $. We will prove that $ I = \abr{t} $.
\item Suppose that $ I \ne \abr{t} $, so $ I $ contains an element $ y $ which is not in $ \abr{t} $. Consider $ \br{\abr{t} : \abr{y}} = \cbr{r \in R \st ry \in \abr{t}} $. If $ y \notin \abr{t} $, then $ \br{\abr{t} : \abr{y}} \ne R $. Note that $ t \in \br{\abr{t} : \abr{y}} $, so $ \br{\abr{t} : \abr{y}} \ne 0 $. Since $ R $ is Noetherian, this set of ideals contains a maximal element, say $ \br{\abr{t} : \abr{y}} $ for some $ y $.
\item Claim that $ \br{\abr{t} : \abr{y}} $ is a non-zero prime ideal. Since the Krull dimension of $ R $ is one, it must be the maximal ideal $ I $. Take any $ a, b \in R $ such that $ ab \in \br{\abr{t} : \abr{y}} $, that is $ aby \in \abr{t} $. Assume that $ b \notin \br{\abr{t} : \abr{y}} $, that is $ by \notin \abr{t} $. We have $ \br{\abr{t} : \abr{y}} \subset \br{\abr{t} : \abr{by}} $, but our ideal $ \br{\abr{t} : \abr{y}} $ is maximal in our set, hence $ \br{\abr{t} : \abr{y}} = \br{\abr{t} : \abr{by}} $. Since $ aby \in \abr{t} $, $ ay \in \abr{t} $. This shows that $ a \in \br{\abr{t} : \abr{y}} $. So $ \br{\abr{t} : \abr{y}} $ is a prime ideal. The claim is proved. Thus we have $ yI \subset \abr{t} $.

\lecture{29}{Tuesday}{10/12/19}

\item Let $ K $ be the fraction field of $ R $. Then $ y / t \in K $, but $ y / t \notin R $. However, $ \br{y / t}I \subset R $. We conclude that $ \br{y / t}I $ is an ideal of $ R $. This is a proper ideal, that is $ \br{y / t}I \ne R $, otherwise $ t = yx $, for some $ x \in I $. But then $ t \in I^2 $, which is false. Hence $ \br{y / t}I \ne R $. Since $ R $ is a local ring, $ I $ is the only maximal ideal, thus $ \br{y / t}I \subset I $.
\item Since $ R $ is Noetherian, $ I $ is a finitely generated ideal, say $ I = \abr{x_1, \dots, x_n} $. Then $ \br{y / t}x_i $ is a linear combination of the $ x_i $'s with coefficients in $ R $. The determinant trick then gives a polynomial $ p\br{x} $ such that $ p\br{y / t}x_i = 0 $ for $ i = 1, \dots, n $. Since $ R $ is an integral domain, we conclude that $ p\br{y / t} = 0 $. Recall $ p\br{x} $ is monic, and $ p\br{x} \in R\sbr{x} $. Since $ R $ is normal, $ y / t \in R $, so that $ y \in \abr{t} $. This contradiction finishes the proof.
\end{enumerate}
\end{itemize}
\end{proof}

\begin{corollary}
Let $ A $ be a Noetherian normal integral domain. For each prime ideal $ \ppp \subset A $ which is minimal among non-zero prime ideals of $ A $, the localisation $ A_\ppp $ is a DVR.
\end{corollary}

\begin{proof}
Lemma \ref{lem:11.7} implies that $ A_\ppp $ is Noetherian. Proposition \ref{prop:14.5} implies that $ A_\ppp $ is normal. Theorem \ref{thm:6.9} says that
$$ \cbr{0, \ppp A_\ppp} = \correspondence{\text{prime ideals of} \ A_\ppp}{\text{prime ideals of} \ A \ \text{contained in} \ \ppp} = \cbr{0, \ppp}. $$
Hence $ \dim A_\ppp = 1 $. Theorem \ref{thm:15.5} then implies that $ A_\ppp $ is a DVR.
\end{proof}

\begin{remark*}
$$ A = \bigcap_{\text{minimal non-zero prime ideals} \ \ppp \subset A} A_\ppp \subset K. $$
\end{remark*}

\pagebreak

\section{Completion}

Let $ R $ be a ring and $ I \subset R $ be an ideal.

\begin{definition}
Turn $ R $ into a topological space with the \textbf{$ I $-adic topology} by declaring $ I^m $ as open neighbourhoods of zero. In other words, $ a_n \to 0 $ if for any $ m \ge 1 $ there exists an $ N \ge 1 $ such that $ a_n \in I^m $ for all $ n \ge N $.
\end{definition}

For any $ x \in R $ the cosets $ x + I^m $ are a system of open neighbourhoods of $ x $. Since the complement to a given coset is the union of all the other cosets, it is open, hence the original coset is both open and closed. So every $ x + I^m $ is open and closed. Then if we put the discrete topology on $ R / I^m $, then the natural map $ R \to R / I^m $ is continuous. Then it is easy to check that addition and subtraction $ R \times R \to R $ are continuous, and multiplication $ R \to R $ is also continuous. This says that $ R $ is a \textbf{topological ring}.

\begin{example}
Let $ R = \ZZ $ and $ I = \abr{p} $. Then $ R_I = \ZZ_{\abr{p}} \supset \abr{p} $ has completion $ \ZZ_p $, the \textbf{ring of $ p $-adic integers}.
\end{example}

Let us construct the completion of $ R $ in the $ I $-adic topology, which we just defined. Look at the product ring
$$ \prod_{m \ge 1} R / I^m = \cbr{\br{x_m} \st x_m \in R / I^m}. $$
We have surjective maps
$$ \function[s_n]{R / I^{n + 1}}{R / I^n}{x + I^{n + 1}}{x + I^n}, \qquad n \ge 1, $$
so
$$ \dots \xrightarrow{s_{n + 1}} R / I^{n + 1} \xrightarrow{s_n} R / I^n \xrightarrow{s_{n - 1}} \dots. $$

\begin{definition}
Define
$$ \widehat{R} = \varprojlim_m R / I^m, $$
the \textbf{$ I $-adic completion} of $ R $, as the subset of $ \prod_{m \ge 1} R / I^m $ given by $ s_n\br{x_{n + 1}} = x_n $, for all $ n \ge 1 $.
\end{definition}

$ \widehat{R} $ is closed under coordinate-wise addition and multiplication. So $ \widehat{R} $ is a ring.

\lecture{30}{Wednesday}{11/12/19}

\begin{definition}
Let $ X_i $ for $ i \in S $ be a collection of topological spaces. A basis of open sets in the \textbf{product topology} of $ X = \prod_{i \in S} X_i $ consists of
$$ \prod_{i \in F} U_i \times \prod_{i \in S \setminus F} X_i, $$
where $ U_i \subset X_i $ are open subsets and $ F $ is a finite subset of $ S $. An arbitrary open subset is a union of such open sets. Equivalently, the product topology is determined by the condition that $ \pi_j : X \to X_j $, for any $ j \in S $, is a continuous map.
\end{definition}

\begin{theorem}[Tychonoff's theorem]
If each $ X_i $ is compact, such as finite with discrete topology, then $ X = \prod_{i \in S} X_i $ is compact.
\end{theorem}

\begin{example}
In particular, if $ R / I^m $ are finite, then $ \prod_{m \ge 1} R / I^m $ is compact. Then $ \widehat{R} $ is a closed subset of the compact set $ \prod_{m \ge 1} R / I^m $, so $ \widehat{R} $ is compact.
\end{example}

\begin{definition}
We equip $ \widehat{R} $ with the induced \textbf{subspace topology}. A subset of $ \widehat{R} $ is open if it is the intersection of an open subset of $ \prod_{m \ge 1} R / I^m $ with $ \widehat{R} $.
\end{definition}

Note the natural map
$$ \function{R}{\prod_{m \ge 1} R / I^m}{x}{\br{x + I^m}} $$
has its image in $ \widehat{R} $. So there is a natural map $ R \to \widehat{R} $. It is continuous.

\begin{definition}
$ R $ is \textbf{complete} in the $ I $-adic topology if this map is an isomorphism.
\end{definition}

\pagebreak

\begin{theorem}[Krull intersection theorem]
If $ R $ is Noetherian, then
$$ \bigcap_{m \ge 1} I^m = 0. $$
Then $ R \hookrightarrow \widehat{R} $.
\end{theorem}

Another approach is to define $ a_n $ for $ n = 1, 2, \dots $ to be a Cauchy sequence if for any $ m \ge 1 $ there exists an $ N \ge 1 $ such that for any $ n \ge N $, $ a_n - a_N \in I^m $. Any Cauchy sequence has a limit in $ \widehat{R} $.

\begin{lemma}
If $ R $ is $ I $-adically complete, then $ I $ is contained in the Jacobson radical of $ R $.
\end{lemma}

\begin{proof}
Pick any $ a \in I $. Consider $ \sum_{n \ge 0} a^n $. Its partial sums is a Cauchy sequence, since
$$ \br{1 + \dots + a^n} - \br{1 + \dots + a^N} = a^{N + 1} \dots + a^n, $$
and take $ N = m $. Thus it converges to some $ b \in R $. Then $ \br{1 - a}b = \br{1 - a}\sum_{n \ge 1} a^n = 1 $, since $ \br{1 - a}\sum_{n = 1}^N a^n = 1 - a^{N + 1} \to 1 $. Hence $ 1 - a \in R^* $, therefore $ a \in \JJJ\br{R} $.
\end{proof}

So let us look at local rings, such as discrete valuation rings.

\begin{example}
Start with $ R = k\sbr{x} $ and $ I = \abr{x} $. Localise at $ \abr{x} $. Get
$$ R_I = k\sbr{x}_{\abr{x}} = \cbr{\dfrac{f\br{x}}{g\br{x}} \st f\br{x}, g\br{x} \in k\sbr{x}, \ g\br{0} \ne 0}. $$
Now consider the completion of $ k\sbr{x}_{\abr{x}} $. I claim that this is $ k\sbr{\sbr{x}} $, since
$$
\begin{tikzcd}[row sep=small]
\dots \arrow{r}{s_2} & k\sbr{x} / \abr{x^2} \arrow{r}{s_1} \arrow[cong]{d} & k\sbr{x} / \abr{x} \arrow[cong]{d} \\
& k \oplus kx & k
\end{tikzcd},
$$
so
$$ \function{k\sbr{\sbr{x}}}{k\sbr{x} / \abr{x^n}}{\sum_{i \ge 0} a_ix^i}{\sum_{i = 0}^{n - 1} a_ix^i} $$
is an isomorphism.
\end{example}

\begin{example}
Let $ R = \ZZ $ and $ I = \abr{p} $, so
$$ R_I = \ZZ_{\abr{p}} = \cbr{\dfrac{a}{b} \st \br{p, b} = 1}. $$
Let $ \ZZ_p $ be the completion of $ \ZZ_{\abr{p}} $ with respect to the topology given by the maximal ideal $ p\ZZ_{\abr{p}} $. By Tychonoff's theorem, $ \ZZ_p $ is compact. The elements of $ \ZZ_p $ can be written as
$$ a_0 + a_1p + \dots, \qquad 0 \le a_i \le p - 1. $$
Then $ \ZZ_p = \varprojlim_i \ZZ / p^i $, and the field of fractions of $ \ZZ_p $ is $ \QQ_p $.
\end{example}

Let $ R $ be a complete local ring with maximal ideal $ I $ and residue field $ k = R / I $.

\begin{definition}
The \textbf{reduction} of $ x^n + a_{n - 1}x^{n - 1} + \dots + a_0 $ is
$$ x^n + \overline{a_{n - 1}}x^{n - 1} + \dots + \overline{a_0}, $$
where $ \overline{\cdot} $ means the image under $ R \to R / I = k $.
\end{definition}

\begin{definition}
A polynomial with coefficients in $ R $ is a \textbf{lifting} of a polynomial in $ k\sbr{x} $, if it reduces to it modulo $ I $.
\end{definition}

\begin{theorem}[Hensel's lemma]
If the reduction of a monic polynomial $ F\br{t} \in R\sbr{t} $ modulo $ I $ is a product of two coprime monic polynomials in $ k\sbr{t} $, then these can be lifted to polynomials in $ R\sbr{t} $ whose product is $ F\br{t} $.
\end{theorem}

\begin{example}
If $ x^2 - a $ for $ a \in R $ reduces over $ k $ to $ x^2 - \overline{a} = \br{x - \alpha_1}\br{x - \alpha_2} $ for $ \alpha_1, \alpha_2 \in k $ such that $ \alpha_1 \ne \alpha_2 $, then $ x^2 - a = \br{x - a_1}\br{x - a_2} $ for $ a_1, a_2 \in R $.
\end{example}

\end{document}