lean2/tests/lean/run/coe8.lean
2014-10-02 17:55:34 -07:00

16 lines
343 B
Text

import logic
constant nat : Type.{1}
constant int : Type.{1}
constant of_nat : nat → int
coercion of_nat
constant nat_add : nat → nat → nat
constant int_add : int → int → int
infixl `+`:65 := int_add
infixl `+`:65 := nat_add
print "================"
constant tst (n m : nat) : @eq int (of_nat n + of_nat m) (n + m)
check tst
exit