Commit 563ed428 authored by Ralf Jung's avatar Ralf Jung

prove that we can always own an empty fragment of auth

parent 7905c004
...@@ -378,6 +378,8 @@ Lemma cmra_update_op x1 x2 y1 y2 : x1 ~~> y1 → x2 ~~> y2 → x1 ⋅ x2 ~~> y1 ...@@ -378,6 +378,8 @@ Lemma cmra_update_op x1 x2 y1 y2 : x1 ~~> y1 → x2 ~~> y2 → x1 ⋅ x2 ~~> y1
Proof. Proof.
rewrite !cmra_update_updateP; eauto using cmra_updateP_op with congruence. rewrite !cmra_update_updateP; eauto using cmra_updateP_op with congruence.
Qed. Qed.
Lemma cmra_update_id x : x ~~> x.
Proof. intro. auto. Qed.
Section identity_updates. Section identity_updates.
Context `{Empty A, !CMRAIdentity A}. Context `{Empty A, !CMRAIdentity A}.
......
...@@ -35,6 +35,10 @@ Section auth. ...@@ -35,6 +35,10 @@ Section auth.
by rewrite always_and_sep_l. by rewrite always_and_sep_l.
Qed. Qed.
Lemma auth_empty γ E :
True pvs E E (auth_own γ ).
Proof. by rewrite own_update_empty /auth_own. Qed.
Context {Hφ : n, Proper (dist n ==> dist n) φ}. Context {Hφ : n, Proper (dist n ==> dist n) φ}.
Lemma auth_opened E a γ : Lemma auth_opened E a γ :
......
...@@ -93,7 +93,7 @@ Proof. ...@@ -93,7 +93,7 @@ Proof.
by rewrite -(exist_intro γ). by rewrite -(exist_intro γ).
Qed. Qed.
Lemma own_updateP γ a P E : Lemma own_updateP P γ a E :
a ~~>: P own i γ a pvs E E ( a', P a' own i γ a'). a ~~>: P own i γ a pvs E E ( a', P a' own i γ a').
Proof. Proof.
intros Ha. intros Ha.
...@@ -105,7 +105,7 @@ Proof. ...@@ -105,7 +105,7 @@ Proof.
rewrite -(exist_intro a'). by apply and_intro; [apply const_intro|]. rewrite -(exist_intro a'). by apply and_intro; [apply const_intro|].
Qed. Qed.
Lemma own_updateP_empty `{Empty A, !CMRAIdentity A} γ a P E : Lemma own_updateP_empty `{Empty A, !CMRAIdentity A} P γ E :
~~>: P True pvs E E ( a, P a own i γ a). ~~>: P True pvs E E ( a, P a own i γ a).
Proof. Proof.
intros Hemp. intros Hemp.
...@@ -119,7 +119,14 @@ Qed. ...@@ -119,7 +119,14 @@ Qed.
Lemma own_update γ a a' E : a ~~> a' own i γ a pvs E E (own i γ a'). Lemma own_update γ a a' E : a ~~> a' own i γ a pvs E E (own i γ a').
Proof. Proof.
intros; rewrite (own_updateP _ _ (a' =)); last by apply cmra_update_updateP. intros; rewrite (own_updateP (a' =)); last by apply cmra_update_updateP.
by apply pvs_mono, uPred.exist_elim=> m''; apply uPred.const_elim_l=> ->. by apply pvs_mono, exist_elim=> a''; apply const_elim_l=> ->.
Qed.
Lemma own_update_empty `{Empty A, !CMRAIdentity A} γ E :
True pvs E E (own i γ ).
Proof.
rewrite (own_updateP_empty ( =)); last by apply cmra_updateP_id.
apply pvs_mono, exist_elim=>a. by apply const_elim_l=>->.
Qed. Qed.
End global. End global.
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