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

Lemmas for big-ops and bind.

parent c7164230
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,12 @@ Section list.
Qed.
End list.
Lemma big_opL_bind {A B} (h : A list B) (f : B M) l :
([^o list] y l ≫= h, f y) ([^o list] x l, [^o list] y h x, f y).
Proof.
revert f. induction l as [|x l IH]=> f; csimpl=> //. by rewrite big_opL_app IH.
Qed.
(** ** Big ops over finite maps *)
Section gmap.
Context `{Countable K} {A : Type}.
......
......@@ -136,6 +136,10 @@ Section sep_list.
([ list] ky f <$> l, Φ k y) ⊣⊢ ([ list] ky l, Φ k (f y)).
Proof. by rewrite big_opL_fmap. Qed.
Lemma big_sepL_bind {B} (f : A list B) (Φ : B PROP) l :
([ list] y l ≫= f, Φ y) ⊣⊢ ([ list] x l, [ list] y f x, Φ y).
Proof. by rewrite big_opL_bind. Qed.
Lemma big_sepL_sep Φ Ψ l :
([ list] kx l, Φ k x Ψ k x)
⊣⊢ ([ list] kx l, Φ k x) ([ list] kx l, Ψ k x).
......@@ -511,6 +515,10 @@ Section and_list.
([ list] ky f <$> l, Φ k y) ⊣⊢ ([ list] ky l, Φ k (f y)).
Proof. by rewrite big_opL_fmap. Qed.
Lemma big_andL_bind {B} (f : A list B) (Φ : B PROP) l :
([ list] y l ≫= f, Φ y) ⊣⊢ ([ list] x l, [ list] y f x, Φ y).
Proof. by rewrite big_opL_bind. Qed.
Lemma big_andL_and Φ Ψ l :
([ list] kx l, Φ k x Ψ k x)
⊣⊢ ([ list] kx l, Φ k x) ([ list] kx l, Ψ k x).
......@@ -597,6 +605,10 @@ Section or_list.
([ list] ky f <$> l, Φ k y) ⊣⊢ ([ list] ky l, Φ k (f y)).
Proof. by rewrite big_opL_fmap. Qed.
Lemma big_orL_bind {B} (f : A list B) (Φ : B PROP) l :
([ list] y l ≫= f, Φ y) ⊣⊢ ([ list] x l, [ list] y f x, Φ y).
Proof. by rewrite big_opL_bind. Qed.
Lemma big_orL_or Φ Ψ l :
([ list] kx l, Φ k x Ψ k x)
⊣⊢ ([ list] kx l, Φ k x) ([ list] kx l, Ψ k x).
......
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