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

(* Specifications: *)
Lemma join_shares_nth : forall shs sh1 sh i, sepalg_list.list_join sh1 shs sh -> 0 <= i < Zlength shs -> exists sh', sepalg_list.list_join (Znth i shs) (remove_Znth i shs) sh' /\ sepalg.join sh1 sh' sh.
Lemma list_join_comm : forall (l1 l2 : list share) a b, sepalg_list.list_join a (l1 ++ l2) b -> sepalg_list.list_join a (l2 ++ l1) b.
Lemma split_shares : forall n sh, readable_share sh -> exists sh1 shs, Zlength shs = Z.of_nat n /\ readable_share sh1 /\ Forall readable_share shs /\ sepalg_list.list_join sh1 shs sh.
Lemma data_at_shares_join : forall {cs} sh t v p shs sh1 (Hsplit : sepalg_list.list_join sh1 shs sh), @data_at cs sh1 t v p * fold_right sepcon emp (map (fun sh => data_at sh t v 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_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_rotate : forall lP m n, 0 <= n - m < Zlength lP -> fold_right sepcon emp lP = fold_right sepcon emp (rotate lP m n).
Lemma sepcon_In : forall l P, In P l -> exists Q, fold_right sepcon emp l = P * Q.
Lemma approx_imp : forall n P Q, compcert_rmaps.RML.R.approx n (predicates_hered.imp P Q) = compcert_rmaps.RML.R.approx n (predicates_hered.imp (compcert_rmaps.RML.R.approx n P) (compcert_rmaps.RML.R.approx n Q)).