lean2/tests/lean/run/tactic26.lean
Leonardo de Moura 4505016154 feat(frontends/lean): allow tactic_hints to be applied when class-instance mechanism fails
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00

22 lines
695 B
Text

import standard
using tactic
inductive sum (A B : Type) : Type :=
| inl : A → sum A B
| inr : B → sum A B
theorem inl_inhabited {A : Type} (B : Type) (H : inhabited A) : inhabited (sum A B)
:= inhabited_elim H (λ a, inhabited_intro (inl B a))
theorem inr_inhabited (A : Type) {B : Type} (H : inhabited B) : inhabited (sum A B)
:= inhabited_elim H (λ b, inhabited_intro (inr A b))
definition my_tac := fixpoint (λ t, [ apply @inl_inhabited; t
| apply @inr_inhabited; t
| apply @num.inhabited_num
])
tactic_hint [inhabited] my_tac
theorem T : inhabited (sum false num.num)