fact: Definition n_etas (n : nat) {A} (f : A) : M A := (fix loop (n : nat) (d : dynr) : M (typer d) := match n with | 0 => M.unfold_projection (elemr d) | S n' => mmatch d as d return M (typer d) with | [? B (T:B->Type) f] @Dynr (forall x:B, T x) f => ty <- M.unfold_projection (typer d); M.nu (FreshFrom ty) mNone (fun x:B => loop n' (Dynr (f x)) >>= M.abs_fun x ) | _ => M.raise NotAProduct end end) n (Dynr f).
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef