Definition typeR_spec_members sid: Forall (fun p => TypeTree.typeR (snd p) (Tstruct sid)) (co_members (get_co sid)) :=
  typeR_spec_members_aux (co_members (get_co sid)).Definition typeR_spec (t: type):
  match t with
  | Tint => True
  | Tstruct sid => Forall (fun p => TypeTree.typeR (snd p) t) (co_members (get_co sid))
  end :=
  match t with
  | Tint => I
  | Tstruct sid => typeR_spec_members sid
  end.Definition reptype_fix_aux (y: type): (forall x, TypeTree.typeR x y -> Type) -> Type.Definition reptype : type -> Type := Fix TypeTree.wf_typeR (fun _ => Type) reptype_fix_aux.

(* Specifications: *)
Lemma reptype_eq: forall t: type, reptype t = match t with | Tint => val | Tstruct id => (fix reptype_members (m: members): Type := match m with | nil => unit | cons (_, t0) m0 => (reptype t0 * reptype_members m0)%type end) (co_members (get_co id)) end.