(* 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.

Lemma split2_data_block:
forall  {cs: compspecs}  n sh data d,
(0 <= n <= Zlength data)%Z ->
data_block sh data d =
(data_block sh (sublist 0 n data) d *
data_block sh (sublist n (Zlength data) data)
(field_address0 (tarray tuchar (Zlength data)) [ArraySubsc n] d))%logic.