Skip to content

Commit 36d85bf

Browse files
committed
Marking ite' and ofProp as irreducible
1 parent a12f0ef commit 36d85bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Auto/Lib/BoolExtra.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ theorem Bool.ofProp_spec' (c : Prop) : Bool.ofProp c = false ↔ ¬ c := by
4343
conv => enter [2, 1]; rw [← Bool.ofProp_spec c]
4444
simp
4545

46+
attribute [irreducible] Bool.ofProp
47+
4648
theorem Bool.ite_eq_true (p : Prop) [inst : Decidable p] (a b : α) : p → ite p a b = a := by
4749
intro hp; dsimp [ite]; cases inst
4850
case isFalse hnp => apply False.elim (hnp hp)
@@ -80,6 +82,8 @@ theorem Bool.ite_simp.{u} : @ite = fun (α : Sort u) p _ => @ite' α p := by
8082
case false => rw [Bool.ite_eq_false]; apply (Bool.ofProp_spec' _).mp h
8183
case true => rw [Bool.ite_eq_true]; apply (Bool.ofProp_spec _).mp h
8284

85+
attribute [irreducible] Bool.ite'
86+
8387
theorem Bool.ite'_eq_true (p : Prop) (a b : α) : p → ite' p a b = a := by
8488
intro hp; apply Bool.ite_simp ▸ @Bool.ite_eq_true _ p (Classical.propDecidable _) a b hp
8589

0 commit comments

Comments
 (0)