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
Simcha van Collem
Iris
Commits
d6b647ad
Commit
d6b647ad
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Refactor proofs for invariant opening.
parent
66f8aa36
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/base_logic/lib/invariants.v
+25
-30
25 additions, 30 deletions
theories/base_logic/lib/invariants.v
theories/base_logic/lib/wsat.v
+0
-1
0 additions, 1 deletion
theories/base_logic/lib/wsat.v
with
25 additions
and
31 deletions
theories/base_logic/lib/invariants.v
+
25
−
30
View file @
d6b647ad
...
@@ -28,44 +28,39 @@ Qed.
...
@@ -28,44 +28,39 @@ Qed.
Global
Instance
inv_persistent
N
P
:
PersistentP
(
inv
N
P
)
.
Global
Instance
inv_persistent
N
P
:
PersistentP
(
inv
N
P
)
.
Proof
.
rewrite
inv_eq
/
inv
;
apply
_
.
Qed
.
Proof
.
rewrite
inv_eq
/
inv
;
apply
_
.
Qed
.
Lemma
fresh_inv_name
(
E
:
gset
positive
)
N
:
∃
i
,
i
∉
E
∧
i
∈
↑
N
.
Proof
.
exists
(
coPpick
(
↑
N
∖
coPset
.
of_gset
E
))
.
rewrite
-
coPset
.
elem_of_of_gset
(
comm
and
)
-
elem_of_difference
.
apply
coPpick_elem_of
=>
Hfin
.
eapply
nclose_infinite
,
(
difference_finite_inv
_
_),
Hfin
.
apply
of_gset_finite
.
Qed
.
Lemma
inv_alloc
N
E
P
:
▷
P
=
{
E
}
=∗
inv
N
P
.
Lemma
inv_alloc
N
E
P
:
▷
P
=
{
E
}
=∗
inv
N
P
.
Proof
.
Proof
.
rewrite
inv_eq
/
inv_def
fupd_eq
/
fupd_def
.
iIntros
"HP [Hw $]"
.
rewrite
inv_eq
/
inv_def
fupd_eq
/
fupd_def
.
iIntros
"HP [Hw $]"
.
iMod
(
ownI_alloc
(
∈
↑
N
)
P
with
"[HP Hw]"
)
as
(
i
)
"(% & $ & ?)"
;
auto
.
iMod
(
ownI_alloc
(
∈
↑
N
)
P
with
"[$HP $Hw]"
)
-
intros
Ef
.
exists
(
coPpick
(
↑
N
∖
coPset
.
of_gset
Ef
))
.
as
(
i
)
"(% & $ & ?)"
;
auto
using
fresh_inv_name
.
rewrite
-
coPset
.
elem_of_of_gset
comm
-
elem_of_difference
.
apply
coPpick_elem_of
=>
Hfin
.
eapply
nclose_infinite
,
(
difference_finite_inv
_
_),
Hfin
.
apply
of_gset_finite
.
-
by
iFrame
.
-
rewrite
/
uPred_except_0
;
eauto
.
Qed
.
Qed
.
Lemma
inv_alloc_open
N
E
P
:
Lemma
inv_alloc_open
N
E
P
:
↑
N
⊆
E
→
True
=
{
E
,
E
∖↑
N
}
=∗
inv
N
P
∗
(
▷
P
=
{
E
∖↑
N
,
E
}
=∗
True
)
.
↑
N
⊆
E
→
True
=
{
E
,
E
∖↑
N
}
=∗
inv
N
P
∗
(
▷
P
=
{
E
∖↑
N
,
E
}
=∗
True
)
.
Proof
.
Proof
.
rewrite
inv_eq
/
inv_def
fupd_eq
/
fupd_def
.
rewrite
inv_eq
/
inv_def
fupd_eq
/
fupd_def
.
iIntros
(
Sub
)
"[Hw HE]"
.
iIntros
(
Sub
)
"[Hw HE]"
.
iMod
(
ownI_alloc_open
(
∈
↑
N
)
P
with
"Hw"
)
iMod
(
ownI_alloc_open
(
∈
↑
N
)
P
with
"Hw"
)
as
(
i
)
"(% & Hw & #Hi & HD)"
.
as
(
i
)
"(% & Hw & #Hi & HD)"
;
auto
using
fresh_inv_name
.
-
intros
Ef
.
exists
(
coPpick
(
↑
N
∖
coPset
.
of_gset
Ef
))
.
iAssert
(
ownE
{[
i
]}
∗
ownE
(
↑
N
∖
{[
i
]})
∗
ownE
(
E
∖
↑
N
))
%
I
rewrite
-
coPset
.
elem_of_of_gset
comm
-
elem_of_difference
.
with
"[HE]"
as
"(HEi & HEN\i & HE\N)"
.
apply
coPpick_elem_of
=>
Hfin
.
{
rewrite
-
?ownE_op
;
[|
set_solver
..]
.
eapply
nclose_infinite
,
(
difference_finite_inv
_
_),
Hfin
.
rewrite
assoc_L
-!
union_difference_L
//.
set_solver
.
}
apply
of_gset_finite
.
do
2
iModIntro
.
iFrame
"HE\N"
.
iSplitL
"Hw HEi"
;
first
by
iApply
"Hw"
.
-
iAssert
(
ownE
{[
i
]}
∗
ownE
(
↑
N
∖
{[
i
]})
∗
ownE
(
E
∖
↑
N
))
%
I
with
"[HE]"
as
"(HEi & HEN\i & HE\N)"
.
iSplitL
"Hi"
;
first
by
eauto
.
iIntros
"HP [Hw HE\N]"
.
{
rewrite
-
?ownE_op
;
[|
set_solver
|
set_solver
]
.
iDestruct
(
ownI_close
with
"[$Hw $Hi $HP $HD]"
)
as
"[$ HEi]"
.
rewrite
assoc_L
.
rewrite
<-!
union_difference_L
;
try
done
;
set_solver
.
}
do
2
iModIntro
.
iSplitL
;
[|
done
]
.
iModIntro
.
rewrite
/
uPred_except_0
.
iRight
.
iFrame
.
iCombine
"HEi"
"HEN\i"
as
"HEN"
;
iCombine
"HEN"
"HE\N"
as
"HE"
.
iSplitL
"Hw HEi"
.
rewrite
-
?ownE_op
;
[|
set_solver
..]
.
+
by
iApply
"Hw"
.
rewrite
-!
union_difference_L
//
;
set_solver
.
+
iSplitL
"Hi"
;
[
eauto
|]
.
iIntros
"HP [Hw HE\N]"
.
iDestruct
(
ownI_close
with
"[$Hw $Hi $HP $HD]"
)
as
"[? HEi]"
.
iModIntro
.
iRight
.
iFrame
.
iSplitL
;
[|
done
]
.
iCombine
"HEi"
"HEN\i"
as
"HEN"
.
iCombine
"HEN"
"HE\N"
as
"HE"
.
rewrite
-
?ownE_op
;
[|
set_solver
|
set_solver
]
.
rewrite
<-!
union_difference_L
;
try
done
;
set_solver
.
Qed
.
Qed
.
Lemma
inv_open
E
N
P
:
Lemma
inv_open
E
N
P
:
...
...
This diff is collapsed.
Click to expand it.
theories/base_logic/lib/wsat.v
+
0
−
1
View file @
d6b647ad
...
@@ -165,5 +165,4 @@ Proof.
...
@@ -165,5 +165,4 @@ Proof.
iApply
(
big_sepM_insert
_
I
);
first
done
.
iApply
(
big_sepM_insert
_
I
);
first
done
.
iFrame
"HI"
.
by
iRight
.
iFrame
"HI"
.
by
iRight
.
Qed
.
Qed
.
End
wsat
.
End
wsat
.
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