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
Jonas Kastberg
iris
Commits
909d2f08
Commit
909d2f08
authored
May 23, 2018
by
Robbert Krebbers
Browse files
Stronger version of allocation rule for cancelable invariants.
parent
463474fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/base_logic/lib/cancelable_invariants.v
View file @
909d2f08
...
...
@@ -61,12 +61,19 @@ Section proofs.
-
iIntros
"?"
.
iApply
"HP'"
.
iApply
"HP''"
.
done
.
Qed
.
Lemma
cinv_alloc
E
N
P
:
▷
P
={
E
}=
∗
∃
γ
,
cinv
N
γ
P
∗
cinv_own
γ
1
.
Lemma
cinv_alloc_strong
(
G
:
gset
gname
)
E
N
:
(|={
E
}=>
∃
γ
,
⌜
γ
∉
G
⌝
∧
cinv_own
γ
1
∗
∀
P
,
▷
P
={
E
}=
∗
cinv
N
γ
P
)%
I
.
Proof
.
i
Intros
"HP"
.
i
Mod
(
own_alloc
1
%
Qp
)
as
(
γ
)
"H
1"
;
first
done
.
i
Mod
(
own_alloc_strong
1
%
Qp
G
)
as
(
γ
)
"[Hfresh Hγ]"
;
first
done
.
i
Exists
γ
;
iIntros
"!> {$Hγ $Hfresh}"
(
P
)
"H
P"
.
iMod
(
inv_alloc
N
_
(
P
∨
own
γ
1
%
Qp
)%
I
with
"[HP]"
)
;
first
by
eauto
.
iExists
_
.
iFrame
.
iExists
_
.
iFrame
.
iIntros
"!> !# !>"
.
iSplit
;
by
iIntros
"?"
.
iIntros
"!>"
.
iExists
P
.
iSplit
;
last
done
.
iIntros
"!# !>"
;
iSplit
;
auto
.
Qed
.
Lemma
cinv_alloc
E
N
P
:
▷
P
={
E
}=
∗
∃
γ
,
cinv
N
γ
P
∗
cinv_own
γ
1
.
Proof
.
iIntros
"HP"
.
iMod
(
cinv_alloc_strong
∅
E
N
)
as
(
γ
_
)
"[Hγ Halloc]"
.
iExists
γ
.
iFrame
"Hγ"
.
by
iApply
"Halloc"
.
Qed
.
Lemma
cinv_cancel
E
N
γ
P
:
↑
N
⊆
E
→
cinv
N
γ
P
-
∗
cinv_own
γ
1
={
E
}=
∗
▷
P
.
...
...
Write
Preview
Supports
Markdown
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