%! TEX root = NF.tex
% vim: tw=50
% 23/01/2024 10AM

\subsection{Ring of integers}

Let $\alpha \in \CC$ be algebraic. Then there is a
unique monic irreducible polynomial $f \in \QQ[X]$
of minimal degree such that $f(\alpha) = 0$. This
is called the minimal polynomial.

\begin{flashcard}[algebraic-integer-defn]
\begin{definition*}[Algebraic Integer]
  \glsnoundefn{algint}{algebraic
  integer}{algebraic integers}
  \cloze{$\alpha \in \CC$ is an algebraic integer if it
  has minimal polynomial $f_\alpha \in \ZZ[X]$.}
\end{definition*}
\end{flashcard}

\begin{remark*}
  If $\alpha$ is a root of a monic polynomial $f
  \in \ZZ[X]$, then $\alpha$ is an algebraic
  integer. Indeed, then we can write $f = f_\alpha
  \cdot h$ with $f_\alpha$ the minimal polynomial
  of $\alpha$, and $h \in \QQ[X]$ monic. By
  Gauss's Lemma (see \courseref{GRM}), both $f_\alpha, h \in \ZZ[X]$.
\end{remark*}

\begin{theorem*}
  \glsnoundefn{algring}{ring of integers}{N/A}
  \glsref[algint]{Algebraic integers} form a ring.
\end{theorem*}

\begin{flashcard}[intring-notation]
\begin{notation*}
  \glssymboldefn{intring}{$Ocal$}{$Ocal$}
  The ring of algebraic integers is denoted
  \cloze{by $\mathcal{O}$. If $K$ is
  a \gls{nf}, then $\mathcal{O}_K = \mathcal{O}
  \cap K$.}
\end{notation*}
\end{flashcard}

\begin{example*}
  If $K = \QQ$, $\O_K = \ZZ$. Let $\frac{a}{b} \in
  \QQ$. $f_\alpha = x - \frac{a}{b}$. So $\frac{a}{b}
  \in \O_K \iff \frac{a}{b} \in \ZZ$.
\end{example*}

\begin{example*}
\begin{flashcard}[quadratic-fields-intring]
  Quadratic fields: Let $K = \QQ(\sqrt{m})$, where
  $m \neq 0, 1 \in \ZZ$ is square-free. Then
  \[ \O_K = \cloze{\begin{cases}
    a + b\sqrt{m} & a, b \in \ZZ \text{ if $m
    \equiv 2, 3 \pmod{4}$} \\
    a + b \left( \frac{1 + \sqrt{m}}{2} \right)
      & a, b \in \ZZ \text{ if $m \equiv 1 \pmod{4}$}
  \end{cases}} \]
\end{flashcard}
  All elements of $K$ are of the form $\alpha = a
  + b\sqrt{m}$ with $a, b \in \QQ$. $\alpha \in
  \O_K \iff 2a \in \ZZ, a^2 - b^2m \in \ZZ$.
  \[ f_\alpha = (x - (a + b\sqrt{m}))(x - (a -
  b\sqrt{m})) = x^2 - 2ax + a^2 - b^2m .\]
\end{example*}

\begin{example*}
  $n \in \ZZ_{\ge 3}$. $K = \QQ(\ub{e^{2\pi i /
  n}}_{\theta_n})$. $\O_K = \ZZ[\theta_n] = \ZZ
  \oplus \theta_n \ZZ \oplus \cdots \oplus
  \theta_n^{\varphi(n) - 1} \ZZ$. Here, the direct
  sum notation ($\oplus$) means that each element
  of the ring $\O_K$ can be decomposed in a unique
  way, as opposed to if we used sum notation
  ($+$), where we would just assert that every
  element can be written in some way (but possibly
  multiple).
\end{example*}

\vspace{-1em}
Why not work with $\ZZ[\alpha] \subset
\QQ[\alpha]$? Only $\O_K$ works.

\begin{flashcard}[algint-tfae]
\begin{proposition*}
  Let $\alpha \in \CC$. Then the following are
  equivalent:
  \begin{enumerate}[(i)]
    \item $\alpha \in \O$.
    \item \cloze{$\ZZ[\alpha]$ is a finitely generated
      $\ZZ$-module, that is
      \[ \ZZ[\alpha] = \beta_1 \ZZ + \beta_2 \ZZ +
      \cdots + \beta_n \ZZ \]
      for some $\beta_1, \ldots, \beta_n \in
      \ZZ[\alpha]$.}
    \item \cloze{There is a finitely generated
      $\ZZ$-module $M \subset \CC$ such that
      $\alpha M \subset M$.}
  \end{enumerate}
\end{proposition*}

\begin{proof}
  \phantom{}
  \begin{enumerate}[(1) $\implies$ (2)]
    \item[(1) $\implies$ (2)] \cloze{We show that
      \[ \ZZ[\alpha] = \ub{\ZZ + \alpha\ZZ + \cdots +
      \ZZ\alpha^{d - 1}\ZZ}_{M} \]
      where $d = \deg f_\alpha$. Enough to show
      that $\alpha^k \in M$ for all $n \in
      \ZZ_{\ge 0}$. Observe that for $n \ge d$:
      \[ \alpha^n = \ub{(\alpha^d - f_\alpha(\alpha))
      \alpha^{n - d}}_{\in \alpha^{n - 1} \ZZ +
      \cdots + \ZZ} .\]
      Using this and induction, the claim
      follows.}
    \item[(2) $\implies$ (3)] \cloze{Trivial.}
    \item[(3) $\implies$ (1)] \cloze{Let
      $M = \beta_1 \ZZ + \cdots + \beta_k
      \ZZ$ be finitely generated, and suppose
      $\alpha M \subset M$. We exhibit a monic
      polynomial $f \in \ZZ[X]$ such that
      $f(\alpha) = 0$. There are $m_{ij} \in \ZZ$
      such that
      \[ \alpha \beta_i = m_{i1} \beta_1 + \cdots
      + m_{in} \beta_n \qquad \forall i = 1,
      \ldots, n \]
      Let $A$ be the matrix with entries $m_{ii}$.
      Then
      \[ A
      \begin{pmatrix}
        \beta_1 \\
        \vdots \\
        \beta_n
      \end{pmatrix}
      =
      \begin{pmatrix}
        \alpha \beta_1 \\
        \vdots \\
        \alpha\beta_n
      \end{pmatrix} \]
      $\alpha$ is an eigenvalue of $A$. Then $f =
      \det(xI - A) \in \ZZ[X]$ is monic, and has
      the property that $f(\alpha) = 0$.}
  \end{enumerate}
\end{proof}
\end{flashcard}

\begin{flashcard}[algint-ring-proof]
\begin{proof}[Proof that algebraic integers form a
  ring]
  \cloze{Let $\alpha, \beta \in \O$. We want to show that
  $\alpha - \beta$ and $\alpha \beta \in \O$. Let
  $M = \ZZ[\alpha, \beta]$. Clearly $(\alpha -
  \beta) M \subset M$ and $(\alpha\beta) M \subset
  M$. We show that $M$ is a finitely generated
  $\ZZ$-module. Specifically
  \[ M = \sum_{i = 1}^n \sum_{j = 1}^m \alpha_i
  \beta_j \ZZ ,\]
  where $\alpha_1, \ldots, \alpha_n, \beta_1,
  \ldots, \beta_m$ are generators for
  $\ZZ[\alpha]$ and $\ZZ[\beta]$ respectively.
  $\alpha, \beta \in M$, and $M$ is a ring.}
\end{proof}
\end{flashcard}

\subsubsection*{Additive structure of $\mathcal{O}_k$}

\begin{theorem*}
  Let $K$ be a \gls{nf}. Then $\exists \beta_1,
  \ldots, \beta_d \in \O_K$ such that
  \[ \O_K = \beta_1 \ZZ \oplus \cdots \oplus \beta_d
  \ZZ \]
  with $d = [K : \QQ]$.
\end{theorem*}

\begin{definition*}
  \glsnoundefn{intbasis}{integral basis}{integral
  bases}
  Such a tuple of $\beta$'s is called an integral
  basis.
\end{definition*}

\begin{hiddenflashcard}[integral-basis-defn]
\begin{definition*}[Integral basis]
  \cloze{Let $K$ be a \gls{nf}. Then there exists
  $\beta_1, \ldots, \beta_d \in \O_K$ such that
  \[ \O_K = \beta_1 \ZZ \oplus \cdots \oplus
  \beta_d \ZZ \]
  with $d = [K : \QQ]$. Such a tuple is called an
  \emph{integral basis}.}
\end{definition*}
\end{hiddenflashcard}

\vspace{-1em}
Suppose that we know that $\O_K$ is a finitely
generated $\ZZ$-module. By the structure theorem,
\[ \O_K \cong \ZZ^r \oplus \cancel{\ZZ / m_1 \ZZ} \oplus
\cdots \oplus \cancel{\ZZ / m_s \ZZ} \]
