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

Fix some identation.

parent 92a48e1b
No related branches found
No related tags found
No related merge requests found
...@@ -248,22 +248,21 @@ Lemma map_singleton_update i (x y : A) : x ~~> y → {[ i ↦ x ]} ~~> {[ i ↦ ...@@ -248,22 +248,21 @@ Lemma map_singleton_update i (x y : A) : x ~~> y → {[ i ↦ x ]} ~~> {[ i ↦
Proof. apply map_insert_update. Qed. Proof. apply map_insert_update. Qed.
Lemma map_singleton_updateP_empty `{Empty A, !CMRAIdentity A} Lemma map_singleton_updateP_empty `{Empty A, !CMRAIdentity A}
(P : A Prop) (Q : gmap K A Prop) i : (P : A Prop) (Q : gmap K A Prop) i :
~~>: P ( y, P y Q {[ i y ]}) ~~>: Q. ~~>: P ( y, P y Q {[ i y ]}) ~~>: Q.
Proof. Proof.
intros Hx HQ gf n Hg. intros Hx HQ gf n Hg.
destruct (Hx (default (gf !! i) id) n) as (y&?&Hy). destruct (Hx (from_option (gf !! i)) n) as (y&?&Hy).
{ move:(Hg i). rewrite !left_id. case _: (gf !! i); first done. { move:(Hg i). rewrite !left_id.
intros. apply cmra_empty_valid. } case _: (gf !! i); simpl; auto using cmra_empty_valid. }
exists {[ i y]}. split; first by apply HQ. exists {[ i y ]}; split; first by auto.
intros i'. rewrite lookup_op. intros i'; destruct (decide (i' = i)) as [->|].
destruct (decide (i' = i)). - rewrite lookup_op lookup_singleton.
- subst i'. rewrite lookup_singleton. move:Hy. move:Hy; case _: (gf !! i); first done.
case _: (gf !! i); first done. by rewrite right_id.
by rewrite right_id. - move:(Hg i'). by rewrite !lookup_op lookup_singleton_ne // !left_id.
- move:(Hg i'). rewrite lookup_singleton_ne // !left_id. done.
Qed. Qed.
Lemma map_singleton_updateP_empty' `{Empty A, !CMRAIdentity A} (P : A Prop) i : Lemma map_singleton_updateP_empty' `{Empty A, !CMRAIdentity A} (P: A Prop) i :
~~>: P ~~>: λ m, y, m = {[ i y ]} P y. ~~>: P ~~>: λ m, y, m = {[ i y ]} P y.
Proof. eauto using map_singleton_updateP_empty. Qed. Proof. eauto using map_singleton_updateP_empty. 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