Definition field_at_ (sh: Share.t) (t: type) (gfs: list gfield) (p: val): mpred :=
  field_at sh t gfs (default_val (nested_field_type t gfs)) p.Definition data_at (sh: Share.t) (t: type) (v: reptype t) := field_at sh t nil v.Definition data_at_ (sh: Share.t) (t: type) := field_at_ sh t nil.Definition nested_reptype_structlist t gfs (m: members) :=
  compact_prod (map (fun it => reptype (nested_field_type t (StructField (fst it) :: gfs))) m).Definition nested_reptype_unionlist t gfs (m: members) :=
  compact_sum (map (fun it => reptype (nested_field_type t (UnionField (fst it) :: gfs))) m).

(* Specifications: *)
Lemma nested_reptype_structlist_lemma: forall t gfs id a, nested_field_type t gfs = Tstruct id a -> reptype (nested_field_type t gfs) = nested_reptype_structlist t gfs (co_members (get_co id)).
Lemma nested_reptype_unionlist_lemma: forall t gfs id a, nested_field_type t gfs = Tunion id a -> reptype (nested_field_type t gfs) = nested_reptype_unionlist t gfs (co_members (get_co id)).