Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sgdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gradual-typing
sgdt
Commits
cf86400a
Commit
cf86400a
authored
1 year ago
by
Max New
Browse files
Options
Downloads
Patches
Plain Diff
work on abstract categorical model
parent
2dbfa242
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
paper-new/categorical-model.tex
+79
-0
79 additions, 0 deletions
paper-new/categorical-model.tex
paper-new/paper.tex
+2
-0
2 additions, 0 deletions
paper-new/paper.tex
with
81 additions
and
0 deletions
paper-new/categorical-model.tex
0 → 100644
+
79
−
0
View file @
cf86400a
\section
{
Abstract Categorical Models of Graduality
}
First, what is a categorical model of call-by-push-value? We will use
the following notion as our basic structure
\footnote
{
There are models
that are closer to syntax e.g., which distinguish between value types
and contexts but this suffices for all of the models we consider
}
:
\begin{enumerate}
\item
A cartesian category
$
\mathcal
V
$
\item
A category
$
\mathcal
E
$
\item
An action of
$
\mathcal
V
^{
op
}$
(with the
$
\mathcal
V
$
cartesian
product as monoidal structure) on
$
\mathcal
E
$
. We write this as
exponentiation
$
B
^
A
$
.
This means we have
\[
\alpha
: B
^{
A
_
1
\times
A
_
2
}
\cong
(
B
^{
A
_
1
}
)
^{
A
^
2
}
\]
and
\[
i : B
^
1
\cong
B
\]
satisfying coherence isomorphisms
\item
A functor
$
U :
\mathcal
E
\to
\mathcal
V
$
that ``preserves
powering'' in that every
$
U
(
B
^
A
)
$
is an exponential of
$
UB
$
by
$
A
$
and that
$
U
\alpha
$
and
$
Ui
$
are mapped to the canonical isomorphisms
for exponentials.
\item
A left adjoint
$
F
\dashv
U
$
\item
Distributive finite coproducts in
$
\mathcal
V
$
\end{enumerate}
\begin{example}
Given a strong monad
$
T
$
on a bicartesian closed category
$
\mathcal
V
$
, we can extend this to a CBPV model by defining
$
\mathcal
E
$
to
be the category
$
\mathcal
V
^
T
$
of algebras
\end{example}
The above definition can interpreted in any compact closed equipment
(if someone were to figure out a definition for a compact closed
equipment, that is,
\ldots
). Then we can get a model of a form of GTT
by taking a CBPV object in the equipment of
\emph
{
reflexive graph
categories
}
. Since reflexive graphs form a topos we can get at this by
interpreting the above definition
\emph
{
internally
}
to the topos of
reflexive graphs. Essentially what this means is that everything above
has a ``vertex'' component and an ``edge'' component, so we get a
cartesian category
$
\mathcal
V
_
v
$
which we think of as the value types
and pure functions but we also get a cartesian category
$
\mathcal
V
_
e
$
which we think of as the ``value edges'' and ``squares''.
We will work in ``locally thin'' models where there is at most one
square with a given boundary.
In addition to the ordinary universal properties above, when working
with reflexive graph models we also have access to new notions of
universal property that relate the ``function'' morphisms to the
``edges''.
Let
$
f :
\mathcal
V
_
v
(
A
_
i, A
_
o
)
$
and
$
R :
\mathcal
V
_
e
(
A
_
o,A'
)
$
then a
\emph
{
left restriction
}
of
$
R
$
along
$
f
$
consists of
\begin{enumerate}
\item
$
R' :
\mathcal
V
_
e
(
A
_
i,A'
)
$
\item
$
S
\Rightarrow
_{
g,h
}
R'
$
naturally isomorphic to
$
S
\Rightarrow
_{
fg,h
}
R
$
\end{enumerate}
In relational semantics,
$
R
(
a
_
o,a'
)
$
is a relation and the left
restriction along
$
f
$
is the relation
$
R
(
f
(
a
_
i
)
, a'
)
$
.
Then we can formulate our value edges as follows:
\begin{enumerate}
\item
We have a thin subcategory
$
\mathcal
V
_
u
$
of
$
\mathcal
V
_
v
$
, of ``upcasts''
\item
$
\mathcal
V
$
has all left restrictions of edges along upcasts
\end{enumerate}
And our computation edges as follows:
\begin{enumerate}
\item
We have a thin subcategory
$
\mathcal
E
_
d
$
of
$
\mathcal
E
_
v
$
of ``downcasts''
\item
$
\mathcal
E
$
has all right restrictions of edges along downcasts
\end{enumerate}
We also want something like
\[
F
_
c :
\mathcal
V
_
u
^{
op
}
\to
\mathcal
E
_
d
\]
\[
U
_
c :
\mathcal
E
_
d
^{
op
}
\to
\mathcal
V
_
u
\]
which ensures that if
$
R
$
is a value edge equivalent to
$
A
(
u,
-)
$
then
\[
F
(
R
)
=
F
(
A
(
u,
-))
=
(
F A
)(-
,F u
)
\]
This diff is collapsed.
Click to expand it.
paper-new/paper.tex
+
2
−
0
View file @
cf86400a
...
@@ -127,6 +127,8 @@
...
@@ -127,6 +127,8 @@
\input
{
graduality
}
\input
{
graduality
}
\input
{
categorical-model
}
\input
{
denotational-model
}
\input
{
denotational-model
}
% \section{Discussion}\label{sec:discussion}
% \section{Discussion}\label{sec:discussion}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment