(* 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 split3_data_block:
forall  {cs: compspecs} lo hi sh data d,
0 <= lo <= hi ->
hi <= Zlength data  ->
data_block sh data d =
(data_block sh (sublist 0 lo data) d *
data_block sh (sublist lo hi data)
(field_address0 (tarray tuchar (Zlength data)) [ArraySubsc lo] d) *
data_block sh (sublist hi (Zlength data) data)
(field_address0 (tarray tuchar (Zlength data)) [ArraySubsc hi] d))%logic.