fix(library/init/logic.lean): if_true and if_false take instance as implicit instead of inst_implicit

This commit is contained in:
Daniel Selsam 2016-11-21 09:11:22 -08:00 committed by Leonardo de Moura
parent 1c484e8926
commit 19596eae77
2 changed files with 4 additions and 2 deletions

View file

@ -817,11 +817,11 @@ lemma if_simp_congr {α : Type u} {b c : Prop} [dec_b : decidable b] {x y u v :
@if_ctx_simp_congr α b c dec_b x y u v h_c (λ h, h_t) (λ h, h_e)
@[simp]
def if_true {α : Type u} (t e : α) : (if true then t else e) = t :=
def if_true {α : Type u} {h : decidable true} (t e : α) : (@ite true h α t e) = t :=
if_pos trivial
@[simp]
def if_false {α : Type u} (t e : α) : (if false then t else e) = e :=
def if_false {α : Type u} {h : decidable false} (t e : α) : (@ite false h α t e) = e :=
if_neg not_false
lemma if_ctx_congr_prop {b c x y u v : Prop} [dec_b : decidable b] [dec_c : decidable c]

View file

@ -0,0 +1,2 @@
example (m n p : ) : ite (m = m) n p = n := by simp
example (m n p : ) : ite (m ≠ m) n p = p := by simp