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]
|
|
|
|
|
|
|
|
check s 10
|
|
|
|
end
|