2014-07-14 01:53:02 +00:00
|
|
|
|
import standard
|
|
|
|
|
using num tactic pair
|
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
inductive inh (A : Type) : Prop :=
|
2014-07-14 01:53:02 +00:00
|
|
|
|
| inh_intro : A -> inh A
|
|
|
|
|
|
|
|
|
|
instance inh_intro
|
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
theorem inh_elim {A : Type} {B : Prop} (H1 : inh A) (H2 : A → B) : B
|
2014-07-14 01:53:02 +00:00
|
|
|
|
:= inh_rec H2 H1
|
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
theorem inh_exists [instance] {A : Type} {P : A → Prop} (H : ∃x, P x) : inh A
|
2014-07-14 01:53:02 +00:00
|
|
|
|
:= obtain w Hw, from H, inh_intro w
|
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
theorem inh_bool [instance] : inh Prop
|
2014-07-14 01:53:02 +00:00
|
|
|
|
:= inh_intro true
|
|
|
|
|
|
|
|
|
|
theorem inh_fun [instance] {A B : Type} (H : inh B) : inh (A → B)
|
|
|
|
|
:= inh_rec (λb, inh_intro (λa : A, b)) H
|
|
|
|
|
|
|
|
|
|
theorem pair_inh [instance] {A : Type} {B : Type} (H1 : inh A) (H2 : inh B) : inh (pair A B)
|
|
|
|
|
:= inh_elim H1 (λa, inh_elim H2 (λb, inh_intro (mk_pair a b)))
|
|
|
|
|
|
|
|
|
|
definition assump := eassumption
|
|
|
|
|
tactic_hint assump
|
|
|
|
|
|
|
|
|
|
theorem tst {A B : Type} (H : inh B) : inh (A → B → B)
|
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
theorem T1 {A B C D : Type} {P : C → Prop} (a : A) (H1 : inh B) (H2 : ∃x, P x) : inh ((A → A) × B × (D → C) × Prop)
|
2014-07-14 01:53:02 +00:00
|
|
|
|
|
|
|
|
|
(*
|
|
|
|
|
print(get_env():find("T1"):value())
|
|
|
|
|
*)
|