fact: Definition cvariabilize_base {A} (fail: bool) (t: A) (name:name) (cont: A -> tactic) : tactic := gT <- T.goal_type; r <- T.abstract_from_term t gT; match r with | mSome r => T.cpose_base name t (fun x => T.change (r x);; cont x ) | mNone => if fail then M.raise CVariablizeNoOccurrence else T.cpose_base name t (fun x => T.change ((fun _=>gT) x);; cont x ) end.
imports: Mtac2(Base Tactics ImportedTactics Datatypes List Logic Abstract Sorts) Strings.String