% vim: tw=50
% 25/02/2023 12AM

\begin{remark*}
    In Theorem 12.2, if $p = a^2 + b^2$, $a + bi$
    and $a - bi$ are not associates unless $p = 2$
    ($(1 + i) = (1 - i)i$).
\end{remark*}

\begin{flashcard}[sum-of-2-squares-iff]
\begin{corollary}
    An integer $n \ge 1$ is the sum of 2 squares
    if and only if \cloze{every prime factor $p$ of $n$
    with $p \equiv 3 \pmod{4}$ divides $n$ to an
    even power.}
\end{corollary}
\end{flashcard}

\begin{proof}
    \begin{align*}
        n = a^2 + b^2
        &\iff n = N(x) \text{ for some $x \in
        \ZZ[i]$} \\
        &\iff \text{$n$ a product of norms of
        primes in $\ZZ[i]$}
    \end{align*}
    Theorem 12.2 implies that norms of primes in
    $\ZZ[i]$ are the primes $p \in \ZZ$ with $p
    \not \equiv 3 \pmod{4}$ and squares of primes
    $p \in \ZZ$ with $p \equiv 3 \pmod{4}$.
\end{proof}

\begin{example*}
    $65 = 5 \cdot 13$. Factoring into primes in
    $\ZZ[i]$ gives
    \begin{align*}
        5
        &= (2 + i)(2 - i) \\
        13
        &= (2 + 3i)(2 - 3i)
    \end{align*}
    Thus $65 = (2 + i)(2 + 3i)\ol{(2 + i)(2 +
    3i)}$, i.e.
    \begin{align*}
        65
        &= N((2 + i)(2 + 3i)) \\
        &= N(1 + 8i) \\
        &= 1^2 + 8^2
    \end{align*}
    But also have
    \begin{align*}
        65
        &= N((2 + i)(2 - 3i)) \\
        &= N(7 - 4i) \\
        &= 7^2 + 4^2
    \end{align*}
\end{example*}

\begin{definition*}
    \begin{enumerate}[(i)]
        \item $\alpha \in \CC$ is an algebraic
            number if there exists non-zero $f \in
            \QQ[X]$ with $f(\alpha) = 0$.
        \item $\alpha \in \CC$ is an algebraic
            integer if there exists monic $f \in
            \ZZ[X]$ with $f(\alpha) = 0$.
    \end{enumerate}
\end{definition*}

\begin{hiddenflashcard}[algebraic-number]
\begin{definition*}[Algebraic Number]
    \cloze{
    $\alpha \in \CC$ is an algebraic number if
    there exists non-zero $f \in \QQ[X]$ with
    $f(\alpha) = 0$.
    }
\end{definition*}
\end{hiddenflashcard}

\begin{hiddenflashcard}[algebraic-integer]
\begin{definition*}[Algebraic Integer]
    \cloze{
    $\alpha \in \CC$ is an algebraic integer if
    there exists monic $f \in \ZZ[X]$ with
    $f(\alpha) = 0$.
    }
\end{definition*}
\end{hiddenflashcard}

\begin{notation*}
    Let $R$ be a subring of $S$, and $\alpha \in
    S$. We write $R[\alpha]$ for the smallest
    subring of $S$ containing $R$ and $\alpha$,
    i.e. if
    \[ \phi : R[X] \to S, \qquad g(X) \mapsto
    g(\alpha) \]
    then $R[\alpha] = \Im(\phi)$.
\end{notation*}

\noindent
Let $\alpha$ be an algebraic number and let $\phi
: \QQ[X] \to \CC$, $g(X) \mapsto g(\alpha)$.
($\Im(\phi) = \QQ[\alpha]$). $\QQ[X]$ is a PID
hence $\Ker(\phi) = (f)$ for some $f \in \QQ[X]$.
Then $f \neq 0$, since $\alpha$ an algebraic
number. Upon multiplying $f$ by a unit, may assume
$f$ is monic.

\begin{definition*}
    $f$ is the \emph{minimal polynomial} of
    $\alpha$. By isomorphism theorem, $\QQ[X] /
    (f) \cong \QQ[\alpha] \le \CC$. Thus
    $\QQ[\alpha]$ an integral domain, hence $f$
    irreducible in $\QQ[X]$ (hence $\QQ[\alpha]$
    is a field).
\end{definition*}

\begin{proposition}
    Let $\alpha$ be an algebraic integer, and $f
    \in\QQ[X]$ its minimal polynomial. Then $f
    \in\ZZ[X]$ and $(f) = \Ker(\theta)$, where
    $\theta : \ZZ[X] \to \CC$ is the map $g(X)
    \mapsto g(\alpha)$.
\end{proposition}

\begin{proof}
    Let $\lambda \in \QQ^\times$ such that
    $\lambda f \in \ZZ[X]$ is primitive. Then
    $\lambda f(\alpha) = 0$, so $\lambda f \in
    \Ker(\theta)$. Let $g \in \Ker(\theta)
    \normalsub \ZZ[X]$. Then $g \in \Ker(\phi)$
    and hence $\lambda f \mid g$ in $\QQ[X]$. Then by
    Lemma 11.4, $\lambda f \mid  g$ in $\ZZ[X]$.
    Thus $\ker(\theta) = (\lambda f)$. Now
    $\alpha$ is an algebraic integer, hence there
    exists $g \in \Ker(\theta)$ monic. Then
    $\lambda f \mid g$ in $\ZZ[X]$ hence $\lambda
    = \pm 1$. Hence $f \in \ZZ[X]$, and $(f) =
    \Ker(\theta)$.
\end{proof}

\myskip
Let $\alpha \in \CC$ an algebraic integer.
Applying isomorphism theorem to $\theta$ gives
$\ZZ[X] / (f) \cong \ZZ[\alpha]$. Examples: $i$,
$\sqrt{2}$, $\frac{-1 + \sqrt{3}}{2}$,
$\sqrt[n]{p}$ have minimal polynomials $X^2 + 1$,
$X^2 - 2$, $X^2 + X + 1$, $X^n - p$. Hence
\[ \ZZ[X] / (X^2 + 1) \cong \ZZ[i], \qquad \ZZ[X]
/ (X^2 - 2) \cong \ZZ[\sqrt{2}] \]
etc.

\begin{corollary}
    If $\alpha$ is an algebraic integer and
    $\alpha \in \QQ$, then $\alpha \in \ZZ$.
\end{corollary}

\begin{proof}
    Let $\alpha$ be an algebraic integer. Then
    minimal polynomial has coefficients in $\ZZ$.
    $\alpha \in \QQ$ implies minimal polynomial is
    $X - \alpha$, and so $\alpha \in \ZZ$.
\end{proof}

\newpage
\section{Noetherian Rings}

We showed that any PID $R$ satisfies the ascending
chain condition (ACC): If $I_1 \subseteq I_2
\subseteq \cdots$ are ideals in $R$, then there
exists $N \in \NN$ such that $I_n = I_{n + 1}$ for
all $n \ge N$. More generally:

\begin{flashcard}[ACC-iff-all-ideals-finitely-generated]
\begin{lemma}
    Let $R$ be a ring.
    \[ \text{$R$ satisfies ACC} \iff \cloze{\text{All
    ideals in $R$ are finitely generated}} \]
\end{lemma}

\begin{proof}
    \begin{itemize}
        \item[$\Leftarrow$] \cloze{Let $I_1 \subseteq I_2
            \subseteq \cdots$ be a chain of ideals
            and $I = \bigcup_{n \ge 1} I_n$, which
            is again an ideal. By assumption $I =
            (a_1, \ldots, a_n)$ for some $a_1,
            \ldots, a_m \in R$. These elements
            belong to a nested union, so there
            exists $N \in \NN$ such that $a_1,
            \ldots, a_m \in I_N$. Then for $n \ge
            N$,
            \[ (a_1, \ldots, a_m) \subseteq I_N
            \subseteq I_N \subseteq I = (a_1,
            \ldots, a_m) \]
            so $I_n = I_N$.}
        \item[$\Rightarrow$] \cloze{Assume $J \normalsub
            R$ not finitely generated. Choose $a_1
            \in J$. Then $J \neq (a_1)$ , so can
            choose $a_2 \in J \setminus (a_1)$.
            Then $J \neq (a_1, a_2)$, so choose
            $a_3 \in J \setminus (a_1, a_2)$.
            Continuing this process we obtain a
            chain of ideals
            \[ (a_1) \subsetneq (a_1, a_2)
            \subsetneq (a_1, a_2, a_3) \subsetneq
            \cdots \]
            with strict inclusions, which
            contradicts ACC.}
    \end{itemize}
\end{proof}
\end{flashcard}

\begin{flashcard}[noetherian-ring]
\begin{definition*}[Noetherian Ring]
    A ring is called \emph{Noetherian} if
    \cloze{it satisfies the Ascending Chain
    Condition.\prompt{ (That is, for any chain of
    ideals $I_1 \subseteq I_2 \subseteq \cdots
    \subseteq R$, we must have $I_n = I_{n + 1}$
    for all sufficiently large $n$.)}}
\end{definition*}
\end{flashcard}
