From 34f9f865c867b66d1e929b075fa55097d6b146b5 Mon Sep 17 00:00:00 2001
From: Robbert Krebbers <mail@robbertkrebbers.nl>
Date: Fri, 5 Aug 2016 23:07:07 +0200
Subject: [PATCH] More now_True laws.

---
 algebra/upred.v             | 10 ++++++++++
 proofmode/class_instances.v |  6 ++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/algebra/upred.v b/algebra/upred.v
index 8d813584b..0f2b58463 100644
--- a/algebra/upred.v
+++ b/algebra/upred.v
@@ -1141,6 +1141,9 @@ Lemma now_True_mono P Q : (P ⊢ Q) → ◇ P ⊢ ◇ Q.
 Proof. by intros ->. Qed.
 Lemma now_True_idemp P : ◇ ◇ P ⊢ ◇ P.
 Proof. rewrite /uPred_now_True; auto. Qed.
+
+Lemma now_True_True : ◇ True ⊣⊢ True.
+Proof. rewrite /uPred_now_True. apply (anti_symm _); auto. Qed.
 Lemma now_True_or P Q : ◇ (P ∨ Q) ⊣⊢ ◇ P ∨ ◇ Q.
 Proof. rewrite /uPred_now_True. apply (anti_symm _); auto. Qed.
 Lemma now_True_and P Q : ◇ (P ∧ Q) ⊣⊢ ◇ P ∧ ◇ Q.
@@ -1160,6 +1163,8 @@ Lemma now_True_later P : ◇ ▷ P ⊢ ▷ P.
 Proof. by rewrite /uPred_now_True -later_or False_or. Qed.
 Lemma now_True_always P : ◇ □ P ⊣⊢ □ ◇ P.
 Proof. by rewrite /uPred_now_True always_or always_later always_pure. Qed.
+Lemma now_True_always_if p P : ◇ □?p P ⊣⊢ □?p ◇ P.
+Proof. destruct p; simpl; auto using now_True_always. Qed.
 Lemma now_True_frame_l P Q : P ★ ◇ Q ⊢ ◇ (P ★ Q).
 Proof. by rewrite {1}(now_True_intro P) now_True_sep. Qed.
 Lemma now_True_frame_r P Q : ◇ P ★ Q ⊢ ◇ (P ★ Q).
@@ -1238,6 +1243,11 @@ Proof.
   exists (y â‹… x3); split; first by rewrite -assoc.
   exists y; eauto using cmra_includedN_l.
 Qed.
+Lemma now_True_rvs P : ◇ (|=r=> ◇ P) ⊢ (|=r=> ◇ P).
+Proof.
+  rewrite /uPred_now_True. apply or_elim; auto using rvs_mono.
+  by rewrite -rvs_intro -or_intro_l.
+Qed.
 
 (** * Derived rules *)
 Global Instance rvs_mono' : Proper ((⊢) ==> (⊢)) (@uPred_rvs M).
diff --git a/proofmode/class_instances.v b/proofmode/class_instances.v
index 27b7f8db8..7c3f504f2 100644
--- a/proofmode/class_instances.v
+++ b/proofmode/class_instances.v
@@ -272,10 +272,8 @@ Proof.
 Qed.
 
 Class MakeNowTrue (P Q : uPred M) := make_now_True : ◇ P ⊣⊢ Q.
-Global Instance make_now_True_true : MakeNowTrue True True.
-Proof.
-  rewrite /MakeNowTrue /uPred_now_True. apply (anti_symm _); auto with I.
-Qed.
+Global Instance make_now_True_True : MakeNowTrue True True.
+Proof. by rewrite /MakeNowTrue now_True_True. Qed.
 Global Instance make_now_True_default P : MakeNowTrue P (â—‡ P) | 100.
 Proof. done. Qed.
 
-- 
GitLab