
%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass{article}
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,amssymb} % Math packages
\usepackage{mathrsfs}    % More math packages
\usepackage{sectsty}  % Allows customizing section commands
\allsectionsfont{\centering \normalfont\scshape} % Make all section titles centered, the default font and small caps %remove this to left align section tites
\usepackage{hyperref} % Turns cross-references into hyperlinks,
                      % and defines \url and \href commands.
\usepackage{graphicx} % For embedding graphics files.
\usepackage{framed}   % For the "leftbar" environment used below.
\usepackage{ifthen}   % Used for the \powset command below.
\usepackage{lastpage} % for counting the number of pages
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[height=10in,a4paper,hmargin={1in,0.8in}]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[all]{xy}  % Package for commutative diagrams.
\usepackage{tikz}     % This is a powerful tool to draw vector
                      % graphics inside LaTeX. In particular, you can
                      % use it to draw commutative diagrams.
\usepackage{verbatim} % For the "verbatim" environment, in which
                      % special symbols can be used freely without
                      % confusing the compiler. (And it's typeset in
                      % a constant-width font.)
                      % Useful, e.g., for quoting code (or ASCII art).
\usepackage{changepage}

\usetikzlibrary{lindenmayersystems} % This is for drawing Sierpinski triangles.

%\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{20pt} % Makes indentation for paragraphs longer.
                           % This makes paragraphs stand out more.

%----------------------------------------------------------------------------------------
%	VARIOUS USEFUL COMMANDS
%----------------------------------------------------------------------------------------
% The commands below might be convenient. For example, you probably
% prefer to write $\powset[2]{V}$ for the set of $2$-element subsets
% of $V$, rather than writing $\mathcal{P}_2(V)$.
% Notice that you can easily define your own commands like this.
% Caveat: Some of these commands need to be properly "guarded" when
% they occur in subscripts or superscripts. So you should not write
% $K_\CC$, but rather $K_{\CC}$.
\newcommand{\CC}{\mathbb{C}} % complex numbers
\newcommand{\RR}{\mathbb{R}} % real numbers
\newcommand{\QQ}{\mathbb{Q}} % rational numbers
\newcommand{\NN}{\mathbb{N}} % nonnegative integers
\newcommand{\calF}{\mathcal{F}}
\newcommand{\Z}[1]{\mathbb{Z}/#1\mathbb{Z}} % integers modulo k
                                            % (syntax: "\Z{k}")
\newcommand{\ZZ}{\mathbb{Z}} % integers
\newcommand{\id}{\operatorname{id}} % identity map
\newcommand{\lcm}{\operatorname{lcm}}
% Lowest common multiple. For historical reasons, LaTeX has a \gcd
% command built in, but not an \lcm command. The preceding line
% rectifies that.
\newcommand{\diag}{\operatorname{diag}} % diagonal matrix
\newcommand{\ord}{\operatorname{ord}} % order of a group element
\newcommand{\rank}{\operatorname{rank}} % rank of a matrix
\newcommand{\Hom}{\operatorname{Hom}} % group of homomorphisms
\newcommand{\End}{\operatorname{End}} % ring of endomorphisms
\newcommand{\Iso}{\operatorname{Iso}} % set of isomorphisms
\newcommand{\GL}{\operatorname{GL}} % general linear group
\newcommand{\SL}{\operatorname{SL}} % special linear group
\newcommand{\Nil}{\operatorname{Nil}} % nilradical
\newcommand{\Jac}{\operatorname{Jac}} % Jacobson radical
\newcommand{\Tor}{\operatorname{Tor}} % torsion submodule or Tor functor
\newcommand{\Ext}{\operatorname{Ext}} % Ext functor
\newcommand{\Ker}{\operatorname{Ker}} % kernel
\newcommand{\Coker}{\operatorname{Coker}} % cokernel
\newcommand{\op}{\operatorname{op}} % opposite ring
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
% $\powset[k]{S}$ stands for the set of all $k$-element subsets of
% $S$. The argument $k$ is optional, and if not provided, the result
% is the whole powerset of $S$.
\newcommand{\set}[1]{\left\{ #1 \right\}}
% $\set{...}$ compiles to {...} (set-brackets).
\newcommand{\abs}[1]{\left| #1 \right|}
% $\abs{...}$ compiles to |...| (absolute value, or size of a set).
\newcommand{\tup}[1]{\left( #1 \right)}
% $\tup{...}$ compiles to (...) (parentheses, or tuple-brackets).
\newcommand{\ive}[1]{\left[ #1 \right]}
% $\ive{...}$ compiles to [...] (Iverson bracket, aka truth value).
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
% $\floor{...}$ compiles to |_..._| (floor function).
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
% $\ceiling{...}$ compiles to |_..._| (ceiling function).
\newcommand{\tildot}{\mathbin{\widetilde{\cdot}}}
% I use \tildot for an alternative multiplication in one of the
% exercises below.
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
% $\underbrack{...1}{...2}$ yields
% $\underbrace{...1}_{\substack{...2}}$. This is useful for doing
% local rewriting transformations on mathematical expressions with
% justifications. For example, try this out:
% $ \underbrack{(a+b)^2}{= a^2 + 2ab + b^2 \\ \text{(by the binomial formula)}} $
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
\newcommand{\nnn}{\nonumber\\} % Don't number this line in an "align" environment, and move on to the next line.
\newcommand{\explain}[1]{\tup{\hspace{-0.5pc}\text{\begin{tabular}{c}#1\end{tabular}\hspace{-0.5pc}}}}
% $\explain{...}$ interprets the "..." as text (you can
% nest some math inside by putting it in $...$'s as you
% would in any other text block) and puts it in parentheses.

% Arrows for normal use:
\newcommand{\mono}{\hookrightarrow} % Monomorphism/injection.
\newcommand{\epi}{\twoheadrightarrow} % Epimorphism/surjection.
\newcommand{\iso}{\overset{\cong}{\to}} % Epimorphism/surjection.

% Arrows for xymatrix:
\newcommand{\arinj}{\ar@{_{(}->}} % Monomorphism.
\newcommand{\arinjrev}{\ar@{^{(}->}} % Monomorphism.
\newcommand{\arsurj}{\ar@{->>}} % Epimorphism.
\newcommand{\arelem}{\ar@{|->}} % Arrow to be used in describing a map on elements.
\newcommand{\arback}{\ar@{<-}} % Backward arrow.

%----------------------------------------------------------------------------------------
%	MAKING SUMMATION SIGNS ALWAYS PUT THEIR BOUNDS ABOVE AND BELOW
%	THE SIGN
%----------------------------------------------------------------------------------------
% The following are hacks to ensure that sums (such as
% $\sum_{k=1}^n k$) always put their bounds (i.e., the $k=1$ and the
% $n$) underneath and above the sign, as opposed to on its right.
% Same for products (\prod), set unions (\bigcup) and set
% intersections (\bigcap). Remove the 8 lines below if you do not want
% this behavior.
\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}

%----------------------------------------------------------------------------------------
%	ENVIRONMENTS
%----------------------------------------------------------------------------------------
% The incantations below define how theorem environments
% (\begin{theorem} ... \end{theorem}) and their likes will look like.
\newtheoremstyle{plainsl}% <name>
  {8pt plus 2pt minus 4pt}% <Space above>
  {8pt plus 2pt minus 4pt}% <Space below>
  {\slshape}% <Body font>
  {0pt}% <Indent amount>
  {\bfseries}% <Theorem head font>
  {.}% <Punctuation after theorem head>
  {5pt plus 1pt minus 1pt}% <Space after theorem headi>
  {}% <Theorem head spec (can be left empty, meaning `normal')>

% Environments which make the text inside them slanted:
\theoremstyle{plainsl}
  \newtheorem{theorem}{Theorem}[section]
  \newtheorem{proposition}[theorem]{Proposition}
  \newtheorem{lemma}[theorem]{Lemma}
  \newtheorem{corollary}[theorem]{Corollary}
  \newtheorem{conjecture}[theorem]{Conjecture}
% Environments that don't:
\theoremstyle{definition}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{example}[theorem]{Example}
  \newtheorem{exercise}[theorem]{Exercise}
  \newtheorem{examples}[theorem]{Examples}
  \newtheorem{algorithm}[theorem]{Algorithm}
  \newtheorem{question}[theorem]{Question}
 \theoremstyle{remark}
  \newtheorem{remark}[theorem]{Remark}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}

%----------------------------------------------------------------------------------------
%	METADATA
%----------------------------------------------------------------------------------------
\newcommand{\myname}{student work} % ENTER YOUR NAME HERE
\newcommand{\mymail}{} % ENTER YOUR EMAIL HERE
\newcommand{\psetnumber}{2} % ENTER THE NUMBER OF THIS PSET HERE

%----------------------------------------------------------------------------------------
%	HEADER AND FOOTER
%----------------------------------------------------------------------------------------
\ihead{Solutions to homework set \#\psetnumber} % Page header left
\ohead{page \thepage\ of \pageref{LastPage}} % Page header right
\ifoot{\myname} % left footer
\ofoot{\mymail} % right footer

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------
\begin{document}

\normalfont \normalsize 
\textsc{Drexel University, Department of Mathematics} \\ [5pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\large Math 533: Abstract Algebra I \hfill
Winter 2021:
Homework \psetnumber% The assignment title
\hfill \myname
\normalsize
\allowdisplaybreaks


%----------------------------------------------------------------------------------------
%	EXERCISE 1
%----------------------------------------------------------------------------------------
\horrule{0.3pt} 

\section*{Exercise 1}

Let $R$ be a ring.
Let $a$ be a nilpotent element of $R$.
(Recall that ``nilpotent'' means that there exists some
$n \in \NN$ such that $a^n = 0$.)

\begin{itemize}

%Part a
\item[\textbf{(a)}]
Prove that $1 - a \in R$ is a unit.

{\color{blue!60!black} \textbf{Solution.}
Let $a$ be a nilpotent element of $R$ and let $n \in \NN$ be such that $a^n=0$. Set $s=1+a+a^2+a^3+\cdots+a^{n-1}\in R$.
% since $1,a\in R$ and a ring is closed under addition and multiplication.
Then,
\begin{align*}
	(1-a)s&=(1-a)(1+a+a^2+a^3+\cdots+a^{n-1})\\
		&=1(1+a+a^2+a^3+\cdots+a^{n-1})+(-a)(1+a+a^2+a^3+\cdots+a^{n-1})\\
		&=1+a+a^2+a^3+\cdots+a^{n-1}-a-a^2-a^3-\cdots-a^{n-1}-a^n\\
		&=1+a-a+a^2-a^2+a^3-a^3+\cdots+a^{n-1}-a^{n-1}-a^n\\
		&=1+0+0+\cdots+0-a^n\\
		&=1-a^n\\
		&=1-0\qquad \tup{\text{by assumption since $a^n=0$}}\\
		&=1.
\end{align*}
Similarly,
\begin{align*}
	s(1-a)&=(1+a+a^2+a^3+\cdots+a^{n-1})(1-a)\\
		&=(1+a+a^2+a^3+\cdots+a^{n-1})1+(1+a+a^2+a^3+\cdots+a^{n-1})(-a)\\
		&=1+a+a^2+a^3+\cdots+a^{n-1}-a-a^2-a^3-\cdots-a^{n-1}-a^n\\
		&=1+a-a+a^2-a^2+a^3-a^3+\cdots+a^{n-1}-a^{n-1}-a^n\\
		&=1+0+0+\cdots+0-a^n\\
		&=1-a^n\\
		&=1-0\qquad \tup{\text{by assumption since $a^n=0$}}\\
		&=1.
\end{align*}
Hence $s\in R$ is a multiplicative inverse for $1-a$. Thus $1-a\in R$ is a unit.
}

%Part b
\item[\textbf{(b)}]
Let $u \in R$ be a unit satisfying $ua = au$.
Prove that $u - a \in R$ is a unit.

{\color{blue!60!black} \textbf{Solution.}
Let $a$ be a nilpotent element of $R$ and $n \in \NN$ be such that $a^n=0$.  Let $u \in R$ be a unit satisfying $ua = au$.  Then $u^{-1}\in R$. Also, $a$ commutes with $u^{-1}$ (indeed,
$ua=au\implies u^{-1}uau^{-1}=u^{-1}auu^{-1}\implies au^{-1}=u^{-1}a$).
Hence, $a$ commutes with $u^{-k}$ for any $k \in \NN$.
Also, $u$ commutes with $a^k$ for any $k \in \NN$ (since $au = ua$).

Define $t=u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n}\in R$.
% since $a,u^{-1}\in R$ and a ring is closed under addition and multiplication.
Then,
\begin{align*}
	(u-a)t&=(u-a)(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})\\
		&=u(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})\\
		&\qquad\qquad+(-a)(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})\\
		&=1+au^{-1}+a^2u^{-2}+\cdots+a^{n-2}u^{-n+2}+a^{n-1}u^{-n+1}\\
		&\qquad\qquad-au^{-1}-a^2u^{-2}-a^3u^{-3}-\cdots-a^{n-1}u^{-n+1}-a^nu^{-n}\\
		&\qquad\qquad\qquad\tup{\text{because $u$ commutes with $a^k$ for any $k \in \NN$}}\\
		&=1+0+0+0+\cdots+0-a^nu^{-n}\\
		&=1-0u^{-n}\qquad\tup{\text{since by assumption $a^n=0$}}\\
		&=1-0\\
		&=1.
\end{align*}
Similarly,
\begin{align*}
	t(u-a)&=(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})(u-a)\\
		&=(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})u\\
		&\qquad\qquad+(u^{-1}+au^{-2}+a^2u^{-3}+\cdots+a^{n-2}u^{-n+1}+a^{n-1}u^{-n})(-a)\\
		&=1+au^{-1}+a^2u^{-2}+\cdots+a^{n-2}u^{-n+2}+a^{n-1}u^{-n+1}\\
		&\qquad\qquad-au^{-1}-a^2u^{-2}-a^3u^{-3}-\cdots-a^{n-1}u^{-n+1}-a^nu^{-n}\\
		&\qquad\qquad\qquad\tup{\text{because $a$ commutes with $u^{-k}$ for any $k \in \NN$}}\\
		&=1+0+0+0+\cdots+0-a^nu^{-n}\\
		&=1-0u^{-n}\qquad\tup{\text{since by assumption $a^n=0$}}\\
		&=1-0\\
		&=1.
\end{align*}
Hence $t\in R$ is a multiplicative inverse for $u-a$. Thus $u-a\in R$ is a unit.
}

\end{itemize}


%----------------------------------------------------------------------------------------
%	EXERCISE 2
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 2}


Let $R$ be a ring.
We define a new binary operation $\tildot$ on $R$ by setting
\[
a \tildot b = ba \qquad \text{for all } a, b \in R .
\]
(Thus, $\tildot$ is the multiplication of $R$, but with the
arguments switched.)

\begin{enumerate}

%Part a
\item[\textbf{(a)}] Prove that the set $R$, equipped with the
addition $+$, the multiplication $\tildot$, the zero $0_R$
and the unity $1_R$, is a ring.

{\color{blue!60!black} \textbf{Solution.}
\underline{Addition:} As the addition is the same as the original ring $(R,+,\cdot)$ and so are the elements, clearly $(R,+,0_R)$ is still an abelian group.\\[5pt]
\underline{Multiplication:} The neutral element $1_R$ is inherited from the original ring; it remains neutral for the new multiplication $\tildot$, since it commuted with all elements of $R$. \\[5pt]
	%\begin{adjustwidth}{2em}{0em}
    \noindent
	\underline{Associativity:}
	For any $a,b,c\in R$, we have
			\begin{align*}
				a\tildot(b\tildot c)&= a\tildot (cb)\\
							&=(cb)a\\
							&=c(ba)\qquad\tup{\text{by associativity of the original multiplication}}\\
							&=c(a\tildot b)\\
							&=(a\tildot b)\tildot c .
			\end{align*}
    Thus the new multiplication $\tildot$ is associative.
	%\end{adjustwidth}
\underline{Distributivity:}
	For any $a,b,c\in R$, we have
	\begin{align*}
		(a+b)\tildot c&= c(a+b)\\	
				&=ca+cb\qquad\tup{\text{by distributivity in the original ring}}\\
				&=a\tildot c+ b\tildot c .
	\end{align*}
	The other direction is analogous.
    Thus, the new multiplication $\tildot$ satisfies distributivity.
\\[5pt]
\underline{Multiplication by $0$:}
We don't strictly need to check the $0_R \tildot a = a \tildot 0_R = 0_R$
axiom, but of course we can (it follows from the corresponding
axiom in the original ring).
    \\[10pt]
Altogether, $(R, +, \tildot)$ is a ring.
}

\end{enumerate}

\noindent This new ring is called the \textit{opposite ring} of $R$,
and is denoted by $R^{\op}$.  
Note that the \textbf{sets} $R$ and $R^{\op}$ are identical
(so a map from $R$ to $R$ is the same as a map from
$R$ to $R^{\op}$);
but the \textbf{rings} $R$ and $R^{\op}$ are generally
not the same
(so a ring morphism from $R$ to $R$ is not the same as a
ring morphism from $R$ to $R^{\op}$).

\begin{enumerate}

%Part b
\item[\textbf{(b)}] Prove that the identity map
$\id : R \to R$ is a ring isomorphism from $R$ to
$R^{\op}$ if and only if $R$ is commutative.

{\color{blue!60!black} \textbf{Solution.}
(I) Suppose $R$ is commutative. We shall show $\id : R \to R$ is a ring isomorphism from $R$ to $R^{\op}$. For any $a,b\in R$ we have
\begin{adjustwidth}{2em}{0em}
	\underline{Addition:} $\id(a+b)=a+b=\id(a)+\id(b)$.\\[5pt]
	\underline{Zero:} $\id(0_R) = 0_R=0_{R^{\op}}$.\\[5pt]
	\underline{Multiplication:} $\id(ab)=ab=ba=a\tildot b=\id(a)\tildot\id(b)$ since $R$ is commutative.\\[5pt]
	\underline{Unity:} $\id(1_R) = 1_R=1_{R^{\op}}$.\\[5pt]
	\underline{Invertibility:} The identity map is clearly one-to-one and onto; thus invertible.\\[10pt]
	Altogether, the identity map is a ring isomorphism from $R$ to $R^{\op}$.\\
\end{adjustwidth}
%
(II) Suppose $\id : R \to R$ is a ring isomorphism from $R$ to $R^{\op}.$ Then, for all elements $a,b\in R$, we have $\id(ab)=\id(a)\tildot \id(b)$. Thus
$$ab=a\tildot b=ba.$$
Hence $R$ is commutative.\\[10pt]
%
(I) and (II) together show the identity map
$\id : R \to R$ is a ring isomorphism from $R$ to
$R^{\op}$ if and only if $R$ is commutative.
}

%Part c
\item[\textbf{(c)}] Now, assume that $R$ is the matrix ring
$S^{n \times n}$ for some commutative ring $S$ and some
$n \in \NN$.
Prove that the map
\[
R \to R^{\op}, \qquad A \mapsto A^T
\]
(where $A^T$, as usual, denotes the transpose of a matrix $A$)
is a ring isomorphism.

{\color{blue!60!black} \textbf{Solution.}
Define $f: R\to R^{\op}$ by $f(A)=A^T$. We shall show this is a ring isomorphism. (Note I use 0 to represent the 0 matrix and $I$ to represent the identity matrix; these two matrices are the additive and multiplicative identities, respectively, for both rings.)  For any $A,B\in R$, we have\\[5pt]
\underline{Addition:} 
	$f(A+B)=(A+B)^T=A^T+B^T=f(A)+f(B)$.\\[5pt]
	\underline{Zero:} $f(0)=0^T=0$. \\[5pt]
	\underline{Multiplication:} 
		\begin{align*}
			f(AB)&=(AB)^T\\
				&=B^TA^T\qquad \tup{\text{a classical property of transposes, which relies on the commutativity of $S$}}\\
				&=A^T\tildot B^T=f(A)\tildot f(B) .
		\end{align*}
	\underline{Unity:} $f(I)=I^T=I$. \\[5pt]
	\underline{Invertibility:} The map $f$ is its own inverse. (This follows from the fact that $(A^T)^T=A$ for any matrix $A$.) \\[10pt]
Altogether, we have that $f$ is a ring isomorphism.
}

%Part d
\item[\textbf{(d)}] Forget about $S$, and let $R$ be an arbitrary
ring again.
Let $M$ be a right $R$-module.
Prove that $M$ becomes a left $R^{\op}$-module if we define
an action of $R^{\op}$ on $M$ by
\[
rm = mr \qquad \text{ for all $r \in R^{\op}$ and $m \in M$}.
\]
(Here, the left hand side is to be understood as the image
of $\tup{r, m}$ under the new action of $R^{\op}$ on $M$,
whereas the right hand side is the image of $\tup{m, r}$
under the original action of $R$ on $M$.)

{\color{blue!60!black} \textbf{Solution.}
Since $M$ is a right $R$-module, we must already have that $(M,+,0_M)$ is an abelian group.\\[5pt]
Next, for any $r,s\in R$ (thus also all $r,s\in R^{\op}$) and $m,n\in M$, we have\\[3pt]
\underline{Right Distributivity:} 
	$(r+s)m=m(r+s)=mr+ms=rm+sm$ by left distributivity in the right $R$-module $M$.\\[5pt]
\underline{Left Distributivity:} 
	$r(m+n)=(m+n)r=mr+nr=rm+rn$ by right distributivity in the right $R$-module $M$.\\[5pt]
\underline{Associativity:}
	\begin{align*}
		(r\tildot s)m&=(sr)m\qquad \tup{\text{by definition of $\tildot$}}\\
				&=m(sr)\\
				&=(ms)r\qquad \tup{\text{by associativity in the right $R$-module $M$}}\\
				&=(sm)r\\
				&=r(sm) .
	\end{align*}
The facts that $0_Rm=0_M$, $r0_M=0_M$, and $1m=m$ follow from $M$ being a right $R$-module.\\[10pt]
Altogether, we have that $M$ is a left $R^{\op}$-module.			
}

\end{enumerate}



%----------------------------------------------------------------------------------------
%	EXERCISE 3
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 3}

Let $R$ be an integral domain.
Let $a \in R$ and $b \in R$.
Assume that $a$ and $b$ have an lcm $\ell \in R$.
Prove that $a$ and $b$ have a gcd $g \in R$,
which furthermore satisfies $g\ell = ab$.\\[10pt]
%
{\color{blue!60!black} \textbf{Solution.}
The ring $R$ is an integral domain; thus, it is commutative and has no zero divisors.
\\[5pt]
\underline{Trivial Case:} 
If $a = 0$, then $\ell$, being a multiple of $a$, is also $0$.  Thus, in this case, $b$ is a gcd of $a$ and $b$ and satisfies $b\ell = ab$ (since $\ell = 0 = a$).  This solves the problem in the case when $a = 0$.  Similarly we can solve the problem if $b = 0$.
\\[10pt]
%
Now assume $a$ and $b$ are nonzero.  Thus, $ab \neq 0$ (since $R$ is an integral domain).
There exist $m_1,m_2\in R$ such that 
$$am_1=\ell\qquad\text{and}\qquad bm_2=\ell$$  
(since $\ell$ is a common multiple of $a$ and $b$).
Next, note that $ab$ is a common multiple of $a$ and $b$. Since $\ell$ is an lcm of $a$ and $b$, we thus conclude that there exists an element $g\in R$ such that $\ell g=ab$. We want to show that this element $g$ is a gcd of $a$ and $b$.  \\[5pt]
Note that $\ell g = ab \neq 0$, so that $\ell \neq 0$. \\[5pt]
\underline{Step 1:} Show that $g$ is a common divisor of $a$ and $b$.\\[5pt]
	We have $\ell g=ab$ and $am_1=\ell$. This gives
	\begin{align*}
		am_1g&=ab;\\
		am_1g-ab&=0;\\
		a(m_1g-b)&=0;\\
		m_1g-b&=0\qquad\tup{\text{since $R$ has no zero divisors and $a\ne0$}};\\
		m_1g&=b .
	\end{align*}
	Hence $g\mid b$.\\[5pt]
	Similarly, we have $\ell g=ab$ and $bm_2=\ell$. This gives
	\begin{align*}
		bm_2g&=ab;\\
		bm_2g-ab&=0;\\
		b(m_2g-a)&=0\qquad\tup{\text{since $R$ is commutative}};\\
		m_2g-a&=0\qquad\tup{\text{since $R$ has no zero divisors and $b\ne0$}};\\
		m_2g&=a .
	\end{align*}
	Hence $g\mid a$.  Thus together, $g$ is a common divisor of $a$ and $b$.\\[10pt]
%
\underline{Step 2:} Show that every common divisor of $a$ and $b$ divides $g$.\\[5pt]
Let $d$ be a common divisor of $a$ and $b$. Thus for some $n_1,n_2\in R$, we have
$$dn_1=a\qquad\text{and}\qquad dn_2=b.$$
Then,
$dn_1n_2$ is a common multiple of $a$ and $b$ (indeed, it equals $an_2$ and $n_1b$ by commutativity of the ring $R$). Since $\ell$ is an lcm of $a$ and $b$, we thus conclude that there exists $k\in R$ such that $\ell k=dn_1n_2$.  Next, from $dn_1 = a$ and $dn_2 = b$, we obtain $(dn_1) (dn_2) = ab = \ell g$. However, since $R$ is commutative, we have $(dn_1) (dn_2) = d (dn_1n_2) = d\ell k$ (because $dn_1n_2 = \ell k$). Comparing these two equalities, we find
\begin{align*}
	d\ell k&=\ell g;\\
	d\ell k-\ell g&=0;\\
	\ell(dk-g)&=0\qquad\tup{\text{since $R$ is commutative}};\\
	dk-g&=0\qquad\tup{\text{since $R$ has no zero divisors and $\ell\ne0$}};\\
	dk&=g .
\end{align*}
Hence $d$ divides $g$. Since $d$ was an arbitrary common divisor of $a$ and $b$, every common divisor of $a$ and $b$ divides $g$.\\[10pt]
%
Steps 1 and 2 together show that $g$ is a gcd of $a$ and $b$. Furthermore, it satisfies $g\ell =ab$.
}


%----------------------------------------------------------------------------------------
%	EXERCISE 4
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 4}

Let $p$ be a prime number.

\begin{itemize}

%Part a
\item[\textbf{(a)}]
Prove that if $a$ and $b$ are two integers such that
$a^2 \equiv b^2 \mod p^2$, then $a \equiv b \mod p^2$
or $a \equiv -b \mod p^2$
or $a \equiv b \equiv 0 \mod p$.

{\color{blue!60!black} \textbf{Solution (sketched).}
First assume $p\ne 2$.  Suppose $a$ and $b$ are two integers such that
$a^2 \equiv b^2 \mod p^2$. This gives that $p^2 \mid (a^2-b^2)$. Then since $a^2-b^2=(a+b)(a-b)$ and $p$ is prime, we have three options:\footnote{\textit{Remark by Darij:} Make sure you understand why! (Hint: Any integer not divisible by $p$ is coprime to $p$ and thus also coprime to $p^2$.)}
\begin{adjustwidth}{2em}{0em}
	\underline{Option 1:} $p^2 \mid (a+b)$. Thus $a\equiv -b\mod p^2$.\\[5pt]
	\underline{Option 2:} $p^2 \mid (a-b)$. Thus $a\equiv b\mod p^2$.\\[5pt]
	\underline{Option 3:} $p\mid (a-b)$ and $p\mid (a+b)$. Then, there exist integers $n_1$ and $n_2$ such that
	$$a-b=pn_1\qquad\text{and}\qquad a+b=pn_2.$$
	Adding these equalities, we get $2a=p(n_1+n_2)$.  Since $2$ divides the left-hand side, it must divide the right-hand side.  Since $p$ is odd, we thus find $2\mid (n_1+n_2)$, so that $m=\dfrac{n_1+n_2}{2}\in\ZZ$. Hence $a=pm$ for an integer $m$, so $a\equiv 0\mod p$. Then, since $p\mid (a-b)\implies a\equiv b \mod p$, we also get $b\equiv 0\mod p$. Altogether we have
	$$a\equiv b\equiv 0\mod p.$$
\end{adjustwidth}
Hence we have shown that one of the following must hold: 
$$ (1)\ a \equiv b \mod p^2\qquad\text{or}\qquad
	(2)\ a \equiv -b \mod p^2\qquad\text{or}\qquad
	(3)\ a \equiv b \equiv 0 \mod p.$$
%
Now let's prove this in the $p=2$ case.  Suppose $a$ and $b$ are two integers such that $a^2\equiv b^2 \mod 4$.  If $a$ is even, then $b$ must also be even. In this case $a\equiv b\equiv 0\mod 2$.  Else, $a$ is odd, in which case $b$ is also odd. Every odd number is one less or one more than a multiple of four.  Thus we have four cases:
\begin{adjustwidth}{2em}{0em}
	\underline{Case 1:} $a=4k+1$ and $b=4l+1$ for some $k,l\in\ZZ$.\\[3pt]
	\underline{Case 2:} $a=4k-1$ and $b=4l-1$ for some $k,l\in\ZZ$.\\[3pt]
	\underline{Case 3:} $a=4k+1$ and $b=4l-1$ for some $k,l\in\ZZ$.\\[3pt]
	\underline{Case 4:} $a=4k-1$ and $b=4l+1$ for some $k,l\in\ZZ$.
\end{adjustwidth}
Cases 1 and 2 give $a\equiv b\mod 4$ whereas cases 3 and 4 give $a\equiv -b \mod 4$.
Thus whenever $a^2\equiv b^2 \mod 4$, we have one of the following:
$$(1)\  a \equiv b \mod 4\qquad\text{or}\qquad
   (2)\ a \equiv -b \mod 4\qquad\text{or}\qquad
  (3)\ a \equiv b \equiv 0 \mod 2.$$
In total, we have shown the statement for all prime $p$.
}
%Part b

\item[\textbf{(b)}]
Compute the number of squares in the ring
$\ZZ / p^2$.

{\color{blue!60!black} \textbf{Solution (sketched).}
First, squaring any multiple of $p$ in $\ZZ / p^2$ will give $0$.  Thus we want to take out the multiples of $p$, of which there are $p$ (including $0$) in $\ZZ / p^2$.  This takes care of the case when $a\equiv b\equiv 0\mod p$.  Then, of the remaining elements of $\ZZ / p^2$, any two distinct elements, say $\overline{a}$ and $\overline{b}$, will give the same square if and only if $\overline{a}=\overline{-b}$ in $\ZZ/p^2$ (i.e. $a\equiv -b\mod p^2$). 
	\begin{adjustwidth}{2em}{0em}
	Why must $\overline{a}$ and $\overline{b}$ be distinct? Suppose $a\equiv -a\mod p^2$. Then, for some integer $k$, we have $a+a=p^2k$, i.e., $2a=p^2k$. Since $2$ divides the lefthand side, it must also divide the righthand side.  Since $2$ is prime, $2\mid p$ or $2\mid k$.  In either case, $2\mid pk$.  Then for $l=\frac{pk}{2}\in\ZZ$, we have $a=pl$. Thus $a\equiv0\mod p$.  But this was the first case we took care of, so we have reached a contradiction.  Hence, $\overline{a}$ and $\overline{b}$ must be distinct.
	\end{adjustwidth}
Thus the number of squares in $\ZZ / p^2$ is given by 
\begin{align*}
	\underbrace{1}_{\text{(corresponding to the square 0)}} + \underbrace{\frac{ |\ZZ/p^2|-p}{2}}_{\text{exactly two non-multiples of $p$ will give the same square}}
	&=1+\frac{p^2-p}{2}\\
	&=\frac{p^2-p+2}{2}.
\end{align*}
}
\end{itemize}
(A generalization of \textbf{(b)} is found in \cite{Zn}.)\\
\horrule{0.3pt}





%----------------------------------------------------------------------------------------
%	EXERCISE 5
%----------------------------------------------------------------------------------------
\newpage
\section*{Exercise 5}


Let $p$ be a prime number.

\begin{itemize}

%Part a
\item[\textbf{(a)}]
Prove that the only units of the ring
$\ZZ / p$ that are their own inverses
(i.e., the only $m \in \tup{\ZZ / p}^\times$
that satisfy $m^{-1} = m$) are
$\overline{1}$ and $\overline{-1}$.

{\color{blue!60!black} \textbf{Solution.}
Suppose $m\in\ZZ/p$ is its own inverse. Then $m\cdot m=\overline{1}$.  Thus we have
\begin{align*}
	m^2&=\overline{1};\\
	m^2+\overline{-1}&=\overline{0};\\
	m^2+m-m+\overline{-1}&=\overline{0};\\
	m(m+\overline{1})+\overline{-1}(m+\overline{1})&=\overline{0};\\
	(m+\overline{-1})(m+\overline{1})&=\overline{0}.
\end{align*}
Since $p$ is prime, $\ZZ/p$ is a field, so there are no zero divisors.  Thus we have either
$$m+\overline{-1}=\overline{0}\implies m=\overline{1}$$
 or 
 $$m+\overline{1}=\overline{0}\implies m=\overline{-1}.$$
Hence the only elements of $\ZZ/p$ that are their own inverses are $\overline{1}$ and $\overline{-1}$.
}

%Part b
\item[\textbf{(b)}]
Assume that $p$ is odd.
Let $u = \dfrac{p-1}{2} \in \NN$.
Prove that $u!^2 \equiv -\tup{-1}^u \mod p$.

{\color{blue!60!black} \textbf{Solution.}
Wilson's theorem (\cite{Wilson}) gives us that $(p-1)!\equiv -1\mod p$, i.e. that in $\ZZ/p$, we have 
$$\overline{1}\cdot\overline{2}\cdot\overline{3}\cdots\overline{p-2}\cdot\overline{p-1}=\overline{-1}.$$
Manipulating this (using $u+1 = p-u$), we get:
\begin{align*}
	\overline{1}\cdot\overline{2}\cdots\overline{u}\cdot\overline{p-u}\cdots\overline{p-2}\cdot\overline{p-1}&=\overline{-1} ;\\
	\overline{1}\cdot\overline{2}\cdots\overline{u}\cdot\overline{-u}\cdots\overline{-2}\cdot\overline{-1}&=\overline{-1} ;\\
	\overline{1}\cdot\overline{2}\cdots\overline{u}\cdot\overline{-1}^u\cdot\overline{u}\cdots\overline{2}\cdot\overline{1}&=\overline{-1} ;\\
	\overline{-1}^u(\overline{1}\cdot\overline{2}\cdots\overline{u})^2&=\overline{-1} ;\\
	\overline{-1}^u\cdot\overline{-1}^u
	(\overline{1}\cdot\overline{2}\cdots\overline{u})^2&=\overline{-1}^u\cdot\overline{-1} ;\\
	(\overline{1}\cdot\overline{2}\cdots\overline{u})^2&=\overline{-1}\cdot\overline{-1}^u .
\end{align*}
Thus we have shown that $(u!)^2\equiv -(-1)^u\mod p$.
}

\end{itemize}



%----------------------------------------------------------------------------------------
%	EXERCISE 6
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 6}


Recall the ring $\ZZ\ive{i}$ of Gaussian integers.
Let $N : \ZZ\ive{i} \to \NN$ be the map that sends
each Gaussian integer $z = a + bi \in \ZZ\ive{i}$
(with $a, b \in \ZZ$) to
$a^2 + b^2 = \abs{z}^2$.
(This is the Euclidean norm on $\ZZ\ive{i}$ that
we have already used several times.)

\begin{itemize}

%Part a
\item[\textbf{(a)}]
Prove that if $z$ and $w$ are two Gaussian integers
satisfying $z \mid w$ in $\ZZ\ive{i}$,
then $N\tup{z} \mid N\tup{w}$ in $\ZZ$.

{\color{blue!60!black} \textbf{Solution.}
Suppose $z=a_1+b_1i$ and $w=a_2+b_2i$ (where $a_1,a_2,b_1,b_2\in\ZZ$)
satisfy $z \mid w$.
Since we have $z\mid w$, there exists $r=c+di\in\ZZ[i]$ such that $zr=w$. Thus we have
\begin{align*}
	(a_1+b_1i)(c+di)&=a_2+b_2i;\\
	(a_1c-b_1d)+(a_1d+b_1c)i&=a_2+b_2i.
\end{align*}
Hence 
	$$a_1c-b_1d=a_2\qquad\text{and}\qquad a_1d+b_1c=b_2.$$
Thus,
\begin{align*}
	a_2^2+b_2^2&=(a_1c-b_1d)^2+(a_1d+b_1c)^2\\
				&=a_1^2c^2-2a_1cb_1d+b_1^2d^2+a_1^2d^2+2a_1cb_1d+b_1^2c^2\\
				&=a_1^2c^2+b_1^2d^2+a_1^2d^2+b_1^2c^2\\
				&=a_1^2(c^2+d^2)+b_1^2(c^2+d^2)\\
				&=(a_1^2+b_1^2)(c^2+d^2).
\end{align*}
Since $r=c+di\in\ZZ[i]$, we have $c,d\in\ZZ$ and thus $c^2+d^2\in\ZZ$. Hence 
$$(a_1^2+b_1^2)\mid (a_2^2+b_2^2).$$
Now $N(z)=N(a_1+b_1i)=a_1^2+b_1^2$ and $N(w)=N(a_2+b_2i)=a_2^2+b_2^2$. Thus altogether we have 
$$N(z)\mid N(w).$$
}

%Part b
\item[\textbf{(b)}]
Let $z = a + bi \in \ZZ\ive{i}$ with $a, b \in \ZZ$.
Assume that $z \neq 0$.
Let $n = \floor{\abs{z}} = \floor{\sqrt{a^2 + b^2}}$.
Prove that every divisor of $z$ in $\ZZ\ive{i}$
has the form $c + di$ with
$c, d \in \set{-n, -n+1, \ldots, n}$.

{\color{blue!60!black} \textbf{Solution.}
Part (a) tells us that any divisor $v=c+di$ of $z=a+bi$ in $\ZZ[i]$ must satisfy $N(v)\mid N(z)$, i.e. that 
$$(c^2+d^2)\mid (a^2+b^2).$$
Since both quantities are nonnegative, and since $a^2+b^2 > 0$ (because $z \neq 0$), we have then that 
\begin{align*}
	c^2+d^2\le a^2+b^2 ;\\
	\sqrt{c^2+d^2}\le \sqrt{a^2+b^2}.
\end{align*}
Since $|c|\le\sqrt{c^2+d^2}$ and $|d|\le \sqrt{c^2+d^2}$, we thus obtain
$$-\sqrt{a^2+b^2}\le c\le \sqrt{a^2+b^2}\qquad \text{and}\qquad -\sqrt{a^2+b^2}\le d\le \sqrt{a^2+b^2}.$$
Since $v=c+di\in\ZZ[i]$, we have $c,d\in\ZZ$. Hence we get that $c,d\in\{-n,-n+1,\dots,n\}$.
Thus we have shown that every divisor of $z$ in $\ZZ\ive{i}$
has the form $c + di$ with
$c, d \in \set{-n, -n+1, \ldots, n}$.
}

%Part c
\item[\textbf{(c)}]
Without recourse to the general theory of PIDs and
UFDs, prove that every nonzero element of $\ZZ\ive{i}$
has an irreducible factorization.

{\color{blue!60!black} \textbf{Solution omitted.}
}

%Part d
\item[\textbf{(d)}]
Let $z \in \ZZ\ive{i}$. Prove that we have the
following logical equivalence:
\[
\tup{z \text{ is a unit of } \ZZ\ive{i}}
\ \iff \ %
\tup{N\tup{z} = 1}
\ \iff \ %
\tup{z \in \set{1, i, -1, -i}} .
\]

{\color{blue!60!black} \textbf{Solution.} 
\underline{Step 1:} $z$ is a unit of $\ZZ[i] \implies N(z)=1$.\\[5pt]
\textit{Proof.} Suppose $z$ is a unit of $\mathbb{Z}[i].$ Then $z\mid 1$.  By part (a), we get $N(z)\mid N(1)$.  Thus if $z=a+bi$ where $a,b\in\ZZ$, then $(a^2+b^2)\mid 1$ (in the normal $\ZZ$ division sense). This will only happen if $a^2+b^2=1$ since $a$ and $b$ are real and thus $a^2+b^2\ge0$.  Thus $N(z)=1$.\\[10pt]
%
\underline{Step 2:} $N(z)=1\implies z\in\{1,i,-1,-i\}$.\\[5pt]
\textit{Proof.} Suppose $N(z)=1$. Then, if we write $z=a+bi$ where $a,b\in\ZZ$, then $a^2+b^2=1$.  Since $a$ and $b$ are integers, this equality only holds if one of $a^2$ and $b^2$ is 0 and the other is 1.  Thus we get the following cases:
\begin{enumerate}
	\item $b^2=0$ and $a^2=1$:
		\begin{enumerate}
			\item[1.1] $b=0$ and $a=1$. Thus $z=1$.
			\item[1.2] $b=0$ and $a=-1$. Thus $z=-1$.
		\end{enumerate}
	\item $b^2=1$ and $a^2=0$:
		\begin{enumerate}
			\item[2.1] $b=1$ and $a=0$. Thus $z=i$.
			\item[2.2] $b=-1$ and $a=0$. Thus $z=-i$.
		\end{enumerate}
\end{enumerate}
Hence $z\in\{1,i,-1,-i\}$.\\[10pt]
%
\underline{Step 3:} $z\in\{1,i,-1,-i\}\implies N(z)=1$.\\[5pt]
\textit{Proof.} Suppose $z\in\{1,i,-1,-i\}$. In all cases $N(z)=a^2+b^2=0+1=1.$\\[10pt]
%
\underline{Step 4:} $N(z)=1\implies z$ is a unit of $\ZZ[i]$.\\[5pt]
\textit{Proof.} Suppose $N(z)=1$. By step 2, $z\in\{1,i,-1,-i\}$. In all cases, $z$ is a unit:
\begin{enumerate}
	\item[a.] If $z=1$, its inverse is itself.
	\item[b.] If $z=i$, its inverse is $-i\in\ZZ[i]$.
	\item[c.] If $z=-1$, its inverse is itself.
	\item[d.] If $z=-i$, its inverse is $i\in\ZZ[i]$.
\end{enumerate}
Hence $z$ is a unit of $\ZZ[i]$.\\[10pt]
The four steps above have proven the equivalences:
\[
\tup{z \text{ is a unit of } \ZZ\ive{i}}
\ \iff \ %
\tup{N\tup{z} = 1}
\ \iff \ %
\tup{z \in \set{1, i, -1, -i}} .
\]
}
\end{itemize}



%----------------------------------------------------------------------------------------
%	EXERCISE 7
%----------------------------------------------------------------------------------------

\newpage
\section*{Exercise 7}

Consider the ring
\[
\ZZ\ive{\sqrt{-3}}
= \set{a + b \sqrt{-3} \mid a, b \in \ZZ} .
\]
This ring is a subring of $\CC$, and thus is an integral
domain.\\[10pt]
%
Let $u = 2 \in \ZZ\ive{\sqrt{-3}}$ and
$v = 1 + \sqrt{-3} \in \ZZ\ive{\sqrt{-3}}$.
Further let $a = 2u = 4$ and $b = 2v$.

\begin{itemize}

%Part a
\item[\textbf{(a)}]
Prove that both $u$ and $v$ are common
divisors of $a$ and $b$ in $\ZZ\ive{\sqrt{-3}}$.

{\color{blue!60!black} \textbf{Solution.}
It is clear that $u\mid a=2u$. Let's show $v\mid a$: For $r=1-\sqrt{-3}\in\ZZ\ive{\sqrt{-3}}$,
\begin{align*}
	vr&=(1+\sqrt{-3})(1-\sqrt{-3})\\
		&=1-\sqrt{-3}\sqrt{-3}\\
		&=1-(-3)\\
		&=1+3\\
		&=4\\
		&=a.
\end{align*}
Hence $v\mid a$ in $\ZZ\ive{\sqrt{-3}}$.\\[10pt]
%
Next, it is clear that $v\mid b=2v$ and also that $u=2\mid b=2v$. Thus since $u$ and $v$ both divide $a$ in $\ZZ\ive{\sqrt{-3}}$ and they both divide $b$ in $\ZZ\ive{\sqrt{-3}}$, they are common divisors of $a$ and $b$ in $\ZZ\ive{\sqrt{-3}}$.
}

%Part b
\item[\textbf{(b)}]
Prove that the only divisors of $4$ in
$\ZZ\ive{\sqrt{-3}}$ are
$\pm 1$, $\pm 2$, $\pm 4$,
$\pm \tup{1 + \sqrt{-3}}$ and
$\pm \tup{1 - \sqrt{-3}}$.

{\color{violet} Note in this part I will use $\gcd_{\ZZ}$ to denote the usual gcd in the integer setting. This gcd is always a nonnegative integer.}

{\color{blue!60!black} \textbf{Solution.}
Suppose $c+d\sqrt{-3}\in\ZZ[\sqrt{-3}]$ (with $c,d\in\ZZ$) satisfies $(c+d\sqrt{-3})\mid 4=a$. Then,
$$\frac{4}{c+d\sqrt{-3}}\in\ZZ[\sqrt{-3}].$$
Rationalizing the denominator, we find
$$\frac{4}{c+d\sqrt{-3}}=\frac{4}{c+d\sqrt{-3}}\cdot\frac{c-d\sqrt{-3}}{c-d\sqrt{-3}}=\frac{4(c-d\sqrt{-3})}{c^2+3d^2}=\frac{4c}{c^2+3d^2}-\frac{4d}{c^2+3d^2}\sqrt{-3},$$
so that
$$\frac{4c}{c^2+3d^2}-\frac{4d}{c^2+3d^2}\sqrt{-3}
=\frac{4}{c+d\sqrt{-3}}\in\ZZ[\sqrt{-3}].$$
In other words,
$$\frac{4c}{c^2+3d^2}\in\ZZ\qquad\text{and}\qquad \frac{4d}{c^2+3d^2}\in\ZZ.$$
That is, $c^2+3d^2$ is a common divisor of $4c$ and $4d$ (over the integers).
Therefore, $(c^2+3d^2)\mid \gcd_{\ZZ}(4c,4d)$.
Set $\gcd_{\ZZ}(c,d)=g\in\ZZ$ (so that $\gcd_{\ZZ}(4c, 4d) = 4g$),
 and let $k,l\in\ZZ$ such that $c=kg$ and $d=lg$. Then we have
\begin{align*}
	(c^2+3d^2)&\mid 4g;\\
	(|c|^2+3|d|^2)&\mid 4g;\\
	(|ckg|+3|dlg|)&\mid 4g
    \qquad \qquad \qquad \tup{\text{since $c=kg$ and $d=lg$}};\\
	|g|(|kc|+3|ld|)&\mid 4g;\\
	(|kc|+3|ld|)&\mid 4
\end{align*}
(here, we cancelled out $|g|$, which is legitimate since it is easily seen that $g \neq 0$).
Since $k,c,l,d\in\ZZ$, we thus have two cases: either $|ld|=1$ or $|ld|=0$ (since otherwise $|kc|+3|ld|>4$, which is a contradiction to $(|kc|+3|ld|) \mid 4$):
\begin{enumerate}
	\item If $|ld|=1$, then $|d|=1$ and $(|kc|+3)\mid4$, so we have $|kc|=1$.  This means also $|c|=1$, so we get the following divisors of $4$:
	\begin{enumerate}
		\item $d=1$, $c=1$: $1+\sqrt{-3}$.
		\item $d=1$, $c=-1$: $-1+\sqrt{-3}$.
		\item $d=-1$, $c=1$: $1-\sqrt{-3}$.
		\item $d=-1$, $c=-1$: $-1-\sqrt{-3}$.
	\end{enumerate}
	\item If $|ld|=0$, then $d=0$ (since $d=lg$ yields $|d|^2 = |dlg| = |ld||g| = 0$).  Further, $|kc|\mid 4$, so we have $c\mid 4$, which gives the following (familiar) divisors of $4$:
	\begin{enumerate}
		\item $\pm1$.
		\item $\pm2$.
		\item $\pm4$.
	\end{enumerate}
\end{enumerate}
Thus all the divisors of $a=4$ in $\ZZ[\sqrt{-3}]$ are 
$\pm 1$, $\pm 2$, $\pm 4$,
$\pm \tup{1 + \sqrt{-3}}$ and
$\pm \tup{1 - \sqrt{-3}}$.
%
}

\item[\textbf{(c)}]
Prove that $a$ and $b$ have no gcd in
$\ZZ\ive{\sqrt{-3}}$.

{\color{blue!60!black} \textbf{Solution.}
A gcd of $a$ and $b$ must be a common divisor of $a$ and $b$, so first let's check which of the divisors of $a=4$ (which we have found above, in part \textbf{(b)} of the exercise) are also divisors of $b=2(1+\sqrt{-3})$:
\begin{enumerate}
	\item It is clear that $\pm1$, $\pm 2$, and $\pm(1+\sqrt{-3})$ are divisors of $b$.
	\item It is clear that $\pm 4$ are \textbf{not} divisors of $b$ since 
$$\frac{b}{4}=\frac{2(1+\sqrt{-3})}{4}=\frac{1}{2}+\frac{1}{2}\sqrt{-3}\not\in\ZZ[\sqrt{-3}].$$
	\item It remains to check $\pm(1-\sqrt{-3})$. Note:
		$$(1-\sqrt{-3})(-1+\sqrt{-3})=-1+\sqrt{-3}+\sqrt{-3}+3=2+2\sqrt{-3}=b.$$
	Thus $\pm(1-\sqrt{-3})$ are divisors of $b$.
\end{enumerate}
In all we have that the common divisors of $a$ and $b$ are 
$$\pm 1, \pm 2, \pm \tup{1 + \sqrt{-3}}, \pm \tup{1 - \sqrt{-3}}.$$
Thus if $a$ and $b$ have a gcd it would be one of the above.  Every common divisor must divide the gcd. In particular, since 2 is a common divisor of $a$ and $b$, it must divide the gcd.  
It is clear that in $\ZZ[\sqrt{-3}],$ 2 does not divide any of 
$$\pm 1, \pm \tup{1 + \sqrt{-3}}, \pm \tup{1 - \sqrt{-3}},$$
since in each case dividing by 2 over the complex numbers will yield a real part of $\pm\frac{1}{2}\not\in\ZZ$.  Thus our only remaining options for gcd of $a$ and $b$ are $\pm 2$.  If $\pm 2$ is the gcd, $1+\sqrt{-3}$ must divide it.  We have
$$\frac{\pm2}{1+\sqrt{-3}}=\frac{\pm2}{1+\sqrt{-3}}\cdot\frac{1-\sqrt{-3}}{1-\sqrt{-3}}=\frac{\pm2(1-\sqrt{-3})}{1+3}=\frac{\pm1}{2}(1-\sqrt{-3})\not\in\ZZ[\sqrt{-3}].$$
Thus $\pm 2$ cannot be the gcd either.  Hence $a$ and $b$ have no gcd in $\ZZ[\sqrt{-3}]$.
}

\end{itemize}




%----------------------------------------------------------------------------------------
%	EXERCISE 8
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 8}

Let $R$ be a ring.
Let $I$ and $J$ be two ideals of $R$ such that
$I \subseteq J$.
Let $J / I$ denote the set of all cosets
$j + I \in R / I$ where $j \in J$.
%
Prove the following:

\begin{itemize}

%Part a
\item[\textbf{(a)}]
This set $J / I$ is an ideal of $R / I$.

{\color{blue!60!black} \textbf{Solution.}
\underline{Step 1:} We need to show that any $\alpha, \beta \in J/I$ satisfy $\alpha + \beta \in J/I$.\\[5pt]
Let $\alpha, \beta \in J/I$. Then, we can write $\alpha = a + I$ and $\beta = b + I$ for some $a, b \in J$. Since $J$ is an ideal of $R$, we then have $a+b\in J$. Thus $(a+b)+I\in J/I$.  But this is precisely how we define $(a+I)+(b+I)$. Thus $(a+I)+(b+I)\in J/I$. In other words, $\alpha + \beta \in J/I$.
This shows that $J/I$ is closed under addition.\\[10pt]
%
\underline{Step 2:} We need to show that any $\alpha \in R/I$ and $\beta \in J/I$ satisfy $\alpha \beta \in J/I$ and $\beta \alpha \in J/I$.\\[5pt]
Let $\alpha \in R/I$ and $\beta \in J/I$. Thus we can write $\alpha = a + I$ and $\beta = j + I$ with $a\in R$ and $j\in J$.  Since $J$ is an ideal of $R$, we then have $aj\in J$ and $ja\in J$. Thus $aj+I\in J/I$ and $ja+I\in J/I$.  This is precisely how we define $(a+I)(j+I)$ and $(j+I)(a+I)$, respectively. Thus $(a+I)(j+I)\in J/I$ and $(j+I)(a+I)\in J/I$.
In other words, $\alpha \beta \in J/I$ and $\beta \alpha \in J/I$.
This shows that $J/I$ is closed under multiplication by elements in $R/I$.\\[10pt]
%
\underline{Step 3:} We need to show that $0_R+I=0_{R/I}\in J/I$.\\[5pt]
Since $J$ is an ideal, $0_R\in J$. Thus $0_R+I\in J/I$.\\[10pt]
%
All steps above show that $J/I$ is an ideal of $R/I$.
}

%Part b
\item[\textbf{(b)}]
We have
$\tup{R / I} / \tup{J / I} \cong R / J$
(as rings).
More concretely, there is a ring isomorphism
$R / J \to \tup{R / I} / \tup{J / I}$
that sends each residue class
$\overline{r} = r + J$ to
$\overline{r + I} = \tup{r + I} + \tup{J / I}$.

{\color{blue!60!black} \textbf{Solution.}
We want to show that $f: R / J \to \tup{R / I} / \tup{J / I}$ defined by 
$$f(r + J)= \tup{r + I} + \tup{J / I}$$
is a ring isomorphism.\\[10pt]
%
\underline{Well-definedness:} If $r + J$ and $s + J$ (for some $r, s \in R$)
are one and the same coset in $R / J$, then
$\tup{r + I} + \tup{J / I} = \tup{s + I} + \tup{J / I}$.
Indeed, in this case, we have $r - s \in J$ (since
$r + J = s + J$) and therefore
$\tup{r + I} - \tup{s + I}
= \tup{r - s} + I \in J / I$,,
so that
$\tup{r + I} + \tup{J / I} = \tup{s + I} + \tup{J / I}$.
Thus, the map $f$ above is well-defined.

\underline{Addition:} For any $r+J,s+J\in R/J$, we have%
\footnote{We shall use square brackets synonymously to
regular parentheses.}
\begin{align*}
	f((r+J)+(s+J))&=f((r+s)+J)\\
				&=\Bigl([r+s]+I\Bigr)+(J/I)\\
				&=\Bigl([r+I]+[s+I]\Bigr)+(J/I)\qquad\tup{\text{by definition of coset sum}}\\
				&=\Bigl[(r+I)+(J/I)\Bigr]
					+\Bigl[(s+I)+(J/I)\Bigr]\qquad\tup{\text{by definition of coset sum}}\\
				&=f(r+J)+f(s+J).
\end{align*}
%
\underline{Multiplication:} For any $r+J,s+J\in R/J$,
\begin{align*}
	f((r+J)(s+J))&=f((rs)+J)\\
				&=\Bigl([rs]+I\Bigr)+(J/I)\\
				&=\Bigl([r+I][s+I]\Bigr)+(J/I)\qquad\tup{\text{by definition of coset multiplication}}\\
				&=\Bigl[(r+I)+(J/I)\Bigr]
					\Bigl[(s+I)+(J/I)\Bigr]\qquad\tup{\text{by definition of coset multiplication}}\\
				&=f(r+J)f(s+J).
\end{align*}
%
\underline{Zero:} $f(0_{R/J})=f(0_R+J)=(0_R+I)+(J/I)=0_{R/I}+(J/I)=0_{(R/I)/(J/I)}$.\\[10pt]
\underline{Unity:} $f(1_{R/J})=f(1_R+J)=(1_R+I)+(J/I)=1_{R/I}+(J/I)=1_{(R/I)/(J/I)}$.\\[10pt]
\underline{Invertible:} We will show that $f$ is injective and surjective.
This will then yield that $f$ is invertible.
\begin{adjustwidth}{2em}{0em}
	\underline{Injective:} Suppose $f(a)=f(b)$ for some $a,b\in R/J$. Then $a=r+J$ and $b=s+J$ for some $r,s\in R$.  Thus we have $f(r+J)=f(s+J)$ for some $r+J,s+J\in R/J$. Then by definition of $f$ we have 
	$$(r+I)+(J/I)=(s+I)+(J/I).$$
	This means that $(r+I)-(s+I)\in J/I$, i.e. $(r-s)+I\in J/I$. This means that $(r-s)+I = j+I$ for some $j \in J$.
    This yields $(r-s) - j \in I \subseteq J$,
    so that $r-s$ is a sum of $j$ with an element of $J$.
    Thus, $r-s$ is a sum of two elements of $J$ (since $j \in J$).
    Therefore, $r-s \in J$ (since $J$ is an ideal).
    In other words, $r+J=s+J$.  Hence $a=b$.
    Thus we have shown that $f$ is injective.\\[10pt]
	%
	\underline{Surjective:} Let $y\in (R/I)/(J/I)$.  Then for some $r\in R$, we have $y=(r+I)+(J/I)\in (R/I)/(J/I)$. Since $r\in R$, we have $r+J\in R/J$ and
	$$f(r+J)=(r+I)+(J/I)=y.$$
	Hence $f$ is surjective.
\end{adjustwidth}
All the above together gives that $f$ is an invertible ring morphism,
i.e., a ring isomorphism.  Hence $\tup{R / I} / \tup{J / I} \cong R / J$
(as rings).
}

\end{itemize}



%----------------------------------------------------------------------------------------
%	EXERCISE 9
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\newpage
\section*{Exercise 9}

Let $R$ be a ring.
Let $S$ be a subring of $R$.
Let $I$ be an ideal of $R$.
Define $S + I$ to be the subset
$\set{s + i \mid s \in S \text{ and } i \in I}$
of $R$.
%
Prove the following:

\begin{itemize}

%Part a
\item[\textbf{(a)}]
This subset $S + I$ is a subring of $R$.

{\color{blue!60!black} \textbf{Solution.}
\underline{Closed under Addition:} Let $a,b\in S+I$ be arbitrary. Then for some $s_1,s_2\in S$ and $i_1,i_2\in I$, we have $a=s_1+i_1$ and $b=s_2+i_2$. Then
\begin{align*}
	a+b&=s_1+i_1+s_2+i_2\\
		&=(s_1+s_2)+(i_1+i_2)\\
		&=s_3+i_3
\end{align*}
for $s_3 = s_1 + s_2 \in S$ and $i_3 = i_1 + i_2 \in I$ since $S$ is a subring (thus closed under addition) and $I$ is an ideal (thus also closed under addition).  Hence $a+b=s_3+i_3\in S+I$. Thus $S+I$ is closed under addition.\\[10pt]
%
\underline{Closed under Multiplication:} Let $a,b\in S+I$ be arbitrary. Then for some $s_1,s_2\in S$ and $i_1,i_2\in I$, we have $a=s_1+i_1$ and $b=s_2+i_2$. Then
\begin{align*}
	ab&=(s_1+i_1)(s_2+i_2)\\
		&=(s_1+i_1)s_2+(s_1+i_1)i_2\\
		&=s_1s_2+i_1s_2+s_1i_2+i_1i_2.
\end{align*}
Since $I$ is an ideal it is closed under multiplication by any element of $R$ (and thus any element of $S$), so $i_1s_2,s_1i_2,i_1i_2\in I$.  Therefore $i_3=i_1s_2+s_1i_2+i_1i_2\in I$.  On the other hand, $S$, as a subring, is closed under multiplication. Thus $s_3=s_1s_2\in S$. Therefore we have
$$ab=s_3+i_3\qquad\text{where } s_3\in S \text{ and } i_3\in I .$$
Hence $S+I$ is closed under multiplication.\\[10pt]
%
\underline{Contains Additive Inverses:} Let $a\in S+I$ be arbitrary. Then for some $s\in S$ and $i\in I$, we have $a=s+i$. Then 
$$-a=-(s+i)=-s+(-i).$$
Since $S$ is a subring of $R$, we have $-s\in S$.   Since $I$ is an ideal of $R$, it is closed under multiplication by elements of $R$. Thus $-i=(-1)i\in I$. Hence we have that $-a=-s+(-i)\in S+I$. Thus $S+I$ contains additive inverses.
\\[10pt]
%
\underline{Zero:} $0_R\in S$ as $S$ is a subring and $0_R\in I$ as $I$ is an ideal. Thus $0_R=0_R+0_R\in S+I$.\\[10pt]
%
\underline{Unity:} $1_R\in S$ as $S$ is a subring and $0_R\in I$ as $I$ is an ideal. Thus $1_R=1_R+0_R\in S+I$.\\[10pt]
%
All of the above shows that $S+I$ is a subring of $R$.

}

%Part b
\item[\textbf{(b)}]
The set $I$ is an ideal of the ring $S + I$.

{\color{blue!60!black} \textbf{Solution.}
Clearly $I\subseteq S+I$, since each $i \in I$ satisfies $i = 0_R + i$ with $0_R \in S$.
The rest of the claim follows from $I$ being an ideal of $R$ and $S+I$ being a subring of $R$.
In fact, certainly $I$ is still closed under addition, closed under multiplication by elements of $S+I$ (since they are also elements of $R$) and contains the $0$ of $S+I$ since it is the same as the $0$ of $R$.
}

%Part c
\item[\textbf{(c)}]
The set $S \cap I$ is an ideal of the ring $S$.

{\color{blue!60!black} \textbf{Solution.}
Clearly $S\cap I\subseteq S$.  \\[5pt]
\underline{Closed under Addition:} Since $S$ is a subring and $I$ an ideal, they are both closed under addition. Hence we get that $S\cap I$ is also closed under addition. \\[10pt]
\underline{Closed Under Multiplication by Elements of $S$:}
Let $a\in S\cap I$ be arbitrary. Then $a\in S$ and $a\in I$.  For any $b\in S$, we have $ab\in S$ and $ba\in S$ since $S$ is a ring (by part (\textbf{a})) and thus closed under multiplication.  Further,  $b\in R$ since $S\subseteq R$. Thus $ab\in I$ and $ba\in I$ since $I$ is an ideal of $R$ and thus closed under multiplication by elements of $R$.  Altogether we have that $ab\in S\cap I$ and $ba\in S\cap I$. Hence we have that $S\cap I$ is closed under multiplication by elements in $S$.\\[10pt]
\underline{Zero:} Since $0_S\in S$ and $0_S=0_R\in I$, we have that $0_S\in S\cap I$.\\[10pt]
All of the above shows that $S\cap I$ is an ideal of $S$.
}

%Part d
\item[\textbf{(d)}]
We have
$\tup{S + I} / I \cong S / \tup{S \cap I}$
(as rings).
More concretely, there is a ring isomorphism
$S / \tup{S \cap I} \to \tup{S + I} / I$
that sends each residue class
$\overline{s} = s + \tup{S \cap I}$ to
$\overline{s} = s + I$.

{\color{blue!60!black} \textbf{Solution.}
We want to show that $f: S / \tup{S \cap I} \to \tup{S + I} / I$ defined by 
$$f( s + \tup{S \cap I})= s+I$$
is a ring isomorphism.\\[10pt]
%
\underline{Well-definedness:} If $r + \tup{S \cap I}$ and $s + \tup{S \cap I}$
(for some $r, s \in S$)
are one and the same coset in $S / \tup{S \cap I}$, then
$r + I = s + I$.
Indeed, in this case, we have $r - s \in S \cap I$ (since
$r + \tup{S \cap I} = s + \tup{S \cap I}$) and therefore
$r - s \in I$,
so that
$r + I = s + I$.
Thus, the map $f$ above is well-defined.

\underline{Addition:} For any $s+ (S\cap I), r+(S\cap I)\in S / \tup{S \cap I}$,
\begin{align*}
	f((s+ (S\cap I))+(r+ (S\cap I)))&=f((s+r)+(S\cap I))\\
				&=(s+r)+I\\
				&=(s+I)+(r+I) \qquad\tup{\text{by definition of coset sum}}\\
				&=f(s+(S\cap I))+f(r+(S\cap I)).
\end{align*}
%
\underline{Multiplication:} For any $s+ (S\cap I), r+(S\cap I)\in S / \tup{S \cap I}$,
\begin{align*}
	f((s+ (S\cap I))(r+ (S\cap I)))&=f((sr)+(S\cap I))\\
				&=(sr)+I\\
				&=(s+I)(r+I) \qquad\tup{\text{by definition of coset multiplication}}\\
				&=f(s+(S\cap I))f(r+(S\cap I)).
\end{align*}
%
\underline{Zero:} $f(0_{S/(S\cap I)})=f(0_S+(S\cap I))=f(0_R+(S\cap I))=0_R+I=0_{S+I}+I=0_{(S+I)/I}$.\\[10pt]
\underline{Unity:} $f(1_{S/(S\cap I)})=f(1_S+(S\cap I))=f(1_R+(S\cap I))=1_R+I=1_{S+I}+I=1_{(S+I)/I}$.\\[10pt]
\underline{Invertible:} We will show that $f$ is injective and surjective.
This will then yield that $f$ is invertible.
\begin{adjustwidth}{2em}{0em}
	\underline{Injective:} Suppose $f(a)=f(b)$ for some $a,b\in S/(S\cap I)$. Then $a=s+(S\cap I)$ and $b=r+(S\cap I)$ for some $r,s\in S$.  Thus we have $f(s+(S\cap I))=f(r+(S\cap I))$ for some $s+(S\cap I),r+(S\cap I)\in S/(S\cap I)$. Then by definition of $f$ we have 
	$$s+I=r+I.$$
	This means that $s-r\in I$. Since $r,s\in S$, which is a ring, we also have $s-r\in S$.  Thus $s-r\in S\cap I$.  Therefore $s+(S\cap I)=r+(S\cap I)$.  Hence $a=b$.
    This shows that $f$ is injective.\\[10pt]
	%
	\underline{Surjective:} Let $y\in (S+I)/I$.  Then for some $r\in S+I$, we have $y=r+I\in (S+I)/I$. Since $r\in S+I$, for some $s\in S$ and $i\in I$, we have $r=s+i$.  Thus 
	$$y=(s+i)+I=(s+I)+(i+I)=(s+I)+(0+I)=s+I.$$
	Since $s\in S$, we have $s+(S\cap I)\in S/(S\cap I)$ and
	$$f(s+(S\cap I))=s+I=y.$$
	Hence $f$ is surjective.
\end{adjustwidth}
All the above together gives that $f$ is an invertible ring morphism,
i.e., a ring isomorphism.  Hence $\tup{S + I} / I \cong S / \tup{S \cap I}$
(as rings).

}

\end{itemize}




\horrule{0.3pt} \\[0.4cm]

\begin{thebibliography}{99999999}                                                                                         %

  \bibitem{Zn} Stangl, Walter D. (1996). Counting Squares in $\ZZ_n$. \emph{Mathematics Magazine, 69}(4), 285-289. \url{https://doi.org/10.1080/0025570X.1996.11996456}
  
  \bibitem{Wilson} Wikipedia contributors, Wilson's Theorem, \textit{Wikipedia, The Free Encyclopedia}, \url{https://en.wikipedia.org/wiki/Wilson's_theorem} .
  
\end{thebibliography}

\end{document}
