2014-08-24 19:58:48 -07:00
|
|
|
import logic
|
2014-09-04 16:36:06 -07:00
|
|
|
open tactic
|
2014-07-14 02:53:02 +01:00
|
|
|
|
2014-10-07 18:02:15 -07:00
|
|
|
inductive inh [class] (A : Type) : Type :=
|
2014-09-04 16:36:06 -07:00
|
|
|
intro : A -> inh A
|
2014-07-14 02:53:02 +01:00
|
|
|
|
2014-07-22 09:43:18 -07:00
|
|
|
theorem inh_bool [instance] : inh Prop
|
2014-09-04 16:36:06 -07:00
|
|
|
:= inh.intro true
|
2014-07-14 02:53:02 +01:00
|
|
|
|
2014-12-19 15:08:21 -08:00
|
|
|
set_option class.trace_instances true
|
2014-11-09 11:47:01 -08:00
|
|
|
|
2015-02-24 16:10:16 -08:00
|
|
|
theorem inh_fun [instance] {A B : Type} [H : inh B] : inh (A → B)
|
2014-09-04 16:36:06 -07:00
|
|
|
:= inh.rec (λ b, inh.intro (λ a : A, b)) H
|
2014-07-14 02:53:02 +01:00
|
|
|
|
|
|
|
theorem tst {A B : Type} (H : inh B) : inh (A → B → B)
|
|
|
|
|
2014-09-25 19:46:08 -07:00
|
|
|
theorem T1 {A : Type} (a : A) : inh A :=
|
|
|
|
by repeat [apply @inh.intro | eassumption]
|
2014-07-14 02:53:02 +01:00
|
|
|
|
2014-07-22 09:43:18 -07:00
|
|
|
theorem T2 : inh Prop
|