2014-08-25 02:58:48 +00:00
|
|
|
import logic
|
2014-09-03 23:00:38 +00:00
|
|
|
open eq_ops
|
2014-07-26 17:36:21 +00:00
|
|
|
|
|
|
|
inductive nat : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
zero : nat,
|
|
|
|
succ : nat → nat
|
2014-07-26 17:36:21 +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-07-26 17:36:21 +00:00
|
|
|
infixl `+`:65 := add
|
2014-09-04 22:03:59 +00:00
|
|
|
definition mul (n m : nat) := nat.rec zero (fun m x, x + n) m
|
2014-07-26 17:36:21 +00:00
|
|
|
infixl `*`:75 := mul
|
|
|
|
|
|
|
|
axiom mul_zero_right (n : nat) : n * zero = zero
|
|
|
|
|
|
|
|
variable P : nat → Prop
|
|
|
|
|
|
|
|
print "==========================="
|
|
|
|
theorem tst (n : nat) (H : P (n * zero)) : P zero
|
2014-09-05 01:41:06 +00:00
|
|
|
:= eq.subst (mul_zero_right _) H
|
2014-09-04 23:36:06 +00:00
|
|
|
end nat
|