Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simon Spies
Iris
Commits
84c05235
Commit
84c05235
authored
Mar 15, 2017
by
Robbert Krebbers
Browse files
Mononicity of step taking fancy updates.
parent
fda5c51c
Changes
3
Hide whitespace changes
Inline
Side-by-side
theories/base_logic/lib/fancy_updates.v
View file @
84c05235
...
@@ -217,6 +217,9 @@ Notation "P ={ E }▷=∗ Q" := (P ={E,E}▷=∗ Q)%I
...
@@ -217,6 +217,9 @@ Notation "P ={ E }▷=∗ Q" := (P ={E,E}▷=∗ Q)%I
Section
step_fupd
.
Section
step_fupd
.
Context
`
{
invG
Σ
}.
Context
`
{
invG
Σ
}.
Lemma
step_fupd_wand
E1
E2
P
Q
:
(|={
E1
,
E2
}
▷
=>
P
)
-
∗
(
P
-
∗
Q
)
-
∗
|={
E1
,
E2
}
▷
=>
Q
.
Proof
.
iIntros
"HP HPQ"
.
by
iApply
"HPQ"
.
Qed
.
Lemma
step_fupd_mask_frame_r
E1
E2
Ef
P
:
Lemma
step_fupd_mask_frame_r
E1
E2
Ef
P
:
E1
⊥
Ef
→
E2
⊥
Ef
→
(|={
E1
,
E2
}
▷
=>
P
)
⊢
|={
E1
∪
Ef
,
E2
∪
Ef
}
▷
=>
P
.
E1
⊥
Ef
→
E2
⊥
Ef
→
(|={
E1
,
E2
}
▷
=>
P
)
⊢
|={
E1
∪
Ef
,
E2
∪
Ef
}
▷
=>
P
.
Proof
.
Proof
.
...
...
theories/program_logic/ectx_lifting.v
View file @
84c05235
...
@@ -38,8 +38,8 @@ Lemma wp_lift_pure_head_step {E E' Φ} e1 :
...
@@ -38,8 +38,8 @@ Lemma wp_lift_pure_head_step {E E' Φ} e1 :
⊢
WP
e1
@
E
{{
Φ
}}.
⊢
WP
e1
@
E
{{
Φ
}}.
Proof
using
Hinh
.
Proof
using
Hinh
.
iIntros
(??)
"H"
.
iApply
wp_lift_pure_step
;
eauto
.
iIntros
(??)
"H"
.
iApply
wp_lift_pure_step
;
eauto
.
i
Mod
"H"
.
iModIntro
.
iNext
.
iMod
"H"
.
iModIntro
.
i
Apply
(
step_fupd_wand
with
"H"
)
;
iIntros
"H"
.
iIntros
(????).
iApply
"H"
.
eauto
.
iIntros
(????).
iApply
"H"
;
eauto
.
Qed
.
Qed
.
Lemma
wp_lift_atomic_head_step
{
E
Φ
}
e1
:
Lemma
wp_lift_atomic_head_step
{
E
Φ
}
e1
:
...
@@ -67,8 +67,7 @@ Proof.
...
@@ -67,8 +67,7 @@ Proof.
iIntros
(?)
"H"
.
iApply
wp_lift_atomic_head_step
;
eauto
.
iIntros
(?)
"H"
.
iApply
wp_lift_atomic_head_step
;
eauto
.
iIntros
(
σ
1
)
"Hσ1"
.
iMod
(
"H"
$!
σ
1
with
"Hσ1"
)
as
"[$ H]"
;
iModIntro
.
iIntros
(
σ
1
)
"Hσ1"
.
iMod
(
"H"
$!
σ
1
with
"Hσ1"
)
as
"[$ H]"
;
iModIntro
.
iNext
;
iIntros
(
v2
σ
2
efs
)
"%"
.
iNext
;
iIntros
(
v2
σ
2
efs
)
"%"
.
iMod
(
"H"
$!
v2
σ
2
efs
with
"[#]"
)
as
"(% & $ & $)"
=>//
;
subst
.
iMod
(
"H"
$!
v2
σ
2
efs
with
"[#]"
)
as
"(% & $ & $)"
=>//
;
subst
;
auto
.
by
iApply
big_sepL_nil
.
Qed
.
Qed
.
Lemma
wp_lift_pure_det_head_step
{
E
E'
Φ
}
e1
e2
efs
:
Lemma
wp_lift_pure_det_head_step
{
E
E'
Φ
}
e1
e2
efs
:
...
...
theories/program_logic/lifting.v
View file @
84c05235
...
@@ -65,8 +65,7 @@ Lemma wp_lift_pure_det_step `{Inhabited (state Λ)} {E E' Φ} e1 e2 efs :
...
@@ -65,8 +65,7 @@ Lemma wp_lift_pure_det_step `{Inhabited (state Λ)} {E E' Φ} e1 e2 efs :
Proof
.
Proof
.
iIntros
(?
Hpuredet
)
"H"
.
iApply
(
wp_lift_pure_step
E
)
;
try
done
.
iIntros
(?
Hpuredet
)
"H"
.
iApply
(
wp_lift_pure_step
E
)
;
try
done
.
{
by
intros
;
eapply
Hpuredet
.
}
{
by
intros
;
eapply
Hpuredet
.
}
(* TODO: Can we make this nicer? iNext for fupd, for example, could help. *)
iApply
(
step_fupd_wand
with
"H"
)
;
iIntros
"H"
.
iMod
"H"
.
iModIntro
.
iNext
.
iMod
"H"
.
iModIntro
.
by
iIntros
(
e'
efs'
σ
(
_
&->&->)%
Hpuredet
).
by
iIntros
(
e'
efs'
σ
(
_
&->&->)%
Hpuredet
).
Qed
.
Qed
.
End
lifting
.
End
lifting
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment