2015-03-25 18:04:52 -07:00
|
|
|
import data.nat
|
|
|
|
open nat
|
|
|
|
|
2015-07-07 16:37:06 -07:00
|
|
|
attribute nat.add [unfold 2]
|
|
|
|
attribute nat.rec_on [unfold 2]
|
2015-03-25 18:04:52 -07:00
|
|
|
|
2015-04-27 17:46:13 -07:00
|
|
|
infixl `;`:15 := tactic.and_then
|
|
|
|
|
2015-03-25 18:04:52 -07:00
|
|
|
namespace tactic
|
|
|
|
definition then_all (t1 t2 : tactic) : tactic :=
|
|
|
|
focus (t1 ; all_goals t2)
|
|
|
|
end tactic
|
|
|
|
|
2015-04-27 17:46:13 -07:00
|
|
|
tactic_infixl `;;`:15 := tactic.then_all
|
|
|
|
|
2015-03-25 18:04:52 -07:00
|
|
|
open tactic
|
|
|
|
example (a b c : nat) : (a + 0 = 0 + a ∧ b + 0 = 0 + b) ∧ c = c :=
|
|
|
|
|
|
|
|
begin
|
|
|
|
apply and.intro,
|
2015-10-14 12:27:09 -07:00
|
|
|
apply and.intro ;; (state; rewrite nat.zero_add),
|
2015-03-25 18:04:52 -07:00
|
|
|
apply rfl
|
|
|
|
end
|