2015-04-04 22:16:34 +00:00
|
|
|
open nat
|
|
|
|
|
2015-04-22 02:33:21 +00:00
|
|
|
section
|
2015-04-04 22:16:34 +00:00
|
|
|
inductive NatA :=
|
|
|
|
| a : NatA
|
|
|
|
| s : NatA → NatA
|
|
|
|
|
|
|
|
open NatA
|
|
|
|
|
|
|
|
definition foo (n : nat) : NatA :=
|
|
|
|
nat.rec_on n a (λ n' r, s r)
|
|
|
|
|
|
|
|
local attribute foo [coercion]
|
|
|
|
|
2015-10-13 22:39:03 +00:00
|
|
|
check let a : nat := 10 in s a
|
|
|
|
|
2015-04-04 22:16:34 +00:00
|
|
|
end
|