2015-02-05 04:04:19 +00:00
|
|
|
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
|
2015-02-05 04:16:24 +00:00
|
|
|
rewrite [add_zero at H, zero_add at H],
|
2015-02-05 04:04:19 +00:00
|
|
|
rewrite H
|
|
|
|
end
|