lean2/tests/lean/run/class7.lean
Leonardo de Moura c775da16ec feat(frontends/lean/elaborator): discard partial solution during
class-instance resolution, use only tactic_hints associated with
classes, enforce is_strict
2014-09-25 19:46:08 -07:00

18 lines
420 B
Text

import logic
open tactic
inductive inh (A : Type) : Type :=
intro : A -> inh A
theorem inh_bool [instance] : inh Prop
:= 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 tst {A B : Type} (H : inh B) : inh (A → B → B)
theorem T1 {A : Type} (a : A) : inh A :=
by repeat [apply @inh.intro | eassumption]
theorem T2 : inh Prop