Skip to content
Snippets Groups Projects
Commit b648c25b authored by Ralf Jung's avatar Ralf Jung Committed by Robbert Krebbers
Browse files

core: don't use the turnstile inside the logic

parent 8193c66d
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ Import uPred. ...@@ -5,7 +5,7 @@ Import uPred.
(** The "core" of an assertion is its maximal persistent part. *) (** The "core" of an assertion is its maximal persistent part. *)
Definition coreP {M : ucmraT} (P : uPred M) : uPred M := Definition coreP {M : ucmraT} (P : uPred M) : uPred M :=
( `(!PersistentP Q), (P Q) Q)%I. ( Q, (Q Q) (P Q) Q)%I.
Instance: Params (@coreP) 1. Instance: Params (@coreP) 1.
Typeclasses Opaque coreP. Typeclasses Opaque coreP.
...@@ -14,10 +14,16 @@ Section core. ...@@ -14,10 +14,16 @@ Section core.
Implicit Types P Q : uPred M. Implicit Types P Q : uPred M.
Lemma coreP_intro P : P -∗ coreP P. Lemma coreP_intro P : P -∗ coreP P.
Proof. iIntros "HP". iIntros (Q HQ) "HPQ". by iApply "HPQ". Qed. Proof. iIntros "HP". iIntros (Q) "_ HPQ". by iApply "HPQ". Qed.
Global Instance coreP_persistent P : PersistentP (coreP P). Global Instance coreP_persistent P : PersistentP (coreP P).
Proof. rewrite /coreP. apply _. Qed. Proof.
rewrite /coreP /PersistentP. iIntros "HC".
iApply always_forall. iIntros (Q). (* FIXME: iIntros should apply always_forall automatically. *)
iApply always_impl_plainly. iIntros "#HQ".
iApply always_impl_plainly. iIntros "#HPQ".
iApply "HQ". iApply "HC"; done.
Qed.
Global Instance coreP_ne : NonExpansive (@coreP M). Global Instance coreP_ne : NonExpansive (@coreP M).
Proof. solve_proper. Qed. Proof. solve_proper. Qed.
...@@ -26,8 +32,8 @@ Section core. ...@@ -26,8 +32,8 @@ Section core.
Global Instance coreP_mono : Proper (() ==> ()) (@coreP M). Global Instance coreP_mono : Proper (() ==> ()) (@coreP M).
Proof. Proof.
rewrite /coreP. iIntros (P P' HP) "H"; iIntros (Q ?) "#HPQ". rewrite /coreP. iIntros (P P' HP) "H"; iIntros (Q) "#HQ #HPQ".
iApply ("H" $! Q with "[]"). by rewrite HP. iApply ("H" $! Q with "[]"); first done. by rewrite HP.
Qed. Qed.
Lemma coreP_elim P : PersistentP P coreP P -∗ P. Lemma coreP_elim P : PersistentP P coreP P -∗ P.
......
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