(* Lemma headptr_field_compatible' {cs: compspecs}: forall t p, headptr p -> legal_alignas_type t = true -> legal_cosu_type t = true -> sizeof t < Ptrofs.modulus -> complete_type cenv_cs t = true -> field_compatible t nil p. *)

(* TODO: rename and clean up all array_at_data_at lemmas. *)
Lemma array_at_data_at1 {cs} : forall sh t gfs lo hi v p,
lo <= hi ->
field_compatible0 t (gfs SUB lo) p ->
field_compatible0 t (gfs SUB hi) p ->
@array_at cs sh t gfs lo hi v p =
at_offset (@data_at cs sh (nested_field_array_type t gfs lo hi) v)
(nested_field_offset t (ArraySubsc lo :: gfs)) p.