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
dde398d2
Commit
dde398d2
authored
1 year ago
by
Max New
Browse files
Options
Downloads
Patches
Plain Diff
strict and lax homomorphisms of CBPV models
parent
cd198c98
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
paper-new/categorical-model.tex
+28
-10
28 additions, 10 deletions
paper-new/categorical-model.tex
with
28 additions
and
10 deletions
paper-new/categorical-model.tex
+
28
−
10
View file @
dde398d2
...
...
@@ -21,37 +21,55 @@ and contexts but this suffices for all of the models we consider}:
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
be the category
$
\mathcal
V
^
T
$
of algebras, defining
$
A
\to
B
$
as
the powering of algebras,
$
F
$
as the free algebra and
$
U
$
as the
underlying object functor.
\end{example}
There are two relevant notions of
\emph
{
morphism
}
of CBPV models:
\emph
{
strict
}
and
\emph
{
lax
}
.
% morphisms of CBPV models
Given call-by-push-value models
$
\mathcal
M
_
1
=
(
\mathcal
V
_
1
,
\mathcal
E
_
1
,
\arr
_
1
, U
_
1
, F
_
1
)
$
and
$
\mathcal
M
_
2
=
(
\mathcal
V
_
2
,
\mathcal
E
_
2
,
\arr
_
2
, U
_
2
, F
_
2
)
$
,
A morphism
$
G
$
from
$
M
_
1
$
to
$
M
_
2
$
is given by a pair of functors
$
G
_{
\mathcal
{
V
}}
: V
_
1
\to
V
_
2
$
and
$
G
_{
\mathcal
{
E
}}
: E
_
1
\to
E
_
2
$
such that
A
\emph
{
strict
}
morphism
$
G
$
from
$
M
_
1
$
to
$
M
_
2
$
is given by a pair of functors
$
G
_{
\mathcal
{
V
}}
: V
_
1
\to
V
_
2
$
and
$
G
_{
\mathcal
{
E
}}
: E
_
1
\to
E
_
2
$
that strictly presere the constructors:
\begin{enumerate}
\item
$
G
_{
\mathcal
{
E
}}
\circ
F
_
1
=
F
_
2
\circ
G
_{
\mathcal
{
V
}}$
\item
$
G
_{
\mathcal
{
V
}}
\circ
U
_
1
=
U
_
2
\circ
G
_{
\mathcal
{
E
}}$
\item
$
G
_{
\mathcal
{
E
}}
(
A
\arr
_
1
B
)
=
G
_{
\mathcal
{
V
}}
(
A
)
\arr
_
2
G
_{
\mathcal
{
E
}}
(
B
)
$
\item
$
G
_{
\mathcal
{
V
}}
(
A
_
1
\times
_
1
A
_
2
)
=
G
_{
\mathcal
{
V
}}
(
A
_
1
)
\times
_
2
G
_{
\mathcal
{
V
}}
(
A
_
2
)
$
\item
$
G
_{
\mathcal
{
V
}}
(
1
_
1
)
=
1
_
2
$
\end{enumerate}
As well as strictly preserving the corresponding universal morphisms
and coherence isomorphisms.
A lax morphism instead preserves these only up to transformation
\begin{enumerate}
\item
$
G
_{
\mathcal
{
E
}}
\circ
F
_
1
\Rightarrow
F
_
2
\circ
G
_{
\mathcal
{
V
}}$
\item
$
G
_{
\mathcal
{
V
}}
\circ
U
_
1
\Rightarrow
U
_
2
\circ
G
_{
\mathcal
{
E
}}$
\item
$
G
_{
\mathcal
{
E
}}
(
A
\arr
_
1
B
)
\Rightarrow
G
_{
\mathcal
{
V
}}
(
A
)
\arr
_
2
G
_{
\mathcal
{
E
}}
(
B
)
$
\item
$
G
_{
\mathcal
{
V
}}
(
A
_
1
\times
_
1
A
_
2
)
\Rightarrow
G
_{
\mathcal
{
V
}}
(
A
_
1
)
\times
_
2
G
_{
\mathcal
{
V
}}
(
A
_
2
)
$
\item
$
G
_{
\mathcal
{
V
}}
(
1
_
1
)
\Rightarrow
1
_
2
$
\end{enumerate}
Additionally a lax morphism should have a relationship between these
transformations and the universal morphisms, but we will only consider
lax morphisms of thin categories, where such conditions hold
trivially.
% TODO what about the product and coproducts in V?
% Do we need that G_V(A \times_1 A') = G_V(A) \times_2 G_V(A')
% and likewise for coproducts?
With these definitions, we can define a category whose objects are CBPV
models, and whose arrows are CBPV morphisms.
This category will serve as the setting in which we formulate the definition
of a model of extensional gradual typing.
With these definitions, we can define categories
$
\textrm
{
CBPV
}_
s
$
and
$
\textrm
{
CBPV
}_
l
$
whose objects are CBPV models, and whose arrows are
CBPV morphisms. This category will serve as the setting in which we
formulate the definition of a model of extensional gradual typing.
\subsection
{
Extensional Models of Gradual Typing
}
...
...
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