Skip to content

Commit

Permalink
Using the macro \Cat
Browse files Browse the repository at this point in the history
  • Loading branch information
hmemcpy committed Oct 2, 2017
1 parent 5dd3d8c commit 0ba58fc
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions src/content/1.1/Category - The Essence of Composition.tex
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ \section{Properties of Composition}\label{properties-of-composition}
This arrow loops from the object to itself. Being a unit of composition
means that, when composed with any arrow that either starts at $A$ or ends
at $A$, respectively, it gives back the same arrow. The unit arrow for
object A is called $\code{id}_A$ (\newterm{identity} on $A$). In math
object A is called $\idarrow[A]$ (\newterm{identity} on $A$). In math
notation, if \code{f} goes from $A$ to $B$ then
\[f\circ{}\code{id}_A = f\]
\[f \circ \idarrow[A] = f\]
and
\[\code{id}_B\circ{}f = f\]
\[\idarrow[B] \circ f = f\]
\end{enumerate}
When dealing with functions, the identity arrow is implemented as the
identity function that just returns back its argument. The
Expand Down
30 changes: 15 additions & 15 deletions src/content/1.10/Natural Transformations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ \section{Functor Category}\label{functor-category}
building so far. We started with a category, which is a collection of
objects and morphisms. Categories themselves (or, strictly speaking
\emph{small} categories, whose objects form sets) are themselves objects
in a higher-level category \textbf{Cat}. Morphisms in that category are
functors. A Hom-set in \textbf{Cat} is a set of functors. For instance
in a higher-level category $\Cat$. Morphisms in that category are
functors. A Hom-set in $\Cat$ is a set of functors. For instance
Cat(C, D) is a set of functors between two categories C and D.

\begin{figure}
Expand All @@ -551,15 +551,15 @@ \section{Functor Category}\label{functor-category}
A functor category {[}C, D{]} is also a set of functors between two
categories (plus natural transformations as morphisms). Its objects are
the same as the members of Cat(C, D). Moreover, a functor category,
being a category, must itself be an object of \textbf{Cat} (it so
being a category, must itself be an object of $\Cat$ (it so
happens that the functor category between two small categories is itself
small). We have a relationship between a Hom-set in a category and an
object in the same category. The situation is exactly like the
exponential object that we've seen in the last section. Let's see how we
can construct the latter in \textbf{Cat}.
can construct the latter in $\Cat$.

As you may remember, in order to construct an exponential, we need to
first define a product. In \textbf{Cat}, this turns out to be relatively
first define a product. In $\Cat$, this turns out to be relatively
easy, because small categories are \emph{sets} of objects, and we know
how to define cartesian products of sets. So an object in a product
category C × D is just a pair of objects, \code{(c, d)}, one from C
Expand All @@ -570,27 +570,27 @@ \section{Functor Category}\label{functor-category}
\code{g :: d -> d'}. These pairs of morphisms
compose component-wise, and there is always an identity pair that is
just a pair of identity morphisms. To make the long story short,
\textbf{Cat} is a full-blown cartesian closed category in which there is
$\Cat$ is a full-blown cartesian closed category in which there is
an exponential object D\textsuperscript{C} for any pair of categories.
And by ``object'' in \textbf{Cat} I mean a category, so
And by ``object'' in $\Cat$ I mean a category, so
D\textsuperscript{C} is a category, which we can identify with the
functor category between C and D.

\section{2-Categories}\label{categories}

With that out of the way, let's have a closer look at \textbf{Cat}. By
definition, any Hom-set in \textbf{Cat} is a set of functors. But, as we
With that out of the way, let's have a closer look at $\Cat$. By
definition, any Hom-set in $\Cat$ is a set of functors. But, as we
have seen, functors between two objects have a richer structure than
just a set. They form a category, with natural transformations acting as
morphisms. Since functors are considered morphisms in \textbf{Cat},
morphisms. Since functors are considered morphisms in $\Cat$,
natural transformations are morphisms between morphisms.

This richer structure is an example of a 2-category, a generalization of
a category where, besides objects and morphisms (which might be called
1-morphisms in this context), there are also 2-morphisms, which are
morphisms between morphisms.

In the case of \textbf{Cat} seen as a 2-category we have:
In the case of $\Cat$ seen as a 2-category we have:

\begin{itemize}
\tightlist
Expand Down Expand Up @@ -620,7 +620,7 @@ \section{2-Categories}\label{categories}
With two kinds of composition in a 2-category, the question arises: How
do they interact with each other?

Let's pick two functors, or 1-morphisms, in \textbf{Cat}:
Let's pick two functors, or 1-morphisms, in $\Cat$:

\begin{Verbatim}[commandchars=\\\{\}]
F :: C -> D
Expand Down Expand Up @@ -719,7 +719,7 @@ \section{2-Categories}\label{categories}
transformations, and it's part of the functor category. But what about
the horizontal composition? What category does that live in?

The way to figure this out is to look at \textbf{Cat} sideways. Look at
The way to figure this out is to look at $\Cat$ sideways. Look at
natural transformations not as arrows between functors but as arrows
between categories. A natural transformation sits between two
categories, the ones that are connected by the functors it transforms.
Expand All @@ -731,7 +731,7 @@ \section{2-Categories}\label{categories}
\end{figure}

\noindent
Let's focus on two objects of \textbf{Cat} --- categories C and D. There
Let's focus on two objects of $\Cat$ --- categories C and D. There
is a set of natural transformations that go between functors that
connect C to D. These natural transformations are our new arrows from C
to D. By the same token, there are natural transformations going between
Expand All @@ -753,7 +753,7 @@ \section{2-Categories}\label{categories}
the evident diagrams needed to prove this fact.

There is one more piece of notation that might come in handy in the
future. In this new sideways interpretation of \textbf{Cat} there are
future. In this new sideways interpretation of $\Cat$ there are
two ways of getting from object to object: using a functor or using a
natural transformation. We can, however, re-interpret the functor arrow
as a special kind of natural transformation: the identity natural
Expand Down
12 changes: 6 additions & 6 deletions src/content/3.12/Enriched Categories.tex
Original file line number Diff line number Diff line change
Expand Up @@ -431,18 +431,18 @@ \section{Self Enrichment}\label{self-enrichment}

\section{Relation to 2-Categories}\label{relation-to-2-categories}

I talked about 2-categories in the context of \textbf{Cat}, the category
I talked about 2-categories in the context of $\Cat$, the category
of (small) categories. The morphisms between categories are functors,
but there is an additional structure: natural transformations between
functors. In a 2-category, the objects are often called zero-cells;
morphisms, 1-cells; and morphisms between morphisms, 2-cells. In
\textbf{Cat} the 0-cells are categories, 1-cells are functors, and
$\Cat$ the 0-cells are categories, 1-cells are functors, and
2-cells are natural transformations.

But notice that functors between two categories form a category too; so,
in \textbf{Cat}, we really have a \newterm{hom-category} rather than a
in $\Cat$, we really have a \newterm{hom-category} rather than a
hom-set. It turns out that, just like $\Set$ can be treated as a
category enriched over $\Set$, \textbf{Cat} can be treated as a
category enriched over \textbf{Cat}. Even more generally, just like
category enriched over $\Set$, $\Cat$ can be treated as a
category enriched over $\Cat$. Even more generally, just like
every category can be treated as enriched over $\Set$, every
2-category can be considered enriched over \textbf{Cat}.
2-category can be considered enriched over $\Cat$.
8 changes: 4 additions & 4 deletions src/content/3.15/Monads, Monoids, and Categories.tex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ \section{Bicategories}\label{bicategories}
\end{figure}

\noindent
The category of categories \textbf{Cat} is an immediate example. We have
The category of categories $\Cat$ is an immediate example. We have
categories as 0-cells, functors as 1-cells, and natural transformations
as 2-cells. The laws of a 2-category tell us that 1-cells between any
two 0-cells form a category (in other words, \code{C(a, b)} is a
Expand All @@ -73,7 +73,7 @@ \section{Bicategories}\label{bicategories}
the corresponding category laws.

Let's see what this means in our canonical example of a 2-category
\textbf{Cat}. The hom-category \code{Cat(a, a)} is the category of
$\Cat$. The hom-category \code{Cat(a, a)} is the category of
endofunctors on \code{a}. Endofunctor composition plays the role of a
tensor product in it. The identity functor is the unit with respect to
this product. We've seen before that endofunctors form a monoidal
Expand Down Expand Up @@ -202,7 +202,7 @@ \section{Monads}\label{monads}
By now you should be pretty familiar with the definition of a monad as a
monoid in the category of endofunctors. Let's revisit this definition
with the new understanding that the category of endofunctors is just one
small hom-category of endo-1-cells in the bicategory \textbf{Cat}. We
small hom-category of endo-1-cells in the bicategory $\Cat$. We
know it's a monoidal category: the tensor product comes from the
composition of endofunctors. A monoid is defined as an object in a
monoidal category --- here it will be an endofunctor \code{T} ---
Expand Down Expand Up @@ -251,7 +251,7 @@ \section{Monads}\label{monads}
\noindent
That's a much more general definition of a monad using only 0-cells,
1-cells, and 2-cells. It reduces to the usual monad when applied to the
bicategory \textbf{Cat}. But let's see what happens in other
bicategory $\Cat$. But let's see what happens in other
bicategories.

Let's construct a monad in \textbf{Span}. We pick a 0-cell, which is a
Expand Down
4 changes: 2 additions & 2 deletions src/content/3.2/Adjunctions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ \section{Adjunction and Unit/Counit
can indeed use the equality of elements of a set to equality-compare
objects.

But, remember, \textbf{Cat} is really a 2-category. Hom-sets in a
But, remember, $\Cat$ is really a 2-category. Hom-sets in a
2-category have additional structure --- there are 2-morphisms acting
between 1-morphisms. In \textbf{Cat}, 1-morphisms are functors, and
between 1-morphisms. In $\Cat$, 1-morphisms are functors, and
2-morphisms are natural transformations. So it's more natural (can't
avoid this pun!) to consider natural isomorphisms as substitutes for
equality when talking about functors.
Expand Down
2 changes: 1 addition & 1 deletion src/content/3.6/Monads Categorically.tex
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ \section{Monads as Monoids}\label{monads-as-monoids}
any two functors can be composed --- the target category of one has to
be the source category of the other. That's just the usual rule of
composition of morphisms --- and, as we know, functors are indeed
morphisms in the category \textbf{Cat}. But just like endomorphisms
morphisms in the category $\Cat$. But just like endomorphisms
(morphisms that loop back to the same object) are always composable, so
are endofunctors. For any given category \emph{C}, endofunctors from
\emph{C} to \emph{C} form the functor category \code{{[}C, C{]}}. Its
Expand Down

0 comments on commit 0ba58fc

Please sign in to comment.