statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
dist_triangle4_right (x₁ y₁ x₂ y₂ : α) : dist x₁ y₁ ≤ dist x₁ x₂ + dist y₁ y₂ + dist x₂ y₂
by { rw [add_right_comm, dist_comm y₁], apply dist_triangle4 }
lemma
dist_triangle4_right
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm", "dist_triangle4" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_Ico_sum_dist (f : ℕ → α) {m n} (h : m ≤ n) : dist (f m) (f n) ≤ ∑ i in finset.Ico m n, dist (f i) (f (i + 1))
begin revert n, apply nat.le_induction, { simp only [finset.sum_empty, finset.Ico_self, dist_self] }, { assume n hn hrec, calc dist (f m) (f (n+1)) ≤ dist (f m) (f n) + dist _ _ : dist_triangle _ _ _ ... ≤ ∑ i in finset.Ico m n, _ + _ : add_le_add hrec le_rfl ... = ∑ i in finset.Ico m (n+1), _ :...
lemma
dist_le_Ico_sum_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_self", "dist_triangle", "finset.Ico", "finset.Ico_self", "le_rfl", "nat.Ico_succ_right_eq_insert_Ico", "nat.le_induction" ]
The triangle (polygon) inequality for sequences of points; `finset.Ico` version.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_range_sum_dist (f : ℕ → α) (n : ℕ) : dist (f 0) (f n) ≤ ∑ i in finset.range n, dist (f i) (f (i + 1))
nat.Ico_zero_eq_range ▸ dist_le_Ico_sum_dist f (nat.zero_le n)
lemma
dist_le_range_sum_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_le_Ico_sum_dist", "finset.range", "nat.Ico_zero_eq_range" ]
The triangle (polygon) inequality for sequences of points; `finset.range` version.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_Ico_sum_of_dist_le {f : ℕ → α} {m n} (hmn : m ≤ n) {d : ℕ → ℝ} (hd : ∀ {k}, m ≤ k → k < n → dist (f k) (f (k + 1)) ≤ d k) : dist (f m) (f n) ≤ ∑ i in finset.Ico m n, d i
le_trans (dist_le_Ico_sum_dist f hmn) $ finset.sum_le_sum $ λ k hk, hd (finset.mem_Ico.1 hk).1 (finset.mem_Ico.1 hk).2
lemma
dist_le_Ico_sum_of_dist_le
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_le_Ico_sum_dist", "finset.Ico" ]
A version of `dist_le_Ico_sum_dist` with each intermediate distance replaced with an upper estimate.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_range_sum_of_dist_le {f : ℕ → α} (n : ℕ) {d : ℕ → ℝ} (hd : ∀ {k}, k < n → dist (f k) (f (k + 1)) ≤ d k) : dist (f 0) (f n) ≤ ∑ i in finset.range n, d i
nat.Ico_zero_eq_range ▸ dist_le_Ico_sum_of_dist_le (zero_le n) (λ _ _, hd)
lemma
dist_le_range_sum_of_dist_le
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_le_Ico_sum_of_dist_le", "finset.range", "nat.Ico_zero_eq_range" ]
A version of `dist_le_range_sum_dist` with each intermediate distance replaced with an upper estimate.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
swap_dist : function.swap (@dist α _) = dist
by funext x y; exact dist_comm _ _
theorem
swap_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
abs_dist_sub_le (x y z : α) : |dist x z - dist y z| ≤ dist x y
abs_sub_le_iff.2 ⟨sub_le_iff_le_add.2 (dist_triangle _ _ _), sub_le_iff_le_add.2 (dist_triangle_left _ _ _)⟩
theorem
abs_dist_sub_le
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle", "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_nonneg {x y : α} : 0 ≤ dist x y
pseudo_metric_space.dist_nonneg' dist dist_self dist_comm dist_triangle
theorem
dist_nonneg
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm", "dist_self", "dist_triangle", "pseudo_metric_space.dist_nonneg'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.tactic.positivity_dist : expr → tactic strictness
| `(dist %%a %%b) := nonnegative <$> mk_app ``dist_nonneg [a, b] | _ := failed
def
tactic.positivity_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg" ]
Extension for the `positivity` tactic: distances are nonnegative.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
abs_dist {a b : α} : |dist a b| = dist a b
abs_of_nonneg dist_nonneg
theorem
abs_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "abs_of_nonneg", "dist_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_nndist (α : Type*)
(nndist : α → α → ℝ≥0)
class
has_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
A version of `has_dist` that takes value in `ℝ≥0`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pseudo_metric_space.to_has_nndist : has_nndist α
⟨λ a b, ⟨dist a b, dist_nonneg⟩⟩
instance
pseudo_metric_space.to_has_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "has_nndist" ]
Distance as a nonnegative real number.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_edist (x y : α) : nndist x y = (edist x y).to_nnreal
by simp [nndist, edist_dist, real.to_nnreal, max_eq_left dist_nonneg, ennreal.of_real]
lemma
nndist_edist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg", "edist_dist", "ennreal.of_real", "real.to_nnreal" ]
Express `nndist` in terms of `edist`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_nndist (x y : α) : edist x y = ↑(nndist x y)
by { simpa only [edist_dist, ennreal.of_real_eq_coe_nnreal dist_nonneg] }
lemma
edist_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg", "edist_dist", "ennreal.of_real_eq_coe_nnreal" ]
Express `edist` in terms of `nndist`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_nnreal_ennreal_nndist (x y : α) : ↑(nndist x y) = edist x y
(edist_nndist x y).symm
lemma
coe_nnreal_ennreal_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_nndist" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_lt_coe {x y : α} {c : ℝ≥0} : edist x y < c ↔ nndist x y < c
by rw [edist_nndist, ennreal.coe_lt_coe]
lemma
edist_lt_coe
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_nndist", "ennreal.coe_lt_coe" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_le_coe {x y : α} {c : ℝ≥0} : edist x y ≤ c ↔ nndist x y ≤ c
by rw [edist_nndist, ennreal.coe_le_coe]
lemma
edist_le_coe
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_nndist", "ennreal.coe_le_coe" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_lt_top {α : Type*} [pseudo_metric_space α] (x y : α) : edist x y < ⊤
(edist_dist x y).symm ▸ ennreal.of_real_lt_top
lemma
edist_lt_top
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_dist", "ennreal.of_real_lt_top", "pseudo_metric_space" ]
In a pseudometric space, the extended distance is always finite
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_ne_top (x y : α) : edist x y ≠ ⊤
(edist_lt_top x y).ne
lemma
edist_ne_top
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_lt_top" ]
In a pseudometric space, the extended distance is always finite
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_self (a : α) : nndist a a = 0
(nnreal.coe_eq_zero _).1 (dist_self a)
lemma
nndist_self
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_self", "nnreal.coe_eq_zero" ]
`nndist x x` vanishes
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_nndist (x y : α) : dist x y = ↑(nndist x y)
rfl
lemma
dist_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
Express `dist` in terms of `nndist`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_nndist (x y : α) : ↑(nndist x y) = dist x y
(dist_nndist x y).symm
lemma
coe_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nndist" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_lt_coe {x y : α} {c : ℝ≥0} : dist x y < c ↔ nndist x y < c
iff.rfl
lemma
dist_lt_coe
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_coe {x y : α} {c : ℝ≥0} : dist x y ≤ c ↔ nndist x y ≤ c
iff.rfl
lemma
dist_le_coe
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_lt_of_real {x y : α} {r : ℝ} : edist x y < ennreal.of_real r ↔ dist x y < r
by rw [edist_dist, ennreal.of_real_lt_of_real_iff_of_nonneg dist_nonneg]
lemma
edist_lt_of_real
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg", "edist_dist", "ennreal.of_real", "ennreal.of_real_lt_of_real_iff_of_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
edist_le_of_real {x y : α} {r : ℝ} (hr : 0 ≤ r) : edist x y ≤ ennreal.of_real r ↔ dist x y ≤ r
by rw [edist_dist, ennreal.of_real_le_of_real_iff hr]
lemma
edist_le_of_real
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "edist_dist", "ennreal.of_real", "ennreal.of_real_le_of_real_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_dist (x y : α) : nndist x y = real.to_nnreal (dist x y)
by rw [dist_nndist, real.to_nnreal_coe]
lemma
nndist_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nndist", "real.to_nnreal", "real.to_nnreal_coe" ]
Express `nndist` in terms of `dist`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_comm (x y : α) : nndist x y = nndist y x
by simpa only [dist_nndist, nnreal.coe_eq] using dist_comm x y
theorem
nndist_comm
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm", "dist_nndist", "nnreal.coe_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_triangle (x y z : α) : nndist x z ≤ nndist x y + nndist y z
dist_triangle _ _ _
theorem
nndist_triangle
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle" ]
Triangle inequality for the nonnegative distance
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_triangle_left (x y z : α) : nndist x y ≤ nndist z x + nndist z y
dist_triangle_left _ _ _
theorem
nndist_triangle_left
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nndist_triangle_right (x y z : α) : nndist x y ≤ nndist x z + nndist y z
dist_triangle_right _ _ _
theorem
nndist_triangle_right
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_edist (x y : α) : dist x y = (edist x y).to_real
by rw [edist_dist, ennreal.to_real_of_real (dist_nonneg)]
lemma
dist_edist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg", "edist_dist", "ennreal.to_real_of_real" ]
Express `dist` in terms of `edist`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball (x : α) (ε : ℝ) : set α
{y | dist y x < ε}
def
metric.ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
`ball x ε` is the set of all points `y` with `dist y x < ε`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_ball : y ∈ ball x ε ↔ dist y x < ε
iff.rfl
theorem
metric.mem_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_ball' : y ∈ ball x ε ↔ dist x y < ε
by rw [dist_comm, mem_ball]
theorem
metric.mem_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pos_of_mem_ball (hy : y ∈ ball x ε) : 0 < ε
dist_nonneg.trans_lt hy
theorem
metric.pos_of_mem_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_ball_self (h : 0 < ε) : x ∈ ball x ε
show dist x x < ε, by rw dist_self; assumption
theorem
metric.mem_ball_self
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_self" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nonempty_ball : (ball x ε).nonempty ↔ 0 < ε
⟨λ ⟨x, hx⟩, pos_of_mem_ball hx, λ h, ⟨x, mem_ball_self h⟩⟩
lemma
metric.nonempty_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_eq_empty : ball x ε = ∅ ↔ ε ≤ 0
by rw [← not_nonempty_iff_eq_empty, nonempty_ball, not_lt]
lemma
metric.ball_eq_empty
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_zero : ball x 0 = ∅
by rw [ball_eq_empty]
lemma
metric.ball_zero
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_lt_mem_ball_of_mem_ball (h : x ∈ ball y ε) : ∃ ε' < ε, x ∈ ball y ε'
begin simp only [mem_ball] at h ⊢, exact ⟨(ε + dist x y) / 2, by linarith, by linarith⟩, end
lemma
metric.exists_lt_mem_ball_of_mem_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
If a point belongs to an open ball, then there is a strictly smaller radius whose ball also contains it. See also `exists_lt_subset_ball`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_eq_ball (ε : ℝ) (x : α) : uniform_space.ball x {p | dist p.2 p.1 < ε} = metric.ball x ε
rfl
lemma
metric.ball_eq_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "metric.ball", "uniform_space.ball" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_eq_ball' (ε : ℝ) (x : α) : uniform_space.ball x {p | dist p.1 p.2 < ε} = metric.ball x ε
by { ext, simp [dist_comm, uniform_space.ball] }
lemma
metric.ball_eq_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm", "metric.ball", "uniform_space.ball" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Union_ball_nat (x : α) : (⋃ n : ℕ, ball x n) = univ
Union_eq_univ_iff.2 $ λ y, exists_nat_gt (dist y x)
lemma
metric.Union_ball_nat
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "exists_nat_gt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Union_ball_nat_succ (x : α) : (⋃ n : ℕ, ball x (n + 1)) = univ
Union_eq_univ_iff.2 $ λ y, (exists_nat_gt (dist y x)).imp $ λ n hn, hn.trans (lt_add_one _)
lemma
metric.Union_ball_nat_succ
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "exists_nat_gt", "lt_add_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball (x : α) (ε : ℝ)
{y | dist y x ≤ ε}
def
metric.closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
`closed_ball x ε` is the set of all points `y` with `dist y x ≤ ε`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_closed_ball : y ∈ closed_ball x ε ↔ dist y x ≤ ε
iff.rfl
theorem
metric.mem_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_closed_ball' : y ∈ closed_ball x ε ↔ dist x y ≤ ε
by rw [dist_comm, mem_closed_ball]
theorem
metric.mem_closed_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere (x : α) (ε : ℝ)
{y | dist y x = ε}
def
metric.sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
`sphere x ε` is the set of all points `y` with `dist y x = ε`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_sphere : y ∈ sphere x ε ↔ dist y x = ε
iff.rfl
theorem
metric.mem_sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_sphere' : y ∈ sphere x ε ↔ dist x y = ε
by rw [dist_comm, mem_sphere]
theorem
metric.mem_sphere'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ne_of_mem_sphere (h : y ∈ sphere x ε) (hε : ε ≠ 0) : y ≠ x
by { contrapose! hε, symmetry, simpa [hε] using h }
theorem
metric.ne_of_mem_sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nonneg_of_mem_sphere (hy : y ∈ sphere x ε) : 0 ≤ ε
dist_nonneg.trans_eq hy
theorem
metric.nonneg_of_mem_sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_eq_empty_of_neg (hε : ε < 0) : sphere x ε = ∅
set.eq_empty_iff_forall_not_mem.mpr $ λ y hy, (nonneg_of_mem_sphere hy).not_lt hε
theorem
metric.sphere_eq_empty_of_neg
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_eq_empty_of_subsingleton [subsingleton α] (hε : ε ≠ 0) : sphere x ε = ∅
set.eq_empty_iff_forall_not_mem.mpr $ λ y hy, ne_of_mem_sphere hy hε (subsingleton.elim _ _)
theorem
metric.sphere_eq_empty_of_subsingleton
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_is_empty_of_subsingleton [subsingleton α] (hε : ε ≠ 0) : is_empty (sphere x ε)
by simp only [sphere_eq_empty_of_subsingleton hε, set.has_emptyc.emptyc.is_empty α]
theorem
metric.sphere_is_empty_of_subsingleton
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "is_empty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_closed_ball_self (h : 0 ≤ ε) : x ∈ closed_ball x ε
show dist x x ≤ ε, by rw dist_self; assumption
theorem
metric.mem_closed_ball_self
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_self" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nonempty_closed_ball : (closed_ball x ε).nonempty ↔ 0 ≤ ε
⟨λ ⟨x, hx⟩, dist_nonneg.trans hx, λ h, ⟨x, mem_closed_ball_self h⟩⟩
lemma
metric.nonempty_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_eq_empty : closed_ball x ε = ∅ ↔ ε < 0
by rw [← not_nonempty_iff_eq_empty, nonempty_closed_ball, not_le]
lemma
metric.closed_ball_eq_empty
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_eq_sphere_of_nonpos (hε : ε ≤ 0) : closed_ball x ε = sphere x ε
set.ext $ λ _, (hε.trans dist_nonneg).le_iff_eq
theorem
metric.closed_ball_eq_sphere_of_nonpos
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nonneg", "set.ext" ]
Closed balls and spheres coincide when the radius is non-positive
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_subset_closed_ball : ball x ε ⊆ closed_ball x ε
assume y (hy : _ < _), le_of_lt hy
theorem
metric.ball_subset_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_subset_closed_ball : sphere x ε ⊆ closed_ball x ε
λ y, le_of_eq
theorem
metric.sphere_subset_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_disjoint_ball (h : δ + ε ≤ dist x y) : disjoint (closed_ball x δ) (ball y ε)
set.disjoint_left.mpr $ λ a ha1 ha2, (h.trans $ dist_triangle_left _ _ _).not_lt $ add_lt_add_of_le_of_lt ha1 ha2
lemma
metric.closed_ball_disjoint_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "disjoint", "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_disjoint_closed_ball (h : δ + ε ≤ dist x y) : disjoint (ball x δ) (closed_ball y ε)
(closed_ball_disjoint_ball $ by rwa [add_comm, dist_comm]).symm
lemma
metric.ball_disjoint_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "disjoint", "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_disjoint_ball (h : δ + ε ≤ dist x y) : disjoint (ball x δ) (ball y ε)
(closed_ball_disjoint_ball h).mono_left ball_subset_closed_ball
lemma
metric.ball_disjoint_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "disjoint" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_disjoint_closed_ball (h : δ + ε < dist x y) : disjoint (closed_ball x δ) (closed_ball y ε)
set.disjoint_left.mpr $ λ a ha1 ha2, h.not_le $ (dist_triangle_left _ _ _).trans $ add_le_add ha1 ha2
lemma
metric.closed_ball_disjoint_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "disjoint", "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_disjoint_ball : disjoint (sphere x ε) (ball x ε)
set.disjoint_left.mpr $ λ y hy₁ hy₂, absurd hy₁ $ ne_of_lt hy₂
theorem
metric.sphere_disjoint_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "disjoint" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_union_sphere : ball x ε ∪ sphere x ε = closed_ball x ε
set.ext $ λ y, (@le_iff_lt_or_eq ℝ _ _ _).symm
theorem
metric.ball_union_sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "set.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sphere_union_ball : sphere x ε ∪ ball x ε = closed_ball x ε
by rw [union_comm, ball_union_sphere]
theorem
metric.sphere_union_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_diff_sphere : closed_ball x ε \ sphere x ε = ball x ε
by rw [← ball_union_sphere, set.union_diff_cancel_right sphere_disjoint_ball.symm.le_bot]
theorem
metric.closed_ball_diff_sphere
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "set.union_diff_cancel_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_diff_ball : closed_ball x ε \ ball x ε = sphere x ε
by rw [← ball_union_sphere, set.union_diff_cancel_left sphere_disjoint_ball.symm.le_bot]
theorem
metric.closed_ball_diff_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "set.union_diff_cancel_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_ball_comm : x ∈ ball y ε ↔ y ∈ ball x ε
by rw [mem_ball', mem_ball]
theorem
metric.mem_ball_comm
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_closed_ball_comm : x ∈ closed_ball y ε ↔ y ∈ closed_ball x ε
by rw [mem_closed_ball', mem_closed_ball]
theorem
metric.mem_closed_ball_comm
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_sphere_comm : x ∈ sphere y ε ↔ y ∈ sphere x ε
by rw [mem_sphere', mem_sphere]
theorem
metric.mem_sphere_comm
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_subset_ball (h : ε₁ ≤ ε₂) : ball x ε₁ ⊆ ball x ε₂
λ y (yx : _ < ε₁), lt_of_lt_of_le yx h
theorem
metric.ball_subset_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_eq_bInter_ball : closed_ball x ε = ⋂ δ > ε, ball x δ
by ext y; rw [mem_closed_ball, ← forall_lt_iff_le', mem_Inter₂]; refl
lemma
metric.closed_ball_eq_bInter_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "forall_lt_iff_le'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_subset_ball' (h : ε₁ + dist x y ≤ ε₂) : ball x ε₁ ⊆ ball y ε₂
λ z hz, calc dist z y ≤ dist z x + dist x y : dist_triangle _ _ _ ... < ε₁ + dist x y : add_lt_add_right hz _ ... ≤ ε₂ : h
lemma
metric.ball_subset_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_subset_closed_ball (h : ε₁ ≤ ε₂) : closed_ball x ε₁ ⊆ closed_ball x ε₂
λ y (yx : _ ≤ ε₁), le_trans yx h
theorem
metric.closed_ball_subset_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_subset_closed_ball' (h : ε₁ + dist x y ≤ ε₂) : closed_ball x ε₁ ⊆ closed_ball y ε₂
λ z hz, calc dist z y ≤ dist z x + dist x y : dist_triangle _ _ _ ... ≤ ε₁ + dist x y : add_le_add_right hz _ ... ≤ ε₂ : h
lemma
metric.closed_ball_subset_closed_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_subset_ball (h : ε₁ < ε₂) : closed_ball x ε₁ ⊆ ball x ε₂
λ y (yh : dist y x ≤ ε₁), lt_of_le_of_lt yh h
theorem
metric.closed_ball_subset_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
closed_ball_subset_ball' (h : ε₁ + dist x y < ε₂) : closed_ball x ε₁ ⊆ ball y ε₂
λ z hz, calc dist z y ≤ dist z x + dist x y : dist_triangle _ _ _ ... ≤ ε₁ + dist x y : add_le_add_right hz _ ... < ε₂ : h
lemma
metric.closed_ball_subset_ball'
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_le_add_of_nonempty_closed_ball_inter_closed_ball (h : (closed_ball x ε₁ ∩ closed_ball y ε₂).nonempty) : dist x y ≤ ε₁ + ε₂
let ⟨z, hz⟩ := h in calc dist x y ≤ dist z x + dist z y : dist_triangle_left _ _ _ ... ≤ ε₁ + ε₂ : add_le_add hz.1 hz.2
lemma
metric.dist_le_add_of_nonempty_closed_ball_inter_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_lt_add_of_nonempty_closed_ball_inter_ball (h : (closed_ball x ε₁ ∩ ball y ε₂).nonempty) : dist x y < ε₁ + ε₂
let ⟨z, hz⟩ := h in calc dist x y ≤ dist z x + dist z y : dist_triangle_left _ _ _ ... < ε₁ + ε₂ : add_lt_add_of_le_of_lt hz.1 hz.2
lemma
metric.dist_lt_add_of_nonempty_closed_ball_inter_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_lt_add_of_nonempty_ball_inter_closed_ball (h : (ball x ε₁ ∩ closed_ball y ε₂).nonempty) : dist x y < ε₁ + ε₂
begin rw inter_comm at h, rw [add_comm, dist_comm], exact dist_lt_add_of_nonempty_closed_ball_inter_ball h end
lemma
metric.dist_lt_add_of_nonempty_ball_inter_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dist_lt_add_of_nonempty_ball_inter_ball (h : (ball x ε₁ ∩ ball y ε₂).nonempty) : dist x y < ε₁ + ε₂
dist_lt_add_of_nonempty_closed_ball_inter_ball $ h.mono (inter_subset_inter ball_subset_closed_ball subset.rfl)
lemma
metric.dist_lt_add_of_nonempty_ball_inter_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Union_closed_ball_nat (x : α) : (⋃ n : ℕ, closed_ball x n) = univ
Union_eq_univ_iff.2 $ λ y, exists_nat_ge (dist y x)
lemma
metric.Union_closed_ball_nat
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "exists_nat_ge" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Union_inter_closed_ball_nat (s : set α) (x : α) : (⋃ (n : ℕ), s ∩ closed_ball x n) = s
by rw [← inter_Union, Union_closed_ball_nat, inter_univ]
lemma
metric.Union_inter_closed_ball_nat
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_subset (h : dist x y ≤ ε₂ - ε₁) : ball x ε₁ ⊆ ball y ε₂
λ z zx, by rw ← add_sub_cancel'_right ε₁ ε₂; exact lt_of_le_of_lt (dist_triangle z x y) (add_lt_add_of_lt_of_le zx h)
theorem
metric.ball_subset
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_triangle" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ball_half_subset (y) (h : y ∈ ball x (ε / 2)) : ball y (ε / 2) ⊆ ball x ε
ball_subset $ by rw sub_self_div_two; exact le_of_lt h
theorem
metric.ball_half_subset
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "sub_self_div_two" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_ball_subset_ball (h : y ∈ ball x ε) : ∃ ε' > 0, ball y ε' ⊆ ball x ε
⟨_, sub_pos.2 h, ball_subset $ by rw sub_sub_self⟩
theorem
metric.exists_ball_subset_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forall_of_forall_mem_closed_ball (p : α → Prop) (x : α) (H : ∃ᶠ (R : ℝ) in at_top, ∀ y ∈ closed_ball x R, p y) (y : α) : p y
begin obtain ⟨R, hR, h⟩ : ∃ (R : ℝ) (H : dist y x ≤ R), ∀ (z : α), z ∈ closed_ball x R → p z := frequently_iff.1 H (Ici_mem_at_top (dist y x)), exact h _ hR end
lemma
metric.forall_of_forall_mem_closed_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
If a property holds for all points in closed balls of arbitrarily large radii, then it holds for all points.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
forall_of_forall_mem_ball (p : α → Prop) (x : α) (H : ∃ᶠ (R : ℝ) in at_top, ∀ y ∈ ball x R, p y) (y : α) : p y
begin obtain ⟨R, hR, h⟩ : ∃ (R : ℝ) (H : dist y x < R), ∀ (z : α), z ∈ ball x R → p z := frequently_iff.1 H (Ioi_mem_at_top (dist y x)), exact h _ hR end
lemma
metric.forall_of_forall_mem_ball
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
If a property holds for all points in balls of arbitrarily large radii, then it holds for all points.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_bounded_iff {s : set α} : is_bounded s ↔ ∃ C : ℝ, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C
by rw [is_bounded_def, ← filter.mem_sets, (@pseudo_metric_space.cobounded_sets α _).out, mem_set_of_eq, compl_compl]
theorem
metric.is_bounded_iff
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "compl_compl", "filter.mem_sets" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_bounded_iff_eventually {s : set α} : is_bounded s ↔ ∀ᶠ C in at_top, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C
is_bounded_iff.trans ⟨λ ⟨C, h⟩, eventually_at_top.2 ⟨C, λ C' hC' x hx y hy, (h hx hy).trans hC'⟩, eventually.exists⟩
theorem
metric.is_bounded_iff_eventually
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_bounded_iff_exists_ge {s : set α} (c : ℝ) : is_bounded s ↔ ∃ C, c ≤ C ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C
⟨λ h, ((eventually_ge_at_top c).and (is_bounded_iff_eventually.1 h)).exists, λ h, is_bounded_iff.2 $ h.imp $ λ _, and.right⟩
theorem
metric.is_bounded_iff_exists_ge
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_bounded_iff_nndist {s : set α} : is_bounded s ↔ ∃ C : ℝ≥0, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → nndist x y ≤ C
by simp only [is_bounded_iff_exists_ge 0, nnreal.exists, ← nnreal.coe_le_coe, ← dist_nndist, nnreal.coe_mk, exists_prop]
theorem
metric.is_bounded_iff_nndist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_nndist", "exists_prop", "nnreal.coe_le_coe", "nnreal.coe_mk" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_uniform_space_eq : ‹pseudo_metric_space α›.to_uniform_space = uniform_space_of_dist dist dist_self dist_comm dist_triangle
uniform_space_eq pseudo_metric_space.uniformity_dist
theorem
metric.to_uniform_space_eq
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "dist_comm", "dist_self", "dist_triangle", "uniform_space_eq", "uniform_space_of_dist" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
uniformity_basis_dist : (𝓤 α).has_basis (λ ε : ℝ, 0 < ε) (λ ε, {p:α×α | dist p.1 p.2 < ε})
begin rw [to_uniform_space_eq], exact uniform_space.has_basis_of_fun (exists_gt _) _ _ _ _ _ end
theorem
metric.uniformity_basis_dist
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "uniform_space.has_basis_of_fun" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_uniformity_basis {β : Type*} {p : β → Prop} {f : β → ℝ} (hf₀ : ∀ i, p i → 0 < f i) (hf : ∀ ⦃ε⦄, 0 < ε → ∃ i (hi : p i), f i ≤ ε) : (𝓤 α).has_basis p (λ i, {p:α×α | dist p.1 p.2 < f i})
begin refine ⟨λ s, uniformity_basis_dist.mem_iff.trans _⟩, split, { rintros ⟨ε, ε₀, hε⟩, obtain ⟨i, hi, H⟩ : ∃ i (hi : p i), f i ≤ ε, from hf ε₀, exact ⟨i, hi, λ x (hx : _ < _), hε $ lt_of_lt_of_le hx H⟩ }, { exact λ ⟨i, hi, H⟩, ⟨f i, hf₀ i hi, H⟩ } end
theorem
metric.mk_uniformity_basis
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[]
Given `f : β → ℝ`, if `f` sends `{i | p i}` to a set of positive numbers accumulating to zero, then `f i`-neighborhoods of the diagonal form a basis of `𝓤 α`. For specific bases see `uniformity_basis_dist`, `uniformity_basis_dist_inv_nat_succ`, and `uniformity_basis_dist_inv_nat_pos`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
uniformity_basis_dist_rat : (𝓤 α).has_basis (λ r : ℚ, 0 < r) (λ r, {p : α × α | dist p.1 p.2 < r})
metric.mk_uniformity_basis (λ _, rat.cast_pos.2) $ λ ε hε, let ⟨r, hr0, hrε⟩ := exists_rat_btwn hε in ⟨r, rat.cast_pos.1 hr0, hrε.le⟩
theorem
metric.uniformity_basis_dist_rat
topology.metric_space
src/topology/metric_space/basic.lean
[ "tactic.positivity", "topology.algebra.order.compact", "topology.metric_space.emetric_space", "topology.bornology.constructions" ]
[ "exists_rat_btwn", "metric.mk_uniformity_basis" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83