Instance Inhabitant_share : Inhabitant share := Share.bot. (* TODO: remove this, it's already in sublist.v *)
Instance Inhabitant_mpred : Inhabitant mpred := @FF mpred Nveric. (* TODO: remove this, it's already in sublist.v *)

(* This isn't true if the type contains any unions, since in fact the type of the data could be different. Lemma data_at_rec_value_cohere : forall {cs : compspecs} sh1 sh2 t v1 v2 p, readable_share sh1 -> readable_share sh2 -> data_at_rec sh1 t v1 p * data_at_rec sh2 t v2 p |-- data_at_rec sh1 t v1 p * data_at_rec sh2 t v1 p.  Corollary field_at_value_cohere : forall {cs : compspecs} sh1 sh2 t gfs v1 v2 p, readable_share sh1 -> field_at sh1 t gfs v1 p * field_at sh2 t gfs v2 p |-- field_at sh1 t gfs v1 p * field_at sh2 t gfs v1 p.  Corollary data_at_value_cohere : forall {cs : compspecs} sh1 sh2 t v1 v2 p, readable_share sh1 -> data_at sh1 t v1 p * data_at sh2 t v2 p |-- data_at sh1 t v1 p * data_at sh2 t v1 p.  Corollary data_at__cohere : forall {cs : compspecs} sh1 sh2 t v p, readable_share sh1 -> data_at sh1 t v p * data_at_ sh2 t p = data_at sh1 t v p * data_at sh2 t v p.  Lemma data_at__shares_join : forall {cs} sh t v p shs sh1 (Hsplit : sepalg_list.list_join sh1 shs sh) (Hreadable1 : readable_share sh1) (Hreadable : Forall readable_share shs), @data_at cs sh1 t v p * fold_right sepcon emp (map (fun sh => data_at_ sh t p) shs) |-- data_at sh t v p.  Lemma extract_nth_sepcon : forall l i, 0 <= i < Zlength l -> fold_right sepcon emp l = Znth i l * fold_right sepcon emp (upd_Znth i l emp).  Lemma replace_nth_sepcon : forall P l i, P * fold_right sepcon emp (upd_Znth i l emp) = fold_right sepcon emp (upd_Znth i l P).  Lemma sepcon_derives_prop : forall P Q R, P |-- !!R -> P * Q |-- !!R.  Lemma sepcon_map : forall {A} P Q (l : list A), fold_right sepcon emp (map (fun x => P x * Q x) l) = fold_right sepcon emp (map P l) * fold_right sepcon emp (map Q l).  Lemma sepcon_list_derives : forall l1 l2 (Hlen : Zlength l1 = Zlength l2) (Heq : forall i, 0 <= i < Zlength l1 -> Znth i l1 |-- Znth i l2), fold_right sepcon emp l1 |-- fold_right sepcon emp l2.  Lemma sepcon_rotate : forall lP m n, 0 <= n - m < Zlength lP -> fold_right sepcon emp lP = fold_right sepcon emp (rotate lP m n).  (* wand lemmas *)
Lemma wand_eq : forall P Q R, P = Q * R -> P = Q * (Q -* P).