2015-11-30 17:33:00 +00:00
|
|
|
import algebra.ring data.nat
|
|
|
|
|
2015-12-06 07:52:16 +00:00
|
|
|
namespace foo
|
2015-11-30 17:33:00 +00:00
|
|
|
variables {A : Type}
|
|
|
|
|
|
|
|
section
|
|
|
|
variables [s : add_comm_monoid A]
|
|
|
|
include s
|
|
|
|
|
|
|
|
attribute add.comm [forward]
|
|
|
|
attribute add.assoc [forward]
|
|
|
|
|
2015-12-06 23:01:49 +00:00
|
|
|
set_option blast.strategy "ematch"
|
2015-11-30 17:33:00 +00:00
|
|
|
|
|
|
|
theorem add_comm_three (a b c : A) : a + b + c = c + b + a :=
|
|
|
|
by blast
|
|
|
|
|
|
|
|
theorem add.comm4 : ∀ (n m k l : A), n + m + (k + l) = n + k + (m + l) :=
|
|
|
|
by blast
|
|
|
|
end
|
|
|
|
|
|
|
|
section
|
|
|
|
variable [s : group A]
|
|
|
|
include s
|
|
|
|
|
|
|
|
attribute mul.assoc [forward]
|
|
|
|
attribute mul.left_inv [forward]
|
|
|
|
attribute one_mul [forward]
|
|
|
|
|
2015-12-06 23:01:49 +00:00
|
|
|
set_option blast.strategy "ematch"
|
2015-11-30 17:33:00 +00:00
|
|
|
|
|
|
|
theorem inv_mul_cancel_left (a b : A) : a⁻¹ * (a * b) = b :=
|
|
|
|
by blast
|
|
|
|
end
|
2015-12-06 07:52:16 +00:00
|
|
|
end foo
|