Skip to content
Snippets Groups Projects
Commit 898bb375 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

More documentation.

parent 3d3b7c1d
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,13 @@ Section core. ...@@ -56,6 +56,13 @@ Section core.
Lemma coreP_elim P : Persistent P coreP P -∗ P. Lemma coreP_elim P : Persistent P coreP P -∗ P.
Proof. rewrite /coreP. iIntros (?) "HCP". iApply "HCP"; auto. Qed. Proof. rewrite /coreP. iIntros (?) "HCP". iApply "HCP"; auto. Qed.
(** The [<affine>] modality is needed for general BIs:
- The right-to-left direction corresponds to elimination of [<pers>], which
cannot be done without [<affine>].
- The left-to-right direction corresponds the introduction of [<pers>]. The
[<affine>] modality makes it stronger since it appears in the LHS of the
[⊢] in the premise. As a user, you have to prove [<affine> coreP P ⊢ Q],
which is weaker than [coreP P ⊢ Q]. *)
Lemma coreP_entails P Q : (<affine> coreP P Q) (P <pers> Q). Lemma coreP_entails P Q : (<affine> coreP P Q) (P <pers> Q).
Proof. Proof.
split. split.
...@@ -63,6 +70,7 @@ Section core. ...@@ -63,6 +70,7 @@ Section core.
iIntros "!>". by iApply HP. iIntros "!>". by iApply HP.
- iIntros (->) "HcQ". by iDestruct (coreP_elim with "HcQ") as "#HQ". - iIntros (->) "HcQ". by iDestruct (coreP_elim with "HcQ") as "#HQ".
Qed. Qed.
(** A more convenient variant of the above lemma for affine [P]. *)
Lemma coreP_entails' P Q `{!Affine P} : (coreP P Q) (P Q). Lemma coreP_entails' P Q `{!Affine P} : (coreP P Q) (P Q).
Proof. Proof.
rewrite -(affine_affinely (coreP P)) coreP_entails. split. rewrite -(affine_affinely (coreP P)) coreP_entails. split.
......
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