\documentclass[11pt]{article}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{xcolor}

%\usepackage{systeme}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}


\theoremstyle{definition}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{eg}[thm]{Example}
\newtheorem{ex}[thm]{Exercise}
\newtheorem{defn}[thm]{Definition}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{remark}[thm]{Remark}
\newtheorem{question}[thm]{Question}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\usepackage{tikz-cd}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{miniball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=0.5pt]
\tikzstyle{mminiball} = [circle,shading=ball, ball color=black,
    minimum size=0.6mm,inner sep=0.1pt]
\usetikzlibrary{arrows.meta}
\tikzset{>={Latex[length=2mm,width=1.5mm]}}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\usetikzlibrary{decorations.pathmorphing}    
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{arrows.meta,calc}
\usetikzlibrary{bending}
\usetikzlibrary{decorations.markings,shapes.geometric}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\tikzset{-|-/.style={decoration={markings, mark=at position #1 with
  {\arrow{stealth}}},postaction={decorate}}}
\tikzset{movearrow/.style 2 args ={
        decoration={markings,
	  mark= at position {#1} with {\arrow{#2}} ,
        },
        postaction={decorate}
    }
}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
%\setlist[enumerate]{leftmargin=*}
\setlist[enumerate]{itemsep=1pt}

%\allowdisplaybreaks

\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

%\usepackage{algorithm}
%\usepackage[noend]{algpseudocode}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\W}{\mathbb{W}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\newcommand{\incid}{\mathcal{I}(P)}
\newcommand{\tL}{\widetilde{L}}
\newcommand{\tV}{\widetilde{V}}
\newcommand{\F}{\mathcal{F}}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\wt}{\mathrm{wt}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}
\DeclareMathOperator{\Div}{\mathrm{Div}}
\DeclareMathOperator{\Pic}{\mathrm{Pic}}
\DeclareMathOperator{\Jac}{\mathrm{Jac}}
\DeclareMathOperator{\cok}{\mathrm{cok}}
\DeclareMathOperator{\sgn}{\mathrm{sgn}}
\DeclareMathOperator{\outdeg}{\mathrm{outdeg}}
\DeclareMathOperator{\supp}{\mathrm{supp}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 361 lecture for Wednesday, Week 2}
\bigskip

\centerline{Algebraic integers}
\bigskip

\begin{defn}
  Let $A$ and $B$ be integral domains (rings with no zero divisors) with
  $A\subseteq B$.  An element of $\alpha\in B$ is \emph{integral over~$A$} if
  there exists a monic polynomial $p\in A[x]$ such that $p(\alpha)=0$.
\end{defn}

Note that if $A$ in the definition is a field, then $a\in B$ is integral
over~$A$ if and only if $a$ is algebraic over $A$.

Our main interest will be in elements of $\C$ that are integral over $\Z$.
These are integer solutions in $\C$ to monic polynomials with coefficients in
$\Z$.  For example $(1+\sqrt{5})/2$ is integral over~$\Z$ since it is a root of
$x^2-x-1$. Similarly, $i$ is integral over~$\Z$ since it is a root of $x^2+1$.
The word ``monic'' in the definition of integrality is crucial.  For instance,
consider the case $B=\Q$ and $A=\Z$.
Every rational number is a root of a polynomial with integer coefficients, e.g.,
$a/b$ satisfies $bx-a\in \Z[x]$.  However, as the following proposition shows,
a rational solution to a monic polynomial over the integers must be an integer.

\begin{prop}\label{prop:02wed-integers}
  A rational number is integral over $\Z$ if and only if it is an integer.
\end{prop}
\begin{proof} One direction is immediate: if $a\in \Z$, then $a$ is integral
  over~$\Z$ since it satisfies $x-a\in \Z[x]$.  For the other direction, suppose
  $a/b$ is a rational number that is integral over~$\Z$.  Without loss of
  generality, assume~$a/b$ is in lowest terms and that~$b>0$.  Since~$a/b$ is
  integral over~$\Z$, there exists a polynomial
  $p=x^{n}+c_{n-1}x^{n-1}+\cdots+c_{1}x+c_{0}$ with $c_{i}\in\Z$ such that
  $p(a/b)=0$. So
   \[
     \left(\frac{a}{b}\right)^{n}+c_{n-1}\left(\frac{a}{b}\right)^{n-1}+\cdots+c_{1}\left(\frac{a}{b}\right)+c_{0}=0.
   \]
   Clear denominators by multiplying through by $b^{n}$:
   \[
     a^{n}+c_{n-1}a^{n-1}b+\cdots+c_{1}ab^{n-1}+c_{0}b^{n}=0.
   \]
   We see that
   \[
     a^{n}=0\bmod b.
   \]
   If $b\neq 1$, then some prime in the factorization of~$b$ must divide~$a$,
   However, that cannot happen since $a/b$ is in lowest terms.  It follows
   that~$b=1$ and~$a/b=a\in \Z$.
\end{proof}

\begin{ex}
  The number~$\sqrt{2}$ is integral over $\Z$ since it is a zero of the monic
  polynomial~$x^{2}-2\in\Z[x]$.  Show that~$1/\sqrt{2}$ is not integral
  over~$\Z$ by imitating the method used in the proof of
  Proposition~\ref{prop:02wed-integers} (clearing denominators and getting a
  contradiction).
\end{ex}

\begin{thm}\label{thm:02wed-equiv}
  Let $A$ and $B$ be domains with $A\subseteq B$, and let $\alpha\in B$.  Then
  the following are equivalent.
  \begin{enumerate}
    \item\label{thm:02wed-equiv1} $\alpha$ is integral over $A$.
    \item\label{thm:02wed-equiv2} $A[\alpha]:=\{f(\alpha): f\in A[x]\}$ is a finitely generated
      $A$-module.
    \item\label{thm:02wed-equiv3} There exists a finitely generated $A$-module $M$ in $B$ such that
      $\alpha M\subseteq M$.  (Here, $\alpha M=\{\alpha m: m\in M\}$).
  \end{enumerate}
\end{thm}
\begin{proof}
 (\ref{thm:02wed-equiv1} $\Rightarrow$ \ref{thm:02wed-equiv2}) Since $\alpha$ is
 integral over $A$, it is the root of a monic polynomial $p\in A[x]$.  Say
 $p=x^{n}+a_{n-1}x^{n-1}+\cdots+a_{1}x+a_{0}$ with $a_{i}\in A$.  Then since
 $p(\alpha)=0$, we have
 \[
   \alpha^{n}=-a_{0}-a_{1}\alpha-\cdots-a_{n-1}\alpha^{n-1}.
 \]
 It follows that $\{1,\alpha,\ldots,\alpha^{n-1}\}$ generates $A[\alpha]$ as an
 $A$-module.

 (\ref{thm:02wed-equiv2} $\Rightarrow$ \ref{thm:02wed-equiv3}) Let
 $M=A[\alpha]$.  Then $\alpha M\subseteq M$.

 (\ref{thm:02wed-equiv3} $\Rightarrow$ \ref{thm:02wed-equiv1}) Here is the most
 interesting part of the proof.  Suppose $M$ is a finitely generated $A$-module
 in $B$ and $\alpha M\subseteq M$.  Say $M$ is generated by $b_{1},\ldots,b_{n}\in B$ as an $A$-module.  
 Since $\alpha M\subseteq M$, there exist $a_{ij}\in A$ such that
 \begin{align*}
   \alpha b_{1}&=a_{11}b_{1}+\cdots+a_{1n}b_{n}\\
   \alpha b_{2}&=a_{21}b_{1}+\cdots+a_{2n}b_{n}\\
   \vdots      &\qquad \vdots\\[5pt]
   \alpha b_{n}&=a_{n1}b_{1}+\cdots+a_{nn}b_{n}.
 \end{align*}
 Letting $T=(a_{ij})$ and $b=(b_{1}\ \ldots\ b_{n})^{t}$ (where the superscript
 of $t$ denotes the transpose) we can write these equations more succinctly as 
 \[
   \alpha b=Tb.
 \]
 Hence, $(\alpha I_{n}-T)b=0$, which implies $\det(\alpha I_{n}-T)=0$.  Let
 $p(x):=\det(x I_{n}-T)$.  Then
 \[
   p(x)
   =\det
   \left(\begin{array}{cccc}
  x-a_{11} & -a_{12} & \cdots & -a_{1n} \\
-a_{21} &x- a_{22} & \cdots & -a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
-a_{n1} & -a_{n2} & \cdots &x-a_{nn}
   \end{array}\right)
   =
   x^{n}+ \text{ lower order terms }.
 \]
 So $p$ is a monic polynomial with coefficients in~$A$ and having
 $\alpha$ as a root.  Therefore, $\alpha$ is integral over $A$.
\end{proof}

\begin{lem}\label{lem:02wed-lem}
  Let $A\subseteq B\subseteq C$ be rings.  If $B$ is finitely generated as an
  $A$-module and $C$ is finitely generated as a $B$-module, then $C$ is finitely
  generated as an $A$-module.
\end{lem}
\begin{proof}
 If $\{b_{i}\}$ is a finite generating set for $B$ as an $A$-module and
 $\{c_{j}\}$ is a finite generating set for $C$ as a $B$-module, it is
 straightforward to check that $\{a_{i}b_{j}\}$ is a finite generating set for
 $C$ as an $A$-module.
\end{proof}

\begin{cor}
  Let $A\subseteq B$ be domains.  The set of elements of $B$ that are integral
  over $A$ forms a subring of $B$.
\end{cor}
\begin{proof}
  It suffices to show that the set of elements of $B$ that are integral over $A$
  is closed under addition and multiplication.
 Let $\alpha,\beta\in B$ be integral over~$A$.  Consider the \emph{tower} of
 rings
 \[
   A\subseteq A[\alpha]\subseteq A[\alpha,\beta].	
 \]
 (To be clear, $A[\alpha,\beta]:=\{f(\alpha,\beta): f(x,y)\in A[x,y]\}$, all
 polynomials in $\alpha$ and $\beta$ with coefficients in~$A$. It is the subring
 of $B$ generated by $\alpha$ and $\beta$.)  By
 Theorem~\ref{thm:02wed-equiv}, we have that $A[\alpha]$ and $A[\beta]$ are
 finitely generated as $A$-modules.  It is straightforward to check that since
 $A[\beta]$ is finitely generated as an $A$-module, say by $b_{1},\ldots,b_{n}$,
 it follows that $A[\alpha,\beta]$ is finitely generated as a $A[\alpha]$-module
 by $b_{1},\ldots,b_{n}$.  By Lemma~\ref{lem:02wed-lem}, it follows that
 $A[\alpha,\beta]$ is a finitely generated $A$-module.  

 Next, let $M:=A[\alpha,\beta]$.  Apply Theorem~\ref{thm:02wed-equiv},
 part~\ref{thm:02wed-equiv3}, noting that since $A[\alpha,\beta]$ is a ring,
 \[
   (\alpha+\beta)M\subseteq M\quad\text{and}\quad (\alpha \beta)M\subseteq M.
 \]
 It follows that $\alpha+\beta$ and $\alpha \beta$ are integral over $A$.
\end{proof}

\begin{ex}
  Is there a converse to Lemma~\ref{lem:02wed-lem}?
\end{ex}

Next time, we will start to focus on an object of central interest in this
course---the algebraic integers:

\begin{defn}
  The \emph{algebraic integers} are the elements of $\C$ that are integral
  over~$\Z$:
  \[
    \mathfrak{O}:=\{\alpha\in \C: p(\alpha)=0 \text{ for some monic $p\in
    \Z[x]$}\}.
  \]
\end{defn}

\begin{cor}
 The algebraic integers, $\mathfrak{O}$, are a ring. 
\end{cor}

For example, this corollary tells us that since $\sqrt[3]{2}$ and $i$ are
algebraic integers (roots of $x^{3}-2$ and $x^2+1$, respectively), there must be
a monic polynomial~$p$ with integer coefficients  such
that~$p(\sqrt[3]{2}+i)=0$.  The proof of Theorem~\ref{thm:02wed-equiv} shows how
to calculate $p$.
\end{document}
