Definition unfold_reptype {t} (v: reptype t): REPTYPE t :=
  @eq_rect Type (reptype t) (fun x: Type => x) v (REPTYPE t) (reptype_eq t).Definition fold_reptype {t} (v: REPTYPE t): reptype t :=
  @eq_rect_r Type (REPTYPE t) (fun x: Type => x) v (reptype t) (reptype_eq t).Definition struct_default_val (m : members) := list_prod_gen (fun it => default_val (field_type (fst it) m)) m.

(* Specifications: *)
Lemma default_val_eq: forall t, default_val t = fold_reptype match t as t_PAT return REPTYPE t_PAT with | Tint => Vundef | Tstruct id => struct_default_val (co_members (get_co id)) end.