2015-03-26 01:04:52 +00:00
|
|
|
import data.nat
|
|
|
|
open nat
|
|
|
|
|
|
|
|
attribute nat.add [unfold-c 2]
|
|
|
|
attribute nat.rec_on [unfold-c 2]
|
|
|
|
|
2015-04-28 00:46:13 +00:00
|
|
|
infixl `;`:15 := tactic.and_then
|
|
|
|
|
2015-03-26 01:04:52 +00:00
|
|
|
namespace tactic
|
|
|
|
definition then_all (t1 t2 : tactic) : tactic :=
|
|
|
|
focus (t1 ; all_goals t2)
|
|
|
|
end tactic
|
|
|
|
|
2015-04-28 00:46:13 +00:00
|
|
|
tactic_infixl `;;`:15 := tactic.then_all
|
|
|
|
|
2015-03-26 01:04:52 +00:00
|
|
|
open tactic
|
|
|
|
example (a b c : nat) : (a + 0 = 0 + a ∧ b + 0 = 0 + b) ∧ c = c :=
|
|
|
|
|
|
|
|
begin
|
|
|
|
apply and.intro,
|
2015-03-28 00:26:06 +00:00
|
|
|
apply and.intro ;; (esimp[of_num]; state; rewrite zero_add),
|
2015-03-26 01:04:52 +00:00
|
|
|
apply rfl
|
|
|
|
end
|