lean4-htt/tests/lean/coe6.lean
Leonardo de Moura d7c3fce8a3 feat(library/init/coe,frontends/lean): more general coercions to fun
The new test dep_coe_to_fn.lean motivates the change.
2016-09-27 15:41:06 -07:00

12 lines
321 B
Text

universe variables u
structure Group :=
(carrier : Type u) (mul : carrier → carrier → carrier) (one : carrier)
attribute [instance]
definition Group_to_Type : has_coe_to_sort Group :=
{ S := Type u, coe := λ g, g~>carrier }
constant g : Group.{1}
set_option pp.binder_types true
check λ a b : g, Group.mul g a b