Replace hand-drawn commutative diagrams with TeX (#99)
* preamble: add diagram package tikz-cd Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.2: rewrite diagrams in tikz-cd Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.9: rewrite diagrams in tikz-cd Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.12: rewrite diagrams in tikz-cd Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * 3.12: fix typo, missing \ on cat Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * 3.12: adjust id.jpg size to improve pagination Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * 2.4: fix typo, missing \ on cat Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.12: use \id from category.tex instead of \rm{id} Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.14: rewrite diagrams in tikz-cd Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * content/3.12: correct \rho -> \lambda on commutative diagram Signed-off-by: Marcello Seri <marcello.seri@gmail.com> * README: add myself among the contributors Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
@ -57,6 +57,7 @@ Thanks to the following people for contributing corrections/conversions:
|
||||
* Paolo G. Giarrusso
|
||||
* Adi Shavit
|
||||
* Mico from the TeX.StackExchange community
|
||||
* Marcello Seri
|
||||
* ...and many others!
|
||||
|
||||
License
|
||||
|
@ -145,7 +145,7 @@ We've seen that, for every choice of an object $a$ in $\cat{C}$,
|
||||
we get a functor from $\cat{C}$ to $\Set$. This kind of
|
||||
structure-preserving mapping to $\Set$ is often called a
|
||||
\newterm{representation}. We are representing objects and morphisms of
|
||||
$cat{C}$ as sets and functions in $\Set$.
|
||||
$\cat{C}$ as sets and functions in $\Set$.
|
||||
|
||||
The functor $\cat{C}(a, -)$ itself is sometimes called representable.
|
||||
More generally, any functor $F$ that is naturally isomorphic to
|
||||
|
@ -89,12 +89,30 @@ The associator and the unitors must satisfy coherence conditions:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=80mm]{images/assoc.jpg}
|
||||
\begin{tikzcd}[row sep=large]
|
||||
((a \otimes b) \otimes c) \otimes d
|
||||
\arrow[d, "\alpha_{(a \otimes b)cd}"]
|
||||
\arrow[rr, "\alpha_{abc} \otimes \id_d"]
|
||||
& & (a \otimes (b \otimes c)) \otimes d
|
||||
\arrow[d, "\alpha_{a(b \otimes c)d}"] \\
|
||||
(a \otimes b) \otimes (c \otimes d)
|
||||
\arrow[rd, "\alpha_{ab(c \otimes d)}"]
|
||||
& & a \otimes ((b \otimes c) \otimes d)
|
||||
\arrow[ld, "\id_a \otimes \alpha_{bcd}"] \\
|
||||
& a \otimes (b \otimes (c \otimes d))
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=60mm]{images/idcoherence.jpg}
|
||||
\begin{tikzcd}[row sep=large]
|
||||
(a \otimes i) \otimes b
|
||||
\arrow[dr, "\rho_{a} \otimes \id_b"']
|
||||
\arrow[rr, "\alpha_{aib}"]
|
||||
& & a \otimes (i \otimes b)
|
||||
\arrow[dl, "\id_a \otimes \lambda_b"] \\
|
||||
& a \otimes b
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -156,7 +174,7 @@ where $i$ is the tensor unit in $\cat{V}$.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=60mm]{images/id.jpg}
|
||||
\includegraphics[width=40mm]{images/id.jpg}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -165,20 +183,48 @@ $\cat{V}$:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=80mm]{images/compcoherence.jpg}
|
||||
\begin{tikzcd}[column sep=large]
|
||||
(\cat{C}(c,d) \otimes \cat{C}(b,c)) \otimes \cat{C}(a,b)
|
||||
\arrow[r, "\circ\otimes\id"]
|
||||
\arrow[dd, "\alpha"]
|
||||
& \cat{C}(b,d) \otimes \cat{C}(a,b)
|
||||
\arrow[dr, "\circ"] \\
|
||||
& & \cat{C}(a,d) \\
|
||||
\cat{C}(c,d) \otimes (\cat{C}(b,c) \otimes \cat{C}(a,b))
|
||||
\arrow[r, "\id\otimes\circ"]
|
||||
& \cat{C}(c,d) \otimes \cat{C}(a,c)
|
||||
\arrow[ur, "\circ"]
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
Unit laws are likewise expressed in terms of unitors:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=70mm]{images/rightid.jpg}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=70mm]{images/leftid.jpg}
|
||||
\centering
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[row sep=large]
|
||||
\cat{C}(a,b) \otimes i
|
||||
\arrow[rr, "\id \otimes j_a"]
|
||||
\arrow[dr, "\rho"]
|
||||
& & \cat{C}(a,b) \otimes \cat{C}(a,a)
|
||||
\arrow[dl, "\circ"] \\
|
||||
& \cat{C}(a,b)
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\hspace{1cm}
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[row sep=large]
|
||||
i \otimes \cat{C}(a,b)
|
||||
\arrow[rr, "j_b \otimes \id"]
|
||||
\arrow[dr, "\lambda"]
|
||||
& & \cat{C}(b,b) \otimes \cat{C}(a,b)
|
||||
\arrow[dl, "\circ"] \\
|
||||
& \cat{C}(a,b)
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\section{Preorders}
|
||||
@ -265,9 +311,9 @@ us that the distance from $a$ to $a$ is always zero.
|
||||
Check!
|
||||
|
||||
Now let's talk about composition. We start with the tensor product of
|
||||
two abutting hom-objects, $cat{C}(b, c) \otimes \cat{C}(a, b)$. We have defined
|
||||
two abutting hom-objects, $\cat{C}(b, c) \otimes \cat{C}(a, b)$. We have defined
|
||||
the tensor product as the sum of the two distances. Composition is a
|
||||
morphism in $\cat{V}$ from this product to $cat{C}(a, c)$. A morphism
|
||||
morphism in $\cat{V}$ from this product to $\cat{C}(a, c)$. A morphism
|
||||
in $\cat{V}$ is defined as the greater-or-equal relation. In other words,
|
||||
the sum of distances from $a$ to $b$ and from $b$
|
||||
to $c$ is greater than or equal to the distance from $a$
|
||||
@ -297,7 +343,16 @@ preservation of composition means that the following diagram commute:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=80mm]{images/functorcomp.jpg}
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
\cat{C}(b,c) \otimes \cat{C}(a,b)
|
||||
\arrow[r, "\circ"]
|
||||
\arrow[d, "F_{bc} \otimes F_{ab}"]
|
||||
& \cat{C}(a,c)
|
||||
\arrow[d, "F_{ac}"] \\
|
||||
\cat{D}(F\ b, F\ c) \otimes \cat{D}(F\ a, F\ b)
|
||||
\arrow[r, "\circ"]
|
||||
& \cat{D}(F\ a, F\ c)
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -306,7 +361,12 @@ morphisms in $\cat{V}$ that ``select'' the identity:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=70mm]{images/functorid.jpg}
|
||||
\begin{tikzcd}[row sep=large]
|
||||
& i \arrow[dl, "j_a"'] \arrow[dr, "j_{F\ a}"] & \\
|
||||
\cat{C}(a,a)
|
||||
\arrow[rr, "F_{aa}"]
|
||||
& & \cat{D}(F\ a, F\ a)
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\section{Self Enrichment}
|
||||
|
Before Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 81 KiB |
@ -463,7 +463,10 @@ $\cat{L}(n, 1)$.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=60mm]{images/liftl.png}
|
||||
\begin{tikzcd}[column sep=large]
|
||||
\cat{L}(m, 1) \arrow[r] & \cat{L}(n, 1)\\
|
||||
{}^m \bullet \arrow[r, "f"'] & \bullet^n
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -490,7 +493,16 @@ identified.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=80mm]{images/equalize1.png}
|
||||
\begin{tikzcd}
|
||||
& a^n \times \cat{L}(m, 1)
|
||||
\arrow[dl, "\langle f {,} \id \rangle"']
|
||||
\arrow[dr, "\langle \id {,} f \rangle"]
|
||||
& \\
|
||||
a^n \times \cat{L}(m, 1)
|
||||
& \scalebox{2.5}[1]{\sim}
|
||||
& a^n \times \cat{L}(n, 1) \\
|
||||
& f \Colon m \to n &
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -566,7 +578,16 @@ by lifting $0 \to n$ in two different ways.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=60mm]{images/equalize2.png}
|
||||
\begin{tikzcd}
|
||||
& a^n \times \cat{L}(0, 1)
|
||||
\arrow[dl, "\langle f {,} \id \rangle"']
|
||||
\arrow[dr, "\langle \id {,} f \rangle"]
|
||||
& \\
|
||||
a^0 \times \cat{L}(0, 1)
|
||||
& \scalebox{2.5}[1]{\sim}
|
||||
& a^n \times \cat{L}(n, 1) \\
|
||||
& f \Colon 0 \to n &
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
|
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -156,11 +156,20 @@ diagrams commute:
|
||||
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\includegraphics[width=40mm]{images/triangles.png}
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
L \arrow[rd, equal] \arrow[r, "L \circ \eta"]
|
||||
& L \circ R \circ L \arrow[d, "\epsilon \circ L"] \\
|
||||
& L
|
||||
\end{tikzcd}
|
||||
\end{subfigure}%
|
||||
\hspace{1cm}
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\includegraphics[width=44.5mm]{images/triangles-2.png}
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
R \arrow[rd, equal] \arrow[r, "\eta \circ R"]
|
||||
& R \circ L \circ R \arrow[d, "R \circ \epsilon"] \\
|
||||
& R
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 26 KiB |
@ -44,13 +44,25 @@ diagrams describe the two conditions (I replaced $m$ with
|
||||
$T$ in anticipation of what follows):
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1.81250in]{images/talg1.png}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=2.40625in]{images/talg2.png}
|
||||
\centering
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
a \arrow[rd, equal] \arrow[r, "\eta_a"]
|
||||
& Ta \arrow[d, "alg"] \\
|
||||
& a
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\hspace{1cm}
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
T(Ta) \arrow[r, "T\ alg"] \arrow[d, "\mu_a"]
|
||||
& Ta \arrow[d, "alg"] \\
|
||||
Ta \arrow[r, "alg"]
|
||||
& a
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -168,7 +180,12 @@ that it's a homomorphism of T-algebras:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=2.57292in]{images/talg31.png}
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
T(Ta) \arrow[r, "T f"] \arrow[d, "\mu_a"]
|
||||
& Ta \arrow[d, "f"] \\
|
||||
Ta \arrow[r, "f"]
|
||||
& a
|
||||
\end{tikzcd}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -180,8 +197,24 @@ To complete the adjunction we also need to show that the unit and the
|
||||
counit satisfy triangular identities. These are:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{images/talg4.png}
|
||||
\centering
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
Ta \arrow[rd, equal] \arrow[r, "T \eta_a"]
|
||||
& T(Ta) \arrow[d, "\mu_a"] \\
|
||||
& Ta
|
||||
\end{tikzcd}
|
||||
\end{subfigure}%
|
||||
\hspace{1cm}
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
a \arrow[rd, equal] \arrow[r, "\eta_a"]
|
||||
& Ta \arrow[d, "f"] \\
|
||||
& a
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
@ -301,8 +334,25 @@ $W$. We can define a category of coalgebras that are compatible
|
||||
with a comonad. They make the following diagrams commute:
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{images/talg5.png}
|
||||
\centering
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
a \arrow[rd, equal]
|
||||
& Wa \arrow[l, "\epsilon_a"'] \\
|
||||
& a \arrow[u, "coa"']
|
||||
\end{tikzcd}
|
||||
\end{subfigure}%
|
||||
\hspace{1cm}
|
||||
\begin{subfigure}
|
||||
\centering
|
||||
\begin{tikzcd}[column sep=large, row sep=large]
|
||||
W(Wa)
|
||||
& Wa \arrow[l, "W\ coa"'] \\
|
||||
Wa \arrow[u, "\delta_a"]
|
||||
& a \arrow[u, "coa"] \arrow[l, "coa"']
|
||||
\end{tikzcd}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\noindent
|
||||
|
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 79 KiB |
@ -53,6 +53,9 @@
|
||||
\DeclareMathDelimiter{\lbrace}{\mathopen}{parenthesis}{"7B}{largesymbols}{"08}
|
||||
\DeclareMathDelimiter{\rbrace}{\mathclose}{parenthesis}{"7D}{largesymbols}{"09}
|
||||
|
||||
% Use tikz-cd for commutative diagrams
|
||||
\usepackage{tikz-cd}
|
||||
|
||||
\usepackage{fancyvrb}
|
||||
\fvset{fontsize=\small}
|
||||
|
||||
|