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
9f957e7c
Commit
9f957e7c
authored
5 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Removed admitted lemma and added side condition to dependent lemmas
parent
78bfc78b
No related branches found
No related tags found
1 merge request
!8
Algorithmic Typing Judgement
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/logrel/ltyping.v
+10
-18
10 additions, 18 deletions
theories/logrel/ltyping.v
theories/logrel/types.v
+1
-1
1 addition, 1 deletion
theories/logrel/types.v
with
11 additions
and
19 deletions
theories/logrel/ltyping.v
+
10
−
18
View file @
9f957e7c
...
@@ -105,13 +105,6 @@ Section Environment.
...
@@ -105,13 +105,6 @@ Section Environment.
Definition
env_split
(
Γ
Γ1
Γ2
:
gmap
string
(
lty
Σ
))
:
iProp
Σ
:=
Definition
env_split
(
Γ
Γ1
Γ2
:
gmap
string
(
lty
Σ
))
:
iProp
Σ
:=
□
∀
vs
,
(
env_ltyped
Γ
vs
∗-∗
(
env_ltyped
Γ1
vs
∗
env_ltyped
Γ2
vs
))
.
□
∀
vs
,
(
env_ltyped
Γ
vs
∗-∗
(
env_ltyped
Γ1
vs
∗
env_ltyped
Γ2
vs
))
.
Lemma
env_split_None
Γ
Γ1
Γ2
x
:
Γ
!!
x
=
None
→
env_split
Γ
Γ1
Γ2
-∗
⌜
Γ1
!!
x
=
None
∧
Γ2
!!
x
=
None
⌝.
Proof
.
iIntros
(
HΓx
)
"Hsplit"
.
rewrite
/
env_split
.
rewrite
/
env_ltyped
.
Admitted
.
Lemma
env_split_id_l
Γ
:
⊢
env_split
Γ
∅
Γ
.
Lemma
env_split_id_l
Γ
:
⊢
env_split
Γ
∅
Γ
.
Proof
.
Proof
.
iIntros
"!>"
(
vs
)
.
iIntros
"!>"
(
vs
)
.
...
@@ -131,19 +124,19 @@ Section Environment.
...
@@ -131,19 +124,19 @@ Section Environment.
-
iIntros
"[HΓ1 HΓ2]"
.
auto
.
-
iIntros
"[HΓ1 HΓ2]"
.
auto
.
Qed
.
Qed
.
(* TODO: Get rid of side condition that x does not appear in Γ1 *)
Lemma
env_split_left
Γ
Γ1
Γ2
x
A
:
Lemma
env_split_left
Γ
Γ1
Γ2
x
A
:
Γ
!!
x
=
None
→
Γ
!!
x
=
None
→
Γ1
!!
x
=
None
→
env_split
Γ
Γ1
Γ2
-∗
env_split
Γ
Γ1
Γ2
-∗
env_split
(
<
[
x
:=
A
]
>
Γ
)
(
<
[
x
:=
A
]
>
Γ1
)
Γ2
.
env_split
(
<
[
x
:=
A
]
>
Γ
)
(
<
[
x
:=
A
]
>
Γ1
)
Γ2
.
Proof
.
Proof
.
iIntros
(
HΓx
)
"#Hsplit !>"
.
iIntros
(
vs
)
.
iIntros
(
HΓx
HΓ2x
)
"#Hsplit !>"
.
iIntros
(
vs
)
.
iSplit
.
iSplit
.
-
iIntros
"HΓ"
.
-
iIntros
"HΓ"
.
iPoseProof
(
big_sepM_insert
with
"HΓ"
)
as
"[Hv HΓ]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ"
)
as
"[Hv HΓ]"
;
first
by
assumption
.
iDestruct
(
"Hsplit"
with
"HΓ"
)
as
"[HΓ1 $]"
.
iDestruct
(
"Hsplit"
with
"HΓ"
)
as
"[HΓ1 $]"
.
iApply
(
big_sepM_insert_2
with
"[Hv]"
);
simpl
;
eauto
.
iApply
(
big_sepM_insert_2
with
"[Hv]"
);
simpl
;
eauto
.
-
iIntros
"[HΓ1 HΓ2]"
.
-
iIntros
"[HΓ1 HΓ2]"
.
iPoseProof
(
env_split_None
with
"Hsplit"
)
as
"[% %]"
;
first
by
apply
HΓx
.
iPoseProof
(
big_sepM_insert
with
"HΓ1"
)
as
"[Hv HΓ1]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ1"
)
as
"[Hv HΓ1]"
;
first
by
assumption
.
iApply
(
big_sepM_insert_2
with
"[Hv]"
)=>
//.
iApply
(
big_sepM_insert_2
with
"[Hv]"
)=>
//.
iApply
"Hsplit"
.
iFrame
"HΓ1 HΓ2"
.
iApply
"Hsplit"
.
iFrame
"HΓ1 HΓ2"
.
...
@@ -158,24 +151,25 @@ Section Environment.
...
@@ -158,24 +151,25 @@ Section Environment.
-
iIntros
"[HΓ1 HΓ2]"
.
iApply
"Hsplit"
.
iFrame
.
-
iIntros
"[HΓ1 HΓ2]"
.
iApply
"Hsplit"
.
iFrame
.
Qed
.
Qed
.
(* TODO: Get rid of side condition that x does not appear in Γ2 *)
Lemma
env_split_right
Γ
Γ1
Γ2
x
A
:
Lemma
env_split_right
Γ
Γ1
Γ2
x
A
:
Γ
!!
x
=
None
→
Γ
!!
x
=
None
→
Γ2
!!
x
=
None
→
env_split
Γ
Γ1
Γ2
-∗
env_split
Γ
Γ1
Γ2
-∗
env_split
(
<
[
x
:=
A
]
>
Γ
)
Γ1
(
<
[
x
:=
A
]
>
Γ2
)
.
env_split
(
<
[
x
:=
A
]
>
Γ
)
Γ1
(
<
[
x
:=
A
]
>
Γ2
)
.
Proof
.
Proof
.
iIntros
(
HΓx
)
"Hsplit"
.
iIntros
(
HΓx
HΓ2x
)
"Hsplit"
.
iApply
env_split_comm
.
iApply
env_split_left
;
first
by
assumption
.
iApply
env_split_comm
.
iApply
env_split_left
=>
//
.
by
iApply
env_split_comm
.
by
iApply
env_split_comm
.
Qed
.
Qed
.
(* TODO: Get rid of side condition that x does not appear in Γ *)
(* TODO: Get rid of side condition that x does not appear in Γ
s
*)
Lemma
env_split_copy
Γ
Γ1
Γ2
(
x
:
string
)
A
:
Lemma
env_split_copy
Γ
Γ1
Γ2
(
x
:
string
)
A
:
Γ
!!
x
=
None
→
Γ
!!
x
=
None
→
Γ1
!!
x
=
None
→
Γ2
!!
x
=
None
→
LTyCopy
A
→
LTyCopy
A
→
env_split
Γ
Γ1
Γ2
-∗
env_split
Γ
Γ1
Γ2
-∗
env_split
(
<
[
x
:=
A
]
>
Γ
)
(
<
[
x
:=
A
]
>
Γ1
)
(
<
[
x
:=
A
]
>
Γ2
)
.
env_split
(
<
[
x
:=
A
]
>
Γ
)
(
<
[
x
:=
A
]
>
Γ1
)
(
<
[
x
:=
A
]
>
Γ2
)
.
Proof
.
Proof
.
iIntros
(
HΓx
Hcopy
)
"#Hsplit"
.
iIntros
(
vs
)
"!>"
.
iIntros
(
HΓx
HΓ1x
HΓ2x
Hcopy
)
"#Hsplit"
.
iIntros
(
vs
)
"!>"
.
iSplit
.
iSplit
.
-
iIntros
"HΓ"
.
-
iIntros
"HΓ"
.
iPoseProof
(
big_sepM_insert
with
"HΓ"
)
as
"[Hv HΓ]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ"
)
as
"[Hv HΓ]"
;
first
by
assumption
.
...
@@ -183,7 +177,6 @@ Section Environment.
...
@@ -183,7 +177,6 @@ Section Environment.
iDestruct
(
"Hsplit"
with
"HΓ"
)
as
"[HΓ1 HΓ2]"
.
iDestruct
(
"Hsplit"
with
"HΓ"
)
as
"[HΓ1 HΓ2]"
.
iSplitL
"HΓ1"
;
iApply
big_sepM_insert_2
;
simpl
;
eauto
.
iSplitL
"HΓ1"
;
iApply
big_sepM_insert_2
;
simpl
;
eauto
.
-
iIntros
"[HΓ1 HΓ2]"
.
-
iIntros
"[HΓ1 HΓ2]"
.
iPoseProof
(
env_split_None
with
"Hsplit"
)
as
"[% %]"
;
first
by
apply
HΓx
.
iPoseProof
(
big_sepM_insert
with
"HΓ1"
)
as
"[Hv HΓ1]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ1"
)
as
"[Hv HΓ1]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ2"
)
as
"[_ HΓ2]"
;
first
by
assumption
.
iPoseProof
(
big_sepM_insert
with
"HΓ2"
)
as
"[_ HΓ2]"
;
first
by
assumption
.
iApply
(
big_sepM_insert_2
with
"[Hv]"
)=>
//.
iApply
(
big_sepM_insert_2
with
"[Hv]"
)=>
//.
...
@@ -242,7 +235,6 @@ Proof.
...
@@ -242,7 +235,6 @@ Proof.
iDestruct
(
"Hsplit"
with
"Henv"
)
as
"[Henv1 Henv2]"
.
iDestruct
(
"Hsplit"
with
"Henv"
)
as
"[Henv1 Henv2]"
.
iApply
(
wp_wand
with
"(Htyped Henv1)"
)
.
iApply
(
wp_wand
with
"(Htyped Henv1)"
)
.
iIntros
(
v
)
"[$ Henv1']"
.
iIntros
(
v
)
"[$ Henv1']"
.
iApply
"Hsplit'"
.
iFrame
"Henv1' Henv2"
.
iApply
"Hsplit'"
.
iFrame
"Henv1' Henv2"
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/logrel/types.v
+
1
−
1
View file @
9f957e7c
...
@@ -205,7 +205,7 @@ Section properties.
...
@@ -205,7 +205,7 @@ Section properties.
Lemma
ltyped_let
Γ1
Γ2
Γ3
(
x
:
binder
)
e1
e2
A1
A2
:
Lemma
ltyped_let
Γ1
Γ2
Γ3
(
x
:
binder
)
e1
e2
A1
A2
:
(
Γ1
⊨
e1
:
A1
⫤
Γ2
)
-∗
(
binder_insert
x
A1
Γ2
⊨
e2
:
A2
⫤
Γ3
)
-∗
(
Γ1
⊨
e1
:
A1
⫤
Γ2
)
-∗
(
binder_insert
x
A1
Γ2
⊨
e2
:
A2
⫤
Γ3
)
-∗
Γ1
⊨
(
let
:
x
:=
e1
in
e2
)
:
A2
⫤
∅.
Γ1
⊨
(
let
:
x
:=
e1
in
e2
)
:
A2
⫤
∅.
Proof
.
iIntros
"#He1 #He2"
.
iApply
ltyped_app
=>
//.
iApply
ltyped_lam
.
Qed
.
Proof
.
iIntros
"#He1 #He2"
.
iApply
ltyped_app
=>
//.
by
iApply
ltyped_lam
.
Qed
.
Lemma
ltyped_rec
Γ
Γ'
f
x
e
A1
A2
:
Lemma
ltyped_rec
Γ
Γ'
f
x
e
A1
A2
:
env_copy
Γ
Γ'
-∗
env_copy
Γ
Γ'
-∗
...
...
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