lean4-htt/tests/lean/coe4.lean
Leonardo de Moura 8993d0738a feat(frontends/lean): remove #elab command
The check command is now using the new elaborator.
2016-08-02 15:05:24 -07:00

21 lines
384 B
Text

structure Functor (A : Type) :=
(fn : A → A → A) (inj : ∀ x y, fn x = fn y → x = y)
definition coe_functor_to_fn [instance] (A : Type) : has_coe_to_fun (Functor A) :=
has_coe_to_fun.mk (A → A → A) Functor.fn
constant f : Functor nat
check f 0 1
set_option pp.coercions false
check f 0 1
set_option pp.coercions true
check f 0 1
set_option pp.all true
check f 0 1