From 04e27eb96f011d9f7032f3fb31c19d08da56ae53 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 25 Feb 2017 12:55:28 -0800 Subject: [PATCH] feat(library/init/meta/tactic): add applyc tactic --- library/init/meta/tactic.lean | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/init/meta/tactic.lean b/library/init/meta/tactic.lean index 84eff7e5e6..f99d8e3def 100644 --- a/library/init/meta/tactic.lean +++ b/library/init/meta/tactic.lean @@ -769,6 +769,10 @@ do env ← get_env, ls ← mk_num_meta_univs num, return (expr.const c ls) +/-- Apply the constant `c` -/ +meta def applyc (c : name) : tactic unit := +mk_const c >>= apply + meta def save_const_type_info (n : name) (ref : expr) : tactic unit := try (do c ← mk_const n, save_type_info c ref)