Skip to content

Commit

Permalink
Add natural transformations definition (#33)
Browse files Browse the repository at this point in the history
* Write introduction

* Create theorem for natural transformation

* Create utils for natural transformation

Also add comments to other util commands

* Write definition for natural transformation

* Change some arrow definitions with explicitmorph

* Fix natural transformation introduction

* Fix notation

* Remove more parentheses in functor application
  • Loading branch information
MatBon01 authored Apr 7, 2023
1 parent 550ce45 commit d445179
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
14 changes: 10 additions & 4 deletions report/background/categorytheory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ \subsection{Categories}
\begin{categorydef}
A \emph{category} \cat{C} is a set\footnote{In more rigorous definitions one must be careful of defining the collections of objects as a set lest Russell's paradox comes into play}\todo{Make sure that this is correct.} of \emph{objects} \objs{C}, such as \obj{a}, \obj{b}, \obj{c}, and \emph{morphisms} (or \emph{arrows}) \morphs{C} between them, such as \morph{f}, \morph{g}. We require that:
\begin{itemize}
\item There are two operations; \emph{domain} which associates with every arrow \morph{f} an object $\obj{a} = \domain{f}$ and \emph{codomain} which associates with every arrow \morph{f} an object $\obj{b} = \codomain{f}$. We can now express this information as $\morph{f}: \obj{a} \to \obj{b}$.\footnote{Though we emphasise the distinction between a function and a morphism.}
\item There is a composition rule between morphisms such that given $\morph{f}: \obj{a} \to \obj{b}$ and $\morph{g}: \obj{b} \to \obj{c}$, there is another arrow $\morph{g} \circ \morph{f}: \obj{a} \to \obj{c}$ in \morphs{C}.
\item Composition of arrows is associative. That is, for an additional object \obj{d} and arrow $\morph{h}: \obj{c} \to \obj{d}$ the resulting morphisms $\morph{h} \circ \left(\morph{g} \circ \morph{f}\right)$ and $\left(\morph{h} \circ \morph{g}\right) \circ \morph{f}$ coincide in \morphs{C}.
\item There are two operations; \emph{domain} which associates with every arrow \morph{f} an object $\obj{a} = \domain{f}$ and \emph{codomain} which associates with every arrow \morph{f} an object $\obj{b} = \codomain{f}$. We can now express this information as \explicitmorph{f}{a}{b}.\footnote{Though we emphasise the distinction between a function and a morphism.}
\item There is a composition rule between morphisms such that given \explicitmorph{f}{a}{b} and \explicitmorph{g}{b}{c}, there is another arrow \explicitmorph{\morph{g} \circ \morph{f}}{a}{c} in \morphs{C}.
\item Composition of arrows is associative. That is, for an additional object \obj{d} and arrow \explicitmorph{h}{c}{d} the resulting morphisms $\morph{h} \circ \left(\morph{g} \circ \morph{f}\right)$ and $\left(\morph{h} \circ \morph{g}\right) \circ \morph{f}$ coincide in \morphs{C}.
\item Every object \obj{a} is assigned an arrow $\id{a}: \obj{a} \to \obj{a}$ in \morphs{C}, called the \emph{identity morphism}.
\item Composition with the identity morphism is the identity on morphisms. Explicitly, given the arrow $\morph{f}: \obj{a} \to \obj{b}$, we have $\morph{f} \circ \id{a} = \id{b} \circ \morph{f} = \morph{f}$.
\item Composition with the identity morphism is the identity on morphisms. Explicitly, given the arrow \explicitmorph{f}{a}{b}, we have $\morph{f} \circ \id{a} = \id{b} \circ \morph{f} = \morph{f}$.
\end{itemize}
\end{categorydef}
\todo{introduce hom-set}
Expand All @@ -30,6 +30,12 @@ \subsection{Functors}
Intuitively, it should be obvious that categories and functors themselves form a category, \commoncatname{Cat}.\\

\subsection{Natural transformations}
\theoremstyle{definition}\newtheorem*{nattransdef}{Natural Transformation}
We now can explore an intuitive way of relating two functors, called an \emph{natural transformation}. A natural transformation can be seen as a projection of one functor space to another and is in essence a family of arrows that describes this translation.
\begin{nattransdef}
Given two functors $\functor{F}, \functor{G} : \cat{C} \to \cat{D}$ a \emph{natural transformation} $\nattrans{\tau}: \functor{F} \to \functor{G}$ associates to each element $\obj{a} \in \objs{C}$ an arrow $\nattransapply{\tau}{a} \in \morphs{D}$ such that $\nattransapply{\tau}{a}: \functorobj{F}{a} \to \functorobj{G}{a}$. Additionally, for $\obj{b} \in \cat{C}$ and \explicitmorph{f}{a}{b} a morphism in \cat{C}, we also require that $\nattransapply{\tau}{b} \circ \functormorph{F}{f} = \functormorph{G}{f} \circ \nattransapply{\tau}{a}$.

\end{nattransdef}
\subsection{Adjunctions}
\todo{Describe why adjunctions are such a key character in this paper}
\todo{Add more information between here}
Expand Down
17 changes: 9 additions & 8 deletions report/background/utils.sty
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
\newcommand{\morphs}[1]{\ensuremath{\mathrm{Mor}_{\cat{#1}}}}
\newcommand{\obj}[1]{\ensuremath{\mathnormal{#1}}}
\newcommand{\morph}[1]{\ensuremath{\mathnormal{#1}}}
\newcommand{\explicitmorph}[3]{\ensuremath{\morph{#1}: \obj{#2} \to \obj{#3}}}
\newcommand{\domain}[1]{\ensuremath{\mathrm{dom}\,\morph{#1}}}
\newcommand{\codomain}[1]{\ensuremath{\mathrm{cod}\,\morph{#1}}}
\newcommand{\id}[1]{\ensuremath{\mathrm{id}_{\obj{#1}}}}
\newcommand{\codomain}[1]{\ensuremath{\mathrm{cod}\,\morph{#1}}} % codomain of a category
\newcommand{\id}[1]{\ensuremath{\mathrm{id}_{\obj{#1}}}} % id arrow in a category
\newcommand{\commoncatname}[1]{\ensuremath{\mathrm{#1}}}

% Functor
\newcommand{\functor}[1]{\ensuremath{\mathnormal{#1}}}
\newcommand{\functorobj}[2]{\ensuremath{\functor{#1} \obj{#2}}}
\newcommand{\functormorph}[2]{\ensuremath{\functor{#1} \morph{#2}}}
\newcommand{\functor}[1]{\ensuremath{\mathnormal{#1}}} % a functor
\newcommand{\functorobj}[2]{\ensuremath{\functor{#1} \obj{#2}}} % a functor applied to an object
\newcommand{\functormorph}[2]{\ensuremath{\functor{#1} \morph{#2}}} % a functor applied to a morphism
\newcommand{\nattrans}[1]{\ensuremath{#1}} % natural transformation
\newcommand{\nattransapply}[2]{\ensuremath{\nattrans{#1}_{#2}}} % application of a natural transformation

% Pointed set
\newcommand{\pset}[2]{\ensuremath{\left(#1,\,#2\right)}}
Expand All @@ -31,4 +32,4 @@
\newcommand{\select}[2]{\ensuremath{\sigma_{#1}\!\left(\relation{#2}\right)}}
\newcommand{\natjoin}[2]{\ensuremath{\relation{#1}\bowtie\relation{#2}}}
\newcommand{\thetajoin}[3]{\ensuremath{\relation{#2}\bowtie_{#1}\relation{#3}}}
\newcommand{\equijoin}[4]{\ensuremath{\relation{#1}\,{}_{#2}\!\bowtie_{\:#4}\relation{#3}}}
\newcommand{\equijoin}[4]{\ensuremath{\relation{#1}\,{}_{#2}\!\bowtie_{\:#4}\relation{#3}}}

0 comments on commit d445179

Please sign in to comment.