Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Rice Wine
Iris
Commits
31818640
Commit
31818640
authored
Dec 09, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Curry cancelable_invariants.
parent
14206553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
base_logic/lib/cancelable_invariants.v
base_logic/lib/cancelable_invariants.v
+10
-7
No files found.
base_logic/lib/cancelable_invariants.v
View file @
31818640
...
...
@@ -37,11 +37,14 @@ Section proofs.
AsFractional
(
cinv_own
γ
q
)
(
cinv_own
γ
)
q
.
Proof
.
done
.
Qed
.
Lemma
cinv_own_valid
γ
q1
q2
:
cinv_own
γ
q1
∗
cinv_own
γ
q2
⊢
✓
(
q1
+
q2
)%
Qp
.
Proof
.
rewrite
/
cinv_own
-
own_op
own_valid
.
by
iIntros
"% !%"
.
Qed
.
Lemma
cinv_own_valid
γ
q1
q2
:
cinv_own
γ
q1
-
∗
cinv_own
γ
q2
-
∗
✓
(
q1
+
q2
)%
Qp
.
Proof
.
apply
(
own_valid_2
γ
q1
q2
)
.
Qed
.
Lemma
cinv_own_1_l
γ
q
:
cinv_own
γ
1
∗
cinv_own
γ
q
⊢
False
.
Proof
.
rewrite
cinv_own_valid
.
by
iIntros
(?%(
exclusive_l
1
%
Qp
)).
Qed
.
Lemma
cinv_own_1_l
γ
q
:
cinv_own
γ
1
-
∗
cinv_own
γ
q
-
∗
False
.
Proof
.
iIntros
"H1 H2"
.
iDestruct
(
cinv_own_valid
with
"H1 H2"
)
as
%[]%(
exclusive_l
1
%
Qp
).
Qed
.
Lemma
cinv_alloc
E
N
P
:
▷
P
={
E
}=
∗
∃
γ
,
cinv
N
γ
P
∗
cinv_own
γ
1
.
Proof
.
...
...
@@ -54,7 +57,7 @@ Section proofs.
Proof
.
rewrite
/
cinv
.
iIntros
(?)
"#Hinv Hγ"
.
iInv
N
as
"[$|>Hγ']"
"Hclose"
;
first
iApply
"Hclose"
;
eauto
.
iDestruct
(
cinv_own_1_l
with
"
[$
Hγ
$
Hγ'
]
"
)
as
%[].
iDestruct
(
cinv_own_1_l
with
"Hγ Hγ'"
)
as
%[].
Qed
.
Lemma
cinv_open
E
N
γ
p
P
:
...
...
@@ -62,8 +65,8 @@ Section proofs.
cinv
N
γ
P
-
∗
cinv_own
γ
p
={
E
,
E
∖↑
N
}=
∗
▷
P
∗
cinv_own
γ
p
∗
(
▷
P
={
E
∖↑
N
,
E
}=
∗
True
).
Proof
.
rewrite
/
cinv
.
iIntros
(?)
"#Hinv Hγ"
.
iInv
N
as
"[$
|
>Hγ']"
"Hclose"
.
iInv
N
as
"[$
|
>Hγ']"
"Hclose"
.
-
iIntros
"!> {$Hγ} HP"
.
iApply
"Hclose"
;
eauto
.
-
iDestruct
(
cinv_own_1_l
with
"
[$Hγ $Hγ']
"
)
as
%[].
-
iDestruct
(
cinv_own_1_l
with
"
Hγ' Hγ
"
)
as
%[].
Qed
.
End
proofs
.
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