Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
11eacd8b
Commit
11eacd8b
authored
6 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
A stronger version of `cinv_open`.
This version allows one to either close or cancel the invariant after opening it.
parent
b043f3a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base_logic/lib/cancelable_invariants.v
+21
-11
21 additions, 11 deletions
theories/base_logic/lib/cancelable_invariants.v
with
21 additions
and
11 deletions
theories/base_logic/lib/cancelable_invariants.v
+
21
−
11
View file @
11eacd8b
...
...
@@ -70,6 +70,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]"
.
...
...
@@ -78,23 +93,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γ']"
"Hclose"
.
-
iMod
(
"Hclose"
with
"[Hγ]"
)
as
"_"
;
first
by
eauto
.
iModIntro
.
iNext
.
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
.
End
proofs
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment