\documentclass{article}
\input{packages}
\input{def}

\lecture{Transpositions}

\begin{document}
\maketitle

\begin{definition}[$G$-Structured Arrow for a functor $G : \cat{D} \mto \cat{C}$ and an object $\ob{C} : \cat{C}$]
An object $\ob{D} : \cat{D}$ and a morphism $\mo{f} : \ob{C} \mto G(\ob{D})$.
A morphism of $G$-structured arrows from $\ob{C} \xmto{\mo{f}_1} G(\ob{D}_1)$ to $\ob{C} \xmto{\mo{f}_2} G(\ob{D}_2)$ is a morphism $\ob{D}_1 \xmto{\mo{d}} \ob{D}_2$ such that $\mo{f}_1 \cocomp G(\mo{d})$ equals $\mo{f}_2$.
\end{definition}

\begin{definition}[$F$-Costructured Arrow for a functor $F : \cat{C} \mto \cat{D}$ and an object $\ob{D} : \cat{D}$]
An object $\ob{C} : \cat{C}$ and a morphism $\mo{g} : F(\ob{C}) \mto \ob{D}$.
A morphism of $F$-structured arrows from $F(\ob{C}_1) \xmto{\mo{g}_1} \ob{D}$ to $F(\ob{C}_2) \xmto{\mo{g}_2} \ob{D}$ is a morphism $\ob{C}_1 \xmto{\mo{c}} \ob{C}_2$ such that $F(\mo{c}) \cocomp \mo{g}_2$ equals $\mo{g}_1$.
\end{definition}

\begin{definition}[Adjunction (via Universal (Co-)Structured Arrows)]
A pair of functors $F : \cat{C} \mto \cat{D}$ and $G : \cat{D} \mto \cat{C}$ with either (the following two conditions are equivalent)
\begin{itemize}
\item for each object $\ob{C} : \cat{C}$ a morphism $\ob{C} \xmto{\eta_\ob{C}} G(F(\ob{C}))$ with the property that for any object $\ob{D} : \cat{D}$ and morphism $\mo{f} : \ob{C} \mto G(\ob{D})$ there exists a unique morphism $\mo{f}^\rtol : F(\ob{C}) \mto \ob{D}$ such that $\eta_\ob{C} \cocomp G(\mo{f}^\rtol)$ equals $\mo{f}$
\item for each object $\ob{D} : \cat{D}$ a morphism $F(G(\ob{D})) \xmto{\varepsilon_\ob{D}} \ob{D}$ with the property that for any object $\ob{C} : \cat{C}$ and morphism $\mo{g} : F(\ob{C}) \mto \ob{D}$ there exists a unique morphism $\mo{g}^\ltor : \ob{C} \mto G(\ob{D})$ such that $F(g^\ltor) \cocomp \varepsilon_\ob{D}$ equals $\mo{g}$
\end{itemize}
\end{definition}

\begin{remark}
$\eta$ is called the unit. $\varepsilon$ is called the counit.
\end{remark}

\begin{definition}[Adjunction (via Transposition)]
A pair of functors $F : \cat{C} \mto \cat{D}$ and $G : \cat{D} \mto \cat{C}$ with a bijection
$\forall \ob{C} : \cat{C}, \ob{D} : \cat{D}.\; (F \ob{C} \mto \ob{D}) \xiso[\bullet^\rtol]{\bullet^\ltor} (\ob{C} \mto G \ob{D})$ that is natural with respect to the quantified $\ob{C}$ and $\ob{D}$, meaning the following holds: $\forall F\ob{C}_2 \xmto{\mo{g}} \ob{D}_1 : \cat{D}, \ob{C}_1 \xmto{\mo{c}} \ob{C}_2 : \cat{C}, \ob{D}_1 \xmto{\mo{d}} \ob{D}_2.\; (F\mo{c} \cocomp \mo{g} \cocomp \mo{d})^\ltor = \mo{c} \cocomp \mo{g}^\ltor \cocomp G\mo{d}$, or equivalently $\forall \ob{C}_2 \xmto{\mo{f}} G\ob{D}_1 : \cat{C}, \ob{C}_1 \xmto{\mo{c}} \ob{C}_2 : \cat{C}, \ob{D}_1 \xmto{\mo{d}} \ob{D}_2.\; (\mo{c} \cocomp \mo{f} \cocomp G\mo{d})^\rtol = F\mo{c} \cocomp \mo{f}^\rtol \cocomp \mo{d}$.
\end{definition}

\begin{exercise}
Prove that the above two definitions of adjunction are equivalent (i.e.~there is a bijection between them).
\end{exercise}

\begin{definition}[Left/Right Adjoint]
Given an adjuntion with $F$ and $G$ as above, $F$ is called the left adjoint and $G$ is called the right adjoint. A functor is called a left/right adjoint if it is the left/right adjoint of some adjunction.
\end{definition}

\begin{remark}
The reason $F$ is the left whereas $G$ is the right is that the isomoprhism is between arrows with $F$ applied to the domain (i.e.~to the left of $\mto$) and arrows with $G$ applied to the codomain (i.e.~to the right of $\mto$). We use $^\ltor$ because changes morphisms from the left form into the right form, and $^\rtol$ does the reverse.
\end{remark}

\begin{exercise}
Suppose functors $F$ and $G$ have two ways to instantiate $\eta$, $\varepsilon$, or the isomorphism. Prove that these two instantiations must be isomoprhic to each other according to the appropriate notion of isomorphism.
\end{exercise}

\begin{notation}
$F \adjto G$ means that $F$ and $G$ are the left and right adjoints of some adjunction.
\end{notation}

\begin{example}
A subcategory $\cat{S} \xmono{I} \cat{C}$ is reflective precisely when $I$ is a right adjoint.
The left adjoint is $R$. The unit is the reflection arrows.
\end{example}

\begin{example}
The functor $F : \cat{Set} \mto \cat{Mon}$ mapping a set $X$ to $(\List X)_{\append}$ is left adjoint to the underlying functor $U : \cat{Mon} \mto \cat{Set}$.
\end{example}

\begin{example}
The functor $F : \cat{Set} \mto \cat{Alg}(2,0)$ mapping a set $X$ to the algebra of expressions with a binary operation, a nullary operation, and all free variables in $X$, and mapping functions $f$ to the algebra homomorphism simply using $f$ to rename variables in expressions, is left adjoint to the underlying functor $U : \cat{Alg}(2,0) \mto \cat{Set}$. If $\theta$ is a function from $X$ to elements of some algebra, then $f^\rtol$ is the algebra homomorphism mapping expressions to their evaluation in that algebra using the valuation $\theta$ for variables.
\end{example}

\begin{remark}
In general, a left adjoint to an underlying functor is called a free functor. Consequently, $(\List X)_{\append}$ is called the free monoid of $X$.
\end{remark}

\begin{exercise}
Show that the inclusion functor $\cat{Set} \mono \cat{Rel}$ has a right adjoint. This means $\cat{Set}$ is a \emph{coreflective} subcategory of $\cat{Rel}$.
\end{exercise}

\end{document}
