fact: Definition unfold_slow {A} (x : A) : tactic := fun g => let def := reduce (RedOneStep [rl:RedDelta]) x in match g with | Metavar Typeₛ gT _ => gT' <- map_term (fun d => let (ty, el) := d in mmatch d as d return M d.(typer) with | Dynr x =n> M.ret def | [? A (d': A)] Dynr d' =n> M.ret d' end) (Dynr gT); e <- M.evar gT'; exact e g;; M.ret [m:(m: tt,AnyMetavar Typeₛ _ e)] | Metavar Propₛ gT _ => gT' <- map_term (fun d => let (ty, el) := d in mmatch d as d return M d.(typer) with | Dynr x =n> M.ret def | [? A (d': A)] Dynr d' =n> M.ret d' end) (Dynr gT); e <- M.evar gT'; exact e g;; M.ret [m:(m: tt,AnyMetavar Propₛ _ e)] end.
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef