Skip to content

Commit

Permalink
feat(logic/basic): ite p a b is equal to a or b (#8557)
Browse files Browse the repository at this point in the history
  • Loading branch information
YaelDillies committed Aug 5, 2021
1 parent 52b6516 commit c2ed7dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/logic/basic.lean
Expand Up @@ -1251,6 +1251,10 @@ by by_cases p; simp *
(if p then a else b) = b ↔ (p → a = b) :=
by by_cases p; simp *

lemma ite_eq_or_eq {α} {p : Prop} [decidable p] (a b : α) :
ite p a b = a ∨ ite p a b = b :=
decidable.by_cases (λ h, or.inl (if_pos h)) (λ h, or.inr (if_neg h))

/-! ### Declarations about `nonempty` -/

section nonempty
Expand Down

0 comments on commit c2ed7dc

Please sign in to comment.