Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
611995ee
Commit
611995ee
authored
Dec 27, 2016
by
Robbert Krebbers
Browse files
Tweak uPred core.
parent
6ff1c18a
Pipeline
#3532
passed with stage
in 18 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
theories/base_logic/lib/core.v
View file @
611995ee
...
...
@@ -8,33 +8,29 @@ Import uPred.
Definition
coreP
{
M
:
ucmraT
}
(
P
:
uPred
M
)
:
uPred
M
:
=
(
∀
`
(!
PersistentP
Q
,
P
⊢
Q
),
Q
)%
I
.
Instance
:
Params
(@
coreP
)
1
.
Typeclasses
Opaque
coreP
.
Section
core
.
Context
{
M
:
ucmraT
}.
Implicit
Types
P
Q
:
uPred
M
.
Lemma
coreP_intro
P
:
P
-
∗
coreP
P
.
Proof
.
iIntros
"HP"
.
iIntros
(
Q
HQ
HPQ
).
by
iApply
HPQ
.
Qed
.
Proof
.
iIntros
"HP"
.
by
iIntros
(
Q
HQ
->)
.
Qed
.
Global
Instance
coreP_persistent
P
:
PersistentP
(
coreP
P
).
Proof
.
iIntros
"HCP"
.
iApply
always_forall
.
iIntros
(
Q
).
iApply
always_forall
.
iIntros
(
HQ
).
iApply
always_forall
.
iIntros
(
HPQ
).
iApply
HQ
.
unshelve
iApply
(
"HCP"
$!
Q
).
done
.
Qed
.
Proof
.
rewrite
/
coreP
.
apply
_
.
Qed
.
Global
Instance
coreP_mono
:
Proper
((
⊢
)
==>
(
⊢
))
(@
coreP
M
).
Proof
.
unfold
coreP
.
iIntros
(??
ENT
)
"H *"
.
unshelve
iApply
(
"H"
$!
Q
).
by
etrans
.
rewrite
/
coreP
.
iIntros
(
P
P'
?)
"H"
;
iIntros
(
Q
??).
unshelve
iApply
(
"H"
$!
Q
).
by
etrans
.
Qed
.
Global
Instance
coreP_proper
:
Proper
((
⊣
⊢
)
==>
(
⊣
⊢
))
(@
coreP
M
).
Proof
.
intros
??
.
rewrite
!
equiv_spec
=>-[
A
B
].
split
;
rewrite
?A
//
?B
//
.
Qed
.
Proof
.
intros
P
Q
.
rewrite
!
equiv_spec
=>-[
??].
by
split
;
apply
coreP_mono
.
Qed
.
Lemma
coreP_elim
P
:
PersistentP
P
→
coreP
P
-
∗
P
.
Proof
.
iIntros
(?)
"HCP"
.
unshelve
iApply
(
"HCP"
$!
P
).
iIntros
"P"
.
done
.
Qed
.
Proof
.
rewrite
/
coreP
.
iIntros
(?)
"HCP"
.
unshelve
iApply
(
"HCP"
$!
P
)
;
auto
.
Qed
.
End
core
.
Global
Opaque
coreP
.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment