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

change auth_pvs to have a more genrally useful form

parent ee3b01dd
No related branches found
No related tags found
No related merge requests found
...@@ -77,13 +77,12 @@ Section auth. ...@@ -77,13 +77,12 @@ Section auth.
(* Notice how the user has to prove that `b⋅a'` is valid at all (* Notice how the user has to prove that `b⋅a'` is valid at all
step-indices. However, since A is timeless, that should not be step-indices. However, since A is timeless, that should not be
a restriction. *) a restriction. *)
(* TODO The form of the lemma, with a very specific post-condition, is not ideal. *) Lemma auth_pvs `{!LocalUpdate Lv L} E P Q γ a :
Lemma auth_pvs `{!LocalUpdate Lv L} E P (Q : A iProp Λ (globalC Σ)) γ a :
nclose N E nclose N E
(auth_ctx γ auth_own γ a ( a', φ (a a') -★ (auth_ctx γ auth_own γ a ( a', φ (a a') -★
pvs (E nclose N) (E nclose N) pvs (E nclose N) (E nclose N)
((Lv a (L aa')) φ (L a a') Q (L a)))) ((Lv a (L aa')) φ (L a a') (auth_own γ (L a) -★ Q))))
pvs E E (auth_own γ (L a) Q (L a)). pvs E E Q.
Proof. Proof.
rewrite /auth_ctx=>HN. rewrite /auth_ctx=>HN.
rewrite -[pvs E E _]pvs_open_close; last eassumption. rewrite -[pvs E E _]pvs_open_close; last eassumption.
...@@ -91,11 +90,11 @@ Section auth. ...@@ -91,11 +90,11 @@ Section auth.
rewrite associative auth_opened !pvs_frame_r !sep_exist_r. rewrite associative auth_opened !pvs_frame_r !sep_exist_r.
apply pvs_strip_pvs. apply exist_elim=>a'. apply pvs_strip_pvs. apply exist_elim=>a'.
rewrite (forall_elim a'). rewrite [(▷_ _)%I]commutative. rewrite (forall_elim a'). rewrite [(▷_ _)%I]commutative.
rewrite -[((_ ▷_) _)%I]associative wand_elim_r pvs_frame_l. apply pvs_strip_pvs. rewrite -[((_ ▷_) _)%I]associative wand_elim_r pvs_frame_l.
rewrite commutative -!associative. apply const_elim_sep_l=>-[HL Hv]. apply pvs_strip_pvs. rewrite commutative -!associative.
rewrite associative [(_ Q _)%I]commutative -associative auth_closing //; []. apply const_elim_sep_l=>-[HL Hv].
erewrite pvs_frame_l. apply pvs_mono. rewrite associative [(_ (_ -★ _))%I]commutative -associative.
rewrite associative [(_ Q _)%I]commutative associative. rewrite auth_closing //; []. erewrite pvs_frame_l. apply pvs_mono.
apply sep_mono; last done. by rewrite commutative. by rewrite associative [(_ ▷_)%I]commutative -associative wand_elim_l.
Qed. Qed.
End auth. End auth.
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