\max{decide if we want to include $\times$ or not}
\begin{align*}% TODO is hole a term?
&\text{Types } A := \dyn\alt\nat\alt A \times A \alt (A \ra A') \\
&\text{Value Contexts }\Gamma := \cdot\alt (\Gamma, x : A) \\
&\text{Terms } M, N := \upc c M \alt\dnc c M
&\quad\quad\alt\ret{V}\alt\bind{x}{M}{N}\alt V_f\, V_x \alt\dn{A}{B} M
\end{align*}
The type precision derivations $c : A \ltdyn A'$ is inductively defined by
reflexivity, transitivity, congruence for $\ra$ and $\times$, and generators
$\textsf{Inj}_\ra : (D \ra D)\ltdyn D$ and $\textsf{Inj}_{\text{nat}}
: \nat\ltdyn D$.
%
We define equivalence of type precision derivations to be inductively generated by congruence for all constructors, category laws for reflexivity and transitivity as well as functoriality laws for $\ra$ and $\times$ congruence
@@ -222,133 +222,112 @@ such that $\upf\, c$ ``represents $c$" (we will define this shortly). % such tha
...
@@ -222,133 +222,112 @@ such that $\upf\, c$ ``represents $c$" (we will define this shortly). % such tha
In reality, it is slightly more complicated, since we need to build composition of edges
In reality, it is slightly more complicated, since we need to build composition of edges
into the definition, but the idea is similar.
into the definition, but the idea is similar.
In particular, let $c : A \rel A'$ and $d : A' \rel A''$,
In particular, let $c : A \rel A'$ and $f \in\mathcal V_f(A, A')$. We
and let $f \in\mathcal V_f(A, A')$ and $g \in\mathcal V_f(A', A'')$.
say that $c$ is \emph{left-representable by}$f$ if for any $c_l : A_l
We say that the pair $(c,d)$ is \emph{left-representable by}$(f, g)$
\rel A$ and $c_r : A' \rel A_r$ the following squares commute\max{is ``commute'' good terminology?}:
if the following two squares commute:
\begin{center}
\begin{center}
\begin{tabular}{ m{14em} m{14em}}
\begin{tabular}{ m{14em} m{14em}}
% UpL
% UpL
\begin{tikzcd}[ampersand replacement=\&]
\begin{tikzcd}[ampersand replacement=\&]
A \&{A'}\&{A''}\\
A \&{A'}\&{A_r}\\
{A'}\&\&{A''}
{A'}\&\&{A_r}
\arrow["f"', from=1-1, to=2-1]
\arrow["f"', from=1-1, to=2-1]
%
%
\arrow[from=1-3, to=2-3, Rightarrow, no head]
\arrow[from=1-3, to=2-3, Rightarrow, no head]
%
%
\arrow["c", "\shortmid"{marking}, no head, from=1-1, to=1-2]
\arrow["c", "\shortmid"{marking}, no head, from=1-1, to=1-2]
\arrow["d", "\shortmid"{marking}, no head, from=1-2, to=1-3]
\arrow["c_r", "\shortmid"{marking}, no head, from=1-2, to=1-3]
%
%
\arrow["d"', "\shortmid"{marking}, no head, from=2-1, to=2-3]
\arrow["c_r"', "\shortmid"{marking}, no head, from=2-1, to=2-3]
\end{tikzcd}
\end{tikzcd}
&
&
% UpR
% UpR
\begin{tikzcd}[ampersand replacement=\&]
\begin{tikzcd}[ampersand replacement=\&]
A \&\&{A'}\\
A_l\&\&{A}\\
{A}\&{A'}\&{A''}
{A_l}\&{A}\&{A'}
\arrow[from=1-1, to=2-1, Rightarrow, no head]
\arrow[from=1-1, to=2-1, Rightarrow, no head]
%
%
\arrow["g", from=1-3, to=2-3]
\arrow["f", from=1-3, to=2-3]
%
%
\arrow["c", "\shortmid"{marking}, no head, from=1-1, to=1-3]
\arrow["c_l", "\shortmid"{marking}, no head, from=1-1, to=1-3]
%
%
\arrow["c"', "\shortmid"{marking}, no head, from=2-1, to=2-2]
\arrow["c_l"', "\shortmid"{marking}, no head, from=2-1, to=2-2]
\arrow["d"', "\shortmid"{marking}, no head, from=2-2, to=2-3]
\arrow["c"', "\shortmid"{marking}, no head, from=2-2, to=2-3]
\end{tikzcd}
\end{tikzcd}
\end{tabular}
\end{tabular}
\end{center}
\end{center}
Dually, let $c \in\mathcal E_e(B, B')$ and $d \in\mathcal E_e(B', B'')$,
Dually, let $d \in B \rel B'$ and $\phi\in\mathcal E_f(B', B)$. We
and let $f \in\mathcal E_f(B'', B')$ and $g \in\mathcal E_f(B', B)$.
say that $d$ is \emph{right-representable by}$\phi$ if for any $d_l :
We say the pair $(c,d)$ is \emph{right-representable by}$(f,g)$ if the
B_l \rel B$ and $d_r : B' \rel B_r$ the following two squares commute:
following two squares commute:
\begin{center}
\begin{center}
\begin{tabular}{ m{14em} m{14em}}
\begin{tabular}{ m{14em} m{14em}}
% DnR
% DnR
\begin{tikzcd}[ampersand replacement=\&]
\begin{tikzcd}[ampersand replacement=\&]
{B}\&{B'}\&{B''}\\
{B_l}\&{B}\&{B'}\\
{B}\&\&{B'}
{B_l}\&\&{B}
\arrow[from=1-1, to=2-1, Rightarrow, no head]
\arrow[from=1-1, to=2-1, Rightarrow, no head]
%
%
\arrow["f", from=1-3, to=2-3]
\arrow["\phi", from=1-3, to=2-3]
%
%
\arrow["c", "\shortmid"{marking}, no head, from=1-1, to=1-2]
\arrow["d_l", "\shortmid"{marking}, no head, from=1-1, to=1-2]
\arrow["d", "\shortmid"{marking}, no head, from=1-2, to=1-3]
\arrow["d", "\shortmid"{marking}, no head, from=1-2, to=1-3]
%
%
\arrow["c"', from=2-1, to=2-3, no head]
\arrow["d_l"', from=2-1, to=2-3, no head]
\end{tikzcd}
\end{tikzcd}
&
&
% DnL
% DnL
\begin{tikzcd}[ampersand replacement=\&]
\begin{tikzcd}[ampersand replacement=\&]
{B'}\&\&{B''}\\
{B'}\&\&{B_r}\\
{B}\&{B'}\&{B''}
{B}\&{B'}\&{B_r}
\arrow["g"', from=1-1, to=2-1]
\arrow["\phi"', from=1-1, to=2-1]
%
%
\arrow[from=1-3, to=2-3, Rightarrow, no head]
\arrow[from=1-3, to=2-3, Rightarrow, no head]
%
%
\arrow["d", from=1-1, to=1-3, no head]
\arrow["d_r", from=1-1, to=1-3, no head]
%
%
\arrow["c"', "\shortmid"{marking}, no head, from=2-1, to=2-2]
\arrow["d"', "\shortmid"{marking}, no head, from=2-1, to=2-2]
\arrow["d"', "\shortmid"{marking}, no head, from=2-2, to=2-3]
\arrow["d_r"', "\shortmid"{marking}, no head, from=2-2, to=2-3]
\end{tikzcd}
\end{tikzcd}
\end{tabular}
\end{tabular}
\end{center}
\end{center}
Then we formulate the relationship between value relation morphisms and
Then we formulate the relationship between relation morphisms and
function morphisms as follows:
function morphisms as follows:
\begin{enumerate}
\begin{enumerate}
\item There is a functor $\upf : \mathcal V_e \to\mathcal V_f$ that is the
\item There is an identity-on-objects functor $\upf : \mathcal V_e \to
identity on objects, such that $\upf_*(\mathcal V_e)$, the essential image of
\mathcal V_f$ such that every $c$ is left-representable by $\upf(c)$.
$\mathcal V_e$ under $\upf$, is thin.
\item There is an identity-on-objects functor $\dnf : \mathcal
The objects of $\upf_*(\mathcal V_e)$ are the objects of $\mathcal V_f$, and
E_e^{op}\to\mathcal\mathcal E_f$ such that every $d$ is
the hom-set
right-representable by $\dnf(d)$.
$\upf_*(\mathcal V_e)(A, A')=\{ f \in\mathcal V_f(A,A')\mid\exists c \in\mathcal V_e(A,A'). \upf(c)= f \}$.
\item Every pair of morphisms $(c,d)\in\mathcal V_e(A, A')\times\mathcal V_e(A', A'')$ is
left-representable by $(\upf(c), \upf(d))$.
\end{enumerate}
And likewise for computations:
\begin{enumerate}
\item There is a functor $\dnf : \mathcal E_e^{op}\to\mathcal V_f$ that is
the identity on objects, such that the essential image of $\mathcal E_e$ under
$\dnf$ is thin.
\item Every pair of morphisms $(c,d)\in\mathcal E_e(B, B')\times\mathcal E_e(B',B'')$
is right-representable by $(\dnf(d), \dnf(c))$.
\end{enumerate}
\end{enumerate}
%% \textbf{TODO: do we still need this?}
%% We also want something like
\textbf{TODO: do we still need this?}
%% \[ F_c : \mathcal V_u^{op} \to \mathcal E_d \]
We also want something like
%% \[ U_c : \mathcal E_d^{op} \to \mathcal V_u \]
\[ F_c : \mathcal V_u^{op}\to\mathcal E_d \]
%% which ensures that if $R$ is a value edge equivalent to $A(u,-)$ then
\[ U_c : \mathcal E_d^{op}\to\mathcal V_u \]
%% \[ F(R) = F(A(u,-)) = (F A)(-,F u) \]
which ensures that if $R$ is a value edge equivalent to $A(u,-)$ then
\[ F(R)= F(A(u,-))=(F A)(-,F u)\]
In summary, an extensional model consists of:
In summary, an extensional model consists of:
\begin{enumerate}
\begin{enumerate}
\item CBPV models $\mathcal M_f$ and $\mathcal M_{sq}$
\item A CBPV model internal to reflexive graphs.
\item CBPV morphisms $r : \mathcal M_f \to\mathcal M_{sq}$ and $s, t : \mathcal M_{sq}\to\mathcal M_f$
\item Composition and identity on value and computation relations that form a category.
\item Thinness: there is at most one square with a given boundary
\item An identity-on-objects functor $\upf : \mathcal V_e \to\mathcal V_f$ taking each value relation to a morphism that left-represents it.
\item A ``horizontal composition" operation on value relations and on computation relations
\item An identity-on-objects functor $\dnf : \mathcal E_e^{op}\to\mathcal E_f$ taking each computation relation to a morphism that right-represents it.
(from which we can define the categories $\ve$ and $\ee$ of value types/relations and computation types/relations, repsectively).
\item The CBPV connectives $U,F,\times,\to$ are all \emph{covariant} functorial on relations
\item The categories $\ve$ and $\ee$ are thin up to an identity square
\begin{itemize}
\item A functor $\upf : \mathcal V_e \to\mathcal V_f$ that is the identity on objects,
\item$U(dd')= U(d)U(d')$
such that $\upf_*(\mathcal V_e)$, the essential image of $\mathcal V_e$ under $\upf$, is thin.
\item$F(cc'')= F(c)F(c')$
\item Every pair of morphisms $(c,d)\in\mathcal V_e(A, A')\times\mathcal V_e(A', A'')$ is