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

stronger make_laterable_wand; and an instance for persistent things being laterable

parent 62d66722
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,12 @@ Section instances. ...@@ -43,6 +43,12 @@ Section instances.
iIntros "!> >_". done. iIntros "!> >_". done.
Qed. Qed.
Global Instance persistent_laterable `{!BiAffine PROP} P :
Persistent P Laterable P.
Proof.
intros ?. apply intuitionistic_laterable; apply _.
Qed.
Global Instance sep_laterable P Q : Global Instance sep_laterable P Q :
Laterable P Laterable Q Laterable (P Q). Laterable P Laterable Q Laterable (P Q).
Proof. Proof.
...@@ -69,7 +75,8 @@ Section instances. ...@@ -69,7 +75,8 @@ Section instances.
Laterable ([] Ps). Laterable ([] Ps).
Proof. induction 2; simpl; apply _. Qed. Proof. induction 2; simpl; apply _. Qed.
(* A wrapper to obtain a weaker, laterable form of any assertion. *) (* A wrapper to obtain a weaker, laterable form of any assertion.
Alternatively: the modality corresponding to [Laterable]. *)
Definition make_laterable (Q : PROP) : PROP := Definition make_laterable (Q : PROP) : PROP :=
P, P ( P -∗ Q). P, P ( P -∗ Q).
...@@ -86,13 +93,17 @@ Section instances. ...@@ -86,13 +93,17 @@ Section instances.
(Q1 Q2) (make_laterable Q1 make_laterable Q2). (Q1 Q2) (make_laterable Q1 make_laterable Q2).
Proof. by intros ->. Qed. Proof. by intros ->. Qed.
(** A stronger version of [make_laterable_mono] that lets us keep persistent (** A stronger version of [make_laterable_mono] that lets us keep laterable
resources. *) resources. We cannot keep arbitrary resources since that would let us "frame
in" non-laterable things. *)
Lemma make_laterable_wand Q1 Q2 : Lemma make_laterable_wand Q1 Q2 :
(Q1 -∗ Q2) -∗ (make_laterable Q1 -∗ make_laterable Q2). make_laterable (Q1 -∗ Q2) -∗ (make_laterable Q1 -∗ make_laterable Q2).
Proof. Proof.
iIntros "#HQ HQ1". iDestruct "HQ1" as (P) "[HP #HQ1]". iIntros "HQ HQ1".
iExists P. iFrame. iIntros "!> HP". iApply "HQ". iApply "HQ1". done. iDestruct "HQ" as (Q1') "[HQ1' #HQ]".
iDestruct "HQ1" as (P) "[HP #HQ1]".
iExists (Q1' P)%I. iFrame. iIntros "!> [HQ1' HP]".
iApply ("HQ" with "HQ1'"). iApply "HQ1". done.
Qed. Qed.
Global Instance make_laterable_laterable Q : Global Instance make_laterable_laterable Q :
......
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