\documentclass[12pt]{amsart}
\title{Lecture 8}
\author{}

\usepackage{amsmath,amssymb}

\usepackage[margin=1in]{geometry}
\usepackage[all]{xy}
\xyoption{arc}
\newcommand{\ds}{\displaystyle}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}

\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\ol}[1]{\overline{#1}}
\newcommand{\wt}[1]{\widetilde{#1}}
\newcommand{\wh}[1]{\widehat{#1}}


\renewcommand{\Re}{\operatorname{Re}}
\renewcommand{\Im}{\operatorname{Im}}

\newcommand{\Ker}{\operatorname{Ker}}
\newcommand{\Coker}{\operatorname{CoKer}}
\newcommand{\Coim}{\operatorname{CoIm}}

\newcommand{\CalA}{\mathcal{A}}
\newcommand{\CalC}{\mathcal{C}}
\newcommand{\CalD}{\mathcal{D}}
\newcommand{\Ob}{\operatorname{Ob}}
\newcommand{\Hom}{\operatorname{Hom}}
\newcommand{\End}{\operatorname{End}}
\newcommand{\Id}{\operatorname{Id}}
\newcommand{\triv}{\mathbf{0}}
\newcommand{\h}{\mathsf{h}}
\newcommand{\op}{\scriptscriptstyle{\operatorname{op}}}
\newcommand{\fd}{\scriptscriptstyle{\operatorname{fd}}}


\newcommand{\Cov}[2]{{\mathcal{F}}(#1,#2)}
\newcommand{\Contra}[2]{{\mathcal{F}}(#1^{\op},#2)}

\newcommand{\Sets}{{\mathbf{Sets}}}
\newcommand{\Gps}{{\mathbf{Gps}}}
\newcommand{\Ab}{{\mathbf{Ab}}}
\newcommand{\Vect}{{\mathbf{Vect}}}
\newcommand{\GSets}[1]{#1\mbox{-}\Sets}
\newcommand{\Rmod}[1]{#1\mbox{-}\mathbf{\operatorname{mod}}}
\newcommand{\modR}[1]{\mathbf{\operatorname{mod}}\mbox{-}#1}

\newcommand{\isom}{\stackrel{\sim}{\longrightarrow}}

\newcommand{\Dlim}[1]{\ds \lim_{\begin{subarray}{c}
\longrightarrow \\ #1\end{subarray}}}
\newcommand{\Ilim}[1]{\ds \lim_{\begin{subarray}{c}
\longleftarrow \\ #1\end{subarray}}}

\newcommand{\PP}[2]{\noindent {\bf (#1) #2.--}}

\newtheorem*{thm}{Theorem}
\newtheorem*{prop}{Proposition}
\newtheorem*{lem}{Lemma}
\newtheorem*{cor}{Corollary}
\newenvironment{pf}{\paragraph{{\sc Proof}}}{\qed\par\medskip}
\theoremstyle{definition}
\newtheorem*{defn}{Definition}
\newtheorem*{rem}{Remark}
\newtheorem*{rems}{Remarks}
\newtheorem*{ex}{Example}

\begin{document}
\maketitle

\PP{8.0}{Next topic}
%-------------------
Recall that so far we have been learning the language of
category theory. We saw the meaning of the following terms:
categories, functors, natural transformations, equivalence
of categories, adjoint functors, representable functors
(after Yoneda's embedding theorem),
direct sums/products, direct and inverse limits.\\

Now we are going to focus on categories of more algebraic origin:
{\em additive and abelian categories}.\\

\PP{8.1}{Additive categories}
%---------------------------
An {\em additive category} $\CalA$ is a category satisfying
the following axioms:\\

\begin{itemize}
\item[(A1)] For every $X,Y\in\CalA$, the set of morphisms $\Hom_{\CalA}
(X,Y)$ has a structure of an abelian group, such that
the composition map is $\Z$--bilinear. That is,
for every $X,Y,Z\in\CalA$:\\

\begin{itemize}
\item[$\bullet$] $\ds g\circ (a_1f_1+a_2f_2) = a_1(g\circ f_1)
+ a_2(g\circ f_2)$ for every $a_1,a_2\in\Z$, $f_1,f_2\in\Hom_{\CalA}
(X,Y)$ and $g\in \Hom_{\CalA}(Y,Z)$.
\item[$\bullet$] $\ds (a_1g_1+a_2g_2)\circ f = a_1(g_1\circ f) +
a_2(g_2\circ f)$, for every $a_1,a_2\in\Z$, $f\in\Hom_{\CalA}
(X,Y)$ and $g_1,g_2\in \Hom_{\CalA}(Y,Z)$.\\
\end{itemize}

\item[(A2)] There exists an object in $\CalA$, denoted by $\triv_{\CalA}$,
such that $\Hom_{\CalA}(\triv_{\CalA},X) = \{0\}
=\Hom_{\CalA}(X,\triv_{\CalA})$, for every $X\in\CalA$.\\

\item[(A3)] Finite direct sums and products exist in $\CalA$.\\
\end{itemize}

\begin{rems}\hfill
\begin{enumerate}
\item You have seen in the recitations that, in any category
$\CalC$, if there is an object $T$ such that $\Hom_{\CalC}(T,X)$
and $\Hom_{\CalC}(X,T)$ are singletons, for every $X\in\CalC$,
then this object $T$ is unique up to a unique isomorphism.
Thus $\triv_{\CalA}$ in the axiom (A2) of an additive category
is uniquely defined, called {\em the} trivial (or zero) object of $\CalA$.\\

\item In an additive category $\CalA$, $\Hom_{\CalA}(X,Y)$ is
not empty, for any $X,Y\in\CalA$. This is because it is supposed
to be an abelian group and as such must contain the zero morphism.
Hence, for instance, the category of fields is not additive.\\

\item In (A3), the finite direct sums and products that are
assumed to exist in $\CalA$ end up being naturally isomorphic.
See Lemma (8.3) below.\\
\end{enumerate}
\end{rems}

\PP{8.2}{Examples}
%----------------
Many categories outside of the realm of algebra are not additive.
For instance, category of topological spaces, manifolds etc.
Categories of groups, unital rings, fields are also not additive.\\

Most typical example of an additive category is that
of left (resp. right) modules over a unital ring $R$, which 
we denoted by $\Rmod{R}$ (resp. $\modR{R}$). Let us see this
in detail.\\

Recall that an object of $\Rmod{R}$ is an abelian group $M$,
together with a left action of $R$, which can be written as a (unital) ring
homomorphism $\lambda_M : R\to \End_{\Z}(M)$. We often suppress
this $\lambda_M$ from our notations, and simply write 
$rm = \lambda_M(r)(m)$.
\[
\Hom_{\Rmod{R}}(M,N) = \{f\in\Hom_{\Ab}(M,N) : 
f(rm) = rf(m)\ \forall\ r\in R, m\in M\}.
\]

\noindent (A1): For $M,N\in\Rmod{R}$, the set of morphisms
$\Hom_R(M,N)$ has a structure of an abelian group, given explicitly as follows.\\

\begin{itemize}
\item For $f_1,f_2\in\Hom_R(M,N)$, $f_1+f_2\in\Hom_R(M,N)$
is defined as $(f_1+f_2)(m) = f_1(m) + f_2(m)$, for every $m\in M$.
\item For $f:M\to N$, $(-f):M\to N$ is defined as $(-f)(m) = -f(m)$,
for every $m\in M$.
\item Zero morphism is the one that maps $m\mapsto 0$, for every $m\in M$.\\
\end{itemize}

It is easy to see that the composition is bilinear.\\

\noindent (A2): The zero object is the trivial abelian group
$\{0\}$ together with the trivial action of $R$.\\

\noindent (A3): Given $M_1,M_2\in\Rmod{R}$, their direct sum is
constructed as a cartesian product, with componentwise $R$--action:
$M_1\oplus M_2 = \{(m_1,m_2): m_j\in M_j\ j=1,2\}$. For every $r\in R$,
$m_1\in M_1$ and $m_2\in M_2$, $r(m_1,m_2) = (rm_1,rm_2)$.\\


\PP{8.3}{Direct sums and products}
%--------------------------------
Let $I$ be an indexing set, $\CalA$ an additive category and
$\{X_i\}_{i\in I}$ a set of objects from $\CalA$. Assume that both
their direct sum
$X=\ds\bigoplus_{i\in I} X_i$ and direct product
$\ds\wh{X}=\prod_{i\in I} X_i$ exist
in $\CalA$. Let us denote the canonical morphisms as:

\[
X_i \stackrel{f_i}{\longrightarrow} X, \qquad
\wh{X}\stackrel{f^i}{\longrightarrow} X_i,\ \forall i\in I.
\]

\noindent For $i,j\in I$, define a morphism $\delta_{ij}:X_j\to X_i$ as:
$\ds
\delta_{ij}=\left\{\begin{array}{lc} 0 & i\neq j, \\
\Id_{X_i} & i=j. \end{array}\right.$\\

\begin{lem}
There is a natural morphism $\alpha:X\to \wh{X}$ which makes the
following diagram commute, for every $i,j\in I$.
\[
\xy
(0,20)*{X_i}="a"; (30,20)*{X_j}="b";
(0,0)*{X}="c"; (30,0)*{\wh{X}}="d";
{\ar^{\delta_{ji}} "a"; "b"};
{\ar_{\alpha} "c"; "d"};
{\ar_{f_i} "a"; "c"};
{\ar_{f^i} "d"; "b"};
\endxy
\]
Moreover, if $I$ is finite, $\alpha$ is an isomorphism.
\end{lem}

\begin{pf}
The morphism $\alpha$ can be obtained by using the universal
property of direct sums and products. Namely, fix $i\in I$,
and consider the collection of morphisms $\{X_i
\stackrel{\delta_{ji}}{\longrightarrow} X_j\}_{j\in I}$. By the universal
property of direct products, we get a unique morphism
$g_i:X_i\to \wh{X}$ such that $f^j\circ g_i = \delta_{ji}$
for every $j\in I$.\\

Now take the set of morphisms $\{X_i\stackrel{g_i}{\longrightarrow}\wh{X}\}
_{i\in I}$. By the universal property of direct sums, we get
a unique morphism $\alpha:X\to\wh{X}$ such that $\alpha\circ f_i
= g_i$. Combining this equation with the last one the previous
paragraph, we get:
\[
f^j\circ\alpha\circ f_i = f^j\circ g_i = \delta_{ji},
\]
as claimed in the commutative diagram above.\\

I am going to give naturality of $\alpha$ as a homework problem. Namely,
to show that $\ds \alpha:\bigoplus_{i\in I} \Rightarrow \prod_{i\in I}$
is a natural transformation of functor $\CalA^I \to \CalA$ (assuming
direct sums and products over $I$ exist).\\

Let us see that when $|I|<\infty$, $\alpha$ is an isomorphism.
Let $\beta:\wh{X}\to X$ be given by:
\[
\beta = \sum_{i\in I} f_i\circ f^i \in\Hom_{\CalA}(\wh{X},X).
\]
Note that the sum is taken in the indicated abelian group, and
makes sense, since $I$ is finite.\\

\noindent $\beta\circ\alpha=\Id_X$: Note that,
by considering the collection of morphisms $\{f_i:X_i\to X\}_{i\in I}$,
and the universal property of direct sums, we know there to be
a unique morphism $h:X\to X$ for which $h\circ f_i = f_i$.
Hence, $h=\Id_X$. Therefore, it suffices to show that $(\beta\circ\alpha)\circ f_i = f_i$
for every $i\in I$.
\[
\beta\circ\alpha\circ f_i = 
\sum_{j\in I} f_j\circ (f^j\circ \alpha\circ f_i)
=\sum_{j\in I} f_j\circ \delta_{ji} = f_i.
\]
Here, we have used that $-\circ f_i$ distributes over addition
of morphisms, associativity of composition, 
and that $f^j\circ\alpha\circ f_i = \delta_{ji}$ as shown above.\\

The proof of $\alpha\circ\beta=\Id_{\wh{X}}$ is similar, and is omitted
here.
\end{pf}
\ \\

\PP{8.4}{Kernel and cokernel of a morphism}
%-----------------------------------------
Recall from \S 0.4, that a morphism $f:X\to Y$ in an arbitrary category $\CalC$
is said to be injective (resp. surjective) if it can be cancelled from
the left (resp. right). That is $f\circ h_1 = f\circ h_2$ implies
$h_1=h_2$ (resp. $g_1\circ f = g_2\circ f$ implies $g_1=g_2$).\\

For an additive category $\CalA$, the definition above can be 
rewritten as follows. $f:X\to Y$ in $\CalA$ is injective (resp.
surjective) if and only if $f\circ h=0$ implies $h=0$
(resp. $g\circ f=0$ implies $g=0$).\\

\begin{defn}
Let $\CalA$ be an additive category, and let $f:X\to Y$
be a morphism in $\CalA$. {\em Kernel} of $f$ is a pair
$(K,i)$, where $K\in \CalA$ and $i:K\to X$, satisfying:\\
\begin{itemize}
\item $f\circ i = 0$, and
\item for any morphism $g:Z\to X$, such that $f\circ g=0$,
there is a unique morphism $\ol{g}:Z\to K$ such that
$g=i\circ \ol{g}$.\\
\end{itemize}

Similarly, {\em Cokernel} of $f$ is a pair
$(C,\pi)$, where $C\in \CalA$ and $\pi:Y\to C$, satisfying:\\
\begin{itemize}
\item $\pi\circ f = 0$, and
\item for any morphism $h:Y\to Z$, such that $h\circ f=0$,
there is a unique morphism $\ol{h}:C\to Z$ such that
$h=\ol{h}\circ\pi$.
\end{itemize}
\end{defn}

If exist, kernel and cokernel of a morphism are unique, up to
unique isomorphism. This is easily seen by rephrasing the
definition given above, as representability of a functor. Namely,
given $f:X\to Y$ as before, consider the following two
functors (contravariant and covariant respectively):
\[
\mathcal{K}(f) : \CalA \to \Ab,\qquad
\mathcal{P}(f) : \CalA \to \Ab.
\]
where, on objects:
\[\mathcal{K}(f) : Z\mapsto \left\{Z\stackrel{g}{\longrightarrow}
X : f\circ g = 0\right\},\qquad \text{and}\qquad
\mathcal{P}(f) : Z\mapsto \left\{Y\stackrel{h}{\longrightarrow}
Z : h\circ f = 0\right\}.
\]

On morphisms, these functors act exactly
as the contravariant and covariant hom functors $\h^X$, $\h_Y$.
Namely, $\mathcal{K}(f) : a \mapsto -\circ a$, and
$\mathcal{P}(f) : b \mapsto b\circ -$.\\

\noindent {\bf Exercise.} Verify that kernel and cokernel of $f$
(if exist) represent $\mathcal{K}(f)$ and $\mathcal{P}(f)$
respectively.\\

This exercise implies the claimed uniqueness. The kernel
of $f$ (resp. cokernel of $f$) is denoted as usual by
$\Ker(f)$ (resp. $\Coker(f)$), often suppressing the morphism
$i$ (resp. $\pi$) from the notation.\\

\PP{8.5}{Properties of kernels and cokernels}
%--------------------------------------------
The definition given above is often depicted pictorially as
follows. Again, $\CalA$ is an additive category and $f:X\to Y$
is morphism. $\Ker(f)\stackrel{i}{\longrightarrow} X$ 
is the unique object fitting in the following diagram:
\[
\xy
(0,20)*{\boxed{\Ker(f)}}="k";
(30,20)*{X}="x"; {\ar^i "k"; "x"};
(60,20)*{Y}="y"; {\ar^f "x"; "y"};
"k"; "y" **\crv{(30,40)}?(0.9) *\dir{>}; (30,32)*{\scriptstyle{=0}};
(30,0)*{Z}="z"; {\ar_{\forall g} "z"; "x"};
{\ar_{=0} "z"; "y"};
{\ar@{-->}^{\exists!\  \ol{g}} "z"; "k"};
\endxy
\]

Similarly, $\Coker(f)$ fits in the following diagram:

\[
\xy
(60,20)*{\boxed{\Coker(f)}}="k";
(0,20)*{X}="x"; 
(30,20)*{Y}="y"; {\ar^f "x"; "y"}; {\ar^\pi "y"; "k"};
"x"; "k" **\crv{(30,40)}?(0.9) *\dir{>}; (30,32)*{\scriptstyle{=0}};
(30,0)*{Z}="z"; {\ar_{\forall h} "y"; "z"};
{\ar_{=0} "x"; "z"};
{\ar@{-->}^{\exists!\  \ol{h}} "k"; "z"};
\endxy
\]


\begin{prop}
Let $\CalA$ be an additive category, $f:X\to Y$ a morphism in
$\CalA$, and assume that its kernel and cokernel exist.\\

\begin{enumerate}
\item The morphism $i:\Ker(f)\to X$ is injective. Similarly,
the morphism $\pi:Y\to \Coker(f)$ is surjective.\\

\item $f$ is injective if, and only if $(\Ker(f),i)$ is
naturally isomorphic to $(\triv_{\CalA},0)$.
Here $0\in\Hom_{\CalA}(\triv_{\CalA},X)$.
Similarly, $f$ is surjective if, and only if
$(\Coker(f),\pi)$ is naturally isomorphic to $(\triv_{\CalA},0)$.
\end{enumerate}
\end{prop}

\begin{pf}
Let us prove the two assertions for kernel only. The proof for
cokernel is similar.\\

\noindent {\em Proof of (1):} To show that $i$ is injective,
we need to prove that it can be cancelled from the left.
That is, $i\circ a = 0$ implies $a=0$ (here, $a:Z\to \Ker(f)$ is an
arbitrary morphism in $\CalA$). Take $g=0:Z\to X$ so that $f\circ g=0$.
Now both $a$ and $0$ work as $\ol{g}$, hence by its uniqueness,
must be equal.\\

\noindent {\em Proof of (2):} Assume that $f$ is injective.
Recall that this means $f\circ a = 0$ implies $a=0$.
We will prove that $(\triv_{\CalA},
0)$ satisfies the universal property for being kernel of $f$.
It is clear that $f\circ 0 = 0$. So, let us assume that we
are given $g:Z\to X$ such that $f\circ g=0$. By injectivity
of $f$, we get that $g=0$, and hence factors uniquely through
$\ds Z\stackrel{0}{\longrightarrow}\triv_{\CalA}
\stackrel{0}{\longrightarrow} X$.\\

Conversely, assuming $0:\triv_{\CalA}\to X$ is the kernel
of $f$, we will prove that $f$ is injective. Again let
$g:Z\to X$ be such that $f\circ g=0$, and we need to
show $g=0$. By the universal property
of kernel, $g$ must factor through $\triv_{\CalA}$, that is,
$g = 0\circ \ol{g} = 0$.
\end{pf}

\end{document}
