Commit 58740229 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Plainness and persistence of implications and wands.

parent 60df6185
...@@ -1004,14 +1004,15 @@ Qed. ...@@ -1004,14 +1004,15 @@ Qed.
(* Plain *) (* Plain *)
Global Instance pure_plain φ : Plain (⌜φ⌝ : uPred M)%I. Global Instance pure_plain φ : Plain (⌜φ⌝ : uPred M)%I.
Proof. by rewrite /Plain plainly_pure. Qed. Proof. by rewrite /Plain plainly_pure. Qed.
Global Instance pure_impl_plain φ Q : Plain Q Plain (⌜φ⌝ Q)%I. Global Instance impl_plain P Q : Plain P Plain Q Plain (P Q).
Proof. Proof.
rewrite /Plain pure_impl_forall plainly_forall. auto using forall_mono. rewrite /Plain=> HP HQ.
by rewrite {2}HP -plainly_impl_plainly -HQ plainly_elim.
Qed. Qed.
Global Instance pure_wand_plain φ Q : Plain Q Plain (⌜φ⌝ - Q)%I. Global Instance wand_plain P Q : Plain P Plain Q Plain (P - Q)%I.
Proof. Proof.
intros HQ. rewrite /Plain -persistently_pure -!impl_wand_persistently. rewrite /Plain=> HP HQ.
rewrite persistently_pure pure_impl_forall plainly_forall. auto using forall_mono. by rewrite {2}HP -{1}(plainly_elim P) !wand_impl_plainly -plainly_impl_plainly -HQ.
Qed. Qed.
Global Instance plainly_plain P : Plain ( P). Global Instance plainly_plain P : Plain ( P).
Proof. by intros; apply plainly_intro'. Qed. Proof. by intros; apply plainly_intro'. Qed.
...@@ -1051,16 +1052,17 @@ Proof. destruct mx; apply _. Qed. ...@@ -1051,16 +1052,17 @@ Proof. destruct mx; apply _. Qed.
(* Persistence *) (* Persistence *)
Global Instance pure_persistent φ : Persistent (⌜φ⌝ : uPred M)%I. Global Instance pure_persistent φ : Persistent (⌜φ⌝ : uPred M)%I.
Proof. by rewrite /Persistent persistently_pure. Qed. Proof. by rewrite /Persistent persistently_pure. Qed.
Global Instance pure_impl_persistent φ Q : Global Instance impl_persistent P Q :
Persistent Q Persistent (⌜φ⌝ Q)%I. Plain P Persistent Q Persistent (P Q).
Proof. Proof.
rewrite /Persistent pure_impl_forall persistently_forall. auto using forall_mono. rewrite /Plain /Persistent=> HP HQ.
rewrite {2}HP -persistently_impl_plainly. by rewrite -HQ plainly_elim.
Qed. Qed.
Global Instance pure_wand_persistent φ Q : Global Instance wand_persistent P Q :
Persistent Q Persistent (⌜φ⌝ - Q)%I. Plain P Persistent Q Persistent (P - Q)%I.
Proof. Proof.
rewrite /Persistent -impl_wand pure_impl_forall persistently_forall. rewrite /Plain /Persistent=> HP HQ.
auto using forall_mono. by rewrite {2}HP -{1}(plainly_elim P) !wand_impl_plainly -persistently_impl_plainly -HQ.
Qed. Qed.
Global Instance plainly_persistent P : Persistent ( P). Global Instance plainly_persistent P : Persistent ( P).
Proof. by rewrite /Persistent persistently_plainly. Qed. Proof. by rewrite /Persistent persistently_plainly. Qed.
......
...@@ -480,6 +480,20 @@ Proof. ...@@ -480,6 +480,20 @@ Proof.
by rewrite cmra_core_l cmra_core_idemp. by rewrite cmra_core_l cmra_core_idemp.
Qed. Qed.
Lemma persistently_impl_plainly P Q : ( P Q) ( P Q).
Proof.
unseal; split=> /= n x ? HPQ n' x' ????.
eapply uPred_mono with (core x), cmra_included_includedN; auto.
apply (HPQ n' x); eauto using cmra_validN_le.
Qed.
Lemma plainly_impl_plainly P Q : ( P Q) ( P Q).
Proof.
unseal; split=> /= n x ? HPQ n' x' ????.
eapply uPred_mono with ε, cmra_included_includedN; auto.
apply (HPQ n' x); eauto using cmra_validN_le.
Qed.
(* Later *) (* Later *)
Lemma later_mono P Q : (P Q) P Q. Lemma later_mono P Q : (P Q) P Q.
Proof. Proof.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment