fact: Fixpoint itypeD (i : itype ps) {struct i} : asFunc ps Type -> asFunc ps Type := match i return asFunc ps Type -> asFunc ps Type with | Get pf f => fun F => @get ps _ _ pf (fun x => itypeD (f x) F) | Inj _ T => fun _ => const T | Rec h => fun F => const (applyF F (hlist_to_tuple h)) | @Sig _ t f => fun F => @under _ _ (fun App => @sigT t (fun x' => App _ (itypeD (f x') F))) | @Pi _ t f => fun F => @under _ _ (fun App => forall x' : t, App _ (itypeD (f x') F)) | Sum a b => fun F => combine sum ps (itypeD a F) (itypeD b F) | Prod a b => fun F => combine prod ps (itypeD a F) (itypeD b F) | @Unf _ T pf v i => fun F => @get ps _ _ pf (fun x => combine prod _ (const (x = v : Type)) (replace pf v (itypeD i F))) end%type.
imports: Coq.Lists.List ExtLib.Data.Member ExtLib.Data.HList ExtLib.Generic.Func