Commit b962b90e authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Type class for persistent CMRA elements.

parent 9459fc48
......@@ -20,9 +20,8 @@ Section saved_prop.
Implicit Types x y : F (iPropG Λ Σ).
Implicit Types γ : gname.
Global Instance saved_prop_persistent γ x :
Persistent (saved_prop_own γ x).
Proof. by rewrite /Persistent always_own. Qed.
Global Instance saved_prop_persistent γ x : PersistentP (saved_prop_own γ x).
Proof. rewrite /saved_prop_own; apply _. Qed.
Lemma saved_prop_alloc_strong N x (G : gset gname) :
True pvs N N ( γ, (γ G) saved_prop_own γ x).
......
......@@ -42,7 +42,7 @@ Section definitions.
Global Instance sts_ctx_proper N :
Proper (pointwise_relation _ () ==> ()) (sts_ctx N).
Proof. solve_proper. Qed.
Global Instance sts_ctx_persistent N φ : Persistent (sts_ctx N φ).
Global Instance sts_ctx_persistent N φ : PersistentP (sts_ctx N φ).
Proof. apply _. Qed.
End definitions.
Typeclasses Opaque sts_own sts_ownS sts_ctx.
......
......@@ -239,10 +239,10 @@ Proof.
rewrite (comm _ ( R)%I); setoid_rewrite (comm _ R).
apply wp_frame_step_r.
Qed.
Lemma wp_always_l E e Φ R `{!Persistent R} :
Lemma wp_always_l E e Φ R `{!PersistentP R} :
(R WP e @ E {{ Φ }}) WP e @ E {{ λ v, R Φ v }}.
Proof. by setoid_rewrite (always_and_sep_l _ _); rewrite wp_frame_l. Qed.
Lemma wp_always_r E e Φ R `{!Persistent R} :
Lemma wp_always_r E e Φ R `{!PersistentP R} :
(WP e @ E {{ Φ }} R) WP e @ E {{ λ v, Φ v R }}.
Proof. by setoid_rewrite (always_and_sep_r _ _); rewrite wp_frame_r. Qed.
Lemma wp_impl_l E e Φ Ψ :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment