fact: Definition reduce_in (r : Reduction) {P} (H : P) : tactic := fun g => let P' := reduce r P in M.replace (A:=P) (B:=P') H meq_refl ( match g with | Metavar Typeₛ gT _ => e <- M.evar gT; oeq <- M.unify (Metavar Typeₛ _ e) g UniCoq; match oeq with | mSome _ => M.ret [m:(m: tt, HypReplace (A:=P) (B:=P') H meq_refl (AnyMetavar Typeₛ _ e))] | _ => M.failwith "reduce_in: impossible" end | Metavar Propₛ gT _ => e <- M.evar gT; oeq <- M.unify (Metavar Propₛ _ e) g UniCoq; match oeq with | mSome _ => M.ret [m:(m: tt, HypReplace (A:=P) (B:=P') H meq_refl (AnyMetavar Propₛ _ e))] | _ => M.failwith "reduce_in: impossible" end end).
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef