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