2014-01-05 20:05:08 +00:00
|
|
|
import Int
|
|
|
|
import Real
|
2014-01-05 19:03:35 +00:00
|
|
|
print 1 + true
|
2014-01-05 20:05:08 +00:00
|
|
|
variable R : Type
|
|
|
|
variable T : Type
|
|
|
|
variable r2t : R -> T
|
|
|
|
coercion r2t
|
|
|
|
variable t2r : T -> R
|
|
|
|
coercion t2r
|
|
|
|
variable f : T -> R -> T
|
|
|
|
variable a : T
|
|
|
|
variable b : R
|
2014-01-09 16:33:52 +00:00
|
|
|
set_option lean::pp::coercion true
|
|
|
|
set_option lean::pp::notation false
|
2014-01-05 19:03:35 +00:00
|
|
|
print f a b
|
|
|
|
print f b a
|
2014-01-05 20:05:08 +00:00
|
|
|
variable g : R -> T -> R
|
|
|
|
infix 10 ++ : f
|
|
|
|
infix 10 ++ : g
|
2014-01-05 19:03:35 +00:00
|
|
|
print a ++ b
|
|
|
|
print b ++ a
|