%% LyX 2.0.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,british]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage{babel}
\usepackage{units}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[all]{xy}
\usepackage[unicode=true]
 {hyperref}
\usepackage{breakurl}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}[section]
  \theoremstyle{definition}
  \newtheorem{defn}[thm]{\protect\definitionname}
  \theoremstyle{definition}
  \newtheorem*{example*}{\protect\examplename}
  \theoremstyle{plain}
  \newtheorem{prop}[thm]{\protect\propositionname}
  \theoremstyle{plain}
  \newtheorem*{fact*}{\protect\factname}
  \theoremstyle{definition}
  \newtheorem{problem}[thm]{\protect\problemname}
\newenvironment{lyxlist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1}
 \setlength{\leftmargin}{\labelwidth}
 \addtolength{\leftmargin}{\labelsep}
 \renewcommand{\makelabel}[1]{##1\hfil}}}
{\end{list}}
 \newcommand\thmsname{\protect\theoremname}
 \newcommand\nm@thmtype{theorem}
 \theoremstyle{plain}
 \newtheorem*{namedtheorem}{\thmsname}
 \newenvironment{namedthm}[1][Undefined Theorem Name]{
   \ifx{#1}{Undefined Theorem Name}\renewcommand\nm@thmtype{theorem*}
   \else\renewcommand\thmsname{#1}\renewcommand\nm@thmtype{namedtheorem}
   \fi
   \begin{\nm@thmtype}}
   {\end{\nm@thmtype}}
  \theoremstyle{plain}
  \newtheorem{cor}[thm]{\protect\corollaryname}
 \theoremstyle{definition}
 \newtheorem*{defn*}{\protect\definitionname}
  \theoremstyle{definition}
  \newtheorem*{problem*}{\protect\problemname}
  \theoremstyle{plain}
  \newtheorem{lem}[thm]{\protect\lemmaname}
  \theoremstyle{plain}
  \newtheorem*{conjecture*}{\protect\conjecturename}
  \theoremstyle{remark}
  \newtheorem*{rem*}{\protect\remarkname}
  \theoremstyle{definition}
  \newtheorem{example}[thm]{\protect\examplename}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}

\makeatother

  \addto\captionsbritish{\renewcommand{\conjecturename}{Conjecture}}
  \addto\captionsbritish{\renewcommand{\corollaryname}{Corollary}}
  \addto\captionsbritish{\renewcommand{\definitionname}{Definition}}
  \addto\captionsbritish{\renewcommand{\examplename}{Example}}
  \addto\captionsbritish{\renewcommand{\factname}{Fact}}
  \addto\captionsbritish{\renewcommand{\lemmaname}{Lemma}}
  \addto\captionsbritish{\renewcommand{\problemname}{Problem}}
  \addto\captionsbritish{\renewcommand{\propositionname}{Proposition}}
  \addto\captionsbritish{\renewcommand{\remarkname}{Remark}}
  \addto\captionsbritish{\renewcommand{\theoremname}{Theorem}}
  \addto\captionsenglish{\renewcommand{\conjecturename}{Conjecture}}
  \addto\captionsenglish{\renewcommand{\corollaryname}{Corollary}}
  \addto\captionsenglish{\renewcommand{\definitionname}{Definition}}
  \addto\captionsenglish{\renewcommand{\examplename}{Example}}
  \addto\captionsenglish{\renewcommand{\factname}{Fact}}
  \addto\captionsenglish{\renewcommand{\lemmaname}{Lemma}}
  \addto\captionsenglish{\renewcommand{\problemname}{Problem}}
  \addto\captionsenglish{\renewcommand{\propositionname}{Proposition}}
  \addto\captionsenglish{\renewcommand{\remarkname}{Remark}}
  \addto\captionsenglish{\renewcommand{\theoremname}{Theorem}}
  \providecommand{\conjecturename}{Conjecture}
  \providecommand{\corollaryname}{Corollary}
  \providecommand{\definitionname}{Definition}
  \providecommand{\examplename}{Example}
  \providecommand{\factname}{Fact}
  \providecommand{\lemmaname}{Lemma}
  \providecommand{\problemname}{Problem}
  \providecommand{\propositionname}{Proposition}
  \providecommand{\remarkname}{Remark}
  \providecommand{\theoremname}{Theorem}
\providecommand{\theoremname}{Theorem}

\begin{document}
\selectlanguage{english}%
\global\long\def\zz{\mathbb{Z}}
\global\long\def\im{\operatorname{im}}
\global\long\def\re{\operatorname{re}}
\global\long\def\rr{\mathbb{R}}
\global\long\def\cc{\mathbb{C}}
\global\long\def\vv{\mathbb{V}}
\global\long\def\SL{\operatorname{SL}}
\global\long\def\ord{\operatorname{ord}}
\global\long\def\Spec{\operatorname{Spec}}
\global\long\def\qq{\mathbb{Q}}
\global\long\def\pp{\mathbb{P}}
\global\long\def\Hom{\operatorname{Hom}}
\global\long\def\id{\operatorname{id}}
\global\long\def\gcd{\operatorname{gcd}}
\global\long\def\lcm{\operatorname{lcm}}
\global\long\def\Sym{\operatorname{Sym}}
\global\long\def\ff{\mathbb{F}}
\global\long\def\nn{\mathbb{N}}
\global\long\def\hh{\mathbb{H}}
\global\long\def\Ann{\operatorname{Ann}}
\global\long\def\End{\operatorname{End}}
\global\long\def\sgn{\operatorname{sgn}}
 \global\long\def\rk{\operatorname{rk}}
\global\long\def\Br{\operatorname{Br}}
 \global\long\def\Hasse{\operatorname{Hasse}}
\global\long\def\GL{\operatorname{GL}}
\global\long\def\Coll{\operatorname{Col}}
 \global\long\def\Tr{\operatorname{Tr}}
\global\long\def\aa{\mathbb{A}}
\global\long\def\ld{\operatorname{in}_{<}}
\global\long\def\ob{\operatorname{Ob}}
\global\long\def\mor{\operatorname{mor}}
\global\long\def\disc{\operatorname{disc}}



\title{Algebraic Number Theory}


\author{Johan Bosman\\
Notes by Florian Bouyer}

\maketitle
\selectlanguage{british}%
\begin{center}
Copyright (C) Bouyer 2011. 
\par\end{center}

\begin{center}
Permission is granted to copy, distribute and/or modify this document 
\par\end{center}

\begin{center}
under the terms of the GNU Free Documentation License, Version 1.3 
\par\end{center}

\begin{center}
or any later version published by the Free Software Foundation; 
\par\end{center}

\begin{center}
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. 
\par\end{center}

\begin{center}
A copy of the license can be found at \href{http://www.gnu.org/licenses/fdl.html}{http://www.gnu.org/licenses/fdl.html}
\par\end{center}

\selectlanguage{english}%
\tableofcontents{}

\newpage{}


\section{Introduction and Motivations}

\selectlanguage{british}%
Most of the ideas in this section will be made more formal and clearer
in later sections.


\subsection{Motivations}
\selectlanguage{english}%
\begin{defn}
An element $\alpha$ of $\cc$ is an \emph{algebraic number} if it
is a root of a non-zero polynomial with rational coefficients

A \emph{number field} is a subfield $K$ of $\cc$ that has finite
degree (as a vector space) over $\qq$. We denote the degree by $[K:\qq]$. \end{defn}
\selectlanguage{british}%
\begin{example*}
{}
\begin{itemize}
\item $\qq$
\item $\qq(\sqrt{2})=\left\{ a+b\sqrt{2}:a,b\in\qq\right\} $
\item $\qq(i)=\left\{ a+bi:a,b\in\qq\right\} $
\item $\qq(\sqrt[3]{2})=\qq[x]/(x^{3}-2)$
\end{itemize}
\end{example*}
Note that every element of a number field is an algebraic number and
every algebraic number is an element of some number field. The following
is a brief explanation of this.

Let $K$ be a number field, $\alpha\in K$. Then $\qq(\alpha)\subseteq K$and
we will late see that $[\qq(\alpha):\qq]|[K:\qq]<\infty$. So there
exists a relation between $1,\alpha,\dots,\alpha^{n}$ for some $n$.
If $\alpha$ is algebraic then there exists a minimal polynomial $f$
for which $\alpha$ is a root. $\qq(\alpha)\cong\qq[x]/(f)$ has degree
$\deg(f)$ over $\qq$. 

Consider $\zz[i]\subset\qq[i]$, also called the \emph{Gaussian integers}.
A question we may ask, is what prime number $p$ can be written as
the sum of $2$ squares? That is $p=x^{2}+y^{2}=(x+iy)(x-iy)$, we
``guess'' that an odd prime $p$ is $x^{2}+y^{2}$ if and only if
$p\equiv2\mod4$. A square is always $0$ or $1$ $\mod4$, so the
sum of two squares is either $0,1$ or $2\mod4$. Hence no number
that is $3\mod4$ is the sum of two squares. Therefore not all numbers
that are $1\mod4$ can be written as the sum of two squares.

Notice that there exist complex conjugation in $\zz[i]$, that is
the map $a+bi\mapsto a-bi=\overline{a+bi}$ is a ring automorphism.
We can define the norm map $N:\zz[i]\to\zz$ by $\alpha\mapsto\alpha\overline{\alpha}$,
more explicitly, $(a+bi)\mapsto(a+bi)(a-bi)=a^{2}+b^{2}$. We will
later see that $N(\alpha\beta)=N(\alpha)N(\beta)$. 
\begin{defn}
Let $K$ be a number field, a element $\alpha\in K$ is called a \emph{unit
}if it is invertible. That is there exists $\beta\in K$ such that
$\alpha\beta=1$.\end{defn}
\begin{prop}
The units of $\zz[i]$ are $1,-1,i,-i$\end{prop}
\begin{proof}
Let $\alpha\in\zz[i]$ be a unit. Then $N(\alpha)$ is a unit in $\zz$,
(since there exists $\beta\in\zz[i]$ such that $\alpha\beta=1$,
hence $1=N(\alpha\beta)=N(\alpha)N(\beta)$) Now let $\alpha=a+bi$,
then $N(\alpha)=a^{2}+b^{2}=\pm1$. Now $-1$ is not the sum of two
squares hence $\alpha\in\{\pm1,\pm i\}$\end{proof}
\begin{defn}
Let $K$ be a number field, an element $\alpha\in K$ is \emph{irreducible}
if $\alpha$ is not a unit, and for all $\beta,\gamma\in\zz[i]$ with
$\alpha=\beta\gamma$, we have either $\beta$ or $\gamma$ is a unit.\end{defn}
\begin{fact*}
$\zz[i]$ is a unique factorization domain, that is every non-zero
elements $\alpha\in\zz[i]$ can be written as a product of irreducible
elements in a way that is unique up to ordering and multiplication
of irreducible elements by units.\end{fact*}
\begin{thm}
If $p\equiv1\mod4$ is a prime then there exists $x,y\in\zz$ such
that $p=x^{2}+y^{2}=(x+iy)(x-iy)=N(x+iy)$\end{thm}
\begin{proof}
First we show that there exists $a\in\zz$ such that $p|a^{2}+1$.
Since $p\equiv1\mod4$ we have $\left(\frac{-1}{p}\right)=1$ (see
Topics in Number Theory). Let $a=\frac{p-1}{2}!$, then $a^{2}=\left(\frac{p-1}{2}\right)!\left(\frac{p-1}{2}\right)!=1\cdot\dots\cdot\left(\frac{p-1}{2}\right)\cdot\left(\frac{p-1}{2}\right)\cdot\dots\cdot1\equiv-1\mod p$.
Hence $p|a^{2}+1=(a+i)(a-i)$. 

Is $p$ irreducible in $\zz[i]$? If $p$ were indeed irreducible,
then $p|(a+i)$ or $p|(a-i)$. Not possible since $a+i=p(c+di)=pc+pdi$
means $pd=1$. So $p$ must be reducible in $\zz[i]$. Let $p=\alpha\beta$,
$\alpha,\beta\notin\left(\zz[i]\right)^{*}$ and $N(p)=p^{2}=N(\alpha)N(\beta)\Rightarrow N(\alpha)\neq\pm1\neq N(\beta)$.
So $N(\alpha)=p=N(\beta)$. Write $\alpha=x+iy$, then $N(\alpha)=p=x^{2}+y^{2}$
\end{proof}

\subsection{Finding Integer Solutions}
\begin{problem}
Determine all integer solution of $x^{2}+1=y^{3}$\end{problem}
\begin{proof}[Answer]
 First note $x^{2}+1=(x+i)(x-i)=y^{3}$, we'll use this to show that
if $x+i$ and $x-i$ are coprime then $x+i$ and $x-i$ are cubes
in $\zz[i]$.

Suppose that they have a common factor, say $\delta$. Then $\delta|(x+i)-(x-i)=2i=(1+i)^{2}$.
So if $x+i$ and $x-i$ are not coprime, then $(1+i)|(x+i)$, i.e.,$(x+i)=(1+i)(a+bi)=(a-b)+(a+b)i$.
Now $a+b$ and $a-b$ are either both even or both odd. We also know
that $a+b=1$, so they must be both odd, hence $x$ is odd. Now an
odd square is always $1\mod8$ . Hence $x^{2}+1\equiv2\mod8$, so
$x^{2}+1$ is even but not divisible by $8$, contradicting the fact
that is is a cube.

Hence $x+i$ and $x-i$ are coprime in $\zz[i]$. So let $x+i=\epsilon\pi_{1}^{e_{1}}\dots\pi_{n}^{e_{n}}$
where $\pi_{i}$ are distinct up to units. Now $x-i=\overline{x+i}=\overline{\epsilon}\overline{\pi_{1}}^{e_{1}}\dots\overline{\pi_{n}}^{e_{n}}$.
So $(x+i)(x-i)=\epsilon\overline{\epsilon}\pi_{1}^{e_{1}}\dots\pi_{n}^{e_{n}}\overline{\pi_{1}}^{e_{1}}\dots\overline{\pi_{n}}^{e_{n}}=y^{3}$.
Let $y=\epsilon'q_{1}^{f_{1}}\dots q_{n}^{f_{n}}\Rightarrow y^{3}=\epsilon'^{3}q_{1}^{3f_{1}}\dots q_{n}^{3f_{n}}$.
The $q_{i}$ are some rearrangement of $\pi_{i},\overline{\pi}_{i}$
up to units. Hence we have $e_{i}=3f_{j}$, so $x+i=$unit times a
cube, (Note in $\zz[i]$, $\pm1=(\pm1)^{3}$ and $\pm i=(\mp i)^{3}$).
Hence $x+i$ is a cube in $\zz[i]$.

So let $x+i=(a+ib)^{3}$ for some $a,b\in\zz$. Then $x+i=a^{3}+3a^{2}bi-3ab^{2}-b^{3}i=a^{3}-3ab^{2}+(3a^{2}b-b^{3})i$.
Solving the imaginary part we have $1=3a^{2}b-b^{3}=b(3a^{2}-b^{2})$.
So $b=\pm1$ and $3a^{2}-b^{2}=3a^{2}-1=\pm1$. Now $3a^{2}=2$ is
impossible, so we must have $3a^{2}=0$, i.e., $a=0$ and $b=-1$.
This gives $x=a^{3}-3ab^{2}=0$.

Hence $y=1,x=0$ is the only integer solution to $x^{2}+1=y^{3}$\end{proof}
\begin{thm}[This is False]
 The equation $x^{2}+19=y^{3}$ has no solutions in $\zz$ (Not true
as $x=18,y=17$ is a solution since $18^{2}+19=324+19=343=17^{2}$)\end{thm}
\begin{proof}[Proof of False Theorem.]
 This proof is flawed as we will explain later on. (Try to find out
where it is flawed)

Consider $\zz[\sqrt{-19}]=\{a+b\sqrt{-19}:a,b\in\zz]$. Then we define
the conjugation this time to be $\overline{a+b\sqrt{-19}}=a-b\sqrt{-19}$,
and similarly we define a norm function $N:\zz[\sqrt{-19}]\to\zz$
by $\alpha\mapsto\alpha\overline{\alpha}$. Hence $N(a+b\sqrt{-19})=a^{2}+19b^{2}$.
So we have $x^{2}+19=(x+\sqrt{-19})(x-\sqrt{-19})$.

Suppose that these two factors have a common divisor, say $\delta$.
Then $\delta|2\sqrt{-19}$. Now $\sqrt{-19}$ is irreducible since
$N(\sqrt{-19})=19$ which is a prime. If $2=\alpha\beta$ with $\alpha,\beta\notin\left(\zz[\sqrt{-19}\right)^{*}$,
then $N(\alpha)N(\beta)=N(2)=2^{2}$, so $N(\alpha)=2$ which is impossible.
So $2$ is also irreducible. Hence we just need to check where $2|x+\sqrt{-19}$
or $\sqrt{-19}|x+\sqrt{-19}$ is possible.

Suppose $\sqrt{-19}|x+\sqrt{-19}$, then $x+\sqrt{-19}=\sqrt{-19}(a+b\sqrt{-19})=-19b+a\sqrt{-19}$,
so $a=1$ and $19|x$. Hence $x^{2}+19\equiv19\mod19^{2}$, i.e.,
$x^{2}+19$ is divisible by $19$ but not by $19^{2}$ so it can't
be a cube. Suppose $2|x+\sqrt{-19}$, then $x+\sqrt{-19}=2a+2b\sqrt{-19}$,
which is impossible. 

Hence we have $x+\sqrt{-19}$ and $x-\sqrt{-19}$ are coprime, and
let $x+\sqrt{-19}=\epsilon\pi_{1}^{e_{1}}\dots\pi_{n}^{e_{n}}$. Then
$x-19=\overline{x+\sqrt{-19}}=\overline{\epsilon}\overline{\pi_{1}}^{e_{1}}\dots\overline{\pi_{n}}^{e_{n}}$,
so $(x+\sqrt{-19})(x-\sqrt{-19})=\epsilon\overline{\epsilon}\pi_{1}^{e_{1}}\dots\pi_{n}^{e_{n}}\overline{\pi_{1}}^{e_{1}}\dots\overline{\pi_{n}}^{e_{n}}=y^{3}$.
If we let $y=\epsilon'q_{1}^{f_{1}}\dots q_{n}^{f_{n}}$, then $y^{3}=\epsilon'^{3}q_{1}^{3f_{1}}\dots q_{n}^{3f_{n}}$,
so the $q_{i}$ are some rearrangements of $\pi_{i},\overline{\pi_{i}}$
up to units. Hence corresponding $e_{i}=3f_{i}$ and so $x+\sqrt{-19}=$unit
times a cube. Now units of $\zz[\sqrt{-19}]=\left\{ \pm1\right\} $.

So $x+\sqrt{-19}=(a+b\sqrt{-19})^{3}=(a^{3}-19ab^{2})+(3a^{2}b-19b^{3})\sqrt{-19}$.
Again comparing $\sqrt{-19}$ coefficients we have $b(3a^{2}-19b^{2})=1$,
so $b=\pm1$ and $3a^{2}-19=\pm1$. But $3a^{2}=20$ is impossible
since $3\nmid20$, and $3a^{2}=18=3\cdot6$ is impossible since $6$
is not a square. So no solution exists.
\end{proof}
This proof relied on the fact that $\zz[\sqrt{-19}]$ is a UFD, which
it is not. We can see this by considering $343=7^{3}=(18+\sqrt{-19})(18-\sqrt{-19})$.
Now $N(7)=7^{2}$. Suppose $7=\alpha\beta$ with $\alpha,\beta\notin\left(\zz[\sqrt{-19}]\right)^{*}$.
Then $N(\alpha)N(\beta)=7^{2}$, so $N(\alpha)=7$, but $N(a+b\sqrt{-19})=a^{2}+19b^{2}\neq7$.
So $7$ is irreducible in $\zz[\sqrt{-19}]$. On the other hand $N(18+\sqrt{19})=7^{3}$,
and suppose that $N(\alpha)N(\beta)=7^{3}$, then without loss of
generality $N(\alpha)=7$ and $N(\beta)=7^{2}$. But we have just
seen no elements have $N(\alpha)=7$, so $18+\sqrt{-19}$ is irreducible
in $\zz[\sqrt{-19}]$. The same argument shows that $18=\sqrt{-19}$
is also irreducible in $\zz[\sqrt{-19}]$


\subsection{Pell's Equations}

Fix $d\in\zz_{>0}$ with $d\neq a^{2}$ for any $a\in\zz$. Then Pell's
equation is $x^{2}-dy^{2}=1$, with $x,y\in\zz$. 

Now $\zz[\sqrt{d}]=\{a+b\sqrt{d}:a,b\in\zz\}$. This has an automorphism
$a+b\sqrt{d}\mapsto a-b\sqrt{d}=\overline{a+b\sqrt{d}}.$ (Note that
$\overline{\phantom{x}}$ is just notation, and it does not mean complex
conjugation). Again we can define a function called the norm, $N:\zz[\sqrt{d}]\to\zz$
defined by $\alpha\mapsto\alpha\overline{\alpha}$, and explicitly
$(a+b\sqrt{d})\mapsto a^{2}-db^{2}$. Hence Pell's equation comes
down to solving $N(x+y\sqrt{d})=1$.

Now recall that $\alpha\in\left(\zz[\sqrt{d}]\right)^{*}$, then there
exists $\beta$ such that $\alpha\beta=1$. So $N(\alpha)N(\beta)=1$,
so $N(\alpha)=\pm1$. On the other hand if $N(\alpha)=\pm1$, then
$\alpha\overline{\alpha}=\pm1$, so $\pm\overline{\alpha}=\alpha^{-1}$
, hence $\alpha$ is a unit.
\begin{example*}
$d=3$. Then $x^{2}-3y^{2}=1\Rightarrow3y^{2}+1=x^{2}$
\begin{lyxlist}{00.00.0000}
\item [{$y=0$}] $3y^{2}+1=1$. This is ok, it leads to $(1,0)$ which
correspond to $1\in\zz[\sqrt{3}]$
\item [{$y=1$}] $3y^{2}+1=4$. This is ok, it leads to $(2,1)$ which
gives $2+\sqrt{3}\in\zz[\sqrt{3}]$
\item [{$y=2$}] $3y^{2}+1=13$
\item [{$y=3$}] $3y^{2}+1=28$
\item [{$y=4$}] $3y^{2}+1=49$. This is ok, it leads to $(7$,4) which
gives $7+4\sqrt{3}\in\zz[\sqrt{3}]$
\end{lyxlist}
Note that if $\epsilon$ is a unit in $\zz[\sqrt{d}]$, then $\pm\epsilon^{n}$
is a unit for all $n\in\zz$. (For example $(2+\sqrt{3})^{2}=2^{2}+2\cdot2\sqrt{3}+3=7+4\sqrt{3}$.
If $x,y$ is a solution, then of course $(-x,-y)$ is a solution as
well. Hence there are infinitely many solutions\end{example*}
\begin{thm}
Let $d\in\zz_{>0}$ with $d\neq a^{2}$. Then there exists $\epsilon_{d}\in\zz[\sqrt{d}]$,
$\epsilon_{d}\neq\pm1$ such that every unit can be written as $\pm\epsilon_{d}^{n}$,
$n\in\zz$. Such an $\epsilon_{d}$ is called a \emph{Fundamental
Unit} of $\zz[\sqrt{d}]$. If $\epsilon_{d}$ is a fundamental unit,
then so is $\pm\epsilon_{d}^{-1}$.\end{thm}
\begin{proof}
This is a consequence of Dirichlet's Unit Theorem, which we will prove
at the end of the course.\end{proof}
\begin{example*}
We will show that $\epsilon_{3}=2+\sqrt{3}\in\zz[\sqrt{3}]$

Let $x_{1}+y_{1}\sqrt{3}\in\zz[\sqrt{d}]$ be a fundamental unit.
Without any lost of generality we can assume that $x_{1}\geq0$. Now
$(x_{1}+y_{1}\sqrt{3})^{-1}=\frac{x_{1}-y_{1}\sqrt{3}}{(x_{1}+y_{1}\sqrt{3})(x_{1}-y_{1}\sqrt{3})}=\pm(x_{1}-y_{1}\sqrt{3})$.
So without loss of generality we can also assume $y_{1}\geq0$.

Put $x_{n}+y_{n}\sqrt{3}=(x_{1}+y_{1}\sqrt{3})^{2}=x_{1}^{n}+nx_{1}^{n-1}y\sqrt{3}+\dots$.
So $x_{n}=x_{1}^{n}+\dots\geq x_{1}^{n}$ and $y_{n}=nx_{1}^{n-1}y_{1}$.
If $x_{1}=0$ then $3y_{1}^{2}=\pm1$ which is not possible. Similarly
if $y_{1}=0$ then $x_{1}^{2}=1\Rightarrow x_{1}=\pm1$ and $\epsilon_{3}=\pm1$
which is impossible by definition. So $x_{1}\geq1,y_{1}\geq1$. For
$n\geq2:x_{n}\geq x_{1}^{n}\geq x_{1}$ and $y_{n}=nx_{1}^{n-1}y_{1}>\geq ny_{1}>y_{1}$

Conclusion: A solution $(x,y)$ of $x^{2}-3y^{2}=\pm1$ with $y\geq1$
minimal is a Fundamental unit for $\zz[\sqrt{3}]$. Hence $2+\sqrt{3}$
is a fundamental unit for $\zz[\sqrt{3}]$, so all solution for $x^{2}+3y^{2}=\pm1$
are obtained by $(x,y)=(\pm x_{n},\pm y_{n})$ where $x_{n}+y_{n}\sqrt{3}=(2+\sqrt{3})^{n}$
.

\newpage{}
\end{example*}

\section{Fields, Rings and Modules}


\subsection{Fields}
\begin{defn}
If $K$ is a field then by a \emph{field extension} of $K$, we mean
a field $L$ that contains $K$. We will denote this by $L/K$.

If $L/K$ is a field extension, then multiplication of $K$ on $L$
defines a $K$-vector space structure on $L$. The \emph{degree} $[L:K]$
of $L/K$ is the dimension $\dim_{K}(L)$\end{defn}
\begin{example*}
{}
\begin{itemize}
\item $[K:K]=1$
\item $[\cc:\rr]=2$
\item $[\rr:\qq]=\infty$ (uncountably infinite)
\end{itemize}
\end{example*}
\begin{namedthm}[The Tower Law]
If $L/K$ and $M/K$ are fields extensions with $L\subseteq M$,
then $[M:K]=[M:L][L:K]$\end{namedthm}
\begin{proof}
Let $\{x_{\alpha}:\alpha\in I\}$ be a basis for $L/K$ and let $\{y_{\beta}:\beta:J\}$
be a basis for $M/L$. Define $z_{\alpha\beta}=x_{\alpha}y_{\beta}\in M$.
We claim that $\{z_{\alpha\beta}\}$ is a basis for $M/K$.

We show that they are linearly independent. If $\sum_{\alpha,\beta}a_{\alpha\beta}z_{\alpha\beta}=0$
with finitely many $a_{\alpha\beta}\in K$ non-zero. Then $\sum_{\beta}(\sum_{\alpha}a_{\alpha\beta}x_{\alpha})y_{\beta}=0$,
since the $y_{\beta}$ are linearly independent over $L$ we have
$\sum_{\alpha}a_{\alpha\beta}x_{\alpha}=0$ for all \textbf{$\beta$}.
Since the $x_{\alpha}$ are linearly independent over $K$ we have
$a_{\alpha\beta}=0$ for all $\alpha,\beta$.

We show spanning. If $z\in M$, then $z=\sum\lambda_{\beta}y_{\beta}$
for $\lambda_{\beta}\in L$. For each $\lambda_{\beta}=\sum a_{\alpha\beta}x_{\alpha}$.
So $x=\sum_{\beta}(\sum_{\alpha}a_{\alpha\beta}x_{\alpha})y_{\beta}=\sum_{\alpha,\beta}a_{\alpha\beta}x_{\alpha}y_{\beta}=\sum a_{\alpha\beta}x_{\alpha\beta}$.

So $\{z_{\alpha\beta}\}$ is a basis for $M$ over $K$, so $[M:K]=[M:L][L:K]$\end{proof}
\begin{cor}
If $K\subset L\subset M$ are fields with $[M:K]<\infty$ then $[L:K]|[M:K]$.\end{cor}
\begin{defn*}
$L/K$ is called \emph{finite} if $[L:K]<\infty$

If $K$ is a field and $x$ is an indeterminate variable, then $K(x)$
denotes the field of rational functions in $x$ with coefficients
in $K$. That is 
\[
K(x)=\left\{ \frac{f(x)}{g(x)}:f,g\in K[x],g\neq0\right\} 
\]


If $L/K$ is a field extension, $\alpha\in L$. Then $K(\alpha)$
is the subfield of $L$ generated by $K$ and $\alpha$. 
\[
K(\alpha)=\left\{ \frac{f(\alpha)}{g(\alpha)}:f,g\in K[x],g(\alpha)\neq0\right\} =\bigcap_{K\subset M\subset L,\alpha\in M}M
\]


Let $L/K$ be a field extension, $\alpha\in L$. We say that $\alpha$
is \emph{algebraic} over $K$ if there exists a non-zero polynomial
$f\in K[x]$ with $f(\alpha)=0$\end{defn*}
\begin{thm}
Let $L/K$ be a field extension and $\alpha\in L$. Then $\alpha$
is algebraic over $K$ if and only if $K(\alpha)/K$ is a finite extension.\end{thm}
\begin{proof}
$\Leftarrow$) Let $n=[K(\alpha):K]$ and consider $1,\alpha,\dots,\alpha^{n}\in K(\alpha)$.
Notice that there are $n+1$ of them, so they must be linearly dependent
since the dimension of the vector space is $n$. So there exists $a_{i}\in K$
such that $a_{0}+a_{1}\alpha+\dots+a_{n}\alpha^{n}=0$ with $a_{i}$
not all zero. Hence by definition $\alpha$ is algebraic.

$\Rightarrow$) Assume that there exists $f\neq0\in K[x]$ such that
$f(\alpha)=0$, and assume that $f$ has minimal degree $n$. We claim
that $f\in K[x]$ is irreducible.

Suppose that $f=gh$, with $g,h$ non-constant. Then $0=f(\alpha)=g(\alpha)h(\alpha)$,
so without loss of generality $g(\alpha)=0$, but $\deg(g)<\deg(f)$.
This is a contradiction. Let $f=a_{n}x^{n}+\dots+a_{0}$ with $a_{n}\neq0$.
Then $f(\alpha)=0\Rightarrow a_{n}\alpha^{n}+\dots+a_{0}=0\Rightarrow\alpha^{n}=-\frac{1}{a_{n}}(a_{n-1}\alpha^{n-1}+\dots+a_{0})$.
So we can reduce any polynomial expression in $\alpha$ of degree
$\geq n$ to one of degree $\leq n-1$.

Hence $K(\alpha)=\left\{ \frac{b_{0}+\dots+b_{n-1}\alpha^{n-1}}{c_{0}+\dots+c_{n-1}\alpha^{n-1}}:b_{i},c_{i}\in K\right\} $.
Pick $\frac{b(\alpha)}{c(\alpha)}\in K(\alpha)$, now $\deg(c)\leq n-1<\deg f$
and $c(\alpha)\neq0$. Hence $\gcd(c,f)=1$, so there exists $\lambda,\mu\in K[x]$
with $\lambda(x)c(x)+\mu(x)f(x)=1$. In particular $1=\lambda(\alpha)c(\alpha)+\mu(\alpha)f(\alpha)=\lambda(\alpha)c(\alpha)$,
hence $\lambda(\alpha)=\frac{1}{c(\alpha)}\in K[\alpha]$

Any elements of $K(\alpha)$ is a polynomial in $\alpha$ of degree
$\leq n-1$. So if $\alpha$ is algebraic over $K$, we have just
shown that $K(\alpha)=K[\alpha]$ and $1,\alpha,\dots,\alpha^{n-1}$
is a basis for $K[\alpha]/K$, hence $[K(\alpha):K]=n$\end{proof}
\begin{thm}
Let $L/K$ be a field extension, then the set $M$ of all $\alpha\in L$
that are algebraic over $K$ is a subfield of $L$ containing $K$.\end{thm}
\begin{proof}
First $K\subseteq M$, as $\alpha\in K$ is a root of $x-\alpha\in K[x]$

So take $\alpha,\beta\in M$, we need to show that $\alpha-\beta\in M$
and $\frac{\alpha}{\beta}\in M$ if $\beta\neq0$. Consider the subfield
$K(\alpha,\beta)\subseteq L$. Now $[K(\alpha)(\beta):K]=[K(\alpha,\beta):K(\alpha)][K(\alpha):K]$.
We have $[K(\alpha)(\beta):K(\alpha)]\leq[K(\beta):K]$ since the
first one is the degree of the minimal polynomial of $\beta$ over
$K(\alpha)$, and $\beta$ is algebraic, so there is $f\in K[x]\subset K[\alpha]$
such that $f(\beta)=0$. Now $\alpha-\beta\in K(\alpha)(\beta)$ and
if $\beta\neq0$, $\frac{\alpha}{\beta}\in K(\alpha)(\beta)$. This
implies that $K(\alpha-\beta)\subseteq K(\alpha,\beta)\Rightarrow[K(\alpha-\beta):K]|[K(\alpha,\beta):K]<\infty$
and $K\left(\frac{\alpha}{\beta}\right)\subseteq K(\alpha,\beta)\Rightarrow[K\left(\frac{\alpha}{\beta}\right):K]|[K(\alpha,\beta):K]<\infty$.
Hence $\alpha-\beta$ and $\frac{\alpha}{\beta}$ are algebraic over
$K$\end{proof}
\begin{cor}
The set of algebraic number is a field. We denote this with $\overline{\qq}$
\end{cor}
For any subfield $K\subset\cc$, we let $\overline{K}$ denote the
algebraic closure of $K$ in $\cc$, i.e., the set of $\alpha\in\cc$
that are algebraic over $K$.

For example $\overline{\rr}=\cc=\rr(i)$.

We also conclude that $\overline{\qq}=\cup_{K\mathrm{\, number\, field}}K$.
Also $[\overline{\qq}:\qq]=\infty$ so $\overline{\qq}$ itself is
not a number field.


\subsection{Rings and Modules}

In this course we use the following convention for rings. Every ring
$R$ is assumed to be commutative and has $1$. We also allow $1$
to be $0$, in which case $R=0=\{0\}$. A ring homomorphism $\phi:R\to S$
is assumed to send $1_{R}$ to $1_{S}$. A subring $R$ of a ring
$S$ is assumed to satisfy $1_{R}=1_{S}$
\begin{example*}
Let $R_{1}$ and $R_{2}$ be two non-zero rings. Then we have a ring
$R=R_{1}\times R_{2}$ with $1_{R}=(1_{R_{1}},1_{R_{2}})$. Note that
$R_{1}'=R_{1}\times\{0\}\subset R$ is a ring, but $1_{R_{1}}'=(1,0)\neq1_{R}$
so $R_{1}'$ is not a subring of $R$. Finally $\phi:R_{1}\to R$
defined by $r\mapsto(r,0)$ is not a ring homomorphism.\end{example*}
\begin{defn}
Let $R$ be a ring then a \emph{module} over $R$ is an abelian group
$M$ with scalar multiplication by $R$, satisfying
\begin{itemize}
\item $1\cdot m=m$
\item $(r+s)m=rm+sm$
\item $r(m+n)=rm+rn$
\item $(rs)m=r(sm)$
\end{itemize}
For all $r,s\in R,m,n\in M$

An \emph{homomorphism} of $R$-modules is a homomorphism of abelian
group that satisfies $\phi(rm)=r\phi(m)$ for all $r\in R,m\in M$\end{defn}
\begin{example*}
If $R$ is a field, then modules are the same as vector spaces.

Any ideal $I$ of $R$ is an $R$-module

Any quotient $R/I$ is an $R$-module

If $R\subseteq S$ are both rings, then $S$ is an $R$-module

Let $R=\zz$. Then any abelian group is a $\zz$-module\end{example*}
\begin{defn}
A module is \emph{free of rank }$n$ if it is isomorphism to $R^{n}$.\end{defn}
\begin{thm}
If $R\neq0$, the rank of a free module over $R$ is uniquely determined,
i.e., $R^{m}\cong R^{n}\Rightarrow m=n$\end{thm}
\begin{proof}
This is not proven in this module\end{proof}
\begin{defn}
If $R$ is a ring then an $R$-module $M$ is \emph{finite} if it
can be generated by finitely many elements.\end{defn}
\begin{example*}
$R=\zz,M=\zz[i]$ is finite with generators $1$ and $i$

$R=\zz[2i]$, $M=\zz[i]$. This is also finite with generators $1$
and $i$, but it is not free.

$R=\zz$, $M=\zz\left[\frac{1}{2}\right]=\left\{ \frac{n}{2^{m}}:x\in\zz,m\geq0\right\} \subseteq\qq$.
This is not finite as any finite set has a maximum power of $2$ occurring
in the denominator.
\end{example*}

\subsection{Ring Extensions}
\begin{defn}
Let $R$ be a ring, then a \emph{ring extension }of $R$ is a ring
$S$ that has $R$ as a subring.

A ring extension $R\subset S$ is \emph{finite} if $S$ is finite
as an $R$-module

Let $R\subset S$ be a ring extension, $s\in S$. Then $s$ is said
to be \emph{integral }over $R$ if there exists a monic polynomial
$f=x^{n}+a_{n-1}x^{n-1}+\dots+a_{0}\in R[x]$ with $f(s)=0$\end{defn}
\begin{thm}
Let $R\subset S$ be a ring extension, $s\in S$. Then the following
are equivalent:
\begin{enumerate}
\item $s$ is integral over $R$
\item $R[s]$ is a finite extension of $R$
\item There exists a ring $S'$ such that $R\subset S'\subset S$, $S'$
is finite over $R$ and $s\in S'$
\end{enumerate}
\end{thm}
\begin{proof}
Not proven in this modules. Some of these are obvious. (See Commutative
Algebra Theorem 4.2)\end{proof}
\begin{thm}
\label{thm:integral elements}If $R\subset S$ is a ring extension,
then the set $S'$ of $s\in S$ that are integral over $R$ is a ring
extension of $R$ inside $S$.\end{thm}
\begin{proof}
Note that $R\subseteq S'$ since $r\in R$ is a root of $x-r\in R[x]$.

Given $s_{1},s_{2}\in S'$ we want to prove that $s_{1}-s_{2},s_{1}s_{2}\in S'$.
We have $R\subset R[s_{1}]\subset R[s_{1},s_{2}]\subset S$, now the
first ring extension is finite since $s_{1}$ is integral over $R$.
We also have $s_{2}$ is integral over $R$ so in particular it is
integral over $R[s_{1}]$. Take the generators for $R[s_{1}]$ as
an $R$-module: $1,\dots,s_{1}^{n}$ and take the generators for $R[s_{1},s_{2}]$
as an $R[s_{1}]$-module: $1,\dots,s_{2}^{m}$. Then $\left\{ s_{1}^{i}s_{2}^{j}:1\leq j\leq m,1\leq i\leq n\right\} $
is a set of generators for $R[s_{1},s_{2}]$ as an $R$-module. Hence
we conclude that $R[s_{1},s_{2}]$ is a finite extension of $R$.
Now $s_{1}-s_{2},s_{1}s_{2}\in R[s_{1},s_{2}]$. So if we apply the
previous theorem, we have $s_{1}-s_{2},s_{1}s_{2}$ are integral over
$R$.\end{proof}
\begin{defn}
Let $R\subset S$ be an extension of rings, then the ring of $R$
integral elements of $S$ is called the \emph{integral closure} of
$R$ in $S$

Given an extension of rings $R\subset S$ then we say that $R$ is
\emph{integrally closed} in $S$ if the integral closure of $R$ in
$S$ is $R$ itself\end{defn}
\begin{thm}
Let $R\subset S$ be a ring extension and let $R'\subset S$ be the
integral closure of $R$ in $S$. Then $R'$ is integrally closed
in $S$.\end{thm}
\begin{proof}
Take $s\in S$ integral over $R'$. We want to show that $s$ is integral
over $R$. Take $f=x^{n}+a_{n-1}x^{n-1}+\dots+a_{0}\in R'[x]$ with
$f(s)=0$. Consider a subring of $R\subset R[a_{0},a_{1},\dots,a_{n-1}]\subset R'$.
Now $R\subset R[a_{0}]\subset R[a_{0},a_{1}]\subset\dots\subset R[a_{0},\dots,a_{n-1}]$.
Now $f\in R[a_{0},\dots,a_{n-1}][x]$. So $s$ is integral over $R[a_{0},\dots,a_{n-1}]$,
hence $R[a_{0},\dots,a_{n-1}][s]$ is finite over $R[a_{0},\dots,a_{n-1}]$
and hence finite over $R$. So by Theorem \ref{thm:integral elements},
we have that $s$ is integral over $R$.\end{proof}
\begin{defn}
An element $\alpha\in\cc$ is an \emph{algebraic integer} if it is
integral over $\zz$.

The ring of algebraic integers is denoted by $\overline{\zz}$

If $K$ is a number field, then the \emph{ring of integers} in $K$
is denoted $\mathcal{O}_{K}=\overline{\zz}\cap K=$ integral closure
of $\zz$ in $K$.\end{defn}
\begin{example*}
Let $K=\qq$. Take $p/q\in\qq$ integral over $\zz$ (assume that
$\gcd(p,q)=1$), then there exists $f(x)\in\zz[x]$ such that $f(p/q)=0$.
So $x-p/q$ is a factor of $f$ in $\qq[x]$, but Gauss' Lemma states
``if $f\in\zz[x]$ is monic and $f=g\cdot h$ with $g,h\in\qq[x]$
then $g,h\in\zz[x]$''. So $x-p/q\in\zz[x]$, that is $p/q\in\zz$.
So $\mathcal{O}_{\qq}=\zz$.

Consider $K=\qq(\sqrt{d})$, with $d\neq1$ and $d$ is square free.
Consider $\alpha\in K$, $\alpha=a+b\sqrt{d},a,b\in\qq$ and suppose
that $\alpha$ is an algebraic integer. Assume that $\deg(\alpha)=2$,
that is the minimum monic polynomial $f$ of $\alpha$ in $\qq[x]$
has degree $2$. Then by Gauss, we know $f\in\zz[z]$, furthermore
$f=(x-(a+b\sqrt{d}))(x-(a-b\sqrt{d}))=x^{2}-2ax+a^{2}-db$. So we
want $2a\in\zz$ and $a^{2}-db\in\zz$. 

So $2a\in\zz\Rightarrow a=\frac{a'}{2}$ with $a'\in\zz$. Then $a^{2}-b^{2}d=\left(\frac{a'}{2}\right)^{2}-b^{2}d=(a')^{2}-d(2b)^{2}\in4\zz$.
So (using the fact that $d$ is square-free) $d(2b)^{2}\in\zz\Rightarrow2b\in\zz$
and $(a')^{2}\equiv d(b')^{2}\mod4$. So we conclude:
\begin{itemize}
\item If $a'$ is even, then $a\in\zz$, so $b'$ is even and thus $b\in\zz$
\item If $a'$ is odd, then $(a')^{2}\equiv1\mod4$, so $b'$ is odd as
well and $d\equiv1\mod4$
\end{itemize}
\end{example*}
We have just proven the following:
\begin{thm}
Let $d\in\zz$, with $d\neq1$ and square free. Then $\mathcal{O}_{\qq(\sqrt{d})}=\begin{cases}
\zz[\sqrt{d}] & d\not\equiv1\mod4\\
\zz\left[\frac{1+\sqrt{d}}{2}\right] & d\equiv1\mod4
\end{cases}$ 
\end{thm}

\begin{thm}
Let $R$ be a UFD. Then $R$ is integrally closed in its fraction
field (the converse does not hold)\end{thm}
\begin{proof}
Take $s=\frac{r_{1}}{r_{2}}$ integral over $R$, and assume that
$r_{1},r_{2}$ are coprime (well defined since $R$ is a UFD), we
have to show that $r_{2}\in R^{*}$. 

If $r_{2}\notin R^{*}$, then let $\pi\in R$ be any factor of $r_{2}$.
Now $s$ is integral, so there exists $a_{i}$ and $n$ such that
$s^{n}+a_{n-1}s^{n-1}+\dots+a_{0}=0$. Multiplying through by $r_{2}^{n}$
we have $r_{1}^{n}+a_{n-1}r_{1}^{n-1}r_{2}+\dots+a_{0}r_{2}^{n}=0$.
Now since $r_{2}\equiv0\mod\pi$, if we take mod both side we have
$r_{1}^{n}\equiv0\mod\pi$. Hence $\pi|r_{1}^{n}\Rightarrow\pi|r_{1}$.
This is a contradiction.
\end{proof}
The converse of this theorem is not true, as an example $\mathcal{O}_{\qq(\sqrt{-5})}=\zz[\sqrt{-5}]$
is integrally closed but not a UFD since $6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$

\newpage{}


\section{Norms, Discriminants and Lattices}


\subsection{Conjugates, Norms and Traces}
\begin{namedthm}[The Theorem of Primitive Elements]
 Any number field $K$ can be generated by a single elements $\theta\in K$.
That is $K=\qq(\theta)$\end{namedthm}
\begin{proof}
See any courses in Galois Theory
\end{proof}
Consider a number field $K=\qq(\theta)$. This $\theta$ has a monic
minimal polynomial, say $f_{\theta}\in\qq[x]$. We can factor $f_{\theta}$
over $\cc$, say $f_{\theta}=(x-\theta_{1})(x-\theta_{2})\dots(x-\theta_{n})$,
where $\theta_{1}=\theta$ and all the $\theta_{i}$ are distinct.
For each $i$ we have a field embedding, which we denote $\sigma_{i}:K\hookrightarrow\cc$
defined by $\theta\mapsto\theta_{i}$. These are all possible embedding
of $K\hookrightarrow\cc$
\begin{example*}
$K=\qq[\sqrt{d}]$, then $f_{\theta}=x^{2}-d=(x-\sqrt{d})(x+\sqrt{d})$.
So we have $\sigma_{1}=\id$ and $\sigma_{2}=a+b\sqrt{d}\mapsto a-b\sqrt{d}$ 

$K=\qq[\sqrt[3]{2}]$, then $f_{\theta}=x^{3}-2=(x-\sqrt[3]{2})(x-\zeta_{3}\sqrt[3]{2})(x-\zeta_{3}^{2}\sqrt[3]{2})$
where $\zeta_{3}=e^{\frac{2\pi i}{3}}$ a third root of unity. So
we have:
\begin{itemize}
\item $\sigma_{1}:\sqrt[3]{2}\mapsto\sqrt[3]{2}$ (i.e., the identity map),
\item $\sigma_{2}:\sqrt[3]{2}\mapsto\zeta_{3}\sqrt[3]{2}$
\item $\sigma_{3}:\sqrt[3]{2}\mapsto\zeta_{3}^{2}\sqrt[3]{2}$
\end{itemize}
\end{example*}
\begin{defn}
Let $K$ be a number field and $\sigma_{1},\dots,\sigma_{n}$ all
the embeddings $K\hookrightarrow\cc$. Let $\alpha\in K$. Then the
elements $\sigma_{i}(\alpha)$ are called the \emph{conjugates} of
$\alpha$.\end{defn}
\begin{thm}
Let $K$ be a number field, $n=[K:\qq]$. Take $\alpha\in K$, consider
the multiplication by $\alpha$ as a linear map from the $\qq$-vector
space $K$ to itself. That is $\alpha:K\to K$ is defined by $\beta\mapsto\alpha\beta$.
Then the characteristic polynomial of this map is equal to $P_{\alpha}(x)=\prod_{i=1}^{n}(x-\sigma_{i}(\alpha))$\end{thm}
\begin{proof}
Let $K=\qq(\theta)$ and consider the basis: $1,\theta,\theta^{2},\dots,\theta^{n-1}$.
Let $M_{\alpha}$ be the matrix that describes the linear map $\alpha$
relative to this basis.

First consider $\alpha=\theta$. Let $f_{\theta}=x^{n}+a_{n-1}x^{n-1}+\dots+a_{0}$.
Then we have 
\[
M_{\theta}=\begin{pmatrix}0 & 0 & \cdots & 0 & -a_{0}\\
1 & 0 & \cdots & 0 & -a_{1}\\
0 & 1 & \cdots & 0 & -a_{2}\\
\vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & \cdots & 0 & -a_{n-1}
\end{pmatrix}
\]
We now calculated the characteristic polynomial of $M_{\theta}$:
\[
\det(X\cdot I_{n}-M_{\theta})=\det\begin{pmatrix}x & 0 & \cdots & 0 & a_{0}\\
-1 & x & \cdots & 0 & a_{1}\\
0 & -1 & \cdots & 0 & a_{2}\\
\vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & \cdots & 0 & x+a_{n-1}
\end{pmatrix}=\sum a_{k}x^{k}
\]
Hence the characteristic polynomial of $M_{\theta}=f_{\theta}=\prod_{i=1}^{n}(x-\sigma_{i}(\theta))$
as required. Hence we know from Linear Algebra that there exists an
invertible matrix $A$ such that:

\[
M_{\theta}=A\begin{pmatrix}\sigma_{1}(\theta) & 0 & \cdots & 0\\
0 & \sigma_{2}(\theta) & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & \sigma_{n}(\theta)
\end{pmatrix}A^{-1}
\]


Now note that $M_{\alpha\pm\beta}=M_{\alpha}\pm M_{\beta}$ and $M_{\alpha\beta}=M_{\alpha}M_{\beta}$
(basic linear algebra). So if we have a polynomial $g\in\qq[x]$,
then $M_{g\alpha}=g(M_{\alpha})$. Now we can write any $\alpha\in K$
as $g(\theta)$ for some $g\in\qq[X]$. Hence we have
\begin{eqnarray*}
M_{\alpha}=g(M_{\theta}) & = & A\begin{pmatrix}g(\sigma_{1}(\theta)) & 0 & \cdots & 0\\
0 & g(\sigma_{2}(\theta)) & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & g(\sigma_{n}(\theta))
\end{pmatrix}A^{-1}\\
 & = & A\begin{pmatrix}\sigma_{1}(g(\theta)) & 0 & \cdots & 0\\
0 & \sigma_{2}(g(\theta)) & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & \sigma_{n}(g(\theta))
\end{pmatrix}A^{-1}\\
 & = & A\begin{pmatrix}\sigma_{1}(\alpha) & 0 & \cdots & 0\\
0 & \sigma_{2}(\alpha) & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & \sigma_{n}(\alpha)
\end{pmatrix}A^{-1}
\end{eqnarray*}
 Hence, the characteristic polynomial of $M_{\alpha}$ is $\prod_{i=1}^{n}(x-\sigma_{i}(\alpha))$
as required.\end{proof}
\begin{cor}
For $\alpha\in K$, the coefficients of $\prod_{i=1}^{n}(x-\sigma_{i}(\alpha))$
are in $\qq$.\end{cor}
\begin{defn}
Let $K$ be a number field, $\alpha\in K$. We define the \emph{norm}
of $\alpha$ as $N(\alpha)=N_{K/\qq}(\alpha)=\prod_{i=1}^{n}\sigma_{i}(\alpha)\in\qq$. \end{defn}
\begin{cor}
$N(\alpha)=\det(\cdot\alpha)=\det(M_{\alpha})$
\end{cor}
We can see that the norm is a multiplicative function, i.e., $N(\alpha\beta)=N(\alpha)N(\beta)$.
\begin{defn}
Let $K$ be a number field and $\alpha\in K$. We define the \emph{trace}
of $\alpha$ as $\Tr(\alpha)=\Tr_{K/\qq}(\alpha)=\sum_{i=1}^{n}\sigma_{i}(\alpha)\in\qq$. \end{defn}
\begin{cor}
$\Tr(\alpha)=\Tr(\cdot\alpha)=\Tr(M_{\alpha})$
\end{cor}
We can see that the trace is an additive function, i.e, $\Tr(\alpha+\beta)=\Tr(\alpha)+\Tr(\beta)$.
\begin{example*}
Let $K=\qq(\sqrt{d})$. Then we have:
\begin{itemize}
\item $\Tr(a+b\sqrt{d})=(a+b\sqrt{d})+(a-b\sqrt{d})=2a$
\item $N(a+b\sqrt{d})=(a+b\sqrt{d})(a-b\sqrt{d})=a^{2}-db^{2}$
\end{itemize}
Let $K=\qq(\sqrt[3]{2})$ and recall that $x^{3}-2=(x-\sqrt[3]{2})(x-\zeta_{3}\sqrt[3]{2})(x-\zeta_{3}^{2}\sqrt[3]{2})$
where $\zeta_{3}=e^{\frac{2\pi i}{3}}$ a third root of unity. Then
we have:
\begin{itemize}
\item $\Tr(a+b\sqrt[3]{2}+c\sqrt[3]{4})=3a+b\sqrt[3]{2}(1+\zeta_{3}+\zeta_{3}^{2})+c\sqrt[3]{4}(1+\zeta_{3}+\zeta_{3}^{2})=3a$
\item $N(a+b\sqrt[3]{2}+c\sqrt[3]{4})=(a+b\sqrt[3]{2}+c\sqrt[3]{4})(a+b\zeta_{3}\sqrt[3]{2}+c\zeta_{3}^{2}\sqrt[3]{4})(a+b\zeta_{3}^{2}\sqrt[3]{2}+c\zeta_{3}\sqrt[3]{4})=a^{3}+2b^{2}+4c^{3}+6abc$ 
\end{itemize}
\end{example*}

\subsection{Discriminant}
\begin{defn}
Let $K$ be a number field and $\alpha_{1},\dots,\alpha_{n}$ be a
basis for $K$. Let $\sigma_{1},\dots,\sigma_{n}:K\to\cc$ be all
the embeddings. The \emph{discriminant} of $(\alpha_{1},\dots,\alpha_{n})$
is defined as 
\[
\left(\det\begin{pmatrix}\sigma_{1}(\alpha_{1}) & \sigma_{1}(\alpha_{2}) & \cdots & \sigma_{1}(\alpha_{n})\\
\sigma_{2}(\alpha_{1}) & \sigma_{2}(\alpha_{2}) & \cdots & \sigma_{2}(\alpha_{n})\\
\vdots & \vdots & \ddots & \vdots\\
\sigma_{n}(\alpha_{1}) & \sigma_{n}(\alpha_{2}) & \cdots & \sigma_{n}(\alpha_{n})
\end{pmatrix}\right)^{2}
\]
We denote this by $\Delta(\alpha_{1},\dots,\alpha_{n})$ or by $\disc(\alpha_{1},\dots,\alpha_{n})$ \end{defn}
\begin{thm}
We have 
\[
\Delta(\alpha_{1},\dots,\alpha_{n})=\det\begin{pmatrix}\Tr(\alpha_{1}\alpha_{1}) & \Tr(\alpha_{1}\alpha_{2}) & \cdots & \Tr(\alpha_{1}\alpha_{n})\\
\Tr(\alpha_{2}\alpha_{1}) & \Tr(\alpha_{2}\alpha_{2}) & \cdots & \Tr(\alpha_{2}\alpha_{n})\\
\vdots & \vdots & \ddots & \vdots\\
\Tr(\alpha_{n}\alpha_{1}) & \Tr(\alpha_{n}\alpha_{2}) & \cdots & \Tr(\alpha_{n}\alpha_{n})
\end{pmatrix}
\]
\end{thm}
\begin{proof}
Let $M=\left(\sigma_{i}(\alpha_{j})\right)_{ij}$. Then we have $\Delta(\alpha_{1},\dots,\alpha_{n})=\det(M)^{2}=\det(M^{2})=\det(M^{T}M)$.
But note that the entries of $M^{T}M$ at $(i,j)$ is $\sum_{k=1}^{n}\sigma_{k}(\alpha_{i})\cdot\sigma_{k}(\alpha_{j})=\sum_{k=1}^{n}\sigma_{k}(\alpha_{i}\alpha_{j})=\Tr(\alpha_{i}\alpha_{j})$.\end{proof}
\begin{cor}
We have $\Delta(\alpha_{1},\dots,\alpha_{n})\in\qq$\end{cor}
\begin{thm}
We have $\Delta(\alpha_{1},\dots,\alpha_{n})\neq0$\end{thm}
\begin{proof}
Suppose that $\Delta(\alpha_{1},\dots,\alpha_{n})=0$. Then there
exists not all zero $c_{1},\dots,c_{n}\in\qq$ with $c_{1}\begin{pmatrix}\Tr(\alpha_{1}\alpha_{1})\\
\vdots\\
\Tr(\alpha_{n}\alpha_{1})
\end{pmatrix}+\dots+c_{n}\begin{pmatrix}\Tr(\alpha_{n}\alpha_{1})\\
\vdots\\
\Tr(\alpha_{n}\alpha_{n})
\end{pmatrix}=0$. Hence $\begin{pmatrix}\Tr(\alpha_{1}\sum c_{j}\alpha_{j})\\
\vdots\\
\Tr(\alpha_{n}\sum c_{j}\alpha_{j})
\end{pmatrix}=0$. Put $\alpha=\sum c_{j}\alpha_{j}$, we have just shown that $\Tr(\alpha_{i}\alpha)=0\,\forall i$.
But we have that $\alpha_{i}$ forms a basis for $K$ over $\qq$,
hence $\Tr(\beta\alpha)=0\,\forall\beta\in K$. We have $\alpha\neq0$,
so let $\beta=\alpha^{-1}$, then $\Tr(\beta\alpha)=\Tr(1)=n=[K:\qq]$
which is a contradiction.\end{proof}
\begin{defn}
The map $K\times K\to\qq$ defined by $(\alpha,\beta)\mapsto\Tr(\alpha\beta)$
is know as the \emph{trace pairing }on $K$. It is bilinear.
\end{defn}
Let $K=\qq(\theta)$, this has basis $1,\dots,\theta^{n-1}$. In general
$\det\begin{pmatrix}1 & x_{1} & x_{1}^{2} & \cdots & x_{1}^{n-1}\\
\vdots & \vdots & \vdots &  & \vdots\\
1 & x_{n} & x_{n}^{2} & \cdots & x_{n}^{n-1}
\end{pmatrix}$ is called a \emph{Vandemonde determinant} and it is equal to $\prod_{1\leq i<j\leq n}(x_{j}-x_{i})$.
(See Linear Algebra or Algebra I for a proof by induction). So in
our case, $\Delta(1,\theta,\dots,\theta^{n-1})=\prod_{1\leq i<j\leq n}(\sigma_{i}(\theta)-\sigma_{j}(\theta))^{2}$.
Also note that $\Delta(f_{\theta}):=\Delta(1,\theta,\dots,\theta^{n-1})$.
(Generally, if $f=(x-\alpha_{1})\dots(x-\alpha_{n})$ then $\Delta(f):=\prod_{1\leq i<j\leq n}(\alpha_{i}-\alpha_{j})^{2}$,
check with the definition of a discriminant of a quadratic)
\begin{example*}
Let $K=\qq(\sqrt{d})$. Consider the basis $1,\sqrt{d}$. We calculate
the discriminant in two ways:
\begin{itemize}
\item $\Delta(1,\sqrt{d})=\det\begin{pmatrix}1 & \sqrt{d}\\
1 & -\sqrt{d}
\end{pmatrix}^{2}=(-2\sqrt{d})^{2}=4d$
\item $\Delta(1,\sqrt{d})=\det\begin{pmatrix}\Tr(1) & \Tr(\sqrt{d})\\
\Tr(\sqrt{d}) & \Tr(d)
\end{pmatrix}=\det\begin{pmatrix}2 & 0\\
0 & 2d
\end{pmatrix}=4d$
\end{itemize}
Now consider the basis $1,\frac{1+\sqrt{d}}{2}$. Then $\Delta(1,\frac{1+\sqrt{d}}{2})=(-\sqrt{d})^{2}=d$

Let $K=\qq(\sqrt[3]{d})$, with basis $1,\sqrt[3]{d},\sqrt[3]{d^{2}}.$Then
we have
\begin{eqnarray*}
\Delta(1,\sqrt[3]{d},\sqrt[3]{d^{2}}) & = & \det\begin{pmatrix}\Tr(1) & \Tr(\sqrt[3]{d}) & \Tr(\sqrt[3]{d^{2}})\\
\Tr(\sqrt[3]{d}) & \Tr(\sqrt[3]{d^{2}}) & \Tr(d)\\
\Tr(\sqrt[3]{d^{2}}) & \Tr(d) & \Tr(\sqrt[3]{d})
\end{pmatrix}\\
 & = & \det\begin{pmatrix}3 & 0 & 0\\
0 & 0 & 3d\\
0 & 3d & 0
\end{pmatrix}\\
 & = & -27d^{2}
\end{eqnarray*}

\end{example*}

\subsection{Lattices}
\begin{defn}
Let $K$ be a number field. A \emph{lattice} $\Lambda$ in $K$ is
a subgroup generated by $\qq$-linearly independent elements of $K$.
That is $\Lambda=\{n_{1}\alpha_{1}+\dots+n_{r}\alpha_{r}|n_{i}\in\zz\}$
where $\alpha_{i}$ are linearly independent over $\qq$. We always
have $r\leq[K:\qq]$. The number $r$ is called the \emph{rank} of
the lattice, this is sometimes denoted $\rk(\Lambda)$.\end{defn}
\begin{example*}
$\zz[i]$ is a lattice in $\qq(i)$\end{example*}
\begin{thm}
Any finitely generated subgroup of a number field $K$ is a latice.\end{thm}
\begin{proof}
Let $\Lambda$ be a finitely generated subgroup of $K$. By the Fundamental
Theorem of Finitely Generated Abelian Group, we have $\Lambda\cong T\oplus\zz^{r}$,
where $T$ is the torsion. As $K$ is a $\qq$-vector space, we have
$T=0$, so $\Lambda\cong\zz^{r}$. Let $\phi:\zz^{r}\to\Lambda$ be
an isomorphism.

Claim: $\alpha_{i}=\phi(e_{i})$ is a basis (i.e., linearly independent
generating set) for $\Lambda$, where $e_{i}$ is the standard basis
for $\zz^{r}$. Now $\phi(c_{1},\dots,c_{r})=\sum_{i=1}^{n}c_{i}\alpha_{i}$.
Since $\phi$ is surjective, all elements of $\Lambda$ are reached.
If $\sum c_{i}\alpha_{i}=0$ for $c_{i}\in\qq$ multiply $c_{i}$
by the common denominator, then without loss of generality, we can
assume $c_{i}\in\zz$. But we know that $\phi$ is injective, so for
all $i$, $c_{i}=0$.\end{proof}
\begin{defn}
A lattice of $K$ is said to be \emph{full rank} if its rank $r=[K:\qq]$\end{defn}
\begin{thm}
Let $\Lambda\subseteq K$ be a full rank lattice. Then $\Delta(\alpha_{1},\dots,\alpha_{r})$
is the same for every basis $\alpha_{1},\dots,\alpha_{r}$ of $\Lambda$\end{thm}
\begin{proof}
Suppose $(\alpha_{i})_{i}$ and $(\beta_{i})_{i}$ are basis for $\Lambda$.
Then each $\beta_{i}$ can be written as a linear combination of $\alpha_{j}$
with coefficients in $\zz,$ i.e. $\begin{pmatrix}\beta_{1}\\
\vdots\\
\beta_{r}
\end{pmatrix}=A\begin{pmatrix}\alpha_{1}\\
\vdots\\
\alpha_{r}
\end{pmatrix}$ with $A$ an $r\times r$ matrix with coefficients in $\zz$. Similarly
$\begin{pmatrix}\alpha_{1}\\
\vdots\\
\alpha_{r}
\end{pmatrix}=B\begin{pmatrix}\beta_{1}\\
\vdots\\
\beta_{r}
\end{pmatrix}$. Hence we have $AB=I_{r}$, so $A\in\GL_{r}(\zz)$, so $\det(A)=\pm1$.
Put $S=\begin{pmatrix}\Tr(\alpha_{1}\alpha_{1}) & \cdots & \Tr(\alpha_{1}\alpha_{r})\\
\vdots & \ddots & \vdots\\
\Tr(\alpha_{r}\alpha_{1}) & \cdots & \Tr(\alpha_{r}\alpha_{r})
\end{pmatrix}$. Then $\begin{pmatrix}\Tr(\beta_{1}\beta_{1}) & \cdots & \Tr(\beta_{1}\beta_{r})\\
\vdots & \ddots & \vdots\\
\Tr(\beta_{r}\beta_{1}) & \cdots & \Tr(\beta_{r}\beta_{r})
\end{pmatrix}=A^{T}SA$. (Base change for matrices describing symmetric bilinear forms, see
Algebra I)

So we have $\Delta(\beta_{1},\dots,\beta_{r})=\det(A^{T}SA)=\det(A^{2})\det(S)=\det(S)=\Delta(\alpha_{1},\dots,\alpha_{r})$\end{proof}
\begin{defn}
Let $\Lambda\subset K$ be a full rank lattice, then we define $\Delta(\Lambda)$
to be the discriminant of any basis of $\Lambda$.\end{defn}
\begin{thm}
\label{thm:D(L) in Z}Let $K$ be a number field and $\Lambda\subset K$
be a full rank lattice with $\Lambda\subset\mathcal{O}_{K}$. Then
$\Delta(\Lambda)\in\zz$.\end{thm}
\begin{proof}
We have $\Delta(\Lambda)=\det((\Tr(\alpha_{i}\alpha_{j})_{ij})$ with
$\alpha_{i}\in\mathcal{O}_{K}$. If $\alpha\in\mathcal{O}_{K}$, then
$\Tr(\alpha)=\sum_{i=1}^{n}\sigma_{i}(\alpha)\in\overline{\zz}\cap\qq=\zz$.
Hence $\Delta(\Lambda)\in\zz$. \end{proof}
\begin{thm}
\label{thm:L=00003DL/L^2}Let $K$ be a number field and $\Lambda\subset\Lambda'$
be two full rank lattices. Then the index $(\Lambda':\Lambda)$ is
finite and $\Delta(\Lambda)=(\Lambda':\Lambda)^{2}\Delta(\Lambda')$\end{thm}
\begin{proof}
All the elements of $\Lambda$ can be written as an integral linear
combination of some chosen basis of $\Lambda'$. So there exists $A\in M_{n}(\zz)$
with $\Lambda=A\Lambda'$. Consider $\Lambda'/\Lambda\cong\zz^{n}/A\zz^{n}$,
this is a finitely generated abelian group so by FTFGAG $\Lambda'/\Lambda\cong\zz/d_{1}\zz\oplus\dots\oplus\zz/d_{m}\zz\oplus\zz^{r}$
with $d_{1}|d_{2}|\dots|d_{m}$. So (by Smith Normal Form from Algebra
I) there exists $B,B'\in\GL_{n}(\zz)$ with $BAB'=\begin{pmatrix}d_{1} & 0 & \cdots & 0\\
0 & d_{2}\\
\vdots &  & \ddots\\
0 &  &  & d_{n}
\end{pmatrix}$. As we have $\rk(\Lambda')=\rk(\Lambda)$, we have that $r=0$, and
thus $\det(A)=d_{1}\dots d_{m}=|\zz^{n}/A\zz^{n}|=(\Lambda':\Lambda)$. 

Furthermore $\Delta(\Lambda)=\Delta(A\Lambda')=(\det A)^{2}\Delta(\Lambda')$.\end{proof}
\begin{thm}
Let $K$ be a number field with $n=[K:\qq]$. Then there exists a
basis $\omega_{1},\dots,\omega_{n}$ of $K/\qq$ such that $\mathcal{O}_{K}=\zz\omega_{1}+\dots+\zz\omega_{n}=\{\sum a_{i}\omega_{i}|a_{i}\in\zz\}$.
(That is $\mathcal{O}_{K}$ is a full rank lattice in $K$)\end{thm}
\begin{proof}
We consider all $\Lambda\subset\mathcal{O}_{K}$ that are full rank
lattices in $K$.

The first question is: do such $\Lambda$ exists? Write $K=\qq(\theta)$,
$\theta\in K$ and $f_{\theta}=x^{n}+a_{n-1}x^{n-1}+\dots+a_{0}$
with $a_{i}\in\qq$. Now let $d$ be a common denominator of the $a_{i}$,
then $d\theta\in\mathcal{O}_{K}$. Also note that $\qq(\theta)=\qq(d\theta)$,
so without loss of generality we can assume $\theta\in\mathcal{O}_{K}$.
Then $\zz[\theta]\subseteq\mathcal{O}_{K}$, furthermore $1,\theta,\dots,\theta^{n-1}$
are linearly independent over $\zz$, hence $\zz[\theta]$ is a full
rank lattice.

Of all such $\Lambda$, we have that $\Delta(\Lambda)\in\zz$ (by
Theorem \ref{thm:D(L) in Z}). So consider $\Lambda$ with $|\Delta(\Lambda)|$
minimal. Claim: $\Lambda=\mathcal{O}_{K}$.

Suppose $\Lambda\neq\mathcal{O}_{K}$. We do have $\Lambda\subset\mathcal{O}_{K}$,
so take $\alpha\in\mathcal{O}_{K}\setminus\Lambda$. Then $\Lambda':=\Lambda+\zz\alpha$
is finitely generated as an abelian group of $K$ and thus $\Lambda'$
is a lattice of full rank. Also $\Lambda'\subset\mathcal{O}_{K}$.
But we have $|\Delta(\Lambda)|=(\Lambda':\Lambda)^{2}|\Delta(\Lambda)|$,
and since $\Lambda\neq\Lambda'$, we find $|\Delta(\Lambda)|>|\Delta(\Lambda')|$,
which is a contradiction.\end{proof}
\begin{defn}
The \emph{discriminant of a number} \emph{field }$K/\qq$ is defined
as $\Delta(K/\qq)=\Delta(\mathcal{O}_{K})$\end{defn}
\begin{example*}
Let $K=\qq(\sqrt{d})$ with $d\neq1$ and square free. Then $\Delta(K/\qq)=\Delta(\mathcal{O}_{K})=\begin{cases}
4d & d\not\equiv1\mod4\\
d & d\equiv1\mod4
\end{cases}$
\end{example*}
Note that if $\Lambda\subset\mathcal{O}_{K}$ is a full rank sublattice,
then $\Delta(\Lambda)=(\mathcal{O}_{K}:\Lambda)^{2}\Delta(\mathcal{O}_{K})$
by Theorem \ref{thm:L=00003DL/L^2}
\begin{cor}
\label{cor:Finding OK} If $\Lambda\subset\mathcal{O}_{K}$ and $\Delta(\Lambda)$
is square free then $\Lambda=\mathcal{O}_{K}$. 
\end{cor}
\newpage{}


\section{Cyclotomic Fields}
\begin{defn}
Let $n$ be a positive integer. Then the $n$-\emph{cyclotomic} field
is $\qq(\zeta_{n})$ where $\zeta_{n}=e^{\frac{2\pi i}{n}}$
\end{defn}
For simplicity we are going to assume that $n=p^{r}$ with $p$ being
a prime.
\begin{thm}
The minimal polynomial of $\zeta_{p^{r}}$ is 
\[
\Phi_{p^{r}}=\prod_{k=1,p\nmid k}^{p^{r}}(x-\zeta_{p^{r}}^{k})
\]
\end{thm}
\begin{proof}
Firs note that $\Phi_{p^{r}}(\zeta_{p^{r}})=0$

In general, $\prod_{k=1}^{n}(x-\zeta_{n}^{k})=x^{n}-1$. We see this
by noticing that every zero of the LHS is a zero of the RHS, the degree
of both sides are the same and they both have the same leading coefficients.
Consider 
\[
\Phi_{p^{r}}=\prod_{k=1,p\nmid k}^{p^{r}}(x-\zeta_{p^{r}}^{k})=\frac{\prod_{k=1}^{p^{r}}(x-\zeta_{p^{r}}^{k})}{\prod_{k=1}^{p^{r-1}}(x-\zeta_{p^{r}}^{pk})}
\]
 and notice that $\zeta_{p^{r}}^{p}=\zeta_{p^{r-1}}$. This means
we can rewrite
\[
\Phi_{p^{r}}=\frac{\prod_{k=1}^{p^{r}}(x-\zeta_{p^{r}}^{k})}{\prod_{k=1}^{p^{r-1}}(x-\zeta_{p^{r-1}}^{k})}=\frac{x^{p^{r}}-1}{x^{p^{r-1}}-1}=x^{(p-1)p^{r-1}}+x^{(p-2)p^{r-1}}+\dots+1
\]
Hence we have $\Phi_{p^{r}}\in\zz[x]$.

We finally show that $\Phi_{p^{r}}$ is irreducible. Suppose that
$\Phi_{p^{r}}=fg$ with $f,g\in\zz[x]$, $f,g$ are both monic and
non constant. Consider this $\mod p$, we have
\[
\Phi_{p^{r}}=\frac{x^{p^{r}}-1}{x^{p^{r-1}}-1}\equiv\frac{(x-1)^{p^{r}}}{(x-1)^{p^{r-1}}}\equiv(x-1)^{(p-1)(p^{r-1})}\mod p
\]
 (using Fermat's Little Theorem). Let $\overline{f},\overline{g}$
denoted the reduction of $f,g$ $\mod p$, hence we have $\overline{f}\overline{g}=(x-1)^{(p-1)p^{r-1}}\mod p$.
Now $\ff_{p}$ is a UFD, so we have $\overline{f}=(x-1)^{m}$ and
$\overline{g}=(x-1)^{k}$ such that $m+k=(p-1)p^{r-1}$. Hence we
have $f=(x-1)^{m}+pF$ and $g=(x-1)^{k}+pG$ for some $F,G\in\zz[x]$,
that is, $fg=(x-1)^{m+k}+p(x-1)^{k}F+p(x-1)^{m}G+p^{2}FG$. 

Now consider $x=1$, we get $f(1)g(1)=p^{2}F(1)G(1)$ on one hand
and $\Phi_{p^{r}}(1)=1^{(p-1)p^{r-1}}+\dots+1=p$ on the other hand.
But $p^{2}\nmid p$, so we have a contradiction and $\Phi_{p^{r}}$
is irreducible.
\end{proof}
Note that $\zz[\zeta_{p^{r}}]\subset\mathcal{O}_{\qq(\zeta_{p^{r}})}$.
\begin{problem*}
What is $\Delta(\zz[\zeta_{p^{r}}])$?

Let us denote $\zeta_{p^{r}}$ by $\zeta$. By definition we have
\[
|\Delta(\zz[\zeta])|=\left|\prod_{k=1,p\nmid k}^{p^{r}}\prod_{m=1,p\nmid m,m\neq k}^{p^{r}}(\zeta^{k}-\zeta^{m})\right|
\]
Let us fix $k$, we want to compute $\prod_{m=1,p\nmid m,m\neq k}^{p^{r}}(\zeta^{k}-\zeta^{m})$.
We do this by considering 
\[
F_{k}=\prod_{m=1,p\nmid m,m\neq k}^{p^{r}}(x-\zeta^{m})=\frac{\Phi_{p^{r}}(x)}{x-\zeta^{k}}=\frac{x^{p^{r}}-1}{(x^{p^{r-1}}-1)(x-\zeta^{k})}
\]
Now $F_{k}(\zeta^{k})=\frac{0}{0}$, so we need to use l'Hospital's
rule. We calculate
\[
\Phi_{p^{r}}'(x)=\frac{p^{r}x^{p^{r}-1}(x^{p^{r-1}}-1)-p^{r-1}x^{p^{r-1}-1}(x^{p^{r}}-1)}{(x^{p^{r-1}}-1)^{2}}
\]
Now the roots of $x^{p^{r-1}}-1$ are powers of $\zeta_{p^{r-1}}=\zeta^{p}$,
so $\zeta^{k}$ is not a root of $(x^{p^{r-1}}-1)$. Hence 
\[
F_{k}(\zeta^{k})=\Phi_{p^{r}}'(\zeta^{k})=\frac{p^{r}\zeta^{k(p^{r}-1)}}{\zeta^{kp^{r-1}}-1}
\]
Hence $|\Phi_{p^{r}}'(\zeta_{k})|=\frac{p^{r}}{|\zeta^{kp^{r-1}}-1|}$,
so we have
\[
|\Delta(\zz[\zeta])=\prod_{k=1,p\nmid k}^{p^{r}}\frac{p^{r}}{|\zeta^{kp^{r-1}}-1|}=\frac{p^{r(p^{r}-p^{r-1})}}{\prod|\zeta^{kp^{r-1}}-1|}
\]
Hence we finally compute
\[
\prod_{k=1,p\nmid k}^{p^{r}}(x-\zeta^{kp^{r-1}})=\prod_{k=1,p\nmid k}^{p^{r}}(x-\zeta_{p}^{k})=\left(\prod_{k=1}^{p-1}(x-\zeta_{p}^{k})\right)^{p^{r-1}}=\left(\Phi_{p}(x)\right)^{p^{r-1}}
\]
Plucking in $x=1$, we get $\Phi_{p}(x)^{p^{r-1}}=p^{p^{r-1}}$. Hence
we conclude $|\Delta(\zz[\zeta])|=p^{rp^{r}-rp^{r-1}-p^{r-1}}=p^{p^{r-1}(rp-r-1)}$

Now it is not important to remember what exactly it is, the key idea
is that it is a power of $p$, the exact exponent does not matter.

In particular if $r=1$ we get $|\Delta(\zz[\zeta_{p}])|=p^{p-2}$\end{problem*}
\begin{thm}
For any $n$ we have $\mathcal{O}_{\qq(\zeta_{n})}=\zz[\zeta_{n}]$.\end{thm}
\begin{proof}
We will only prove this for $n=p$, with $p$ prime.

We already know that $\zz[\zeta_{p}]\subset\mathcal{O}_{\qq(\zeta_{p})}$.
We also know that $p^{p-2}=\Delta(\zz[\zeta_{p}])=\left(\mathcal{O}_{\qq(\zeta_{p})}:\zz[\zeta_{p}]\right)^{2}\Delta(\mathcal{O}_{\qq(\zeta_{p})})$
(by Theorem \ref{thm:L=00003DL/L^2}). 

Suppose that $\zz[\zeta_{p}]\neq\mathcal{O}_{\qq(\zeta_{p})}$ then
$(\mathcal{O}_{\qq(\zeta_{p})}:\zz[\zeta_{p}])=p^{*}$, where $*$
is an unknown exponent. Then $\mathcal{O}_{\qq(\zeta_{p})}/\zz[\zeta_{p}]$
is an abelian group of order divisible by $p$. Hence there exists
$\overline{\alpha}\in\mathcal{O}_{\qq(\zeta_{p})}/\zz[\zeta_{p}]$
with order $p$, i.e., there exists $\alpha\in\mathcal{O}_{\qq(\zeta_{p})}$
with $p\alpha\in\zz[\zeta_{p}]$. We want to show that for any $\alpha\in\mathcal{O}_{\qq(\zeta_{p})}$
such that $p\alpha\in\zz[\zeta_{p}]$ then we already have $\alpha\in\zz[\zeta_{p}]$.

Note that $\zz[\zeta_{p}]=\zz[1-\zeta_{p}]$. Now $N(1-\zeta_{p})=\prod_{i=1}^{p-1}\sigma_{i}(1-\zeta_{p})=\prod_{i=1}^{p-1}(1-\zeta_{p}^{i})=\Phi_{p}(1)=p$.
Hence we have that $p$ factors as $\prod_{i=1}^{p-1}(1-\zeta_{p}^{i})$.
Now for all $i$, we have $N(1-\zeta_{p}^{i})=\prod_{j=1}^{p-1}(1-\sigma_{j}(\zeta_{p}^{i}))=\prod_{j=1}^{p-1}(1-\zeta_{p}^{ij})=N(1-\zeta_{p})=p$,
hence in particular we have $N\left(\frac{1-\zeta_{p}^{i}}{1-\zeta_{p}}\right)=1$,
so $\frac{1-\zeta_{p}^{i}}{1-\zeta_{p}}$ is a unit for all $i$.
Putting all of this together we have $p=\frac{\prod(1-\zeta_{p}^{i})}{(1-\zeta_{p})^{p-1}}(1-\zeta_{p})^{p-1}=\mbox{unit}\cdot(1-\zeta_{p})^{p-1}$. 

We can write $p\alpha$ as $a_{0}+a_{1}(1-\zeta_{p})+\dots+a_{p-2}(1-\zeta_{p})^{p-2}$
$(*)$ with $a_{i}\in\zz$. We want to show that $p|a_{i}$ for all
$i$. For $a\in\zz$ we have $p|a$ if and only if $(1-\zeta_{p})|a$
in $\mathcal{O}_{\qq(\zeta_{p})}$. One direction follows from the
fact that $1-\zeta_{p}|p$. For the other implication, suppose $(1-\zeta_{p})|a$,
then $N(1-\zeta_{p})|N(a)\Rightarrow p|a^{p-1}$, hence $p|a$. (Note
for any number field and $a\in\qq$, we have $N(a)=a^{[K:\qq]}$).
We have now the tools to do a prove by induction to show that $a_{n}$
is divisible by $p$.

Let $n=0$ and consider $(*)$ module $1-\zeta_{p}$. We have $p\alpha\equiv0\mod(1-\zeta_{p})$,
also for $i\geq1$ we have $a_{i}(1-\zeta_{p})\equiv0\mod(1-\zeta_{p})$.
Hence we find that $a_{0}\equiv0\mod(1-\zeta_{p})$, so $(1-\zeta_{p})|a_{0}$
and hence $p|a_{0}$

Now suppose that $p|a_{0},a_{1},\dots,a_{n-1}$ and that $n\leq p-2$.
We have that $p\alpha$ is divisible by $(1-\zeta_{p})^{n+1}$, but
so is $a_{0}$, $(1-\zeta_{p})a_{1},\dots,(1-\zeta_{p})^{n-1}a_{n-1}$
and $a_{i}(1-\zeta_{p})^{i}$ for $i>n$. Hence we have $(1-\zeta_{p})^{n}a_{i}\equiv0\mod(1-\zeta_{p})^{n+1}$.
Hence there exists $\beta\in\mathcal{O}_{\qq(\zeta_{p})}$ with $\beta(1-\zeta_{p})^{n+1}=(1-\zeta_{p})^{n}a_{n}\Rightarrow\beta(1-\zeta_{p})=a_{n}$,
so we have $(1-\zeta_{p})|a_{n}$.

Hence we have shown by induction that $p|a_{i}\,\forall i$. Hence
$p\alpha\in p\zz[\zeta_{p}]\Rightarrow\alpha\in\zz[\zeta_{p}]$. So
to recap, we have shown if $\zz[\zeta_{p}]\neq\mathcal{O}_{\qq(\zeta_{p})}$,
then we must have $\alpha\in\mathcal{O}_{\qq(\zeta_{p})}\setminus\zz[\zeta_{p}]$
such that $p\alpha\in\zz[\zeta_{p}]$. But we also shown that if $\alpha\in\mathcal{O}_{\qq(\zeta_{p})}$
with $p\alpha\in\zz[\zeta_{p}]$ then $\alpha\in\zz[\zeta_{p}]$,
hence we have a contradiction.\end{proof}
\begin{example*}[Of the proof in action]
. What is $\mathcal{O}_{\qq(\sqrt[3]{2})}$? We know that $\zz[\sqrt[3]{2}]\subset\mathcal{O}_{\qq(\sqrt[3]{2})}$,
we also know that $\Delta(\zz[\sqrt[3]{2}])=-27(2^{2})=-2^{2}\cdot3^{3}=(\mathcal{O}_{\qq(\sqrt[3]{2})}:\zz[\sqrt[3]{2}])^{2}\cdot\Delta(\mathcal{O}_{\qq(\sqrt[3]{2})})$.
Hence if $\zz[\sqrt[3]{2}]\neq\mathcal{O}_{\qq(\sqrt[3]{2})}$, then
either $2$ divides the index or $3$ divides the index.

Suppose that $2$ divides the index. Then there exists $\alpha\in\mathcal{O}_{\qq(\sqrt[3]{2})}\setminus\zz[\sqrt[3]{2}]$
with $2\alpha\in\zz[\sqrt[3]{2}]$. Note that in $\mathcal{O}_{\qq(\sqrt[3]{2})}$
we have $2=\sqrt[3]{2}^{3}$. For $a\in\zz$ we have $2|a$ if and
only if $\sqrt[3]{2}|a$ in $\mathcal{O}_{\qq(\sqrt[3]{2})}$. Let
$2\alpha=a_{0}+a_{1}\sqrt[3]{2}+a_{2}\sqrt[3]{4}$. Consider this
modulo $\sqrt[3]{2}$, we have $0\equiv a_{0}\mod\sqrt[3]{2}$. Hence
$2|a_{0}$. Now considering this modulo \foreignlanguage{english}{$\sqrt[3]{4}$,
we have $0\equiv a_{1}\sqrt[3]{2}\mod\sqrt[3]{4}$, again implying
that $\sqrt[3]{2}|a_{1}$, hence $2|a_{1}$. So finally considering
this modulo $2$, we see that $2|a_{2}$. Hence $2\alpha\in2\zz[\sqrt[3]{2}]$,
i.e., $\alpha\in\zz[\sqrt[3]{2}]$. So $2$ does not divide the index}

\selectlanguage{english}%
Now suppose that $3$ divides the index. We claim that $3=(1+\sqrt[3]{2})^{3}\cdot$unit.
Now $(1+\sqrt[3]{2})^{3}=1+2\sqrt[3]{2}+3\sqrt[3]{4}+2=3(1+\sqrt[3]{2}+\sqrt[3]{4})$.
Now $N(1+\sqrt[3]{2})=1^{2}+2\cdot1^{2}=3$, so $N((1+\sqrt[3]{2})^{3})=3^{3}=N(3)$
and hence $(1+\sqrt[3]{2}+\sqrt[3]{4})$ is a unit, proving our claim.
Hence we have that for $\alpha\in\zz$, $3|\alpha$ if and only if
$(1+\sqrt[3]{2})|\alpha$ in $\mathcal{O}_{\qq(\sqrt[3]{2})}$. So
consider $\alpha\in\mathcal{O}_{\qq(\sqrt[3]{2})}\setminus\zz[\sqrt[3]{2}]$
such that $3\alpha\in\zz[\sqrt[3]{2}]$ and write $3\alpha=a_{0}+a_{1}(1+\sqrt[3]{2})+a_{2}(1+\sqrt[3]{2})^{2}$
(by changing the basis of $\zz[\sqrt[3]{2}]$ to $\zz[1+\sqrt[3]{2}]$).
Then if we consider the equation modulo successive powers of $(1+\sqrt[3]{2})$,
we find that each $a_{i}$ is divisible by $(1+\sqrt[3]{2})$ and
thus by $3$. Again this leads to a contradiction.

Hence we have that $\zz[\sqrt[3]{2}]=\mathcal{O}_{\qq(\sqrt[3]{2})}$

\newpage{}
\end{example*}

\section{Dedekind Domains}


\subsection{Euclidean domains}
\begin{defn}
Let $R$ be a domain (that is $0\neq1$ and there are no non-trivial
solutions to $ab=0$). An \emph{Euclidean function} on $R$ is a function
$\phi:R\setminus\{0\}\to\zz_{\geq0}$ such that for all $a,b\in R$
with $b\neq0$, there exists $q,r\in R$ with $a=qb+r$ and either
$r=0$ or $\phi(r)<\phi(b)$\end{defn}
\begin{example*}
$R=\zz$, and $\phi(n)=|n|$.

$R=k[x]$ where $k$ is any field and $\phi(f(x))=\deg(f)$

$R=\zz[i]$ and $\phi(\alpha)=N(\alpha)$\end{example*}
\begin{defn}
A domain on which there is an Euclidean function is called an \emph{Euclidean
domain}.\end{defn}
\begin{thm}
If $R$ is an Euclidean domain then $R$ is a principal ideal domain
(PID), i.e., every ideal of $R$ can be generated by one element\end{thm}
\begin{proof}
Let $I\neq0$ be a non-zero ideal of $R$. Take $0\neq b\in I$ to
be an element for which $\phi(b)$ is minimal. We claim that $I=(b)$

Let $a\in I\setminus\{0\}$ be another element. Then there exists
$q\in R$ with $a-qb$ either $0$ or $\phi(a-qb)<\phi(b)$. As $b$
is an element with $\phi(b)$ minimal, we have that $a-qb$ is $0$,
hence $a=qb$, i.e., $a\in(b)$\end{proof}
\begin{lem}
If $R$ is a PID and $\pi\in R$ an irreducible element, then for
$a,b\in R$ we have $\pi|ab\Rightarrow\pi|a$ or $\pi|b$\end{lem}
\begin{proof}
Suppose that $\pi\nmid a$, we want to show that $\pi|b$. Consider
the ideal $I=(\pi,a)$. Let $\delta\in R$ be a generator for $I$,
i.e., $(\pi,a)=(\delta)$. There exists $x,y\in R$ with $x\pi+ya=\delta$.
Also $\pi\in(\delta)$ so $\delta|\pi$. This means that either $\delta\sim1$
or $\delta\sim\pi$. But the case $\delta\sim\pi$ can not occur since
$\pi\nmid a$ but $\delta|a$. So without loss of generality, assume
that $\delta=1$. Thus $x\pi+ya=1$, hence $x\pi b+yab=b$, but since
$\pi|ab$, we have $\pi|b$.\end{proof}
\begin{thm}
A PID is a UFD\end{thm}
\begin{proof}
Take $a\in R\setminus\{0\}$, such that $a$ is not a unit. Assume
that $a=\epsilon\pi_{1}\dots\pi_{n}=\epsilon'\pi_{1}'\dots\pi_{m}'$
are two distinct factorisation of $a$ into irreducible. Without loss
of generality we may assume that $n$ is minimal amongst all elements
$a$ with non-unique factorisation. We have $\pi_{1}|\pi_{1}'\dots\pi_{m}'$
so by the lemma $\pi_{1}|\pi_{i}'$ for some $i$. Without loss of
generality we can assume that $i=1$, so $\pi_{1}|\pi_{1}'$ but both
are irreducible, hence $\pi_{1}\sim\pi_{1}'$. Without loss of generality
we can assume that $\pi_{1}=\pi_{1}'$. But then $\pi_{2}\dots\pi_{n}=\epsilon\pi_{2}'\dots\pi_{m}'$
and $\pi_{2}\dots\pi_{n}$ has $n-1$ irreducible factors, so by minimality
of $n$, this factorisation into irreducible is unique.
\end{proof}
We show that $\mathcal{O}_{\qq(\sqrt{-3})}=\zz\left[\frac{1+\sqrt{-3}}{2}\right]$
is Euclidean. We claim that the Euclidean function is the Norm. $N(a+b\frac{1+\sqrt{-3}}{2})=(a+b\frac{1+\sqrt{-3}}{2})(a+b\frac{1-\sqrt{-3}}{2})=a^{2}+ab+b^{2}$
(Note that we had over $\qq(\sqrt{-3})$ $N(c+d\sqrt{-3})=c^{2}+3d^{2})$
and this fits we the previous line as $N(a+b\frac{1+\sqrt{-3}}{2})=N(a+\frac{b}{2}+\frac{b}{2}\sqrt{-3})=(a+\frac{b}{2})^{2}+3\frac{b^{2}}{4}=a^{2}+ab+b^{2}$).
Suppose we are given $\alpha=a+b\frac{1+\sqrt{-3}}{2}$ and $\beta=c+d\frac{1+\sqrt{-3}}{2}$
with $\beta\neq0$. Then 
\[
\frac{\alpha}{\beta}=\frac{a+b\frac{1+\sqrt{-3}}{2}}{c+d\frac{1+\sqrt{-3}}{2}}=\frac{(a+b\frac{1+\sqrt{-3}}{2})(c-d\frac{1+\sqrt{-3}}{2})}{N(\beta)}=e+f\frac{1+\sqrt{-3}}{2}\in\qq[\frac{1+\sqrt{-3}}{2}]
\]
 (so note $e,f\in\qq$). Then pick $g,h\in\zz$ such that $|g-e|,|h-f|\leq\frac{1}{2}$
and set
\[
q=g+h\frac{1+\sqrt{-3}}{2}
\]
\[
r=\alpha-\beta q
\]
Then we have $\alpha=\beta q+r$ and furthermore if $r\neq0$.
\begin{eqnarray*}
N(r) & = & N(\alpha-\beta(g+h\frac{1+\sqrt{-3}}{2}))\\
 & = & N(\beta(e+f\frac{1+\sqrt{-3}}{2}-g-h\frac{1+\sqrt{-3}}{2}))\\
 & = & N(\beta)N((e-g)+(f-h)\frac{1+\sqrt{-3}}{2})\\
 & = & N(\beta)[(e-g)^{2}+(e-g)(f-h)+(f-h)^{2}]\\
 & \leq & \frac{3}{4}N(\beta)\\
 & < & N(\beta)
\end{eqnarray*}
Similar arguments works for $\mathcal{O}_{\qq(\sqrt{d})}$ with $d\in\{-1,-2,-3,-7,-11\}$
(you might need to change the bound)
\begin{thm}
If $d<-11$ then $\mathcal{O}_{\qq(\sqrt{d})}$ is not a Euclidean
domain (but for $d\in\{-19,-43,-67,-163\}$ it is a PID)\end{thm}
\begin{proof}
Assume that $\phi:R\to\zz_{\geq0}$ is Euclidean, where $R=\mathcal{O}_{\qq(\sqrt{d})}$.
Now $R^{*}=\{\pm1\}$. Take an element $b\in R\setminus\{0,\pm1\}$
with $\phi(b)$ as small as possible. For all $a\in R$ there exists
$q,r\in R$ with $r=a-qb$ and $\phi(r)<\phi(b)$ or $r=0$. Now since
$\phi(b)$ is as small as possible, we have that $r\in\{0,1,-1\}$,
for all $a\in R$. We also have that $a\equiv r\mod b$, hence $R/(b)$
has at most $3$ elements. 

On the other hand the number of elements of $(R/(b))=(R:(b))\Delta((b))=(R:(b))^{2}\Delta(R)$
(by Theorem \ref{thm:L=00003DL/L^2} since $(b)\subset R$). Let $R=\zz+\zz\theta$
where $\theta=\begin{cases}
\sqrt{d} & d\not\equiv1\mod4\\
\frac{1+\sqrt{d}}{2} & d\equiv1\mod4
\end{cases}$. Then we have $(b)=\zz b+\zz b\theta$. Now $\Delta((b))=\det\begin{pmatrix}b & \theta b\\
\overline{b} & \overline{\theta b}
\end{pmatrix}^{2}=(b\overline{b}\overline{\theta}-\overline{b}b\theta)^{2}=(b\overline{b})^{2}(\overline{\theta}-\theta)^{2}=N(b)^{2}\Delta(R)$. Hence we have $(R:(b))^{2}=N(b)^{2}$, that is $(R:(b))=N(b)$ (since
the norm is positive). So if we show that $\forall b\in R\setminus\{0,\pm1\}$
we have $N(b)>3$ then $R/(b)$ has more than three elements, contradicting
the first paragraph. Now we always have $N(a+b\sqrt{d})=a^{2}+|d|b^{2}$

Suppose $d\not\equiv1\mod4$, then for $a+b\sqrt{d}$ to be in $R$
we need $a,b\in\zz$. Suppose that $a^{2}+|d|b^{2}\leq3$ then $|a|\leq1$
and $|d|>11$, so $b=0$, but $a+b\sqrt{d}\in\{0,\pm1\}$

If $d\equiv1\mod4$ we can also have $a=\frac{a'}{2},b=\frac{b'}{2}$
where $a',b'\in\zz$ and $a'\equiv b'\mod2$. Then $N(a+b\sqrt{d})=N\left(\frac{a'+b'\sqrt{d}}{2}\right)=\frac{1}{2}(a'^{2}+|d|b'^{2})$.
Suppose $N(a+b\sqrt{d})\leq3$ then $a'^{2}+|d|b'^{2}\leq12$. But
$|d|\geq13$, so again $b'=0$ and $a'^{2}\leq12$ so $|a'|\leq3$.
Hence $a'\in\{-2,0,2\}$, implying $a+b\sqrt{d}\in\{0,\pm1\}$.\end{proof}
\begin{conjecture*}
Let $K$ be a number field that is not $\qq(\sqrt{d})$ for some $d<0$
then if $\mathcal{O}_{K}$ is a UFD, then it is Euclidean.\end{conjecture*}
\begin{rem*}
In general $\phi=N$ does not work, then $\phi$ is very difficult
to find.
\end{rem*}

\subsection{Dedekind Domain}
\begin{defn}
A prime ideal is an ideal $P\subset R$ satisfying $P\neq R$ and
$\forall a,b\in R$ with $ab\in P$ then either $a\in P$ or $b\in P$.\end{defn}
\begin{fact*}
$P\subset R$ is prime if and only if $R/I$ is a domain\end{fact*}
\begin{defn}
A maximal ideal is an ideal $M\subset R$ satisfying $M\neq R$ and
there are no ideals $I\neq R$ with $M\subset I\subset R$.\end{defn}
\begin{fact*}
$M\subset R$ is a maximal ideal if and only if $R/M$ is a field. 

Every proper ideal $I\subset R$ is contained in a maximal ideal.
(See commutative Algebra Theorem 1.4 and its Corollaries)\end{fact*}
\begin{example*}
Let $R=\zz$. Then its prime ideals are $(0)$ and $(p)$ where $p$
is prime. Its maximal ideals are $(p)$ (as $\zz/(p)=\ff_{p}$ is
a field)\end{example*}
\begin{defn}
A ring $R$ is \emph{Noetherian} if one and thus both of the following
equivalent conditions holds.
\begin{enumerate}
\item Every ideal of $R$ is finitely generated
\item Every ascending chains of ideals $I_{0}\subset I_{1}\subset\dots$
is stationary, i.e., there exists $r>0$ such that $I_{i}=I_{j}$
for all $i,j>r$.
\end{enumerate}
\end{defn}

\begin{defn}
Let $R$ be a domain. Then $R$ is a \emph{Dedekind Domain} if:
\begin{enumerate}
\item $R$ is Noetherian
\item $R$ is integrally closed in its field of fractions
\item Every non-zero prime ideal is a maximal ideal
\end{enumerate}
\end{defn}
\begin{example*}
Every field is a Dedekind domain (the only ideals are: $(0)$, $(1)$)\end{example*}
\begin{lem}
Every finite domain is a field.\end{lem}
\begin{proof}
Let $R$ be a finite domain. Take $0\neq a\in R$, we need to show
there exists $x\in R$ with $ax=1$. Consider the map $R\overset{\cdot a}{\to}R$
defined by $x\mapsto ax$. We note that $\cdot a$ is injective, if
$ab=ac$ then $a(b-c)=0$, hence $b-c=0$ since $R$ is a domain.
As $R$ is finite, $\cdot a$ is also surjective. Hence there exists
$x$ with $ax=1$. \end{proof}
\begin{thm}
\label{thm:OK dedekind}If $K$ is a number field, then $\mathcal{O}_{K}$
is a Dedekind domain.\end{thm}
\begin{proof}
Let $I\subset\mathcal{O}_{K}$ be an ideal. If $I=(0)$ then it is
finitely generated, so assume $I$ is non-zero. Hence there exists
$0\neq a\in I$, so $a\mathcal{O}_{K}$ is a full rank lattice in
$\mathcal{O}_{K}$. We have $a\mathcal{O}_{K}\subset I\subset\mathcal{O}_{K}$,
so $I$ is a full rank lattice as well. It has $[K:\qq]<\infty$ generators
as a free abelian group and the same elements generates it as an ideal.
So $\mathcal{O}_{K}$ is Noetherian.

We know that $\mathcal{O}_{K}=\overline{\zz}\cap K$. Furthermore
the integral closure of a ring $R$ in an extension $S$ is in fact
integrally closed in $S$. So $\mathcal{O}_{K}$ is integrally closed
in $K$.

Let $P\in\mathcal{O}_{K}$ be a non-zero prime ideal. $P$ is a full
rank lattice so $(\mathcal{O}_{K}:P)<\infty$. Hence $\mathcal{O}_{K}/P$
is a finite domain. So by the above lemma, $\mathcal{O}_{K}/P$ is
a field and hence $P$ is maximal.\end{proof}
\begin{defn}
Let $R$ be a domain. Then a \emph{fractional ideal} $I$ of $R$
is a $R$-submodule of the fields of fractions of $R$, such that
there exists $0\neq a\in R$ with $aI\subset R$\end{defn}
\begin{example*}
Let us work out the fractional ideals of $\zz$. The ideals of $\zz$
are $(n)$ with $n\in\zz$. So fractional ideals are $I\subset\qq$
such that $\exists a\in\zz$ with $aI=(n)$ for some $n\in\zz$. That
is $I=\frac{n}{a}\zz\in\qq$.

Note that $\qq$ is not a fractional ideal, as elements of $\qq$
have arbitrary large denominators.
\end{example*}
If $R$ is a ring, $I,J\subset R$ are ideals, then $IJ$ is the ideal
generated by $\{ij:i\in I,j\in J\}$.

If $R$ is a domain, $I,J$ fractional ideals of $R$ and $K$ the
field of fraction of $R$, then $IJ$ is a $K$-submodule generated
by $\{ij:i\in I,j\in J\}$. It is a fractional ideal as $abIJ\subset R$
(where $a,b$ are such that $aI,bJ\subset R$) 
\begin{example*}
Let $R=\zz$ and consider $I=(a),J=(b)$ with $a,b\in\qq$. Then $IJ=(ab)$\end{example*}
\begin{defn}
Let $R$ be a domain, $K$ its field of fraction, $I\subset K$ a
fractional ideal. Then $I$ is called \emph{invertible} if there exists
a fractional ideal $J\subset K$ such that $IJ=R=(1)$\end{defn}
\begin{example*}
Every non-zero fractional ideal of $\zz$ is invertible. 

Every principal non-zero fractional ideal $(a)$ of $R$ is invertible,
consider $(a)(a^{-1})=(1)$\end{example*}
\begin{thm}
\label{thm:inv is group}The invertible ideals of a domain $R$ forms
a group with respect to fractional ideal multiplication, with unit
element $R=(1)$ and inverse $I^{-1}=\{a\in K|aI\subset R\}$. ($K$
is the field of fractions of $R$)\end{thm}
\begin{proof}
Let $I\subset K$ be invertible, then there exists $J$ with $IJ=R$.
We want to show: if $a\in J$ then $aI\subset R$ and if $aI\subset R$
then $a\in J$. The first one follows directly. Consider $aIJ=aR$
and $aIJ\subset J$, so $aR\subset J$ means $a\in J$. Hence $J=I^{-1}$.

If $I_{1},I_{2},I_{3}$ are fractional ideals then $I_{1}(I_{2}I_{3})=(I_{1}I_{2})I_{3}$

Finally we show that if $I,J$ are invertible then so is $IJ^{-1}$.
We claim $(IJ^{-1})^{-1}=JI^{-1}$. To see this consider $(IJ^{-1})(JI^{-1})=IRI^{-1}=II^{-1}=R$.\end{proof}
\begin{thm}
\label{thm:Dedekind equivalent}Let $R$ be a domain. Then the following
conditions on $R$ are equivalent
\begin{enumerate}
\item $R$ is Dedekind
\item Every non-zero fractional ideals of $R$ is invertible
\item Every non-zero ideals of $R$ is the product of prime ideals.
\item Every non-zero ideal of $R$ is the product of prime ideals uniquely.
\end{enumerate}
\end{thm}
We will prove this after some examples.
\begin{example*}
$\mathcal{O}_{\qq(\sqrt{-5})}=\zz[\sqrt{-5}]$ is not a UFD, we have
$6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$. But since $\zz[\sqrt{-5}]$
is Dedekind (by Theorem \ref{thm:OK dedekind}), we can write $(6)$
as the product of prime ideal uniquely. In fact $(6)=(2)\cdot(3)=(1+\sqrt{-5})(1-\sqrt{-5})=(2,1+\sqrt{-5})(2,1-\sqrt{-5})(3,1+\sqrt{-5})(3,1-\sqrt{-5})$.
We check that $(2,1+\sqrt{-5})$ is prime. Now $\zz[\sqrt{-5}]/(2,1+\sqrt{-5})\cong\zz[x]/(x^{2}+5,2,1+x)$.
Now $(2,x+1,x^{2}+5)=(2,x+1,x^{2}+5-x(x+1)=(2,x+1,-x+5)=(2,x+1)$.
Hence $\zz[\sqrt{-5}]/(2,1+\sqrt{-5})\cong\zz[x]/(2,x+1)\cong\ff_{2}[x]/(x+1)\cong\ff_{2}$,
which is a field. Thus $(2,1+\sqrt{-5})$ is maximal. \end{example*}
\begin{defn}
If $R$ is a domain and $K$ its field of fraction. Let $I$ be a
non-zero fractional ideal then $R:I=\{a\in K:aI\subset R\}$
\end{defn}
Note that from Theorem \ref{thm:inv is group}, we see that $I$ is
invertible if and only if $(R:I)\cdot I=R$
\begin{example}
$R=\zz[\sqrt{-3}]$ is not Dedekind. (As it is not algebraically closed)

We show that the ideal $I=(2,1+\sqrt{-3})$ is not invertible. $R:I=\{a+b\sqrt{-3}\in\qq(\sqrt{-3}):2(a+b\sqrt{-3})\in\zz[\sqrt{-3}],(1+\sqrt{-3})(a+b\sqrt{-3})\in\zz[\sqrt{-3}])$.
From the first condition, we can rewrite $a=\frac{a'}{2},b=\frac{b'}{2}$
with $a',b'\in\zz.$ So consider the second condition
\[
(1+\sqrt{-3})(\frac{a'}{2}+\frac{b'}{2}\sqrt{-3})=\frac{a'}{2}+\frac{a'+b'}{2}\sqrt{-3}-3\frac{b'}{2}
\]
So $a'\equiv b'\mod2$, i.e., 
\[
\zz[\sqrt{-3}]:(2,1+\sqrt{-3})=\left\{ \frac{a'+b'\sqrt{-3}}{2}:a',b'\in\zz,a'\equiv b'\mod2\right\} =\zz\left[\frac{1+\sqrt{-3}}{2}\right]
\]
Now 
\begin{eqnarray*}
\zz\left[\frac{1+\sqrt{-3}}{2}\right]\cdot(2,1+\sqrt{-3}) & = & \left(1,\frac{1+\sqrt{-3}}{2}\right)(2,1+\sqrt{-3})\\
 & = & \left(2,1+\sqrt{-3},\frac{1+\sqrt{-3}}{2}(1+\sqrt{-3})\right)\\
 & = & (2,1+\sqrt{-3},\sqrt{-3}-1)\\
 & = & (2,1+\sqrt{-3})\\
 & = & I\\
 & \neq & R
\end{eqnarray*}
Hence $I$ is not invertible.

We now show that $I=(2)$ can not be written as the product of prime
ideals. Suppose $I=P_{1}P_{2}\dots P_{n}$, then $I\subset P_{i}$
for all $i$. Now \{ideals of $R$ containing $I$\} $\leftrightarrow$\{ideals
of $R/I$\}. The bijection is defined by $J\mapsto J/I\subset R/I$
and $\xymatrix{\{x:\overline{x}\in J\} & \overline{J}\ar@{|->}[l]}
$

In our case 
\begin{eqnarray*}
\nicefrac{R}{I} & = & \nicefrac{\zz[\sqrt{-3}]}{(2)}\\
 & \cong & \nicefrac{\zz[x]}{(x^{2}+3,2)}\\
 & \cong & \nicefrac{\ff_{2}[x]}{(x^{2}+1)}\\
 & \cong & \nicefrac{\ff_{2}}{(x+1)^{2}}\\
 & \cong & \nicefrac{\ff_{2}[x]}{(x)^{2}}\\
 & = & \{a+b\epsilon:a.b\in\ff_{2},\epsilon^{2}=0\}
\end{eqnarray*}
The ideals in $R/I$ are $(0),(1)=(1+\epsilon)$ and $(\epsilon)$.
Which of these ideal is prime? $(1)$ is never prime, and $(0)$ is
not prime as it is not a domain. So $(\epsilon)$ is the only maximal
ideal and hence must be the only prime $R/I$ has. Clearly $(2)\subset(2,1+\sqrt{-3})$,
which we saw maximal and so must be the only prime ideal which contains
$(2)$.

So all $P_{i}$ are equal to $(2,1+\sqrt{-3})$. Thus $(2)=(2,1+\sqrt{-3})^{m}$
for some $m$. Now $(2)\neq(1)$, hence $m\neq0$ and $(2)\neq(2,1+\sqrt{-3})$
as the first is invertible but not the second so $m\neq1$.

\begin{eqnarray*}
(2,1+\sqrt{-3})^{2} & = & (4,2+2\sqrt{-3},1-3+2\sqrt{-3})\\
 & = & (4,2+2\sqrt{-3})\\
 & = & (2)(2,1+\sqrt{-3})\\
 & \subset & (2)
\end{eqnarray*}
So if $(2)(2,1+\sqrt{-3})=(2)$, then $(2,1+\sqrt{-3})=(2^{-1})(2)=(1)$
which is a contradiction. And for all $m\geq2$ we have $(2,1+\sqrt{-3})^{m}\subset(2,1+\sqrt{-3})^{2}\subset(2)$.
Hence there is no $m$ with $(2,1+\sqrt{-3})^{m}=(2)$.
\end{example}
The proof of Theorem \ref{thm:Dedekind equivalent} requires proofs
by Noetherian induction. Here is a quick layout of how such a proof
works. To prove a statement about ideals in a Noetherian ring $R$:
\begin{itemize}
\item First prove it for all maximal ideals.
\item Then induction step: assume it holds for all $I\supsetneq J$. Prove
it hold for $J$
\end{itemize}
Why does this proves the statement for all ideal? Suppose the statement
is false for a certain set $S\neq\emptyset$ of ideals: Pick any $I_{0}\in S$.
By induction step, there exists $I_{1}\supsetneq I_{0}$, for which
the statement is false. Repeat and we get an infinite ascending chain,
which is impossible in a Noetherian ring.
\begin{proof}[Proof of Theorem \ref{thm:Dedekind equivalent}]


{[}NB: This proof is rather long and was spread over several lectures.
The lecturer got a big confuse at some point and so it also incomplete,
it only proves some implications, including the most important for
this course, Dedekind implies everything else. I have tried to reorganise
this proof so that it makes more sense. I do know that he managed
to prove it in one lecture successfully the following year (2011-2012)
but I did not get a copy of it{]}

Note: If $R$ is a field, the only ideals are $(0)$ and $(1)$ so
there is nothing to prove. Hence assume that $R$ is not a field.
\begin{lyxlist}{00.00.0000}
\item [{$2.\Rightarrow3.$}] Assume $2$. We want to show that every ideal
is the product of prime ideals. We first show that every invertible
ideal is finitely generated. Let $I$ be a fractional ideal of $R$,
then there exists $J$ with $IJ=(1)$, hence $1\in IJ$. Now elements
of $IJ$ are sums of the form $r_{1}x_{1}y_{1}+\dots+r_{n}x_{n}y_{n}$
with $r_{i}\in R,x_{i}\in I$ and $y_{i}\in J$. Hence $1=\sum r_{i}x_{i}y_{i}$
for some $r_{i},x_{i},y_{i}$. We claim that $I=(x_{1},\dots,x_{n})$,
to prove our claim we just need to show that $(x_{1},\dots,x_{n})J=(1)$
(since inverses in groups are unique). It is obvious that $(1)\subset(x_{1},\dots,x_{n})J$.
On the other hand $(x_{1},\dots,x_{n})\subset I$ so $(x_{1},\dots,x_{n})J\subset IJ\subset(1)$.


Hence $R$ is Noetherian, since every invertible ideal is finitely
generated.
\begin{lem}
Assuming 2., we have for non-zero ideals $I,J$: $I\subset J$ if
and only if $J|I$ (that is there is a $J'$ with $JJ'=1$)\end{lem}
\begin{proof}
$\Leftarrow$) Obvious

$\Rightarrow$) Put $J'=IJ^{-1}$, this is a fractional ideal. We
need to show that $IJ^{-1}\subset R$ (i.e., that it is an ideal and
not just a fractional ideal). We have $I\subset J$, so $IJ^{-1}\subset JJ^{-1}=R$
\end{proof}

We now proceed by a proof by Noetherian induction.


If $I$ is a maximal ideal, then $I$ is itself a factorisation into
prime ideals. Now let an ideal $I$ not prime be given and assume
that for all $J\supsetneq I$, $J$ has a factorization into primes.
There exists is a prime $P\supsetneq I$, so $P|I$ and hence $I=PJ$
for some $J\subset R$. We want to show that $J\supsetneq I$. We
know that $I=PJ\subset J$. Suppose that $I=J$, then $PJ=J$, so
multiply by $J^{-1}$, then $P=R$ which is a contradiction. 


Hence we have just shown by Noetherian induction that every fractional
ideal is a product of primes.

\item [{$1.,2.\&3.\Rightarrow4.$}] Assume there is an ideal $I$ that
has two distinct factorisation into primes. That is $I=P_{1}\dots P_{m}=Q_{1}\dots Q_{n}$
and without loss of generality suppose that $m$ is minimal. We have
that no $Q_{i}$ is equal to some $P_{j}$ as otherwise if $Q_{i}=P_{j}$
then $P_{1}\dots P_{j-1}P_{j+1}\dots P_{m}=IP_{j}^{-1}=Q_{1}\dots Q_{i-1}Q_{i+1}\dots Q_{n}$
contradicting minimality of $m$.


We have $Q_{1}\dots Q_{n}=P_{1}\dots P_{m}\subset P_{1}$, so $P_{1}|Q_{1}\dots Q_{m}$.
Let $I'=IP_{1}^{-1}=P_{2}\dots P_{m}=Q_{1}\dots Q_{n}P_{1}^{-1}$.
Now $I'$ is an ideal of $R$ but it has a factorisation into $n-1$
factors, so this factorisation is unique. We want to show that there
exists $i$ with $Q_{i}|I'$, equivalently there exists $i$ with
$I'\subset Q_{i}$. Assume that there is no such $i$, then $\forall i\, I'\nsubseteq Q_{i}$.
Consider $P_{1}$ and $Q_{1}$ which are distinct. We have $P_{1},Q_{1}\subset P_{1}+Q_{1}$.
We claim that $P_{1}+Q_{1}=R$. Since $P_{1}$ and $Q_{1}$ are maximal
(assuming 1.) we have $P_{1}\subset P_{1}+Q_{1}\Rightarrow P_{1}+Q_{1}=P_{1}$
or $R$, similarly, we concluder $P_{1}+Q_{1}=Q_{1}$ or $R$. Hence
$P_{1}+Q_{1}=R$.


So there exists $p\in P_{1},q\in Q_{1}$ with $p+q=1$. So $I=(p+q)I=pI+qI\subset pQ_{1}+qP_{1}\subset P_{1}Q_{1}$.
So $P_{1}Q_{1}|I\Rightarrow Q_{1}|IP_{1}^{-1}=I'$. Hence we get a
contradiction.

\item [{$1.\Rightarrow2.$}] We use Noetherian induction.


Let $P$ be a maximal ideal, then we want to show that $P$ is invertible.
Pick $0\neq a\in P$. Then the ideal $(a)$ is invertible $((a)(a^{-1})=(a))$
and $(a)\subset P$.
\begin{lem}
Let $R$ be a Dedekind domain and let $I\neq0$ be an ideal. There
exists $P_{1},\dots,P_{n}$ maximal ideals with $P_{1}\dots P_{n}\subset I$\end{lem}
\begin{proof}
We'll use Noetherian induction. If $I$ is maximal then $I\subset I$.
Assume for all $J\supsetneq I$, we have prime ideals $Q_{i}$ with
$Q_{1}\dots Q_{n}\subseteq I$. We have to show that there exists
$P_{i}$ prime ideals with $P_{1}\dots P_{n}\subset I$. $I$ itself
is not prime because all non-zero primes are maximal.

This means there exists $a,b\in R$ such that $a,b\notin I$ but $ab\in I$.
Consider the ideals $I+(a)$ and $I+(b)$. By induction hypothesis
there exists $P_{i}$ such that $P_{1},\dots,P_{n}\subset I+(a)$
and $P_{n+1}\dots P_{m}\subset1+(b)$. Hence $P_{1}\dots P_{m}\subset(I+(a))(I+(b))\subset I$.
\end{proof}

Hence by the lemma, there exists $P_{1},\dots,P_{n}$ with $P_{1}\dots P_{n}\subset(a)$
and without loss of generality we have $n$ is minimal.


We will use the following lemma later in the proof. 
\begin{lem}
Let $R$ be a Dedekind domain and let $I\subset R$ be a finitely
generated ideal. Let $\phi:I\to I$ be a map such that $\phi(I)\subset I$,
then there exists $a_{0},\dots,a_{n-1}\in J$ such that $\phi^{n}+a_{n-1}\phi^{n-1}+\dots+a_{0}=0$

A special case: Let $\alpha\in K$, the field of fraction of $R$,
be such that $\alpha I\subset I$. Then there exists a relation $\alpha^{n}+a_{n-1}\alpha^{n-1}+\dots+a_{0}=0$
with $a_{i}\in R$\end{lem}
\begin{proof}
Choose a matrix that $A=(a_{ij})_{ij}$, that describes $\phi$ in
terms of $x_{i}$, the generators of $I$, and that satisfies $a_{ij}\in I$.
By Cayley-Hamilton, if $P_{A}$ is the characteristic polynomial of
$A$, then $P_{A}(A)=0$. Now $P_{A}=\det(XI_{n}-A):=X^{n}+a_{n-1}X^{n-1}+\dots+a_{0}$
for some $a_{i}$ which clearly are in $R$.\end{proof}
\begin{cor}
If $R$ is Dedekind and $K$ its field of fraction. Let $I\subset R$
be an ideal and $\alpha\in K$ with $\alpha I\subset I$, then $\alpha\in R$.
\end{cor}

As a recap, we have $P\neq0$ is prime (and hence maximal). Take $0\neq a\in P$,
then there exists $P_{1},\dots,P_{n}$with $P_{1}\dots P_{n}\subset(a)\subset P$.
We claim that one of the $P_{i}$ is $P$. In general for prime ideals
we have $IJ\subset P\Rightarrow I\subset P$ or $J\subset P$. (Otherwise,
assume $I\nsubseteq P$,$J\nsubseteq P$, then there exists $a\in I,b\in J$
with $a\notin P,b\notin P$, but then $ab\notin P$). So without loss
of generality assume $P_{1}\subset P$, but $P_{1}$ is maximal so
$P_{1}=P$


Let $J=P_{2}\dots P_{n}$, i.e., $PJ\subset(a)\subset P$. Since we
assumed $n$ was minimal, we have $J\nsubseteq(a)$. So $PJ\subset(a)$,
hence $PJ(a)^{-1}\subset R$, but $a^{-1}J\nsubseteq R$.


Consider $R:P=\{\alpha\in K|\alpha P\subset R\}$, we need to show
that $(R:P)P=R$. Now $\forall\alpha\in R:P$, we have $\alpha P\subset P$,
so by the corollary $R:P\subset R$. We have $P\subset(R:P)P\subset P$,
but $P$ is maximal, so if $(R:P)P\neq R$ then $(R:P)P=P$. Hence
if $P$ is not invertible then $R:P=R$. Take $\alpha\in a^{-1}J\setminus R$.
Then $\alpha P\subset R$, so $\alpha\in R:P$ but $\alpha\notin R$.
Contradicting $R:P=R$, hence $P$ is invertible.


So we have proven that every non-zero prime ideals (i.e., every maximal
ideal) is invertible. We finish off the Noetherian induction.


Assume for all $J\supsetneq I$ we have that $J$ is invertible. We
will show $I$ is invertible. Choose a prime $P\supset I$. We know
that $P$ is invertible. Consider $I\subset P^{-1}I\subset R$. (Since
$P^{-1}I\subset PP^{-1}=R$) If $P^{-1}I\neq I$ then $P^{-1}I\supsetneq I$,
so $P^{-1}I$ is invertible. Then $I=RI=P(P^{-1}P)$ is invertible
as well. So assume $P^{-1}I=I$. For all $\alpha\in P^{-1}$ we have
$\alpha I\subset I$, thus $\alpha\in R$. Hence $P^{-1}\subset R\Rightarrow PP^{-1}=R\subset RP=P$
which is a contradiction.

\end{lyxlist}
\end{proof}
\begin{defn}
Let $K$ be a number field. Then the \emph{ideal group }of $K$ is
the group $I_{K}$ consisting of all fractional ideals of $\mathcal{O}_{K}$

The \emph{principal ideal group} of $K$, $P_{K}$, is the group of
all principal ideals.

We have $P_{K}\lhd I_{K}$. The quotient $\mbox{Cl}_{K}=I_{K}/P_{K}$
is called the \emph{calls group} of $K$.

An \emph{ideal class} is a set $\{\alpha I:\alpha\in K^{*}\}$ of
ideals.\end{defn}
\begin{thm}
For all number field $K$, the class group is finite. The class number
of $K$ is $h_{K}:=|\mbox{Cl}_{K}|$
\end{thm}
We will prove this later in the course.
\begin{rem*}
If $\mathcal{O}_{K}$ is a PID, then $h_{K}=1$ (in fact this is a
if and only if statement.)
\end{rem*}
$P_{K}$ is the trivial ideal class. Define a map $K^{*}\to P_{K}$
by $\alpha\mapsto(\alpha)$. Then $P_{K}\cong K^{*}/\mathcal{O}_{K}^{*}$,
so the kernel is $\mathcal{O}_{K}$
\begin{lem}
If $R$ is a UFD then for an irreducible elements, $\pi$, the ideal
$(\pi)$ is prime.\end{lem}
\begin{proof}
Take $a,b\in R$ with $ab\in(\pi)$. This means $\pi|ab$ hence $\pi|a$
or $\pi|b$. So $a\in(\pi)$ or $b\in(\pi)$\end{proof}
\begin{thm}
Let $R$ be a Dedekind domain. Then $R$ is a UFD if and only if $R$
is a PID.\end{thm}
\begin{proof}
$\Leftarrow$) Every PID is a UFD

$\Rightarrow$) Let $I\neq0$ be any ideal that is not principal.
We can write $I=P_{1}P_{2}\dots P_{n}$, without loss of generality
say $P_{1}$ is not principal. Now take any $0\neq a\in P_{1}$ and
write $a=\epsilon\pi_{1}\dots\pi_{m}$ with $\pi_{i}$ irreducible.
Then $(a)=(\pi_{1})(\pi_{2})\dots(\pi_{m})$. But $P_{1}|(a)$, so
we get $P_{1}$ is not principal while $(a)$ is, hence contradiction.
\end{proof}
So $\mathcal{O}_{K}$ is a UFD if and only if $h_{K}=1$. We can say
``$h_{K}$ measures the non-uniqueness of factorisation on $\mathcal{O}_{K}$''
\begin{example*}
Find all integer solutions to $x^{2}+20=y^{3}$

We can factorise this over $\zz[\sqrt{-5}]=\mathcal{O}_{\qq(\sqrt{-5})}$
into $(x+2\sqrt{-5})(x-2\sqrt{-5})=y^{3}$. Fact: $h_{\qq(\sqrt{-5})}=2$.

As ideals we have $(x+2\sqrt{-5})\cdot(x-2\sqrt{-5})=(y)^{3}$. As
usual, let us find the common factors of $(x+2\sqrt{-5})$ and $(x-2\sqrt{-5})$

Suppose $P$ is a prime ideal such that $P|(x+2\sqrt{-5})$ and $P|(x-2\sqrt{-5})$,
then $(x+2\sqrt{-5},x-2\sqrt{-5})\subseteq P$. Now we have $(4\sqrt{-5})\subset(x+2\sqrt{-5},x-2\sqrt{-5})$.
Note that $(2,1+\sqrt{-5})(2,1-\sqrt{-5})=(4,2+2\sqrt{-5},2-2\sqrt{-5},6)=(2)$,
hence $(2)=(2,1+\sqrt{-5})^{2}$ (and we know from a previous exercise
that $(2,1+\sqrt{-5})$ is prime). Furthermore $(\sqrt{-5})$ is prime:
\begin{eqnarray*}
\nicefrac{\zz[\sqrt{-5}]}{(\sqrt{-5})} & \cong & \nicefrac{\zz[x]}{(x^{2}+5,x)}\\
 & \cong & \nicefrac{\zz[x]}{(5,x)}\\
 & \cong & \ff_{5}
\end{eqnarray*}
So $(4\sqrt{-5})=(2,1+\sqrt{-5})^{4}(\sqrt{-5})\Rightarrow P=(2,1+\sqrt{-5})$
or $P=(\sqrt{-5})$.

Write $(x+2\sqrt{-5})=(2,1+\sqrt{-5})^{e_{1}}(\sqrt{-5})^{e_{2}}\prod P_{i}^{e_{i}}$.
Apply the automorphism $\alpha\mapsto\overline{\alpha}$, to get $(x-2\sqrt{-5})=(2,1+\sqrt{-5})^{e_{1}}(\sqrt{-5})^{e_{2}}\prod\overline{P_{i}}^{e_{i}}$
(since $(\sqrt{-5})=(-\sqrt{-5})$ and as noted before $(2,1+\sqrt{-5})=(2,1-\sqrt{-5})$).
Note that the products $P_{i}$ must be distinct. So we get $(x+2\sqrt{-5})(x-2\sqrt{-5})=(2,1+\sqrt{-5})^{2e_{1}}(\sqrt{-5})^{2e_{2}}\prod P_{i}^{e_{i}}\prod\overline{P_{i}}^{e_{i}}=(y)^{3}$.
Since factorization into prime ideal is unique, we have $3|e_{i}$
for all $i$. Hence $(x+2\sqrt{-5})=I^{3}$ for some ideal $I$.

Let $\widetilde{I}$ be the class of $I$. Then in $\mbox{Cl}_{\mathcal{O}_{\qq(\sqrt{-5})}}$,
we have $\widetilde{I}^{3}=1$ (since $(x+2\sqrt{-5})$ is principal).
Now the class group has order $2$, hence $\widetilde{I}=1$ since
$\gcd(2,3)=1$. Hence $I$ is principal, so write $I=(a+b\sqrt{-5})$.
So $(x+2\sqrt{-5})=((a+b\sqrt{-5})^{3})\Rightarrow x+2\sqrt{-5}=\mbox{unit}\cdot(a+b\sqrt{-5})^{3}$.
Now units in $\zz[\sqrt{-5}]$ are $\pm1$, which are both cubes,
so without loss of generality, $x+2\sqrt{-5}=(x+b\sqrt{-5})$.

Hence $x+2\sqrt{05}=a^{3}+3a^{2}b\sqrt{-5}-15ab^{2}-5b^{3}\sqrt{-5}=(a^{3}-15ab^{2})+\sqrt{-5}(3a^{2}b-5b^{3})$.
So we need to solve $2=b(3a^{2}-5b^{2})$, but $2$ is prime, so $b=\pm1,\pm2$.

If $b=\pm1$, then $3a^{2}-5=\pm2$, either $3a^{2}=7$ which is impossible,
or $3a^{2}=3\Rightarrow a=\pm1$. In that case we have $x=a^{3}-15ab^{2}=\pm(1-15)=\pm14$.
Then $14^{2}+20=196+20=216=6^{3}\Rightarrow(\pm14,16)$ are solutions.

If $b=\pm2$, then $3a^{2}-20=\pm1$, so $3a^{2}=21$ or $19$, but
both cases are impossible.

Hence $(\pm14,16)$ are the only integer solutions to $x^{2}+20=y^{3}$.
\end{example*}

\subsection{Kummer-Dedekind Theorem}

Let $K$ be a number field, and $I\subset\mathcal{O}_{K}$ a non-zero
ideal. Note that $I$ contains $a\mathcal{O}_{K}$ for any $a\in I$,
hence we have that $(\mathcal{O}_{K}:I)$ is finite. This leads us
to the following definition:
\begin{defn}
The norm of an ideal $I\subset\mathcal{O}_{K}$ is defined as $N(I)=\begin{cases}
(\mathcal{O}_{K}:I) & I\neq0\\
0 & I=0
\end{cases}$\end{defn}
\begin{thm}
For any principal ideal $(a)\subset\mathcal{O}_{K}$ , we have $N((a))=|N(a)|$\end{thm}
\begin{proof}
If $\omega_{1},\dots,\omega_{n}$ is a basis for $\mathcal{O}_{K}$,
then $a\omega_{1},\dots,a\omega_{n}$ is a basis for $(a)$. Now multiplication
by $a$ can be seen as a matrix $A$ in terms of $\omega_{1},\dots,\omega_{n}$.
So $(\mathcal{O}_{K}:a\mathcal{O}_{K})=|\det A|=|N(a)|$\end{proof}
\begin{thm}
The norm of ideals in $\mathcal{O}_{K}$ is multiplicative. That is
$N(IJ)=N(I)N(J)$\end{thm}
\begin{proof}
First note $N(\mathcal{O}_{K})=1$.

We can write every non-zero ideal as a product of prime ideals (as
$\mathcal{O}_{K}$ is Dedekind and using Theorem \ref{thm:Dedekind equivalent})
So it suffices to prove that $N(IP)=N(I)N(P)$ where $P$ is a non-zero
prime. We have $N(IP)=(\mathcal{O}_{K}:IP)$ and $IP\subset I\subset\mathcal{O}_{K}$,
hence $N(IP)=(I:IP)(\mathcal{O}_{K}:I)=(I:IP)N(I)$.

We must show that $(I:IP)=N(P)=(\mathcal{O}_{K}:P)$. Now $P$ is
maximal, so $\mathcal{O}_{K}/P$ is a field. We have $I/IP$ is a
vector space over $\mathcal{O}_{K}/P$. We want to show that $d=\dim_{\mathcal{O}_{K}/P}I/IP=1$.

$IP\neq I$ as $\mathcal{O}_{K}$ is Dedekind, so $I/IP\neq0$, hence
$d\geq1$

Suppose that $d\geq2$, then there exists $\overline{a},\overline{b}\in I/IP$
that are linearly independent over $\mathcal{O}_{K}/P$. Take lifts
$a,b\in I$. For all $x,y\in\mathcal{O}_{K}$ with $ax+by\in P$,
we have $x\in P$ and $y\in P$. Write $I=P^{e}I'$, then $(a)\subset I$,
so $P^{e}|I|(a)$, also $a\notin IP$, so $IP\nmid(a)$. Hence $P^{e+1}\nmid(a)$.
Similarly we find $P^{e+1}\nmid(b)$. So we can rewrite this as $(a)=P^{e}I'J_{1},(b)=P^{e}I'J_{2}$
with $P\nmid I'J_{1},P\nmid I'J_{2}$. We have $(a)J_{2}=(b)J_{1}$.
Since $J_{2}\nsubseteq P$, there exists $c\in J_{2}\setminus P$.
So $av\in(b)J_{1}\Rightarrow ac=be$ for some $e\in J_{1}$. Now $ac-be=0\in P\Rightarrow c\in P$.
This is a contradiction. Hence the dimension is $1$ as required.\end{proof}
\begin{cor}
If $N(I)$ is prime, then $I$ is prime\end{cor}
\begin{proof}
If $I$ is not prime, then $I=PI'$ with $P$ a non-zero prime and
$I'\neq(1)$. Then $N(I)=N(P)N(I')$ cannot be prime.\end{proof}
\begin{thm}
If $I\subset\mathcal{O}_{K}$ is a non-zero prime, then $N(I)=p^{f}$
for some prime $p$ and $f\in\zz_{>0}$\end{thm}
\begin{proof}
$\mathcal{O}_{K}/I$ is a field ($I$ is maximal) of $N(I)$ elements.
Any finite field has $p^{f}$ elements for some prime $p$ and $f\in\zz_{>0}$\end{proof}
\begin{thm}
If $I$ is a non-zero ideal, we have $N(I)\in I$\end{thm}
\begin{proof}
$N(I)=|\mathcal{O}_{K}/I|$ by definition. Then Lagrange theorem implies
$N(I)\cdot\mathcal{O}_{K}/I=\mathcal{O}_{K}$, so $N(I)\mathcal{O}_{K}\subset I$.\end{proof}
\begin{thm}
If $P$ is a non-zero prime with $N(P)=p^{f}$ then $p\in P$\end{thm}
\begin{proof}
By the previous theorem we have $p^{f}\in P$. But since $P$ is prime,
$p\in P$.\end{proof}
\begin{namedthm}[Kummer - Dedekind Theorem]
 Let $f\in\zz[x]$ be monic and irreducible. Let $\alpha\in\overline{\qq}$
be such that $f(\alpha)=0$. Let $p\in\zz$ be prime. Choose $g_{i}(x)\in\zz[x]$
monic and $e_{i}\in\zz_{>0}$ such that $f\equiv\prod g_{i}(x)^{e_{i}}\mod p$
is the factorization of $\overline{f}\in\ff_{p}[x]$ into irreducible
(with $\overline{g_{i}}\neq\overline{g_{j}}$ for $i\neq j$). Then:
\begin{enumerate}
\item The prime ideals of $\zz[\alpha]$ containing $p$ are precisely the
ideals $(p,g_{i}(\alpha))=:P_{i}$
\item $\prod P_{i}^{e_{i}}\subset(p)$
\item If all $P_{i}$ are invertible then $\prod P_{i}^{e_{i}}=(p)$. Furthermore
$N(P_{i})=p^{f_{i}}$ where $f_{i}=\deg g_{i}$
\item For each $i$, let $r_{i}\in\zz[x]$ be the remainder of $f$ upon
division by $g_{i}$. Then $P_{i}$ is not invertible if and only
if $e_{i}>1$ and $p^{2}|r_{i}$
\end{enumerate}
\end{namedthm}
\begin{proof}
{}
\begin{enumerate}
\item We have $\zz[\alpha]\cong\zz[x]/(f)$ (Galois Theory). Primes of $\zz[\alpha]$
containing $p$ have a one to one correspondence to primes of $\zz[\alpha]/(p)\cong\zz[x]/(p)(f)$.
But $\zz[x]/(p,f)\cong\ff_{p}[x]/(\overline{f})$, so primes of $\ff_{p}[x]/(\overline{f})$
have a one to one correspondence to primes of $\ff_{p}[x]$ containing
$\overline{f}$. We know $\ff_{p}[x]$ is a PID. So theses primes
corresponds to irreducible $\overline{g}\in\ff_{p}[x]$ such that
$\overline{g}|\overline{f}\iff\overline{f}\in(\overline{g})$.


Working backward from this set of correspondence we get what we want

\item Let $I=\prod(p,g_{i}(\alpha))^{e_{i}}.$We want to show that $I\subset(p)$,
i.e., all elements of $I$ are divisible by $p$. Now $I$ is generated
by expression of the form $p^{d}\prod_{i=1}^{s}g_{i}(\alpha)^{m_{i}},m_{i}\leq e_{i}$.
So the only non-trivial case is when $d=0$, i.e., $\prod g_{i}(\alpha)^{e_{i}}$.
We have $\prod g_{i}(x)^{e_{i}}\equiv f\mod p$. Substituting $\alpha$
we get $\prod g_{i}(\alpha)^{e_{i}}\equiv f(\alpha)\equiv0\mod p$
\item Assume $\zz[\alpha]=\mathcal{O}_{\qq(\alpha)}$. We have $\prod P_{i}^{e_{i}}\subset(p)\Rightarrow(p)|\prod P_{i}^{e_{i}}$.
Now $N((p))=|N(p)|=p^{n}$ where $n=\deg f$. So $N(\prod P_{i}^{e_{i}})=\prod N(P_{i}^{e_{i}})=p^{\sum e_{i}\cdot\deg(g_{i})}=p^{n}$ 
\item Left out as it requires too much commutative algebra.
\end{enumerate}
\end{proof}
\begin{example*}
Consider $\qq(\sqrt{-5})$, then $\mathcal{O}_{\qq(\sqrt{-5})}=\zz[\sqrt{-5}]$.
So take $f=x^{2}+5$.
\begin{itemize}
\item $p=2$, then $\overline{f}=x^{2}+1=(x+1)^{2}\in\ff_{2}[x]$. So $g_{1}=x+1$
and $e_{1}=2$. Now $(2)=P_{1}^{2}=(2,1+\sqrt{-5})^{2}$ and $N(P_{1})=2$.
If $P_{1}$ principle? If $P_{1}=(\alpha)$ then $N(P_{1})=|N(\alpha)|$.
Now $N(a+b\sqrt{-5})=a^{2}+5b^{2}$ which is never $2$. Hence $P_{1}$
is not principal.
\item $p=3$, then $\overline{f}=x^{2}-1=(x+1)(x-1)\in\ff_{3}[x]$. So we
have $(3)=P_{1}P_{2}$ where $P_{1}=(3,-1+\sqrt{-5})$ and $P_{2}=(3,1+\sqrt{-5})$.
Again we have $N(P_{1})=N(P_{2})=3$, so neither are principal as
$3\neq a^{2}+5b^{2}$.
\item $p=5$, then $\overline{f}=x^{2}\in\ff_{5}[x]$. So we get $(5)=(5,\sqrt{-5})^{2}=(\sqrt{-5})^{2}$
(since $5=-\sqrt{-5}\sqrt{-5}$).
\end{itemize}
Consider $\qq(\sqrt[3]{2})$, then $\mathcal{O}_{\qq(\sqrt[3]{2})}=\zz[\sqrt[3]{2}]$.
So take $f=x^{3}-2$.
\begin{itemize}
\item $p=2$, then $\overline{f}=x^{3}\in\ff_{2}[x]$. So $(2)=(2,\sqrt[3]{2})^{3}=(\sqrt[3]{2})^{3}$
(since $2=\sqrt[3]{2}\sqrt[3]{2}\sqrt[3]{2}$)
\item $p=3$, then $\overline{f}=x^{3}-2$ is a cubic. Cubic polynomials
are reducible if and only if they have a root. If this case, i.e.,
in $\ff_{3}$, we have $2$ is a root. So $x^{3}-2=(x-2)(x^{2}+2x+1)=(x-2)(x+1)^{2}=(x+1)^{3}$.
Hence $(3)=(3,1+\sqrt[3]{2})^{3}$ and $N(3,1+\sqrt[3]{2})=3$. Now
$(3,1+\sqrt[3]{2})$ is principal if there exist $\alpha\in(3,1+\sqrt[3]{2})$
with $|N(\alpha)|=3$. Notice that $N(1+\sqrt[3]{2})=1^{3}+2\cdot1^{3}=3$,
so $(3,1+\sqrt[3]{2})=(1+\sqrt[3]{2})$
\end{itemize}
\end{example*}
\newpage{}


\section{The Geometry of Numbers}


\subsection{Minkowski's Theorem}

Let $K$ be a number field of degree $n$. Let $\sigma_{1},\dots,\sigma_{n}:K\hookrightarrow\cc$
be its complex embedding. We see that if $\sigma:K\hookrightarrow\cc$
is an embedding then $\overline{\sigma}:K\hookrightarrow\cc$ defined
by $\alpha\mapsto\overline{\sigma(\alpha)}$ is also an embedding.
We have $\overline{\overline{\sigma}}=\sigma$ so $\overline{\phantom{\sigma}}$
is an involution on $\{\sigma_{1},\dots,\sigma_{n}\}$, with fixed
points being those $\sigma$ with $\sigma(k)\subseteq\rr$ for all
$k\in K$. 
\begin{defn}
Let $K$ be a number field of degree $n$ and $\sigma_{1},\dots,\sigma_{n}:K\hookrightarrow\cc$
be its complex embeddings. Say there are $r$ real embeddings ($\sigma(k)\subset\rr$)
and $s$ pairs of complex embedding. So we have $r+2s=n$. Then $(r,s)$
is called the \emph{signature} of $K$
\end{defn}
We can use $\sigma_{1},\dots,\sigma_{n}$ to embed $K$ into $\cc^{n}$
by $\alpha\mapsto(\sigma_{1},(\alpha),\dots,\sigma_{n}(\alpha))$.
We view $\cc^{n}$ as $\rr^{2n}$ with the usual inner product, that
is $||z_{1},\dots,z_{n}||^{2}=|z_{1}|^{2}+\dots+|z_{n}|^{2}$.

Let $v_{1},\dots,v_{m}\in\rr^{2n}$ be given, denote $P_{v_{1},\dots,v_{m}}:=\{\lambda_{1}v_{1}+\dots+\lambda_{m}v_{m}:\lambda_{i}\in[0,1]\}$.
We have (see Algebra I)
\[
\mbox{Vol}(P_{v_{1},\dots,v_{m}})=\left(\det\begin{pmatrix}\left\langle v_{1},v_{1}\right\rangle  & \cdots & \left\langle v_{1},v_{m}\right\rangle \\
\vdots & \ddots & \vdots\\
\left\langle v_{m},v_{1}\right\rangle  & \cdots & \left\langle v_{m},v_{m}\right\rangle 
\end{pmatrix}\right)^{1/2}
\]

\begin{thm}
$(\sigma_{1},\dots,\sigma_{n})$ embeds $K$ as a subset of $K_{\rr}:=\left\{ z_{1},\dots,z_{n}\in\cc^{n}:z_{i}=\overline{z_{j}}\mathrm{\, when\:}\sigma_{i}=\overline{\sigma_{j}}\right\} $\end{thm}
\begin{proof}
For each $\alpha\in K$ we have $(\sigma_{1}(\alpha),\dots,\sigma_{n}(\alpha))=(z_{1},\dots,z_{n})$
satisfied for $i,j$ with $\sigma_{i}=\overline{\sigma_{j}}$. So
$z_{i}=\sigma_{i}(\alpha)=\overline{\sigma_{j}(\alpha)}=\overline{z_{j}}$\end{proof}
\begin{thm}
$K_{\rr}$ has dimension $n$.\end{thm}
\begin{proof}
Without loss of generality let $\sigma_{1},\dots,\sigma_{r}$ be the
real embedding of $K\hookrightarrow\rr$ and let $\sigma_{r+i}=\overline{\sigma_{r+s+i}}$
for $i\in\{1,\dots,s\}$. Identifying $\cc^{n}\cong\rr^{2n}$, we
have $(x_{1},y_{1},x_{2},y_{2},\dots,x_{n},y_{n})$ is in $K_{\rr}$
if an only if:
\begin{itemize}
\item $y_{i}=0$ for $i\in\{1,\dots,r\}$
\item $x_{r+i}=x_{r+i+s}$ for $i\in\{1,\dots,s\}$
\item $y_{r+i}=-y_{r+i+s}$ for $i\in\{1,\dots,s\}$
\end{itemize}
The number of independent linear equation is $r+2s=n$. Hence the
dimension of $K_{\rr}=2n-n=n$.\end{proof}
\begin{defn}
Let $V$ be a finite dimensional vector space over $\rr$, with inner
product $\left\langle \:,\:\right\rangle $ (that is a positive definite
symmetric bilinear form). Then $V$ is called a \emph{Euclidean space}.\end{defn}
\begin{example*}
$V=\rr^{n}$ with $\left\langle (x_{1},\dots,x_{n}),(y_{1},\dots,y_{n})\right\rangle =x_{1}y_{1}+\dots+x_{n}y_{n}$.
Or $V$ a subspace of $\rr^{n}$ (with the same inner product)\end{example*}
\begin{fact*}
Any Euclidean space has an orthonormal basis.\end{fact*}
\begin{defn}
Let $V$ be an Euclidean space. A \emph{lattice} $\Lambda$ in $V$
is a subgroup generated by $\rr$-linearly independent vectors, $v_{1},\dots,v_{m}.$ 

The \emph{rank }of the lattice is $m$.

The \emph{covolume} of $\Lambda$ is $\mbox{Vol}(P_{v_{1},\dots,v_{m}})$\end{defn}
\begin{thm}
$\mathcal{O}_{K}$ embeds as a full rank lattice in $K_{\rr}$ of
covolume $\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$ \end{thm}
\begin{proof}
Let $\omega_{1},\dots,\omega_{n}$ be a basis for $\mathcal{O}_{K}$.
Put $\sigma(\alpha)=(\sigma_{1}(\alpha),\dots,\sigma_{n}(\alpha))\in K_{\rr}\subset\cc^{n}$
for all $\alpha\in K$. We have the vectors $\sigma(\omega_{1}),\dots,\sigma(\omega_{n})\in K_{\rr}.$

So we need to show that $\mbox{Vol}(P_{\sigma(\omega_{1}),\dots,\sigma(\omega_{n})})=\sqrt{\Delta(\mathcal{O}_{K})}\neq0$.
We have 
\begin{eqnarray*}
\mbox{Vol}(P_{\sigma(\omega_{1}),\dots,\sigma(\omega_{n})})^{2} & = & \det\left(\left(\left\langle \sigma(\omega_{i}),\sigma(\omega_{j})\right\rangle \right)_{ij}\right)\\
 & = & \det\left(\left(\sum_{k=1}^{n}\sigma_{k}(\omega_{i})\sigma_{k}(\omega_{j})\right)_{ij}\right)\\
 & = & \det\left(\left(\sum_{k=1}^{n}\sigma_{k}(\omega_{i}\omega_{j}\right)_{ij}\right)\\
 & = & \det\left(\left(\Tr(\omega_{i}\omega_{j}\right)_{ij}\right)\\
 & = & \Delta(\mathcal{O}_{K})
\end{eqnarray*}
 \end{proof}
\begin{cor}
For any non-zero ideal $I\subset\mathcal{O}_{K}$, we have $\sigma(I)\subset K_{\rr}$
is a full rank lattice of covolume $\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}\cdot N(I)$\end{cor}
\begin{proof}
Obvious\end{proof}
\begin{namedthm}[Minkowski's Theorem]
 Let $\Lambda$ be a full rank lattice in a Euclidean space $V$
of dimension $n$. Let $X\subset V$ be a bounded convex symmetric
subset, satisfying $\mbox{Vol}(X)>2^{n}\cdot\mbox{covolume}(\Lambda)$.
Then $X$ contains a non-zero point of $\Lambda$.\end{namedthm}
\begin{proof}
See Topics in Number Theory course
\end{proof}
A small refinement to the theorem can be made: If $X$ is closed then
$\mbox{Vol}(X)\geq2^{n}\cdot\mbox{covolume}(\Lambda)$ suffices.


\subsection{Class Number}
\begin{thm}
Let $K$ be a number field of signature $(r,s)$. Then every non-zero
ideal $I$ of $\mathcal{O}_{K}$ contains a non-zero element $\alpha$
with 
\[
|N(\alpha)|\leq\left(\frac{2}{\pi}\right)^{s}N(I)\sqrt{|\Delta(\mathcal{O}_{K})|}
\]
\end{thm}
\begin{proof}
Let $n=r+2s=[K:\qq]$. Consider for $t\in\rr_{>0}$, the closed set
$X_{t}=\{(z_{1},\dots,z_{n})\in K_{\rr}:|z_{i}|\leq t\}$. We claim
that $\mbox{Vol}(X_{t})=2^{r+s}\pi^{s}t^{n}$

In terms of the orthogonal basis, $X_{t}$ is isomorphic to $[-t,t]^{r}\times B(0,\sqrt{2}t)^{s}$
(where $B(a,r)$ is the standard notation for a ball of radius $r$
centred at $a$, there is some bit of work need to see that the radius
is indeed $\sqrt{2}t$). So
\begin{eqnarray*}
\mbox{Vol}(X_{t}) & = & (2t)^{2}((\pi(\sqrt{2}t)^{2})^{s}\\
 & = & 2^{r}t^{r}\pi^{s}2^{s}t^{2s}\\
 & = & 2^{r+s}\pi^{s}t^{r+2s}
\end{eqnarray*}
Now choose $t$ such that $\mbox{Vol}(X_{t})=2^{n}\mbox{covolume}(I\mbox{ in }K_{\rr})=2^{n}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$.
Then by Minkwoski's there is an $0\neq\alpha\in I$ with $\sigma(\alpha)\in X_{t}$.
So $|N(\alpha)|=\prod|\sigma_{i}(\alpha)|\leq t^{n}$, but since $s^{r+s}\pi^{s}t^{n}=2^{n}N(I)\sqrt{|\Delta(\mathcal{O}_{K})|}$,
we have $|N(\alpha)|\leq t^{n}=\frac{2^{s}}{\pi^{s}}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$
\end{proof}
A better set for the above proof is $X_{t}'=\left\{ (z_{1},\dots,z_{n})\in K_{\rr}:|z_{1}|+\dots+|z_{n}|\leq t\right\} $.
In that case we have $\mbox{Vol}(X_{t}')=\frac{2^{r}\pi^{s}t^{n}}{n!}$.
This can be proven using integral calculus.
\begin{thm}
\label{thm:mu _k }Every ideal $I\subset\mathcal{O}_{K}$ has an element
$\alpha\neq0$ with $|N(\alpha)|\leq\mu_{K}N(I)$ with
\[
\mu_{K}=\left(\frac{4}{\pi}\right)^{s}\frac{n!}{n^{n}}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}
\]
\end{thm}
\begin{proof}
Choose $t$ with $\mbox{Vol}(X_{t}')=2^{n}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$,
that is $\frac{2^{r}\pi^{s}t^{n}}{n!}=2^{n}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$.
Then there exists $0\neq\alpha\in I$ with $\sigma(\alpha)\in X_{t}'$.
Hence
\begin{eqnarray*}
|N(\alpha)| & = & \prod|\sigma_{i}(\alpha)|\\
 & \leq & \left(\frac{\sum|\sigma_{i}(\alpha)|}{n}\right)^{n}\\
 & \leq & \left(\frac{t}{n}\right)^{n}\\
 & = & \frac{1}{n^{n}}n!2^{n-r}\pi^{-s}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}\\
 & = & \frac{4^{s}}{\pi^{s}}\frac{n!}{n^{n}}N(I)\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}
\end{eqnarray*}
where the first inequality follows form the well know theorem that
Geometric Mean $\leq$ Arithmetic Mean. (If $x_{1},\dots,x_{n}\in\rr_{>0}$,
then the Geometric mean is $(x_{1},\dots,x_{n})^{1/n}$, while the
arithmetic mean is $\frac{1}{n}(x_{1}+\dots+x_{n})$)\end{proof}
\begin{rem*}
The number $\mu_{K}$ is sometimes called \emph{Minkowski's constant.}\end{rem*}
\begin{thm}
For any number field $K$ we have
\[
\left|\Delta(\mathcal{O}_{K})\right|\leq\left(\frac{\pi}{4}\right)^{2s}\left(\frac{n^{n}}{n!}\right)^{2}
\]
\end{thm}
\begin{proof}
Apply the above with $I=\mathcal{O}_{K}$. Then there exists $\alpha\in\mathcal{O}_{K}$
with $|N(\alpha)|\leq\mu_{K}$. Also $N(\alpha)\in\zz$ and non-zero
if $\alpha\neq0$. So $|N(\alpha)|\geq1$. Hence
\[
\mu_{K}=\left(\frac{4}{\pi}\right)^{s}\frac{n!}{n^{n}}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}\geq1\Rightarrow\left|\Delta(\mathcal{O}_{K})\right|\leq\left(\frac{\pi}{4}\right)^{2s}\left(\frac{n^{n}}{n!}\right)^{2}
\]
 \end{proof}
\begin{cor}
If $K\neq\qq$, then $\left|\Delta(\mathcal{O}_{K})\right|\neq1$\end{cor}
\begin{proof}
We have $n\geq2$. We need to show that $\left(\frac{\pi}{4}\right)^{2s}\left(\frac{n^{n}}{n!}\right)^{2}>1$.
Now $\left(\frac{\pi}{4}\right)^{2s}\geq\left(\frac{\pi}{4}\right)^{n}$,
so we need to show $\left(\frac{\pi}{4}\right)^{n}\left(\frac{n^{n}}{n!}\right)^{2}>1$.
This can easily be done by induction.\end{proof}
\begin{cor}
Let $K$ be a number field and let $C$ be an ideal class of $K$.
Then there exists $I\in C$ with $N(I)\leq\mu_{K}$\end{cor}
\begin{proof}
Apply Theorem \ref{thm:mu _k } to an ideal $J\in C^{-1}$. (Note:
if $J\in C^{-1}$ is any fractional ideal there is an $a\in\mathcal{O}_{K}$
with $aJ\subset\mathcal{O}_{K}$, since $aJ\in C^{-1}$ we may suppose
without lose of generality that $J$ is an ideal).

So there exists $\alpha\in J$ with $|N(\alpha)|\leq\mu_{k}N(J)$.
Consider $(\alpha)J^{-1}$, we have $J|(\alpha)$ so $I:=(\alpha)J^{-1}$
is an ideal of $\mathcal{O}_{K}$. Furthermore $N(I)=N((\alpha))N(J^{-1})\leq\mu_{k}N(J)N(J^{-1})=\mu_{k}$ \end{proof}
\begin{cor}
The class group of any number field is finite.\end{cor}
\begin{proof}
Every class is represented by an ideal of bounded norm and norms are
in $\zz_{>0}$. So it suffices to show that for any $n\in\zz_{>0}$
we have$\#\{I\subset\mathcal{O}_{K}:N(I)=n\}<\infty$

Let $n\in\zz_{>0}$ be given and $I\subset\mathcal{O}_{K}$ be an
ideal with $N(I)=n$. Factor $n$ into primes, $n=p_{1}^{e_{1}}p_{2}^{e_{2}}\dots p_{r}^{e_{r}}$,
and factor $I$ into prime ideals $I=P_{1}^{f_{1}}P_{2}^{f_{2}}\dots P_{s}^{f_{s}}$.
Then we have $N(I)=N(P_{1})^{f_{1}}N(P_{2})^{f_{2}}\dots N(P_{s})^{f_{s}}=p_{1}^{e_{1}}\dots p_{r}^{e_{r}}.$
By Kummer - Dedekind, for any $p$ there exists finitely many prime
ideals whose norms is a power of $p$. So there are finitely many
prime ideals $P$ whose norm is a power of one of the $p_{i}$. Furthermore
if $N(P_{i})=p_{j}^{e_{j}}$, then $f_{i}\leq e_{j}$, so there are
finitely many possibilities.\end{proof}
\begin{example*}
{}
\begin{itemize}
\item Let $K=\qq(\sqrt{-5})$, note that it has signature $(0,1)$. Then
we have
\[
\mu_{K}=\left(\frac{4}{\pi}\right)^{s}\frac{n!}{n^{n}}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}=\frac{4}{\pi}\frac{2}{4}\sqrt{4\cdot5}=\frac{1}{\pi}\sqrt{80}<\frac{1}{3}\sqrt{81}=3
\]
So every ideal class is represented by an ideal of norm at most $2$.
Let us work out the ideals of norm $2$. By Kummer - Dedekind, we
know $(2)=(2,1+\sqrt{-5})^{2}$, and $N((2,1+\sqrt{-5}))=2$.


We have seen before that $(2,1+\sqrt{-5})$ is not principal. So there
are two ideal class in $\mathcal{O}_{K}$. They are $[(1)],[(2,1+\sqrt{-5})]$,
so $h_{k}=2\Rightarrow\mbox{Cl}_{K}\cong\zz/2\zz$

\item Let $K=\qq(\sqrt{-19})$, note that is has signature $(0,1)$. Then
we have
\[
\mu_{K}=\left(\frac{4}{\pi}\right)^{s}\frac{n!}{n^{n}}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}=\frac{4}{\pi}\frac{2}{4}\sqrt{19}=\frac{1}{\pi}\sqrt{76}<\frac{1}{3}\sqrt{81}=3
\]
Also here, every ideal class is represented by an ideal of norm 1
or 2. Apply Kummer - Dedekind to factor $(2)$. $\mathcal{O}_{K}=\zz\left[\frac{1+\sqrt{-19}}{2}\right]$,
hence $f_{\alpha}=\left(x-\frac{1+\sqrt{-19}}{2}\right)\left(x-\frac{1-\sqrt{-19}}{2}\right)=x^{2}-x+5$.
So $f\equiv x^{2}+x+1\in\ff_{2}[x]$, but this is an irreducible polynomial.
So $(2)=(2,0)=(2)$ is a prime ideal, of norm $4$. Hence there are
no ideals of norm $2$.


So $h_{K}=1$, hence $\mathcal{O}_{K}$ is a PID.

\item Let $K=\qq(\sqrt{-14})$, this has signature $(0,1)$. Then we have
\[
\mu_{K}=\left(\frac{4}{\pi}\right)^{s}\frac{n!}{n^{n}}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}=\frac{4}{\pi}\frac{2}{4}\sqrt{4\cdot14}=\frac{1}{\pi}\sqrt{16\cdot14}\leq\frac{1}{3}\sqrt{15^{2}}=5
\]
So only ideals of norms at most $4$ are of concern. Every ideal can
be factored into prime ideals. So the class group is generated by
classes represented by prime ideals of norm $\leq\mu_{K}$. Prime
ideals of norm $\leq4$ are prime ideals dividing $(2)$ or $(3)$.
Hence we apply Kummer - Dedekind. We have $f=x^{2}+14$

\begin{itemize}
\item $p=2$: $x^{2}+14\equiv x^{2}\mod2$. So $(2)=(2,\sqrt{-14})^{2}:=P^{2}$.
Note that $N(P)=2$
\item $p=3$: $x^{2}+14\equiv x^{2}-1\equiv(x-1)(x+1)\mod3$. So $(3)=(3,\sqrt{-14}-1)(3,\sqrt{-14}+1):=QR$.
Note that $N(Q)=N(R)=3$
\end{itemize}

So ideals of norms less than $4$ are $(1),P,Q,R,P^{2}$. Note that
$P^{2}$ is principal as it is $(2)$, so $[P^{2}]=[(1)]$. Since
$N(a+b\sqrt{-14})=a^{2}+14b^{2}$ but $2$ and $3$ are not of this
form, we have that $P,Q,R$ are not principal. Also note that $QR=(3)$
so $[Q][R]=1$


We claim that $[(1)],[P],[Q],[R]$ are four distinct elements of the
class group.


Suppose that $[P]=[Q]$. Then $[Q][Q]=[P]^{2}=1=[Q][R]\Rightarrow[Q]=[R]$.
Furthermore, since $N(Q)=N(R)=3$, if $[Q]=[R]$ then $[QR]=1=[QQ]$.
Hence $Q^{2}$ is principal, $N(Q^{2})=N(Q)^{2}=9$, so we need to
solve $a^{2}+14b^{2}=9$ $\Rightarrow a=3,b=0$. Hence $Q^{2}=(3)=QR\Rightarrow Q=R$.
Which is a contradiction.


This argument also showed $[Q]\neq[R]$. A similar argument shows
that $[P]\neq[R]$.


Hence we have that $h_{K}=4$. (With not too much work we can show
that $\mbox{Cl}_{K}\cong\zz/4\zz$)

\end{itemize}
\end{example*}

\subsection{Dirichlet's Unit Theorem}
\begin{namedthm}[Dirichlet's Unit Theorem]
 Let $K$ be a number field of signature $(r,s)$. Let $W$ be the
group of roots of unity in $K$. Then $W$ is finite, and $\mathcal{O}_{K}^{*}\cong W\times\zz^{r+s-1}.$
That is, there exists $\eta_{1},\dots,\eta_{r+s-1}\in\mathcal{O}_{K}^{*}$
such that every units in $\mathcal{O}_{K}$ can be uniquely written
as $\omega\cdot\eta_{1}^{k_{1}}\cdot\dots\cdot\eta_{r+s-1}^{k_{r+s-1}}$
with $\omega\in W$ and $k_{i}\in\zz$.\end{namedthm}
\begin{example*}
Let $K=\qq(\sqrt{d})$ with $d>0$ and square free. Then it has signature
$(2,0)$, so $r+s-1=1$. Also $W=\{\pm1\}$. Hence $\mathcal{O}_{K}^{*}\cong W\times\zz=\{\pm1\}\times\zz=\pm\epsilon_{d}^{n}$
(where $\epsilon_{d}$ is as in section 1)

If $K=\qq(\sqrt{d})$ with $d<0$ square free, then it has signature
$(0,1)$, so $\mathcal{O}_{K}^{*}=W$, which is finite (see next lemma)\end{example*}
\begin{fact*}
A subgroup $\Lambda\subset\rr^{n}$ is a lattice if and only if for
any $M\in\rr_{>0}$ we have $[-M,M]^{n}\cap\Lambda$ is finite.\end{fact*}
\begin{lem}
The group $W$ is finite.\end{lem}
\begin{proof}
If $\omega\in W$, then for all $\sigma_{i}:K\hookrightarrow\cc$
we have $\sigma_{i}(\omega)$ is a root of unity (if $\omega^{n}=1$
then $\sigma_{i}(\omega)^{n}=1$). So $\sigma(\omega)=(\sigma_{1}(\omega),\dots,\sigma_{n}(\omega))\in\{(z_{1},\dots,z_{n})\in K_{\rr}:|z_{i}|=1\,\forall i\}$.
This is a bounded subset of $K_{\rr}.$ Also $\omega\in\mathcal{O}_{K}$
as it satisfies some monic polynomial $x^{n}-1\in\zz[x]$. Hence $\sigma(W)\subset\sigma(\mathcal{O}_{K})\cap$
bounded set, but $\sigma(\mathcal{O}_{K})$ is a lattice, hence by
the fact, $\sigma(W)$ is finite.
\end{proof}

\begin{proof}[Proof of Dirichlet's Unit Theorem]
 {}
\begin{lyxlist}{00.00.0000}
\item [{~}] Let $K_{\rr}^{*}=\left\{ (z_{1},\dots,z_{n})\in K_{\rr}:z_{i}\neq0\,\forall i\right\} $.
We have $\mathcal{O}_{K}^{*}\hookrightarrow K^{*}\hookrightarrow K_{\rr}^{*}.$
We will use logarithms: define $\log:K_{\rr}^{*}\to\rr^{n}$ by $(z_{1},\dots,z_{n})\mapsto(\log|z_{1}|,\dots,\log|z_{n}|)$.
This is a group homomorphism. Also define $L:\mathcal{O}_{K}^{*}\to\rr^{n}$
by $\alpha\mapsto\log(\sigma(\alpha))=(\log|\sigma_{1}(\alpha)|,\dots,\log|\sigma_{n}(\alpha)|)$,
this is also a group homomorphism.

\begin{lem}
$\ker(L)=W$\end{lem}
\begin{proof}
$\supset$: For all $\omega\in W$ and $\sigma_{i}$ we have $|\sigma_{i}(\omega)|=1$,
so $\log|\sigma_{i}(\omega)|=0$

$\subset:$ Take $\alpha\in\ker(L)$. Then $\log|\sigma_{i}(\alpha)|=0\,\forall i\Rightarrow|\sigma_{i}(\alpha)|=1$
for all $i$. So $\alpha$ is in some finite set. For every $n$,
we have $\alpha^{n}\in\ker(L)$ which is a finite set, so there are
some $n>m$, with $\alpha^{n}=\alpha^{m}$ and $n\neq m$. Then $\alpha^{n-m}=1$.\end{proof}
\begin{lem}
$\im(L)$ is a lattice in $\rr^{n}$.\end{lem}
\begin{proof}
We must show that $[-M,M]^{n}\cap\im(L)$ is finite. Take $L(\alpha)=(x_{1},\dots,x_{n})\in[-M,M]^{n}\cap\im(L)$
(where $\alpha\in\mathcal{O}_{K}^{*}\subset\mathcal{O}_{K}$) . We
have for all $i$, $\left|\log|\sigma_{i}(\alpha)|\right|\leq M$,
so $|\sigma_{i}(\alpha)|\leq e^{M}$, hence $\sigma(\alpha)\in$bounded
set $\cap\sigma(\mathcal{O}_{K})=$finite. So there are finitely many
possibilities for $\alpha$
\end{proof}

Put $\Lambda=L(\mathcal{O}_{K}^{*})\subset\rr^{n}$. Eventually, we
have to show that $\rk(\Lambda)=r+s-1$.
\begin{lem}
We have that $\rk(\Lambda)\leq r+s-1$\end{lem}
\begin{proof}
Order $\sigma_{i}$ such that $\sigma_{1},\dots\sigma_{r}$ are real
and $\sigma_{r+i}=\overline{\sigma_{r+s+i}}$for $i\in\{1,\dots,s\}$.
Take $\alpha\in\mathcal{O}_{K}^{*}$. Then for $i\in\{1,\dots,s\}$
we have $\sigma_{r+i}(\alpha)=\overline{\sigma_{r+s+i}(\alpha)}$.
Hence $\log|\sigma_{r+i}(\alpha)|=\log|\overline{\sigma_{r+s+i}(\alpha)}|=\log|\sigma_{r+s+i}(\alpha)|$.
So for $(x_{1},\dots,x_{n})\in\Lambda$, we have $x_{r+i}=x_{r+s+i}$
for $i\in\{1,\dots,s\}$. Hence we have found $s$ relations. So $\Lambda\subset$subspace
of dimension $n-r=r+2s-s=r+s$

So we need to find one extra relation. Now $\alpha$ is a unit, so
$|N(\alpha)|=1$. So $|N(\alpha)|=|\sigma_{1}(\alpha)\dots\sigma_{n}(\alpha)|=|\sigma_{1}(\alpha)|\dots|\sigma_{n}(\alpha)|=1\Rightarrow\log|\sigma_{1}(\alpha)|+\dots+\log|\sigma_{n}(\alpha)|=0$.
So we have also the relation $x_{1}+\dots+x_{n}=0$. this shows $\Lambda\subset V\subset\rr^{n}$,
where $V$ is a subspace of dimension $r+s-1$ defined by these relations.
\end{proof}

So we are left to prove that $\rk(\Lambda)\geq r+s-1$ or $\Lambda$
is a full rank lattice in $V$.


Note that for $\alpha\in\mathcal{O}_{K}^{*}$, we have $\sigma_{1}(\alpha)\dots\sigma_{n}(\alpha)=\pm1$.
So $\sigma(\mathcal{O}_{K}^{*})\subset\{(z_{1},\dots,z_{n})\in K_{\rr}^{*}:z_{1}\dots z_{n}=\pm1\}=:E$.
We have to construct lots of units:


The idea: if $(\alpha)=(\beta)$ then $\beta/\alpha$ is a unit. So
we will construct lots of $\alpha\in\mathcal{O}_{K}$ by generating
finitely many ideals. Consider $X_{t}=\{(z_{1},\dots,z_{n})\in K_{\rr}:|z_{i}|\leq t\}$.
Choose $t$ such that $\mbox{Vol}(X_{t})=2^{n}\sqrt{\left|\Delta(\mathcal{O}_{K})\right|}$.
Then by Minkowski's theorem, there exists a non-zero element in $\sigma(\mathcal{O}_{K})\cap X_{t}$.


For any $e\in E$, consider $eX_{t}=\{(z_{1},\dots,z_{n})\in K_{\rr}:|z_{i}|<|e_{i}|t\}$.
Then $\mbox{Vol}(eX_{t})=|e_{1}\dots e_{n}|\mbox{Vol}(X_{t})=\mbox{Vol}(X_{t})$.
So by Minkowski's there exists a non-zero element in $\sigma(\mathcal{O}_{K})\cap eX_{t}$.
Covering $E$ with boxes $eX_{t}$ means we get lots of elements $a_{e}\in\sigma(\mathcal{O}_{K})\cap eX_{t}\,\forall e\in E$.
We have $|N(a_{e})|=\prod|\sigma_{i}(a_{e})|\leq\prod|e_{i}|t\leq t^{n}$.
So the norms of $a_{e}$ are bounded, hence $N((a_{e}))=|N(a_{e})|$
is bounded.


So the set of ideals $\{(a_{e}):e\in E\}$ is finite. Let $b_{1},\dots,b_{m}$
be such that $\{(a_{e}):e\in E\}=\{(b_{1}),\dots,(b_{m})\}$. For
all $e\in E$ there is some $i\in\{1,\dots,m\}$ such that $(a_{e})=(b_{i})$.
So $U_{e}=a_{e}/b_{i}$ is a unit of $\mathcal{O}_{K}$.


Claim: $S=\{U_{e}:e\in E\}$ generates a full rank lattice in $V$,
after applying $L$. If $\left\langle L(S)\right\rangle $ is not
of full rank, then $L(S)$ spans a subspace $Z\nsubseteq V$. Consider
$Y:=\cup(b_{i}^{-1}\cdot X_{t})\subset K_{\rr}$, it is bounded and
without loss of generality we can choose it, such that $\sigma(1)\in Y$.
Consider $\cup_{e\in E}U_{e}^{-1}\cdot Y$ (all of these are bounded)
We want to show that $e^{-1}\in U_{e}^{-1}Y=\frac{b_{i}}{a_{e}}\cdot Y$.
By construction, $b_{i}\cdot Y\supset X_{t}$, so $\frac{b_{i}}{a_{e}}\cdot Y\supset\frac{1}{a_{e}}\cdot X_{t}$.
We have $a_{e}\in eX_{t}$, so $\frac{1}{e}\in\frac{1}{a_{e}}X_{t}$.
Hence $\cup_{e\in E}U_{e}^{-1}$ contains $E$. So $V=\cup_{s\in S}\log(s)+\log(Y)$.
We are assuming $\log(s)\in Z$ and $\log(Y)$ is bounded. If $Z\neq V$
then $V$ is at some bounded distance from $Z$. This proves that
$\left\langle L(S)\right\rangle $ is of full rank.


So $L(\mathcal{O}_{K}^{*})$ is a full rank lattice in $V$. Hence
it has rank $r+s-1$, i.e., $L(\mathcal{O}_{K}^{*})\cong\zz^{r+s-1}$
\begin{lem}
Let $A$ be an abelian group, let $A'\subset A$ be a subgroup and
put $A''=A/A'$. If $A''$ is free (i.e., $\cong\zz^{n}$ for some
$n$), then $A\cong A'\times A''$\end{lem}
\begin{proof}
Omitted, but can be found in any algebra course.
\end{proof}

In our case, we have $A=\mathcal{O}_{K}^{*}$ and $A'=W$. Then by
the first isomorphism theorem $A''\cong L(\mathcal{O}_{K}^{*})$ (as
$W=\ker(L)$). So using the lemma, we have $A\cong W\times L(\mathcal{O}_{K}^{*})\cong L\times\zz^{r+s-1}$
as required.\end{lyxlist}
\end{proof}

\end{document}
