Skip to content
Snippets Groups Projects
Commit 5f98a0bf authored by Ralf Jung's avatar Ralf Jung
Browse files

Add Proper mono instances for make_laterable

parent 219a3a48
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,18 @@ Section instances. ...@@ -76,7 +76,18 @@ Section instances.
Global Instance make_laterable_ne : NonExpansive make_laterable. Global Instance make_laterable_ne : NonExpansive make_laterable.
Proof. solve_proper. Qed. Proof. solve_proper. Qed.
Global Instance make_laterable_proper : Proper (() ==> ()) make_laterable := ne_proper _. Global Instance make_laterable_proper : Proper (() ==> ()) make_laterable := ne_proper _.
Global Instance make_laterable_mono' : Proper (() ==> ()) make_laterable.
Proof. solve_proper. Qed.
Global Instance make_laterable_flip_mono' :
Proper (flip () ==> flip ()) make_laterable.
Proof. solve_proper. Qed.
Lemma make_laterable_mono Q1 Q2 :
(Q1 Q2) (make_laterable Q1 make_laterable Q2).
Proof. by intros ->. Qed.
(** A stronger version of [make_laterable_mono] that lets us keep persistent
resources. *)
Lemma make_laterable_wand Q1 Q2 : Lemma make_laterable_wand Q1 Q2 :
(Q1 -∗ Q2) -∗ (make_laterable Q1 -∗ make_laterable Q2). (Q1 -∗ Q2) -∗ (make_laterable Q1 -∗ make_laterable Q2).
Proof. Proof.
...@@ -84,12 +95,6 @@ Section instances. ...@@ -84,12 +95,6 @@ Section instances.
iExists P. iFrame. iIntros "!> HP". iApply "HQ". iApply "HQ1". done. iExists P. iFrame. iIntros "!> HP". iApply "HQ". iApply "HQ1". done.
Qed. Qed.
Lemma make_laterable_mono Q1 Q2 :
(Q1 Q2) (make_laterable Q1 make_laterable Q2).
Proof.
intros HQ12. iApply make_laterable_wand. rewrite HQ12. by iIntros "!# ?".
Qed.
Global Instance make_laterable_laterable Q : Global Instance make_laterable_laterable Q :
Laterable (make_laterable Q). Laterable (make_laterable Q).
Proof. Proof.
......
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