diff --git a/theories/algebra/frac_auth.v b/theories/algebra/frac_auth.v index 814bf3224fc636e4f5480dd552be77e92e3736ee..d55fea490c396e7711ee8cbc113d6f246f1fbcfd 100644 --- a/theories/algebra/frac_auth.v +++ b/theories/algebra/frac_auth.v @@ -105,4 +105,17 @@ Section frac_auth. Proof. intros. by apply auth_update, option_local_update, prod_local_update_2. Qed. + + Lemma frac_auth_update_alloc q a b c : + (∀ n : nat, ✓{n} a → ✓{n} (c â‹… a)) → + â—! a â‹… â—¯!{q} b ~~> â—! (c â‹… a) â‹… â—¯!{q} (c â‹… b). + Proof. intros ?. by apply frac_auth_update, op_local_update. Qed. + + Lemma frac_auth_dealloc q a b c `{!Cancelable c} : + â—! (c â‹… a) â‹… â—¯!{q} (c â‹… b) ~~> â—! a â‹… â—¯!{q} b. + Proof. + apply frac_auth_update. + move=> n [x|] /= Hvalid Heq; split; eauto using cmra_validN_op_r. + eapply (cancelableN c); by rewrite ?assoc. + Qed. End frac_auth.