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
Model registry
Operate
Environments
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
Iris
Actris
Commits
08545a5e
Commit
08545a5e
authored
4 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Updated delete rule and bumped proofs
parent
5d19ff35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#27521
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/logrel/environments.v
+12
-14
12 additions, 14 deletions
theories/logrel/environments.v
theories/logrel/term_typing_rules.v
+4
-7
4 additions, 7 deletions
theories/logrel/term_typing_rules.v
with
16 additions
and
21 deletions
theories/logrel/environments.v
+
12
−
14
View file @
08545a5e
...
...
@@ -55,21 +55,19 @@ Section env.
by
rewrite
-
Hw
lookup_insert_ne
.
Qed
.
Lemma
env_ltyped_delete
Γ
vs
x
v
:
Γ
!!
x
=
None
->
env_ltyped
Γ
(
<
[
x
:=
v
]
>
vs
)
-∗
env_ltyped
Γ
vs
.
Lemma
env_ltyped_delete
Γ
x
v
vs
:
env_ltyped
Γ
(
<
[
x
:=
v
]
>
vs
)
-∗
env_ltyped
(
delete
x
Γ
)
vs
.
Proof
.
iIntros
(
HNone
)
"HΓ"
.
rewrite
/
env_ltyped
.
iApply
(
big_sepM_impl
with
"HΓ"
)
.
iIntros
"!>"
(
k
A
HSome
)
"H"
.
iDestruct
"H"
as
(
w
Heq
)
"HA"
.
iExists
_
.
iFrame
.
iPureIntro
.
destruct
(
decide
(
x
=
k
))
.
-
subst
.
rewrite
HNone
in
HSome
.
inversion
HSome
.
-
by
rewrite
lookup_insert_ne
in
Heq
.
iIntros
"HΓ"
.
rewrite
/
env_ltyped
.
destruct
(
Γ
!!
x
)
as
[
A
|]
eqn
:?
.
{
iDestruct
(
big_sepM_delete
with
"HΓ"
)
as
"[HA HΓ]"
;
first
done
.
iDestruct
"HA"
as
(
v'
?)
"HA"
;
simplify_map_eq
.
iApply
(
big_sepM_impl
with
"HΓ"
)
.
iIntros
"!>"
(
y
B
?)
.
iDestruct
1
as
(
v''
?)
"HB"
.
destruct
(
decide
(
x
=
y
));
simplify_map_eq
;
eauto
.
}
rewrite
delete_notin
//.
iApply
(
big_sepM_impl
with
"HΓ"
)
.
iIntros
"!>"
(
y
B
?)
.
iDestruct
1
as
(
v'
?)
"HB"
;
simplify_map_eq
;
eauto
.
Qed
.
Lemma
env_split_id_l
Γ
:
⊢
env_split
Γ
∅
Γ
.
...
...
This diff is collapsed.
Click to expand it.
theories/logrel/term_typing_rules.v
+
4
−
7
View file @
08545a5e
...
...
@@ -92,9 +92,8 @@ Section properties.
by
rewrite
-
delete_insert_ne
//
-
subst_map_insert
.
Qed
.
(* TODO: We would prefer just Γ3 in the second premise *)
Lemma
ltyped_let
Γ1
Γ2
Γ3
x
e1
e2
A1
A2
:
(
Γ1
⊨
e1
:
A1
⫤
Γ2
)
-∗
(
binder_insert
x
A1
Γ2
⊨
e2
:
A2
⫤
binder_delete
x
Γ3
)
-∗
(
Γ1
⊨
e1
:
A1
⫤
Γ2
)
-∗
(
binder_insert
x
A1
Γ2
⊨
e2
:
A2
⫤
Γ3
)
-∗
Γ1
⊨
(
let
:
x
:=
e1
in
e2
)
:
A2
⫤
binder_delete
x
Γ3
.
Proof
.
iIntros
"#He1 #He2 !>"
.
iIntros
(
vs
)
"HΓ1"
=>
/=.
...
...
@@ -102,13 +101,12 @@ Section properties.
iIntros
(
v
)
"[HA1 HΓ2]"
.
wp_pures
.
iDestruct
(
env_ltyped_insert
_
_
x
with
"HA1 HΓ2"
)
as
"HΓ2"
.
iDestruct
(
"He2"
with
"HΓ2"
)
as
"He2'"
.
iDestruct
(
"He2"
with
"HΓ2"
)
as
"He2'"
.
destruct
x
as
[|
x
];
rewrite
/=
-
?subst_map_insert
//.
wp_apply
(
wp_wand
with
"He2'"
)
.
iIntros
(
w
)
"[HA2 HΓ3]"
.
iFrame
.
iApply
env_ltyped_delete
=>
//.
apply
lookup_delete
.
Qed
.
Fixpoint
lty_arr_list
(
As
:
list
(
ltty
Σ
))
(
B
:
ltty
Σ
)
:
ltty
Σ
:=
...
...
@@ -243,7 +241,7 @@ Section properties.
Lemma
ltyped_unpack
{
k
}
Γ1
Γ2
Γ3
x
e1
e2
(
C
:
lty
Σ
k
→
ltty
Σ
)
B
:
(
Γ1
⊨
e1
:
lty_exist
C
⫤
Γ2
)
-∗
(
∀
Y
,
binder_insert
x
(
C
Y
)
Γ2
⊨
e2
:
B
⫤
binder_delete
x
Γ3
)
-∗
(
∀
Y
,
binder_insert
x
(
C
Y
)
Γ2
⊨
e2
:
B
⫤
Γ3
)
-∗
Γ1
⊨
(
let
:
x
:=
e1
in
e2
)
:
B
⫤
binder_delete
x
Γ3
.
Proof
.
iIntros
"#He1 #He2 !>"
.
iIntros
(
vs
)
"HΓ1"
=>
/=.
...
...
@@ -252,13 +250,12 @@ Section properties.
iDestruct
"HC"
as
(
X
)
"HX"
.
wp_pures
.
iDestruct
(
env_ltyped_insert
_
_
x
with
"HX HΓ2"
)
as
"HΓ2"
.
iDestruct
(
"He2"
with
"HΓ2"
)
as
"He2'"
.
iDestruct
(
"He2"
with
"HΓ2"
)
as
"He2'"
.
destruct
x
as
[|
x
];
rewrite
/=
-
?subst_map_insert
//.
wp_apply
(
wp_wand
with
"He2'"
)
.
iIntros
(
w
)
"[HA2 HΓ3]"
.
iFrame
.
iApply
env_ltyped_delete
=>
//.
apply
lookup_delete
.
Qed
.
(** Mutable Reference properties *)
...
...
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