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
Rodolphe Lepigre
Iris
Commits
623adc39
Commit
623adc39
authored
Dec 01, 2017
by
Robbert Krebbers
Browse files
Factor out lemma for initializing `gen_heap`.
parent
365fca38
Changes
2
Hide whitespace changes
Inline
Side-by-side
theories/base_logic/lib/gen_heap.v
View file @
623adc39
...
...
@@ -72,6 +72,14 @@ Section to_gen_heap.
Proof
.
by
rewrite
/
to_gen_heap
fmap_delete
.
Qed
.
End
to_gen_heap
.
Lemma
gen_heap_init
`
{
gen_heapPreG
L
V
Σ
}
σ
:
(|==>
∃
_
:
gen_heapG
L
V
Σ
,
gen_heap_ctx
σ
)%
I
.
Proof
.
iMod
(
own_alloc
(
●
to_gen_heap
σ
))
as
(
γ
)
"Hh"
.
{
apply
:
auth_auth_valid
.
exact
:
to_gen_heap_valid
.
}
iModIntro
.
by
iExists
(
GenHeapG
L
V
Σ
_
_
_
γ
).
Qed
.
Section
gen_heap
.
Context
`
{
gen_heapG
L
V
Σ
}.
Implicit
Types
P
Q
:
iProp
Σ
.
...
...
theories/heap_lang/adequacy.v
View file @
623adc39
...
...
@@ -19,9 +19,7 @@ Definition heap_adequacy Σ `{heapPreG Σ} e σ φ :
adequate
e
σ
φ
.
Proof
.
intros
Hwp
;
eapply
(
wp_adequacy
_
_
)
;
iIntros
(?)
""
.
iMod
(
own_alloc
(
●
to_gen_heap
σ
))
as
(
γ
)
"Hh"
.
{
apply
:
auth_auth_valid
.
exact
:
to_gen_heap_valid
.
}
iModIntro
.
iExists
(
λ
σ
,
own
γ
(
●
to_gen_heap
σ
))
;
iFrame
.
set
(
Hheap
:
=
GenHeapG
loc
val
Σ
_
_
_
γ
).
iMod
(
gen_heap_init
σ
)
as
(?)
"Hh"
.
iModIntro
.
iExists
gen_heap_ctx
.
iFrame
"Hh"
.
iApply
(
Hwp
(
HeapG
_
_
_
)).
Qed
.
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