Skip to content

Commit 954a340

Browse files
small corrections
1 parent 6ca5792 commit 954a340

File tree

2 files changed

+57
-39
lines changed

2 files changed

+57
-39
lines changed

tex/CT4P.tex

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
\usepackage{verbatim}
1313
\usepackage{ccicons}
1414
\usepackage{enumitem}
15+
\usepackage{bussproofs}
1516

1617
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1718

@@ -429,14 +430,14 @@ \section{Categories and Examples}
429430
\end{enumerate}
430431
\end{dfn}
431432

432-
\begin{intu} So what does a category represent? There are (at least) $3$ possible ways how one can think about this definition:
433-
\begin{enumerate}
434-
\item A category represents a type system in the sense that the objects are the types and each hom-set is the type\footnote{In this case, each hom-set is a type, so isn't each hom-set an object again? Categories which satisfy such a property are called \textit{cartesian closed}.} of functions. See \cref{example:hask}.
435-
\item A category represents a \textit{bag} of instances of a particular mathematical structure (e.g. sets with a notion of addition). The objects are then instances of such a mathematical theory (e.g. $(\mathbb{N},+)$) and the morphisms are structure preserving functions (e.g. functions $f$ which satisfy $f(x+y) = f(x) + f(y)$). See \cref{example:set,example:poset,monoidcategory}.
436-
\item A category represents a directed graph in the sense that an object is a vertex and a morphism is an edge.
437-
\item Anything (almost at least) can be seen as a category in some exotic way.
438-
\end{enumerate}
439-
\end{intu}
433+
% \begin{intu} So what does a category represent? There are (at least) $3$ possible ways how one can think about this definition:
434+
% \begin{enumerate}
435+
% \item A category represents a type system in the sense that the objects are the types and each hom-set is the type\footnote{In this case, each hom-set is a type, so isn't each hom-set an object again? Categories which satisfy such a property are called \textit{cartesian closed}.} of functions. See \cref{example:hask}.
436+
% \item A category represents a \textit{bag} of instances of a particular mathematical structure (e.g. sets with a notion of addition). The objects are then instances of such a mathematical theory (e.g. $(\mathbb{N},+)$) and the morphisms are structure preserving functions (e.g. functions $f$ which satisfy $f(x+y) = f(x) + f(y)$). See \cref{example:set,example:poset,monoidcategory}.
437+
% \item A category represents a directed graph in the sense that an object is a vertex and a morphism is an edge.
438+
% \item Anything (almost at least) can be seen as a category in some exotic way.
439+
% \end{enumerate}
440+
% \end{intu}
440441

441442
\begin{nota} Let $\CC$ be a category.
442443
\begin{itemize}
@@ -832,7 +833,7 @@ \section{Categories and Examples}
832833
More generally for each field $\mathbb{F}$, one can define $\MAT_\mathbb{F}$, where a morphism $f : m \to n$ is a an $n \times m$ matrix over the field $\mathbb{F}$.
833834
\end{enumerate}
834835

835-
Can you think of other categories that have natural numbers as their collection of objects? What about a category, where a morphism $f : m \to n$ is a monotonically increasing (decreasing) function from $[m]$ to $[n]$?
836+
Can you think of other categories that have natural numbers as their collection of objects? What about a category, where a morphism $f : m \to n$ is a monotonously increasing (decreasing) function from $[m]$ to $[n]$?
836837
\end{exer}
837838

838839
\begin{exer}[\cref{sol:category_of_relations}] \label{exer:category_of_relations}
@@ -887,17 +888,20 @@ \section{Isomorphisms}
887888
\end{exer}
888889

889890
\begin{exer}[\cref{sol:iso_in_sets}]\label{exer:iso_in_sets}
890-
Characterize/describe the isomorphisms in $\SET$.
891+
Describe the isomorphisms in $\SET$.
891892
\end{exer}
892893

893894
\begin{exer}[\cref{sol:iso_in_pos}]\label{exer:iso_in_pos}
894895
Describe the isomorphisms in $\POS$.
895896
\end{exer}
896897

897-
\begin{exer}[\cref{sol:iso_in_posetcategory}]\label{exer:iso_in_posetcategory} Let $(X,\leq)$ be a poset. Can you characterize/describe the isomorphisms in $\POS(X,\leq)$?
898+
\begin{exer}[\cref{sol:iso_in_posetcategory}]\label{exer:iso_in_posetcategory}
899+
Let $(X,\leq)$ be a poset.
900+
Describe the isomorphisms in $\POS(X,\leq)$.
898901
\end{exer}
899902

900-
\begin{exer} Can you characterize/describe the isomorphisms in $\MON$?
903+
\begin{exer}
904+
Describe the isomorphisms in $\MON$.
901905
\end{exer}
902906

903907
\begin{exer} Let $\mathcal{G}$ be the category generated by the following graph:
@@ -912,7 +916,7 @@ \section{Isomorphisms}
912916
\end{exer}
913917

914918
\begin{exer}[\cref{sol:iso_in_posetcategory}] \label{exer:iso_in_cats_of_nats}
915-
Can you characterize/describe the isomorphisms in $\POS(\NN,\leq)$, $\SKELFINSET$ and $\MAT$?
919+
Describe the isomorphisms in $\POS(\NN,\leq)$, $\SKELFINSET$ and $\MAT$.
916920
\end{exer}
917921

918922
\section{Sections and Retractions}
@@ -1034,10 +1038,10 @@ \section{Monomorphisms and Epimorphisms}
10341038
\end{tikzcd}
10351039
\]
10361040

1037-
Can you characterize/describe the mono- and epimorphisms in these categories?
1041+
Describe the mono- and epimorphisms in these categories.
10381042
\end{exer}
10391043

1040-
\begin{exer} Can you characterize/describe the monomorphisms, epimorphisms and isomorphisms in the category generated by the following graph:
1044+
\begin{exer} Describe the monomorphisms, epimorphisms and isomorphisms in the category generated by the following graph:
10411045
\[
10421046
\begin{tikzcd}
10431047
x \arrow[r] & y
@@ -1741,7 +1745,10 @@ \chapter{Functors}\label{sec:functors}
17411745
\end{exer}
17421746

17431747

1744-
\begin{exer}\label{ex:poset_functors} Let $(X,\leq_X)$ and $(Y,\leq_Y)$ be preordered sets. Can you characterize/describe the functors from $\PREtoCAT(X,\leq_X)$ to $\PREtoCAT(Y,\leq_Y)$ ? Before writing out the definitions, what would you expect the answer to be?
1748+
\begin{exer}\label{ex:poset_functors}
1749+
Let $(X,\leq_X)$ and $(Y,\leq_Y)$ be preordered sets.
1750+
Describe the functors from $\PREtoCAT(X,\leq_X)$ to $\PREtoCAT(Y,\leq_Y)$.
1751+
Before writing out the definitions, what would you expect the answer to be?
17451752
\end{exer}
17461753

17471754
\begin{exer}
@@ -1760,7 +1767,9 @@ \chapter{Functors}\label{sec:functors}
17601767
\end{exer}
17611768

17621769

1763-
\begin{exer}\label{ex:monoid_functors} Let $(M,m,e)$ be a monoid and let $\MONtoCAT(M,m,e)$ be its corresponding category as defined in \cref{monoidcategory}. Can you characterize/describe the functors from $\MONtoCAT(M,m,e)$ to $\SET$?
1770+
\begin{exer}\label{ex:monoid_functors}
1771+
Let $(M,m,e)$ be a monoid and let $\MONtoCAT(M,m,e)$ be its corresponding category as defined in \cref{monoidcategory}.
1772+
Describe the functors from $\MONtoCAT(M,m,e)$ to $\SET$.
17641773
\end{exer}
17651774

17661775

@@ -1939,15 +1948,19 @@ \subsection{Functor Categories}
19391948
\end{exer}
19401949

19411950
\subsection{Exercises}
1942-
\begin{exer} Let $(M,m,e)$ be a monoid and let $\MONtoCAT(M,m,e)$ be its corresponding category. Recall from \cref{ex:monoid_functors} that a functor from $\MONtoCAT(M,m,e)$ to $\SET$ is a set $X$ together with an action of $M$ on $X$, i.e. a function $\mu: M\times X\to X$ such that
1943-
\[
1944-
\forall x\in X: \mu(e,x) = x, \quad \forall n_1,n_2\in M, x\in X: \mu(n_1, \mu(n_2,x)) = \mu(m(n_1,n_2), x).
1945-
\]
1946-
We will call a set $ X $ with an action of $ M $ on $ X $ an $ M $-set.
1947-
Characterize/describe the natural transformations between $M$-sets.
1951+
\begin{exer}
1952+
Let $(M,m,e)$ be a monoid and let $\MONtoCAT(M,m,e)$ be its corresponding category. Recall from \cref{ex:monoid_functors} that a functor from $\MONtoCAT(M,m,e)$ to $\SET$ is a set $X$ together with an action of $M$ on $X$, i.e. a function $\mu: M\times X\to X$ such that
1953+
\[
1954+
\forall x\in X: \mu(e,x) = x, \quad \forall n_1,n_2\in M, x\in X: \mu(n_1, \mu(n_2,x)) = \mu(m(n_1,n_2), x).
1955+
\]
1956+
We will call a set $ X $ with an action of $ M $ on $ X $ an $ M $-set.
1957+
Describe the natural transformations between $M$-sets.
19481958
\end{exer}
19491959

1950-
\begin{exer} Let $(X,\leq_X)$ and $(Y,\leq_Y)$ be posets. Recall from \cref{ex:poset_functors} that a functor between posets corresponds with an order-preserving function, i.e. $x_1 \leq_X x_2 \implies f(x_1) \leq_Y f(x_2)$. Characterize/describe the natural transformations between order-preserving functions.
1960+
\begin{exer}
1961+
Let $(X,\leq_X)$ and $(Y,\leq_Y)$ be posets.
1962+
Recall from \cref{ex:poset_functors} that a functor between posets corresponds with an order-preserving function, i.e. $x_1 \leq_X x_2 \implies f(x_1) \leq_Y f(x_2)$.
1963+
Describe the natural transformations between order-preserving functions.
19511964
\end{exer}
19521965

19531966
\subsection{Equivalence of Categories}

tex/data.tex

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ \section{Examples}
1414
| $\Zero$ : $\NN$
1515
| $\Succ$ : $\NN \to \NN$
1616
\end{lstlisting}
17-
and the following category:
17+
18+
This inductive datatype comes with the following recursion principle:
19+
20+
21+
22+
23+
and the following category:
1824
\begin{itemize}
1925
\item Objects are triples $(X, z \in X, s : X \to X)$ with $X$ a set/type;
2026
\item Morphisms from $(X, z \in X, s : X \to X)$ to $(X', z' \in X', s' : X' \to X')$ are functions
@@ -214,9 +220,8 @@ \section{Datatypes as Initial Algebras}
214220

215221

216222
\begin{exer}
217-
Let $F$ be the endofunctor defined as in \cref{example:algebra_of_monoids},
218-
i.e. the endofunctor whose algebras correspond with monoids.
219-
Characterize/describe the $F$-algebra homomorphisms.
223+
Let $F$ be the endofunctor defined as in \cref{example:algebra_of_monoids}, i.e., the endofunctor whose algebras correspond to monoids.
224+
Describe the $F$-algebra homomorphisms.
220225
\end{exer}
221226

222227
\begin{dfn}\label{definition:category_of_Falgebras} Let $F:\CC\to \CC$ be an endofunctor. The \textbf{category of $F$-algebras}, denoted by $\ALG{F}$, is defined by the following data:
@@ -280,25 +285,25 @@ \section{Datatypes as Initial Algebras}
280285
\end{exer}
281286

282287
\begin{exer}\label{exer:bool_as_initial_algebra}
283-
Let $\mathbf{Bool}$ be the inductive data type generated by the following two constructors:
284-
\begin{lstlisting}
288+
Let $\mathbf{Bool}$ be the inductive data type generated by the following two constructors:
289+
\begin{lstlisting}
285290
True : Bool
286291
False : Bool
287-
\end{lstlisting}
288-
Define an endofunctor $F:\SET\to \SET$ such that the $F$-algebras can be characterized as triples $(X, b_1, b_2)$ with $X$ a set and $b_1,b_2\in X$.
289-
290-
Moreover, show that $(\mathsf{Bool}, \mathsf{True}, \mathsf{False})$ is an initial object in $\ALG{F}$.
292+
\end{lstlisting}
293+
Define an endofunctor $F:\SET\to \SET$ such that the $F$-algebras can be described as triples $(X, b_1, b_2)$ with $X$ a set and $b_1,b_2\in X$.
294+
295+
Moreover, show that $(\mathsf{Bool}, \mathsf{True}, \mathsf{False})$ is an initial object in $\ALG{F}$.
291296
\end{exer}
292297

293298
\begin{exer}\label{exer:coproduct_as_initial_algebra}
294-
The disjoint union (i.e., the coproduct) of two sets $X$ and $Y$ can also be characterized as an inductive data type; indeed, it is generated by the following two constructors:
295-
\begin{lstlisting}
299+
The disjoint union (i.e., the coproduct) of two sets $X$ and $Y$ can also be described as an inductive data type; indeed, it is generated by the following two constructors:
300+
\begin{lstlisting}
296301
f : X -> X+Y
297302
g : Y -> X+Y
298-
\end{lstlisting}
299-
Define an endofunctor $F:\SET\to \SET$ such that the $F$-algebras can be characterized as triples $(C, i_l, i_r)$ with $C$ a set and $i_l : X\to C, i_r : Y\to C$ be functions.
303+
\end{lstlisting}
304+
Define an endofunctor $F:\SET\to \SET$ such that the $F$-algebras can be described as triples $(C, i_l, i_r)$ with $C$ a set and $i_l : X\to C, i_r : Y\to C$ be functions.
300305

301-
Moreover, show that $(X + Y, \inl, \inr)$ is the initial object in $\ALG{F}$, where $X+Y$ is the disjoint union of $X$ and $Y$ (i.e. the coproduct in $\SET$) and $\inl:X\to X+Y, \inr:Y\to X+Y$ the canonical inclusions.
306+
Moreover, show that $(X + Y, \inl, \inr)$ is the initial object in $\ALG{F}$, where $X+Y$ is the disjoint union of $X$ and $Y$ (i.e. the coproduct in $\SET$) and $\inl:X\to X+Y, \inr:Y\to X+Y$ the canonical inclusions.
302307
\end{exer}
303308

304309
\begin{exer}\label{exer:conatural_numbers_are_not_initial}

0 commit comments

Comments
 (0)