\documentclass[12pt]{article}
\bibliographystyle{amsalpha}
\usepackage[active]{srcltx}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage[all]{xy}
\usepackage{fancybox}
\input{macros}
\hoffset=-0.05\textwidth
\textwidth=1.1\textwidth
\voffset=-0.08\textheight
\textheight=1.16\textheight

\title{Math 129: Algebraic Number Theory\\
{\bf Lecture 9}}
\author{William Stein}
\date{Thursday, March 4, 2004}
\begin{document}
\maketitle

Today we prove that the class group of the ring of integers of a
number field is finite, discuss how to compute it in some examples,
then introduce the group of units.  We will prove the main structure
theorem for the group of units on Tuesday.  The notes about proof of
finiteness of the class group are not given below, since they are in
the handout for Lecture 8.

\section{Remarks on Computing the Class Group}
If $\p$ is a prime of $\O_K$, then the intersection $\p\cap \Z=p\Z$ is
a prime ideal of $\Z$.  We say that $\p$ {\em lies over} $p\in\Z$.
Note $\p$ lies over $p\in\Z$ if and only if $\p$ is one of the prime
factors in the factorization of the ideal $p\O_K$.  Geometrically,
$\p$ is a point of $\Spec(\O_K)$ that lies over the point $p\Z$ of
$\Spec(\Z)$ under the map induced by the inclusion $\Z\hra \O_K$.


\begin{lemma}
Let $K$ be a number field with ring of integers $\O_K$.  Then the
class group $\Cl(K)$ is generated by the prime ideals $\p$ of $\O_K$
lying over primes $p\in\Z$ with $p\leq B_K = \sqrt{|d_K|}\cdot
\left(\frac{4}{\pi}\right)^s\cdot \frac{n!}{n^n}$,
where $s$ is the number of complex conjugate pairs of embeddings
$K\hra\C$.
\end{lemma}
\begin{proof}
We proved before that every ideal class in $\Cl(K)$ is represented by
an ideal $I$ with $\Norm(I)\leq B_K$.  Write $I=\prod_{i=1}^m
\p_i^{e_i}$, with each $e_i\geq 1$.  Then by multiplicativity of the
norm, each $\p_i$ also satisfies $\Norm(\p_i)\leq B_K$.  If $\p_i \cap
\Z=p\Z$, then $p\mid \Norm(\p_i)$, since $p$ is the residue
characteristic of $\O_K/\p$, so $p\leq B_K$. Thus $I$ is a product of
primes $\p$ that satisfies the norm bound of the lemma, whcih proves
the lemma.
\end{proof}

This is a sketch of how to compute $\Cl(K)$:
\begin{enumerate}
\item Use the ``factoring primes'' algorithm to list all
prime ideals $\p$ of $\O_K$ that appear in the factorization
of a prime $p\in \Z$ with $p\leq B_K$.
\item Find the group generated  by the ideal
classes $[\p]$, where the $\p$ are the prime ideals
found in step 1.  (In general, one must think more carefully
about how to do this step.)
\end{enumerate}
The following three examples illustrate computation of $\Cl(K)$
for $K=\Q(i), \Q(\sqrt{5})$ and $\Q(\sqrt{-6})$.
\begin{example}
We compute the class group of $K=\Q(i)$.  We have
$$
  n = 2, \quad r=0, \quad s=1, \quad d_K = -4,
$$
so 
$$ 
  B_K = \sqrt{4}\cdot \left(\frac{4}{\pi}\right)^1
   \cdot\left(\frac{2!}{2^2}\right) = \frac{8}{\pi} <3.
$$
Thus $\Cl(K)$ is generated by the prime divisors
of $2$.  We have
$$
 2\O_K = (1+i)^2,
$$
so $\Cl(K)$ is generated by the principal prime
ideal $\p=(1+i)$. Thus $\Cl(K)=0$ is trivial.
\end{example}

\begin{example}
We compute the class group of $K=\Q(\sqrt{5})$.
We have
$$
  n = 2, \quad r = 2, \quad s=0, \quad d_K = 5,
$$
so $$B = \sqrt{5}\cdot \left(\frac{4}{\pi}\right)^0\cdot 
\left(\frac{2!}{2^2}\right)  < 3.$$
Thus $\Cl(K)$ is generated by the primes that divide $2$.
We have $\O_K=\Z[\gamma]$, where $\gamma=\frac{1+\sqrt{5}}{2}$
satisfies $x^2-x-1$.   The polynomial $x^2-x-1$ is irreducible
mod $2$, so $2\O_K$ is prime.  Since it is principal, we see
that $\Cl(K)=1$ is trivial.
\end{example}

\begin{example}
In this example, we compute the class group of $K=\Q(\sqrt{-6})$.
We have
$$
  n = 2, \quad r=0, \quad s=1, \quad d_K = -6,
$$
so 
$$
  B = \sqrt{6} \cdot \frac{4}{\pi} \sim 3.1.
$$ 
Thus $\Cl(K)$ is generated by the prime ideals lying over $2$ and $3$.
We have $\O_K=\Z[\sqrt{-6}]$, and $\sqrt{-6}$ satisfies $x^2+6=0$.
Factoring $x^2+6$ modulo $2$ and $3$ we see that the class group
is generated by the prime ideals
$$
  \p_2 = (2,\sqrt{-6})\qquad\text{and}\qquad
  \p_3 = (3,\sqrt{-6}).
$$
Also, $\p_2^2 = 2\O_K$ and $\p_3^2=3\O_K$, so 
$\p_2$ and $\p_3$ define elements of order
dividing $2$ in $\Cl(K)$.  

Is either $\p_2$ or $\p_3$ principal?  Fortunately,
there is an easier norm trick that allows us to decide.
Suppose $\p_2 = (\alpha)$, where $\alpha=a+b\sqrt{-6}$.
Then $$2=\Norm(\p_2) = |\Norm(\alpha)| = (a+b\sqrt{-6})(a-b\sqrt{-6})
   = a^2 + 6b^2.$$
Trying the first few values of $a, b\in \Z$, we see that this
equation has no solutions, so $\p_2$ can not
be principal.  By a similar argument, we see that $\p_3$
is not principal either.  Thus $\p_2$ and $\p_3$ define
elements of order $2$ in $\Cl(K)$.

Does the class of $\p_2$ equal the class of $\p_3$?
Since $\p_2$ and $\p_3$ define classes of order~$2$,
we can decide this by finding the class of $\p_2\cdot \p_3$.
We have
$$
 \p_2\cdot \p_3 =  (2,\sqrt{-6})\cdot (3,\sqrt{-6})
   = (6,2\sqrt{-6}, 3\sqrt{-6}) \subset (\sqrt{-6}).$$
The ideals on both sides of the inclusion have norm $6$,
so by multiplicativity of the norm, they must be the
same ideal.  Thus $\p_2\cdot \p_3=(\sqrt{-6})$ is principal,
so $\p_2$ and $\p_3$ represent the same element of $\Cl(K)$.
We conclude that $$\Cl(K) = \langle \p_2 \rangle = \Z/2\Z.$$
\end{example}


\section{The Group of Units}
\begin{definition}[Unit Group]
The {\em group of units} $U_K$ associated to a number field~$K$ is the
group of elements of $\O_K$ that have an inverse in $\O_K$.
\end{definition}

\begin{proposition}
An element $a\in K$ is a unit if and only if $\Norm(a)=\pm 1$.
\end{proposition}
%\begin{proof}\end{proof}

\begin{theorem}\label{thm:units}
The group $U_K$ of units of $\O_K$ is the product
of a finite cyclic group of roots of unity with
a free abelian group of rank $r+s-1$, where~$r$
is the number of real embeddings of~$K$ and~$s$
is the number of complex conjugate pairs of embeddings.
\end{theorem}
%\begin{proof}\end{proof}

\begin{example}[Pell's Equation]
The classical Pell's equation is, given square-free $d>0$, to find all
positive integer solutions $(x,y)$ to the equation $x^2-dy^2 = 1$.
Note that if $x+y\sqrt{d}\in\Q(\sqrt{d})$, then
$$\Norm(x+y\sqrt{d}) = (x+y\sqrt{d})(x-y\sqrt{d}) = x^2 -dy^2.$$ The
solutions to Pell's equation thus form a finite-index subgroup of the
group of units in the ring of integers of $\Q(\sqrt{d})$.
Theorem~\ref{thm:units} implies that for any~$d$ the solutions to
Pell's equation form an infinite cyclic group, a fact that takes
substantial work to prove using only elementary number theory (for
example, using continued fractions).
\end{example}


\bibliography{biblio}
\end{document}
