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