diff --git a/theories/bi/big_op.v b/theories/bi/big_op.v index dfe8408bff9485b6b871adf70f37914a4d67f6a4..9441f1a52bde57029fb182f0eef22a929e79317b 100644 --- a/theories/bi/big_op.v +++ b/theories/bi/big_op.v @@ -1091,11 +1091,17 @@ Section map2. Context `{Countable K} {A B : Type}. Implicit Types Φ Ψ : K → A → B → PROP. + Lemma big_sepM2_lookup_iff Φ m1 m2 : + ([∗ map] k↦y1;y2 ∈ m1; m2, Φ k y1 y2) ⊢ + ⌜ ∀ k, is_Some (m1 !! k) ↔ is_Some (m2 !! k) âŒ. + Proof. by rewrite big_sepM2_eq /big_sepM2_def and_elim_l. Qed. + Lemma big_sepM2_dom Φ m1 m2 : - ([∗ map] k↦y1;y2 ∈ m1; m2, Φ k y1 y2) -∗ ⌜ dom (gset K) m1 = dom (gset K) m2 âŒ. + ([∗ map] k↦y1;y2 ∈ m1; m2, Φ k y1 y2) ⊢ + ⌜ dom (gset K) m1 = dom (gset K) m2 âŒ. Proof. - rewrite big_sepM2_eq /big_sepM2_def and_elim_l. apply pure_mono=>Hm. - set_unfold=>k. by rewrite !elem_of_dom. + rewrite big_sepM2_lookup_iff. apply pure_mono=>Hm. + apply elem_of_equiv_L=> k. by rewrite !elem_of_dom. Qed. Lemma big_sepM2_flip Φ m1 m2 :