2014-07-08 22:04:52 +00:00
|
|
|
import standard
|
2014-08-20 22:49:44 +00:00
|
|
|
using tactic inhabited
|
2014-07-08 22:04:52 +00:00
|
|
|
|
2014-07-10 12:12:53 +00:00
|
|
|
inductive sum (A : Type) (B : Type) : Type :=
|
2014-07-08 22:04:52 +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)
|
2014-08-20 22:49:44 +00:00
|
|
|
:= inhabited_destruct H (λ a, inhabited_mk (inl B a))
|
2014-07-08 22:04:52 +00:00
|
|
|
|
|
|
|
theorem inr_inhabited (A : Type) {B : Type} (H : inhabited B) : inhabited (sum A B)
|
2014-08-20 22:49:44 +00:00
|
|
|
:= inhabited_destruct H (λ b, inhabited_mk (inr A b))
|
2014-07-08 22:04:52 +00:00
|
|
|
|
|
|
|
definition my_tac := fixpoint (λ t, [ apply @inl_inhabited; t
|
|
|
|
| apply @inr_inhabited; t
|
2014-08-20 22:49:44 +00:00
|
|
|
| apply @num.num_inhabited
|
2014-07-08 22:04:52 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
tactic_hint [inhabited] my_tac
|
|
|
|
|
|
|
|
theorem T : inhabited (sum false num.num)
|