lean2/tests/lean/run/nat_bug6.lean
Leonardo de Moura 364bba2129 feat(frontends/lean/inductive_cmd): prefix introduction rules with the name of the inductive datatype
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:26:36 -07:00

21 lines
466 B
Text

import logic
open eq_ops
inductive nat : Type :=
zero : nat,
succ : nat → nat
namespace nat
definition add (x y : nat) : nat := nat.rec x (λn r, succ r) y
infixl `+`:65 := add
definition mul (n m : nat) := nat.rec zero (fun m x, x + n) m
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
:= subst (mul_zero_right _) H
end nat