2015-01-10 17:13:50 +00:00
|
|
|
open nat
|
|
|
|
|
2015-02-26 00:20:44 +00:00
|
|
|
definition foo : nat → nat
|
|
|
|
| foo zero := begin exact zero end
|
|
|
|
| foo (succ a) := begin exact a end
|
2015-01-10 17:13:50 +00:00
|
|
|
|
|
|
|
example : foo zero = zero := rfl
|
|
|
|
example (a : nat) : foo (succ a) = a := rfl
|
|
|
|
|
2015-02-26 00:20:44 +00:00
|
|
|
definition bla : nat → nat
|
|
|
|
| bla zero := zero
|
|
|
|
| bla (succ a) :=
|
2015-01-10 17:13:50 +00:00
|
|
|
begin
|
|
|
|
apply foo,
|
|
|
|
exact a
|
|
|
|
end
|
|
|
|
|
|
|
|
example (a : nat) : foo (succ a) = bla (succ (succ a)) := rfl
|