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

Tweak core.v

parent fee229c1
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ Import uPred. ...@@ -7,7 +7,7 @@ Import uPred.
in the shallow embedding. *) in the shallow embedding. *)
Definition coreP {M : ucmraT} (P : uPred M) : uPred M := Definition coreP {M : ucmraT} (P : uPred M) : uPred M :=
( (Q : uPred M) `(!PersistentP Q, !P -∗ Q), Q)%I. ( `(!PersistentP Q, P Q), Q)%I.
Section core. Section core.
Context {M : ucmraT}. Context {M : ucmraT}.
...@@ -23,11 +23,18 @@ Section core. ...@@ -23,11 +23,18 @@ Section core.
iIntros (HPQ). iApply HQ. unshelve iApply ("HCP" $! Q). done. iIntros (HPQ). iApply HQ. unshelve iApply ("HCP" $! Q). done.
Qed. Qed.
Global Instance coreP_mono : Proper (() ==> ()) (@coreP M).
Proof.
unfold coreP. iIntros (?? ENT) "H *". unshelve iApply ("H" $! Q). by etrans.
Qed.
Global Instance coreP_proper : Proper ((⊣⊢) ==> (⊣⊢)) (@coreP M).
Proof. intros ??. rewrite !equiv_spec=>-[A B]. split; rewrite ?A // ?B //. Qed.
Lemma coreP_elim P : PersistentP P coreP P -∗ P. Lemma coreP_elim P : PersistentP P coreP P -∗ P.
Proof. Proof.
iIntros (?) "HCP". unshelve iApply ("HCP" $! P). iIntros "P". done. iIntros (?) "HCP". unshelve iApply ("HCP" $! P). iIntros "P". done.
Qed. Qed.
End core. End core.
Global Opaque coreP.
\ No newline at end of file
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