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).

(* Specifications: *)
Lemma fold_unfold_reptype: forall t (v: reptype t), fold_reptype (unfold_reptype v) = v.
Lemma unfold_fold_reptype: forall t (v: REPTYPE t), unfold_reptype (fold_reptype v) = v.
Lemma unfold_reptype_JMeq: forall t (v: reptype t), JMeq (unfold_reptype v) v.
Lemma fold_reptype_JMeq: forall t v, JMeq (fold_reptype v : reptype t) v.