2014-09-04 21:21:03 +00:00
|
|
|
import data.unit
|
|
|
|
open unit
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant int : Type.{1}
|
|
|
|
constant nat : Type.{1}
|
|
|
|
constant izero : int
|
|
|
|
constant nzero : nat
|
|
|
|
constant isucc : int → int
|
|
|
|
constant nsucc : nat → nat
|
2014-09-04 21:21:03 +00:00
|
|
|
definition f [coercion] (a : unit) : int := izero
|
|
|
|
definition g [coercion] (a : unit) : nat := nzero
|
|
|
|
|
2014-09-08 15:30:08 +00:00
|
|
|
set_option pp.coercions true
|
2014-09-04 21:21:03 +00:00
|
|
|
check isucc star
|
|
|
|
check nsucc star
|