% Alg 1 2022 Blomer

\section{Introduction to algebraic number theory}

\subsection{Number Fields and rings of integers}

\begin{definition}[Number field]
    A \vocab{number field} $K$ is a finite (hence algebraic) extension of $\Q$.
    Its \vocab{ring of integers} $\cO_k$ is the integral closure of $\Z$ in $K$.
\end{definition}
\begin{remark}
    \begin{enumerate}[(a)]
        \item It is not obvious that this is a ring, but we have shown this in % TODO REF
        \item For $K = \Q(\i)$ we have $\cO_K = \Z[\i]$ by % Blomer (3.5) TODO
        \item Every  $x \in  K$ of the form $\frac{y}{n}$ with $y \in  \cO_K$, $n \in  \Z \setminus \{0\}$ since  $\exists f \in  \Z[X]: f(x) = 0$ with leading coefficient $0 \neq  c \in  \Z$.
            Then $c^{n-1}f(x) = 0$ implies that $cx$ is integral over $\Z$.
        \item An element $x \in  K$ is in $\cO_k$ if and only if its minimal polynomial is in $\Z[X]$.% see Blomer 3.5 TODO
        \item Since $\char(\Q) = 0$, every extension is separable.
    \end{enumerate}

\end{remark}

\begin{definition} % and Lemma TODO
    For $a \in  K$consider the  $\Q$-vectorspace-homomorphism $T_a : K \to  K, x \mapsto ax$ and define the \vocab{norm} and \vocab{trace}
    of $a$ by
     \[
    \Tr(a) \coloneqq \Tr(T_a)
    \]
    and  \[
    \Nr(a) = \det(T_a)
\]
\end{definition}
\begin{lemma}
    $\Tr : k \to  \Q$ and $\Nr : K^\ast \to  \Q^\ast$ are homomorphisms.
\end{lemma}
\begin{proof}
    $\Nr(T_a)$ and  $\Tr(T_a)$ are coefficients of the characteristic polynomial of  $T_a$,
    hence in  $\Q$.
    Since $T_a + T_b = T_{a+b}$ and $T_{ab} = T_a T_b$, we see that $\Tr$ and $\Nr$ are homomorphisms.
\end{proof}

\begin{theorem}
    \begin{enumerate}[(a)]
        \item Let $K$ be a number field of degree $n$ and denote by $\sigma$ the  $n$ distinct homomorphisms
            from  $K$ to  $\overline{\Q}$.
            Then
            \[
            \Tr(a) = \sum_{\sigma} \sigma a, \Nr(a) = \prod_{\sigma} \sigma a
            \]
        \item If $a \in  \cO_K$ then $\Tr(a), \Nr(a) \in  \Z$
    \end{enumerate}
\end{theorem}
\begin{proof}
    \begin{enumerate}[(a)]
        \item
    If $a $ is of degree $m$ over $\Q$, then $(1, a, a^2, \ldots, a^{m-1})$ is a $\Q$- basis of $\Q(a) / \Q$.
    Let $f_a(X) = X^n + c_1 X^{m-1} + \ldots+ c_m \in  \Q[X]$ be the minimal polynomial of $a$.
    Let $n = md$ and  $(b_1, \ldots, b_d)$ a basis of $K / \Q(a)$.
    Then $(b_1, b_1a, b_1a^2, \ldots, b_1a^{m-1}, \ldots, b_d, b_da, \ldots, b_da^{m-1})$ is a basis of  $K / \Q$.
    Then the matrix of $T_a$ with respect to basis has block structure with blocks:
     \[
         \begin{pmatrix}  & & & & -c_m \\ 1& & &  & -c_{m-1} \\ & 1 &  & -c_{m-2} \\ & & \ddots & \\ & & & 1 & -c_1 \end{pmatrix}
    \]
    The charactersitic polynomial is $f_a$ for every block, hence $f_a^d$ for the entire matrix. 
    On the set $\Hom(K, \overline{Q})$ we introduce an equivalence relation by $\sigma \sim \tau(a)$ if  $\sigma(a) = \tau(a)$.
    Then the set of equivalence classes is in bijection with $\Hom(\Q(a), \overline{\Q})$ via
    \[
    [\sigma] \mapsto \sigma \defon{\Q(a)}
    \]
    Since $\{\sigma(a) | \simga \in  \Hom(\Q(a), \overline{\Q})\}$ is the set of roots of $f_a$, by Vietas theorem we obtain
     $\Tr_K(a) = d\Tr_{\Q(a)}(T_a) = d \sum_{\sigma \in \Hom(\Q(a), \overline{\Q}} \sigma(a) = \sum_{\delta \in \Hom(K, \overline{\Q}} \sigma(a)$.

    Basically the same proof works for $\Nr(a)$.

\item If $a$ is integral over $\Z$, then all $\simga(a)$ are integral over $\Z$ (since they are roots of the same poynomial), so $\Nr(a)$ and $\Tr(a) \in  \Q$ are integral over $\Z$ by % TODO Blomer 3.3 and a)
    and so $\Nr(a), \Tr(a) \in  \Z$.

    \end{enumerate}

\end{proof}


\begin{definiton}
    Let $K$ be a humber field with $\Q = \basis(\alpha_1, \ldots, \alpha_n)$. We define the \vocab{discriminant}
    \[
D(\alpha_1, \ldots, \alphan) = \det \left( \left( \delta_i \alpha_j \right)_{\substack{ \le  j \le  n \\ \delta_i \in  \Hom(K, \overline{\Q})\}  \right)^{2} 
    \] 
\end{definition}

\begin{lemma}
    \begin{enumerate}[(a)]
        \item We hae $D(\alpha_1, \ldots, \alpha_n) = \det(\Tr(\alpha_i \alpha_j)_{i,j}) \in  \Q$
        \item The map $(x,y) \mapsto \Tr(xy)$ is a non-degenerate bilinear form
        \item We have  $D(\alpha_1, \ldots, \alpha_n) \neq 0$
    \end{enumerate}
\end{lemma}
\begin{proof}
    \begin{enumerate}[(a)]
        \item We have $\Tr(\alpha_i \alpha_j) = \sum_\sigma \sigma(\alpha_i \alpha_j ) = \sum_\sigma \sigma(\alpha_i) \sigma(\alpha_j)$,
            so  $\left( \Tr(\alpha_i \alpha_j) \right)  = (\sigma \alpha_i)^T_{\sigma, i} \cdot  (\sigma \alpha_j)_{\sigma, j}$.
        \item By additivity of the trace, it's clear that this is a bilinear form.
        The associated symmetric matrix is $M = \Tr(\alpha_i \alpha_j)_{i,j}$ where $\{\alpha_i\}$ is a basis.
        We can assume that $K = \Q(\theta)$, so $(1, \theta, \theta^2, .., \theta^{n-1})$ is a basis.
        So $(\sigma \alpha_i)_{\sigma, i}$ is a Vandermonde matrix % TODO?
        , hence it has non-vanishing determinant and so $\det M \neq  0$.
    \item follows from (a) and (b).
    \end{enumerate}
\end{proof}

\begin{theorem}
    Every ideal $\{0\}  \neq  \mathcal a  \subseteq \cO_K$ (in particular $\cO_k$ itself) is a free  $\Z$-module of rank  $n = [K : \Q]$.
    In particular, every ideal of $\cO_K$ is finitely generated as a $\Z$-module, in particular as an $\cO_K$-module.
    Hence $\cO_K$ is noetherian.
\end{theorem}
\begin{proof}
    Let $\alpha_1, \ldots, \alpha_n$ be a basis of $K / \Q$. W.l.o.g.~ $\alpha_j \in  \cO_K$, with discriminant $D \in \Z$.
    Let $x = \sum a_j \alpha_j \in  \cO_K$ for some $a_j \in  \Q$.
    Then $\alpha_i x = \sum \alpha_i \alpha_j \cdot  a_j$.
    This implies $\Z \ni \Tr(\alpha_i x) = \sum_j \Tr(\alpha_i \alpha_j) a_j$ for all  $i$.
    We have $\Tr(\alpha_i \alpha_j) \in  \Z$. This is an $n \times n$ linear system of equations in $a_j$.
    By Cramer's rule, $a_j \in  \frac{1}{D} \Z$. Hence $Dx \in  \sum \Z \alpha_j$, so $D \cO_K \subseteq \sum \Z \alpha_j$ is a free module as a submodule of a ree $\Z$-module (by % TODO Blomer 0.9
    ), obviously of rank $n$.
    Now let $\{0\} \neq  \mathcal{a} \subseteq \cO_k$ be an ideal.
    This is again a $\Z$-submodule of $\cO_k$, hence a free module. If $0 \neq  a \in  \mathcal{a}$, then $a \cO_K \subseteq \mathcal{a}$,
    hence the $\Z$-rank of $\mathcal{a}$ is  $n$.
\end{proof}

\begin{example}
    A $\Z$-basis of $\Z[\i]$ is $\{1,\i\}$ and the discriminant is
    \[
        \det \begin{pmatrix} 1 & \i \\ 1 & -\i \end{pmatrix} ^{2} = (-2\i)^{2} = -4   
    \]
\end{example}

\begin{corollary}
    \begin{enumerate}[(a)]
        \item A $\Z$-module basis of $\cO_K$ is called an \vocab{integral basis} of $K$. The discriminant with respect to this basis is \vocab{the discriminant}  $D_K$ of  $K$.
    It is indpendent of the basis.
\item Every ideal $\{0\} \neq  \mathcal a \subseteq \cO_K$ has finite index.
    We denote by $N \mathcla a = (\cO_k : \mathcal a) = \# \cO_K / \mathcal a$, \vocab{the norm} of  $\mathcal a$.
    If  $(\apha_1, \ldots, \alpha_n)$ is a $\Z$-basis of $\mathcal a$, denn  $D(\alpha_1, \ldots, \alpha_n) = (N \mathcal a)^2 D_K$
    \end{enumerate}
\end{corollary}
\begin{proof}
    \begin{enumerate}[(a)]
        \item A change of basis in $\Z$ corresponds to multiplying with a matrix of determinant  $\pm 1$.

        \item Since  $\mathcal a$ is a submodule of  $\cO_K$ of full rank, we can choose compatible bases
             $(\alha_1, \ldots, \alpha_n) \subseteq \cO_K$, $(d_1 \alpha_1, \ldots, d_n \alpha_n) \subseteq \mathcal a$.

             $(\cO_k, \mathcal a) = d_1 \cdot  \ldots \cdot d_n$.
    \end{enumerate}
\end{proof}
