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
William Mansky
Iris
Commits
3d3b7c1d
Commit
3d3b7c1d
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Improve `coreP` construction.
parent
ed4be80b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+6
-0
6 additions, 0 deletions
CHANGELOG.md
theories/bi/lib/core.v
+20
-5
20 additions, 5 deletions
theories/bi/lib/core.v
with
26 additions
and
5 deletions
CHANGELOG.md
+
6
−
0
View file @
3d3b7c1d
...
...
@@ -151,6 +151,12 @@ Coq development, but not every API-breaking change is listed. Changes marked
The full list can be found in
[
theories/bi/ascii.v
](
theories/bi/ascii.v
)
,
where the ASCII notations are defined in terms of the unicode notations.
*
Removed
`auth_both_op`
and renamed
`auth_both_frac_op`
into
`auth_both_op`
.
*
Some improvements to the
`bi/lib/core`
construction:
+
Rename
`coreP_wand`
into
`coreP_entails`
since it does not involve wands.
+
Generalize
`coreP_entails`
to non-affine BIs, and prove more convenient
version
`coreP_entails'`
for
`coreP P`
with
`P`
affine.
+
Add instance
`coreP_affine P : Affine P → Affine (coreP P)`
and
lemma
`coreP_wand P Q : <affine> ■ (P -∗ Q) -∗ coreP P -∗ coreP Q`
.
The following
`sed`
script should perform most of the renaming (FIXME: incomplete)
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
):
...
...
This diff is collapsed.
Click to expand it.
theories/bi/lib/core.v
+
20
−
5
View file @
3d3b7c1d
...
...
@@ -33,6 +33,8 @@ Section core.
iApply
persistently_wand_affinely_plainly
.
iIntros
"#HPQ"
.
iApply
"HQ"
.
iApply
"HC"
;
auto
.
Qed
.
Global
Instance
coreP_affine
P
:
Affine
P
→
Affine
(
coreP
P
)
.
Proof
.
intros
?
.
rewrite
/
coreP
/
Affine
.
iIntros
"HC"
.
iApply
"HC"
;
eauto
.
Qed
.
Global
Instance
coreP_ne
:
NonExpansive
(
coreP
(
PROP
:=
PROP
))
.
Proof
.
solve_proper
.
Qed
.
...
...
@@ -41,17 +43,30 @@ Section core.
Global
Instance
coreP_mono
:
Proper
((
⊢
)
==>
(
⊢
))
(
coreP
(
PROP
:=
PROP
))
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
coreP_flip_mono
:
Proper
(
flip
(
⊢
)
==>
flip
(
⊢
))
(
coreP
(
PROP
:=
PROP
))
.
Proof
.
solve_proper
.
Qed
.
Lemma
coreP_wand
P
Q
:
<
affine
>
■
(
P
-∗
Q
)
-∗
coreP
P
-∗
coreP
Q
.
Proof
.
rewrite
/
coreP
.
iIntros
"#HPQ HP"
(
R
)
"#HR #HQR"
.
iApply
(
"HP"
with
"HR"
)
.
iIntros
"!> !> HP"
.
iApply
"HQR"
.
by
iApply
"HPQ"
.
Qed
.
Lemma
coreP_elim
P
:
Persistent
P
→
coreP
P
-∗
P
.
Proof
.
rewrite
/
coreP
.
iIntros
(?)
"HCP"
.
iApply
"HCP"
;
auto
.
Qed
.
(* TODO: Can we generalize this to non-affine BIs? *)
Lemma
coreP_wand
`{
!
BiAffine
PROP
}
P
Q
:
(
coreP
P
⊢
Q
)
↔
(
P
⊢
<
pers
>
Q
)
.
Lemma
coreP_entails
P
Q
:
(
<
affine
>
coreP
P
⊢
Q
)
↔
(
P
⊢
<
pers
>
Q
)
.
Proof
.
split
.
-
iIntros
(
HP
)
"HP"
.
iDestruct
(
coreP_intro
with
"HP"
)
as
"#HcP"
.
-
iIntros
(
HP
)
"HP"
.
iDestruct
(
coreP_intro
with
"HP"
)
as
"#HcP
{HP}
"
.
iIntros
"!>"
.
by
iApply
HP
.
-
iIntros
(
HPQ
)
"HcP"
.
iDestruct
(
coreP_mono
_
_
HPQ
with
"HcP"
)
as
"HcQ"
.
by
iDestruct
(
coreP_elim
with
"HcQ"
)
as
"#HQ"
.
-
iIntros
(
->
)
"HcQ"
.
by
iDestruct
(
coreP_elim
with
"HcQ"
)
as
"#HQ"
.
Qed
.
Lemma
coreP_entails'
P
Q
`{
!
Affine
P
}
:
(
coreP
P
⊢
Q
)
↔
(
P
⊢
□
Q
)
.
Proof
.
rewrite
-
(
affine_affinely
(
coreP
P
))
coreP_entails
.
split
.
-
rewrite
-
{
2
}(
affine_affinely
P
)
.
by
intros
->
.
-
intros
->
.
apply
affinely_elim
.
Qed
.
End
core
.
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