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
ca49296b
Commit
ca49296b
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
improve core: don't use implication
parent
c82cc68e
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
theories/bi/lib/core.v
+5
-17
5 additions, 17 deletions
theories/bi/lib/core.v
theories/bi/plainly.v
+8
-0
8 additions, 0 deletions
theories/bi/plainly.v
with
13 additions
and
17 deletions
theories/bi/lib/core.v
+
5
−
17
View file @
ca49296b
...
...
@@ -7,7 +7,7 @@ Import bi.
i.e. the conjunction of all persistent assertions that are weaker
than P (as in, implied by P). *)
Definition
coreP
`{
!
BiPlainly
PROP
}
(
P
:
PROP
)
:
PROP
:=
(
∀
Q
:
PROP
,
■
(
Q
-∗
<
pers
>
Q
)
→
■
(
P
-∗
Q
)
→
Q
)
%
I
.
(
∀
Q
:
PROP
,
<
affine
>
■
(
Q
-∗
<
pers
>
Q
)
-∗
<
affine
>
■
(
P
-∗
Q
)
-∗
Q
)
%
I
.
Instance
:
Params
(
@
coreP
)
1
.
Typeclasses
Opaque
coreP
.
...
...
@@ -26,11 +26,9 @@ Section core.
Global
Instance
coreP_persistent
P
:
Persistent
(
coreP
P
)
.
Proof
.
rewrite
/
coreP
/
Persistent
.
iIntros
"HC"
(
Q
)
.
iApply
persistently_impl_plainly
.
iIntros
"#HQ"
.
iApply
persistently_impl_plainly
.
iIntros
"#HPQ"
.
iApply
"HQ"
.
(* FIXME: [iApply "HC"] should work. *)
iSpecialize
(
"HC"
with
"HQ"
)
.
iSpecialize
(
"HC"
with
"HPQ"
)
.
done
.
iApply
persistently_wand_affinely_plainly
.
iIntros
"#HQ"
.
iApply
persistently_wand_affinely_plainly
.
iIntros
"#HPQ"
.
iApply
"HQ"
.
iApply
"HC"
;
auto
.
Qed
.
Global
Instance
coreP_ne
:
NonExpansive
(
coreP
(
PROP
:=
PROP
))
.
...
...
@@ -42,17 +40,7 @@ Section core.
Proof
.
solve_proper
.
Qed
.
Lemma
coreP_elim
P
:
Persistent
P
→
coreP
P
-∗
P
.
Proof
.
rewrite
/
coreP
.
iIntros
(?)
"HCP"
.
iSpecialize
(
"HCP"
$!
P
)
.
(* FIXME: [iApply "HCP"] should work. *)
iAssert
(
■
(
P
-∗
<
pers
>
P
))
%
I
as
"#HPpers"
.
{
iModIntro
.
iApply
persistent
.
}
iSpecialize
(
"HCP"
with
"HPpers"
)
.
iAssert
(
■
(
P
-∗
P
))
%
I
as
"#HP"
.
{
iIntros
"!> HP"
.
done
.
}
iSpecialize
(
"HCP"
with
"HP"
)
.
done
.
Qed
.
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
)
.
...
...
This diff is collapsed.
Click to expand it.
theories/bi/plainly.v
+
8
−
0
View file @
ca49296b
...
...
@@ -254,6 +254,14 @@ Proof. apply impl_intro_l. by rewrite plainly_and_sep_l_1 wand_elim_r. Qed.
Lemma
impl_wand_affinely_plainly
P
Q
:
(
■
P
→
Q
)
⊣⊢
(
<
affine
>
■
P
-∗
Q
)
.
Proof
.
by
rewrite
-
(
persistently_plainly
P
)
impl_wand_affinely_persistently
.
Qed
.
Lemma
persistently_wand_affinely_plainly
P
Q
:
(
<
affine
>
■
P
-∗
<
pers
>
Q
)
⊢
<
pers
>
(
<
affine
>
■
P
-∗
Q
)
.
Proof
.
rewrite
-!
impl_wand_affinely_plainly
.
apply
persistently_impl_plainly
.
Qed
.
Lemma
plainly_wand_affinely_plainly
P
Q
:
(
<
affine
>
■
P
-∗
■
Q
)
⊢
■
(
<
affine
>
■
P
-∗
Q
)
.
Proof
.
rewrite
-!
impl_wand_affinely_plainly
.
apply
plainly_impl_plainly
.
Qed
.
Section
plainly_affine_bi
.
Context
`{
BiAffine
PROP
}
.
...
...
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