fact: Definition change_hyp {P Q} (H : P) (newH: Q) : tactic := fun g=> match g with | Metavar sort gT _ => name <- M.get_binder_name H; '(m: gabs, abs) <- M.remove H (M.nu (TheName name) mNone (fun nH: Q=> r <- M.evar gT; abs <- M.abs_fun nH r; gabs <- M.abs_fun nH (AnyMetavar sort _ r); M.ret (m: AHyp gabs, abs))); exact (abs newH) g;; M.ret [m:(m: tt, gabs)] end.
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef