Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tlsomers
Actris
Commits
c0faa715
Commit
c0faa715
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Amber rule for subtyping of rec. types.
parent
d8f9d3d9
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
theories/logrel/examples/rec_subtyping.v
+1
-1
1 addition, 1 deletion
theories/logrel/examples/rec_subtyping.v
theories/logrel/subtyping_rules.v
+13
-2
13 additions, 2 deletions
theories/logrel/subtyping_rules.v
with
14 additions
and
3 deletions
theories/logrel/examples/rec_subtyping.v
+
1
−
1
View file @
c0faa715
...
...
@@ -44,7 +44,7 @@ Section basics.
iApply
(
lty_le_trans
with
"H1"
)
.
iIntros
(
X'
Y'
)
.
iExists
X'
,
Y'
.
iIntros
"!>!>!>"
.
iApply
"IH"
.
}
iApply
lty_le_rec
.
iApply
lty_le_rec
_internal
.
iIntros
(
S1
S2
)
"#Hrec"
.
iIntros
(
X
)
.
iExists
X
,
lty_bool
.
iIntros
"!> !>"
(
Y
)
.
iApply
(
lty_le_trans
_
(
<
??
>
TY
lty_bool
;
<!!>
TY
Y
⊸
lty_int
;
...
...
This diff is collapsed.
Click to expand it.
theories/logrel/subtyping_rules.v
+
13
−
2
View file @
c0faa715
...
...
@@ -41,8 +41,8 @@ Section subtyping_rules.
-
rewrite
{
2
}
/
lty_rec
fixpoint_unfold
.
iApply
lty_le_refl
.
Qed
.
Lemma
lty_le_rec
{
k
}
(
C1
C2
:
lty
Σ
k
→
lty
Σ
k
)
`{
Contractive
C1
,
Contractive
C2
}
:
Lemma
lty_le_rec
_internal
{
k
}
(
C1
C2
:
lty
Σ
k
→
lty
Σ
k
)
`{
Contractive
C1
,
Contractive
C2
}
:
(
∀
K1
K2
,
▷
(
K1
<:
K2
)
-∗
C1
K1
<:
C2
K2
)
-∗
lty_rec
C1
<:
lty_rec
C2
.
Proof
.
...
...
@@ -51,6 +51,17 @@ Section subtyping_rules.
iApply
lty_le_r
;
[|
iApply
lty_bi_le_sym
;
iApply
lty_le_rec_unfold
]
.
by
iApply
"Hle"
.
Qed
.
Lemma
lty_le_rec_external
{
k
}
(
C1
C2
:
lty
Σ
k
→
lty
Σ
k
)
`{
Contractive
C1
,
Contractive
C2
}
:
(
∀
K1
K2
,
(
K1
<:
K2
)
→
C1
K1
<:
C2
K2
)
→
lty_rec
C1
<:
lty_rec
C2
.
Proof
.
intros
IH
.
rewrite
/
lty_rec
.
apply
fixpoint_ind
.
-
by
intros
K1'
K2'
->
?
.
-
exists
(
fixpoint
C2
)
.
iApply
lty_le_refl
.
-
intros
K'
?
.
rewrite
(
fixpoint_unfold
C2
)
.
by
apply
IH
.
-
apply
bi
.
limit_preserving_entails
;
[
done
|
solve_proper
]
.
Qed
.
(** Term subtyping *)
Lemma
lty_le_any
A
:
A
<:
any
.
...
...
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