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

fix '_L' suffix

parent dc698d42
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,12 @@ lemma. ...@@ -7,8 +7,12 @@ lemma.
**Changes in `algebra`:** **Changes in `algebra`:**
* Rename `agree_op_{inv,invL}'` to `to_agree_op_{inv,invL}`, and add * Rename `agree_op_{inv,invL}'` to `to_agree_op_{inv,inv_L}`, and add
`to_agree_op_invN`. `to_agree_op_invN`.
* Rename `auth_auth_frac_op_invL` to `auth_auth_frac_op_inv_L`,
`excl_auth_agreeL` to `excl_auth_agree_L`,
`frac_auth_agreeL` to `frac_auth_agree_L`, and
`ufrac_auth_agreeL` to `ufrac_auth_agree_L`.
**Changes in `proofmode`:** **Changes in `proofmode`:**
......
...@@ -81,7 +81,7 @@ Proof. ...@@ -81,7 +81,7 @@ Proof.
iInv N as "[[Hl >Hγ]|H]"; last iDestruct "H" as (m') "[Hl Hγ]". iInv N as "[[Hl >Hγ]|H]"; last iDestruct "H" as (m') "[Hl Hγ]".
{ by iDestruct (own_valid_2 with "Hγ Hγ'") as %?. } { by iDestruct (own_valid_2 with "Hγ Hγ'") as %?. }
wp_load. Show. wp_load. Show.
iDestruct (own_valid_2 with "Hγ Hγ'") as %?%to_agree_op_invL; subst. iDestruct (own_valid_2 with "Hγ Hγ'") as %?%to_agree_op_inv_L; subst.
iModIntro. iSplitL "Hl". iModIntro. iSplitL "Hl".
{ iNext; iRight; by eauto. } { iNext; iRight; by eauto. }
wp_apply wp_assert. wp_pures. by case_bool_decide. wp_apply wp_assert. wp_pures. by case_bool_decide.
......
...@@ -99,7 +99,7 @@ Proof. ...@@ -99,7 +99,7 @@ Proof.
+ iDestruct "Hinv" as "[[Hl >Hγ]|H]"; last iDestruct "H" as (m') "[Hl Hγ]". + iDestruct "Hinv" as "[[Hl >Hγ]|H]"; last iDestruct "H" as (m') "[Hl Hγ]".
{ by iDestruct (own_valid_2 with "Hγ Hγ'") as %?. } { by iDestruct (own_valid_2 with "Hγ Hγ'") as %?. }
wp_load. Show. wp_load. Show.
iDestruct (own_valid_2 with "Hγ Hγ'") as %?%to_agree_op_invL; subst. iDestruct (own_valid_2 with "Hγ Hγ'") as %?%to_agree_op_inv_L; subst.
iModIntro. iSplitL "Hl Hγ"; first by eauto with iFrame. iModIntro. iSplitL "Hl Hγ"; first by eauto with iFrame.
wp_pures. iApply wp_assert. wp_op. by case_bool_decide. wp_pures. iApply wp_assert. wp_op. by case_bool_decide.
Qed. Qed.
......
...@@ -241,7 +241,7 @@ Lemma to_agree_op_invN a b n : ✓{n} (to_agree a ⋅ to_agree b) → a ≡{n} ...@@ -241,7 +241,7 @@ Lemma to_agree_op_invN a b n : ✓{n} (to_agree a ⋅ to_agree b) → a ≡{n}
Proof. by intros ?%agree_op_invN%(inj to_agree). Qed. Proof. by intros ?%agree_op_invN%(inj to_agree). Qed.
Lemma to_agree_op_inv a b : (to_agree a to_agree b) a b. Lemma to_agree_op_inv a b : (to_agree a to_agree b) a b.
Proof. by intros ?%agree_op_inv%(inj to_agree). Qed. Proof. by intros ?%agree_op_inv%(inj to_agree). Qed.
Lemma to_agree_op_invL `{!LeibnizEquiv A} a b : (to_agree a to_agree b) a = b. Lemma to_agree_op_inv_L `{!LeibnizEquiv A} a b : (to_agree a to_agree b) a = b.
Proof. by intros ?%to_agree_op_inv%leibniz_equiv. Qed. Proof. by intros ?%to_agree_op_inv%leibniz_equiv. Qed.
(** Internalized properties *) (** Internalized properties *)
......
...@@ -329,7 +329,7 @@ Proof. ...@@ -329,7 +329,7 @@ Proof.
intros ?. apply equiv_dist. intros n. intros ?. apply equiv_dist. intros n.
by eapply auth_auth_frac_op_invN, cmra_valid_validN. by eapply auth_auth_frac_op_invN, cmra_valid_validN.
Qed. Qed.
Lemma auth_auth_frac_op_invL `{!LeibnizEquiv A} q a p b : Lemma auth_auth_frac_op_inv_L `{!LeibnizEquiv A} q a p b :
({p} a {q} b) a = b. ({p} a {q} b) a = b.
Proof. by intros ?%auth_auth_frac_op_inv%leibniz_equiv. Qed. Proof. by intros ?%auth_auth_frac_op_inv%leibniz_equiv. Qed.
......
...@@ -57,7 +57,7 @@ Section excl_auth. ...@@ -57,7 +57,7 @@ Section excl_auth.
Proof. Proof.
intros. apply equiv_dist=> n. by apply excl_auth_agreeN, cmra_valid_validN. intros. apply equiv_dist=> n. by apply excl_auth_agreeN, cmra_valid_validN.
Qed. Qed.
Lemma excl_auth_agreeL `{!LeibnizEquiv A} a b : (E a E b) a = b. Lemma excl_auth_agree_L `{!LeibnizEquiv A} a b : (E a E b) a = b.
Proof. intros. by apply leibniz_equiv, excl_auth_agree. Qed. Proof. intros. by apply leibniz_equiv, excl_auth_agree. Qed.
Lemma excl_auth_agreeI {M} a b : (E a E b) ⊢@{uPredI M} (a b). Lemma excl_auth_agreeI {M} a b : (E a E b) ⊢@{uPredI M} (a b).
......
...@@ -60,7 +60,7 @@ Section frac_auth. ...@@ -60,7 +60,7 @@ Section frac_auth.
Proof. Proof.
intros. apply equiv_dist=> n. by apply frac_auth_agreeN, cmra_valid_validN. intros. apply equiv_dist=> n. by apply frac_auth_agreeN, cmra_valid_validN.
Qed. Qed.
Lemma frac_auth_agreeL `{!LeibnizEquiv A} a b : (F a F b) a = b. Lemma frac_auth_agree_L `{!LeibnizEquiv A} a b : (F a F b) a = b.
Proof. intros. by apply leibniz_equiv, frac_auth_agree. Qed. Proof. intros. by apply leibniz_equiv, frac_auth_agree. Qed.
Lemma frac_auth_includedN n q a b : {n} (F a F{q} b) Some b {n} Some a. Lemma frac_auth_includedN n q a b : {n} (F a F{q} b) Some b {n} Some a.
......
...@@ -80,7 +80,7 @@ Section ufrac_auth. ...@@ -80,7 +80,7 @@ Section ufrac_auth.
Proof. Proof.
intros. apply equiv_dist=> n. by eapply ufrac_auth_agreeN, cmra_valid_validN. intros. apply equiv_dist=> n. by eapply ufrac_auth_agreeN, cmra_valid_validN.
Qed. Qed.
Lemma ufrac_auth_agreeL `{!LeibnizEquiv A} p a b : (U{p} a U{p} b) a = b. Lemma ufrac_auth_agree_L `{!LeibnizEquiv A} p a b : (U{p} a U{p} b) a = b.
Proof. intros. by eapply leibniz_equiv, ufrac_auth_agree. Qed. Proof. intros. by eapply leibniz_equiv, ufrac_auth_agree. Qed.
Lemma ufrac_auth_includedN n p q a b : {n} (U{p} a U{q} b) Some b {n} Some a. Lemma ufrac_auth_includedN n p q a b : {n} (U{p} a U{q} b) Some b {n} Some a.
......
...@@ -78,7 +78,7 @@ Lemma box_own_auth_agree γ b1 b2 : ...@@ -78,7 +78,7 @@ Lemma box_own_auth_agree γ b1 b2 :
box_own_auth γ (E b1) box_own_auth γ (E b2) b1 = b2⌝. box_own_auth γ (E b1) box_own_auth γ (E b2) b1 = b2⌝.
Proof. Proof.
rewrite /box_own_prop -own_op own_valid prod_validI /= and_elim_l. rewrite /box_own_prop -own_op own_valid prod_validI /= and_elim_l.
by iDestruct 1 as %?%excl_auth_agreeL. by iDestruct 1 as %?%excl_auth_agree_L.
Qed. Qed.
Lemma box_own_auth_update γ b1 b2 b3 : Lemma box_own_auth_update γ b1 b2 b3 :
......
...@@ -202,7 +202,7 @@ Section gen_heap. ...@@ -202,7 +202,7 @@ Section gen_heap.
apply wand_intro_r. apply wand_intro_r.
rewrite mapsto_eq /mapsto_def -own_op -auth_frag_op own_valid discrete_valid. rewrite mapsto_eq /mapsto_def -own_op -auth_frag_op own_valid discrete_valid.
f_equiv. rewrite auth_frag_valid singleton_op singleton_valid -pair_op. f_equiv. rewrite auth_frag_valid singleton_op singleton_valid -pair_op.
by intros [_ ?%to_agree_op_invL]. by intros [_ ?%to_agree_op_inv_L].
Qed. Qed.
Lemma mapsto_combine l q1 q2 v1 v2 : Lemma mapsto_combine l q1 q2 v1 v2 :
...@@ -264,7 +264,7 @@ Section gen_heap. ...@@ -264,7 +264,7 @@ Section gen_heap.
iAssert γm1 = γm2 ⌝%I as %->. iAssert γm1 = γm2 ⌝%I as %->.
{ iDestruct (own_valid_2 with "Hγm1 Hγm2") as %; iPureIntro. { iDestruct (own_valid_2 with "Hγm1 Hγm2") as %; iPureIntro.
move: . rewrite -auth_frag_op singleton_op=> /auth_frag_valid /=. move: . rewrite -auth_frag_op singleton_op=> /auth_frag_valid /=.
rewrite singleton_valid. apply: to_agree_op_invL. } rewrite singleton_valid. apply: to_agree_op_inv_L. }
iDestruct (own_valid_2 with "Hm1 Hm2") as %?%namespace_map_token_valid_op. iDestruct (own_valid_2 with "Hm1 Hm2") as %?%namespace_map_token_valid_op.
iExists γm2. iFrame "Hγm2". rewrite namespace_map_token_union //. by iSplitL "Hm1". iExists γm2. iFrame "Hγm2". rewrite namespace_map_token_union //. by iSplitL "Hm1".
Qed. Qed.
...@@ -290,10 +290,10 @@ Section gen_heap. ...@@ -290,10 +290,10 @@ Section gen_heap.
iAssert γm1 = γm2 ⌝%I as %->. iAssert γm1 = γm2 ⌝%I as %->.
{ iDestruct (own_valid_2 with "Hγm1 Hγm2") as %; iPureIntro. { iDestruct (own_valid_2 with "Hγm1 Hγm2") as %; iPureIntro.
move: . rewrite -auth_frag_op singleton_op=> /auth_frag_valid /=. move: . rewrite -auth_frag_op singleton_op=> /auth_frag_valid /=.
rewrite singleton_valid. apply: to_agree_op_invL. } rewrite singleton_valid. apply: to_agree_op_inv_L. }
iDestruct (own_valid_2 with "Hm1 Hm2") as %; iPureIntro. iDestruct (own_valid_2 with "Hm1 Hm2") as %; iPureIntro.
move: . rewrite -namespace_map_data_op namespace_map_data_valid. move: . rewrite -namespace_map_data_op namespace_map_data_valid.
move=> /to_agree_op_invL. naive_solver. move=> /to_agree_op_inv_L. naive_solver.
Qed. Qed.
Lemma meta_set `{Countable A} E l (x : A) N : Lemma meta_set `{Countable A} E l (x : A) N :
N E meta_token l E ==∗ meta l N x. N E meta_token l E ==∗ meta l N x.
......
...@@ -159,7 +159,7 @@ Section contrib_spec. ...@@ -159,7 +159,7 @@ Section contrib_spec.
Proof. Proof.
iIntros (Φ) "[#? Hγf] HΦ". iIntros (Φ) "[#? Hγf] HΦ".
rewrite /read /=. wp_lam. iInv N as (c) ">[Hγ Hl]". wp_load. rewrite /read /=. wp_lam. iInv N as (c) ">[Hγ Hl]". wp_load.
iDestruct (own_valid_2 with "Hγ Hγf") as % <-%frac_auth_agreeL. iDestruct (own_valid_2 with "Hγ Hγf") as % <-%frac_auth_agree_L.
iModIntro. iSplitL "Hl Hγ"; [iNext; iExists c; by iFrame|]. iModIntro. iSplitL "Hl Hγ"; [iNext; iExists c; by iFrame|].
by iApply "HΦ". by iApply "HΦ".
Qed. Qed.
......
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