Skip to content
Snippets Groups Projects
Commit 05290985 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Local and FP updates starting with empty gset.

parent 13e7b1b5
No related branches found
No related tags found
No related merge requests found
...@@ -68,13 +68,27 @@ Section gset. ...@@ -68,13 +68,27 @@ Section gset.
Qed. Qed.
Lemma gset_alloc_updateP (Q : gset_disj K Prop) X : Lemma gset_alloc_updateP (Q : gset_disj K Prop) X :
( i, i X Q (GSet ({[i]} X))) GSet X ~~>: Q. ( i, i X Q (GSet ({[i]} X))) GSet X ~~>: Q.
Proof. move=>??. eapply gset_alloc_updateP_strong with (I:=); by eauto. Qed. Proof. intro. eapply gset_alloc_updateP_strong with (I:=); eauto. Qed.
Lemma gset_alloc_updateP_strong' (I : gset K) X : Lemma gset_alloc_updateP_strong' (I : gset K) X :
GSet X ~~>: λ Y, i, Y = GSet ({[ i ]} X) i I i X. GSet X ~~>: λ Y, i, Y = GSet ({[ i ]} X) i I i X.
Proof. eauto using gset_alloc_updateP_strong. Qed. Proof. eauto using gset_alloc_updateP_strong. Qed.
Lemma gset_alloc_updateP' X : GSet X ~~>: λ Y, i, Y = GSet ({[ i ]} X) i X. Lemma gset_alloc_updateP' X : GSet X ~~>: λ Y, i, Y = GSet ({[ i ]} X) i X.
Proof. eauto using gset_alloc_updateP. Qed. Proof. eauto using gset_alloc_updateP. Qed.
Lemma gset_alloc_empty_updateP_strong (Q : gset_disj K Prop) (I : gset K) :
( i, i I Q (GSet {[i]})) GSet ~~>: Q.
Proof.
intros. apply (gset_alloc_updateP_strong _ I)=> i. rewrite right_id_L. auto.
Qed.
Lemma gset_alloc_empty_updateP (Q : gset_disj K Prop) :
( i, Q (GSet {[i]})) GSet ~~>: Q.
Proof. intro. eapply gset_alloc_empty_updateP_strong with (I:=); eauto. Qed.
Lemma gset_alloc_empty_updateP_strong' (I : gset K) :
GSet ~~>: λ Y, i, Y = GSet {[ i ]} i I.
Proof. eauto using gset_alloc_empty_updateP_strong. Qed.
Lemma gset_alloc_empty_updateP' : GSet ~~>: λ Y, i, Y = GSet {[ i ]}.
Proof. eauto using gset_alloc_empty_updateP. Qed.
Lemma gset_alloc_local_update X i Xf : Lemma gset_alloc_local_update X i Xf :
i X i Xf GSet X ~l~> GSet ({[i]} X) @ Some (GSet Xf). i X i Xf GSet X ~l~> GSet ({[i]} X) @ Some (GSet Xf).
Proof. Proof.
...@@ -83,6 +97,12 @@ Section gset. ...@@ -83,6 +97,12 @@ Section gset.
- intros mZ ?%gset_disj_valid_op HXf. - intros mZ ?%gset_disj_valid_op HXf.
rewrite -gset_disj_union -?assoc ?HXf ?cmra_opM_assoc; set_solver. rewrite -gset_disj_union -?assoc ?HXf ?cmra_opM_assoc; set_solver.
Qed. Qed.
Lemma gset_alloc_empty_local_update i Xf :
i Xf GSet ~l~> GSet {[i]} @ Some (GSet Xf).
Proof.
intros. rewrite -(right_id_L _ _ {[i]}).
apply gset_alloc_local_update; set_solver.
Qed.
End gset. End gset.
Arguments gset_disjR _ {_ _}. Arguments gset_disjR _ {_ _}.
......
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