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

\noindent
Let $R$ be an integral domain.

\begin{flashcard}[PID-irreducible-iff-maximal]
\begin{lemma}
    Let $R$ \cloze{be a PID and $0 \neq r \in R$}. Then
    $r$ is irreducible $\iff$ $(r)$ is \cloze{a maximal
    ideal.}
\end{lemma}

\begin{proof}
    \begin{itemize}
        \item[$\Rightarrow$] \cloze{$r \not\in R^\times$
            so $(r) \neq R$. Suppose $(r)
            \subseteq J \subseteq R$. $R$ a PID
            implies $J = (a)$ for some $a \in R$.
            Hence $r = ab$ for some $b \in R$.
            Since $r$ is irreducible, either $a
            \in R^\times$ in which case $J = R$ or
            $b \in R^\times$ in which case $(r) =
            J$. Thus $(r)$ is maximal.
            }
        \item[$\Leftarrow$] \cloze{$(r) \neq R$ so $r \not\in
            R^\times$. Suppose $r = ab$. Then $(r)
            \subseteq (a) \subseteq R$. Since
            $(r)$ is maximal, either $(a) = (r)$
            in which case $b$ is a unit, or $(a) =
            R$ in which case $a$ is a unit. Thus
            $r$ is irreducible.
            }
    \end{itemize}
\end{proof}
\end{flashcard}

\begin{remark*}
    \begin{enumerate}[(i)]
        \item Backwards direction holds without
            assuming $R$ a PID.
        \item Let $R$ a PID, $0 \neq rR$. Then
            \begin{align*}
                (r) \text{ maximal}
                &\iff r \text{ irreducible} \\
                &\iff r \text{ prime} \\
                &\iff (r) \text{ prime}
            \end{align*}
            Thus there exists a bijection
            \[ \{\text{non-zero prime ideals}\}
            \leftrightarrow \{\text{non-zero
            maximal ideals}\} \]
    \end{enumerate}
\end{remark*}

\begin{flashcard}[euclidean-domain-defn]
\begin{definition*}[Euclidean domain]
    \cloze{
    An \fcemph{integral domain} is a \emph{Euclidean domain}
    (ED) if there is a function $\phi : R
    \setminus \{0\} \to \ZZ_{\ge 0}$ (a \fcemph{Euclidean
    function}) such that:
    \begin{enumerate}[(i)]
        \item If $a \mid b$ then $\phi(a) \le
            \phi(b)$.
        \item If $a, b \in R$ with $b \neq 0$,
            $\exists q, r \in R$ with $a = bq + r$
            and either $r = 0$ or $\phi(r) <
            \phi(b)$.
    \end{enumerate}
}
\end{definition*}
\end{flashcard}

\begin{example*}
    $\ZZ$ is an ED with Euclidean function
    $\phi(n) = |n|$.
\end{example*}

\begin{flashcard}[ED-implies-PID]
\begin{proposition}
    If $R$ is a Euclidean domain, then it is a
    principal ideal doman (ie ED implies PID).
\end{proposition}

\begin{proof}
    \cloze{Let $R$ have Euclidean function $\phi : R
    \setminus \{0\} \to \ZZ_{\ge 0}$. Let $I
    \normalsub R$ non-zero. Choose $b \in I
    \setminus \{0\}$ with $\phi(b)$ minimal, then
    $(b) \subseteq I$. For $a \in I$, write $a =
    bq +r$ with $q, r \in R$ and either $r = 0$ or
    $\phi(r) < \phi(b)$. Since $r = a - bq \in I$,
    cannot have $\phi(r) < \phi(b)$ by choice of
    $b$. Thus $a = bq \in (b)$, and hence $(b) =
    I$.
}
\end{proof}
\end{flashcard}

\begin{remark*}
    Only used (ii) here. Property (i) allows us to
    describe the units in $R$ as
    \[ R^\times = \{u \in R \setminus \{0\} \mid
    \phi(u) = \phi(1)\} \]
\end{remark*}

\begin{example*}
    \begin{enumerate}[(i)]
        \item $F$ a field, $F[X]$ is an ED with
            Euclidean function $\phi(f) = \deg f$,
            $f \in F[X]$. (Proposition 7.1)
        \item $R = \ZZ[i]$ is an ED with Euclidean
            function
            \[ \phi(a + ib) = N(a + ib) = |a +
            ib|^2 = a^2 + b^2 \]
            Since $N(z_1 z_2) = N(z_1)N(z_2)$,
            property (i) holds. For property (ii),
            let $z_1, z_2 \in \ZZ[i]$ with $z_2
            \neq 0$. Consider $\frac{z_1}{z_2} \in
            \CC$. This has distance less than 1
            from the nearest element of $\ZZ[i]$,
            i.e. there exists $q \in \ZZ[i]$ such
            that $\left| \frac{z_1}{z_2} - q
            \right| < 1$ ($*$).
            \begin{center}
                \includegraphics[width=0.6\linewidth]
                {images/7796fe9aadf711ed.png}
            \end{center}
            Set $r = z_1 - z_2 q \in \ZZ[i]$. Then
            $z_1 = z_2 q + r$ and
            \[ \phi(r) = |r|^2 = |z_1 - z_2q|^2 <
            |z_2|^2 = \phi(z_2) \]
    \end{enumerate}
    Thus Proposition 10.5 implies that
    $\ZZ[i]$ and $F[X]$ for $F$ a field
    are PIDs.
\end{example*}

\begin{example*}
    Let $A$ be an $n \times n$ matrix over a field
    $F$. Let $I = \{f \in F[X] : f(A) = 0\}$. If
    $f, g \in I$, then $(f - g)(A) = f(A) - g(A) =
    0 \implies f - g \in I$. If $f \in F[X]$ and
    $g \in I$, then $(f \cdot g)(A) = f(A) \cdot
    g(A) = 0 \implies fg \in I$. Thus $I \subseteq
    F[X]$ is an ideal, and hence $I = (f)$ for
    some $f \in F[X]$ since $F[X]$ is a PID. May
    assume $f$ is monic upon mlutiplying by a unit
    in $F$. Then for $g \in F[X]$, $g(A) = 0 \iff
    g \in I \iff g \in (f)$, i.e. $f \mid g$. Thus
    $f$ is minimal polynomial of $A$.
\end{example*}

\begin{example*}[Field of order 8]
    Let $\FF_2 = \ZZ / 2\ZZ$. Let $f(X) = X^3 + X
    + 1 \in \FF_2[X]$. If $f(X) = g(X) h(X)$ with
    $g, h \in \FF_2[X]$ and $\deg(g), \deg(h) >
    0$, then either $\deg(g) = 1$ or $\deg(h) =
    1$, and so $f$ has a root. But $f(0) \neq 0$
    and $f(1) \neq 0$ (in $\FF_2$). Thus $f$ is
    irreducible. Since $\FF_2[X]$ a PID, Lemma
    10.4 implies $(f) \normalsub \FF_2[X]$ is
    maximal, henec
    \[ \FF_2[X] / (f) = \{aX^2 + bX + c + (f) \mid
    a, b, c \in \FF_2\} \]
    is a field of order 8.
\end{example*}


