Commit 19e85810 authored by Robbert's avatar Robbert

Merge branch 'big_opM_union' into 'master'

Add `big_opM_union` and `big_sepM_union`.

See merge request FP/iris-coq!188
parents 8004a1a6 4b897d12
......@@ -241,6 +241,18 @@ Section gmap.
([^o map] ky <[i:=x]> m, <[i:=P]> f k) (P `o` [^o map] ky m, f k).
Proof. apply (big_opM_fn_insert (λ _ _, id)). Qed.
Lemma big_opM_union f m1 m2 :
m1 ## m2
([^o map] ky m1 m2, f k y) ([^o map] ky m1, f k y) `o` ([^o map] ky m2, f k y).
Proof.
intros. induction m1 as [|i x m ? IH] using map_ind.
{ by rewrite big_opM_empty !left_id. }
decompose_map_disjoint.
rewrite -insert_union_l !big_opM_insert //;
last by apply lookup_union_None.
rewrite -assoc IH //.
Qed.
Lemma big_opM_opM f g m :
([^o map] kx m, f k x `o` g k x)
([^o map] kx m, f k x) `o` ([^o map] kx m, g k x).
......
......@@ -626,6 +626,12 @@ Section gmap.
([ map] ky <[i:=x]> m, <[i:=P]> Φ k) (P [ map] ky m, Φ k).
Proof. apply big_opM_fn_insert'. Qed.
Lemma big_sepM_union Φ m1 m2 :
m1 ## m2
([ map] ky m1 m2, Φ k y)
([ map] ky m1, Φ k y) ([ map] ky m2, Φ k y).
Proof. apply big_opM_union. Qed.
Lemma big_sepM_sepM Φ Ψ m :
([ map] kx m, Φ k x Ψ k x)
([ map] kx m, Φ k x) ([ map] kx m, Ψ k x).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment