File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

full_name: EMetric.infEdist
code: /-- The minimal edistance of a point to a set -/
def infEdist (x : α) (s : Set α) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: EMetric.infEdist_empty
code: @[simp]
theorem infEdist_empty : infEdist x ∅ = ∞ 
goal: EMetric.infEdist x ∅ = ⊤

full_name: EMetric.le_infEdist
code: theorem le_infEdist {d} : d ≤ infEdist x s ↔ ∀ y ∈ s, d ≤ edist x y 
goal: d ≤ EMetric.infEdist x s ↔ ∀ y ∈ s, d ≤ edist x y

full_name: EMetric.infEdist_union
code: /-- The edist to a union is the minimum of the edists -/
@[simp]
theorem infEdist_union : infEdist x (s ∪ t) = infEdist x s ⊓ infEdist x t 
goal: EMetric.infEdist x (s ∪ t) = EMetric.infEdist x s ⊓ EMetric.infEdist x t

full_name: EMetric.infEdist_iUnion
code: @[simp]
theorem infEdist_iUnion (f : ι → Set α) (x : α) : infEdist x (⋃ i, f i) = ⨅ i, infEdist x (f i) 
goal: EMetric.infEdist x (⋃ i, f i) = ⨅ i, EMetric.infEdist x (f i)

full_name: EMetric.infEdist_biUnion
code: lemma infEdist_biUnion {ι : Type*} (f : ι → Set α) (I : Set ι) (x : α) :
    infEdist x (⋃ i ∈ I, f i) = ⨅ i ∈ I, infEdist x (f i) 
goal: EMetric.infEdist x (⋃ i ∈ I, f i) = ⨅ i ∈ I, EMetric.infEdist x (f i)

full_name: EMetric.infEdist_singleton
code: /-- The edist to a singleton is the edistance to the single point of this singleton -/
@[simp]
theorem infEdist_singleton : infEdist x {y} = edist x y 
goal: EMetric.infEdist x {y} = edist x y

full_name: EMetric.infEdist_le_edist_of_mem
code: /-- The edist to a set is bounded above by the edist to any of its points -/
theorem infEdist_le_edist_of_mem (h : y ∈ s) : infEdist x s ≤ edist x y 
goal: EMetric.infEdist x s ≤ edist x y

full_name: EMetric.infEdist_zero_of_mem
code: /-- If a point `x` belongs to `s`, then its edist to `s` vanishes -/
theorem infEdist_zero_of_mem (h : x ∈ s) : infEdist x s = 0 
goal: EMetric.infEdist x s = 0

full_name: EMetric.infEdist_anti
code: /-- The edist is antitone with respect to inclusion. -/
theorem infEdist_anti (h : s ⊆ t) : infEdist x t ≤ infEdist x s 
goal: EMetric.infEdist x t ≤ EMetric.infEdist x s

full_name: EMetric.infEdist_lt_iff
code: /-- The edist to a set is `< r` iff there exists a point in the set at edistance `< r` -/
theorem infEdist_lt_iff {r : ℝ≥0∞} : infEdist x s < r ↔ ∃ y ∈ s, edist x y < r 
goal: EMetric.infEdist x s < r ↔ ∃ y ∈ s, edist x y < r

full_name: EMetric.infEdist_le_infEdist_add_edist
code: /-- The edist of `x` to `s` is bounded by the sum of the edist of `y` to `s` and
the edist from `x` to `y` -/
theorem infEdist_le_infEdist_add_edist : infEdist x s ≤ infEdist y s + edist x y 
goal: EMetric.infEdist x s ≤ EMetric.infEdist y s + edist x y

full_name: EMetric.infEdist_le_edist_add_infEdist
code: theorem infEdist_le_edist_add_infEdist : infEdist x s ≤ edist x y + infEdist y s 
goal: EMetric.infEdist x s ≤ edist x y + EMetric.infEdist y s

full_name: EMetric.edist_le_infEdist_add_ediam
code: theorem edist_le_infEdist_add_ediam (hy : y ∈ s) : edist x y ≤ infEdist x s + diam s 
goal: edist x y ≤ EMetric.infEdist x s + EMetric.diam s

full_name: EMetric.continuous_infEdist
code: /-- The edist to a set depends continuously on the point -/
@[continuity]
theorem continuous_infEdist : Continuous fun x => infEdist x s 
goal: Continuous fun x => EMetric.infEdist x s

full_name: EMetric.infEdist_closure
code: /-- The edist to a set and to its closure coincide -/
theorem infEdist_closure : infEdist x (closure s) = infEdist x s 
goal: EMetric.infEdist x (closure s) = EMetric.infEdist x s

full_name: EMetric.mem_closure_iff_infEdist_zero
code: /-- A point belongs to the closure of `s` iff its infimum edistance to this set vanishes -/
theorem mem_closure_iff_infEdist_zero : x ∈ closure s ↔ infEdist x s = 0 
goal: x ∈ closure s ↔ EMetric.infEdist x s = 0

full_name: EMetric.mem_iff_infEdist_zero_of_closed
code: /-- Given a closed set `s`, a point belongs to `s` iff its infimum edistance to this set vanishes -/
theorem mem_iff_infEdist_zero_of_closed (h : IsClosed s) : x ∈ s ↔ infEdist x s = 0 
goal: x ∈ s ↔ EMetric.infEdist x s = 0

full_name: EMetric.infEdist_pos_iff_not_mem_closure
code: /-- The infimum edistance of a point to a set is positive if and only if the point is not in the
closure of the set. -/
theorem infEdist_pos_iff_not_mem_closure {x : α} {E : Set α} :
    0 < infEdist x E ↔ x ∉ closure E 
goal: 0 < EMetric.infEdist x E ↔ x ∉ closure E

full_name: EMetric.infEdist_closure_pos_iff_not_mem_closure
code: theorem infEdist_closure_pos_iff_not_mem_closure {x : α} {E : Set α} :
    0 < infEdist x (closure E) ↔ x ∉ closure E 
goal: 0 < EMetric.infEdist x (closure E) ↔ x ∉ closure E

full_name: EMetric.exists_real_pos_lt_infEdist_of_not_mem_closure
code: theorem exists_real_pos_lt_infEdist_of_not_mem_closure {x : α} {E : Set α} (h : x ∉ closure E) :
    ∃ ε : ℝ, 0 < ε ∧ ENNReal.ofReal ε < infEdist x E 
goal: ∃ ε, 0 < ε ∧ ENNReal.ofReal ε < EMetric.infEdist x E

full_name: EMetric.disjoint_closedBall_of_lt_infEdist
code: theorem disjoint_closedBall_of_lt_infEdist {r : ℝ≥0∞} (h : r < infEdist x s) :
    Disjoint (closedBall x r) s 
goal: Disjoint (EMetric.closedBall x r) s

full_name: EMetric.infEdist_image
code: /-- The infimum edistance is invariant under isometries -/
theorem infEdist_image (hΦ : Isometry Φ) : infEdist (Φ x) (Φ '' t) = infEdist x t 
goal: EMetric.infEdist (Φ x) (Φ '' t) = EMetric.infEdist x t

full_name: EMetric.infEdist_vadd
code: @[to_additive (attr := simp)]
theorem infEdist_smul {M} [SMul M α] [IsometricSMul M α] (c : M) (x : α) (s : Set α) :
    infEdist (c • x) (c • s) = infEdist x s 
goal: EMetric.infEdist (c +ᵥ x) (c +ᵥ s) = EMetric.infEdist x s

full_name: EMetric.infEdist_smul
code: @[to_additive (attr := simp)]
theorem infEdist_smul {M} [SMul M α] [IsometricSMul M α] (c : M) (x : α) (s : Set α) :
    infEdist (c • x) (c • s) = infEdist x s 
goal: EMetric.infEdist (c • x) (c • s) = EMetric.infEdist x s

full_name: IsOpen.exists_iUnion_isClosed
code: theorem _root_.IsOpen.exists_iUnion_isClosed {U : Set α} (hU : IsOpen U) :
    ∃ F : ℕ → Set α, (∀ n, IsClosed (F n)) ∧ (∀ n, F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F 
goal: ∃ F, (∀ (n : ℕ), IsClosed (F n)) ∧ (∀ (n : ℕ), F n ⊆ U) ∧ ⋃ n, F n = U ∧ Monotone F

full_name: IsCompact.exists_infEdist_eq_edist
code: theorem _root_.IsCompact.exists_infEdist_eq_edist (hs : IsCompact s) (hne : s.Nonempty) (x : α) :
    ∃ y ∈ s, infEdist x s = edist x y 
goal: ∃ y ∈ s, EMetric.infEdist x s = edist x y

full_name: EMetric.exists_pos_forall_lt_edist
code: theorem exists_pos_forall_lt_edist (hs : IsCompact s) (ht : IsClosed t) (hst : Disjoint s t) :
    ∃ r : ℝ≥0, 0 < r ∧ ∀ x ∈ s, ∀ y ∈ t, (r : ℝ≥0∞) < edist x y 
goal: ∃ r, 0 < r ∧ ∀ x ∈ s, ∀ y ∈ t, ↑r < edist x y

full_name: EMetric.definition._@.Mathlib.Topology.MetricSpace.HausdorffDistance._hyg.3065
code: /-- The Hausdorff edistance between two sets is the smallest `r` such that each set
is contained in the `r`-neighborhood of the other one -/
irreducible_def hausdorffEdist {α : Type u} [PseudoEMetricSpace α] (s t : Set α) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: EMetric.wrapped._@.Mathlib.Topology.MetricSpace.HausdorffDistance._hyg.3065
code: /-- The Hausdorff edistance between two sets is the smallest `r` such that each set
is contained in the `r`-neighborhood of the other one -/
irreducible_def hausdorffEdist {α : Type u} [PseudoEMetricSpace α] (s t : Set α) : ℝ≥0∞ 
goal: Subtype (Eq @EMetric.definition✝)

full_name: EMetric.hausdorffEdist
code: /-- The Hausdorff edistance between two sets is the smallest `r` such that each set
is contained in the `r`-neighborhood of the other one -/
irreducible_def hausdorffEdist {α : Type u} [PseudoEMetricSpace α] (s t : Set α) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: EMetric.hausdorffEdist_def
code: /-- The Hausdorff edistance between two sets is the smallest `r` such that each set
is contained in the `r`-neighborhood of the other one -/
irreducible_def hausdorffEdist {α : Type u} [PseudoEMetricSpace α] (s t : Set α) : ℝ≥0∞ 
goal: EMetric.hausdorffEdist s t = (⨆ x ∈ s, EMetric.infEdist x t) ⊔ ⨆ y ∈ t, EMetric.infEdist y s

full_name: EMetric.hausdorffEdist_self
code: /-- The Hausdorff edistance of a set to itself vanishes. -/
@[simp]
theorem hausdorffEdist_self : hausdorffEdist s s = 0 
goal: EMetric.hausdorffEdist s s = 0

full_name: EMetric.hausdorffEdist_comm
code: /-- The Haudorff edistances of `s` to `t` and of `t` to `s` coincide. -/
theorem hausdorffEdist_comm : hausdorffEdist s t = hausdorffEdist t s 
goal: EMetric.hausdorffEdist s t = EMetric.hausdorffEdist t s

full_name: EMetric.hausdorffEdist_le_of_infEdist
code: /-- Bounding the Hausdorff edistance by bounding the edistance of any point
in each set to the other set -/
theorem hausdorffEdist_le_of_infEdist {r : ℝ≥0∞} (H1 : ∀ x ∈ s, infEdist x t ≤ r)
    (H2 : ∀ x ∈ t, infEdist x s ≤ r) : hausdorffEdist s t ≤ r 
goal: EMetric.hausdorffEdist s t ≤ r

full_name: EMetric.hausdorffEdist_le_of_mem_edist
code: /-- Bounding the Hausdorff edistance by exhibiting, for any point in each set,
another point in the other set at controlled distance -/
theorem hausdorffEdist_le_of_mem_edist {r : ℝ≥0∞} (H1 : ∀ x ∈ s, ∃ y ∈ t, edist x y ≤ r)
    (H2 : ∀ x ∈ t, ∃ y ∈ s, edist x y ≤ r) : hausdorffEdist s t ≤ r 
goal: EMetric.hausdorffEdist s t ≤ r

full_name: EMetric.infEdist_le_hausdorffEdist_of_mem
code: /-- The distance to a set is controlled by the Hausdorff distance. -/
theorem infEdist_le_hausdorffEdist_of_mem (h : x ∈ s) : infEdist x t ≤ hausdorffEdist s t 
goal: EMetric.infEdist x t ≤ EMetric.hausdorffEdist s t

full_name: EMetric.exists_edist_lt_of_hausdorffEdist_lt
code: /-- If the Hausdorff distance is `< r`, then any point in one of the sets has
a corresponding point at distance `< r` in the other set. -/
theorem exists_edist_lt_of_hausdorffEdist_lt {r : ℝ≥0∞} (h : x ∈ s) (H : hausdorffEdist s t < r) :
    ∃ y ∈ t, edist x y < r 
goal: ∃ y ∈ t, edist x y < r

full_name: EMetric.infEdist_le_infEdist_add_hausdorffEdist
code: /-- The distance from `x` to `s` or `t` is controlled in terms of the Hausdorff distance
between `s` and `t`. -/
theorem infEdist_le_infEdist_add_hausdorffEdist :
    infEdist x t ≤ infEdist x s + hausdorffEdist s t 
goal: EMetric.infEdist x t ≤ EMetric.infEdist x s + EMetric.hausdorffEdist s t

full_name: EMetric.hausdorffEdist_image
code: /-- The Hausdorff edistance is invariant under isometries. -/
theorem hausdorffEdist_image (h : Isometry Φ) :
    hausdorffEdist (Φ '' s) (Φ '' t) = hausdorffEdist s t 
goal: EMetric.hausdorffEdist (Φ '' s) (Φ '' t) = EMetric.hausdorffEdist s t

full_name: EMetric.hausdorffEdist_le_ediam
code: /-- The Hausdorff distance is controlled by the diameter of the union. -/
theorem hausdorffEdist_le_ediam (hs : s.Nonempty) (ht : t.Nonempty) :
    hausdorffEdist s t ≤ diam (s ∪ t) 
goal: EMetric.hausdorffEdist s t ≤ EMetric.diam (s ∪ t)

full_name: EMetric.hausdorffEdist_triangle
code: /-- The Hausdorff distance satisfies the triangle inequality. -/
theorem hausdorffEdist_triangle : hausdorffEdist s u ≤ hausdorffEdist s t + hausdorffEdist t u 
goal: EMetric.hausdorffEdist s u ≤ EMetric.hausdorffEdist s t + EMetric.hausdorffEdist t u

full_name: EMetric.hausdorffEdist_zero_iff_closure_eq_closure
code: /-- Two sets are at zero Hausdorff edistance if and only if they have the same closure. -/
theorem hausdorffEdist_zero_iff_closure_eq_closure :
    hausdorffEdist s t = 0 ↔ closure s = closure t 
goal: EMetric.hausdorffEdist s t = 0 ↔ closure s = closure t

full_name: EMetric.hausdorffEdist_self_closure
code: /-- The Hausdorff edistance between a set and its closure vanishes. -/
@[simp]
theorem hausdorffEdist_self_closure : hausdorffEdist s (closure s) = 0 
goal: EMetric.hausdorffEdist s (closure s) = 0

full_name: EMetric.hausdorffEdist_closure₁
code: /-- Replacing a set by its closure does not change the Hausdorff edistance. -/
@[simp]
theorem hausdorffEdist_closure₁ : hausdorffEdist (closure s) t = hausdorffEdist s t 
goal: EMetric.hausdorffEdist (closure s) t = EMetric.hausdorffEdist s t

full_name: EMetric.hausdorffEdist_closure₂
code: /-- Replacing a set by its closure does not change the Hausdorff edistance. -/
@[simp]
theorem hausdorffEdist_closure₂ : hausdorffEdist s (closure t) = hausdorffEdist s t 
goal: EMetric.hausdorffEdist s (closure t) = EMetric.hausdorffEdist s t

full_name: EMetric.hausdorffEdist_closure
code: /-- The Hausdorff edistance between sets or their closures is the same. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem hausdorffEdist_closure : hausdorffEdist (closure s) (closure t) = hausdorffEdist s t 
goal: EMetric.hausdorffEdist (closure s) (closure t) = EMetric.hausdorffEdist s t

full_name: EMetric.hausdorffEdist_zero_iff_eq_of_closed
code: /-- Two closed sets are at zero Hausdorff edistance if and only if they coincide. -/
theorem hausdorffEdist_zero_iff_eq_of_closed (hs : IsClosed s) (ht : IsClosed t) :
    hausdorffEdist s t = 0 ↔ s = t 
goal: EMetric.hausdorffEdist s t = 0 ↔ s = t

full_name: EMetric.hausdorffEdist_empty
code: /-- The Haudorff edistance to the empty set is infinite. -/
theorem hausdorffEdist_empty (ne : s.Nonempty) : hausdorffEdist s ∅ = ∞ 
goal: EMetric.hausdorffEdist s ∅ = ⊤

full_name: EMetric.nonempty_of_hausdorffEdist_ne_top
code: /-- If a set is at finite Hausdorff edistance of a nonempty set, it is nonempty. -/
theorem nonempty_of_hausdorffEdist_ne_top (hs : s.Nonempty) (fin : hausdorffEdist s t ≠ ⊤) :
    t.Nonempty 
goal: t.Nonempty

full_name: EMetric.empty_or_nonempty_of_hausdorffEdist_ne_top
code: theorem empty_or_nonempty_of_hausdorffEdist_ne_top (fin : hausdorffEdist s t ≠ ⊤) :
    (s = ∅ ∧ t = ∅) ∨ (s.Nonempty ∧ t.Nonempty) 
goal: s = ∅ ∧ t = ∅ ∨ s.Nonempty ∧ t.Nonempty

full_name: Metric.infDist
code: /-- The minimal distance of a point to a set -/
def infDist (x : α) (s : Set α) : ℝ 
goal: ℝ

full_name: Metric.infDist_eq_iInf
code: theorem infDist_eq_iInf : infDist x s = ⨅ y : s, dist x y 
goal: Metric.infDist x s = ⨅ y, dist x ↑y

full_name: Metric.infDist_nonneg
code: /-- The minimal distance is always nonnegative -/
theorem infDist_nonneg : 0 ≤ infDist x s 
goal: 0 ≤ Metric.infDist x s

full_name: Metric.infDist_empty
code: /-- The minimal distance to the empty set is 0 (if you want to have the more reasonable
value `∞` instead, use `EMetric.infEdist`, which takes values in `ℝ≥0∞`) -/
@[simp]
theorem infDist_empty : infDist x ∅ = 0 
goal: Metric.infDist x ∅ = 0

full_name: Metric.infEdist_ne_top
code: /-- In a metric space, the minimal edistance to a nonempty set is finite. -/
theorem infEdist_ne_top (h : s.Nonempty) : infEdist x s ≠ ⊤ 
goal: EMetric.infEdist x s ≠ ⊤

full_name: Metric.infEdist_eq_top_iff
code: theorem infEdist_eq_top_iff : infEdist x s = ∞ ↔ s = ∅ 
goal: EMetric.infEdist x s = ⊤ ↔ s = ∅

full_name: Metric.infDist_zero_of_mem
code: /-- The minimal distance of a point to a set containing it vanishes. -/
theorem infDist_zero_of_mem (h : x ∈ s) : infDist x s = 0 
goal: Metric.infDist x s = 0

full_name: Metric.infDist_singleton
code: /-- The minimal distance to a singleton is the distance to the unique point in this singleton. -/
@[simp]
theorem infDist_singleton : infDist x {y} = dist x y 
goal: Metric.infDist x {y} = dist x y

full_name: Metric.infDist_le_dist_of_mem
code: /-- The minimal distance to a set is bounded by the distance to any point in this set. -/
theorem infDist_le_dist_of_mem (h : y ∈ s) : infDist x s ≤ dist x y 
goal: Metric.infDist x s ≤ dist x y

full_name: Metric.infDist_le_infDist_of_subset
code: /-- The minimal distance is monotone with respect to inclusion. -/
theorem infDist_le_infDist_of_subset (h : s ⊆ t) (hs : s.Nonempty) : infDist x t ≤ infDist x s 
goal: Metric.infDist x t ≤ Metric.infDist x s

full_name: Metric.infDist_lt_iff
code: /-- The minimal distance to a set `s` is `< r` iff there exists a point in `s` at distance `< r`. -/
theorem infDist_lt_iff {r : ℝ} (hs : s.Nonempty) : infDist x s < r ↔ ∃ y ∈ s, dist x y < r 
goal: Metric.infDist x s < r ↔ ∃ y ∈ s, dist x y < r

full_name: Metric.infDist_le_infDist_add_dist
code: /-- The minimal distance from `x` to `s` is bounded by the distance from `y` to `s`, modulo
the distance between `x` and `y`. -/
theorem infDist_le_infDist_add_dist : infDist x s ≤ infDist y s + dist x y 
goal: Metric.infDist x s ≤ Metric.infDist y s + dist x y

full_name: Metric.not_mem_of_dist_lt_infDist
code: theorem not_mem_of_dist_lt_infDist (h : dist x y < infDist x s) : y ∉ s 
goal: y ∉ s

full_name: Metric.disjoint_ball_infDist
code: theorem disjoint_ball_infDist : Disjoint (ball x (infDist x s)) s 
goal: Disjoint (Metric.ball x (Metric.infDist x s)) s

full_name: Metric.ball_infDist_subset_compl
code: theorem ball_infDist_subset_compl : ball x (infDist x s) ⊆ sᶜ 
goal: Metric.ball x (Metric.infDist x s) ⊆ sᶜ

full_name: Metric.ball_infDist_compl_subset
code: theorem ball_infDist_compl_subset : ball x (infDist x sᶜ) ⊆ s 
goal: Metric.ball x (Metric.infDist x sᶜ) ⊆ s

full_name: Metric.disjoint_closedBall_of_lt_infDist
code: theorem disjoint_closedBall_of_lt_infDist {r : ℝ} (h : r < infDist x s) :
    Disjoint (closedBall x r) s 
goal: Disjoint (Metric.closedBall x r) s

full_name: Metric.dist_le_infDist_add_diam
code: theorem dist_le_infDist_add_diam (hs : IsBounded s) (hy : y ∈ s) :
    dist x y ≤ infDist x s + diam s 
goal: dist x y ≤ Metric.infDist x s + Metric.diam s

full_name: Metric.lipschitz_infDist_pt
code: /-- The minimal distance to a set is Lipschitz in point with constant 1 -/
theorem lipschitz_infDist_pt : LipschitzWith 1 (infDist · s) 
goal: LipschitzWith 1 fun x => Metric.infDist x s

full_name: Metric.uniformContinuous_infDist_pt
code: /-- The minimal distance to a set is uniformly continuous in point -/
theorem uniformContinuous_infDist_pt : UniformContinuous (infDist · s) 
goal: UniformContinuous fun x => Metric.infDist x s

full_name: Metric.continuous_infDist_pt
code: /-- The minimal distance to a set is continuous in point -/
@[continuity]
theorem continuous_infDist_pt : Continuous (infDist · s) 
goal: Continuous fun x => Metric.infDist x s

full_name: Metric.infDist_closure
code: /-- The minimal distances to a set and its closure coincide. -/
theorem infDist_closure : infDist x (closure s) = infDist x s 
goal: Metric.infDist x (closure s) = Metric.infDist x s

full_name: Metric.infDist_zero_of_mem_closure
code: /-- If a point belongs to the closure of `s`, then its infimum distance to `s` equals zero.
The converse is true provided that `s` is nonempty, see `Metric.mem_closure_iff_infDist_zero`. -/
theorem infDist_zero_of_mem_closure (hx : x ∈ closure s) : infDist x s = 0 
goal: Metric.infDist x s = 0

full_name: Metric.mem_closure_iff_infDist_zero
code: /-- A point belongs to the closure of `s` iff its infimum distance to this set vanishes. -/
theorem mem_closure_iff_infDist_zero (h : s.Nonempty) : x ∈ closure s ↔ infDist x s = 0 
goal: x ∈ closure s ↔ Metric.infDist x s = 0

full_name: IsClosed.mem_iff_infDist_zero
code: /-- Given a closed set `s`, a point belongs to `s` iff its infimum distance to this set vanishes -/
theorem _root_.IsClosed.mem_iff_infDist_zero (h : IsClosed s) (hs : s.Nonempty) :
    x ∈ s ↔ infDist x s = 0 
goal: x ∈ s ↔ Metric.infDist x s = 0

full_name: IsClosed.not_mem_iff_infDist_pos
code: /-- Given a closed set `s`, a point belongs to `s` iff its infimum distance to this set vanishes. -/
theorem _root_.IsClosed.not_mem_iff_infDist_pos (h : IsClosed s) (hs : s.Nonempty) :
    x ∉ s ↔ 0 < infDist x s 
goal: x ∉ s ↔ 0 < Metric.infDist x s

full_name: Metric.continuousAt_inv_infDist_pt
code: theorem continuousAt_inv_infDist_pt (h : x ∉ closure s) :
    ContinuousAt (fun x ↦ (infDist x s)⁻¹) x 
goal: ContinuousAt (fun x => (Metric.infDist x s)⁻¹) x

full_name: Metric.infDist_image
code: /-- The infimum distance is invariant under isometries. -/
theorem infDist_image (hΦ : Isometry Φ) : infDist (Φ x) (Φ '' t) = infDist x t 
goal: Metric.infDist (Φ x) (Φ '' t) = Metric.infDist x t

full_name: Metric.infDist_inter_closedBall_of_mem
code: theorem infDist_inter_closedBall_of_mem (h : y ∈ s) :
    infDist x (s ∩ closedBall x (dist y x)) = infDist x s 
goal: Metric.infDist x (s ∩ Metric.closedBall x (dist y x)) = Metric.infDist x s

full_name: IsCompact.exists_infDist_eq_dist
code: theorem _root_.IsCompact.exists_infDist_eq_dist (h : IsCompact s) (hne : s.Nonempty) (x : α) :
    ∃ y ∈ s, infDist x s = dist x y 
goal: ∃ y ∈ s, Metric.infDist x s = dist x y

full_name: IsClosed.exists_infDist_eq_dist
code: theorem _root_.IsClosed.exists_infDist_eq_dist [ProperSpace α] (h : IsClosed s) (hne : s.Nonempty)
    (x : α) : ∃ y ∈ s, infDist x s = dist x y 
goal: ∃ y ∈ s, Metric.infDist x s = dist x y

full_name: Metric.exists_mem_closure_infDist_eq_dist
code: theorem exists_mem_closure_infDist_eq_dist [ProperSpace α] (hne : s.Nonempty) (x : α) :
    ∃ y ∈ closure s, infDist x s = dist x y 
goal: ∃ y ∈ closure s, Metric.infDist x s = dist x y

full_name: Metric.infNndist
code: /-- The minimal distance of a point to a set as a `ℝ≥0` -/
def infNndist (x : α) (s : Set α) : ℝ≥0 
goal: ℝ≥0

full_name: Metric.coe_infNndist
code: @[simp]
theorem coe_infNndist : (infNndist x s : ℝ) = infDist x s 
goal: ↑(Metric.infNndist x s) = Metric.infDist x s

full_name: Metric.lipschitz_infNndist_pt
code: /-- The minimal distance to a set (as `ℝ≥0`) is Lipschitz in point with constant 1 -/
theorem lipschitz_infNndist_pt (s : Set α) : LipschitzWith 1 fun x => infNndist x s 
goal: LipschitzWith 1 fun x => Metric.infNndist x s

full_name: Metric.uniformContinuous_infNndist_pt
code: /-- The minimal distance to a set (as `ℝ≥0`) is uniformly continuous in point -/
theorem uniformContinuous_infNndist_pt (s : Set α) : UniformContinuous fun x => infNndist x s 
goal: UniformContinuous fun x => Metric.infNndist x s

full_name: Metric.continuous_infNndist_pt
code: /-- The minimal distance to a set (as `ℝ≥0`) is continuous in point -/
theorem continuous_infNndist_pt (s : Set α) : Continuous fun x => infNndist x s 
goal: Continuous fun x => Metric.infNndist x s

full_name: Metric.hausdorffDist
code: /-- The Hausdorff distance between two sets is the smallest nonnegative `r` such that each set is
included in the `r`-neighborhood of the other. If there is no such `r`, it is defined to
be `0`, arbitrarily. -/
def hausdorffDist (s t : Set α) : ℝ 
goal: ℝ

full_name: Metric.hausdorffDist_nonneg
code: /-- The Hausdorff distance is nonnegative. -/
theorem hausdorffDist_nonneg : 0 ≤ hausdorffDist s t 
goal: 0 ≤ Metric.hausdorffDist s t

full_name: Metric.hausdorffEdist_ne_top_of_nonempty_of_bounded
code: /-- If two sets are nonempty and bounded in a metric space, they are at finite Hausdorff
edistance. -/
theorem hausdorffEdist_ne_top_of_nonempty_of_bounded (hs : s.Nonempty) (ht : t.Nonempty)
    (bs : IsBounded s) (bt : IsBounded t) : hausdorffEdist s t ≠ ⊤ 
goal: EMetric.hausdorffEdist s t ≠ ⊤

full_name: Metric.hausdorffDist_self_zero
code: /-- The Hausdorff distance between a set and itself is zero. -/
@[simp]
theorem hausdorffDist_self_zero : hausdorffDist s s = 0 
goal: Metric.hausdorffDist s s = 0

full_name: Metric.hausdorffDist_comm
code: /-- The Hausdorff distances from `s` to `t` and from `t` to `s` coincide. -/
theorem hausdorffDist_comm : hausdorffDist s t = hausdorffDist t s 
goal: Metric.hausdorffDist s t = Metric.hausdorffDist t s

full_name: Metric.hausdorffDist_empty
code: /-- The Hausdorff distance to the empty set vanishes (if you want to have the more reasonable
value `∞` instead, use `EMetric.hausdorffEdist`, which takes values in `ℝ≥0∞`). -/
@[simp]
theorem hausdorffDist_empty : hausdorffDist s ∅ = 0 
goal: Metric.hausdorffDist s ∅ = 0

full_name: Metric.hausdorffDist_empty'
code: /-- The Hausdorff distance to the empty set vanishes (if you want to have the more reasonable
value `∞` instead, use `EMetric.hausdorffEdist`, which takes values in `ℝ≥0∞`). -/
@[simp]
theorem hausdorffDist_empty' : hausdorffDist ∅ s = 0 
goal: Metric.hausdorffDist ∅ s = 0

full_name: Metric.hausdorffDist_le_of_infDist
code: /-- Bounding the Hausdorff distance by bounding the distance of any point
in each set to the other set -/
theorem hausdorffDist_le_of_infDist {r : ℝ} (hr : 0 ≤ r) (H1 : ∀ x ∈ s, infDist x t ≤ r)
    (H2 : ∀ x ∈ t, infDist x s ≤ r) : hausdorffDist s t ≤ r 
goal: Metric.hausdorffDist s t ≤ r

full_name: Metric.hausdorffDist_le_of_mem_dist
code: /-- Bounding the Hausdorff distance by exhibiting, for any point in each set,
another point in the other set at controlled distance -/
theorem hausdorffDist_le_of_mem_dist {r : ℝ} (hr : 0 ≤ r) (H1 : ∀ x ∈ s, ∃ y ∈ t, dist x y ≤ r)
    (H2 : ∀ x ∈ t, ∃ y ∈ s, dist x y ≤ r) : hausdorffDist s t ≤ r 
goal: Metric.hausdorffDist s t ≤ r

full_name: Metric.hausdorffDist_le_diam
code: /-- The Hausdorff distance is controlled by the diameter of the union. -/
theorem hausdorffDist_le_diam (hs : s.Nonempty) (bs : IsBounded s) (ht : t.Nonempty)
    (bt : IsBounded t) : hausdorffDist s t ≤ diam (s ∪ t) 
goal: Metric.hausdorffDist s t ≤ Metric.diam (s ∪ t)

full_name: Metric.infDist_le_hausdorffDist_of_mem
code: /-- The distance to a set is controlled by the Hausdorff distance. -/
theorem infDist_le_hausdorffDist_of_mem (hx : x ∈ s) (fin : hausdorffEdist s t ≠ ⊤) :
    infDist x t ≤ hausdorffDist s t 
goal: Metric.infDist x t ≤ Metric.hausdorffDist s t

full_name: Metric.exists_dist_lt_of_hausdorffDist_lt
code: /-- If the Hausdorff distance is `< r`, any point in one of the sets is at distance
`< r` of a point in the other set. -/
theorem exists_dist_lt_of_hausdorffDist_lt {r : ℝ} (h : x ∈ s) (H : hausdorffDist s t < r)
    (fin : hausdorffEdist s t ≠ ⊤) : ∃ y ∈ t, dist x y < r 
goal: ∃ y ∈ t, dist x y < r

full_name: Metric.exists_dist_lt_of_hausdorffDist_lt'
code: /-- If the Hausdorff distance is `< r`, any point in one of the sets is at distance
`< r` of a point in the other set. -/
theorem exists_dist_lt_of_hausdorffDist_lt' {r : ℝ} (h : y ∈ t) (H : hausdorffDist s t < r)
    (fin : hausdorffEdist s t ≠ ⊤) : ∃ x ∈ s, dist x y < r 
goal: ∃ x ∈ s, dist x y < r

full_name: Metric.infDist_le_infDist_add_hausdorffDist
code: /-- The infimum distance to `s` and `t` are the same, up to the Hausdorff distance
between `s` and `t` -/
theorem infDist_le_infDist_add_hausdorffDist (fin : hausdorffEdist s t ≠ ⊤) :
    infDist x t ≤ infDist x s + hausdorffDist s t 
goal: Metric.infDist x t ≤ Metric.infDist x s + Metric.hausdorffDist s t

full_name: Metric.hausdorffDist_image
code: /-- The Hausdorff distance is invariant under isometries. -/
theorem hausdorffDist_image (h : Isometry Φ) :
    hausdorffDist (Φ '' s) (Φ '' t) = hausdorffDist s t 
goal: Metric.hausdorffDist (Φ '' s) (Φ '' t) = Metric.hausdorffDist s t

full_name: Metric.hausdorffDist_triangle
code: /-- The Hausdorff distance satisfies the triangle inequality. -/
theorem hausdorffDist_triangle (fin : hausdorffEdist s t ≠ ⊤) :
    hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u 
goal: Metric.hausdorffDist s u ≤ Metric.hausdorffDist s t + Metric.hausdorffDist t u

full_name: Metric.hausdorffDist_triangle'
code: /-- The Hausdorff distance satisfies the triangle inequality. -/
theorem hausdorffDist_triangle' (fin : hausdorffEdist t u ≠ ⊤) :
    hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u 
goal: Metric.hausdorffDist s u ≤ Metric.hausdorffDist s t + Metric.hausdorffDist t u

full_name: Metric.hausdorffDist_self_closure
code: /-- The Hausdorff distance between a set and its closure vanishes. -/
@[simp]
theorem hausdorffDist_self_closure : hausdorffDist s (closure s) = 0 
goal: Metric.hausdorffDist s (closure s) = 0

full_name: Metric.hausdorffDist_closure₁
code: /-- Replacing a set by its closure does not change the Hausdorff distance. -/
@[simp]
theorem hausdorffDist_closure₁ : hausdorffDist (closure s) t = hausdorffDist s t 
goal: Metric.hausdorffDist (closure s) t = Metric.hausdorffDist s t

full_name: Metric.hausdorffDist_closure₂
code: /-- Replacing a set by its closure does not change the Hausdorff distance. -/
@[simp]
theorem hausdorffDist_closure₂ : hausdorffDist s (closure t) = hausdorffDist s t 
goal: Metric.hausdorffDist s (closure t) = Metric.hausdorffDist s t

full_name: Metric.hausdorffDist_closure
code: /-- The Hausdorff distances between two sets and their closures coincide. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem hausdorffDist_closure : hausdorffDist (closure s) (closure t) = hausdorffDist s t 
goal: Metric.hausdorffDist (closure s) (closure t) = Metric.hausdorffDist s t

full_name: Metric.hausdorffDist_zero_iff_closure_eq_closure
code: /-- Two sets are at zero Hausdorff distance if and only if they have the same closures. -/
theorem hausdorffDist_zero_iff_closure_eq_closure (fin : hausdorffEdist s t ≠ ⊤) :
    hausdorffDist s t = 0 ↔ closure s = closure t 
goal: Metric.hausdorffDist s t = 0 ↔ closure s = closure t

full_name: IsClosed.hausdorffDist_zero_iff_eq
code: /-- Two closed sets are at zero Hausdorff distance if and only if they coincide. -/
theorem _root_.IsClosed.hausdorffDist_zero_iff_eq (hs : IsClosed s) (ht : IsClosed t)
    (fin : hausdorffEdist s t ≠ ⊤) : hausdorffDist s t = 0 ↔ s = t 
goal: Metric.hausdorffDist s t = 0 ↔ s = t