\documentclass{article}
\input{packages}
\input{def}

\lecture{Internalization}

\begin{document}
\maketitle

\begin{definition}[Internal Biased Monoid of a Multicategory~$\cat{M}$]
A tuple $\langle \ob{M}, \mo{o}, \prf{a}, \mo{e}, \prf{i} \rangle$ where the components have the following types:
\begin{framed}
\begin{description}
\item[Underlying Object $\ob{M}$:] $O_\cat{M}$
\item[Operator $\mo{o}$:] $[\ob{M}, \ob{M}] \mto \ob{M}$
\item[Associativity $\prf{a}$:]
\begin{tikzpicture}
\path (-2cm,0) \marrow{t1}{\mo{o}};
\path ($(-1.5cm,0) + (t1.in12)$) \marrow{r}{\mo{o}};
\draw[->] (r.in12) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (r.in22) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (r.out) -- (t1.in12);
\draw[->] (t1.in22) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (t1.out) -- +(4mm,0) node[right] {$\ob{M}$};
\node at (0,0) {$=$};
\path (4cm,0) \marrow{t2}{\mo{o}};
\path ($(-1.5cm,0) + (t2.in22)$) \marrow{l}{\mo{o}};
\draw[->] (l.in12) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (l.in22) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (l.out) -- (t2.in22);
\draw[->] (t2.in12) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (t2.out) -- +(4mm,0) node[right] {$\ob{M}$};
\path (0,0)
\end{tikzpicture}
\item[Identity Morphism $\mo{e}$:] $\nil \mto \ob{M}$
\item[Identity $\prf{i}$]
\begin{tikzpicture}
\path (-4cm,0) \marrow{t1}{\mo{o}};
\path ($(-1.5cm,0) + (t1.in12)$) \marrow{r}{\mo{e}};
\draw[->] (r.out) -- (t1.in12);
\draw[->] (t1.in22) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (t1.out) -- +(4mm,0) node[right] {$\ob{M}$};
\node at (-2,0) {$=$};
\path (0,0) \marrow{id}{\mo{id}};
\draw[->] (id.in11) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (id.out) -- +(4mm,0) node[right] {$\ob{M}$};
\node at (2,0) {$=$};
\path (5.5cm,0) \marrow{t2}{\mo{o}};
\path ($(-1.5cm,0) + (t2.in22)$) \marrow{l}{\mo{e}};
\draw[->] (l.out) -- (t2.in22);
\draw[->] (t2.in12) +(-4mm,0) node[left] {$\ob{M}$} -- +(0,0);
\draw[->] (t2.out) -- +(4mm,0) node[right] {$\ob{M}$};
\path (0,0)
\end{tikzpicture}
\end{description}
\end{framed}
\end{definition}

\begin{example}
The following are equivalent to internal monoids of respective multicategories:
\begin{description}
\item[$\cat{Set}$:] A monoid
\item[$\cat{Prost}$:] A monoid with a congruent preorder, meaning a preorder~$\leq$ on the underlying set~$M$ such that:
$$\forall m_1, m_1', m_2, m_2' : M.\; m_1 \leq m_1' \wedge m_2 \leq m_2' \implies m_1 * m_2 \leq m_1' * m_2'$$
\item[$\alg{M}$ where $\alg{M}$ is a monoid:] The identity element of $\alg{M}$
\item[$\cat{BinRel}$:] A set and a preorder on that set
\item[$\cat{SplitGraph}$:] A small category
\end{description}
\end{example}

\begin{definition}[Internal (Biased) Monoid Homomorphism from $\langle \ob{M}_1, \mo{o}_1, \noprf, \mo{e}_1, \noprf \rangle$ to $\langle \ob{M}_2, \mo{o}_2, \noprf, \mo{e}_2 \rangle$]
A tuple $\langle \mo{f}, \prf{d}, \prf{i} \rangle$ where the components have the following types:
\begin{framed}
\begin{description}
\item[Underlying Morphism $\mo{f}$:] $[\ob{M}_1] \mto \ob{M}_2$
\item[Distributivity $\prf{d}$:]
\begin{tikzpicture}
\path (-2,0) \marrow{o2}{\mo{o}_2};
\path ($(-1.5,-.5) + (o2.in12)$) \marrow{f11}{\mo{f}};
\path ($(-1.5,.5) + (o2.in22)$) \marrow{f12}{\mo{f}};
\draw[->] (f11.in11) +(-4mm,0) node[left] {$\ob{M}_1$} -- +(0,0);
\draw[->] (f12.in11) +(-4mm,0) node[left] {$\ob{M}_1$} -- +(0,0);
\draw[->] (f11.out) -- node[below] {$\ob{M}_2$} (o2.in12);
\draw[->] (f12.out) -- node[above] {$\ob{M}_2$} (o2.in22);
\draw[->] (o2.out) -- +(4mm,0) node[right] {$\ob{M}_2$};
\node at (0,0) {$=$};
\path (2,0) \marrow{o1}{\mo{o}_1};
\path ($(o1.out) + (1.5,0)$) \marrow{f2}{\mo{f}};
\draw[->] (o1.in12) +(-4mm,0) node[left] {$\ob{M}_1$} -- +(0,0);
\draw[->] (o1.in22) +(-4mm,0) node[left] {$\ob{M}_1$} -- +(0,0);
\draw[->] (o1.out) -- node[above] {$\ob{M}_1$} (f2.in11);
\draw[->] (f2.out) -- +(4mm,0) node[right] {$\ob{M}_2$};
\path (0,0)
\end{tikzpicture}
\item[Identity $\prf{i}$:]
\begin{tikzpicture}
\path (-2,0) \marrow{e2}{\mo{e}_2};
\draw[->] (e2.out) -- +(4mm,0) node[right] {$\ob{M}_2$};
\node at (0,0) {$=$};
\path (1,0) \marrow{e1}{\mo{e}_1};
\path ($(e1.out) + (1.5,0)$) \marrow{f}{\mo{f}};
\draw[->] (e1.out) -- node[above] {$\ob{M}_1$} (f.in11);
\draw[->] (f.out) -- +(4mm,0) node[right] {$\ob{M}_2$};
\path (0,0)
\end{tikzpicture}
\end{description}
\end{framed}
\end{definition}

\end{document}
