| NChange of loc * npattern * CicNotationPt.term
| NElim of loc * CicNotationPt.term * npattern
| NId of loc
+ | NIntro of loc * string
type ('term, 'lazy_term, 'reduction, 'ident) tactic =
(* Higher order tactics (i.e. tacticals) *)
| NElim (_,what,where) -> "nelim " ^ CicNotationPp.pp_term what ^
assert false ^ " " ^ assert false
| NId _ -> "nid"
+ | NIntro (_,n) -> n
;;
let rec pp_tactic ~map_unicode_to_tex ~term_pp ~lazy_term_pp =
NTactics.elim_tac
~what:(text,prefix_len,what)
~where:(text,prefix_len,where)
- | GrafiteAst.NId _ -> fun x -> x
+ | GrafiteAst.NId _ -> (fun x -> x)
+ | GrafiteAst.NIntro (_loc,n) -> NTactics.intro_tac n
;;
let rec eval_command = {ec_go = fun ~disambiguate_command opts status
GrafiteAst.NChange (loc, what, with_what)
| IDENT "nelim"; what = tactic_term ; where = pattern_spec ->
GrafiteAst.NElim (loc, what, where)
+ | SYMBOL "#"; n=IDENT -> GrafiteAst.NIntro (loc,n)
]
];
tactic: [
instantiate status goal t
;;
+let exact_tac t = distribute_tac (exact t) ;;
+
let reopen status =
let n,h,metasenv,subst,o = status.pstatus in
let subst, newm =
status
;;
-
+let intro_tac name =
+ exact_tac
+ ("",0,(CicNotationPt.Binder (`Lambda,
+ (CicNotationPt.Ident (name,None),None),CicNotationPt.Implicit)))
+;;
val apply_tac: tactic_term -> tactic
val change_tac: where:tactic_pattern -> with_what:tactic_term -> tactic
val elim_tac: what:tactic_term -> where:tactic_pattern -> tactic
-
+val intro_tac: string -> tactic
val pp_tac_status: tac_status -> unit