(* Additional lemmas / proof rules about VST stack *)
Require Export sha.general_lemmas.
Definition data_block {cs: compspecs} (sh: share) (contents: list byte) :=
@data_at cs sh (tarray tuchar (Zlength contents)) (map Vubyte contents).
Hint Resolve @data_block_local_facts : saturate_local.
intros. rewrite skipn_app1.
specialize (skipn_exact_length (force_lengthn n l a)).
rewrite force_lengthn_length_n. intros X; rewrite X; trivial.
rewrite force_lengthn_length_n; omega.
Qed.

Lemma nth_mapVint' {z}: forall i (l:list Z)
(Hi: (0 <= i < length l)%nat),
nth i (map Vint (map Int.repr l)) Vundef =
Vint (Int.repr (nth i l z)).