Definition repinject (t: type): reptype t -> val :=
  match t as t_PAT return reptype t_PAT -> val with
  | Tint => fun v => v
  | _ => fun _ => Vundef
  end.Definition at_offset (P: val -> Pred) (z: Z): val -> Pred :=
 fun v => P (offset_val z v).Fixpoint struct_pred (m: members) {A: ident * type -> Type} (P: forall it, A it -> val -> Pred): list_prod (map A m) -> val -> Pred :=
  match m as m_PAT return list_prod (map A m_PAT) -> val -> Pred with
  | nil => fun _ _ => emp
  | (i0, t0) :: m0 => fun v p => (P _ (fst v) p * struct_pred m0 P (snd v) p)%logic
  end.Definition struct_data_at_rec_aux (m m0: members) (P: ListType (map (fun it => reptype (field_type (fst it) m0) -> (val -> Pred)) m)) (v: list_prod (map (fun it => reptype (field_type (fst it) m0)) m)) : (val -> Pred).

Lemma struct_data_at_rec_aux_spec: forall m m0 v P, struct_data_at_rec_aux m m0 (ListTypeGen (fun it => reptype (field_type (fst it) m0) -> val -> Pred) P m) v = struct_pred m (fun it v => at_offset (P it v) (field_offset cenv_cs (fst it) m0)) v.