fact: Definition get_CTele_raw : forall {isort} (it : ITele isort) (nparams nindx : nat) {A : stype_of isort}, A -> M (CTele it) := fun isort it nparams nindx => mfix rec (A : stype_of isort) : selem_of A -> M (CTele it) := mtmmatch A as A return selem_of A -> M (CTele it) with | [? B (F : B -> isort)] ForAll F =u> fun f => M.nu (FreshFrom F) mNone (fun b : B => let t := reduce (RedWhd RedAll) (App f b) in r <- rec (F b) t; f' <- abs b r; M.ret (cProd f')) | A =n> fun a => let A_red := reduce RedHNF A in args <- args_of_max (nparams+nindx) (Dyn A_red); atele <- get_ATele it (mrev args); a' <- @M.coerce _ (ITele_App atele) a ; M.ret (cBase atele a') end.
imports: Mtac2(Logic Datatypes List Sorts Base MTeleMatch MFix) Mtac2.tactics(Tactics ImportedTactics) Strings.String