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

Add lemma `inv_combine`.

parent 725d4329
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,19 @@ Section inv.
rewrite inv_eq /inv_def; iIntros (?) "#HI". by iApply "HI".
Qed.
Lemma inv_combine N1 N2 N P Q :
N1 ## N2
N1 N2 ⊆@{coPset} N
inv N1 P -∗ inv N2 Q -∗ inv N (P Q).
Proof.
rewrite inv_eq. iIntros (??) "#HinvP #HinvQ !#"; iIntros (E ?).
iMod ("HinvP" with "[%]") as "[$ HcloseP]"; first set_solver.
iMod ("HinvQ" with "[%]") as "[$ HcloseQ]"; first set_solver.
iMod (fupd_intro_mask' _ (E N)) as "Hclose"; first set_solver.
iIntros "!> [HP HQ]".
iMod "Hclose" as %_. iMod ("HcloseQ" with "HQ") as %_. by iApply "HcloseP".
Qed.
(** ** Proof mode integration *)
Global Instance into_inv_inv N P : IntoInv (inv N P) N := {}.
......
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