Skip to content

Commit 5f3459d

Browse files
committed
feat: (∀ ε > 0, |x - y| < ε) → x = y (#22088)
1 parent 5716f46 commit 5f3459d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Mathlib/Algebra/Order/Group/Abs.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ theorem dist_bdd_within_interval {a b lb ub : α} (hal : lb ≤ a) (hau : a ≤
179179
theorem eq_of_abs_sub_nonpos (h : |a - b| ≤ 0) : a = b :=
180180
eq_of_abs_sub_eq_zero (le_antisymm h (abs_nonneg (a - b)))
181181

182+
lemma eq_of_abs_sub_lt_all {x y : α} (h : ∀ ε > 0, |x - y| < ε) : x = y :=
183+
eq_of_abs_sub_nonpos <| forall_lt_iff_le'.mp h
184+
185+
lemma eq_of_abs_sub_le_all [DenselyOrdered α] {x y : α} (h : ∀ ε > 0, |x - y| ≤ ε) : x = y :=
186+
eq_of_abs_sub_nonpos <| forall_gt_imp_ge_iff_le_of_dense.mp h
187+
182188
theorem abs_sub_nonpos : |a - b| ≤ 0 ↔ a = b :=
183189
⟨eq_of_abs_sub_nonpos, by rintro rfl; rw [sub_self, abs_zero]⟩
184190

0 commit comments

Comments
 (0)