%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentstyle[12pt]{amsart}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   ENVIRONMENTS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% \theoremstyle{plain} %% This is the default
\newtheorem{th}{Theorem}[section]
\newtheorem{cor}[th]{Corollary}
\newtheorem{lm}[th]{Lemma}
\newtheorem{prp}[th]{Proposition}
\newtheorem{clm}[th]{Claim}
%
\theoremstyle{definition}
\newtheorem{df}[th]{Definition}
\newtheorem{exmp}[th]{Example}
\newtheorem{prb}[th]{Problem}
%
\theoremstyle{remark}
\newtheorem{rem}[th]{Remark}
%
%
\numberwithin{equation}{section}
%
\newcommand{\thref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lmref}[1]{Lemma~\ref{#1}}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Math macros
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Logical symbols
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\satf}{\models}
\newcommand{\id}{{\text{\sl id}}}       % The identity map
\newcommand{\miff}{\Longleftrightarrow} % math `if and only if'
\newcommand{\mimplies}{\Longrightarrow} % math `implies'
\newcommand{\mimplied}{\Longleftarrow}  % math `implied by'
\newcommand{\miffdef}{\stackrel{\text{\normalshape
   def}}{\miff}}                        % defining iff
\newcommand{\eqdef}{\stackrel{\text{\normalshape
   def}}{=}}                            % defining equation
\newcommand{\set}[2]{\{#1\,:\,\text{#2}\}} % { x : ... }
%
%\newcommand{\neareq}{\stackrel{\ae}{=}}
%\newcommand{\aeqv}{\,\stackrel{\text{\normalshape ae}}{\equiv}\,}
%\newcommand{\aeq}{\,\stackrel{\text{\normalshape ae}}{=}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%  Classical math
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\tmod}[1]{\text{\normalshape mod~$#1$}}

\newcommand{\BZ}{\Bbb Z} % integers
\newcommand{\BQ}{\Bbb Q} % rationals
\newcommand{\BR}{\Bbb R} % reals
\newcommand{\BC}{\Bbb C} % complex numbers
\newcommand{\re}{\text{\normalshape Re}\,}    % real part
\newcommand{\im}{\text{\normalshape Im}\,}    % imaginary part
%
\newcommand{\meet}{\wedge}
\newcommand{\join}{\vee}
\newcommand{\union}{\cup}
\newcommand{\inter}{\cap}  % intersection
\newcommand{\iso}{\cong}   % isomorphic
\newcommand{\piso}{\simeq} % polynomially isomorphic
\newcommand{\Star}{^ *}
\newcommand{\compose}{{\scriptstyle \circ}} % f o g
%
\newcommand{\wec}[1]{{\bold{#1}}}  % notation for vectors in algebras
%\newcommand{\wec}[1]{{\bar{#1}}} % which one do you prefer?
\newcommand{\wrel}[1]{\;#1\;}     % a\wrel{\alpha}b = a \alpha b
%              % this provides a flexible way to change the spacing
%
\newcommand{\Ker}{\text{\normalshape Ker}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%  Operators on algebras
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%%  \m is used to produce models (algebras) as follows:
%%%  typing `\m a'  produces in bold face, A.
%%%  \vr does the same for varieties
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\m}[1]{\mbox{${\bold{\uppercase{#1}}}$}}
\newcommand{\sm}[1]{\mbox{{\scriptsize\bf{\uppercase{#1}}}}}
\newcommand{\vr}[1]{{\cal{\uppercase {#1}}}}
%
\newcommand{\Var}{{\bold{V}}}
\newcommand{\Ho}{{\bold{H}}}
\newcommand{\Su}{{\bold{S}}}
\newcommand{\Pd}{{\bold{P}}}
\newcommand{\Iso}{{\bold{I}}}
\newcommand{\Ps}{{\bold{P}}_{\text{\normalshape s}}}
\newcommand{\fin}[1]{{\bold{#1}}_{\text{\normalshape fin}}}
%
\newcommand{\Pol}{{\text{\normalshape Pol}\,}}
\newcommand{\Clo}{{\text{\normalshape Clo}\,}}
\newcommand{\Con}{{\text{\normalshape Con}\,}}
\newcommand{\Conb}{{\bold{Con}\,}}       % Con(A) as a lattice
%\newcommand{\Cg}[1]{\text{\normalshape Cg}^{\m{#1}}}
%\newcommand{\Sg}[1]{\text{\normalshape Sg}^{\m{#1}}}
\newcommand{\Cg}[1]{\text{\normalshape Cg}^{\sm{#1}}}
\newcommand{\Sg}[1]{\text{\normalshape Sg}^{\sm{#1}}}
\newcommand{\cg}{\text{\normalshape Cg}\,}
\newcommand{\sg}{\text{\normalshape Sg}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  macros for tame congruence theory.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\M}[3]{\text{\normalshape
   M}_{\m{#1}} (#2, #3)}
\newcommand{\minl}[1]{\text{\normalshape
   Min}_{\m{#1}}}
%
\newcommand{\typ}{{\text{\normalshape typ}\,}}
\newcommand{\ann}{{\text{\normalshape ann}\,}}
\newcommand{\Sep}{{\text{\normalshape Sep}\,}}
\newcommand{\ssb}{{\text{\normalshape ssb}\,}}
\newcommand{\sst}{{\text{\normalshape sst}\,}}
%
\newcommand{\utyp}{{\bold{1}}\,} % unary
\newcommand{\atyp}{{\bold{2}}\,} % affine
\newcommand{\btyp}{{\bold{3}}\,} % boolean
\newcommand{\ltyp}{{\bold{4}}\,} % lattice
\newcommand{\styp}{{\bold{5}}\,} % semilattice
\newcommand{\ityp}{{\bold{i}}\,}
\newcommand{\jtyp}{{\bold{j}}\,}
%
\newcommand{\solv}{\stackrel{s}{\sim}}
\newcommand{\ssolv}{\stackrel{ss}{\sim}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Abbreviations
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
%
\newcommand{\lb}{\langle} % <...>
\newcommand{\rb}{\rangle}
\newcommand{\lv}{{[\![}}  % [[...]]
\newcommand{\rv}{{]\!]}}
%
\newcommand{\ul}{\underline}
\newcommand{\ol}{\overline}
%
\newcommand{\vep}{\varepsilon}
\newcommand{\di}{\diamond}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\s}[1]{\underset{\mbox{\scriptsize\sl #1}}{\textstyle\bold \sim}}
%\newcommand{\s}[1]{\underset{#1}{\textstyle\bold \sim}}

\begin{document}

\noindent
{\bf Consider the following two (different) definitions.}
\begin{enumerate}
\item[(1)] {\rm A number $p$ is {\bf prime} if whenever $p\mid ab$,
then $p\mid a$ or $p\mid b$.}
\item[(2)] {\rm A number $q$ is {\bf irreducible} if whenever $q=ab$,
then $a=\pm 1$ or $b=\pm 1$.}
\end{enumerate}
{\bf 
Show that an integer is prime if and only if it is irreducible.
}

\medskip

\noindent
{\it Solution.}
First we show that any prime is irreducible.
Let $p$ be a prime. To show that $p$ is irreducible
we must show that $p$ satisfies Definition~(2).
Therefore, assume that $p=ab$. Then $p\mid ab$,
and so the primeness of $p$ implies that $p\mid a$
or $p\mid b$. If it is the case that $p\mid a$,
then $a = pn$
for some $n\in {\BZ}$. In this case
\[p = ab = (pn)b = p(nb),\]
so after cancelling $p$ from the left and the right
we have $1 = nb$. This can only happen if
$n = b = \pm 1$, so in the case where $p\mid a$
we get $b = \pm 1$. In the alternate case
where $p\mid b$ the same argument shows
that $a=\pm 1$. In either case
we have $a=\pm 1$ or $b = \pm 1$, so
$p$ is indeed irreducible.

Now we show that any irreducible is prime.
Let $q$ be an irreducible. To show that 
$q$ is prime, 
we must show that $q$ satisfies Definition~(1).
Assume that $q\mid ab$.
This means that we can write $ab = qn$ for some
$n\in{\BZ}$. Now we must show that $q\mid a$ or $q\mid b$.
It is enough to show that if $q$ does
not divide $a$, then $q$ {\em must divide}
$b$, so let's assume that $q$ does not divide $a$.
As shown in class, since $q$ is irreducible
and does not divide $a$ we must have 
$\gcd(q,a) = 1$. Therefore there are integers
$s$ and $t$ such that $sq+ta=1$. Multiplying by $b$
we get $sqb+tab = b$. Therefore we have
$b = sqb+t(ab) = sqb+tqn = (sb+tn)q$,
which proves that $q\mid b$.
Hence $q$ is prime.

\bigskip

This exercise is nontrivial because the solution requires
some creative thought. It's hard for any person
to be creative on
demand. But most of this problem does not require
creativity, only organization. For example, without
any thinking at all, anyone should be able
to do at least this much:

\medskip

\noindent
{\it Partial Solution.}
First we show that any prime is irreducible.
Let $p$ be a prime. To show that $p$ is irreducible
we must show that $p$ satisfies Definition~(2).
Therefore, assume that $p=ab$. 

\smallskip

\begin{center}
\framebox[4in]{Creative thought goes here!}
\end{center}

\smallskip

\noindent
In either case
we have $a=\pm 1$ or $b = \pm 1$, so
$p$ is indeed irreducible.

Now we show that any irreducible is prime.
Let $q$ be an irreducible. To show that 
$q$ is prime, 
we must show that $q$ satisfies Definition~(1).
Assume that $q\mid ab$.
This means that we can write $ab = qn$ for some
$n\in{\BZ}$. Now we must show that $q\mid a$ or $q\mid b$.
It is enough to show that if $q$ does
not divide $a$, then $q$ {\em must divide}
$b$, so let's assume that $q$ does not divide $a$.
As shown in class, since $q$ is irreducible
and does not divide $a$ we must have 
$\gcd(q,a) = 1$. Therefore there are integers
$s$ and $t$ such that $sq+ta=1$. Multiplying by $b$
we get $sqb+tab = b$. Therefore we have
$b = sqb+t(ab) = sqb+tqn = (sb+tn)q$,
which proves that $q\mid b$.
Hence $q$ is prime.

\bigskip

If you look over the {\it Partial Solution}
you will find that in the first paragraph
the only thing we did was reorganize
and decode the statement we had to prove.
There is a gap in the proof, and it
is our job to close the gap.
In the second paragraph we also reorganized
and decoded the statement we had to prove.
We could have identified the gap that
remained, 
and then worked to close the gap.
However, {\em we proved in class that 
irreducible integers are prime}!
(This happened in our proof of the Fundamental
Theorem of Arithmetic.) 


\end{document}

