File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

full_name: UniformSpace.ofDist_aux
code: theorem UniformSpace.ofDist_aux (ε : ℝ) (hε : 0 < ε) : ∃ δ > (0 : ℝ), ∀ x < δ, ∀ y < δ, x + y < ε 
goal: ∃ δ > 0, ∀ x < δ, ∀ y < δ, x + y < ε

full_name: UniformSpace.ofDist
code: /-- Construct a uniform structure from a distance function and metric space axioms -/
def UniformSpace.ofDist (dist : α → α → ℝ) (dist_self : ∀ x : α, dist x x = 0)
    (dist_comm : ∀ x y : α, dist x y = dist y x)
    (dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z) : UniformSpace α 
goal: UniformSpace α

full_name: Bornology.ofDist
code: /-- Construct a bornology from a distance function and metric space axioms. -/
abbrev Bornology.ofDist {α : Type*} (dist : α → α → ℝ) (dist_comm : ∀ x y, dist x y = dist y x)
    (dist_triangle : ∀ x y z, dist x z ≤ dist x y + dist y z) : Bornology α 
goal: Bornology α

full_name: Dist
code: /-- The distance function (given an ambient metric space on `α`), which returns
  a nonnegative real number `dist x y` given `x y : α`. -/
@[ext]
class Dist (α : Type*) where
  dist : α → α → ℝ
goal: Type u_3

full_name: Dist.dist
code: /-- The distance function (given an ambient metric space on `α`), which returns
  a nonnegative real number `dist x y` given `x y : α`. -/
@[ext]
class Dist (α : Type*) where
  dist : α → α → ℝ
goal: α → α → ℝ

full_name: _private.Mathlib.Topology.MetricSpace.Pseudo.Defs.0.dist_nonneg'
code: /-- This is an internal lemma used inside the default of `PseudoMetricSpace.edist`. -/
private theorem dist_nonneg' {α} {x y : α} (dist : α → α → ℝ)
    (dist_self : ∀ x : α, dist x x = 0) (dist_comm : ∀ x y : α, dist x y = dist y x)
    (dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z) : 0 ≤ dist x y 
goal: 0 ≤ dist x y

full_name: PseudoMetricSpace.edist
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: α → α → ℝ≥0∞

full_name: PseudoMetricSpace.toUniformSpace
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: UniformSpace α

full_name: PseudoMetricSpace.dist_self
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: dist x x = 0

full_name: PseudoMetricSpace.dist_triangle
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: dist x z ≤ dist x y + dist y z

full_name: PseudoMetricSpace.uniformity_dist
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: 𝓤 α = ⨅ ε, ⨅ (_ : ε > 0), 𝓟 {p | dist p.1 p.2 < ε}

full_name: PseudoMetricSpace.edist_dist
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: PseudoMetricSpace.edist x y = ENNReal.ofReal (dist x y)

full_name: PseudoMetricSpace.dist_comm
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: dist x y = dist y x

full_name: PseudoMetricSpace.toBornology
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: Bornology α

full_name: PseudoMetricSpace
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: Type u

full_name: PseudoMetricSpace.cobounded_sets
code: /-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl
goal: (Bornology.cobounded α).sets = {s | ∃ C, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C}

full_name: PseudoMetricSpace.ext
code: /-- Two pseudo metric space structures with the same distance function coincide. -/
@[ext]
theorem PseudoMetricSpace.ext {α : Type*} {m m' : PseudoMetricSpace α}
    (h : m.toDist = m'.toDist) : m = m' 
goal: m = m'

full_name: PseudoMetricSpace.toEDist
code: instance (priority := 200) PseudoMetricSpace.toEDist : EDist α 
goal: EDist α

full_name: PseudoMetricSpace.ofDistTopology
code: /-- Construct a pseudo-metric space structure whose underlying topological space structure
(definitionally) agrees which a pre-existing topology which is compatible with a given distance
function. -/
def PseudoMetricSpace.ofDistTopology {α : Type u} [TopologicalSpace α] (dist : α → α → ℝ)
    (dist_self : ∀ x : α, dist x x = 0) (dist_comm : ∀ x y : α, dist x y = dist y x)
    (dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z)
    (H : ∀ s : Set α, IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s) :
    PseudoMetricSpace α 
goal: PseudoMetricSpace α

full_name: dist_self
code: @[simp]
theorem dist_self (x : α) : dist x x = 0 
goal: dist x x = 0

full_name: dist_comm
code: theorem dist_comm (x y : α) : dist x y = dist y x 
goal: dist x y = dist y x

full_name: edist_dist
code: theorem edist_dist (x y : α) : edist x y = ENNReal.ofReal (dist x y) 
goal: edist x y = ENNReal.ofReal (dist x y)

full_name: dist_triangle
code: theorem dist_triangle (x y z : α) : dist x z ≤ dist x y + dist y z 
goal: dist x z ≤ dist x y + dist y z

full_name: dist_triangle_left
code: theorem dist_triangle_left (x y z : α) : dist x y ≤ dist z x + dist z y 
goal: dist x y ≤ dist z x + dist z y

full_name: dist_triangle_right
code: theorem dist_triangle_right (x y z : α) : dist x y ≤ dist x z + dist y z 
goal: dist x y ≤ dist x z + dist y z

full_name: dist_triangle4
code: theorem dist_triangle4 (x y z w : α) : dist x w ≤ dist x y + dist y z + dist z w 
goal: dist x w ≤ dist x y + dist y z + dist z w

full_name: dist_triangle4_left
code: theorem dist_triangle4_left (x₁ y₁ x₂ y₂ : α) :
    dist x₂ y₂ ≤ dist x₁ y₁ + (dist x₁ x₂ + dist y₁ y₂) 
goal: dist x₂ y₂ ≤ dist x₁ y₁ + (dist x₁ x₂ + dist y₁ y₂)

full_name: dist_triangle4_right
code: theorem dist_triangle4_right (x₁ y₁ x₂ y₂ : α) :
    dist x₁ y₁ ≤ dist x₁ x₂ + dist y₁ y₂ + dist x₂ y₂ 
goal: dist x₁ y₁ ≤ dist x₁ x₂ + dist y₁ y₂ + dist x₂ y₂

full_name: dist_le_Ico_sum_dist
code: /-- The triangle (polygon) inequality for sequences of points; `Finset.Ico` version. -/
theorem dist_le_Ico_sum_dist (f : ℕ → α) {m n} (h : m ≤ n) :
    dist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, dist (f i) (f (i + 1)) 
goal: dist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, dist (f i) (f (i + 1))

full_name: dist_le_range_sum_dist
code: /-- The triangle (polygon) inequality for sequences of points; `Finset.range` version. -/
theorem dist_le_range_sum_dist (f : ℕ → α) (n : ℕ) :
    dist (f 0) (f n) ≤ ∑ i ∈ Finset.range n, dist (f i) (f (i + 1)) 
goal: dist (f 0) (f n) ≤ ∑ i ∈ Finset.range n, dist (f i) (f (i + 1))

full_name: dist_le_Ico_sum_of_dist_le
code: /-- A version of `dist_le_Ico_sum_dist` with each intermediate distance replaced
with an upper estimate. -/
theorem 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 ∈ Finset.Ico m n, d i 
goal: dist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, d i

full_name: dist_le_range_sum_of_dist_le
code: /-- A version of `dist_le_range_sum_dist` with each intermediate distance replaced
with an upper estimate. -/
theorem 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 ∈ Finset.range n, d i 
goal: dist (f 0) (f n) ≤ ∑ i ∈ Finset.range n, d i

full_name: swap_dist
code: theorem swap_dist : Function.swap (@dist α _) = dist 
goal: Function.swap dist = dist

full_name: abs_dist_sub_le
code: theorem abs_dist_sub_le (x y z : α) : |dist x z - dist y z| ≤ dist x y 
goal: |dist x z - dist y z| ≤ dist x y

full_name: dist_nonneg
code: theorem dist_nonneg {x y : α} : 0 ≤ dist x y 
goal: 0 ≤ dist x y

full_name: Mathlib.Meta.Positivity.evalDist
code: /-- Extension for the `positivity` tactic: distances are nonnegative. -/
@[positivity Dist.dist _ _]
def evalDist : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: abs_dist
code: @[simp] theorem abs_dist {a b : α} : |dist a b| = dist a b 
goal: |dist a b| = dist a b

full_name: NNDist
code: /-- A version of `Dist` that takes value in `ℝ≥0`. -/
class NNDist (α : Type*) where
  nndist : α → α → ℝ≥0
goal: Type u_3

full_name: NNDist.nndist
code: /-- A version of `Dist` that takes value in `ℝ≥0`. -/
class NNDist (α : Type*) where
  nndist : α → α → ℝ≥0
goal: α → α → ℝ≥0

full_name: PseudoMetricSpace.toNNDist
code: /-- Distance as a nonnegative real number. -/
instance (priority := 100) PseudoMetricSpace.toNNDist : NNDist α 
goal: NNDist α

full_name: dist_nndist
code: /-- Express `dist` in terms of `nndist`-/
theorem dist_nndist (x y : α) : dist x y = nndist x y 
goal: dist x y = ↑(nndist x y)

full_name: coe_nndist
code: @[simp, norm_cast]
theorem coe_nndist (x y : α) : ↑(nndist x y) = dist x y 
goal: ↑(nndist x y) = dist x y

full_name: edist_nndist
code: /-- Express `edist` in terms of `nndist`-/
theorem edist_nndist (x y : α) : edist x y = nndist x y 
goal: edist x y = ↑(nndist x y)

full_name: nndist_edist
code: /-- Express `nndist` in terms of `edist`-/
theorem nndist_edist (x y : α) : nndist x y = (edist x y).toNNReal 
goal: nndist x y = (edist x y).toNNReal

full_name: coe_nnreal_ennreal_nndist
code: @[simp, norm_cast]
theorem coe_nnreal_ennreal_nndist (x y : α) : ↑(nndist x y) = edist x y 
goal: ↑(nndist x y) = edist x y

full_name: edist_lt_coe
code: @[simp, norm_cast]
theorem edist_lt_coe {x y : α} {c : ℝ≥0} : edist x y < c ↔ nndist x y < c 
goal: edist x y < ↑c ↔ nndist x y < c

full_name: edist_le_coe
code: @[simp, norm_cast]
theorem edist_le_coe {x y : α} {c : ℝ≥0} : edist x y ≤ c ↔ nndist x y ≤ c 
goal: edist x y ≤ ↑c ↔ nndist x y ≤ c

full_name: edist_lt_top
code: /-- In a pseudometric space, the extended distance is always finite-/
theorem edist_lt_top {α : Type*} [PseudoMetricSpace α] (x y : α) : edist x y < ⊤ 
goal: edist x y < ⊤

full_name: edist_ne_top
code: /-- In a pseudometric space, the extended distance is always finite-/
theorem edist_ne_top (x y : α) : edist x y ≠ ⊤ 
goal: edist x y ≠ ⊤

full_name: nndist_self
code: /-- `nndist x x` vanishes-/
@[simp] theorem nndist_self (a : α) : nndist a a = 0 
goal: nndist a a = 0

full_name: dist_lt_coe
code: @[simp, norm_cast]
theorem dist_lt_coe {x y : α} {c : ℝ≥0} : dist x y < c ↔ nndist x y < c 
goal: dist x y < ↑c ↔ nndist x y < c

full_name: dist_le_coe
code: @[simp, norm_cast]
theorem dist_le_coe {x y : α} {c : ℝ≥0} : dist x y ≤ c ↔ nndist x y ≤ c 
goal: dist x y ≤ ↑c ↔ nndist x y ≤ c

full_name: edist_lt_ofReal
code: @[simp]
theorem edist_lt_ofReal {x y : α} {r : ℝ} : edist x y < ENNReal.ofReal r ↔ dist x y < r 
goal: edist x y < ENNReal.ofReal r ↔ dist x y < r

full_name: edist_le_ofReal
code: @[simp]
theorem edist_le_ofReal {x y : α} {r : ℝ} (hr : 0 ≤ r) :
    edist x y ≤ ENNReal.ofReal r ↔ dist x y ≤ r 
goal: edist x y ≤ ENNReal.ofReal r ↔ dist x y ≤ r

full_name: nndist_dist
code: /-- Express `nndist` in terms of `dist`-/
theorem nndist_dist (x y : α) : nndist x y = Real.toNNReal (dist x y) 
goal: nndist x y = (dist x y).toNNReal

full_name: nndist_comm
code: theorem nndist_comm (x y : α) : nndist x y = nndist y x 
goal: nndist x y = nndist y x

full_name: nndist_triangle
code: /-- Triangle inequality for the nonnegative distance-/
theorem nndist_triangle (x y z : α) : nndist x z ≤ nndist x y + nndist y z 
goal: nndist x z ≤ nndist x y + nndist y z

full_name: nndist_triangle_left
code: theorem nndist_triangle_left (x y z : α) : nndist x y ≤ nndist z x + nndist z y 
goal: nndist x y ≤ nndist z x + nndist z y

full_name: nndist_triangle_right
code: theorem nndist_triangle_right (x y z : α) : nndist x y ≤ nndist x z + nndist y z 
goal: nndist x y ≤ nndist x z + nndist y z

full_name: dist_edist
code: /-- Express `dist` in terms of `edist`-/
theorem dist_edist (x y : α) : dist x y = (edist x y).toReal 
goal: dist x y = (edist x y).toReal

full_name: Metric.ball
code: /-- `ball x ε` is the set of all points `y` with `dist y x < ε` -/
def ball (x : α) (ε : ℝ) : Set α 
goal: Set α

full_name: Metric.mem_ball
code: @[simp]
theorem mem_ball : y ∈ ball x ε ↔ dist y x < ε 
goal: y ∈ Metric.ball x ε ↔ dist y x < ε

full_name: Metric.mem_ball'
code: theorem mem_ball' : y ∈ ball x ε ↔ dist x y < ε 
goal: y ∈ Metric.ball x ε ↔ dist x y < ε

full_name: Metric.pos_of_mem_ball
code: theorem pos_of_mem_ball (hy : y ∈ ball x ε) : 0 < ε 
goal: 0 < ε

full_name: Metric.mem_ball_self
code: theorem mem_ball_self (h : 0 < ε) : x ∈ ball x ε 
goal: x ∈ Metric.ball x ε

full_name: Metric.nonempty_ball
code: @[simp]
theorem nonempty_ball : (ball x ε).Nonempty ↔ 0 < ε 
goal: (Metric.ball x ε).Nonempty ↔ 0 < ε

full_name: Metric.ball_eq_empty
code: @[simp]
theorem ball_eq_empty : ball x ε = ∅ ↔ ε ≤ 0 
goal: Metric.ball x ε = ∅ ↔ ε ≤ 0

full_name: Metric.ball_zero
code: @[simp]
theorem ball_zero : ball x 0 = ∅ 
goal: Metric.ball x 0 = ∅

full_name: Metric.exists_lt_mem_ball_of_mem_ball
code: /-- 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`. -/
theorem exists_lt_mem_ball_of_mem_ball (h : x ∈ ball y ε) : ∃ ε' < ε, x ∈ ball y ε' 
goal: ∃ ε' < ε, x ∈ Metric.ball y ε'

full_name: Metric.ball_eq_ball
code: theorem ball_eq_ball (ε : ℝ) (x : α) :
    UniformSpace.ball x { p | dist p.2 p.1 < ε } = Metric.ball x ε 
goal: UniformSpace.ball x {p | dist p.2 p.1 < ε} = Metric.ball x ε

full_name: Metric.ball_eq_ball'
code: theorem ball_eq_ball' (ε : ℝ) (x : α) :
    UniformSpace.ball x { p | dist p.1 p.2 < ε } = Metric.ball x ε 
goal: UniformSpace.ball x {p | dist p.1 p.2 < ε} = Metric.ball x ε

full_name: Metric.iUnion_ball_nat
code: @[simp]
theorem iUnion_ball_nat (x : α) : ⋃ n : ℕ, ball x n = univ 
goal: ⋃ n, Metric.ball x ↑n = Set.univ

full_name: Metric.iUnion_ball_nat_succ
code: @[simp]
theorem iUnion_ball_nat_succ (x : α) : ⋃ n : ℕ, ball x (n + 1) = univ 
goal: ⋃ n, Metric.ball x (↑n + 1) = Set.univ

full_name: Metric.closedBall
code: /-- `closedBall x ε` is the set of all points `y` with `dist y x ≤ ε` -/
def closedBall (x : α) (ε : ℝ) 
goal: Set α

full_name: Metric.mem_closedBall
code: @[simp] theorem mem_closedBall : y ∈ closedBall x ε ↔ dist y x ≤ ε 
goal: y ∈ Metric.closedBall x ε ↔ dist y x ≤ ε

full_name: Metric.mem_closedBall'
code: theorem mem_closedBall' : y ∈ closedBall x ε ↔ dist x y ≤ ε 
goal: y ∈ Metric.closedBall x ε ↔ dist x y ≤ ε

full_name: Metric.sphere
code: /-- `sphere x ε` is the set of all points `y` with `dist y x = ε` -/
def sphere (x : α) (ε : ℝ) 
goal: Set α

full_name: Metric.mem_sphere
code: @[simp] theorem mem_sphere : y ∈ sphere x ε ↔ dist y x = ε 
goal: y ∈ Metric.sphere x ε ↔ dist y x = ε

full_name: Metric.mem_sphere'
code: theorem mem_sphere' : y ∈ sphere x ε ↔ dist x y = ε 
goal: y ∈ Metric.sphere x ε ↔ dist x y = ε

full_name: Metric.ne_of_mem_sphere
code: theorem ne_of_mem_sphere (h : y ∈ sphere x ε) (hε : ε ≠ 0) : y ≠ x 
goal: y ≠ x

full_name: Metric.nonneg_of_mem_sphere
code: theorem nonneg_of_mem_sphere (hy : y ∈ sphere x ε) : 0 ≤ ε 
goal: 0 ≤ ε

full_name: Metric.sphere_eq_empty_of_neg
code: @[simp]
theorem sphere_eq_empty_of_neg (hε : ε < 0) : sphere x ε = ∅ 
goal: Metric.sphere x ε = ∅

full_name: Metric.sphere_eq_empty_of_subsingleton
code: theorem sphere_eq_empty_of_subsingleton [Subsingleton α] (hε : ε ≠ 0) : sphere x ε = ∅ 
goal: Metric.sphere x ε = ∅

full_name: Metric.sphere_isEmpty_of_subsingleton
code: instance sphere_isEmpty_of_subsingleton [Subsingleton α] [NeZero ε] : IsEmpty (sphere x ε) 
goal: IsEmpty ↑(Metric.sphere x ε)

full_name: Metric.mem_closedBall_self
code: theorem mem_closedBall_self (h : 0 ≤ ε) : x ∈ closedBall x ε 
goal: x ∈ Metric.closedBall x ε

full_name: Metric.nonempty_closedBall
code: @[simp]
theorem nonempty_closedBall : (closedBall x ε).Nonempty ↔ 0 ≤ ε 
goal: (Metric.closedBall x ε).Nonempty ↔ 0 ≤ ε

full_name: Metric.closedBall_eq_empty
code: @[simp]
theorem closedBall_eq_empty : closedBall x ε = ∅ ↔ ε < 0 
goal: Metric.closedBall x ε = ∅ ↔ ε < 0

full_name: Metric.closedBall_eq_sphere_of_nonpos
code: /-- Closed balls and spheres coincide when the radius is non-positive -/
theorem closedBall_eq_sphere_of_nonpos (hε : ε ≤ 0) : closedBall x ε = sphere x ε 
goal: Metric.closedBall x ε = Metric.sphere x ε

full_name: Metric.ball_subset_closedBall
code: theorem ball_subset_closedBall : ball x ε ⊆ closedBall x ε 
goal: Metric.ball x ε ⊆ Metric.closedBall x ε

full_name: Metric.sphere_subset_closedBall
code: theorem sphere_subset_closedBall : sphere x ε ⊆ closedBall x ε 
goal: Metric.sphere x ε ⊆ Metric.closedBall x ε

full_name: Metric.sphere_subset_ball
code: lemma sphere_subset_ball {r R : ℝ} (h : r < R) : sphere x r ⊆ ball x R 
goal: Metric.sphere x r ⊆ Metric.ball x R

full_name: Metric.closedBall_disjoint_ball
code: theorem closedBall_disjoint_ball (h : δ + ε ≤ dist x y) : Disjoint (closedBall x δ) (ball y ε) 
goal: Disjoint (Metric.closedBall x δ) (Metric.ball y ε)

full_name: Metric.ball_disjoint_closedBall
code: theorem ball_disjoint_closedBall (h : δ + ε ≤ dist x y) : Disjoint (ball x δ) (closedBall y ε) 
goal: Disjoint (Metric.ball x δ) (Metric.closedBall y ε)

full_name: Metric.ball_disjoint_ball
code: theorem ball_disjoint_ball (h : δ + ε ≤ dist x y) : Disjoint (ball x δ) (ball y ε) 
goal: Disjoint (Metric.ball x δ) (Metric.ball y ε)

full_name: Metric.closedBall_disjoint_closedBall
code: theorem closedBall_disjoint_closedBall (h : δ + ε < dist x y) :
    Disjoint (closedBall x δ) (closedBall y ε) 
goal: Disjoint (Metric.closedBall x δ) (Metric.closedBall y ε)

full_name: Metric.sphere_disjoint_ball
code: theorem sphere_disjoint_ball : Disjoint (sphere x ε) (ball x ε) 
goal: Disjoint (Metric.sphere x ε) (Metric.ball x ε)

full_name: Metric.ball_union_sphere
code: @[simp]
theorem ball_union_sphere : ball x ε ∪ sphere x ε = closedBall x ε 
goal: Metric.ball x ε ∪ Metric.sphere x ε = Metric.closedBall x ε

full_name: Metric.sphere_union_ball
code: @[simp]
theorem sphere_union_ball : sphere x ε ∪ ball x ε = closedBall x ε 
goal: Metric.sphere x ε ∪ Metric.ball x ε = Metric.closedBall x ε

full_name: Metric.closedBall_diff_sphere
code: @[simp]
theorem closedBall_diff_sphere : closedBall x ε \ sphere x ε = ball x ε 
goal: Metric.closedBall x ε \ Metric.sphere x ε = Metric.ball x ε

full_name: Metric.closedBall_diff_ball
code: @[simp]
theorem closedBall_diff_ball : closedBall x ε \ ball x ε = sphere x ε 
goal: Metric.closedBall x ε \ Metric.ball x ε = Metric.sphere x ε

full_name: Metric.mem_ball_comm
code: theorem mem_ball_comm : x ∈ ball y ε ↔ y ∈ ball x ε 
goal: x ∈ Metric.ball y ε ↔ y ∈ Metric.ball x ε

full_name: Metric.mem_closedBall_comm
code: theorem mem_closedBall_comm : x ∈ closedBall y ε ↔ y ∈ closedBall x ε 
goal: x ∈ Metric.closedBall y ε ↔ y ∈ Metric.closedBall x ε

full_name: Metric.mem_sphere_comm
code: theorem mem_sphere_comm : x ∈ sphere y ε ↔ y ∈ sphere x ε 
goal: x ∈ Metric.sphere y ε ↔ y ∈ Metric.sphere x ε

full_name: Metric.ball_subset_ball
code: @[gcongr]
theorem ball_subset_ball (h : ε₁ ≤ ε₂) : ball x ε₁ ⊆ ball x ε₂ 
goal: Metric.ball x ε₁ ⊆ Metric.ball x ε₂

full_name: Metric.closedBall_eq_bInter_ball
code: theorem closedBall_eq_bInter_ball : closedBall x ε = ⋂ δ > ε, ball x δ 
goal: Metric.closedBall x ε = ⋂ δ, ⋂ (_ : δ > ε), Metric.ball x δ

full_name: Metric.ball_subset_ball'
code: theorem ball_subset_ball' (h : ε₁ + dist x y ≤ ε₂) : ball x ε₁ ⊆ ball y ε₂ 
goal: Metric.ball x ε₁ ⊆ Metric.ball y ε₂

full_name: Metric.closedBall_subset_closedBall
code: @[gcongr]
theorem closedBall_subset_closedBall (h : ε₁ ≤ ε₂) : closedBall x ε₁ ⊆ closedBall x ε₂ 
goal: Metric.closedBall x ε₁ ⊆ Metric.closedBall x ε₂

full_name: Metric.closedBall_subset_closedBall'
code: theorem closedBall_subset_closedBall' (h : ε₁ + dist x y ≤ ε₂) :
    closedBall x ε₁ ⊆ closedBall y ε₂ 
goal: Metric.closedBall x ε₁ ⊆ Metric.closedBall y ε₂

full_name: Metric.closedBall_subset_ball
code: theorem closedBall_subset_ball (h : ε₁ < ε₂) : closedBall x ε₁ ⊆ ball x ε₂ 
goal: Metric.closedBall x ε₁ ⊆ Metric.ball x ε₂

full_name: Metric.closedBall_subset_ball'
code: theorem closedBall_subset_ball' (h : ε₁ + dist x y < ε₂) :
    closedBall x ε₁ ⊆ ball y ε₂ 
goal: Metric.closedBall x ε₁ ⊆ Metric.ball y ε₂

full_name: Metric.dist_le_add_of_nonempty_closedBall_inter_closedBall
code: theorem dist_le_add_of_nonempty_closedBall_inter_closedBall
    (h : (closedBall x ε₁ ∩ closedBall y ε₂).Nonempty) : dist x y ≤ ε₁ + ε₂ 
goal: dist x y ≤ ε₁ + ε₂

full_name: Metric.dist_lt_add_of_nonempty_closedBall_inter_ball
code: theorem dist_lt_add_of_nonempty_closedBall_inter_ball (h : (closedBall x ε₁ ∩ ball y ε₂).Nonempty) :
    dist x y < ε₁ + ε₂ 
goal: dist x y < ε₁ + ε₂

full_name: Metric.dist_lt_add_of_nonempty_ball_inter_closedBall
code: theorem dist_lt_add_of_nonempty_ball_inter_closedBall (h : (ball x ε₁ ∩ closedBall y ε₂).Nonempty) :
    dist x y < ε₁ + ε₂ 
goal: dist x y < ε₁ + ε₂

full_name: Metric.dist_lt_add_of_nonempty_ball_inter_ball
code: theorem dist_lt_add_of_nonempty_ball_inter_ball (h : (ball x ε₁ ∩ ball y ε₂).Nonempty) :
    dist x y < ε₁ + ε₂ 
goal: dist x y < ε₁ + ε₂

full_name: Metric.iUnion_closedBall_nat
code: @[simp]
theorem iUnion_closedBall_nat (x : α) : ⋃ n : ℕ, closedBall x n = univ 
goal: ⋃ n, Metric.closedBall x ↑n = Set.univ

full_name: Metric.iUnion_inter_closedBall_nat
code: theorem iUnion_inter_closedBall_nat (s : Set α) (x : α) : ⋃ n : ℕ, s ∩ closedBall x n = s 
goal: ⋃ n, s ∩ Metric.closedBall x ↑n = s

full_name: Metric.ball_subset
code: theorem ball_subset (h : dist x y ≤ ε₂ - ε₁) : ball x ε₁ ⊆ ball y ε₂ 
goal: Metric.ball x ε₁ ⊆ Metric.ball y ε₂

full_name: Metric.ball_half_subset
code: theorem ball_half_subset (y) (h : y ∈ ball x (ε / 2)) : ball y (ε / 2) ⊆ ball x ε 
goal: Metric.ball y (ε / 2) ⊆ Metric.ball x ε

full_name: Metric.exists_ball_subset_ball
code: theorem exists_ball_subset_ball (h : y ∈ ball x ε) : ∃ ε' > 0, ball y ε' ⊆ ball x ε 
goal: ∃ ε' > 0, Metric.ball y ε' ⊆ Metric.ball x ε

full_name: Metric.forall_of_forall_mem_closedBall
code: /-- If a property holds for all points in closed balls of arbitrarily large radii, then it holds for
all points. -/
theorem forall_of_forall_mem_closedBall (p : α → Prop) (x : α)
    (H : ∃ᶠ R : ℝ in atTop, ∀ y ∈ closedBall x R, p y) (y : α) : p y 
goal: p y

full_name: Metric.forall_of_forall_mem_ball
code: /-- If a property holds for all points in balls of arbitrarily large radii, then it holds for all
points. -/
theorem forall_of_forall_mem_ball (p : α → Prop) (x : α)
    (H : ∃ᶠ R : ℝ in atTop, ∀ y ∈ ball x R, p y) (y : α) : p y 
goal: p y

full_name: Metric.isBounded_iff
code: theorem isBounded_iff {s : Set α} :
    IsBounded s ↔ ∃ C : ℝ, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C 
goal: Bornology.IsBounded s ↔ ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C

full_name: Metric.isBounded_iff_eventually
code: theorem isBounded_iff_eventually {s : Set α} :
    IsBounded s ↔ ∀ᶠ C in atTop, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C 
goal: Bornology.IsBounded s ↔ ∀ᶠ (C : ℝ) in Filter.atTop, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C

full_name: Metric.isBounded_iff_exists_ge
code: theorem isBounded_iff_exists_ge {s : Set α} (c : ℝ) :
    IsBounded s ↔ ∃ C, c ≤ C ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C 
goal: Bornology.IsBounded s ↔ ∃ C, c ≤ C ∧ ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C

full_name: Metric.isBounded_iff_nndist
code: theorem isBounded_iff_nndist {s : Set α} :
    IsBounded s ↔ ∃ C : ℝ≥0, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → nndist x y ≤ C 
goal: Bornology.IsBounded s ↔ ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → nndist x y ≤ C

full_name: Metric.toUniformSpace_eq
code: theorem toUniformSpace_eq :
    ‹PseudoMetricSpace α›.toUniformSpace = .ofDist dist dist_self dist_comm dist_triangle 
goal: PseudoMetricSpace.toUniformSpace = UniformSpace.ofDist dist ⋯ ⋯ ⋯

full_name: Metric.uniformity_basis_dist
code: theorem uniformity_basis_dist :
    (𝓤 α).HasBasis (fun ε : ℝ => 0 < ε) fun ε => { p : α × α | dist p.1 p.2 < ε } 
goal: (𝓤 α).HasBasis (fun ε => 0 < ε) fun ε => {p | dist p.1 p.2 < ε}

full_name: Metric.mk_uniformity_basis
code: /-- 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`. -/
protected theorem mk_uniformity_basis {β : Type*} {p : β → Prop} {f : β → ℝ}
    (hf₀ : ∀ i, p i → 0 < f i) (hf : ∀ ⦃ε⦄, 0 < ε → ∃ i, p i ∧ f i ≤ ε) :
    (𝓤 α).HasBasis p fun i => { p : α × α | dist p.1 p.2 < f i } 
goal: (𝓤 α).HasBasis p fun i => {p | dist p.1 p.2 < f i}

full_name: Metric.uniformity_basis_dist_rat
code: theorem uniformity_basis_dist_rat :
    (𝓤 α).HasBasis (fun r : ℚ => 0 < r) fun r => { p : α × α | dist p.1 p.2 < r } 
goal: (𝓤 α).HasBasis (fun r => 0 < r) fun r => {p | dist p.1 p.2 < ↑r}

full_name: Metric.uniformity_basis_dist_inv_nat_succ
code: theorem uniformity_basis_dist_inv_nat_succ :
    (𝓤 α).HasBasis (fun _ => True) fun n : ℕ => { p : α × α | dist p.1 p.2 < 1 / (↑n + 1) } 
goal: (𝓤 α).HasBasis (fun x => True) fun n => {p | dist p.1 p.2 < 1 / (↑n + 1)}

full_name: Metric.uniformity_basis_dist_inv_nat_pos
code: theorem uniformity_basis_dist_inv_nat_pos :
    (𝓤 α).HasBasis (fun n : ℕ => 0 < n) fun n : ℕ => { p : α × α | dist p.1 p.2 < 1 / ↑n } 
goal: (𝓤 α).HasBasis (fun n => 0 < n) fun n => {p | dist p.1 p.2 < 1 / ↑n}

full_name: Metric.uniformity_basis_dist_pow
code: theorem uniformity_basis_dist_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓤 α).HasBasis (fun _ : ℕ => True) fun n : ℕ => { p : α × α | dist p.1 p.2 < r ^ n } 
goal: (𝓤 α).HasBasis (fun x => True) fun n => {p | dist p.1 p.2 < r ^ n}

full_name: Metric.uniformity_basis_dist_lt
code: theorem uniformity_basis_dist_lt {R : ℝ} (hR : 0 < R) :
    (𝓤 α).HasBasis (fun r : ℝ => 0 < r ∧ r < R) fun r => { p : α × α | dist p.1 p.2 < r } 
goal: (𝓤 α).HasBasis (fun r => 0 < r ∧ r < R) fun r => {p | dist p.1 p.2 < r}

full_name: Metric.mk_uniformity_basis_le
code: /-- Given `f : β → ℝ`, if `f` sends `{i | p i}` to a set of positive numbers
accumulating to zero, then closed neighborhoods of the diagonal of sizes `{f i | p i}`
form a basis of `𝓤 α`.

Currently we have only one specific basis `uniformity_basis_dist_le` based on this constructor.
More can be easily added if needed in the future. -/
protected theorem mk_uniformity_basis_le {β : Type*} {p : β → Prop} {f : β → ℝ}
    (hf₀ : ∀ x, p x → 0 < f x) (hf : ∀ ε, 0 < ε → ∃ x, p x ∧ f x ≤ ε) :
    (𝓤 α).HasBasis p fun x => { p : α × α | dist p.1 p.2 ≤ f x } 
goal: (𝓤 α).HasBasis p fun x => {p | dist p.1 p.2 ≤ f x}

full_name: Metric.uniformity_basis_dist_le
code: /-- Constant size closed neighborhoods of the diagonal form a basis
of the uniformity filter. -/
theorem uniformity_basis_dist_le :
    (𝓤 α).HasBasis ((0 : ℝ) < ·) fun ε => { p : α × α | dist p.1 p.2 ≤ ε } 
goal: (𝓤 α).HasBasis (fun x => 0 < x) fun ε => {p | dist p.1 p.2 ≤ ε}

full_name: Metric.uniformity_basis_dist_le_pow
code: theorem uniformity_basis_dist_le_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓤 α).HasBasis (fun _ : ℕ => True) fun n : ℕ => { p : α × α | dist p.1 p.2 ≤ r ^ n } 
goal: (𝓤 α).HasBasis (fun x => True) fun n => {p | dist p.1 p.2 ≤ r ^ n}

full_name: Metric.mem_uniformity_dist
code: theorem mem_uniformity_dist {s : Set (α × α)} :
    s ∈ 𝓤 α ↔ ∃ ε > 0, ∀ {a b : α}, dist a b < ε → (a, b) ∈ s 
goal: s ∈ 𝓤 α ↔ ∃ ε > 0, ∀ {a b : α}, dist a b < ε → (a, b) ∈ s

full_name: Metric.dist_mem_uniformity
code: /-- A constant size neighborhood of the diagonal is an entourage. -/
theorem dist_mem_uniformity {ε : ℝ} (ε0 : 0 < ε) : { p : α × α | dist p.1 p.2 < ε } ∈ 𝓤 α 
goal: {p | dist p.1 p.2 < ε} ∈ 𝓤 α

full_name: Metric.uniformContinuous_iff
code: theorem uniformContinuous_iff [PseudoMetricSpace β] {f : α → β} :
    UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, dist a b < δ → dist (f a) (f b) < ε 
goal: UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, dist a b < δ → dist (f a) (f b) < ε

full_name: Metric.uniformContinuousOn_iff
code: theorem uniformContinuousOn_iff [PseudoMetricSpace β] {f : α → β} {s : Set α} :
    UniformContinuousOn f s ↔
      ∀ ε > 0, ∃ δ > 0, ∀ x ∈ s, ∀ y ∈ s, dist x y < δ → dist (f x) (f y) < ε 
goal: UniformContinuousOn f s ↔ ∀ ε > 0, ∃ δ > 0, ∀ x ∈ s, ∀ y ∈ s, dist x y < δ → dist (f x) (f y) < ε

full_name: Metric.uniformContinuousOn_iff_le
code: theorem uniformContinuousOn_iff_le [PseudoMetricSpace β] {f : α → β} {s : Set α} :
    UniformContinuousOn f s ↔
      ∀ ε > 0, ∃ δ > 0, ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ δ → dist (f x) (f y) ≤ ε 
goal: UniformContinuousOn f s ↔ ∀ ε > 0, ∃ δ > 0, ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ δ → dist (f x) (f y) ≤ ε

full_name: Metric.uniformInducing_iff
code: nonrec theorem uniformInducing_iff [PseudoMetricSpace β] {f : α → β} :
    UniformInducing f ↔ UniformContinuous f ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ 
goal: UniformInducing f ↔ UniformContinuous f ∧ ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ

full_name: Metric.uniformEmbedding_iff
code: nonrec theorem uniformEmbedding_iff [PseudoMetricSpace β] {f : α → β} :
    UniformEmbedding f ↔ Function.Injective f ∧ UniformContinuous f ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ 
goal: UniformEmbedding f ↔
  Function.Injective f ∧ UniformContinuous f ∧ ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ

full_name: Metric.controlled_of_uniformEmbedding
code: /-- If a map between pseudometric spaces is a uniform embedding then the distance between `f x`
and `f y` is controlled in terms of the distance between `x` and `y`. -/
theorem controlled_of_uniformEmbedding [PseudoMetricSpace β] {f : α → β} (h : UniformEmbedding f) :
    (∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, dist a b < δ → dist (f a) (f b) < ε) ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ 
goal: (∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, dist a b < δ → dist (f a) (f b) < ε) ∧
  ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ

full_name: Metric.totallyBounded_iff
code: theorem totallyBounded_iff {s : Set α} :
    TotallyBounded s ↔ ∀ ε > 0, ∃ t : Set α, t.Finite ∧ s ⊆ ⋃ y ∈ t, ball y ε 
goal: TotallyBounded s ↔ ∀ ε > 0, ∃ t, t.Finite ∧ s ⊆ ⋃ y ∈ t, Metric.ball y ε

full_name: Metric.totallyBounded_of_finite_discretization
code: /-- A pseudometric space is totally bounded if one can reconstruct up to any ε>0 any element of the
space from finitely many data. -/
theorem totallyBounded_of_finite_discretization {s : Set α}
    (H : ∀ ε > (0 : ℝ),
        ∃ (β : Type u) (_ : Fintype β) (F : s → β), ∀ x y, F x = F y → dist (x : α) y < ε) :
    TotallyBounded s 
goal: TotallyBounded s

full_name: Metric.finite_approx_of_totallyBounded
code: theorem finite_approx_of_totallyBounded {s : Set α} (hs : TotallyBounded s) :
    ∀ ε > 0, ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ y ∈ t, ball y ε 
goal: ε > 0 → ∃ t ⊆ s, t.Finite ∧ s ⊆ ⋃ y ∈ t, Metric.ball y ε

full_name: Metric.tendstoUniformlyOnFilter_iff
code: /-- Expressing uniform convergence using `dist` -/
theorem tendstoUniformlyOnFilter_iff {F : ι → β → α} {f : β → α} {p : Filter ι} {p' : Filter β} :
    TendstoUniformlyOnFilter F f p p' ↔
      ∀ ε > 0, ∀ᶠ n : ι × β in p ×ˢ p', dist (f n.snd) (F n.fst n.snd) < ε 
goal: TendstoUniformlyOnFilter F f p p' ↔ ∀ ε > 0, ∀ᶠ (n : ι × β) in p ×ˢ p', dist (f n.2) (F n.1 n.2) < ε

full_name: Metric.tendstoLocallyUniformlyOn_iff
code: /-- Expressing locally uniform convergence on a set using `dist`. -/
theorem tendstoLocallyUniformlyOn_iff [TopologicalSpace β] {F : ι → β → α} {f : β → α}
    {p : Filter ι} {s : Set β} :
    TendstoLocallyUniformlyOn F f p s ↔
      ∀ ε > 0, ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∀ᶠ n in p, ∀ y ∈ t, dist (f y) (F n y) < ε 
goal: TendstoLocallyUniformlyOn F f p s ↔ ∀ ε > 0, ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∀ᶠ (n : ι) in p, ∀ y ∈ t, dist (f y) (F n y) < ε

full_name: Metric.tendstoUniformlyOn_iff
code: /-- Expressing uniform convergence on a set using `dist`. -/
theorem tendstoUniformlyOn_iff {F : ι → β → α} {f : β → α} {p : Filter ι} {s : Set β} :
    TendstoUniformlyOn F f p s ↔ ∀ ε > 0, ∀ᶠ n in p, ∀ x ∈ s, dist (f x) (F n x) < ε 
goal: TendstoUniformlyOn F f p s ↔ ∀ ε > 0, ∀ᶠ (n : ι) in p, ∀ x ∈ s, dist (f x) (F n x) < ε

full_name: Metric.tendstoLocallyUniformly_iff
code: /-- Expressing locally uniform convergence using `dist`. -/
theorem tendstoLocallyUniformly_iff [TopologicalSpace β] {F : ι → β → α} {f : β → α}
    {p : Filter ι} :
    TendstoLocallyUniformly F f p ↔
      ∀ ε > 0, ∀ x : β, ∃ t ∈ 𝓝 x, ∀ᶠ n in p, ∀ y ∈ t, dist (f y) (F n y) < ε 
goal: TendstoLocallyUniformly F f p ↔ ∀ ε > 0, ∀ (x : β), ∃ t ∈ 𝓝 x, ∀ᶠ (n : ι) in p, ∀ y ∈ t, dist (f y) (F n y) < ε

full_name: Metric.tendstoUniformly_iff
code: /-- Expressing uniform convergence using `dist`. -/
theorem tendstoUniformly_iff {F : ι → β → α} {f : β → α} {p : Filter ι} :
    TendstoUniformly F f p ↔ ∀ ε > 0, ∀ᶠ n in p, ∀ x, dist (f x) (F n x) < ε 
goal: TendstoUniformly F f p ↔ ∀ ε > 0, ∀ᶠ (n : ι) in p, ∀ (x : β), dist (f x) (F n x) < ε

full_name: Metric.cauchy_iff
code: protected theorem cauchy_iff {f : Filter α} :
    Cauchy f ↔ NeBot f ∧ ∀ ε > 0, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, dist x y < ε 
goal: Cauchy f ↔ f.NeBot ∧ ∀ ε > 0, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, dist x y < ε

full_name: Metric.nhds_basis_ball
code: theorem nhds_basis_ball : (𝓝 x).HasBasis (0 < ·) (ball x) 
goal: (𝓝 x).HasBasis (fun x => 0 < x) (Metric.ball x)

full_name: Metric.mem_nhds_iff
code: theorem mem_nhds_iff : s ∈ 𝓝 x ↔ ∃ ε > 0, ball x ε ⊆ s 
goal: s ∈ 𝓝 x ↔ ∃ ε > 0, Metric.ball x ε ⊆ s

full_name: Metric.eventually_nhds_iff
code: theorem eventually_nhds_iff {p : α → Prop} :
    (∀ᶠ y in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ ⦃y⦄, dist y x < ε → p y 
goal: (∀ᶠ (y : α) in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ ⦃y : α⦄, dist y x < ε → p y

full_name: Metric.eventually_nhds_iff_ball
code: theorem eventually_nhds_iff_ball {p : α → Prop} :
    (∀ᶠ y in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ y ∈ ball x ε, p y 
goal: (∀ᶠ (y : α) in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ y ∈ Metric.ball x ε, p y

full_name: Metric.eventually_nhds_prod_iff
code: /-- A version of `Filter.eventually_prod_iff` where the first filter consists of neighborhoods
in a pseudo-metric space. -/
theorem eventually_nhds_prod_iff {f : Filter ι} {x₀ : α} {p : α × ι → Prop} :
    (∀ᶠ x in 𝓝 x₀ ×ˢ f, p x) ↔ ∃ ε > (0 : ℝ), ∃ pa : ι → Prop, (∀ᶠ i in f, pa i) ∧
      ∀ {x}, dist x x₀ < ε → ∀ {i}, pa i → p (x, i) 
goal: (∀ᶠ (x : α × ι) in 𝓝 x₀ ×ˢ f, p x) ↔
  ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)

full_name: Metric.eventually_prod_nhds_iff
code: /-- A version of `Filter.eventually_prod_iff` where the second filter consists of neighborhoods
in a pseudo-metric space. -/
theorem eventually_prod_nhds_iff {f : Filter ι} {x₀ : α} {p : ι × α → Prop} :
    (∀ᶠ x in f ×ˢ 𝓝 x₀, p x) ↔ ∃ pa : ι → Prop, (∀ᶠ i in f, pa i) ∧
      ∃ ε > 0, ∀ {i}, pa i → ∀ {x}, dist x x₀ < ε → p (i, x) 
goal: (∀ᶠ (x : ι × α) in f ×ˢ 𝓝 x₀, p x) ↔
  ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∃ ε > 0, ∀ {i : ι}, pa i → ∀ {x : α}, dist x x₀ < ε → p (i, x)

full_name: Metric.nhds_basis_closedBall
code: theorem nhds_basis_closedBall : (𝓝 x).HasBasis (fun ε : ℝ => 0 < ε) (closedBall x) 
goal: (𝓝 x).HasBasis (fun ε => 0 < ε) (Metric.closedBall x)

full_name: Metric.nhds_basis_ball_inv_nat_succ
code: theorem nhds_basis_ball_inv_nat_succ :
    (𝓝 x).HasBasis (fun _ => True) fun n : ℕ => ball x (1 / (↑n + 1)) 
goal: (𝓝 x).HasBasis (fun x => True) fun n => Metric.ball x (1 / (↑n + 1))

full_name: Metric.nhds_basis_ball_inv_nat_pos
code: theorem nhds_basis_ball_inv_nat_pos :
    (𝓝 x).HasBasis (fun n => 0 < n) fun n : ℕ => ball x (1 / ↑n) 
goal: (𝓝 x).HasBasis (fun n => 0 < n) fun n => Metric.ball x (1 / ↑n)

full_name: Metric.nhds_basis_ball_pow
code: theorem nhds_basis_ball_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓝 x).HasBasis (fun _ => True) fun n : ℕ => ball x (r ^ n) 
goal: (𝓝 x).HasBasis (fun x => True) fun n => Metric.ball x (r ^ n)

full_name: Metric.nhds_basis_closedBall_pow
code: theorem nhds_basis_closedBall_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓝 x).HasBasis (fun _ => True) fun n : ℕ => closedBall x (r ^ n) 
goal: (𝓝 x).HasBasis (fun x => True) fun n => Metric.closedBall x (r ^ n)

full_name: Metric.isOpen_iff
code: theorem isOpen_iff : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ball x ε ⊆ s 
goal: IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, Metric.ball x ε ⊆ s

full_name: Metric.isOpen_ball
code: theorem isOpen_ball : IsOpen (ball x ε) 
goal: IsOpen (Metric.ball x ε)

full_name: Metric.ball_mem_nhds
code: theorem ball_mem_nhds (x : α) {ε : ℝ} (ε0 : 0 < ε) : ball x ε ∈ 𝓝 x 
goal: Metric.ball x ε ∈ 𝓝 x

full_name: Metric.closedBall_mem_nhds
code: theorem closedBall_mem_nhds (x : α) {ε : ℝ} (ε0 : 0 < ε) : closedBall x ε ∈ 𝓝 x 
goal: Metric.closedBall x ε ∈ 𝓝 x

full_name: Metric.closedBall_mem_nhds_of_mem
code: theorem closedBall_mem_nhds_of_mem {x c : α} {ε : ℝ} (h : x ∈ ball c ε) : closedBall c ε ∈ 𝓝 x 
goal: Metric.closedBall c ε ∈ 𝓝 x

full_name: Metric.nhdsWithin_basis_ball
code: theorem nhdsWithin_basis_ball {s : Set α} :
    (𝓝[s] x).HasBasis (fun ε : ℝ => 0 < ε) fun ε => ball x ε ∩ s 
goal: (𝓝[s] x).HasBasis (fun ε => 0 < ε) fun ε => Metric.ball x ε ∩ s

full_name: Metric.mem_nhdsWithin_iff
code: theorem mem_nhdsWithin_iff {t : Set α} : s ∈ 𝓝[t] x ↔ ∃ ε > 0, ball x ε ∩ t ⊆ s 
goal: s ∈ 𝓝[t] x ↔ ∃ ε > 0, Metric.ball x ε ∩ t ⊆ s

full_name: Metric.tendsto_nhdsWithin_nhdsWithin
code: theorem tendsto_nhdsWithin_nhdsWithin [PseudoMetricSpace β] {t : Set β} {f : α → β} {a b} :
    Tendsto f (𝓝[s] a) (𝓝[t] b) ↔
      ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → f x ∈ t ∧ dist (f x) b < ε 
goal: Filter.Tendsto f (𝓝[s] a) (𝓝[t] b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → f x ∈ t ∧ dist (f x) b < ε

full_name: Metric.tendsto_nhdsWithin_nhds
code: theorem tendsto_nhdsWithin_nhds [PseudoMetricSpace β] {f : α → β} {a b} :
    Tendsto f (𝓝[s] a) (𝓝 b) ↔
      ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) b < ε 
goal: Filter.Tendsto f (𝓝[s] a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) b < ε

full_name: Metric.tendsto_nhds_nhds
code: theorem tendsto_nhds_nhds [PseudoMetricSpace β] {f : α → β} {a b} :
    Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) b < ε 
goal: Filter.Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) b < ε

full_name: Metric.continuousAt_iff
code: theorem continuousAt_iff [PseudoMetricSpace β] {f : α → β} {a : α} :
    ContinuousAt f a ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) (f a) < ε 
goal: ContinuousAt f a ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) (f a) < ε

full_name: Metric.continuousWithinAt_iff
code: theorem continuousWithinAt_iff [PseudoMetricSpace β] {f : α → β} {a : α} {s : Set α} :
    ContinuousWithinAt f s a ↔
      ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) (f a) < ε 
goal: ContinuousWithinAt f s a ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) (f a) < ε

full_name: Metric.continuousOn_iff
code: theorem continuousOn_iff [PseudoMetricSpace β] {f : α → β} {s : Set α} :
    ContinuousOn f s ↔ ∀ b ∈ s, ∀ ε > 0, ∃ δ > 0, ∀ a ∈ s, dist a b < δ → dist (f a) (f b) < ε 
goal: ContinuousOn f s ↔ ∀ b ∈ s, ∀ ε > 0, ∃ δ > 0, ∀ a ∈ s, dist a b < δ → dist (f a) (f b) < ε

full_name: Metric.continuous_iff
code: theorem continuous_iff [PseudoMetricSpace β] {f : α → β} :
    Continuous f ↔ ∀ b, ∀ ε > 0, ∃ δ > 0, ∀ a, dist a b < δ → dist (f a) (f b) < ε 
goal: Continuous f ↔ ∀ (b : α), ∀ ε > 0, ∃ δ > 0, ∀ (a : α), dist a b < δ → dist (f a) (f b) < ε

full_name: Metric.tendsto_nhds
code: theorem tendsto_nhds {f : Filter β} {u : β → α} {a : α} :
    Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ x in f, dist (u x) a < ε 
goal: Filter.Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ (x : β) in f, dist (u x) a < ε

full_name: Metric.continuousAt_iff'
code: theorem continuousAt_iff' [TopologicalSpace β] {f : β → α} {b : β} :
    ContinuousAt f b ↔ ∀ ε > 0, ∀ᶠ x in 𝓝 b, dist (f x) (f b) < ε 
goal: ContinuousAt f b ↔ ∀ ε > 0, ∀ᶠ (x : β) in 𝓝 b, dist (f x) (f b) < ε

full_name: Metric.continuousWithinAt_iff'
code: theorem continuousWithinAt_iff' [TopologicalSpace β] {f : β → α} {b : β} {s : Set β} :
    ContinuousWithinAt f s b ↔ ∀ ε > 0, ∀ᶠ x in 𝓝[s] b, dist (f x) (f b) < ε 
goal: ContinuousWithinAt f s b ↔ ∀ ε > 0, ∀ᶠ (x : β) in 𝓝[s] b, dist (f x) (f b) < ε

full_name: Metric.continuousOn_iff'
code: theorem continuousOn_iff' [TopologicalSpace β] {f : β → α} {s : Set β} :
    ContinuousOn f s ↔ ∀ b ∈ s, ∀ ε > 0, ∀ᶠ x in 𝓝[s] b, dist (f x) (f b) < ε 
goal: ContinuousOn f s ↔ ∀ b ∈ s, ∀ ε > 0, ∀ᶠ (x : β) in 𝓝[s] b, dist (f x) (f b) < ε

full_name: Metric.continuous_iff'
code: theorem continuous_iff' [TopologicalSpace β] {f : β → α} :
    Continuous f ↔ ∀ (a), ∀ ε > 0, ∀ᶠ x in 𝓝 a, dist (f x) (f a) < ε 
goal: Continuous f ↔ ∀ (a : β), ∀ ε > 0, ∀ᶠ (x : β) in 𝓝 a, dist (f x) (f a) < ε

full_name: Metric.tendsto_atTop
code: theorem tendsto_atTop [Nonempty β] [SemilatticeSup β] {u : β → α} {a : α} :
    Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε 
goal: Filter.Tendsto u Filter.atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε

full_name: Metric.tendsto_atTop'
code: /-- A variant of `tendsto_atTop` that
uses `∃ N, ∀ n > N, ...` rather than `∃ N, ∀ n ≥ N, ...`
-/
theorem tendsto_atTop' [Nonempty β] [SemilatticeSup β] [NoMaxOrder β] {u : β → α} {a : α} :
    Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n > N, dist (u n) a < ε 
goal: Filter.Tendsto u Filter.atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n > N, dist (u n) a < ε

full_name: Metric.isOpen_singleton_iff
code: theorem isOpen_singleton_iff {α : Type*} [PseudoMetricSpace α] {x : α} :
    IsOpen ({x} : Set α) ↔ ∃ ε > 0, ∀ y, dist y x < ε → y = x 
goal: IsOpen {x} ↔ ∃ ε > 0, ∀ (y : α), dist y x < ε → y = x

full_name: Metric.exists_ball_inter_eq_singleton_of_mem_discrete
code: /-- Given a point `x` in a discrete subset `s` of a pseudometric space, there is an open ball
centered at `x` and intersecting `s` only at `x`. -/
theorem exists_ball_inter_eq_singleton_of_mem_discrete [DiscreteTopology s] {x : α} (hx : x ∈ s) :
    ∃ ε > 0, Metric.ball x ε ∩ s = {x} 
goal: ∃ ε > 0, Metric.ball x ε ∩ s = {x}

full_name: Metric.exists_closedBall_inter_eq_singleton_of_discrete
code: /-- Given a point `x` in a discrete subset `s` of a pseudometric space, there is a closed ball
of positive radius centered at `x` and intersecting `s` only at `x`. -/
theorem exists_closedBall_inter_eq_singleton_of_discrete [DiscreteTopology s] {x : α} (hx : x ∈ s) :
    ∃ ε > 0, Metric.closedBall x ε ∩ s = {x} 
goal: ∃ ε > 0, Metric.closedBall x ε ∩ s = {x}

full_name: Dense.exists_dist_lt
code: theorem _root_.Dense.exists_dist_lt {s : Set α} (hs : Dense s) (x : α) {ε : ℝ} (hε : 0 < ε) :
    ∃ y ∈ s, dist x y < ε 
goal: ∃ y ∈ s, dist x y < ε

full_name: DenseRange.exists_dist_lt
code: nonrec theorem _root_.DenseRange.exists_dist_lt {β : Type*} {f : β → α} (hf : DenseRange f) (x : α)
    {ε : ℝ} (hε : 0 < ε) : ∃ y, dist x (f y) < ε 
goal: ∃ y, dist x (f y) < ε

full_name: Metric.uniformSpace_eq_bot
code: /-- (Pseudo) metric space has discrete `UniformSpace` structure
iff the distances between distinct points are uniformly bounded away from zero. -/
protected lemma uniformSpace_eq_bot :
    ‹PseudoMetricSpace α›.toUniformSpace = ⊥ ↔
      ∃ r : ℝ, 0 < r ∧ Pairwise (r ≤ dist · · : α → α → Prop) 
goal: PseudoMetricSpace.toUniformSpace = ⊥ ↔ ∃ r, 0 < r ∧ Pairwise fun x x_1 => r ≤ dist x x_1

full_name: DiscreteTopology.of_forall_le_dist
code: /-- If the distances between distinct points in a (pseudo) metric space
are uniformly bounded away from zero, then the space has discrete topology. -/
lemma DiscreteTopology.of_forall_le_dist {α} [PseudoMetricSpace α] {r : ℝ} (hpos : 0 < r)
    (hr : Pairwise (r ≤ dist · · : α → α → Prop)) : DiscreteTopology α 
goal: DiscreteTopology α

full_name: Metric.uniformity_edist_aux
code: theorem Metric.uniformity_edist_aux {α} (d : α → α → ℝ≥0) :
    ⨅ ε > (0 : ℝ), 𝓟 { p : α × α | ↑(d p.1 p.2) < ε } =
      ⨅ ε > (0 : ℝ≥0∞), 𝓟 { p : α × α | ↑(d p.1 p.2) < ε } 
goal: ⨅ ε, ⨅ (_ : ε > 0), 𝓟 {p | ↑(d p.1 p.2) < ε} = ⨅ ε, ⨅ (_ : ε > 0), 𝓟 {p | ↑(d p.1 p.2) < ε}

full_name: Metric.uniformity_edist
code: theorem Metric.uniformity_edist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | edist p.1 p.2 < ε } 
goal: 𝓤 α = ⨅ ε, ⨅ (_ : ε > 0), 𝓟 {p | edist p.1 p.2 < ε}

full_name: PseudoMetricSpace.toPseudoEMetricSpace
code: /-- A pseudometric space induces a pseudoemetric space -/
instance (priority := 100) PseudoMetricSpace.toPseudoEMetricSpace : PseudoEMetricSpace α 
goal: PseudoEMetricSpace α

full_name: Metric.eball_top_eq_univ
code: /-- In a pseudometric space, an open ball of infinite radius is the whole space -/
theorem Metric.eball_top_eq_univ (x : α) : EMetric.ball x ∞ = Set.univ 
goal: EMetric.ball x ⊤ = Set.univ

full_name: Metric.emetric_ball
code: /-- Balls defined using the distance or the edistance coincide -/
@[simp]
theorem Metric.emetric_ball {x : α} {ε : ℝ} : EMetric.ball x (ENNReal.ofReal ε) = ball x ε 
goal: EMetric.ball x (ENNReal.ofReal ε) = Metric.ball x ε

full_name: Metric.emetric_ball_nnreal
code: /-- Balls defined using the distance or the edistance coincide -/
@[simp]
theorem Metric.emetric_ball_nnreal {x : α} {ε : ℝ≥0} : EMetric.ball x ε = ball x ε 
goal: EMetric.ball x ↑ε = Metric.ball x ↑ε

full_name: Metric.emetric_closedBall
code: /-- Closed balls defined using the distance or the edistance coincide -/
theorem Metric.emetric_closedBall {x : α} {ε : ℝ} (h : 0 ≤ ε) :
    EMetric.closedBall x (ENNReal.ofReal ε) = closedBall x ε 
goal: EMetric.closedBall x (ENNReal.ofReal ε) = Metric.closedBall x ε

full_name: Metric.emetric_closedBall_nnreal
code: /-- Closed balls defined using the distance or the edistance coincide -/
@[simp]
theorem Metric.emetric_closedBall_nnreal {x : α} {ε : ℝ≥0} :
    EMetric.closedBall x ε = closedBall x ε 
goal: EMetric.closedBall x ↑ε = Metric.closedBall x ↑ε

full_name: Metric.emetric_ball_top
code: @[simp]
theorem Metric.emetric_ball_top (x : α) : EMetric.ball x ⊤ = univ 
goal: EMetric.ball x ⊤ = Set.univ

full_name: Metric.inseparable_iff
code: theorem Metric.inseparable_iff {x y : α} : Inseparable x y ↔ dist x y = 0 
goal: Inseparable x y ↔ dist x y = 0

full_name: PseudoMetricSpace.replaceUniformity
code: /-- Build a new pseudometric space from an old one where the bundled uniform structure is provably
(but typically non-definitionaly) equal to some given uniform structure.
See Note [forgetful inheritance].
-/
abbrev PseudoMetricSpace.replaceUniformity {α} [U : UniformSpace α] (m : PseudoMetricSpace α)
    (H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : PseudoMetricSpace α 
goal: PseudoMetricSpace α

full_name: PseudoMetricSpace.replaceUniformity_eq
code: theorem PseudoMetricSpace.replaceUniformity_eq {α} [U : UniformSpace α] (m : PseudoMetricSpace α)
    (H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : m.replaceUniformity H = m 
goal: m.replaceUniformity H = m

full_name: PseudoMetricSpace.replaceTopology
code: /-- Build a new pseudo metric space from an old one where the bundled topological structure is
provably (but typically non-definitionaly) equal to some given topological structure.
See Note [forgetful inheritance].
-/
abbrev PseudoMetricSpace.replaceTopology {γ} [U : TopologicalSpace γ] (m : PseudoMetricSpace γ)
    (H : U = m.toUniformSpace.toTopologicalSpace) : PseudoMetricSpace γ 
goal: PseudoMetricSpace γ

full_name: PseudoMetricSpace.replaceTopology_eq
code: theorem PseudoMetricSpace.replaceTopology_eq {γ} [U : TopologicalSpace γ] (m : PseudoMetricSpace γ)
    (H : U = m.toUniformSpace.toTopologicalSpace) : m.replaceTopology H = m 
goal: m.replaceTopology H = m

full_name: PseudoEMetricSpace.toPseudoMetricSpaceOfDist
code: /-- One gets a pseudometric space from an emetric space if the edistance
is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the
uniformity are defeq in the pseudometric space and the pseudoemetric space. In this definition, the
distance is given separately, to be able to prescribe some expression which is not defeq to the
push-forward of the edistance to reals. See note [reducible non-instances]. -/
abbrev PseudoEMetricSpace.toPseudoMetricSpaceOfDist {α : Type u} [e : PseudoEMetricSpace α]
    (dist : α → α → ℝ) (edist_ne_top : ∀ x y : α, edist x y ≠ ⊤)
    (h : ∀ x y, dist x y = ENNReal.toReal (edist x y)) : PseudoMetricSpace α 
goal: PseudoMetricSpace α

full_name: PseudoEMetricSpace.toPseudoMetricSpace
code: /-- One gets a pseudometric space from an emetric space if the edistance
is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the
uniformity are defeq in the pseudometric space and the emetric space. -/
abbrev PseudoEMetricSpace.toPseudoMetricSpace {α : Type u} [PseudoEMetricSpace α]
    (h : ∀ x y : α, edist x y ≠ ⊤) : PseudoMetricSpace α 
goal: PseudoMetricSpace α

full_name: PseudoMetricSpace.replaceBornology
code: /-- Build a new pseudometric space from an old one where the bundled bornology structure is provably
(but typically non-definitionaly) equal to some given bornology structure.
See Note [forgetful inheritance].
-/
abbrev PseudoMetricSpace.replaceBornology {α} [B : Bornology α] (m : PseudoMetricSpace α)
    (H : ∀ s, @IsBounded _ B s ↔ @IsBounded _ PseudoMetricSpace.toBornology s) :
    PseudoMetricSpace α 
goal: PseudoMetricSpace α

full_name: PseudoMetricSpace.replaceBornology_eq
code: theorem PseudoMetricSpace.replaceBornology_eq {α} [m : PseudoMetricSpace α] [B : Bornology α]
    (H : ∀ s, @IsBounded _ B s ↔ @IsBounded _ PseudoMetricSpace.toBornology s) :
    PseudoMetricSpace.replaceBornology _ H = m 
goal: m.replaceBornology H = m

full_name: Real.pseudoMetricSpace
code: /-- Instantiate the reals as a pseudometric space. -/
instance Real.pseudoMetricSpace : PseudoMetricSpace ℝ 
goal: PseudoMetricSpace ℝ

full_name: Real.dist_eq
code: theorem Real.dist_eq (x y : ℝ) : dist x y = |x - y| 
goal: dist x y = |x - y|

full_name: Real.nndist_eq
code: theorem Real.nndist_eq (x y : ℝ) : nndist x y = Real.nnabs (x - y) 
goal: nndist x y = Real.nnabs (x - y)

full_name: Real.nndist_eq'
code: theorem Real.nndist_eq' (x y : ℝ) : nndist x y = Real.nnabs (y - x) 
goal: nndist x y = Real.nnabs (y - x)

full_name: Real.dist_0_eq_abs
code: theorem Real.dist_0_eq_abs (x : ℝ) : dist x 0 = |x| 
goal: dist x 0 = |x|

full_name: Real.sub_le_dist
code: theorem Real.sub_le_dist (x y : ℝ) : x - y ≤ dist x y 
goal: x - y ≤ dist x y

full_name: Real.ball_eq_Ioo
code: theorem Real.ball_eq_Ioo (x r : ℝ) : ball x r = Ioo (x - r) (x + r) 
goal: Metric.ball x r = Set.Ioo (x - r) (x + r)

full_name: Real.closedBall_eq_Icc
code: theorem Real.closedBall_eq_Icc {x r : ℝ} : closedBall x r = Icc (x - r) (x + r) 
goal: Metric.closedBall x r = Set.Icc (x - r) (x + r)

full_name: Real.Ioo_eq_ball
code: theorem Real.Ioo_eq_ball (x y : ℝ) : Ioo x y = ball ((x + y) / 2) ((y - x) / 2) 
goal: Set.Ioo x y = Metric.ball ((x + y) / 2) ((y - x) / 2)

full_name: Real.Icc_eq_closedBall
code: theorem Real.Icc_eq_closedBall (x y : ℝ) : Icc x y = closedBall ((x + y) / 2) ((y - x) / 2) 
goal: Set.Icc x y = Metric.closedBall ((x + y) / 2) ((y - x) / 2)

full_name: Metric.uniformity_eq_comap_nhds_zero
code: theorem Metric.uniformity_eq_comap_nhds_zero :
    𝓤 α = comap (fun p : α × α => dist p.1 p.2) (𝓝 (0 : ℝ)) 
goal: 𝓤 α = Filter.comap (fun p => dist p.1 p.2) (𝓝 0)

full_name: cauchySeq_iff_tendsto_dist_atTop_0
code: theorem cauchySeq_iff_tendsto_dist_atTop_0 [Nonempty β] [SemilatticeSup β] {u : β → α} :
    CauchySeq u ↔ Tendsto (fun n : β × β => dist (u n.1) (u n.2)) atTop (𝓝 0) 
goal: CauchySeq u ↔ Filter.Tendsto (fun n => dist (u n.1) (u n.2)) Filter.atTop (𝓝 0)

full_name: tendsto_uniformity_iff_dist_tendsto_zero
code: theorem tendsto_uniformity_iff_dist_tendsto_zero {f : ι → α × α} {p : Filter ι} :
    Tendsto f p (𝓤 α) ↔ Tendsto (fun x => dist (f x).1 (f x).2) p (𝓝 0) 
goal: Filter.Tendsto f p (𝓤 α) ↔ Filter.Tendsto (fun x => dist (f x).1 (f x).2) p (𝓝 0)

full_name: Filter.Tendsto.congr_dist
code: theorem Filter.Tendsto.congr_dist {f₁ f₂ : ι → α} {p : Filter ι} {a : α}
    (h₁ : Tendsto f₁ p (𝓝 a)) (h : Tendsto (fun x => dist (f₁ x) (f₂ x)) p (𝓝 0)) :
    Tendsto f₂ p (𝓝 a) 
goal: Filter.Tendsto f₂ p (𝓝 a)

full_name: tendsto_iff_of_dist
code: theorem tendsto_iff_of_dist {f₁ f₂ : ι → α} {p : Filter ι} {a : α}
    (h : Tendsto (fun x => dist (f₁ x) (f₂ x)) p (𝓝 0)) : Tendsto f₁ p (𝓝 a) ↔ Tendsto f₂ p (𝓝 a) 
goal: Filter.Tendsto f₁ p (𝓝 a) ↔ Filter.Tendsto f₂ p (𝓝 a)

full_name: dist_dist_dist_le_left
code: theorem dist_dist_dist_le_left (x y z : α) : dist (dist x z) (dist y z) ≤ dist x y 
goal: dist (dist x z) (dist y z) ≤ dist x y

full_name: dist_dist_dist_le_right
code: theorem dist_dist_dist_le_right (x y z : α) : dist (dist x y) (dist x z) ≤ dist y z 
goal: dist (dist x y) (dist x z) ≤ dist y z

full_name: dist_dist_dist_le
code: theorem dist_dist_dist_le (x y x' y' : α) : dist (dist x y) (dist x' y') ≤ dist x x' + dist y y' 
goal: dist (dist x y) (dist x' y') ≤ dist x x' + dist y y'

full_name: nhds_comap_dist
code: theorem nhds_comap_dist (a : α) : ((𝓝 (0 : ℝ)).comap (dist · a)) = 𝓝 a 
goal: Filter.comap (fun x => dist x a) (𝓝 0) = 𝓝 a

full_name: tendsto_iff_dist_tendsto_zero
code: theorem tendsto_iff_dist_tendsto_zero {f : β → α} {x : Filter β} {a : α} :
    Tendsto f x (𝓝 a) ↔ Tendsto (fun b => dist (f b) a) x (𝓝 0) 
goal: Filter.Tendsto f x (𝓝 a) ↔ Filter.Tendsto (fun b => dist (f b) a) x (𝓝 0)

full_name: Metric.ball_subset_interior_closedBall
code: theorem ball_subset_interior_closedBall : ball x ε ⊆ interior (closedBall x ε) 
goal: Metric.ball x ε ⊆ interior (Metric.closedBall x ε)

full_name: Metric.mem_closure_iff
code: /-- ε-characterization of the closure in pseudometric spaces-/
theorem mem_closure_iff {s : Set α} {a : α} : a ∈ closure s ↔ ∀ ε > 0, ∃ b ∈ s, dist a b < ε 
goal: a ∈ closure s ↔ ∀ ε > 0, ∃ b ∈ s, dist a b < ε

full_name: Metric.mem_closure_range_iff
code: theorem mem_closure_range_iff {e : β → α} {a : α} :
    a ∈ closure (range e) ↔ ∀ ε > 0, ∃ k : β, dist a (e k) < ε 
goal: a ∈ closure (Set.range e) ↔ ∀ ε > 0, ∃ k, dist a (e k) < ε

full_name: Metric.mem_closure_range_iff_nat
code: theorem mem_closure_range_iff_nat {e : β → α} {a : α} :
    a ∈ closure (range e) ↔ ∀ n : ℕ, ∃ k : β, dist a (e k) < 1 / ((n : ℝ) + 1) 
goal: a ∈ closure (Set.range e) ↔ ∀ (n : ℕ), ∃ k, dist a (e k) < 1 / (↑n + 1)

full_name: Metric.mem_of_closed'
code: theorem mem_of_closed' {s : Set α} (hs : IsClosed s) {a : α} :
    a ∈ s ↔ ∀ ε > 0, ∃ b ∈ s, dist a b < ε 
goal: a ∈ s ↔ ∀ ε > 0, ∃ b ∈ s, dist a b < ε

full_name: Metric.dense_iff
code: theorem dense_iff {s : Set α} : Dense s ↔ ∀ x, ∀ r > 0, (ball x r ∩ s).Nonempty 
goal: Dense s ↔ ∀ (x : α), ∀ r > 0, (Metric.ball x r ∩ s).Nonempty

full_name: Metric.denseRange_iff
code: theorem denseRange_iff {f : β → α} : DenseRange f ↔ ∀ x, ∀ r > 0, ∃ y, dist x (f y) < r 
goal: DenseRange f ↔ ∀ (x : α), ∀ r > 0, ∃ y, dist x (f y) < r

full_name: Inducing.isSeparable_preimage
code: /-- The preimage of a separable set by an inducing map is separable. -/
protected theorem _root_.Inducing.isSeparable_preimage {f : β → α} [TopologicalSpace β]
    (hf : Inducing f) {s : Set α} (hs : IsSeparable s) : IsSeparable (f ⁻¹' s) 
goal: TopologicalSpace.IsSeparable (f ⁻¹' s)

full_name: Embedding.isSeparable_preimage
code: protected theorem _root_.Embedding.isSeparable_preimage {f : β → α} [TopologicalSpace β]
    (hf : Embedding f) {s : Set α} (hs : IsSeparable s) : IsSeparable (f ⁻¹' s) 
goal: TopologicalSpace.IsSeparable (f ⁻¹' s)

full_name: ContinuousOn.isSeparable_image
code: /-- If a map is continuous on a separable set `s`, then the image of `s` is also separable. -/
theorem _root_.ContinuousOn.isSeparable_image [TopologicalSpace β] {f : α → β} {s : Set α}
    (hf : ContinuousOn f s) (hs : IsSeparable s) : IsSeparable (f '' s) 
goal: TopologicalSpace.IsSeparable (f '' s)

full_name: IsCompact.isSeparable
code: /-- A compact set is separable. -/
theorem IsCompact.isSeparable {s : Set α} (hs : IsCompact s) : IsSeparable s 
goal: TopologicalSpace.IsSeparable s

full_name: finite_cover_balls_of_compact
code: /-- Any compact set in a pseudometric space can be covered by finitely many balls of a given
positive radius -/
theorem finite_cover_balls_of_compact {α : Type u} [PseudoMetricSpace α] {s : Set α}
    (hs : IsCompact s) {e : ℝ} (he : 0 < e) :
    ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ x ∈ t, ball x e 
goal: ∃ t ⊆ s, t.Finite ∧ s ⊆ ⋃ x ∈ t, Metric.ball x e

full_name: Metric.secondCountable_of_almost_dense_set
code: /-- A pseudometric space is second countable if, for every `ε > 0`, there is a countable set which
is `ε`-dense. -/
theorem secondCountable_of_almost_dense_set
    (H : ∀ ε > (0 : ℝ), ∃ s : Set α, s.Countable ∧ ∀ x, ∃ y ∈ s, dist x y ≤ ε) :
    SecondCountableTopology α 
goal: SecondCountableTopology α

full_name: lebesgue_number_lemma_of_metric
code: theorem lebesgue_number_lemma_of_metric {s : Set α} {ι : Sort*} {c : ι → Set α} (hs : IsCompact s)
    (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : s ⊆ ⋃ i, c i) : ∃ δ > 0, ∀ x ∈ s, ∃ i, ball x δ ⊆ c i 
goal: ∃ δ > 0, ∀ x ∈ s, ∃ i, Metric.ball x δ ⊆ c i

full_name: lebesgue_number_lemma_of_metric_sUnion
code: theorem lebesgue_number_lemma_of_metric_sUnion {s : Set α} {c : Set (Set α)} (hs : IsCompact s)
    (hc₁ : ∀ t ∈ c, IsOpen t) (hc₂ : s ⊆ ⋃₀ c) : ∃ δ > 0, ∀ x ∈ s, ∃ t ∈ c, ball x δ ⊆ t 
goal: ∃ δ > 0, ∀ x ∈ s, ∃ t ∈ c, Metric.ball x δ ⊆ t