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

\newpage
\mychapter{Rings}

\newpage
\section{Definition and Examples}

\begin{flashcard}[ring-defn]
\begin{definition*}[Ring]
    A \emph{ring} is a triple $(R, +, \cdot)$
    \cloze{consisting of a set $R$ and two binary
    operators $+ : R \times R \to R$ and $\cdot :
    R \times R \to R$ satisfying:
    \begin{enumerate}[(i)]
        \item $(R, +)$ is an abelian group, with
            identity $0$ (sometimes written
            $0_R$).
        \item Multiplication is associative and
            has an identity, i.e.
            \[ x \cdot (y \cdot z) = (c \cdot y)
            \cdot z \qquad \forall x, y, z \in R \]
            and there exists $1 \in R$ such that
            $x \cdot 1 = 1 \cdot x = x$ for all $x
            \in R$ (sometimes we will write
            $1_R$).
        \item Distributive laws
            \begin{align*}
                x \cdot (y + z)
                &= x \cdot y + x
                \cdot z \qquad \forall x, y, z
                \in R \\
                (x + y) \cdot z
                &= x \cdot z + y \cdot z
                \qquad \forall
                x, y, z \in R
            \end{align*}
    \end{enumerate}
}
\end{definition*}
\end{flashcard}

\begin{definition*}[Commutative ring]
    We say $R$ is a commutative ring if $x
    \cdot y = y \cdot x$ for all $x, y \in R$.
\end{definition*}

\begin{note*}
    \emph{In this course} we only consider
    \emph{commutative rings}.
\end{note*}

\subsubsection*{Remarks}

\begin{enumerate}[(i)]
    \item As in the case of groups, check closure!
    \item For $x \in R$, write $-x$ for the
        inverse of $x$ under $+$ and abbreviate $x
        + (-y)$ as $x - y$.
    \item $0 \cdot x = (0 + 0) \cdot x = 0 \cdot x
        + 0 \cdot x$, so $0 \cdot x = 0$ for all
        $x \in R$.
    \item $0 = 0 \cdot x = (1 - 1) \cdot x = 1
        \cdot x + (-1) \cdot x = x + (-1) \cdot x$
        hence $(-1) \cdot x = -x$ for all $x \in
        R$.
\end{enumerate}

\begin{flashcard}[subring-defn]
\begin{definition*}[Subring]
    \cloze{
    A subset $S \subset R$ is a \emph{subring}
    (written $S \le R$) if it is a ring under $+$
    and $\cdot$ with the same identity elements
    $0$ and $1$.
}
\end{definition*}
\end{flashcard}

\begin{hiddenflashcard}[how-to-check-subring]
How to check if $S$ is a subring of $R$? \\
\cloze{
Check that $0, 1 \in S$ and that it's closed under
addition and multiplication, and \fcemph{additive inverses}
exist.
}
\end{hiddenflashcard}

\subsubsection*{Examples}

\begin{enumerate}[(i)]
    \item $\ZZ[i] = \{a + bi : a, b \in \ZZ\} \le
        \CC$ (ring of Gaussian integers)
    \item $\QQ(\sqrt{2}) = \{a + b \sqrt{2} : a, b
        \in \QQ\} \le \RR$.
    \item $\ZZ / n\ZZ = \text{integers mod
        $n$}$.
    \item $R$, $S$ rings. The product $R \times S$
        is a ring via
        \begin{align*}
            (r_1, s_1) + (r_2, s_2)
            &= (r_1 + r_2, s_1 + s_2) \\
            (r_1, s_1) \cdot (r_2, s_2)
            &= (r_1 \cdot r_2, s_1 \cdot s_2) \\
            0_{R \times S}
            &= (0_R, 0_S) \\
            1_{R \times S}
            &= (1_R, 1_S)
        \end{align*}
        Note: $R \times \{0\}$ is \emph{not} a
        subring of $R \times S$.
    \item Let $R$ be a ring. A polynomial $f$ over
        $R$ is an expression $f = a_0 + a_1 X +
        \cdots + a_n X^n$, $a_i \in \RR$. (Note
        ``$X$'' is just a symbol, not a variable).
        The \emph{degree} of $f$ is the largest $n
        \in \NN$ such that $a_n \neq 0$. We write
        $R[X]$ for the set of all polynomials over
        $R$. If $g = b_0 + b_1 X + \cdots + b_m
        X^m$ is another polynomial, set
        \begin{align*}
            f + g
            &= \sum_i (a_i + b_i) X^i \\
            f \cdot g
            &= \sum_i \left( \sum_{j = 0}^i a_j
            b_{i - j} \right) X^i
        \end{align*}
        Then $R[X]$ is a ring with identities $0$
        and $1$. We identify $R$ with the subring
        of $R[X]$ of constant polynomials (ie
        $\sum_i a_i X^i$ with $a_i = 0$ for all $i
        \ge 1$).
\end{enumerate}

\begin{flashcard}[unit-defn]
\begin{definition*}[Unit]
    \cloze{
    An element $r \in R$ is a \emph{unit} if it
    has an inverse under multiplication, i.e.
    $\exists s \in R$ such that $r \cdot s = 1$.
    The units in a ring $R$ form a group
    $(R^\times, \cdot)$.
}
\end{definition*}
\end{flashcard}

For example, $\ZZ^\times = \{\pm 1\}$, $\QQ^\times
= \QQ \setminus \{0\}$.

\begin{flashcard}[field-defn]
\begin{definition*}[Field]
    \cloze{
    A \emph{field} is a ring with $0 \neq 1$
    such that every non zero element is a unit.
}
\end{definition*}
\end{flashcard}

\begin{remark*}
    If $R$ is a ring with $0 = 1$, then $x = x
    \cdot 1 = x \cdot 0 = 0$ for all $x \in R$, so
    $R = \{0\}$ the trivial ring.
\end{remark*}

\begin{flashcard}[polynomial-division]
\begin{proposition}
    Let $f, g \in R[X]$. \cloze{Suppose the leading
    coefficient of $g$ is a \fcemph{unit}. Then there
    exists $q, r \in R[X]$ such that}
    \[ f(X) = q(X) g(X) + r(X) \]
    \cloze{where $\deg (r) < \deg (g)$.}
\end{proposition}
\prompt{

\begin{proof}
\cloze{
Induct on degree of $f$.
}
\end{proof}
}
\end{flashcard}

\begin{proof}
    By induction on $n = \deg f$. Write
    \begin{align*}
        f(X)
        &= a_n X^n + a_{n - 1} X^{n - 1} + \cdots
        + a_1 X + a_0 \qquad a_n \neq 0 \\
        g(X)
        &= b_m X^m b_{m - 1} X^{m - 1} + \cdots +
        b_1 X + b_0 \qquad b_m \neq 0
    \end{align*}
    If $n < m$, then put $q = 0$, $r = f$ and
    done. Otherwise we have $n \ge m$ and we set
    \[ f_1(X) = f(X) - a_n b_m^{-1} X^{n - m} X^{n
    - m} g(X) \]
    Coefficient of $X^n$ is $a_n - a_n b_m^{-1}
    b_m = 0$ therefore $\deg(f_1) < n$. By the
    induction hypothesis, there exists $q_1, r \in
    R[X]$ such that
    \begin{align*}
        f_1(X)
        &= q_1(X) g(X) + r(X)
        \qquad \deg(r) < \deg(g) \\
        \implies f(X)
        &= \ub{(g_1(X) + a_n b_m^{-1} X^{n -
        m})}_{= g(X)} g(X)
        + r(X)
    \end{align*}
\end{proof}

\begin{remark*}
    If $R$ is a field then we only need $g \neq
    0$.
\end{remark*}

\subsubsection*{Further Examples}

\begin{enumerate}[(i)]
    \item If $R$ is a ring and $S$ is a set then
        the set of all functions $S \to \RR$ is a
        ring under pointwise operations
        \begin{align*}
            (f + g)(x)
            &= f(x) + g(x) \\
            (f \cdot g)(x)
            &= f(x) \cdot g(x)
        \end{align*}
        Further interesting examples appear as
        subrings, for example
        \[ \{\text{continuous
        functions $\RR \to \RR$}\} \]
        has
        \[ \{\text{polynomial functions $\RR \to
        \RR$}\} = R[X] \]
        as a subring.
    \item Power series ring $R[X] = \{a_0 + a_1 X
        + \cdots \mid a_i \in R\}$.
    \item Laurent polynomials
        \[ R\llbracket X, X^{-1}\rrbracket =
        \left\{ \sum_{i \in \ZZ} a \cdot
        X^i : a_i \in R, \text{only finitely many $a_i
        \neq 0$} \right\} \]
\end{enumerate}
