\documentclass{article}
\input{packages}
\input{def}

\lecture{Enrichment}

\begin{document}
\maketitle

\begin{definition}[(Biased) $\cat{M}$-Enriched Category where $\cat{M}$ is a Multicategory]
A tuple $\langle O, \ob{M}, \mo{c}, \prf{a}, \mo{i}, \prf{i} \rangle$ where the components have the following types:
\begin{framed}
\begin{description}
\item[Objects $O$:] $\TYPE{1}$
\item[Morphisms $\ob{M}$:] For each pair of objects $\ob{C}_1, \ob{C}_2 : O$, an object $\ob{M}(\ob{C}_1, \ob{C}_2)$ of $\cat{M}$
\item[Compositions $\mo{c}$:] For each triple of objects $\ob{C}_1, \ob{C}_2, \ob{C}_3 : O$, an $\cat{M}$-morphism $\mo{c} : [\ob{M}(\ob{C}_1, \ob{C}_2), \ob{M}(\ob{C}_2, \ob{C}_3)] \mto \ob{M}(\ob{C}_1, \ob{C}_3)$
\item[Associativity $\prf{a}$:] For each quadruple of objects $\ob{C}_1, \ob{C}_2, \ob{C}_3, \ob{C}_4 : O$,
\begin{center}
\begin{tikzpicture}
\path (-3cm,0) \marrow{t1}{\mo{c}};
\path ($(-2cm,0) + (t1.in12)$) \marrow{r}{\mo{c}};
\draw[->] (r.in12) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (r.in22) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_2,\ob{C}_3)$} -- +(0,0);
\draw[->] (r.out) -- node[below] {$\ob{M}(\ob{C}_1, \ob{C}_3)$} (t1.in12);
\draw[->] (t1.in22) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_3,\ob{C}_4)$} -- +(0,0);
\draw[->] (t1.out) -- +(4mm,0) node[right] {$\ob{M}(\ob{C}_1,\ob{C}_4)$};
\node at (0,0) {$=$};
\path (5.5cm,0) \marrow{t2}{\mo{c}};
\path ($(-2cm,0) + (t2.in22)$) \marrow{l}{\mo{c}};
\draw[->] (l.in12) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_2,\ob{C}_3)$} -- +(0,0);
\draw[->] (l.in22) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_3,\ob{C}_4)$} -- +(0,0);
\draw[->] (l.out) -- node[above] {$\ob{M}(\ob{C}_2,\ob{C}_4)$} (t2.in22);
\draw[->] (t2.in12) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (t2.out) -- +(4mm,0) node[right] {$\ob{M}(\ob{C}_1,\ob{C}_4)$};
\end{tikzpicture}
\end{center}
\item[Identities $\mo{i}$:] For each object $\ob{C} : O$, an $\cat{M}$-morphism $\mo{i} : \nil \mto \ob{M}(\ob{C},\ob{C})$
\item[Identity $\prf{i}$:] For each pair of object $\ob{C}_1, \ob{C}_2 : O$,
\begin{center}
\begin{tikzpicture}
\path (-4.5cm,0) \marrow{t1}{\mo{c}};
\path ($(-2cm,0) + (t1.in12)$) \marrow{r}{\mo{i}};
\draw[->] (r.out) -- node[below] {$\ob{M}(\ob{C}_1,\ob{C}_1)$} (t1.in12);
\draw[->] (t1.in22) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (t1.out) -- +(4mm,0) node[right] {$\ob{M}(\ob{C}_1,\ob{C}_2)$};
\node at (-1.5,0) {$=$};
\draw[->] (-1,0) -- node[above] {$\ob{M}(\ob{C}_1,\ob{C}_2)$} (1,0);
\node at (1.5,0) {$=$};
\path (5cm,0) \marrow{t2}{\mo{c}};
\path ($(-2cm,0) + (t2.in22)$) \marrow{l}{\mo{i}};
\draw[->] (l.out) -- node[above] {$\ob{M}(\ob{C}_2,\ob{C}_2)$} (t2.in22);
\draw[->] (t2.in12) +(-4mm,0) node[left] {$\ob{M}(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (t2.out) -- +(4mm,0) node[right] {$\ob{M}(\ob{C}_1,\ob{C}_2)$};
\end{tikzpicture}
\end{center}
\end{description}
\end{framed}
\end{definition}

\begin{example}
The following are equivalent to categories enriched in a respective multicategory:
\begin{description}
\item[$\cat{Set}$:] A category
\item[$\cat{Prost}$:] A category plus a preorder~$\leq$ on each set of morphisms such that $\mo{f}_1 \leq \mo{f}_2 \wedge \mo{g}_1 \leq \mo{g}_2 \implies \mo{f}_1 \cocomp \mo{g}_1 \leq \mo{f}_2 \cocomp \mo{g}_2$
\item[$\langle \mathbb{R}_{\geq0}, +, 0, \geq \rangle$:] A hemimetric space: a set of ``locations'' $L$ and a function $d$ specifying the ``distance'' from one location to another such that $0 \geq d(\ell, \ell)$ and $d(\ell_1, \ell_2) + d(\ell_2, \ell_3) \geq d(\ell_1, \ell_3)$
\end{description}
\end{example}

\begin{definition}[(Unbiased) $\cat{M}$-Enriched Category]
A pair $\langle O, C \rangle$ where $O : \TYPE{1}$ and $C$ is a functor of multicategories from $\cat{Path}(O)$ to $\cat{M}$.
\end{definition}

\begin{exercise}
Give a bijection between biased and unbiased $\cat{M}$-enriched categories.
\end{exercise}

\begin{remark}
The multicategory $\cat{Prost}$ has an ``underlying'' functor $U$ to the multicategory $\cat{Set}$.
We say a category~$\cat{C}$ (enriched in $\cat{Set}$) \emph{can be enriched} in $\cat{Prost}$ when its functor $C$ from $\cat{Path}(O_\cat{C})$ to $\cat{Set}$ can \emph{factor through} $U$, meaning there is a functor $C'$ from $\cat{Path}(O_\cat{C})$ to $\cat{Prost}$ such that $C' \cocomp U = C$.
\end{remark}

\begin{example}
The category $\cat{Prost}$ can be enriched in the multicategory $\cat{Prost}$.
For a pair of objects $\langle X, \leq \rangle$ and $\langle Y, \leq \rangle$ of the category $\cat{Prost}$, define $\ob{M}(\langle X, \leq \rangle, \langle Y, \leq \rangle)$ to be $M_\cat{Prost}(\langle X, \leq \rangle, \langle Y, \subseteq \rangle)$ equipped with the preorder $f \leq g$ defined by $\forall x.\; f(x) \leq g(x)$. Next we need to show that composition preserves this preorder on morphisms. If $f_1 \leq f_2$ and $g_1 \leq g_2$ then $\forall x.\; (f_1 \cocomp g_1)(x) = g_1(f_1(x)) \leq g_1(f_2(x)) \leq g_2(f_2(x)) = (f_2 \cocomp g_2)(x)$, so $f_1 \cocomp g_1 \leq g_2 \cocomp g_2$. Identity is trivially relation-preserving.
\end{example}

\begin{definition}[(Biased) $\cat{M}$-Enriched Functor from $\langle O_1, \ob{M}_1, \mo{c}_1, \noprf, \mo{i}_1, \noprf \rangle$ to $\langle O_2, \ob{M}_2, \mo{c}_2, \noprf, \mo{i}_2, \noprf \rangle$]
A tuple $\langle F, \mo{f}, \prf{d}, \prf{i} \rangle$ where the components have the following types:
\begin{framed}
\begin{description}
\item[Object Mapping $F$:] $O_1 \to O_2$
\item[Morphism ``Mapping'' $\mo{f}$:] For all pairs $\ob{C}_1, \ob{C}_2 : O_1$, an $\cat{M}$-morphism $\mo{f} : [\ob{M}_1(\ob{C}_1, \ob{C}_2)] \mto \ob{M}_2(F(\ob{C}_1), F(\ob{C}_2))$
\item[Distributivity $\prf{d}$:] For all triples of objects $\ob{C}_1, \ob{C}_2, \ob{C}_3 : O_1$:
$$\begin{tikzpicture}[trim left=-72mm]
\path (-4,0) \marrow{o2}{\mo{c}_2};
\path ($(-1,-.5) + (o2.in12)$) \marrow{f11}{\mo{f}};
\path ($(-1,.5) + (o2.in22)$) \marrow{f12}{\mo{f}};
\draw[->] (f11.in11) +(-4mm,0) node[left] {$\ob{M}_1(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (f12.in11) +(-4mm,0) node[left] {$\ob{M}_1(\ob{C}_2,\ob{C}_3)$} -- +(0,0);
\draw[->] (f11.out) -- node[anchor=north west] {\hspace{-2mm}$\ob{M}_2(F(\ob{C}_1),F(\ob{C}_2))$} (o2.in12);
\draw[->] (f12.out) -- node[anchor=south west] {\hspace{-2mm}$\ob{M}_2(F(\ob{C}_2),F(\ob{C}_3))$} (o2.in22);
\draw[->] (o2.out) -- +(4mm,0) node[right] {$\ob{M}_2(F(\ob{C}_1),F(\ob{C}_3))$};
\node at (0,0) {$=$};
\path (3,0) \marrow{o1}{\mo{c}_1};
\path ($(o1.out) + (2,0)$) \marrow{f2}{\mo{f}};
\draw[->] (o1.in12) +(-4mm,0) node[left] {$\ob{M}_1(\ob{C}_1,\ob{C}_2)$} -- +(0,0);
\draw[->] (o1.in22) +(-4mm,0) node[left] {$\ob{M}_1(\ob{C}_2,\ob{C}_3)$} -- +(0,0);
\draw[->] (o1.out) -- node[above] {\hspace{-3mm}$\ob{M}_1(\ob{C}_1,\ob{C}_3)$} (f2.in11);
\draw[->] (f2.out) -- +(4mm,0) node[right] {$\ob{M}_2(F(\ob{C}_1),F(\ob{C}_2))$};
\end{tikzpicture}$$
\item[Identity $\prf{i}$:] For all object $\ob{C} : O$,
\begin{tikzpicture}
\path (-4,0) \marrow{e2}{\mo{i}_2};
\draw[->] (e2.out) -- +(4mm,0) node[right] {$\ob{M}_2(F(\ob{C}),F(\ob{C}))$};
\node at (0,0) {$=$};
\path (1,0) \marrow{e1}{\mo{i}_1};
\path ($(e1.out) + (2,0)$) \marrow{f}{\mo{f}};
\draw[->] (e1.out) -- node[above] {$\ob{M}_1(\ob{C},\ob{C})$} (f.in11);
\draw[->] (f.out) -- +(4mm,0) node[right] {$\ob{M}_2(F(\ob{C}),F(\ob{C}))$};
\path (0,0)
\end{tikzpicture}
\end{description}
\end{framed}
\end{definition}

\begin{example}
A $\langle \mathbb{R}_{\geq0}, +, 0, \geq \rangle$-enriched functor is a nonexpansive map from a hemimetric space with location set $L_1$ and distance function $d_1$ to a hemimetric space with location set $L_2$ and distance function $d_2$, meaning a function $f : L_1 \to L_2$ such that for all locations $\ell_1, \ell_2 : L_1$ we have $d_1(\ell_1, \ell_2) \geq d_2(f(\ell_1), f(\ell_2))$.
\end{example}

\end{document}
