2014-07-09 01:21:22 +00:00
|
|
|
import standard
|
|
|
|
using tactic
|
|
|
|
|
2014-07-10 12:12:53 +00:00
|
|
|
inductive sum (A : Type) (B : Type) : Type :=
|
2014-07-09 01:21:22 +00:00
|
|
|
| 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))
|
|
|
|
|
|
|
|
infixl `..`:100 := append
|
|
|
|
|
|
|
|
definition my_tac := repeat (trace "iteration"; state;
|
|
|
|
( apply @inl_inhabited; trace "used inl"
|
|
|
|
.. apply @inr_inhabited; trace "used inr"
|
|
|
|
.. apply @num.inhabited_num; trace "used num")) ; now
|
|
|
|
|
|
|
|
|
|
|
|
tactic_hint [inhabited] my_tac
|
|
|
|
|
|
|
|
theorem T : inhabited (sum false num.num)
|