\documentclass[11pt]{article}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{xcolor}

%\usepackage{systeme}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}


\theoremstyle{definition}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{eg}[thm]{Example}
\newtheorem{ex}[thm]{Exercise}
\newtheorem{defn}[thm]{Definition}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{remark}[thm]{Remark}
\newtheorem{question}[thm]{Question}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\usepackage{tikz-cd}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{miniball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=0.5pt]
\tikzstyle{mminiball} = [circle,shading=ball, ball color=black,
    minimum size=0.6mm,inner sep=0.1pt]
\usetikzlibrary{arrows.meta}
\tikzset{>={Latex[length=2mm,width=1.5mm]}}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\usetikzlibrary{decorations.pathmorphing}    
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{arrows.meta,calc}
\usetikzlibrary{bending}
\usetikzlibrary{decorations.markings,shapes.geometric}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\tikzset{-|-/.style={decoration={markings, mark=at position #1 with
  {\arrow{stealth}}},postaction={decorate}}}
\tikzset{movearrow/.style 2 args ={
        decoration={markings,
	  mark= at position {#1} with {\arrow{#2}} ,
        },
        postaction={decorate}
    }
}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
%\setlist[enumerate]{leftmargin=*}
\setlist[enumerate]{itemsep=1pt}

%\allowdisplaybreaks

\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

%\usepackage{algorithm}
%\usepackage[noend]{algpseudocode}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\W}{\mathbb{W}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\newcommand{\incid}{\mathcal{I}(P)}
\newcommand{\tL}{\widetilde{L}}
\newcommand{\tV}{\widetilde{V}}
\newcommand{\F}{\mathcal{F}}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\wt}{\mathrm{wt}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}
\DeclareMathOperator{\Div}{\mathrm{Div}}
\DeclareMathOperator{\Pic}{\mathrm{Pic}}
\DeclareMathOperator{\Jac}{\mathrm{Jac}}
\DeclareMathOperator{\cok}{\mathrm{cok}}
\DeclareMathOperator{\sgn}{\mathrm{sgn}}
\DeclareMathOperator{\outdeg}{\mathrm{outdeg}}
\DeclareMathOperator{\supp}{\mathrm{supp}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 361 lecture for Friday, Week 6}
\bigskip

\centerline{Operations on ideals}
\bigskip

Our next big goal: let~$\mathfrak{O}_{K}$ be the ring of integers in a number
field.  We have seen in homework that elements of $\mathfrak{O}_{K}$ do not
necessarily have uniquely factor into primes.  However, it turns that ideals in
$\mathfrak{O}_{K}$ uniquely factor into prime ideals (which we define below).
Thus, for instance, if $\alpha\in \mathfrak{O}_{K}$ does not factor into primes,
its corresponding principal ideal~$(\alpha)$ will.
\bigskip

Let $R$ be a ring (commutative, with~$1$).  Recall that a nonempty subset~$I\subseteq R$ is
an \emph{ideal} if it is closed under addition ($a,b\in I\Rightarrow a+b\in I$) and
``inside-out'' multiplication ($r\in R, a\in I\Rightarrow ra\in I$).
Equivalently,~$I$ is an $R$-submodule of~$R$. 

An ideal~$I$ is \emph{finitely generated} if it is finitely generated as
an~$R$-module.  This means that there exist~$a_{1},\ldots,a_{k}\in R$
for some~$k$ such that
\[
  I=(a_{1},\ldots,a_{k}):=\{\textstyle \sum_{i=1}^{k} r_{i}a_{i}:
  r_{1},\ldots,r_{k}\in R\}.
\]


\begin{defn}
  The \emph{sum} and \emph{product} of ideals~$I$ and~$J$ of~$R$ are defined as
  follows:
  \begin{align*}
    I+J &= \{a+b: a\in I \text{ and } b\in J\},\\
    IJ&=\{\textstyle\sum_{i=1}^{k} a_i b_{i}: k\in\Z_{>0}, a_{i}\in I, b_{i}\in J \text{
    for all~$i$}\}.
  \end{align*}
\end{defn}

The proof that $I+J$ and $IJ$ are ideals and the proof of the following
proposition are left as straightforward exercises.

\begin{prop}
  Let $I,J$ and~$K$ be ideals of $R$, and let~$a,b\in R$.
  \begin{enumerate}
    \item $I(J+K)=IJ+IK$,
    \item $(IJ)K=I(JK)$,
    \item $IJ=JI$,
    \item $I(0)=(0)$,
    \item $I(1)=I$,
    \item $(a_{1},\ldots,a_{k})+(b_{1},\ldots,b_{\ell})=(a_{i}+b_{j}:1\leq i\leq
      k, 1\leq j\leq \ell)$,
    \item $(a_{1},\ldots,a_{k})(b_{1},\ldots,b_{\ell})=(a_{i}b_{j}:1\leq i\leq
      k, 1\leq j\leq \ell)$,
    \item $(a)\subseteq (b)$ if and only if $b|a$, and
    \item if $R$ is a domain, then $(a)=(b)$ if and only if $a=ub$ for some unit
      $u$.
  \end{enumerate}
\end{prop}

\begin{defn}
  Let~$P$ be an ideal of~$R$.  Then
  \begin{enumerate}
    \item $P$ is \emph{prime} if $P\neq R$ and $ab\in P$ implies $a\in P$ or
      $b\in P$, and
    \item $P$ is \emph{maximal} if $P\neq R$ and if whenever $Q$ is an ideal of~$R$ and $P\subsetneq Q$,
      then~$Q=R$. 
  \end{enumerate}
\end{defn}

\begin{prop}\ 
  \begin{enumerate}
    \item $P$ is prime if and only if for all ideals $I$ and $J$ such
      $IJ\subseteq P$, we have $I\subseteq P$ or~$J\subseteq P$.
    \item If $P$ is maximal, then $P$ is prime.
    \item $P$ is prime if and only if~$R/P$ is a domain.
    \item $P$ is maximal if and only if $R/P$ is a field.
  \end{enumerate}
\end{prop}

\begin{proof}\ 
 \begin{enumerate}
   \item Homework.
   \item Suppose that~$P$ is maximal.  Let $ab\in P$ with $a\not\in P$.  Then
     $P\subsetneq(a)+P$.  By maximality, $(a)+P=R$. So there exist $r\in R$ and
     $p\in P$ such that~$1=ra+p$.  Multiplying by~$b$, we find $b=rab+bp\in P$.
   \item ($\Rightarrow$) Suppose that~$P$ is prime and that~$\overline{a}\,
     \overline{b}=0\in R/P$ with $\overline{a}\neq 0$.  Then~$ab\in P$ and
     $a\not\in P$.  Since~$P$ is prime, $b\in P$, and hence~$\overline{b}=0\in
     R/P$.  We have shown that~$R/P$ is a domain.

     ($\Leftarrow$) Suppose that~$R/P$ is a domain and that~$ab\in P$
     with~$a\not\in P$.  It
     follows that~$\overline{ab}=\overline{a}\,\overline{b}=0\in R/P$
     and~$\overline{a}\neq 0$.
     Since~$R/P$ is a domain, $\overline{b}=0\in R/P$.  Hence, $b\in P$.  We
     have shown that~$P$ is prime.
   \item Homework.
 \end{enumerate}
\end{proof}

\begin{ex}
  In this exercise, we look at a number ring which is not a UFD.  We hint at
  uniqueness of factorization into primes can be recovered by passing from
  elements to ideals.

  Consider the number field $K=\Q(\sqrt{-5})$.  Since~$-5\neq 1\bmod 4$, the
  number ring of~$K$ is $\mathfrak{O}_{K}=\Z[\sqrt{-5}]$.  In homework, we have
  seen that
  \[
    6=2\cdot 3=(1+\sqrt{-5})(1-\sqrt{-5})
  \]
  where~$2,3,1\pm\sqrt{-5}$ are non-associated irreducibles.  (We
  say~$a,b$ is a ring  are \emph{associates} if~$a=ub$ for some unit~$u$.  Note
  that association is an equivalence relation.)  Thus, $\mathfrak{O}_{K}$ is not
  a UFD.  Further, none of~$2,3,1\pm\sqrt{-5}$ is prime.  (For instance, a
  straightforward calculation shows that although
  $(1+\sqrt{-5})$ divides $2\cdot3$, it divides neither~$2$ nor~$3$:  we
  have~$(1+\sqrt{-5})(a+b\sqrt{-5})=(a-5b)+(a+b)\sqrt{-5}\in \Z$ if and only if
  $a+b=0$.  So in this case, $(1+\sqrt{-5})(a+b\sqrt{-5})=6a$.  Then $6a=2$
  and~$6a=3$ have no integer solutions.)

  Define
  \[
    P_{1}=(2,1+\sqrt{-5}),\quad
    P_{2}=(3,1+\sqrt{-5}),\quad
    P_{3}=(3,1-\sqrt{-5}).
  \]
  We claim these ideals are all primes.  We will have better methods of proving
  this later, but for now, let's show that~$P_{1}$ is prime by showing that
  $\Z[\sqrt{-5}]/P_{1}$ is isomorphic to the field~$\Z/2\Z$.  That implies
  that~$P_{1}$ is maximal, hence prime.  First note that for~$a,b\in \Z$,
  working modulo $P_{1}$,
  \[
    a+b\sqrt{-5} = (a+b\sqrt{-5})-b(1+\sqrt{-5})=a-b\bmod P_{1}.
  \]
  since~$1+\sqrt{-5}\in P_{1}$.  Further, since~$2\in P_{1}$, we can take the
  value of $a-b$ modulo~$2$.
  
  Define
  \begin{align*}
    \phi\colon \Z[\sqrt{-5}]&\to \Z/2\Z\\
    a+b\sqrt{-5}&\mapsto \overline{a-b}
  \end{align*}
  We claim that~$\phi$ is a well-defined isomorphism of rings.  To show it is
  well-defined, we must show that~$\phi(p)=\overline{0}$ for all elements $p\in P_{1}$.  It
  suffices to show that the generators $P_{1}$ are sent to~$\overline{0}\in \Z/2\Z$.
  First, we have~$\phi(2)=\overline{2}=\overline{0}$.  Next, we
  have~$\phi(1+\sqrt{-5})=\overline{1}-\overline{1}=\overline{0}$.

  We now show that~$\phi$ preserves sums and products.  Let~$a,b,c,d\in \Z$.
  Then
  \begin{align*}
    \phi((a+b\sqrt{-5})+(c+d\sqrt{-5}))
    &= \phi((a+c)+(b+d)\sqrt{-5})\\
    &=\overline{a+c}-\overline{b+d}\\
    &=\overline{a-b}-\overline{c-d}\\
    &=\phi(a+b\sqrt{-5})+\phi(c+d\sqrt{-5}),
  \end{align*}
  and, recalling that $\overline{1}=-\overline{1}$ in $\Z/2\Z$,
  \begin{align*}
    \phi((a+b\sqrt{-5})(c+d\sqrt{-5}))
    &=\phi((ac-5bd)+(ad+bc)\sqrt{-5})\\
    &=\overline{ac-5bd}\,-\,\overline{ad+bc}\\
    &=\overline{ac}+\overline{bd}+\overline{ad}+\overline{bc}
  \end{align*}
  whereas
  \begin{align*}
    \phi(a+b\sqrt{-5})\phi(c+d\sqrt{-5})
    &=(\overline{a-b})(\overline{c-d})\\
    &=\overline{ac}+\overline{bd}+\overline{ad}+\overline{bc}.
  \end{align*}.
  Since~$\phi(0)=\overline{0}$ and~$\phi(1)=\overline{1}$, we see that~$\phi$ is
  surjective.  To show injectivity, suppose
  that~$\phi(a+b\sqrt{-5})=\overline{a-b}\bmod 2$.  So $a=b+2k$ for some~$k\in
  \Z$.  We must show that~$a+b\sqrt{-5}\in P_{1}$.  We have
  \[
    a+b\sqrt{-5}=(b+2k)+b\sqrt{-5}=2k+b(1+\sqrt{-5})\in P_{1}=(2,1+\sqrt{-5}).
  \]
  
  We now want to consider factoring the principal ideal~$(6)$
  in~$\mathfrak{O}_{K}$.  We leave it to reader to check the following
  calculations:
  \[
    P_{1}^{2}=(2),\quad P_{2}P_{3}=(3),\quad P_{1}P_{2}=(1+\sqrt{-5}),\quad
    P_{1}P_{3}=(1-\sqrt{-5}).
  \]
  We may factor~$(6)$ into prime ideals as
  \[
    (6)=(2)(3)=(P_{1})^{2}(P_{2}P_{3})=P_{1}^{2}P_{2}P_{3}.
  \]
  or
  \[
   (6)=(1+\sqrt{-5})(1-\sqrt{-5})=(P_{1}P_{2})(P_{1}P_{3})=P_{1}^{2}P_{2}P_{3}. 
  \]
  
  To recap: $2,3,1\pm\sqrt{-5}$ are irreducible but not prime in
  $\mathfrak{O}_{K}$. Their corresponding principal ideals factor into prime
  ideals, and when we do that, we get two corresponding factorizations of~$(6)$
  into prime ideals.  These two factorizations are, in fact, the same!  This
  example illustrates the general phenomenon of unique factorization of ideals
  into primes in a number field.
\end{ex}
\end{document}
