Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marianna Rapoport
iris-coq
Commits
55294a27
Commit
55294a27
authored
Apr 13, 2017
by
Robbert Krebbers
Browse files
Reverse direction of wp_bind.
parent
beebaa6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/program_logic/weakestpre.v
View file @
55294a27
...
...
@@ -189,6 +189,20 @@ Proof.
by
iApply
"IH"
.
Qed
.
Lemma
wp_bind_inv
K
`
{!
LanguageCtx
Λ
K
}
E
e
Φ
:
WP
K
e
@
E
{{
Φ
}}
⊢
WP
e
@
E
{{
v
,
WP
K
(
of_val
v
)
@
E
{{
Φ
}}
}}.
Proof
.
iIntros
"H"
.
iL
ö
b
as
"IH"
forall
(
E
e
Φ
).
rewrite
!
wp_unfold
/
wp_pre
.
destruct
(
to_val
e
)
as
[
v
|]
eqn
:
He
.
{
apply
of_to_val
in
He
as
<-.
by
rewrite
!
wp_unfold
/
wp_pre
.
}
rewrite
fill_not_val
//.
iIntros
(
σ
1
)
"Hσ"
.
iMod
(
"H"
with
"[$]"
)
as
"[% H]"
.
iModIntro
;
iSplit
.
{
eauto
using
reducible_fill
.
}
iNext
;
iIntros
(
e2
σ
2
efs
Hstep
).
iMod
(
"H"
$!
(
K
e2
)
σ
2
efs
with
"[]"
)
as
"($ & H & $)"
;
eauto
using
fill_step
.
by
iApply
"IH"
.
Qed
.
(** * Derived rules *)
Lemma
wp_mono
E
e
Φ
Ψ
:
(
∀
v
,
Φ
v
⊢
Ψ
v
)
→
WP
e
@
E
{{
Φ
}}
⊢
WP
e
@
E
{{
Ψ
}}.
Proof
.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment