fact: Definition collect_evars {A} (x: A) := res <- (mfix1 f (d: dyn) : M (mlist dyn) := dcase d as e in mif M.is_evar e then M.ret [m: d] else let e := reduce (RedWhd [rl: RedBeta; RedMatch; RedZeta]) e in '(m: h, l) <- M.decompose e; if is_empty l then M.ret [m:] else f h >>= fun d => M.map f l >>= fun ds => M.ret (mapp d (mconcat ds)) ) (Dyn x); let red := dreduce (@mapp, @mconcat) res in ret red.
imports: Strings.String NArith.BinNat Mtac2(Logic Datatypes Logic List Utils MTele Pattern Specif)