\documentclass[draft]{article}
\input homework
\input theorem
\usepackage{color}
\title{A Comonadic Generalization of {\bf Top}}
\author{Jason Reed}
\def\ppf{p}
\def\T{\mathcal{T}}
\def\C{\mathbf{C}}
\def\Cat{\mathbf{Cat}}
\def\Top{\mathbf{Top}}
\def\Sets{\mathbf{Sets}}
\def\Pspa{P\mathbf{Spa}}
\def\CAT{\mathbf{CAT}}
\begin{document}
\maketitle

Consider an object $P : \C \to \Cat$ of the coslice category
$\CAT/\Cat$.  A {\em $P$-space} is defined as pair $(C, U, \epsilon,
\delta)$ where $C$ is an object of $\C$, and $U$ is a comonad (with
counit $\epsilon$ and comultiplication $\delta$) in the category $PC$.
We usually just refer to $C$ when the naming of the remaining pieces
is evident.  A {\em $P$-continuous map} $C_1 \to C_2$
between $P$-spaces is given by a pair $(f , \gamma)$ where $f : C_1
\to C_2$ and $\gamma$ is a natural transformation $Pf \circ U_1 \to
U_2 \circ Pf$ such that (abbreviating $Pf = \ppf$)


$$\begin{diagram}
\ppf   U_1 & \rTo^{\gamma} & U_2  \ppf \\
\dTo<{\ppf  \delta_1}\\
 \ppf   U_1^2 &&\dTo>{\delta_2}\\
 \dTo<{\gamma_{U_1}} \\
 U_2 \ppf  U_1  & \rTo_{U_2 \gamma} & U_2^2 \ppf \\
\end{diagram}
\qquad
\begin{diagram}
\ppf U_1 & \rTo^{\gamma} & U_2\ppf \\
\dTo<{\ppf \epsilon_1}& &\dTo>{\epsilon_2}\\
\ppf &\rEq& \ppf \\
\end{diagram}$$

In other words, $\gamma$ is a coalgebra morphism $\gamma_{U_1} \circ (p\delta_1) \to \delta_2$,
and also $p\epsilon_1 \to \epsilon_2$, acting on coalgebras for the functor $U_2$, and the constantly-$p$ functor, respectively.

Composition and identities are defined by
$$(f',\gamma') \circ (f,\gamma) = (f' \circ f, (\gamma' * Pf) \circ (Pf' * \gamma))$$
$$id_{C,U} = (id_C,id_U)$$
% It's easy to check that they satisfy unit and associativity properties.
Thus we get a category $\Pspa$ of $P$-spaces and $P$-continuous maps.
An {\em open object} of a $P$-space $C$ is a
$U$-coalgebra, an arrow $a : X \to UX$ in $PC$
satisfying `comonoid action' axioms with respect to the comonad:

$$\begin{diagram}
X&\rTo^a& UX\\
\dTo<a& &\dTo>{\delta}\\
UX&\rTo_{Ua}& U^2X\\
\end{diagram}
\qquad
\begin{diagram}
X&\rTo^a&UX\\
&\rdEq&\dTo>\epsilon\\
&&X\\
\end{diagram}$$

\begin{lemma}
There is a functor $Op : \Pspa \to \Cat$,
which takes a $P$-space and yields the category its of open objects.
\end{lemma}
\begin{proof}

Arrows in $Op(C)$ are the standard notion of coalgebra morphism.
The effect of $Op$ on an arrow in $\Pspa$ is as follows.
We take in  $(f,\gamma)$  a $P$-continuous map 
$C_1 \to C_2$, and must output a functor $Op(C_1) \to Op(C_2)$.
First we define the object part of this functor:
 if $a : X \to UX$ is an open object
in $C_1$, then we claim $\gamma_X \circ Pf(a)$ is 
an open object in $C_2$, with underlying object $Pf(X)$.

We must check that the comonad algebra axioms hold. 
Abbreviate again $Pf = \ppf$. Cells marked $\mathsf{A}$ follow by 
hitting assumptions with $p$,
$\mathsf{N}$ follows by naturality of $\gamma$, and $\star$ are
from the definition of $P$-continuous.
$$\begin{diagram}
\ppf X&\rTo^{\ppf a}& \ppf   U_1X & \rTo^{\gamma_X} & U_2  \ppf X\\
\dTo<{\ppf a}& \mathsf{A} &\dTo>{\ppf  \delta_1}\\
\ppf  U_1X&\rTo_{\ppf   U_1a}& \ppf   U_1^2X &\star&\dTo>{\delta_2}\\
\dTo<{\gamma_X} & \mathsf{N} & \dTo>{\gamma_{U_1X}} \\
U_2  \ppf X& \rTo_{U_2  \ppf a} & U_2 \ppf  U_1 X & \rTo_{U_2 \gamma_X} & U_2^2 \ppf X\\
\end{diagram}
$$

$$\begin{diagram}
\ppf X&\rTo^{\ppf a}&\ppf U_1X & \rTo^{\gamma_X} & U_2\ppf X\\
&\rdEq>{\mathsf{A}}&\dTo>{\ppf \epsilon_1}&\star &\dTo>{\epsilon_2}\\
&&\ppf X&\rEq& \ppf X\\
\end{diagram}$$

For the arrow part of the functor $Op(C_1) \to Op(C_2)$ we must consider
composition of coalgebra morphisms, but these are preserved by 
$a \mapsto \gamma_X \circ p a$:
$$\begin{diagram}
\ppf X&\rTo^{\ppf a}& \ppf   U_1X & \rTo^{\gamma_X} & U_2  \ppf X\\
\dTo<{\ppf f}& \mathsf{A} &\dTo~{\ppf U_1  f}&\mathsf{N}&\dTo>{U_2 \ppf f}\\
\ppf  Y&\rTo_{\ppf   b}& \ppf   U_1Y &\rTo_{\gamma_Y}&U_2 \ppf Y\\
\dTo<{\ppf g}& \mathsf{A} &\dTo~{\ppf U_1  g}&\mathsf{N}&\dTo>{U_2 \ppf g}\\
\ppf  Z&\rTo_{\ppf   c}& \ppf   U_1Z &\rTo_{\gamma_Z}&U_2 \ppf Z\\
\end{diagram}$$
as are identities:
$$\begin{diagram}
\ppf X&\rTo^{\ppf a}& \ppf   U_1X & \rTo^{\gamma_X} & U_2  \ppf X\\
\dTo<{\ppf (id)}& \mathsf{A} &\dTo~{\ppf U_1  (id)}&\mathsf{N}&\dTo>{U_2 \ppf (id)}\\
\ppf  X&\rTo_{\ppf   a}& \ppf   U_1X &\rTo_{\gamma_X}&U_2 \ppf X\\
\end{diagram}$$
\cqed
\end{proof}
\begin{theorem}
Let $P$ be the functor $\Sets^\op \to \Cat$ that takes $X$ to the
evident poset category arising from its powerset $\ps X$ ordered by
inclusion, and takes a function $f : X \to Y$ to its inverse image map $f^<
: \ps Y \to \ps X$.  Then the category $\Top$ is isomorphic to $\Pspa^\op$.
\end{theorem}
\begin{proof}
For a $P$-space $C$, take
$C$ as the underlying set of the topology,
and the open objects of $C$ as the open sets of the topology.
Given a topological space $(X, \T)$, let $U$ be the interior operation.
The comonad data $\epsilon$ and $\delta$ simply record the decreasing
and idempotent properties of the interior operation in a topological space.
Then $(X, U, \epsilon, \delta)$ is a $P$-space. Check that the two definitions
of continuity match up.
\cqed
\end{proof}
\begin{conjecture}
There is a nice class of maps from the open objects of $C_1$ to the open objects of $C_2$ such that every map that belongs to this
class arises from a $P$-continuous map.
\end{conjecture}

%% Is $\gamma_{U_1} \circ  p \delta_1$ a $U_2$-algebra on $pU_1$?
%% $$\begin{diagram}
%% \ppf   U_1 & \rTo^{p\delta_1} & pU_1^2&\rTo^{\gamma_{U_1}}& U_2  \ppf U_1\\
%% \dTo<{\ppf  \delta_1}&\mathsf{Ass}&\dTo~{p\delta_{1(U_1)}}\\
%%  \ppf   U_1^2 &\rTo~{p U_1 \delta_1 }&pU_1^3&&\dTo>{\delta_2}\\
%%  \dTo<{\gamma_{U_1}} &\mathsf{N}&\dTo~{\gamma_{U_1^2}}\\
%%  U_2 \ppf  U_1  & \rTo_{U_2 p\delta_1} & U_2 p U_1^2 & \rTo_{U_2 \gamma_{U_1}} & U_2^2 \ppf U_1 \\
%% \end{diagram}$$
%% uh, it is only if it is already an $U_2$-algebra morphism. This saves me no definitional effort!
\end{document}
