lean4-htt/tests/lean/run/mk_instance1.lean
2016-07-29 13:03:23 -07:00

18 lines
445 B
Text

open tactic
example (a b : nat) : decidable (a = b) :=
by do t ← mk_app `decidable_eq [expr.const `nat []],
i ← mk_instance t,
a ← get_local `a,
b ← get_local `b,
trace i,
exact (expr.app_of_list i [a, b])
example (a b : nat) : decidable (a = b) :=
by do t ← target,
i ← mk_instance t,
trace i,
exact i
example (a b : nat) : decidable (a = b) :=
by target >>= mk_instance >>= exact