lean2/tests/lean/run/rewriter3.lean
Leonardo de Moura 15efadfbdc feat(frontends/lean/parse_rewrite_tactic): cleanup rewrite tactic notation
Make a rewrite command sequence explicit.
2015-02-04 20:16:24 -08:00

22 lines
503 B
Text

import data.nat
open algebra
constant f {A : Type} : A → A → A
theorem test1 {A : Type} [s : comm_ring A] (a b c : A) (H : a + 0 = 0) : f a a = f 0 0 :=
begin
rewrite add_zero at H,
rewrite H
end
theorem test2 {A : Type} [s : comm_ring A] (a b c : A) (H : a + 0 = 0) : f a a = f 0 0 :=
begin
rewrite add_zero at *,
rewrite H
end
theorem test3 {A : Type} [s : comm_ring A] (a b c : A) (H : a + 0 = 0 + 0) : f a a = f 0 0 :=
begin
rewrite [add_zero at H, zero_add at H],
rewrite H
end