# Documentation

## 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 EMetric.diam, 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, pseudo_metric, bounded, diameter, Heine-Borel theorem

theorem Metric.isBounded_closedBall {α : Type u} {x : α} {r : } :

Closed balls are bounded

theorem Metric.isBounded_ball {α : Type u} {x : α} {r : } :

Open balls are bounded

theorem Metric.isBounded_sphere {α : Type u} {x : α} {r : } :

Spheres are bounded

theorem Metric.isBounded_iff_subset_closedBall {α : Type u} {s : Set α} (c : α) :
∃ (r : ), s

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

theorem Bornology.IsBounded.subset_closedBall {α : Type u} {s : Set α} (h : ) (c : α) :
∃ (r : ), s
theorem Bornology.IsBounded.subset_ball_lt {α : Type u} {s : Set α} (h : ) (a : ) (c : α) :
∃ (r : ), a < r s
theorem Bornology.IsBounded.subset_ball {α : Type u} {s : Set α} (h : ) (c : α) :
∃ (r : ), s
theorem Metric.isBounded_iff_subset_ball {α : Type u} {s : Set α} (c : α) :
∃ (r : ), s
theorem Bornology.IsBounded.subset_closedBall_lt {α : Type u} {s : Set α} (h : ) (a : ) (c : α) :
∃ (r : ), a < r s
theorem Metric.isBounded_closure_of_isBounded {α : Type u} {s : Set α} (h : ) :
theorem Bornology.IsBounded.closure {α : Type u} {s : Set α} (h : ) :
@[simp]
theorem Metric.isBounded_closure_iff {α : Type u} {s : Set α} :
theorem Metric.hasBasis_cobounded_compl_closedBall {α : Type u} (c : α) :
.HasBasis (fun (x : ) => True) fun (r : ) =>
theorem Metric.hasBasis_cobounded_compl_ball {α : Type u} (c : α) :
.HasBasis (fun (x : ) => True) fun (r : ) => (Metric.ball c r)
@[simp]
theorem Metric.comap_dist_right_atTop {α : Type u} (c : α) :
Filter.comap (fun (x : α) => dist x c) Filter.atTop =
@[simp]
theorem Metric.comap_dist_left_atTop {α : Type u} (c : α) :
Filter.comap (dist c) Filter.atTop =
@[simp]
theorem Metric.tendsto_dist_right_atTop_iff {α : Type u} {β : Type v} (c : α) {f : βα} {l : } :
Filter.Tendsto (fun (x : β) => dist (f x) c) l Filter.atTop
@[simp]
theorem Metric.tendsto_dist_left_atTop_iff {α : Type u} {β : Type v} (c : α) {f : βα} {l : } :
Filter.Tendsto (fun (x : β) => dist c (f x)) l Filter.atTop
theorem Metric.tendsto_dist_right_cobounded_atTop {α : Type u} (c : α) :
Filter.Tendsto (fun (x : α) => dist x c) Filter.atTop
theorem Metric.tendsto_dist_left_cobounded_atTop {α : Type u} (c : α) :
Filter.Tendsto (dist c) Filter.atTop
theorem TotallyBounded.isBounded {α : Type u} {s : Set α} (h : ) :

A totally bounded set is bounded

theorem IsCompact.isBounded {α : Type u} {s : Set α} (h : ) :

A compact set is bounded

theorem Metric.isCobounded_iff_closedBall_compl_subset {α : Type u} {s : Set α} (c : α) :
∃ (r : ), s
theorem Bornology.IsCobounded.closedBall_compl_subset {α : Type u} {s : Set α} (hs : ) (c : α) :
∃ (r : ), s
theorem Metric.closedBall_compl_subset_of_mem_cocompact {α : Type u} {s : Set α} (hs : ) (c : α) :
∃ (r : ), s
theorem Metric.mem_cocompact_of_closedBall_compl_subset {α : Type u} {s : Set α} [] (c : α) (h : ∃ (r : ), s) :
theorem Metric.mem_cocompact_iff_closedBall_compl_subset {α : Type u} {s : Set α} [] (c : α) :
∃ (r : ), s
theorem Metric.isBounded_range_iff {α : Type u} {β : Type v} {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 {α : Type u} {β : Type v} {f : βα} {s : Set β} :
Bornology.IsBounded (f '' s) ∃ (C : ), xs, ys, dist (f x) (f y) C
theorem Metric.isBounded_range_of_tendsto_cofinite_uniformity {α : Type u} {β : Type v} {f : βα} (hf : Filter.Tendsto (Prod.map f f) (Filter.cofinite ×ˢ Filter.cofinite) (uniformity α)) :
theorem Metric.isBounded_range_of_cauchy_map_cofinite {α : Type u} {β : Type v} {f : βα} (hf : Cauchy (Filter.map f Filter.cofinite)) :
theorem CauchySeq.isBounded_range {α : Type u} {f : α} (hf : ) :
theorem Metric.isBounded_range_of_tendsto_cofinite {α : Type u} {β : Type v} {f : βα} {a : α} (hf : Filter.Tendsto f Filter.cofinite (nhds a)) :
theorem Metric.isBounded_of_compactSpace {α : Type u} {s : Set α} [] :

In a compact space, all sets are bounded

theorem Metric.isBounded_range_of_tendsto {α : Type u} (u : α) {x : α} (hu : Filter.Tendsto u Filter.atTop (nhds x)) :
theorem Metric.disjoint_nhds_cobounded {α : Type u} (x : α) :
theorem Metric.disjoint_nhdsSet_cobounded {α : Type u} {s : Set α} (hs : ) :
theorem Metric.disjoint_cobounded_nhdsSet {α : Type u} {s : Set α} (hs : ) :
theorem Metric.exists_isBounded_image_of_tendsto {α : Type u_3} {β : Type u_4} {l : } {f : αβ} {x : β} (hf : Filter.Tendsto f l (nhds x)) :
sl, Bornology.IsBounded (f '' s)
theorem Metric.exists_isOpen_isBounded_image_inter_of_isCompact_of_forall_continuousWithinAt {α : Type u} {β : Type v} [] {k : Set β} {s : Set β} {f : βα} (hk : ) (hf : xk, ) :
∃ (t : Set β), k 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 {α : Type u} {β : Type v} [] {k : Set β} {f : βα} (hk : ) (hf : xk, ) :
∃ (t : Set β), k 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 {α : Type u} {β : Type v} [] {k : Set β} {s : Set β} {f : βα} (hk : ) (hks : k s) (hf : ) :
∃ (t : Set β), k 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 {α : Type u} {β : Type v} [] {k : Set β} {s : Set β} {f : βα} (hk : ) (hs : ) (hks : k s) (hf : ) :
∃ (t : Set β), k 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 {α : Type u} {s : Set α} [] (hc : ) (hb : ) :

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

theorem Bornology.IsBounded.isCompact_closure {α : Type u} {s : Set α} [] (h : ) :

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

theorem Metric.isCompact_iff_isClosed_bounded {α : Type u} {s : Set α} [] [] :

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

theorem totallyBounded_Icc {α : Type u} [] [] (a : α) (b : α) :
theorem totallyBounded_Ico {α : Type u} [] [] (a : α) (b : α) :
theorem totallyBounded_Ioc {α : Type u} [] [] (a : α) (b : α) :
theorem totallyBounded_Ioo {α : Type u} [] [] (a : α) (b : α) :
theorem Metric.isBounded_Icc {α : Type u} [] [] (a : α) (b : α) :
theorem Metric.isBounded_Ico {α : Type u} [] [] (a : α) (b : α) :
theorem Metric.isBounded_Ioc {α : Type u} [] [] (a : α) (b : α) :
theorem Metric.isBounded_Ioo {α : Type u} [] [] (a : α) (b : α) :
theorem Metric.isBounded_of_bddAbove_of_bddBelow {α : Type u} [] [] {s : Set α} (h₁ : ) (h₂ : ) :

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.

noncomputable def Metric.diam {α : Type u} (s : 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 EMetric.diam

Equations
Instances For
theorem Metric.diam_nonneg {α : Type u} {s : Set α} :
0

The diameter of a set is always nonnegative

theorem Metric.diam_subsingleton {α : Type u} {s : Set α} (hs : s.Subsingleton) :
= 0
@[simp]
theorem Metric.diam_empty {α : Type u} :

The empty set has zero diameter

@[simp]
theorem Metric.diam_singleton {α : Type u} {x : α} :

A singleton has zero diameter

@[simp]
theorem Metric.diam_zero {α : Type u} [Zero α] :
= 0
@[simp]
theorem Metric.diam_one {α : Type u} [One α] :
= 0
theorem Metric.diam_pair {α : Type u} {x : α} {y : α} :
Metric.diam {x, y} = dist x y
theorem Metric.diam_triple {α : Type u} {x : α} {y : α} {z : α} :
Metric.diam {x, y, z} = max (max (dist x y) (dist x z)) (dist y z)
theorem Metric.ediam_le_of_forall_dist_le {α : Type u} {s : Set α} {C : } (h : xs, ys, dist x y 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.diam_le_of_forall_dist_le {α : Type u} {s : Set α} {C : } (h₀ : 0 C) (h : xs, ys, dist x y C) :
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 {α : Type u} {s : Set α} (hs : s.Nonempty) {C : } (h : xs, ys, dist x y C) :
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' {α : Type u} {s : Set α} {x : α} {y : α} (h : ) (hx : x s) (hy : y s) :
dist x y

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

theorem Metric.isBounded_iff_ediam_ne_top {α : Type u} {s : Set α} :

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

theorem Bornology.IsBounded.ediam_ne_top {α : Type u} {s : Set α} :

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.

@[simp]
theorem Metric.ediam_univ_of_noncompact {α : Type u} [] [] :
EMetric.diam Set.univ =
@[simp]
theorem Metric.diam_univ_of_noncompact {α : Type u} [] [] :
Metric.diam Set.univ = 0
theorem Metric.dist_le_diam_of_mem {α : Type u} {s : Set α} {x : α} {y : α} (h : ) (hx : x s) (hy : y s) :
dist x y

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

theorem Metric.ediam_of_unbounded {α : Type u} {s : Set α} (h : ) :
theorem Metric.diam_eq_zero_of_unbounded {α : Type u} {s : Set α} (h : ) :
= 0

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 Metric.diam_mono {α : Type u} {s : Set α} {t : Set α} (h : s t) (ht : ) :

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

theorem Metric.diam_union {α : Type u} {s : Set α} {x : α} {y : α} {t : Set α} (xs : x s) (yt : y t) :
Metric.diam (s t) + dist x y +

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' {α : Type u} {s : Set α} {t : Set α} (h : (s t).Nonempty) :

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

theorem Metric.diam_le_of_subset_closedBall {α : Type u} {s : Set α} {x : α} {r : } (hr : 0 r) (h : s ) :
2 * r
theorem Metric.diam_closedBall {α : Type u} {x : α} {r : } (h : 0 r) :
2 * r

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

theorem Metric.diam_ball {α : Type u} {x : α} {r : } (h : 0 r) :

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

theorem IsComplete.nonempty_iInter_of_nonempty_biInter {α : Type u} {s : Set α} (h0 : IsComplete (s 0)) (hs : ∀ (n : ), IsClosed (s n)) (h's : ∀ (n : ), Bornology.IsBounded (s n)) (h : ∀ (N : ), (⋂ (n : ), ⋂ (_ : n N), s n).Nonempty) (h' : 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 {α : Type u} [] {s : Set α} (hs : ∀ (n : ), IsClosed (s n)) (h's : ∀ (n : ), Bornology.IsBounded (s n)) (h : ∀ (N : ), (⋂ (n : ), ⋂ (_ : n N), s n).Nonempty) (h' : 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.

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

Instances For
theorem tendsto_dist_right_cocompact_atTop {α : Type u} [] (x : α) :
Filter.Tendsto (fun (x_1 : α) => dist x_1 x) Filter.atTop
theorem tendsto_dist_left_cocompact_atTop {α : Type u} [] (x : α) :
Filter.Tendsto (dist x) Filter.atTop
theorem comap_dist_left_atTop_eq_cocompact {α : Type u} [] (x : α) :
Filter.comap (dist x) Filter.atTop =
theorem tendsto_cocompact_of_tendsto_dist_comp_atTop {α : Type u} {β : Type v} {f : βα} {l : } (x : α) (h : Filter.Tendsto (fun (y : β) => dist (f y) x) l Filter.atTop) :
theorem Metric.finite_isBounded_inter_isClosed {α : Type u} [] {K : Set α} {s : Set α} [] (hK : ) (hs : ) :
(K s).Finite