feat(library/init/meta/tactic): add dependent parameters for empty introv

This commit is contained in:
Leonardo de Moura 2017-05-31 15:10:07 -07:00
parent 293ab6a032
commit d8fa93b4a2
2 changed files with 8 additions and 1 deletions

View file

@ -522,7 +522,7 @@ do t ← target,
end
meta def introv : list name → tactic (list expr)
| [] := return []
| [] := intros_dep
| (n::ns) := do hs ← intros_dep, h ← intro n, hs' ← introv ns, return (hs ++ h :: hs')
/-- Returns n fully qualified if it refers to a constant, or else fails. -/

View file

@ -9,3 +9,10 @@ begin
introv h₁ h₂,
exact h₁.trans h₂
end
example : ∀ a b : nat, a = b → b = a :=
begin
introv,
intro h,
exact h.symm
end