Skip to content
Snippets Groups Projects
Commit 4eb6e55d authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

AddModal instances for except0 and later, to recover the old behavior

parent 1622b639
No related branches found
No related tags found
No related merge requests found
...@@ -868,16 +868,16 @@ Proof. ...@@ -868,16 +868,16 @@ Proof.
intros. rewrite /ElimModal (except_0_intro (_ -∗ _)). intros. rewrite /ElimModal (except_0_intro (_ -∗ _)).
by rewrite -except_0_sep wand_elim_r. by rewrite -except_0_sep wand_elim_r.
Qed. Qed.
Global Instance elim_modal_timeless_bupd P Q : Global Instance elim_modal_later_timeless P Q :
Timeless P IsExcept0 Q ElimModal ( P) P Q Q. Timeless P IsExcept0 Q ElimModal ( P) P Q Q.
Proof. Proof.
intros. rewrite /ElimModal (except_0_intro (_ -∗ _)) (timeless P). intros. rewrite /ElimModal (except_0_intro (_ -∗ _)) (timeless P).
by rewrite -except_0_sep wand_elim_r. by rewrite -except_0_sep wand_elim_r.
Qed. Qed.
Global Instance elim_modal_timeless_bupd' p P Q : Global Instance elim_modal_later_if_timeless p P Q :
Timeless P IsExcept0 Q ElimModal (?p P) P Q Q. Timeless P IsExcept0 Q ElimModal (?p P) P Q Q.
Proof. Proof.
destruct p; simpl; auto using elim_modal_timeless_bupd. destruct p; simpl; auto using elim_modal_later_timeless.
intros _ _. by rewrite /ElimModal wand_elim_r. intros _ _. by rewrite /ElimModal wand_elim_r.
Qed. Qed.
...@@ -896,6 +896,30 @@ Qed. ...@@ -896,6 +896,30 @@ Qed.
Global Instance add_modal_bupd P Q : AddModal (|==> P) P (|==> Q). Global Instance add_modal_bupd P Q : AddModal (|==> P) P (|==> Q).
Proof. by rewrite /AddModal bupd_frame_r wand_elim_r bupd_trans. Qed. Proof. by rewrite /AddModal bupd_frame_r wand_elim_r bupd_trans. Qed.
(* High priority to add a ▷ rather than a ◇ when P is timeless. *)
Global Instance add_modal_later_except_0 P Q :
Timeless P AddModal ( P) P ( Q) | 0.
Proof.
intros. rewrite /AddModal (except_0_intro (_ -∗ _)) (timeless P).
by rewrite -except_0_sep wand_elim_r except_0_idemp.
Qed.
Global Instance add_modal_later P Q :
Timeless P AddModal ( P) P ( Q) | 0.
Proof.
intros. rewrite /AddModal (except_0_intro (_ -∗ _)) (timeless P).
by rewrite -except_0_sep wand_elim_r except_0_later.
Qed.
Global Instance add_modal_except_0 P Q : AddModal ( P) P ( Q).
Proof.
intros. rewrite /AddModal (except_0_intro (_ -∗ _)).
by rewrite -except_0_sep wand_elim_r except_0_idemp.
Qed.
Global Instance add_modal_except_0_later P Q : AddModal ( P) P ( Q).
Proof.
intros. rewrite /AddModal (except_0_intro (_ -∗ _)).
by rewrite -except_0_sep wand_elim_r except_0_later.
Qed.
(** IsExcept0 *) (** IsExcept0 *)
Global Instance is_except_0_except_0 P : IsExcept0 ( P). Global Instance is_except_0_except_0 P : IsExcept0 ( P).
Proof. by rewrite /IsExcept0 except_0_idemp. Qed. Proof. by rewrite /IsExcept0 except_0_idemp. Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment