The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V13. General topology

Mathlib.Topology.MetricSpace.Bounded

110 declarations. Mathlib docs · Source

Boundedness in (pseudo)-metric spaces

This file contains one definition, and various results on boundedness in pseudo-metric spaces.

  • Metric.diam s : The iSup of the distances of members of s. Defined in terms of ediam, for better handling of the case when it should be infinite.

  • isBounded_iff_subset_closedBall: a non-empty set is bounded if and only if it is included in some closed ball

  • describing the cobounded filter, relating to the cocompact filter

  • IsCompact.isBounded: compact sets are bounded

  • TotallyBounded.isBounded: totally bounded sets are bounded

  • isCompact_iff_isClosed_bounded, the Heine–Borel theorem: in a proper space, a set is compact if and only if it is closed and bounded.

  • cobounded_eq_cocompact: in a proper space, cobounded and compact sets are the same diameter of a subset, and its relation to boundedness

Tags

metric, pseudometric space, bounded, diameter, Heine-Borel theorem

theorem totallyBounded_Icc E1 #

∀ {α : Type u} [inst : UniformSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α), TotallyBounded (Set.Icc a b)

theorem totallyBounded_Ico E1 #

∀ {α : Type u} [inst : UniformSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α), TotallyBounded (Set.Ico a b)

theorem totallyBounded_Ioc E1 #

∀ {α : Type u} [inst : UniformSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α), TotallyBounded (Set.Ioc a b)

theorem totallyBounded_Ioo E1 #

∀ {α : Type u} [inst : UniformSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α), TotallyBounded (Set.Ioo a b)

theorem Metric.isBounded_closedBall E1 #

∀ {α : Type u} {x : α} {r : ℝ} [inst : PseudoMetricSpace α], Bornology.IsBounded (Metric.closedBall x r)

Closed balls are bounded

theorem Metric.isBounded_ball E1 #

∀ {α : Type u} {x : α} {r : ℝ} [inst : PseudoMetricSpace α], Bornology.IsBounded (Metric.ball x r)

Open balls are bounded

theorem Metric.isBounded_sphere E1 #

∀ {α : Type u} {x : α} {r : ℝ} [inst : PseudoMetricSpace α], Bornology.IsBounded (Metric.sphere x r)

Spheres are bounded

theorem Metric.isBounded_iff_subset_closedBall E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] (c : α), Bornology.IsBounded s ↔ ∃ r, s ⊆ Metric.closedBall c r

Given a point, a bounded subset is included in some ball around this point

theorem Bornology.IsBounded.subset_closedBall E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α],
  Bornology.IsBounded s → ∀ (c : α), ∃ r, s ⊆ Metric.closedBall c r

theorem Bornology.IsBounded.subset_ball_lt E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α],
  Bornology.IsBounded s → ∀ (a : ℝ) (c : α), ∃ r, a < r ∧ s ⊆ Metric.ball c r

theorem Bornology.IsBounded.subset_ball E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded s → ∀ (c : α), ∃ r, s ⊆ Metric.ball c r

theorem Metric.isBounded_iff_subset_ball E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] (c : α), Bornology.IsBounded s ↔ ∃ r, s ⊆ Metric.ball c r

theorem Bornology.IsBounded.subset_closedBall_lt E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α],
  Bornology.IsBounded s → ∀ (a : ℝ) (c : α), ∃ r, a < r ∧ s ⊆ Metric.closedBall c r

theorem Metric.isBounded_closure_of_isBounded E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded s → Bornology.IsBounded (closure s)

theorem Bornology.IsBounded.closure E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded s → Bornology.IsBounded (closure s)

theorem Metric.isBounded_closure_iff E0 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded (closure s) ↔ Bornology.IsBounded s

theorem Metric.hasBasis_nhds_isOpen_isBounded E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (x : α),
  (nhds x).HasBasis (fun a ↦ x ∈ a ∧ IsOpen a ∧ Bornology.IsBounded a) id

theorem Metric.hasBasis_cobounded_compl_closedBall E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α),
  (Bornology.cobounded α).HasBasis (fun x ↦ True) fun r ↦ (Metric.closedBall c r)ᶜ

theorem Metric.hasAntitoneBasis_cobounded_compl_closedBall E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α),
  (Bornology.cobounded α).HasAntitoneBasis fun r ↦ (Metric.closedBall c r)ᶜ

theorem Metric.hasBasis_cobounded_compl_ball E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α),
  (Bornology.cobounded α).HasBasis (fun x ↦ True) fun r ↦ (Metric.ball c r)ᶜ

theorem Metric.hasAntitoneBasis_cobounded_compl_ball E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α), (Bornology.cobounded α).HasAntitoneBasis fun r ↦ (Metric.ball c r)ᶜ

theorem Metric.comap_dist_right_atTop E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α),
  Filter.comap (fun x ↦ dist x c) Filter.atTop = Bornology.cobounded α

theorem Metric.comap_dist_left_atTop E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α), Filter.comap (dist c) Filter.atTop = Bornology.cobounded α

instance Metric.instIsCountablyGeneratedCobounded E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α], (Bornology.cobounded α).IsCountablyGenerated

theorem Metric.tendsto_dist_right_atTop_iff E0 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] (c : α) {f : β → α} {l : Filter β},
  Filter.Tendsto (fun x ↦ dist (f x) c) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded α)

theorem Metric.tendsto_dist_left_atTop_iff E0 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] (c : α) {f : β → α} {l : Filter β},
  Filter.Tendsto (fun x ↦ dist c (f x)) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded α)

theorem Metric.tendsto_dist_right_cobounded_atTop E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α),
  Filter.Tendsto (fun x ↦ dist x c) (Bornology.cobounded α) Filter.atTop

theorem Metric.tendsto_dist_left_cobounded_atTop E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (c : α), Filter.Tendsto (dist c) (Bornology.cobounded α) Filter.atTop

theorem TotallyBounded.isBounded E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α}, TotallyBounded s → Bornology.IsBounded s

A totally bounded set is bounded

theorem IsCompact.isBounded E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α}, IsCompact s → Bornology.IsBounded s

A compact set is bounded

instance Metric.instBoundedSpaceOfCompactSpace E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [CompactSpace α], BoundedSpace α

theorem Metric.cobounded_le_cocompact E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α], Bornology.cobounded α ≤ Filter.cocompact α

theorem Metric.isCobounded_iff_closedBall_compl_subset E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} (c : α),
  Bornology.IsCobounded s ↔ ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

theorem Bornology.IsCobounded.closedBall_compl_subset E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α},
  Bornology.IsCobounded s → ∀ (c : α), ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

theorem Metric.closedBall_compl_subset_of_mem_cocompact E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α},
  s ∈ Filter.cocompact α → ∀ (c : α), ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

theorem Metric.mem_cocompact_of_closedBall_compl_subset E0 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] [ProperSpace α] (c : α),
  (∃ r, (Metric.closedBall c r)ᶜ ⊆ s) → s ∈ Filter.cocompact α

theorem Metric.mem_cocompact_iff_closedBall_compl_subset E0 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] [ProperSpace α] (c : α),
  s ∈ Filter.cocompact α ↔ ∃ r, (Metric.closedBall c r)ᶜ ⊆ s

theorem Metric.isBounded_range_iff E0 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α},
  Bornology.IsBounded (Set.range f) ↔ ∃ C, ∀ (x y : β), dist (f x) (f y) ≤ C

Characterization of the boundedness of the range of a function

theorem Metric.isBounded_image_iff E0 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α} {s : Set β},
  Bornology.IsBounded (f '' s) ↔ ∃ C, ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ C

theorem Metric.isBounded_range_of_tendsto_cofinite_uniformity E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α},
  Filter.Tendsto (Prod.map f f) (Filter.cofinite ×ˢ Filter.cofinite) (uniformity α) → Bornology.IsBounded (Set.range f)

theorem Metric.isBounded_range_of_cauchy_map_cofinite E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α},
  Cauchy (Filter.map f Filter.cofinite) → Bornology.IsBounded (Set.range f)

theorem CauchySeq.isBounded_range E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {f : ℕ → α}, CauchySeq f → Bornology.IsBounded (Set.range f)

theorem Metric.isBounded_range_of_tendsto_cofinite E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α} {a : α},
  Filter.Tendsto f Filter.cofinite (nhds a) → Bornology.IsBounded (Set.range f)

theorem Metric.isBounded_of_compactSpace E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] [CompactSpace α], Bornology.IsBounded s

In a compact space, all sets are bounded

theorem Metric.isBounded_range_of_tendsto E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (u : ℕ → α) {x : α},
  Filter.Tendsto u Filter.atTop (nhds x) → Bornology.IsBounded (Set.range u)

theorem Metric.disjoint_nhds_cobounded E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (x : α), Disjoint (nhds x) (Bornology.cobounded α)

theorem Metric.disjoint_cobounded_nhds E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] (x : α), Disjoint (Bornology.cobounded α) (nhds x)

theorem Metric.disjoint_nhdsSet_cobounded E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α}, IsCompact s → Disjoint (nhdsSet s) (Bornology.cobounded α)

theorem Metric.disjoint_cobounded_nhdsSet E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α}, IsCompact s → Disjoint (Bornology.cobounded α) (nhdsSet s)

theorem Metric.exists_isBounded_image_of_tendsto E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : PseudoMetricSpace β] {l : Filter α} {f : α → β} {x : β},
  Filter.Tendsto f l (nhds x) → ∃ s ∈ l, Bornology.IsBounded (f '' s)

theorem Metric.exists_isOpen_isBounded_image_inter_of_isCompact_of_forall_continuousWithinAt E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : TopologicalSpace β] {k s : Set β} {f : β → α},
  IsCompact k → (∀ x ∈ k, ContinuousWithinAt f s x) → ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' (t ∩ s))

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 Metric.exists_isOpen_isBounded_image_of_isCompact_of_forall_continuousAt E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : TopologicalSpace β] {k : Set β} {f : β → α},
  IsCompact k → (∀ x ∈ k, ContinuousAt f x) → ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' t)

If a function is continuous at every point of a compact set k, then it is bounded on some open neighborhood of k.

theorem Metric.exists_isOpen_isBounded_image_inter_of_isCompact_of_continuousOn E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : TopologicalSpace β] {k s : Set β} {f : β → α},
  IsCompact k → k ⊆ s → ContinuousOn f s → ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' (t ∩ s))

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 Metric.exists_isOpen_isBounded_image_of_isCompact_of_continuousOn E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : TopologicalSpace β] {k s : Set β} {f : β → α},
  IsCompact k → IsOpen s → k ⊆ s → ContinuousOn f s → ∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' t)

If a function is continuous on a neighborhood of a compact set k, then it is bounded on some open neighborhood of k.

theorem Metric.isCompact_of_isClosed_isBounded E2 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] [ProperSpace α],
  IsClosed s → Bornology.IsBounded s → IsCompact s

The Heine–Borel theorem: In a proper space, a closed bounded set is compact.

theorem Bornology.IsBounded.isCompact_closure E2 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] [ProperSpace α], Bornology.IsBounded s → IsCompact (closure s)

The Heine–Borel theorem: In a proper space, the closure of a bounded set is compact.

theorem Metric.isCompact_iff_isClosed_bounded E3 #

∀ {α : Type u_2} {s : Set α} [inst : MetricSpace α] [ProperSpace α], IsCompact s ↔ IsClosed s ∧ Bornology.IsBounded s

The Heine–Borel theorem: In a proper metric space, a set is compact if and only if it is closed and bounded.

theorem Metric.compactSpace_iff_isBounded_univ E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α], CompactSpace α ↔ Bornology.IsBounded Set.univ

theorem Metric.isCompact_closure_ball E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] {x : α} {ε : ℝ}, IsCompact (closure (Metric.ball x ε))

theorem Metric.isBounded_Icc E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α),
  Bornology.IsBounded (Set.Icc a b)

theorem Metric.isBounded_Ico E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α),
  Bornology.IsBounded (Set.Ico a b)

theorem Metric.isBounded_Ioc E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α),
  Bornology.IsBounded (Set.Ioc a b)

theorem Metric.isBounded_Ioo E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (a b : α),
  Bornology.IsBounded (Set.Ioo a b)

theorem Metric.isBounded_of_bddAbove_of_bddBelow E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] {s : Set α},
  BddAbove s → BddBelow s → Bornology.IsBounded s

In a pseudometric 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 IsOrderBornology.of_isCompactIcc E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Preorder α] [CompactIccSpace α] (x : α),
  (∀ (r : ℝ), BddBelow (Metric.closedBall x r)) → (∀ (r : ℝ), BddAbove (Metric.closedBall x r)) → IsOrderBornology α

theorem Metric.isBounded_of_abs_le E1 #

∀ {α : Type u_2} [inst : AddCommGroup α] [inst_1 : LinearOrder α] [IsOrderedAddMonoid α] [inst_3 : PseudoMetricSpace α]
  [CompactIccSpace α] (C : α), Bornology.IsBounded {x | |x| ≤ C}

theorem Metric.isBounded_of_abs_lt E1 #

∀ {α : Type u_2} [inst : AddCommGroup α] [inst_1 : LinearOrder α] [IsOrderedAddMonoid α] [inst_3 : PseudoMetricSpace α]
  [CompactIccSpace α] (C : α), Bornology.IsBounded {x | |x| < C}

def Metric.diam E1 #

{α : Type u} → [PseudoMetricSpace α] → Set α → ℝ

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 ediam

theorem Metric.diam_nonneg E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], 0 ≤ Metric.diam s

The diameter of a set is always nonnegative

theorem Metric.diam_subsingleton E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], s.Subsingleton → Metric.diam s = 0

theorem Metric.diam_empty E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α], Metric.diam ∅ = 0

The empty set has zero diameter

theorem Metric.diam_singleton E0 #

∀ {α : Type u} {x : α} [inst : PseudoMetricSpace α], Metric.diam {x} = 0

A singleton has zero diameter

theorem Metric.diam_zero E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : Zero α], Metric.diam 0 = 0

theorem Metric.diam_one E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [inst_1 : One α], Metric.diam 1 = 0

theorem Metric.diam_pair E1 #

∀ {α : Type u} {x y : α} [inst : PseudoMetricSpace α], Metric.diam {x, y} = dist x y

theorem Metric.diam_triple E1 #

∀ {α : Type u} {x y z : α} [inst : PseudoMetricSpace α],
  Metric.diam {x, y, z} = max (max (dist x y) (dist x z)) (dist y z)

theorem Metric.ediam_le_of_forall_dist_le E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] {C : ℝ},
  (∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) → Metric.ediam s ≤ ENNReal.ofReal C

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 Metric.ediam_closedBall_le E1 #

∀ {α : Type u} {x : α} [inst : PseudoMetricSpace α] {r : ℝ}, Metric.ediam (Metric.closedBall x r) ≤ 2 * ENNReal.ofReal r

The emetric diameter of a closed ball of radius r is at most 2 * ENNReal.ofReal r.

theorem Metric.ediam_ball_le E1 #

∀ {α : Type u} {x : α} [inst : PseudoMetricSpace α] {r : ℝ}, Metric.ediam (Metric.ball x r) ≤ 2 * ENNReal.ofReal r

The emetric diameter of an open ball of radius r is at most 2 * ENNReal.ofReal r.

theorem Metric.diam_le_of_forall_dist_le E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] {C : ℝ},
  0 ≤ C → (∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) → Metric.diam s ≤ C

If the distance between any two points in a set is bounded by some non-negative constant, this constant bounds the diameter.

theorem Metric.diam_le_of_forall_dist_le_of_nonempty E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α],
  s.Nonempty → ∀ {C : ℝ}, (∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) → Metric.diam s ≤ C

If the distance between any two points in a nonempty set is bounded by some constant, this constant bounds the diameter.

theorem Metric.dist_le_diam_of_mem' E1 #

∀ {α : Type u} {s : Set α} {x y : α} [inst : PseudoMetricSpace α],
  Metric.ediam s ≠ ⊤ → x ∈ s → y ∈ s → dist x y ≤ Metric.diam s

The distance between two points in a set is controlled by the diameter of the set.

theorem Metric.isBounded_iff_ediam_ne_top E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded s ↔ Metric.ediam s ≠ ⊤

Characterize the boundedness of a set in terms of the finiteness of its emetric.diameter.

theorem Bornology.IsBounded.ediam_ne_top E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Bornology.IsBounded s → Metric.ediam s ≠ ⊤

Alias of the forward direction of Metric.isBounded_iff_ediam_ne_top.


Characterize the boundedness of a set in terms of the finiteness of its emetric.diameter.

theorem Metric.ediam_eq_top_iff_unbounded E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], Metric.ediam s = ⊤ ↔ ¬Bornology.IsBounded s

theorem Metric.ediam_univ_eq_top_iff_noncompact E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α], Metric.ediam Set.univ = ⊤ ↔ NoncompactSpace α

theorem Metric.ediam_univ_of_noncompact E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] [NoncompactSpace α], Metric.ediam Set.univ = ⊤

theorem Metric.diam_univ_of_noncompact E0 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] [NoncompactSpace α], Metric.diam Set.univ = 0

theorem Metric.dist_le_diam_of_mem E1 #

∀ {α : Type u} {s : Set α} {x y : α} [inst : PseudoMetricSpace α],
  Bornology.IsBounded s → x ∈ s → y ∈ s → dist x y ≤ Metric.diam s

The distance between two points in a set is controlled by the diameter of the set.

theorem Metric.ediam_of_unbounded E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], ¬Bornology.IsBounded s → Metric.ediam s = ⊤

theorem Metric.diam_eq_zero_of_unbounded E2 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α], ¬Bornology.IsBounded s → Metric.diam s = 0

An unbounded set has zero diameter. If you would prefer to get the value ∞, use ediam. This lemma makes it possible to avoid side conditions in some situations

theorem Metric.diam_mono E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s t : Set α}, s ⊆ t → Bornology.IsBounded t → Metric.diam s ≤ Metric.diam t

If s ⊆ t, then the diameter of s is bounded by that of t, provided t is bounded.

theorem Metric.diam_union E2 #

∀ {α : Type u} {s : Set α} {x y : α} [inst : PseudoMetricSpace α] {t : Set α},
  x ∈ s → y ∈ t → Metric.diam (s ∪ t) ≤ Metric.diam s + dist x y + Metric.diam t

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 Metric.diam_union' E1 #

∀ {α : Type u} {s : Set α} [inst : PseudoMetricSpace α] {t : Set α},
  (s ∩ t).Nonempty → Metric.diam (s ∪ t) ≤ Metric.diam s + Metric.diam t

If two sets intersect, the diameter of the union is bounded by the sum of the diameters.

theorem Metric.diam_le_of_subset_closedBall E1 #

∀ {α : Type u} {s : Set α} {x : α} [inst : PseudoMetricSpace α] {r : ℝ},
  0 ≤ r → s ⊆ Metric.closedBall x r → Metric.diam s ≤ 2 * r

theorem Metric.diam_closedBall E1 #

∀ {α : Type u} {x : α} [inst : PseudoMetricSpace α] {r : ℝ}, 0 ≤ r → Metric.diam (Metric.closedBall x r) ≤ 2 * r

The diameter of a closed ball of radius r is at most 2 r.

theorem Metric.diam_ball E1 #

∀ {α : Type u} {x : α} [inst : PseudoMetricSpace α] {r : ℝ}, 0 ≤ r → Metric.diam (Metric.ball x r) ≤ 2 * r

The diameter of a ball of radius r is at most 2 r.

theorem IsComplete.nonempty_iInter_of_nonempty_biInter E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] {s : ℕ → Set α},
  IsComplete (s 0) →
    (∀ (n : ℕ), IsClosed (s n)) →
      (∀ (n : ℕ), Bornology.IsBounded (s n)) →
        (∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty) →
          Filter.Tendsto (fun n ↦ Metric.diam (s n)) Filter.atTop (nhds 0) → (⋂ n, s n).Nonempty

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 Metric.nonempty_iInter_of_nonempty_biInter E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [CompleteSpace α] {s : ℕ → Set α},
  (∀ (n : ℕ), IsClosed (s n)) →
    (∀ (n : ℕ), Bornology.IsBounded (s n)) →
      (∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty) →
        Filter.Tendsto (fun n ↦ Metric.diam (s n)) Filter.atTop (nhds 0) → (⋂ n, s n).Nonempty

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 Metric.diam_pos E1 #

∀ {α : Type u} {s : Set α} [inst : MetricSpace α], s.Nontrivial → Bornology.IsBounded s → 0 < Metric.diam s

def Mathlib.Meta.Positivity.evalDiam E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: the diameter of a set is always nonnegative.

theorem Metric.cobounded_eq_cocompact E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α], Bornology.cobounded α = Filter.cocompact α

theorem tendsto_dist_right_cocompact_atTop E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] (x : α),
  Filter.Tendsto (fun x_1 ↦ dist x_1 x) (Filter.cocompact α) Filter.atTop

theorem tendsto_dist_left_cocompact_atTop E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] (x : α),
  Filter.Tendsto (dist x) (Filter.cocompact α) Filter.atTop

theorem comap_dist_left_atTop_eq_cocompact E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] (x : α),
  Filter.comap (dist x) Filter.atTop = Filter.cocompact α

theorem tendsto_cocompact_of_tendsto_dist_comp_atTop E1 #

∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] {f : β → α} {l : Filter β} (x : α),
  Filter.Tendsto (fun y ↦ dist (f y) x) l Filter.atTop → Filter.Tendsto f l (Filter.cocompact α)

theorem Metric.finite_isBounded_inter_isClosed E1 #

∀ {α : Type u} [inst : PseudoMetricSpace α] [ProperSpace α] {K s : Set α},
  IsDiscrete s → Bornology.IsBounded K → IsClosed s → (K ∩ s).Finite

theorem Continuous.exists_forall_le_of_isBounded E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : LinearOrder α] [inst_1 : TopologicalSpace α] [OrderClosedTopology α]
  [inst_3 : PseudoMetricSpace β] [ProperSpace β] {f : β → α},
  Continuous f → ∀ (x₀ : β), Bornology.IsBounded {x | f x ≤ f x₀} → ∃ x, ∀ (y : β), f x ≤ f y

A version of the Extreme Value Theorem: if the set where a continuous function f into a linearly ordered space takes values ≤ f x₀ is bounded for some x₀, then f has a global minimum (under suitable topological assumptions).

This is a convenient combination of Continuous.exists_forall_le' and Metric.isCompact_of_isClosed_isBounded.

theorem Continuous.exists_forall_ge_of_isBounded E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : LinearOrder α] [inst_1 : TopologicalSpace α] [OrderClosedTopology α]
  [inst_3 : PseudoMetricSpace β] [ProperSpace β] {f : β → α},
  Continuous f → ∀ (x₀ : β), Bornology.IsBounded {x | f x₀ ≤ f x} → ∃ x, ∀ (y : β), f y ≤ f x

A version of the Extreme Value Theorem: if the set where a continuous function f into a linearly ordered space takes values ≥ f x₀ is bounded for some x₀, then f has a global maximum (under suitable topological assumptions).

This is a convenient combination of Continuous.exists_forall_ge' and Metric.isCompact_of_isClosed_isBounded.

theorem CompactSpace.lebesgue_number_lemma E1 #

∀ {X : Type u_2} [inst : MetricSpace X] [CompactSpace X] {ι : Type u_3} (U : ι → Set X),
  (∀ (i : ι), IsOpen (U i)) →
    ⋃ i, U i = Set.univ → ∃ ε > 0, ∀ (S : Set X), S.Nonempty → Metric.diam S ≤ ε → ∃ i, S ⊆ U i

If U : ι → Set X is an open covering of a compact metric space X, there exists ε > 0 such that any subset of X of diameter ≤ ε is contained in some U i.