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