2014-09-04 21:21:03 +00:00
|
|
|
import data.unit
|
|
|
|
open unit
|
|
|
|
|
|
|
|
variable int : Type.{1}
|
|
|
|
variable nat : Type.{1}
|
|
|
|
variable izero : int
|
|
|
|
variable nzero : nat
|
|
|
|
variable isucc : int → int
|
|
|
|
variable nsucc : nat → nat
|
|
|
|
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
|