2014-07-31 14:36:13 -07:00
|
|
|
import logic
|
2014-11-22 17:34:05 -08:00
|
|
|
namespace experiment
|
2014-07-31 14:36:13 -07:00
|
|
|
inductive nat : Type :=
|
2014-08-22 15:46:10 -07:00
|
|
|
zero : nat,
|
|
|
|
succ : nat → nat
|
2014-07-31 14:36:13 -07:00
|
|
|
|
2014-09-04 16:36:06 -07:00
|
|
|
namespace nat
|
2014-09-04 15:03:59 -07:00
|
|
|
definition add (x y : nat) : nat := nat.rec x (λn r, succ r) y
|
2014-10-21 15:27:45 -07:00
|
|
|
infixl `+` := add
|
2014-07-31 14:36:13 -07:00
|
|
|
|
|
|
|
axiom add_right_comm (n m k : nat) : n + m + k = n + k + m
|
2014-09-04 18:41:06 -07:00
|
|
|
open eq
|
2014-07-31 14:36:13 -07:00
|
|
|
print "==========================="
|
|
|
|
theorem bug (a b c d : nat) : a + b + c + d = a + c + b + d
|
2014-09-04 16:36:06 -07:00
|
|
|
:= subst (add_right_comm _ _ _) (eq.refl (a + b + c + d))
|
|
|
|
end nat
|
2014-11-22 17:34:05 -08:00
|
|
|
end experiment
|