feat(library/rename): add notation for rename

This commit is contained in:
Leonardo de Moura 2014-11-26 19:02:11 -08:00
parent a311f05add
commit f7deabfd19
2 changed files with 11 additions and 1 deletions

View file

@ -58,6 +58,8 @@ opaque definition unfold (e : expr) : tactic := builtin
opaque definition exact (e : expr) : tactic := builtin
opaque definition trace (s : string) : tactic := builtin
notation a `↦` b := rename a b
inductive expr_list : Type :=
nil : expr_list,
cons : expr → expr_list → expr_list

View file

@ -1,10 +1,18 @@
import tools.tactic logic
open tactic
theorem foo (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
theorem foo1 (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
begin
apply eq.trans,
rename Hab Foo,
apply Foo,
apply Hbc,
end
theorem foo2 (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
begin
apply eq.trans,
Hab ↦ Foo,
apply Foo,
apply Hbc,
end