Section CENV.
Context {cs: compspecs}.

Lemma reptype_gen_eq: forall t,
reptype_gen t =
match t with
| Tarray t0 n _ => existT (fun x => x) (list (projT1 (reptype_gen t0))) (list_repeat (Z.to_nat n) (projT2 (reptype_gen t0)))
| Tstruct id _ => existT (fun x => x)
(compact_prod_sigT_type (map reptype_gen (map (fun it => field_type (fst it) (co_members (get_co id))) (co_members (get_co id)))))
(compact_prod_sigT_value (map reptype_gen (map (fun it => field_type (fst it) (co_members (get_co id))) (co_members (get_co id)))))
| Tunion id _ => existT (fun x => x)
(compact_sum_sigT_type (map reptype_gen (map (fun it => field_type (fst it) (co_members (get_co id))) (co_members (get_co id)))))
(compact_sum_sigT_value (map reptype_gen (map (fun it => field_type (fst it) (co_members (get_co id))) (co_members (get_co id)))))
| _ => if (type_is_by_value t)
then existT (fun x => x) val Vundef
else existT (fun x => x) unit tt
end.