Skip to content

Commit

Permalink
feat(Order/Interval/Finset/Box): add lemma (#12444)
Browse files Browse the repository at this point in the history
Add `eq_zero_iff_eq_zero_of_mem_box` lemma needed for #10377
  • Loading branch information
CBirkbeck authored and callesonne committed May 16, 2024
1 parent 1bf0efa commit 01a8e4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Mathlib/Order/Interval/Finset/Box.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ lemma box_succ_disjUnion (n : ℕ) :

@[simp] lemma zero_mem_box : (0 : α) ∈ box n ↔ n = 0 := by cases n <;> simp [box_succ_eq_sdiff]

lemma eq_zero_iff_eq_zero_of_mem_box {x : α} (hx : x ∈ box n) : x = 0 ↔ n = 0 :=
⟨zero_mem_box.mp ∘ (· ▸ hx), fun hn ↦ by rwa [hn, box_zero, mem_singleton] at hx⟩

end Finset

open Finset
Expand Down

0 comments on commit 01a8e4e

Please sign in to comment.