Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit c2ed7dc

Browse files
committed
feat(logic/basic): ite p a b is equal to a or b (#8557)
1 parent 52b6516 commit c2ed7dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/logic/basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,10 @@ by by_cases p; simp *
12511251
(if p then a else b) = b ↔ (p → a = b) :=
12521252
by by_cases p; simp *
12531253

1254+
lemma ite_eq_or_eq {α} {p : Prop} [decidable p] (a b : α) :
1255+
ite p a b = a ∨ ite p a b = b :=
1256+
decidable.by_cases (λ h, or.inl (if_pos h)) (λ h, or.inr (if_neg h))
1257+
12541258
/-! ### Declarations about `nonempty` -/
12551259

12561260
section nonempty

0 commit comments

Comments
 (0)