fact: Definition mexists {A} (x: A) : tactic := fun g => match g with | Metavar Typeₛ _ _ => P <- M.evar (A -> Type); e <- M.evar _; oeq <- M.unify g (Metavar Typeₛ _ (@existT _ P x e)) UniCoq; match oeq with | mSome _ => M.ret [m:(m: tt,AnyMetavar Typeₛ _ e)] | _ => M.raise GoalNotExistential end | Metavar Propₛ _ _ => P <- M.evar (A -> Prop); e <- M.evar _; oeq <- M.unify g (Metavar Propₛ _ (@ex_intro _ P x e)) UniCoq; match oeq with | mSome _ => M.ret [m:(m: tt,AnyMetavar Propₛ _ e)] | _ => M.raise GoalNotExistential end end.
imports: Strings.String ssrmatching.ssrmatching Mtac2(Logic Datatypes List Utils Logic Sorts MTeleMatch) Strings.String NArith.BinNat NArith.BinNatDef