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
George Pirlea
Iris
Commits
58e2394c
Commit
58e2394c
authored
May 23, 2018
by
Robbert Krebbers
Browse files
Merge branch 'master' into gen_proofmode
parents
d8e9c860
11eacd8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/base_logic/lib/cancelable_invariants.v
View file @
58e2394c
...
...
@@ -71,6 +71,21 @@ Section proofs.
iIntros
"!>"
.
iExists
P
.
iSplit
;
last
done
.
iIntros
"!# !>"
;
iSplit
;
auto
.
Qed
.
Lemma
cinv_open_strong
E
N
γ
p
P
:
↑
N
⊆
E
→
cinv
N
γ
P
-
∗
cinv_own
γ
p
={
E
,
E
∖↑
N
}=
∗
▷
P
∗
cinv_own
γ
p
∗
(
▷
P
∨
cinv_own
γ
1
={
E
∖↑
N
,
E
}=
∗
True
).
Proof
.
iIntros
(?)
"#Hinv Hγ"
.
iDestruct
"Hinv"
as
(
P'
)
"[#HP' Hinv]"
.
iInv
N
as
"[HP | >Hγ']"
"Hclose"
.
-
iIntros
"!> {$Hγ}"
.
iSplitL
"HP"
.
+
iNext
.
iApply
"HP'"
.
done
.
+
iIntros
"[HP|Hγ]"
.
*
iApply
"Hclose"
.
iLeft
.
iNext
.
by
iApply
"HP'"
.
*
iApply
"Hclose"
.
iRight
.
by
iNext
.
-
iDestruct
(
cinv_own_1_l
with
"Hγ' Hγ"
)
as
%[].
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]"
.
...
...
@@ -79,22 +94,18 @@ Section proofs.
Lemma
cinv_cancel
E
N
γ
P
:
↑
N
⊆
E
→
cinv
N
γ
P
-
∗
cinv_own
γ
1
={
E
}=
∗
▷
P
.
Proof
.
iIntros
(?)
"#Hinv Hγ"
.
iDestruct
"Hinv"
as
(
P'
)
"[#HP' Hinv]"
.
iInv
N
as
"[HP|>Hγ']"
.
-
iModIntro
.
iFrame
"Hγ"
.
iModIntro
.
iApply
"HP'"
.
done
.
-
iDestruct
(
cinv_own_1_l
with
"Hγ Hγ'"
)
as
%[].
iIntros
(?)
"#Hinv Hγ"
.
iMod
(
cinv_open_strong
with
"Hinv Hγ"
)
as
"($ & Hγ & H)"
;
first
done
.
iApply
"H"
.
by
iRight
.
Qed
.
Lemma
cinv_open
E
N
γ
p
P
:
↑
N
⊆
E
→
cinv
N
γ
P
-
∗
cinv_own
γ
p
={
E
,
E
∖↑
N
}=
∗
▷
P
∗
cinv_own
γ
p
∗
(
▷
P
={
E
∖↑
N
,
E
}=
∗
True
).
Proof
.
iIntros
(?)
"#Hinv Hγ"
.
iDestruct
"Hinv"
as
(
P'
)
"[#HP' Hinv]"
.
iInv
N
as
"[HP | >Hγ']"
"Hclose"
.
-
iIntros
"!> {$Hγ}"
.
iSplitL
"HP"
.
+
iNext
.
iApply
"HP'"
.
done
.
+
iIntros
"HP"
.
iApply
"Hclose"
.
iLeft
.
iNext
.
by
iApply
"HP'"
.
-
iDestruct
(
cinv_own_1_l
with
"Hγ' Hγ"
)
as
%[].
iIntros
(?)
"#Hinv Hγ"
.
iMod
(
cinv_open_strong
with
"Hinv Hγ"
)
as
"($ & $ & H)"
;
first
done
.
iIntros
"!> HP"
.
iApply
"H"
;
auto
.
Qed
.
Global
Instance
into_inv_cinv
N
γ
P
:
IntoInv
(
cinv
N
γ
P
)
N
.
...
...
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