feat(library/rename): add notation for rename
This commit is contained in:
parent
a311f05add
commit
f7deabfd19
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue