Skip to content
Snippets Groups Projects
Commit b05be077 authored by Ralf Jung's avatar Ralf Jung
Browse files

bupd, fupd: add idempotence lemmas

parent 920bc3d9
No related branches found
No related tags found
No related merge requests found
...@@ -184,6 +184,12 @@ Section bupd_derived. ...@@ -184,6 +184,12 @@ Section bupd_derived.
Proof. by rewrite bupd_frame_r wand_elim_r. Qed. Proof. by rewrite bupd_frame_r wand_elim_r. Qed.
Lemma bupd_sep P Q : (|==> P) (|==> Q) ==∗ P Q. Lemma bupd_sep P Q : (|==> P) (|==> Q) ==∗ P Q.
Proof. by rewrite bupd_frame_r bupd_frame_l bupd_trans. Qed. Proof. by rewrite bupd_frame_r bupd_frame_l bupd_trans. Qed.
Lemma bupd_idemp P : (|==> |==> P) ⊣⊢ |==> P.
Proof.
apply: anti_symm.
- apply bupd_trans.
- apply bupd_intro.
Qed.
Global Instance bupd_homomorphism : Global Instance bupd_homomorphism :
MonoidHomomorphism bi_sep bi_sep (flip ()) (bupd (PROP:=PROP)). MonoidHomomorphism bi_sep bi_sep (flip ()) (bupd (PROP:=PROP)).
...@@ -245,6 +251,12 @@ Section fupd_derived. ...@@ -245,6 +251,12 @@ Section fupd_derived.
Proof. exact: fupd_intro_mask. Qed. Proof. exact: fupd_intro_mask. Qed.
Lemma fupd_except_0 E1 E2 P : (|={E1,E2}=> P) ={E1,E2}=∗ P. Lemma fupd_except_0 E1 E2 P : (|={E1,E2}=> P) ={E1,E2}=∗ P.
Proof. by rewrite {1}(fupd_intro E2 P) except_0_fupd fupd_trans. Qed. Proof. by rewrite {1}(fupd_intro E2 P) except_0_fupd fupd_trans. Qed.
Lemma fupd_idemp E P : (|={E}=> |={E}=> P) ⊣⊢ |={E}=> P.
Proof.
apply: anti_symm.
- apply fupd_trans.
- apply fupd_intro.
Qed.
Lemma fupd_frame_l E1 E2 R Q : (R |={E1,E2}=> Q) ={E1,E2}=∗ R Q. Lemma fupd_frame_l E1 E2 R Q : (R |={E1,E2}=> Q) ={E1,E2}=∗ R Q.
Proof. rewrite !(comm _ R); apply fupd_frame_r. Qed. Proof. rewrite !(comm _ R); apply fupd_frame_r. 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