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

Clean up some big op proofs.

parent 0dfda8e4
No related branches found
No related tags found
No related merge requests found
...@@ -1100,7 +1100,8 @@ Section map2. ...@@ -1100,7 +1100,8 @@ Section map2.
Lemma big_sepM2_flip Φ m1 m2 : Lemma big_sepM2_flip Φ m1 m2 :
([ map] ky1;y2 m2; m1, Φ k y2 y1) ⊣⊢ ([ map] ky1;y2 m1; m2, Φ k y1 y2). ([ map] ky1;y2 m2; m1, Φ k y2 y1) ⊣⊢ ([ map] ky1;y2 m1; m2, Φ k y1 y2).
Proof. Proof.
rewrite big_sepM2_eq /big_sepM2_def. apply and_proper; [apply pure_proper; naive_solver |]. rewrite big_sepM2_eq /big_sepM2_def.
apply and_proper; [apply pure_proper; naive_solver |].
rewrite -map_zip_with_flip map_zip_with_map_zip big_sepM_fmap. rewrite -map_zip_with_flip map_zip_with_map_zip big_sepM_fmap.
apply big_sepM_proper. by intros k [b a]. apply big_sepM_proper. by intros k [b a].
Qed. Qed.
...@@ -1265,9 +1266,7 @@ Section map2. ...@@ -1265,9 +1266,7 @@ Section map2.
rewrite !persistent_and_affinely_sep_l /=. rewrite !persistent_and_affinely_sep_l /=.
rewrite (sep_comm (Φ _ _ _)) -sep_assoc. apply sep_mono. rewrite (sep_comm (Φ _ _ _)) -sep_assoc. apply sep_mono.
{ apply affinely_mono, pure_mono. intros Hm k. { apply affinely_mono, pure_mono. intros Hm k.
destruct (decide (i = k)) as [->|]. rewrite !lookup_insert_is_Some. naive_solver. }
- rewrite !lookup_insert. split; eauto.
- rewrite !lookup_insert_ne //. }
rewrite (big_sepM_insert_2 (λ k xx, Φ k xx.1 xx.2) (map_zip m1 m2) i (x1, x2)). rewrite (big_sepM_insert_2 (λ k xx, Φ k xx.1 xx.2) (map_zip m1 m2) i (x1, x2)).
rewrite map_insert_zip_with. apply wand_elim_r. rewrite map_insert_zip_with. apply wand_elim_r.
Qed. Qed.
...@@ -1340,11 +1339,7 @@ Section map2. ...@@ -1340,11 +1339,7 @@ Section map2.
Proof. Proof.
rewrite big_sepM2_eq /big_sepM2_def. rewrite map_fmap_zip. rewrite big_sepM2_eq /big_sepM2_def. rewrite map_fmap_zip.
apply and_proper. apply and_proper.
- apply pure_proper. split. - setoid_rewrite lookup_fmap. by setoid_rewrite fmap_is_Some.
+ intros Hm k. specialize (Hm k). revert Hm.
by rewrite !lookup_fmap !fmap_is_Some.
+ intros Hm k. specialize (Hm k). revert Hm.
by rewrite !lookup_fmap !fmap_is_Some.
- by rewrite big_sepM_fmap. - by rewrite big_sepM_fmap.
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