Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Paolo G. Giarrusso
iris
Commits
1edf71ef
Commit
1edf71ef
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
close cancellable invariants under logical biimplication
parent
35551d40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+25
-10
25 additions, 10 deletions
theories/base_logic/lib/cancelable_invariants.v
with
25 additions
and
10 deletions
theories/base_logic/lib/cancelable_invariants.v
+
25
−
10
View file @
1edf71ef
...
...
@@ -16,11 +16,10 @@ Section defs.
Definition
cinv_own
(
γ
:
gname
)
(
p
:
frac
)
:
iProp
Σ
:=
own
γ
p
.
Definition
cinv
(
N
:
namespace
)
(
γ
:
gname
)
(
P
:
iProp
Σ
)
:
iProp
Σ
:=
inv
N
(
P
∨
cinv_own
γ
1
%
Qp
)
%
I
.
(
∃
P'
,
□
▷
(
P
↔
P'
)
∗
inv
N
(
P
'
∨
cinv_own
γ
1
%
Qp
)
)
%
I
.
End
defs
.
Instance
:
Params
(
@
cinv
)
5
.
Typeclasses
Opaque
cinv_own
cinv
.
Section
proofs
.
Context
`{
invG
Σ
,
cinvG
Σ
}
.
...
...
@@ -53,27 +52,43 @@ Section proofs.
iDestruct
(
cinv_own_valid
with
"H1 H2"
)
as
%
[]
%
(
exclusive_l
1
%
Qp
)
.
Qed
.
Lemma
cinv_iff
N
γ
P
P'
:
▷
□
(
P
↔
P'
)
-∗
cinv
N
γ
P
-∗
cinv
N
γ
P'
.
Proof
.
iIntros
"#HP' Hinv"
.
iDestruct
"Hinv"
as
(
P''
)
"[#HP'' Hinv]"
.
iExists
_
.
iFrame
"Hinv"
.
iNext
.
iAlways
.
iSplit
.
-
iIntros
"?"
.
iApply
"HP''"
.
iApply
"HP'"
.
done
.
-
iIntros
"?"
.
iApply
"HP'"
.
iApply
"HP''"
.
done
.
Qed
.
Lemma
cinv_alloc
E
N
P
:
▷
P
=
{
E
}
=∗
∃
γ
,
cinv
N
γ
P
∗
cinv_own
γ
1
.
Proof
.
rewrite
/
cinv
/
cinv_own
.
iIntros
"HP"
.
iIntros
"HP"
.
iMod
(
own_alloc
1
%
Qp
)
as
(
γ
)
"H1"
;
first
done
.
iMod
(
inv_alloc
N
_
(
P
∨
own
γ
1
%
Qp
)
%
I
with
"[HP]"
);
eauto
.
iMod
(
inv_alloc
N
_
(
P
∨
own
γ
1
%
Qp
)
%
I
with
"[HP]"
);
first
by
eauto
.
iExists
_
.
iFrame
.
iExists
_
.
iFrame
.
iIntros
"!> !# !>"
.
iSplit
;
by
iIntros
"?"
.
Qed
.
Lemma
cinv_cancel
E
N
γ
P
:
↑
N
⊆
E
→
cinv
N
γ
P
-∗
cinv_own
γ
1
=
{
E
}
=∗
▷
P
.
Proof
.
rewrite
/
cinv
.
iIntros
(?)
"#Hinv Hγ"
.
iInv
N
as
"[$|>Hγ']"
"Hclose"
;
first
iApply
"Hclose"
;
eauto
.
iDestruct
(
cinv_own_1_l
with
"Hγ Hγ'"
)
as
%
[]
.
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
%
[]
.
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
.
rewrite
/
cinv
.
iIntros
(?)
"#Hinv Hγ"
.
iInv
N
as
"[$ | >Hγ']"
"Hclose"
.
-
iIntros
"!> {$Hγ} HP"
.
iApply
"Hclose"
;
eauto
.
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
%
[]
.
Qed
.
End
proofs
.
Typeclasses
Opaque
cinv_own
cinv
.
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