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

\lecture{Confidentiality and Integrity}

\begin{document}
\maketitle

\begin{theorem}
In $\cat{CAT}$, given $\cat{E}$ and $\cat{C}$, let $\pi$ be the functor from $\cat{E}$ to $(\cat{E} \pitchfork \cat{C}) \expto \cat{C}$ demonstrating that $\cat{E} \pitchfork \cat{C}$ is a power.
Then, provided $\cat{C}$ has products, for each $\ob{E} : \cat{E}$, the functor $\pi_\ob{E} : \cat{E} \pitchfork \cat{C} \mto \cat{C}$ has a right adjoint, and, provided $\cat{C}$ has coproducts, $\pi_\ob{E}$ also has a left adjoint.

Let $C_\ob{E} : \cat{C} \mto \cat{E} \pitchfork \cat{C}$ be a right adjoint to $\pi_\ob{E}$.
This means that there is a morphism $\mo{c}_{\ob{E}, \ob{C}} : \pi_\ob{E}(C_\ob{E}(\ob{C})) \mto \ob{C}$ for every object $\ob{C}$ of $\cat{C}$, and for every object $\ob{P}$ of $\cat{E} \pitchfork \cat{C}$ and morphism $\mo{p} : \pi_\ob{E}(\ob{P}) \mto \ob{C}$, there exists a unique morphism $\mo{p}^\ltor : \ob{P} \mto C_\ob{E}(\ob{C})$ in $\cat{E} \pitchfork \cat{C}$ such that $\pi_\ob{E}(\mo{p}^\ltor) \cocomp \mo{c}_{\ob{E}, \ob{C}}$ equals $\mo{p}$.
To construct such a $C_\ob{E}$, recall that an object of $\cat{E} \pitchfork \cat{C}$ is a functor from $\cat{E}$ to $\cat{C}$.
Consequently, for any such object $\ob{P}$ the morphism $\mo{p} : \pi_\ob{E}(\ob{P}) \mto \ob{C}$ provides a morphism from $\ob{P}(\ob{E}')$ for each object $\ob{E}'$ and morphism $\mo{e} : \ob{E}' \mto \ob{E}$ of $\cat{E}$, given by $\ob{P}(\mo{e}) \cocomp \mo{p}$.
So, we can define $C_\ob{E}(\ob{C})(\ob{E}')$ to be $\bigwith_{\mo{e} : \ob{E}' \mto \ob{E}} \ob{C}$, meaning $\ob{C}$ producted with itself once for each morphism $\ob{E}' \mto \ob{E}$, and every $\ob{P}(\ob{E}')$ will have a morphism to $C_\ob{E}(\ob{C})(\ob{E}')$ given by $\langle \ob{P}(\mo{e}) \cocomp \mo{p} \rangle_{\mo{e} : \ob{E}' \mto \ob{E}}$.
Also, given an object $\ob{E}''$ and morphism $\mo{e}' : \ob{E}'' \mto \ob{E}'$, we can define $C_\ob{E}(\mo{e}')$ to be $\langle \pi_{\ob{e}' \cocomp \mo{e}} \rangle_{\mo{e} : \ob{E}' \mto \ob{E}}$, and then the collection of morphisms presented earlier is guaranteed to form a natural transformation from $\ob{P}$ to $C_\ob{E}(\ob{C})$, i.e.~a morphism of $\cat{E} \pitchfork \cat{C}$.
Finally, we can define $\mo{c}_{\ob{E}, \ob{C}} : \pi_\ob{E}(I_\ob{E}(\ob{C})) \mto \ob{C}$ to be $\pi_{\id_\ob{E}} : \left( \bigwith_{\mo{e} : \ob{E} \mto \ob{E}} \ob{C} \right) \mto \ob{C}$, and so $\langle \ob{P}(\mo{e}) \cocomp \mo{p} \rangle_{\mo{e} : \ob{E} \mto \ob{E}} \cocomp \pi_\id$ equals $\ob{P}(\id_\ob{E}) \cocomp \mo{p}$ which equals $\mo{p}$ as desired.
$C_\ob{E}$ can be extended into a functor because $\with$ is functorial and $\pi$ is natural.

A similar argument applies to the left adjoint.
Let $I_\ob{E} : \cat{C} \mto \cat{E} \pitchfork \cat{C}$ be a left adjoint to $\pi_\ob{E}$.
This means that there is a morphism $\mo{i}_{\ob{E}, \ob{C}} : \ob{C} \mto \pi_\ob{E}(I_\ob{E}(\ob{C}))$ for every object $\ob{C}$ of $\cat{C}$, and for every object $\ob{P}$ of $\cat{E} \pitchfork \cat{C}$ and morphism $\mo{p} : \ob{C} \mto \pi_\ob{E}(\ob{P})$, there exists a unique morphism $\mo{p}^\rtol : I_\ob{E}(\ob{C}) \mto \ob{P}$ in $\cat{E} \pitchfork \cat{C}$ such that $\mo{i}_{\ob{E}, \ob{C}} \cocomp \pi_\ob{E}(\mo{p}^\rtol)$ equals $\mo{p}$.
To construct such a $I_\ob{E}$, recall that an object of $\cat{E} \pitchfork \cat{C}$ is a functor from $\cat{E}$ to $\cat{C}$.
Consequently, for any such object $\ob{P}$ the morphism $\mo{p} : \ob{C} \mto \pi_\ob{E}(\ob{P})$ provides a morphism to $\ob{P}(\ob{E}')$ for each object $\ob{E}'$ and morphism $\mo{e} : \ob{E} \mto \ob{E}'$ of $\cat{E}$, given by $\mo{p} \cocomp \ob{P}(\mo{e})$.
So, we can define $C_\ob{E}(\ob{C})(\ob{E}')$ to be $\bigoplus_{\mo{e} : \ob{E} \mto \ob{E}'} \ob{C}$, meaning $\ob{C}$ coproducted with itself once for each morphism $\ob{E} \mto \ob{E}'$, and every $\ob{P}(\ob{E}')$ will have a morphism from $C_\ob{E}(\ob{C})(\ob{E}')$ given by $[ \mo{p} \cocomp \ob{P}(\mo{e}) ]_{\mo{e} : \ob{E} \mto \ob{E}'}$.
Also, given an object $\ob{E}''$ and morphism $\mo{e}' : \ob{E}' \mto \ob{E}''$, we can define $C_\ob{E}(\mo{e}')$ to be $[ \kappa_{\ob{e} \cocomp \mo{e}'} ]_{\mo{e} : \ob{E} \mto \ob{E}'}$, and then the collection of morphisms presented earlier is guaranteed to form a natural transformation from $C_\ob{E}(\ob{C})$ to $\ob{P}$, i.e.~a morphism of $\cat{E} \pitchfork \cat{C}$.
Finally, we can define $\mo{i}_{\ob{E}, \ob{C}} : \ob{C} \mto \pi_\ob{E}(C_\ob{E}(\ob{C}))$ to be $\kappa_{\id_\ob{E}} : \ob{C} \mto \bigoplus_{\mo{e} : \ob{E} \mto \ob{E}} \ob{C}$, and so $\kappa_{\id_\ob{E}} \cocomp [ \mo{p} \cocomp \ob{P}(\mo{e}) ]_{\mo{e} : \ob{E} \mto \ob{E}}$ equals $\mo{p} \cocomp \ob{P}(\id_\ob{E})$ which equals $\mo{p}$ as desired.
$I_\ob{E}$ can be extended into a functor because $\oplus$ is functorial and $\kappa$ is natural.
\end{theorem}

\end{document}