File: Mathlib/Topology/MetricSpace/Bounded.lean

full_name: Metric.isBounded_closedBall
code: /-- Closed balls are bounded -/
theorem isBounded_closedBall : IsBounded (closedBall x r) 
goal: Bornology.IsBounded (Metric.closedBall x r)

full_name: Metric.isBounded_ball
code: /-- Open balls are bounded -/
theorem isBounded_ball : IsBounded (ball x r) 
goal: Bornology.IsBounded (Metric.ball x r)

full_name: Metric.isBounded_sphere
code: /-- Spheres are bounded -/
theorem isBounded_sphere : IsBounded (sphere x r) 
goal: Bornology.IsBounded (Metric.sphere x r)

full_name: Metric.isBounded_iff_subset_closedBall
code: /-- Given a point, a bounded subset is included in some ball around this point -/
theorem isBounded_iff_subset_closedBall (c : α) : IsBounded s ↔ ∃ r, s ⊆ closedBall c r 
goal: Bornology.IsBounded s ↔ ∃ r, s ⊆ Metric.closedBall c r

full_name: Bornology.IsBounded.subset_closedBall
code: theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : α) :
    ∃ r, s ⊆ closedBall c r 
goal: ∃ r, s ⊆ Metric.closedBall c r

full_name: Bornology.IsBounded.subset_ball_lt
code: theorem _root_.Bornology.IsBounded.subset_ball_lt (h : IsBounded s) (a : ℝ) (c : α) :
    ∃ r, a < r ∧ s ⊆ ball c r 
goal: ∃ r, a < r ∧ s ⊆ Metric.ball c r

full_name: Bornology.IsBounded.subset_ball
code: theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : α) : ∃ r, s ⊆ ball c r 
goal: ∃ r, s ⊆ Metric.ball c r

full_name: Metric.isBounded_iff_subset_ball
code: theorem isBounded_iff_subset_ball (c : α) : IsBounded s ↔ ∃ r, s ⊆ ball c r 
goal: Bornology.IsBounded s ↔ ∃ r, s ⊆ Metric.ball c r

full_name: Bornology.IsBounded.subset_closedBall_lt
code: theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : α) :
    ∃ r, a < r ∧ s ⊆ closedBall c r 
goal: ∃ r, a < r ∧ s ⊆ Metric.closedBall c r

full_name: Metric.isBounded_closure_of_isBounded
code: theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s) 
goal: Bornology.IsBounded (closure s)

full_name: Bornology.IsBounded.closure
code: protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s) 
goal: Bornology.IsBounded (closure s)

full_name: Metric.isBounded_closure_iff
code: @[simp]
theorem isBounded_closure_iff : IsBounded (closure s) ↔ IsBounded s 
goal: Bornology.IsBounded (closure s) ↔ Bornology.IsBounded s

full_name: Metric.hasBasis_cobounded_compl_closedBall
code: theorem hasBasis_cobounded_compl_closedBall (c : α) :
    (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (closedBall c r)ᶜ) 
goal: (Bornology.cobounded α).HasBasis (fun x => True) fun r => (Metric.closedBall c r)ᶜ

full_name: Metric.hasBasis_cobounded_compl_ball
code: theorem hasBasis_cobounded_compl_ball (c : α) :
    (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (ball c r)ᶜ) 
goal: (Bornology.cobounded α).HasBasis (fun x => True) fun r => (Metric.ball c r)ᶜ

full_name: Metric.comap_dist_right_atTop
code: @[simp]
theorem comap_dist_right_atTop (c : α) : comap (dist · c) atTop = cobounded α 
goal: Filter.comap (fun x => dist x c) Filter.atTop = Bornology.cobounded α

full_name: Metric.comap_dist_left_atTop
code: @[simp]
theorem comap_dist_left_atTop (c : α) : comap (dist c) atTop = cobounded α 
goal: Filter.comap (dist c) Filter.atTop = Bornology.cobounded α

full_name: Metric.tendsto_dist_right_atTop_iff
code: @[simp]
theorem tendsto_dist_right_atTop_iff (c : α) {f : β → α} {l : Filter β} :
    Tendsto (fun x ↦ dist (f x) c) l atTop ↔ Tendsto f l (cobounded α) 
goal: Filter.Tendsto (fun x => dist (f x) c) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded α)

full_name: Metric.tendsto_dist_left_atTop_iff
code: @[simp]
theorem tendsto_dist_left_atTop_iff (c : α) {f : β → α} {l : Filter β} :
    Tendsto (fun x ↦ dist c (f x)) l atTop ↔ Tendsto f l (cobounded α) 
goal: Filter.Tendsto (fun x => dist c (f x)) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded α)

full_name: Metric.tendsto_dist_right_cobounded_atTop
code: theorem tendsto_dist_right_cobounded_atTop (c : α) : Tendsto (dist · c) (cobounded α) atTop 
goal: Filter.Tendsto (fun x => dist x c) (Bornology.cobounded α) Filter.atTop

full_name: Metric.tendsto_dist_left_cobounded_atTop
code: theorem tendsto_dist_left_cobounded_atTop (c : α) : Tendsto (dist c) (cobounded α) atTop 
goal: Filter.Tendsto (dist c) (Bornology.cobounded α) Filter.atTop

full_name: TotallyBounded.isBounded
code: /-- A totally bounded set is bounded -/
theorem _root_.TotallyBounded.isBounded {s : Set α} (h : TotallyBounded s) : IsBounded s 
goal: Bornology.IsBounded s

full_name: IsCompact.isBounded
code: /-- A compact set is bounded -/
theorem _root_.IsCompact.isBounded {s : Set α} (h : IsCompact s) : IsBounded s 
goal: Bornology.IsBounded s

full_name: Metric.cobounded_le_cocompact
code: theorem cobounded_le_cocompact : cobounded α ≤ cocompact α 
goal: Bornology.cobounded α ≤ Filter.cocompact α

full_name: Metric.isCobounded_iff_closedBall_compl_subset
code: theorem isCobounded_iff_closedBall_compl_subset {s : Set α} (c : α) :
    IsCobounded s ↔ ∃ (r : ℝ), (Metric.closedBall c r)ᶜ ⊆ s 
goal: Bornology.IsCobounded s ↔ ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

full_name: Bornology.IsCobounded.closedBall_compl_subset
code: theorem _root_.Bornology.IsCobounded.closedBall_compl_subset {s : Set α} (hs : IsCobounded s)
    (c : α) : ∃ (r : ℝ), (Metric.closedBall c r)ᶜ ⊆ s 
goal: ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

full_name: Metric.closedBall_compl_subset_of_mem_cocompact
code: theorem closedBall_compl_subset_of_mem_cocompact {s : Set α} (hs : s ∈ cocompact α) (c : α) :
    ∃ (r : ℝ), (Metric.closedBall c r)ᶜ ⊆ s 
goal: ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

full_name: Metric.mem_cocompact_of_closedBall_compl_subset
code: theorem mem_cocompact_of_closedBall_compl_subset [ProperSpace α] (c : α)
    (h : ∃ r, (closedBall c r)ᶜ ⊆ s) : s ∈ cocompact α 
goal: s ∈ Filter.cocompact α

full_name: Metric.mem_cocompact_iff_closedBall_compl_subset
code: theorem mem_cocompact_iff_closedBall_compl_subset [ProperSpace α] (c : α) :
    s ∈ cocompact α ↔ ∃ r, (closedBall c r)ᶜ ⊆ s 
goal: s ∈ Filter.cocompact α ↔ ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

full_name: Metric.isBounded_range_iff
code: /-- Characterization of the boundedness of the range of a function -/
theorem isBounded_range_iff {f : β → α} : IsBounded (range f) ↔ ∃ C, ∀ x y, dist (f x) (f y) ≤ C 
goal: Bornology.IsBounded (Set.range f) ↔ ∃ C, ∀ (x y : β), dist (f x) (f y) ≤ C

full_name: Metric.isBounded_image_iff
code: theorem isBounded_image_iff {f : β → α} {s : Set β} :
    IsBounded (f '' s) ↔ ∃ C, ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ C 
goal: Bornology.IsBounded (f '' s) ↔ ∃ C, ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ C

full_name: Metric.isBounded_range_of_tendsto_cofinite_uniformity
code: theorem isBounded_range_of_tendsto_cofinite_uniformity {f : β → α}
    (hf : Tendsto (Prod.map f f) (.cofinite ×ˢ .cofinite) (𝓤 α)) : IsBounded (range f) 
goal: Bornology.IsBounded (Set.range f)

full_name: Metric.isBounded_range_of_cauchy_map_cofinite
code: theorem isBounded_range_of_cauchy_map_cofinite {f : β → α} (hf : Cauchy (map f cofinite)) :
    IsBounded (range f) 
goal: Bornology.IsBounded (Set.range f)

full_name: CauchySeq.isBounded_range
code: theorem _root_.CauchySeq.isBounded_range {f : ℕ → α} (hf : CauchySeq f) : IsBounded (range f) 
goal: Bornology.IsBounded (Set.range f)

full_name: Metric.isBounded_range_of_tendsto_cofinite
code: theorem isBounded_range_of_tendsto_cofinite {f : β → α} {a : α} (hf : Tendsto f cofinite (𝓝 a)) :
    IsBounded (range f) 
goal: Bornology.IsBounded (Set.range f)

full_name: Metric.isBounded_of_compactSpace
code: /-- In a compact space, all sets are bounded -/
theorem isBounded_of_compactSpace [CompactSpace α] : IsBounded s 
goal: Bornology.IsBounded s

full_name: Metric.isBounded_range_of_tendsto
code: theorem isBounded_range_of_tendsto (u : ℕ → α) {x : α} (hu : Tendsto u atTop (𝓝 x)) :
    IsBounded (range u) 
goal: Bornology.IsBounded (Set.range u)

full_name: Metric.disjoint_nhds_cobounded
code: theorem disjoint_nhds_cobounded (x : α) : Disjoint (𝓝 x) (cobounded α) 
goal: Disjoint (𝓝 x) (Bornology.cobounded α)

full_name: Metric.disjoint_cobounded_nhds
code: theorem disjoint_cobounded_nhds (x : α) : Disjoint (cobounded α) (𝓝 x) 
goal: Disjoint (Bornology.cobounded α) (𝓝 x)

full_name: Metric.disjoint_nhdsSet_cobounded
code: theorem disjoint_nhdsSet_cobounded {s : Set α} (hs : IsCompact s) : Disjoint (𝓝ˢ s) (cobounded α) 
goal: Disjoint (𝓝ˢ s) (Bornology.cobounded α)

full_name: Metric.disjoint_cobounded_nhdsSet
code: theorem disjoint_cobounded_nhdsSet {s : Set α} (hs : IsCompact s) : Disjoint (cobounded α) (𝓝ˢ s) 
goal: Disjoint (Bornology.cobounded α) (𝓝ˢ s)

full_name: Metric.exists_isBounded_image_of_tendsto
code: theorem exists_isBounded_image_of_tendsto {α β : Type*} [PseudoMetricSpace β]
    {l : Filter α} {f : α → β} {x : β} (hf : Tendsto f l (𝓝 x)) :
    ∃ s ∈ l, IsBounded (f '' s) 
goal: ∃ s ∈ l, Bornology.IsBounded (f '' s)

full_name: Metric.exists_isOpen_isBounded_image_inter_of_isCompact_of_forall_continuousWithinAt
code: /-- If a function is continuous within a set `s` at every point of a compact set `k`, then it is
bounded on some open neighborhood of `k` in `s`. -/
theorem exists_isOpen_isBounded_image_inter_of_isCompact_of_forall_continuousWithinAt
    [TopologicalSpace β] {k s : Set β} {f : β → α} (hk : IsCompact k)
    (hf : ∀ x ∈ k, ContinuousWithinAt f s x) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' (t ∩ s)) 
goal: ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' (t ∩ s))

full_name: Metric.exists_isOpen_isBounded_image_of_isCompact_of_forall_continuousAt
code: /-- If a function is continuous at every point of a compact set `k`, then it is bounded on
some open neighborhood of `k`. -/
theorem exists_isOpen_isBounded_image_of_isCompact_of_forall_continuousAt [TopologicalSpace β]
    {k : Set β} {f : β → α} (hk : IsCompact k) (hf : ∀ x ∈ k, ContinuousAt f x) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' t) 
goal: ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' t)

full_name: Metric.exists_isOpen_isBounded_image_inter_of_isCompact_of_continuousOn
code: /-- If a function is continuous on a set `s` containing a compact set `k`, then it is bounded on
some open neighborhood of `k` in `s`. -/
theorem exists_isOpen_isBounded_image_inter_of_isCompact_of_continuousOn [TopologicalSpace β]
    {k s : Set β} {f : β → α} (hk : IsCompact k) (hks : k ⊆ s) (hf : ContinuousOn f s) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' (t ∩ s)) 
goal: ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' (t ∩ s))

full_name: Metric.exists_isOpen_isBounded_image_of_isCompact_of_continuousOn
code: /-- If a function is continuous on a neighborhood of a compact set `k`, then it is bounded on
some open neighborhood of `k`. -/
theorem exists_isOpen_isBounded_image_of_isCompact_of_continuousOn [TopologicalSpace β]
    {k s : Set β} {f : β → α} (hk : IsCompact k) (hs : IsOpen s) (hks : k ⊆ s)
    (hf : ContinuousOn f s) : ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' t) 
goal: ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' t)

full_name: Metric.isCompact_of_isClosed_isBounded
code: /-- The **Heine–Borel theorem**: In a proper space, a closed bounded set is compact. -/
theorem isCompact_of_isClosed_isBounded [ProperSpace α] (hc : IsClosed s) (hb : IsBounded s) :
    IsCompact s 
goal: IsCompact s

full_name: Bornology.IsBounded.isCompact_closure
code: /-- The **Heine–Borel theorem**: In a proper space, the closure of a bounded set is compact. -/
theorem _root_.Bornology.IsBounded.isCompact_closure [ProperSpace α] (h : IsBounded s) :
    IsCompact (closure s) 
goal: IsCompact (closure s)

full_name: Metric.isCompact_iff_isClosed_bounded
code: /-- The **Heine–Borel theorem**:
In a proper Hausdorff space, a set is compact if and only if it is closed and bounded. -/
theorem isCompact_iff_isClosed_bounded [T2Space α] [ProperSpace α] :
    IsCompact s ↔ IsClosed s ∧ IsBounded s 
goal: IsCompact s ↔ IsClosed s ∧ Bornology.IsBounded s

full_name: Metric.compactSpace_iff_isBounded_univ
code: theorem compactSpace_iff_isBounded_univ [ProperSpace α] :
    CompactSpace α ↔ IsBounded (univ : Set α) 
goal: CompactSpace α ↔ Bornology.IsBounded Set.univ

full_name: totallyBounded_Icc
code: theorem _root_.totallyBounded_Icc (a b : α) : TotallyBounded (Icc a b) 
goal: TotallyBounded (Set.Icc a b)

full_name: totallyBounded_Ico
code: theorem _root_.totallyBounded_Ico (a b : α) : TotallyBounded (Ico a b) 
goal: TotallyBounded (Set.Ico a b)

full_name: totallyBounded_Ioc
code: theorem _root_.totallyBounded_Ioc (a b : α) : TotallyBounded (Ioc a b) 
goal: TotallyBounded (Set.Ioc a b)

full_name: totallyBounded_Ioo
code: theorem _root_.totallyBounded_Ioo (a b : α) : TotallyBounded (Ioo a b) 
goal: TotallyBounded (Set.Ioo a b)

full_name: Metric.isBounded_Icc
code: theorem isBounded_Icc (a b : α) : IsBounded (Icc a b) 
goal: Bornology.IsBounded (Set.Icc a b)

full_name: Metric.isBounded_Ico
code: theorem isBounded_Ico (a b : α) : IsBounded (Ico a b) 
goal: Bornology.IsBounded (Set.Ico a b)

full_name: Metric.isBounded_Ioc
code: theorem isBounded_Ioc (a b : α) : IsBounded (Ioc a b) 
goal: Bornology.IsBounded (Set.Ioc a b)

full_name: Metric.isBounded_Ioo
code: theorem isBounded_Ioo (a b : α) : IsBounded (Ioo a b) 
goal: Bornology.IsBounded (Set.Ioo a b)

full_name: Metric.isBounded_of_bddAbove_of_bddBelow
code: /-- In a pseudo metric space with a conditionally complete linear order such that the order and the
    metric structure give the same topology, any order-bounded set is metric-bounded. -/
theorem isBounded_of_bddAbove_of_bddBelow {s : Set α} (h₁ : BddAbove s) (h₂ : BddBelow s) :
    IsBounded s 
goal: Bornology.IsBounded s

full_name: Metric.diam
code: /-- The diameter of a set in a metric space. To get controllable behavior even when the diameter
should be infinite, we express it in terms of the `EMetric.diam` -/
noncomputable def diam (s : Set α) : ℝ 
goal: ℝ

full_name: Metric.diam_nonneg
code: /-- The diameter of a set is always nonnegative -/
theorem diam_nonneg : 0 ≤ diam s 
goal: 0 ≤ Metric.diam s

full_name: Metric.diam_subsingleton
code: theorem diam_subsingleton (hs : s.Subsingleton) : diam s = 0 
goal: Metric.diam s = 0

full_name: Metric.diam_empty
code: /-- The empty set has zero diameter -/
@[simp]
theorem diam_empty : diam (∅ : Set α) = 0 
goal: Metric.diam ∅ = 0

full_name: Metric.diam_singleton
code: /-- A singleton has zero diameter -/
@[simp]
theorem diam_singleton : diam ({x} : Set α) = 0 
goal: Metric.diam {x} = 0

full_name: Metric.diam_zero
code: @[to_additive (attr := simp)]
theorem diam_one [One α] : diam (1 : Set α) = 0 
goal: Metric.diam 0 = 0

full_name: Metric.diam_one
code: @[to_additive (attr := simp)]
theorem diam_one [One α] : diam (1 : Set α) = 0 
goal: Metric.diam 1 = 0

full_name: Metric.diam_pair
code: theorem diam_pair : diam ({x, y} : Set α) = dist x y 
goal: Metric.diam {x, y} = dist x y

full_name: Metric.diam_triple
code: theorem diam_triple :
    Metric.diam ({x, y, z} : Set α) = max (max (dist x y) (dist x z)) (dist y z) 
goal: Metric.diam {x, y, z} = max (max (dist x y) (dist x z)) (dist y z)

full_name: Metric.ediam_le_of_forall_dist_le
code: /-- If the distance between any two points in a set is bounded by some constant `C`,
then `ENNReal.ofReal C` bounds the emetric diameter of this set. -/
theorem ediam_le_of_forall_dist_le {C : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) :
    EMetric.diam s ≤ ENNReal.ofReal C 
goal: EMetric.diam s ≤ ENNReal.ofReal C

full_name: Metric.diam_le_of_forall_dist_le
code: /-- If the distance between any two points in a set is bounded by some non-negative constant,
this constant bounds the diameter. -/
theorem diam_le_of_forall_dist_le {C : ℝ} (h₀ : 0 ≤ C) (h : ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) :
    diam s ≤ C 
goal: Metric.diam s ≤ C

full_name: Metric.diam_le_of_forall_dist_le_of_nonempty
code: /-- If the distance between any two points in a nonempty set is bounded by some constant,
this constant bounds the diameter. -/
theorem diam_le_of_forall_dist_le_of_nonempty (hs : s.Nonempty) {C : ℝ}
    (h : ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) : diam s ≤ C 
goal: Metric.diam s ≤ C

full_name: Metric.dist_le_diam_of_mem'
code: /-- The distance between two points in a set is controlled by the diameter of the set. -/
theorem dist_le_diam_of_mem' (h : EMetric.diam s ≠ ⊤) (hx : x ∈ s) (hy : y ∈ s) :
    dist x y ≤ diam s 
goal: dist x y ≤ Metric.diam s

full_name: Metric.isBounded_iff_ediam_ne_top
code: /-- Characterize the boundedness of a set in terms of the finiteness of its emetric.diameter. -/
theorem isBounded_iff_ediam_ne_top : IsBounded s ↔ EMetric.diam s ≠ ⊤ 
goal: Bornology.IsBounded s ↔ EMetric.diam s ≠ ⊤

full_name: Metric.ediam_eq_top_iff_unbounded
code: theorem ediam_eq_top_iff_unbounded : EMetric.diam s = ⊤ ↔ ¬IsBounded s 
goal: EMetric.diam s = ⊤ ↔ ¬Bornology.IsBounded s

full_name: Metric.ediam_univ_eq_top_iff_noncompact
code: theorem ediam_univ_eq_top_iff_noncompact [ProperSpace α] :
    EMetric.diam (univ : Set α) = ∞ ↔ NoncompactSpace α 
goal: EMetric.diam Set.univ = ⊤ ↔ NoncompactSpace α

full_name: Metric.ediam_univ_of_noncompact
code: @[simp]
theorem ediam_univ_of_noncompact [ProperSpace α] [NoncompactSpace α] :
    EMetric.diam (univ : Set α) = ∞ 
goal: EMetric.diam Set.univ = ⊤

full_name: Metric.diam_univ_of_noncompact
code: @[simp]
theorem diam_univ_of_noncompact [ProperSpace α] [NoncompactSpace α] : diam (univ : Set α) = 0 
goal: Metric.diam Set.univ = 0

full_name: Metric.dist_le_diam_of_mem
code: /-- The distance between two points in a set is controlled by the diameter of the set. -/
theorem dist_le_diam_of_mem (h : IsBounded s) (hx : x ∈ s) (hy : y ∈ s) : dist x y ≤ diam s 
goal: dist x y ≤ Metric.diam s

full_name: Metric.ediam_of_unbounded
code: theorem ediam_of_unbounded (h : ¬IsBounded s) : EMetric.diam s = ∞ 
goal: EMetric.diam s = ⊤

full_name: Metric.diam_eq_zero_of_unbounded
code: /-- An unbounded set has zero diameter. If you would prefer to get the value ∞, use `EMetric.diam`.
This lemma makes it possible to avoid side conditions in some situations -/
theorem diam_eq_zero_of_unbounded (h : ¬IsBounded s) : diam s = 0 
goal: Metric.diam s = 0

full_name: Metric.diam_mono
code: /-- If `s ⊆ t`, then the diameter of `s` is bounded by that of `t`, provided `t` is bounded. -/
theorem diam_mono {s t : Set α} (h : s ⊆ t) (ht : IsBounded t) : diam s ≤ diam t 
goal: Metric.diam s ≤ Metric.diam t

full_name: Metric.diam_union
code: /-- The diameter of a union is controlled by the sum of the diameters, and the distance between
any two points in each of the sets. This lemma is true without any side condition, since it is
obviously true if `s ∪ t` is unbounded. -/
theorem diam_union {t : Set α} (xs : x ∈ s) (yt : y ∈ t) :
    diam (s ∪ t) ≤ diam s + dist x y + diam t 
goal: Metric.diam (s ∪ t) ≤ Metric.diam s + dist x y + Metric.diam t

full_name: Metric.diam_union'
code: /-- If two sets intersect, the diameter of the union is bounded by the sum of the diameters. -/
theorem diam_union' {t : Set α} (h : (s ∩ t).Nonempty) : diam (s ∪ t) ≤ diam s + diam t 
goal: Metric.diam (s ∪ t) ≤ Metric.diam s + Metric.diam t

full_name: Metric.diam_le_of_subset_closedBall
code: theorem diam_le_of_subset_closedBall {r : ℝ} (hr : 0 ≤ r) (h : s ⊆ closedBall x r) :
    diam s ≤ 2 * r 
goal: Metric.diam s ≤ 2 * r

full_name: Metric.diam_closedBall
code: /-- The diameter of a closed ball of radius `r` is at most `2 r`. -/
theorem diam_closedBall {r : ℝ} (h : 0 ≤ r) : diam (closedBall x r) ≤ 2 * r 
goal: Metric.diam (Metric.closedBall x r) ≤ 2 * r

full_name: Metric.diam_ball
code: /-- The diameter of a ball of radius `r` is at most `2 r`. -/
theorem diam_ball {r : ℝ} (h : 0 ≤ r) : diam (ball x r) ≤ 2 * r 
goal: Metric.diam (Metric.ball x r) ≤ 2 * r

full_name: IsComplete.nonempty_iInter_of_nonempty_biInter
code: /-- If a family of complete sets with diameter tending to `0` is such that each finite intersection
is nonempty, then the total intersection is also nonempty. -/
theorem _root_.IsComplete.nonempty_iInter_of_nonempty_biInter {s : ℕ → Set α}
    (h0 : IsComplete (s 0)) (hs : ∀ n, IsClosed (s n)) (h's : ∀ n, IsBounded (s n))
    (h : ∀ N, (⋂ n ≤ N, s n).Nonempty) (h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)) :
    (⋂ n, s n).Nonempty 
goal: (⋂ n, s n).Nonempty

full_name: Metric.nonempty_iInter_of_nonempty_biInter
code: /-- In a complete space, if a family of closed sets with diameter tending to `0` is such that each
finite intersection is nonempty, then the total intersection is also nonempty. -/
theorem nonempty_iInter_of_nonempty_biInter [CompleteSpace α] {s : ℕ → Set α}
    (hs : ∀ n, IsClosed (s n)) (h's : ∀ n, IsBounded (s n)) (h : ∀ N, (⋂ n ≤ N, s n).Nonempty)
    (h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)) : (⋂ n, s n).Nonempty 
goal: (⋂ n, s n).Nonempty

full_name: Mathlib.Meta.Positivity.evalDiam
code: /-- Extension for the `positivity` tactic: the diameter of a set is always nonnegative. -/
@[positivity Metric.diam _]
def evalDiam : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: Metric.cobounded_eq_cocompact
code: theorem Metric.cobounded_eq_cocompact [ProperSpace α] : cobounded α = cocompact α 
goal: Bornology.cobounded α = Filter.cocompact α

full_name: tendsto_dist_right_cocompact_atTop
code: theorem tendsto_dist_right_cocompact_atTop [ProperSpace α] (x : α) :
    Tendsto (dist · x) (cocompact α) atTop 
goal: Filter.Tendsto (fun x_1 => dist x_1 x) (Filter.cocompact α) Filter.atTop

full_name: tendsto_dist_left_cocompact_atTop
code: theorem tendsto_dist_left_cocompact_atTop [ProperSpace α] (x : α) :
    Tendsto (dist x) (cocompact α) atTop 
goal: Filter.Tendsto (dist x) (Filter.cocompact α) Filter.atTop

full_name: comap_dist_left_atTop_eq_cocompact
code: theorem comap_dist_left_atTop_eq_cocompact [ProperSpace α] (x : α) :
    comap (dist x) atTop = cocompact α 
goal: Filter.comap (dist x) Filter.atTop = Filter.cocompact α

full_name: tendsto_cocompact_of_tendsto_dist_comp_atTop
code: theorem tendsto_cocompact_of_tendsto_dist_comp_atTop {f : β → α} {l : Filter β} (x : α)
    (h : Tendsto (fun y => dist (f y) x) l atTop) : Tendsto f l (cocompact α) 
goal: Filter.Tendsto f l (Filter.cocompact α)

full_name: Metric.finite_isBounded_inter_isClosed
code: theorem Metric.finite_isBounded_inter_isClosed [ProperSpace α] {K s : Set α} [DiscreteTopology s]
    (hK : IsBounded K) (hs : IsClosed s) : Set.Finite (K ∩ s) 
goal: (K ∩ s).Finite