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
8e0effe3
Commit
8e0effe3
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove that -∗ and → with a pure LHS are persistent.
parent
84481877
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/derived.v
+34
-18
34 additions, 18 deletions
theories/base_logic/derived.v
with
34 additions
and
18 deletions
theories/base_logic/derived.v
+
34
−
18
View file @
8e0effe3
...
...
@@ -808,9 +808,43 @@ Global Instance from_option_timeless {A} P (Ψ : A → uPred M) (mx : option A)
(
∀
x
,
TimelessP
(
Ψ
x
))
→
TimelessP
P
→
TimelessP
(
from_option
Ψ
P
mx
)
.
Proof
.
destruct
mx
;
apply
_
.
Qed
.
(* Derived lemmas for persistence *)
Lemma
always_always
P
`{
!
PersistentP
P
}
:
□
P
⊣⊢
P
.
Proof
.
apply
(
anti_symm
(
⊢
));
auto
using
always_elim
.
Qed
.
Lemma
always_if_always
p
P
`{
!
PersistentP
P
}
:
□
?p
P
⊣⊢
P
.
Proof
.
destruct
p
;
simpl
;
auto
using
always_always
.
Qed
.
Lemma
always_intro
P
Q
`{
!
PersistentP
P
}
:
(
P
⊢
Q
)
→
P
⊢
□
Q
.
Proof
.
rewrite
-
(
always_always
P
);
apply
always_intro'
.
Qed
.
Lemma
always_and_sep_l
P
Q
`{
!
PersistentP
P
}
:
P
∧
Q
⊣⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
P
)
always_and_sep_l'
.
Qed
.
Lemma
always_and_sep_r
P
Q
`{
!
PersistentP
Q
}
:
P
∧
Q
⊣⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
Q
)
always_and_sep_r'
.
Qed
.
Lemma
always_sep_dup
P
`{
!
PersistentP
P
}
:
P
⊣⊢
P
∗
P
.
Proof
.
by
rewrite
-
(
always_always
P
)
-
always_sep_dup'
.
Qed
.
Lemma
always_entails_l
P
Q
`{
!
PersistentP
Q
}
:
(
P
⊢
Q
)
→
P
⊢
Q
∗
P
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_l'
.
Qed
.
Lemma
always_entails_r
P
Q
`{
!
PersistentP
Q
}
:
(
P
⊢
Q
)
→
P
⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_r'
.
Qed
.
Lemma
always_impl_wand
P
`{
!
PersistentP
P
}
Q
:
(
P
→
Q
)
⊣⊢
(
P
-∗
Q
)
.
Proof
.
apply
(
anti_symm
_);
auto
using
impl_wand
.
apply
impl_intro_l
.
by
rewrite
always_and_sep_l
wand_elim_r
.
Qed
.
(* Persistence *)
Global
Instance
pure_persistent
φ
:
PersistentP
(
⌜
φ
⌝
:
uPred
M
)
%
I
.
Proof
.
by
rewrite
/
PersistentP
always_pure
.
Qed
.
Global
Instance
pure_impl_persistent
φ
Q
:
PersistentP
Q
→
PersistentP
(
⌜
φ
⌝
→
Q
)
%
I
.
Proof
.
rewrite
/
PersistentP
pure_impl_forall
always_forall
.
auto
using
forall_mono
.
Qed
.
Global
Instance
pure_wand_persistent
φ
Q
:
PersistentP
Q
→
PersistentP
(
⌜
φ
⌝
-∗
Q
)
%
I
.
Proof
.
rewrite
/
PersistentP
-
always_impl_wand
pure_impl_forall
always_forall
.
auto
using
forall_mono
.
Qed
.
Global
Instance
always_persistent
P
:
PersistentP
(
□
P
)
.
Proof
.
by
intros
;
apply
always_intro'
.
Qed
.
Global
Instance
and_persistent
P
Q
:
...
...
@@ -843,23 +877,5 @@ Proof. intros. by rewrite /PersistentP always_ownM. Qed.
Global
Instance
from_option_persistent
{
A
}
P
(
Ψ
:
A
→
uPred
M
)
(
mx
:
option
A
)
:
(
∀
x
,
PersistentP
(
Ψ
x
))
→
PersistentP
P
→
PersistentP
(
from_option
Ψ
P
mx
)
.
Proof
.
destruct
mx
;
apply
_
.
Qed
.
(* Derived lemmas for persistence *)
Lemma
always_always
P
`{
!
PersistentP
P
}
:
□
P
⊣⊢
P
.
Proof
.
apply
(
anti_symm
(
⊢
));
auto
using
always_elim
.
Qed
.
Lemma
always_if_always
p
P
`{
!
PersistentP
P
}
:
□
?p
P
⊣⊢
P
.
Proof
.
destruct
p
;
simpl
;
auto
using
always_always
.
Qed
.
Lemma
always_intro
P
Q
`{
!
PersistentP
P
}
:
(
P
⊢
Q
)
→
P
⊢
□
Q
.
Proof
.
rewrite
-
(
always_always
P
);
apply
always_intro'
.
Qed
.
Lemma
always_and_sep_l
P
Q
`{
!
PersistentP
P
}
:
P
∧
Q
⊣⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
P
)
always_and_sep_l'
.
Qed
.
Lemma
always_and_sep_r
P
Q
`{
!
PersistentP
Q
}
:
P
∧
Q
⊣⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
Q
)
always_and_sep_r'
.
Qed
.
Lemma
always_sep_dup
P
`{
!
PersistentP
P
}
:
P
⊣⊢
P
∗
P
.
Proof
.
by
rewrite
-
(
always_always
P
)
-
always_sep_dup'
.
Qed
.
Lemma
always_entails_l
P
Q
`{
!
PersistentP
Q
}
:
(
P
⊢
Q
)
→
P
⊢
Q
∗
P
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_l'
.
Qed
.
Lemma
always_entails_r
P
Q
`{
!
PersistentP
Q
}
:
(
P
⊢
Q
)
→
P
⊢
P
∗
Q
.
Proof
.
by
rewrite
-
(
always_always
Q
);
apply
always_entails_r'
.
Qed
.
End
derived
.
End
uPred
.
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