\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=True]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{bbding}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Saturday, February 18, 2023 08:48:09}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations.pathmorphing}
\newcounter{exer}
\newcounter{exera}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{convention}[1][Convention]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\setlength\textheight{22.5cm}
\setlength\textwidth{14.8cm}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\defn}[1]{{\color{darkred}\emph{#1}}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\arinj}{\ar@{_{(}->}}
\newcommand{\arinjrev}{\ar@{^{(}->}}
\newcommand{\arsurj}{\ar@{->>}}
\newcommand{\arelem}{\ar@{|->}}
\newcommand{\arback}{\ar@{<-}}
\newcommand{\are}{\ar@{-}}
\newcommand{\arebi}[1][]{\ar@{<-}@/_/[#1] \ar@/^/[#1]}
\newcommand{\of}{\text{ of }}
\definecolor{darkgreen}{rgb}{0,.5,0}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Lecture 15, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 332 Winter 2023, Lecture 15: Rings}

\textbf{website:}
\texttt{\href{https://www.cip.ifi.lmu.de/~grinberg/t/23wa}{\texttt{https://www.cip.ifi.lmu.de/\symbol{126}%
grinberg/t/23wa}}}

\section{Rings and ideals (cont'd)}

\setcounter{subsection}{11}

\subsection{The Chinese Remainder Theorem (cont'd)}

\setcounter{subsubsection}{7}

\setcounter{theo}{6}

\subsubsection{A few words about noncommutative rings}

Recall the main theorem from Lecture 14:

\begin{theorem}
[The Chinese Remainder Theorem for $k$ ideals]\label{thm.CRT-k-ids}Let
$I_{1},I_{2},\ldots,I_{k}$ be $k$ mutually comaximal ideals of a commutative
ring $R$. Then:

\textbf{(a)} We have%
\[
I_{1}\cap I_{2}\cap\cdots\cap I_{k}=I_{1}I_{2}\cdots I_{k}.
\]


\textbf{(b)} We have%
\[
R/\left(  I_{1}I_{2}\cdots I_{k}\right)  \cong R/I_{1}\times R/I_{2}%
\times\cdots\times R/I_{k}.
\]


\textbf{(c)} More concretely, there is a ring isomorphism%
\begin{align*}
R/\left(  I_{1}I_{2}\cdots I_{k}\right)   &  \rightarrow R/I_{1}\times
R/I_{2}\times\cdots\times R/I_{k},\\
\overline{r}  &  \mapsto\left(  \overline{r},\overline{r},\ldots,\overline
{r}\right)  .
\end{align*}

\end{theorem}

We sketched the proof of this and applied it to the case of $R=\mathbb{Z}$.

\setcounter{theo}{9}

Abstract algebra is called \textquotedblleft abstract\textquotedblright%
\ because it is about generalizing, not about applying to particular cases.
Commutative rings are legion, but arbitrary rings are an even broader
universe. Thus, for good or bad, we might wonder: Can Theorem
\ref{thm.CRT-k-ids} be generalized to arbitrary rings (not just commutative ones)?

The proof used the commutativity of $R$ in a crucial point. Indeed, we used it
back in the proof of Theorem 1.12.3 \textbf{(a)} in Lecture 13, when we
rewrote $ai$ as $ia$. If $R$ is not commutative, then we cannot do this, so
(for two comaximal ideals $I$ and $J$ of $R$) we obtain $I\cap J=IJ+JI$
instead of $I\cap J=IJ$. As Exercise 2 on homework set \#4 shows, this is the
best we can get.

As a consequence, Theorem \ref{thm.CRT-k-ids} also wouldn't hold without the
commutativity of $R$. However, can we tweak it in such a way that it would for
noncommutative $R$ as well?

For parts \textbf{(b)} and \textbf{(c)}, this turns out to be surprisingly
easy: Just replace $I_{1}I_{2}\cdots I_{k}$ by $I_{1}\cap I_{2}\cap\cdots\cap
I_{k}$ ! This way, the claim remains the same for commutative $R$, because
Theorem \ref{thm.CRT-k-ids} \textbf{(a)} shows that $I_{1}\cap I_{2}\cap
\cdots\cap I_{k}=I_{1}I_{2}\cdots I_{k}$ in this case, but for general $R$ it
remains true even without commutativity. That is, we have the following:

\begin{theorem}
[The Chinese Remainder Theorem for $k$ ideals: quotient part]%
\label{thm.CRT-k-ids2}Let $I_{1},I_{2},\ldots,I_{k}$ be $k$ mutually comaximal
ideals of a ring $R$. Then:

\textbf{(a)} We have
\[
R/\left(  I_{1}\cap I_{2}\cap\cdots\cap I_{k}\right)  \cong R/I_{1}\times
R/I_{2}\times\cdots\times R/I_{k}.
\]


\textbf{(b)} More concretely, there is a ring isomorphism%
\[
R/\left(  I_{1}\cap I_{2}\cap\cdots\cap I_{k}\right)  \rightarrow
R/I_{1}\times R/I_{2}\times\cdots\times R/I_{k}%
\]
that sends each residue class $r+\left(  I_{1}\cap I_{2}\cap\cdots\cap
I_{k}\right)  $ to the $k$-tuple $\left(  r+I_{1},\ r+I_{2},\ \ldots
,\ r+I_{k}\right)  $.
\end{theorem}

The proof is not much harder than the proof of the respective parts of Theorem
\ref{thm.CRT-k-ids} (see \S 2.12.5 in the text for details).

Now what about Theorem \ref{thm.CRT-k-ids} \textbf{(a)} -- do we have to say
goodbye to it if $R$ is not commutative?

As we know, the case $k=2$ can be fixed by replacing $IJ$ by $IJ+JI$ (where
$I=I_{1}$ and $J=I_{2}$). The same applies to an arbitrary $k$:

\begin{theorem}
\label{thm.CRT-k-ids-nc.allk!}Let $I_{1},I_{2},\ldots,I_{k}$ be $k$ mutually
comaximal ideals of a ring $R$. Then, $I_{1}\cap I_{2}\cap\cdots\cap I_{k}$ is
the sum of all $k!$ possible products of $I_{1},I_{2},\ldots,I_{k}$ in some order.
\end{theorem}

For instance, for $k=3$, Theorem \ref{thm.CRT-k-ids-nc.allk!} claims that%
\[
I_{1}\cap I_{2}\cap I_{3}=I_{1}I_{2}I_{3}+I_{1}I_{3}I_{2}+I_{2}I_{1}%
I_{3}+I_{2}I_{3}I_{1}+I_{3}I_{1}I_{2}+I_{3}I_{2}I_{1}%
\]
whenever $I_{1},I_{2},I_{3}$ are three mutually comaximal ideals of a ring $R$.

Theorem \ref{thm.CRT-k-ids-nc.allk!} can be proved by an easy adaptation of
our proof of Theorem \ref{thm.CRT-k-ids2} \textbf{(a)}.

But it turns out that this theorem can be improved. Surprisingly, no one seems
to have observed this until Birgit van Dalen in her 2005 bachelor's thesis
\cite{vanDal05} (see \cite{vanDal06} for a summary in English). It is possible
to replace the sum of all $k!$ possible products by certain smaller sums so
that Theorem \ref{thm.CRT-k-ids-nc.allk!} still remains true. Van Dalen has
characterized precisely which smaller sums work (i.e., what subsets of the
$k!$ possible products can be discarded so that the remaining products still
add up to $I_{1}\cap I_{2}\cap\cdots\cap I_{k}$), and in particular found two
choices that work for every $k$:

\begin{theorem}
Let $I_{1},I_{2},\ldots,I_{k}$ be $k$ mutually comaximal ideals of a ring $R$. Then:

\textbf{(a)} We have%
\[
I_{1}\cap I_{2}\cap\cdots\cap I_{k}=I_{1}I_{2}\cdots I_{k}+I_{k}I_{k-1}\cdots
I_{1}.
\]


\textbf{(b)} We have%
\begin{align*}
I_{1}\cap I_{2}\cap\cdots\cap I_{k}  &  =I_{1}I_{2}\cdots I_{k}+I_{2}%
I_{3}\cdots I_{k}I_{1}+I_{3}I_{4}\cdots I_{k}I_{1}I_{2}\\
&  \ \ \ \ \ \ \ \ \ \ +\cdots+I_{k}I_{1}I_{2}\cdots I_{k-1}.
\end{align*}
(The right hand side here is the sum of all cyclically rotated versions of the
product $I_{1}I_{2}\cdots I_{k}$.)
\end{theorem}

We refer to \cite[Stellingen 4.7 and 4.8]{vanDal05} for the proof of this theorem.

See also \S 2.12.7 in the text for some more identities for comaximal ideals.
(I think there are some things left unexplored in this field, both in terms of
finding identities and in terms of finding applications/examples for them.)

\subsection{Euclidean rings and Euclidean domains}

\subsubsection{All ideals of $\mathbb{Z}$ are principal}

We have been talking about ideals of $\mathbb{Z}$ for quite a while now, but
so far they have all been principal. Coincidence? Not really:

\begin{proposition}
\label{prop.eucldom.Z-PID}Any ideal of $\mathbb{Z}$ is principal.
\end{proposition}

\begin{proof}
Let $I$ be an ideal of $\mathbb{Z}$. We must prove that $I$ is principal.

If $I$ contains only $0$, then $I=\left\{  0\right\}  =0\mathbb{Z}$, which is principal.

Thus, we WLOG assume that $I$ contains not only $0$. Hence, $I$ contains a
nonzero element. Therefore, $I$ contains a positive element (since you can
otherwise take a negative element of $I$ and multiply it by $-1$). Let $b$ be
the \textbf{smallest} positive element of $I$. Then, $b\in I$, and thus every
multiple of $b$ belongs to $I$ (by the second ideal axiom). In other words,
$b\mathbb{Z}\subseteq I$.

Now we shall show that $b\mathbb{Z}=I$.

To prove this, pick any $a\in I$. As you know from elementary number theory,
we can divide $a$ by $b$ with remainder (since $b$ is a positive integer).
That is, there exist some $q\in\mathbb{Z}$ and some $r\in\left\{
0,1,\ldots,b-1\right\}  $ such that $a=qb+r$.

Consider these $q$ and $r$. From $r\in\left\{  0,1,\ldots,b-1\right\}  $, we
obtain $r\geq0$ and $r\leq b-1<b$.

From $a=qb+r$, we obtain $r=a-qb=a+\left(  -q\right)  b\in I$ (since $a,b\in
I$, and since $I$ is an ideal). Therefore, $r$ is an element of $I$ that is
smaller than $b$ (since $r<b$).

However, $b$ is the \textbf{smallest} positive element of $I$. Thus, no
positive element of $I$ can be smaller than $b$. If $r$ was positive, this
would contradict the result of the preceding paragraph. Hence, $r$ cannot be
positive. Since $r\geq0$, we thus obtain $r=0$. Hence, $a=qb+\underbrace{r}%
_{=0}=qb=bq\in b\mathbb{Z}$.

So we have shown that $a\in b\mathbb{Z}$ for each $a\in I$. In other words,
$I\subseteq b\mathbb{Z}$. Combined with $b\mathbb{Z}\subseteq I$, this yields
$I=b\mathbb{Z}$, which shows that $b\mathbb{Z}$ is principal. Thus,
Proposition \ref{prop.eucldom.Z-PID} is proved.
\end{proof}

Note that this proof is non-constructive as stated, as it is not clear how to
find the smallest positive element of a given ideal of $\mathbb{Z}$ (or to
even figure out whether this ideal has a nonzero element to begin with).
However, at the level of generality at which Proposition
\ref{prop.eucldom.Z-PID} is stated, nothing can be done about this, since the
ideal $I$ could be given in an arbitrarily abstract way, and in that case it
might be algorithmically impossible to find an integer $b$ that satisfies
$I=b\mathbb{Z}$\ \ \ \ \footnote{For example, let $I$ be the set of all
integers that are $0$ or multiples of an odd perfect number (where a
\textbf{\href{https://en.wikipedia.org/wiki/Perfect_number}{\textbf{perfect
number}}} means a positive integer that equals the sum of all its proper
positive divisors). This is clearly an ideal of $\mathbb{Z}$, but does it have
a nonzero element? This question requires knowing whether an odd perfect
number exists, but this is a well-known open problem. Finding an integer $b$
satisfying $I=b\mathbb{Z}$ is at least as hard as solving this problem.}.

For certain ways of defining an ideal $I$, however, there exist algorithms for
finding a generator of $I$ (that is, an integer $b$ satisfying $I=b\mathbb{Z}%
$). Most famously, if $a$ and $b$ are two integers, then the ideal
$a\mathbb{Z}+b\mathbb{Z}$ equals the ideal $c\mathbb{Z}$ for $c=\gcd\left(
a,b\right)  $ (we will prove this in Lecture 16), and the latter number $c$
can be computed by the Euclidean algorithm. The extended Euclidean algorithm
furthermore computes two integers $x$ and $y$ satisfying $xa+yb=c$, thus
making the ideal equality $a\mathbb{Z}+b\mathbb{Z}=c\mathbb{Z}$ explicit.

Both the Euclidean algorithm and the proof of Proposition
\ref{prop.eucldom.Z-PID} rely on one important feature of the integers:
division with remainder. Not every ring has this feature. However, many rings
do, and we can give them a name:

\subsubsection{Euclidean rings}

\begin{definition}
\label{def.rings.euclid}Let $R$ be a commutative ring.

\textbf{(a)} A \textbf{norm} on $R$ means a function $N:R\rightarrow
\mathbb{N}$ with $N\left(  0\right)  =0$.

\textbf{(b)} A norm $N$ on $R$ is said to be \textbf{Euclidean} if for any
$a\in R$ and any nonzero $b\in R$, there exist elements $q,r\in R$ with%
\[
a=qb+r\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \left(  r=0\text{ or
}N\left(  r\right)  <N\left(  b\right)  \right)  .
\]


\textbf{(c)} We say that $R$ is a \textbf{Euclidean ring} if $R$ has a
Euclidean norm.

\textbf{(d)} We say that $R$ is a \textbf{Euclidean domain} if $R$ is a
Euclidean ring and an integral domain.
\end{definition}

You can think of the norm as a measure of \textquotedblleft how
big\textquotedblright\ an element of $R$ is, similar to the absolute value of
an integer or to the degree of a polynomial\footnote{As we will soon see,
these two examples actually are Euclidean norms on their respective rings.}.
Note that we are \textbf{not} requiring that the norm $N$ be multiplicative
(i.e., satisfy $N\left(  ab\right)  =N\left(  a\right)  \cdot N\left(
b\right)  $). We also are not requiring the $q$ and the $r$ in Definition
\ref{def.rings.euclid} \textbf{(b)} to be unique.

Some examples:

\begin{itemize}
\item Any field $F$ is a Euclidean domain. To wit, any map $N:F\rightarrow
\mathbb{N}$ with $N\left(  0\right)  =0$ is a Euclidean norm on $F$. (Indeed,
for any $a\in F$ and any nonzero $b\in F$, the condition in Definition
\ref{def.rings.euclid} \textbf{(b)} is satisfied for $q=\dfrac{a}{b}$ and
$r=0$.)

\item The ring $\mathbb{Z}$ is a Euclidean domain. Indeed, the map%
\begin{align*}
N:\mathbb{Z}  &  \rightarrow\mathbb{N},\\
a  &  \mapsto\left\vert a\right\vert
\end{align*}
is a Euclidean norm on $\mathbb{Z}$. The fact that it is Euclidean follows
from division with remainder\footnote{You may need to think for a few moments
about the $b<0$ case in Definition \ref{def.rings.euclid} \textbf{(b)}, but it
is not significantly harder than the (classical) $b>0$ case (and can be
reduced to the latter quite easily).}. Note that our condition in Definition
\ref{def.rings.euclid} \textbf{(b)} does not require that $r\geq0$, so it is
more liberal than the notion of remainder that you know from high school. And
indeed, the $q$ and the $r$ in Definition \ref{def.rings.euclid} \textbf{(b)}
are usually not unique: For $a=7$ and $b=5$, there are \textbf{two} pairs
$\left(  q,r\right)  \in\mathbb{Z}\times\mathbb{Z}$ with%
\[
a=qb+r\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \left(  r=0\text{ or
}N\left(  r\right)  <N\left(  b\right)  \right)  .
\]
These pairs are $\left(  1,2\right)  $ and $\left(  2,-3\right)  $. The second
pair has negative $r$, which disqualifies it as a remainder in the high-school
sense, but is perfectly fine for Definition \ref{def.rings.euclid}
\textbf{(b)}.

\item If $F$ is a field, then the ring $F\left[  x\right]  $ of polynomials
(in a single indeterminate $x$) with coefficients in $F$ is a Euclidean
domain. A Euclidean norm for it is the map%
\begin{align*}
p  &  \mapsto\deg p\ \ \ \ \ \ \ \ \ \ \left(  \text{for }p\neq0\right)  ,\\
0  &  \mapsto0.
\end{align*}
We will see this in more details once we have properly defined polynomials.

However, polynomial rings in more than $1$ variable are not Euclidean; neither
are polynomial rings over non-fields.

\item The ring $\mathbb{Z}\left[  i\right]  $ of Gaussian integers is a
Euclidean domain.

Indeed, we claim that the map%
\begin{align*}
N:\mathbb{Z}\left[  i\right]   &  \rightarrow\mathbb{N},\\
a+bi  &  \mapsto a^{2}+b^{2}\ \ \ \ \ \ \ \ \ \ \left(  \text{for }%
a,b\in\mathbb{Z}\right)
\end{align*}
is a Euclidean norm.

To prove this, we must show that for any $\alpha\in\mathbb{Z}\left[  i\right]
$ and any nonzero $\beta\in\mathbb{Z}\left[  i\right]  $, there exist elements
$q,r\in\mathbb{Z}\left[  i\right]  $ such that%
\[
\alpha=q\beta+r\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \left(
r=0\text{ or }N\left(  r\right)  <N\left(  \beta\right)  \right)  .
\]


So let us fix an $\alpha\in\mathbb{Z}\left[  i\right]  $ and a nonzero
$\beta\in\mathbb{Z}\left[  i\right]  $. We are looking for elements
$q,r\in\mathbb{Z}\left[  i\right]  $ such that%
\[
\alpha=q\beta+r\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \left(
r=0\text{ or }N\left(  r\right)  <N\left(  \beta\right)  \right)  .
\]
Actually, we don't need the $r=0$ option; I claim that we can find elements
$q,r\in\mathbb{Z}\left[  i\right]  $ such that%
\[
\alpha=q\beta+r\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ N\left(
r\right)  <N\left(  \beta\right)  .
\]


To find such elements $q$ and $r$, we make the following observation: Any
$z\in\mathbb{Z}\left[  i\right]  $ satisfies $N\left(  z\right)  =\left\vert
z\right\vert ^{2}$. Hence, we have the following chain of equivalences:%
\begin{align*}
\left(  N\left(  r\right)  <N\left(  \beta\right)  \right)  \  &
\Longleftrightarrow\ \left(  \left\vert r\right\vert ^{2}<\left\vert
\beta\right\vert ^{2}\right)  \ \Longleftrightarrow\ \left(  \left\vert
r\right\vert <\left\vert \beta\right\vert \right) \\
&  \Longleftrightarrow\ \left(  \dfrac{\left\vert r\right\vert }{\left\vert
\beta\right\vert }<1\right)  \ \Longleftrightarrow\ \left(  \left\vert
\dfrac{r}{\beta}\right\vert <1\right)
\end{align*}
(since $\dfrac{\left\vert z\right\vert }{\left\vert w\right\vert }=\left\vert
\dfrac{z}{w}\right\vert $ for any complex numbers $z$ and $w\neq0$). Moreover,
we have the equivalence%
\[
\left(  \alpha=q\beta+r\right)  \ \Longleftrightarrow\ \left(  \dfrac{\alpha
}{\beta}=q+\dfrac{r}{\beta}\right)  \ \Longleftrightarrow\ \left(
\dfrac{\alpha}{\beta}-q=\dfrac{r}{\beta}\right)  .
\]
Thus, we need to find elements $q,r\in\mathbb{Z}\left[  i\right]  $ such that
\[
\dfrac{\alpha}{\beta}-q=\dfrac{r}{\beta}\ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ \left\vert \dfrac{r}{\beta}\right\vert <1.
\]
In other words, we need to find an element $q\in\mathbb{Z}\left[  i\right]  $
such that%
\[
\left\vert \dfrac{\alpha}{\beta}-q\right\vert <1
\]
(because if we have found such a $q$, then the corresponding $r$ can be
obtained by setting $r=\alpha-q\beta$). This becomes a lot more intuitive if
we recall the geometric meaning of Gaussian integers: The Gaussian integers
are the lattice points of a square lattice in the plane:%
\[%
%TCIMACRO{\TeXButton{tikzpicture}{\begin{tikzpicture}[baseline, scale=2.5]
%\draw[step=1cm,gray,very thin] (-2.4,-2.4) grid (2.4,2.4);
%\draw[very thick,red,->] (-2.5,0) -- (2.5,0);
%\draw[very thick,red,->] (0,-2.5) -- (0,2.5);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\fill(\x cm, 0) circle (1pt) node[above left=2pt]{$\xtext$};
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, 1 cm) circle (1pt) node[above left=2pt]{$\xtext+ i$};
%\fill(0, 1 cm) circle (1pt) node[above left=2pt] {$i$};
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, -1 cm) circle (1pt) node[above left=2pt]{$\xtext- i$};
%\fill(0, -1 cm) circle (1pt) node[above left=2pt] {$-i$};
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, 2 cm) circle (1pt) node[above left=2pt]{$\xtext+ 2i$};
%\fill(0, 2 cm) circle (1pt) node[above left=2pt] {$2i$};
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, -2 cm) circle (1pt) node[above left=2pt]{$\xtext- 2i$};
%\fill(0, -2 cm) circle (1pt) node[above left=2pt] {$-2i$};
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[baseline, scale=2.5]
\draw[step=1cm,gray,very thin] (-2.4,-2.4) grid (2.4,2.4);
\draw[very thick,red,->] (-2.5,0) -- (2.5,0);
\draw[very thick,red,->] (0,-2.5) -- (0,2.5);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\fill(\x cm, 0) circle (1pt) node[above left=2pt]{$\xtext$};
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, 1 cm) circle (1pt) node[above left=2pt]{$\xtext+ i$};
\fill(0, 1 cm) circle (1pt) node[above left=2pt] {$i$};
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, -1 cm) circle (1pt) node[above left=2pt]{$\xtext- i$};
\fill(0, -1 cm) circle (1pt) node[above left=2pt] {$-i$};
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, 2 cm) circle (1pt) node[above left=2pt]{$\xtext+ 2i$};
\fill(0, 2 cm) circle (1pt) node[above left=2pt] {$2i$};
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, -2 cm) circle (1pt) node[above left=2pt]{$\xtext- 2i$};
\fill(0, -2 cm) circle (1pt) node[above left=2pt] {$-2i$};
\end{tikzpicture}%
%EndExpansion
\]
So a Gaussian integer $q\in\mathbb{Z}\left[  i\right]  $ satisfying
$\left\vert \dfrac{\alpha}{\beta}-q\right\vert <1$ simply means a lattice
point at a distance less than $1$ from the point $\dfrac{\alpha}{\beta}$.

I claim that such a point exists. Visually, this follows from the fact that if
we draw a circle with radius $1$ around each lattice point (i.e., each
Gaussian integer), then these circles cover the entire plane\footnote{I want
the circles to be open (i.e., the boundary of such a circle does not count as
part of the circle).}, as shown in the following picture:%
\[%
%TCIMACRO{\TeXButton{tikz circles}{\begin{tikzpicture}[baseline, scale=2.5]
%\clip(-2.4,-2.4) rectangle (2.4,2.4);
%\draw[step=1cm,gray,very thin] (-2.4,-2.4) grid (2.4,2.4);
%\draw[very thick,red,->] (-2.5,0) -- (2.5,0);
%\draw[very thick,red,->] (0,-2.5) -- (0,2.5);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\fill(\x cm, 0) circle (1pt);
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, 1 cm) circle (1pt);
%\fill(0, 1 cm) circle (1pt);
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, -1 cm) circle (1pt);
%\fill(0, -1 cm) circle (1pt);
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, 2 cm) circle (1pt);
%\fill(0, 2 cm) circle (1pt);
%\foreach\x/\xtext in {-2, -1, 1, 2}
%\fill(\x cm, -2 cm) circle (1pt);
%\fill(0, -2 cm) circle (1pt);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\draw[thick,blue](\x cm, 0cm) circle (1cm);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\draw[thick,blue](\x cm, -1cm) circle (1cm);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\draw[thick,blue](\x cm, -2cm) circle (1cm);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\draw[thick,blue](\x cm, 1cm) circle (1cm);
%\foreach\x/\xtext in {-2, -1, 0, 1, 2}
%\draw[thick,blue](\x cm, 2cm) circle (1cm);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[baseline, scale=2.5]
\clip(-2.4,-2.4) rectangle (2.4,2.4);
\draw[step=1cm,gray,very thin] (-2.4,-2.4) grid (2.4,2.4);
\draw[very thick,red,->] (-2.5,0) -- (2.5,0);
\draw[very thick,red,->] (0,-2.5) -- (0,2.5);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\fill(\x cm, 0) circle (1pt);
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, 1 cm) circle (1pt);
\fill(0, 1 cm) circle (1pt);
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, -1 cm) circle (1pt);
\fill(0, -1 cm) circle (1pt);
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, 2 cm) circle (1pt);
\fill(0, 2 cm) circle (1pt);
\foreach\x/\xtext in {-2, -1, 1, 2}
\fill(\x cm, -2 cm) circle (1pt);
\fill(0, -2 cm) circle (1pt);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\draw[thick,blue](\x cm, 0cm) circle (1cm);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\draw[thick,blue](\x cm, -1cm) circle (1cm);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\draw[thick,blue](\x cm, -2cm) circle (1cm);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\draw[thick,blue](\x cm, 1cm) circle (1cm);
\foreach\x/\xtext in {-2, -1, 0, 1, 2}
\draw[thick,blue](\x cm, 2cm) circle (1cm);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
The easiest way to see this geometrically is to show that the four circles
around the vertices of a unit square cover the entire square:%
\[%
%TCIMACRO{\TeXButton{tikz unit square covered by 4 circles}{\begin{tikzpicture}%
%[scale=2.5]
%\draw[step=1cm,gray,very thin] (0.8,0.8) grid (2.2,2.2);
%\fill[yellow] (1,1) rectangle (2,2);
%\fill(1, 1) circle (1pt) node[above left=2pt]{$1+i$};
%\fill(2, 1) circle (1pt) node[above left=2pt]{$2+i$};
%\fill(1, 2) circle (1pt) node[above left=2pt]{$1+2i$};
%\fill(2, 2) circle (1pt) node[above left=2pt]{$2+2i$};
%\draw[thick,blue](1,1) circle (1cm);
%\draw[thick,blue](2,1) circle (1cm);
%\draw[thick,blue](1,2) circle (1cm);
%\draw[thick,blue](2,2) circle (1cm);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[scale=2.5]
\draw[step=1cm,gray,very thin] (0.8,0.8) grid (2.2,2.2);
\fill[yellow] (1,1) rectangle (2,2);
\fill(1, 1) circle (1pt) node[above left=2pt]{$1+i$};
\fill(2, 1) circle (1pt) node[above left=2pt]{$2+i$};
\fill(1, 2) circle (1pt) node[above left=2pt]{$1+2i$};
\fill(2, 2) circle (1pt) node[above left=2pt]{$2+2i$};
\draw[thick,blue](1,1) circle (1cm);
\draw[thick,blue](2,1) circle (1cm);
\draw[thick,blue](1,2) circle (1cm);
\draw[thick,blue](2,2) circle (1cm);
\end{tikzpicture}%
%EndExpansion
\]
(where we understand the circles to be open, i.e., the circumference of a
circle is not included in the circle).

This geometric argument is not hard to translate into algebra: You write the
complex number $\dfrac{\alpha}{\beta}$ as $\left(  u+x\right)  +\left(
v+y\right)  i$, where $u$ and $v$ are integers and $x,y\in\left[  0,1\right]
$ (since every real number can be written in the form $u+x$ for some integer
$u$ and some $x\in\left[  0,1\right]  $). Then, the required point $q$ will be

\begin{itemize}
\item the point $u+vi$ if $x\leq\dfrac{1}{2}$ and $y\leq\dfrac{1}{2}$;

\item the point $\left(  u+1\right)  +vi$ if $x>\dfrac{1}{2}$ and $y\leq
\dfrac{1}{2}$;

\item the point $u+\left(  v+1\right)  i$ if $x\leq\dfrac{1}{2}$ and
$y>\dfrac{1}{2}$;

\item the point $\left(  u+1\right)  +\left(  v+1\right)  i$ if $x>\dfrac
{1}{2}$ and $y>\dfrac{1}{2}$.
\end{itemize}

In either case, this point $q$ really has a distance less than $1$ from the
point $\dfrac{\alpha}{\beta}$ (this is easy to check\footnote{In fact,
\par
\begin{itemize}
\item the real parts of $q$ and $\dfrac{\alpha}{\beta}$ differ by at most
$\dfrac{1}{2}$;
\par
\item the imaginary parts of $q$ and $\dfrac{\alpha}{\beta}$ differ by at most
$\dfrac{1}{2}$;
\end{itemize}
\par
and thus (by the Pythagorean theorem) the distance between $q$ and
$\dfrac{\alpha}{\beta}$ is at most $\sqrt{\left(  \dfrac{1}{2}\right)
^{2}+\left(  \dfrac{1}{2}\right)  ^{2}}=\dfrac{\sqrt{2}}{2}<1$.}).

Thus, we have found our $q$, and consequently the $r$ as well (since
$r=\alpha-q\beta$). This completes the proof that the norm $N$ is Euclidean.
Hence, $\mathbb{Z}\left[  i\right]  $ is a Euclidean ring, thus a Euclidean domain.

\item The ring%
\[
\mathbb{Z}\left[  \sqrt{-3}\right]  =\left\{  a+b\sqrt{-3}\ \mid
\ a,b\in\mathbb{Z}\right\}
\]
(this is another subring of $\mathbb{C}$, since $\sqrt{-3}=\sqrt{3}i$) is
\textbf{not} Euclidean. This is not obvious, but it can be proved.

\item The ring%
\[
\mathbb{Z}\left[  \sqrt{2}\right]  =\left\{  a+b\sqrt{2}\ \mid\ a,b\in
\mathbb{Z}\right\}
\]
(a subring of $\mathbb{R}$) is Euclidean. A Euclidean norm for it is the map%
\begin{align*}
\mathbb{Z}\left[  \sqrt{2}\right]   &  \rightarrow\mathbb{N},\\
a+b\sqrt{2}  &  \mapsto\left\vert a^{2}-2b^{2}\right\vert
\ \ \ \ \ \ \ \ \ \ \left(  \text{for }a,b\in\mathbb{Z}\right)  .
\end{align*}
(This is not obvious, but can be proved.)

\item The ring%
\[
\mathbb{Z}\left[  \sqrt{14}\right]  =\left\{  a+b\sqrt{14}\ \mid
\ a,b\in\mathbb{Z}\right\}
\]
is Euclidean, but the map $a+b\sqrt{14}\rightarrow\left\vert a^{2}%
-14b^{2}\right\vert $ is \textbf{not} a Euclidean norm. An actual Euclidean
norm for this ring is notoriously hard to construct.

\item The ring $\mathbb{Z}\left[  \sqrt{5}\right]  =\left\{  a+b\sqrt{5}%
\ \mid\ a,b\in\mathbb{Z}\right\}  $ is \textbf{not} Euclidean.

\item For each $n\in\mathbb{Z}$, the quotient ring $\mathbb{Z}/n$ is
Euclidean. More generally, if $R$ is a Euclidean ring, then any quotient ring
$R/I$ of $R$ is Euclidean.
\end{itemize}

We can now generalize Proposition \ref{prop.eucldom.Z-PID}:

\begin{proposition}
\label{prop.eucldom.PID}Let $R$ be a Euclidean ring. Then, any ideal of $R$ is principal.
\end{proposition}

\begin{proof}
The proof of Proposition \ref{prop.eucldom.Z-PID} can be easily adapted. Most
importantly, instead of taking the smallest positive element of $I$, we take a
nonzero element $b$ of $I$ that has the smallest possible $N\left(  b\right)
$ (where $N$ is a Euclidean norm on $R$).
\end{proof}

Again, this is not a constructive proof. However, there is an analogue of the
Euclidean algorithm in any Euclidean ring. Thus, if $a$ and $b$ are two
elements of a Euclidean ring $R$, then you can algorithmically find an element
$c\in R$ such that $aR+bR=cR$ (and you can even find elements $x,y\in R$ such
that $xa+yb=c$). See \S 2.13.3 in the text for the algorithm that finds this
$c$ (and these $x$ and $y$). This $c$ is a generalization of the greatest
common divisor of two integers. More on that next time.

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[vanDal05]{vanDal05}Birgit van Dalen, \textit{Lenstra's wonderlijke
kaartspel: Een generalisatie van de Chinese Reststelling voor
niet-commutatieve ringen}, bachelor thesis, 9 May 2005.\newline\url{https://www.universiteitleiden.nl/binaries/content/assets/science/mi/scripties/dalenbachelor.pdf}

\bibitem[vanDal06]{vanDal06}%
\href{https://www.nieuwarchief.nl/serie5/pdf/naw5-2006-07-1-052.pdf}{Birgit
van Dalen, \textit{Card games with ideals}, Nieuw Archief voor Wiskunde
\textbf{5/7} (2006), pp. 52--56.}
\end{thebibliography}


\end{document}