2014-01-28 09:15:28 +00:00
|
|
|
import tactic
|
|
|
|
using Nat
|
|
|
|
|
|
|
|
rewrite_set basic
|
|
|
|
add_rewrite add_zerol add_succl eq_id : basic
|
|
|
|
|
|
|
|
theorem add_assoc (a b c : Nat) : a + (b + c) = (a + b) + c
|
|
|
|
:= induction_on a
|
2014-02-06 15:50:22 +00:00
|
|
|
(show 0 + (b + c) = (0 + b) + c, by simp basic)
|
2014-01-28 09:15:28 +00:00
|
|
|
(λ (n : Nat) (iH : n + (b + c) = (n + b) + c),
|
2014-02-06 15:50:22 +00:00
|
|
|
show (n + 1) + (b + c) = ((n + 1) + b) + c, by simp basic)
|
2014-01-28 09:15:28 +00:00
|
|
|
|
|
|
|
check add_zerol
|
|
|
|
check add_succl
|
|
|
|
check @eq_id
|
|
|
|
|
|
|
|
print environment 1
|