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.EMetricSpace.Basic

38 declarations and 3 deprecated aliases. Mathlib docs · Source

Extended metric spaces

Further results about extended metric spaces.

Separation quotient

theorem edist_le_Ico_sum_edist E1 #

∀ {α : Type u} [inst : TopologicalSpace α] [inst_1 : WeakPseudoEMetricSpace α] (f : ℕ → α) {m n : ℕ},
  m ≤ n → edist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, edist (f i) (f (i + 1))

The triangle (polygon) inequality for sequences of points; Finset.Ico version.

theorem edist_le_range_sum_edist E1 #

∀ {α : Type u} [inst : TopologicalSpace α] [inst_1 : WeakPseudoEMetricSpace α] (f : ℕ → α) (n : ℕ),
  edist (f 0) (f n) ≤ ∑ i ∈ Finset.range n, edist (f i) (f (i + 1))

The triangle (polygon) inequality for sequences of points; Finset.range version.

theorem edist_le_Ico_sum_of_edist_le E1 #

∀ {α : Type u} [inst : TopologicalSpace α] [inst_1 : WeakPseudoEMetricSpace α] {f : ℕ → α} {m n : ℕ},
  m ≤ n →
    ∀ {d : ℕ → ENNReal},
      (∀ {k : ℕ}, m ≤ k → k < n → edist (f k) (f (k + 1)) ≤ d k) → edist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, d i

A version of edist_le_Ico_sum_edist with each intermediate distance replaced with an upper estimate.

theorem edist_le_range_sum_of_edist_le E1 #

∀ {α : Type u} [inst : TopologicalSpace α] [inst_1 : WeakPseudoEMetricSpace α] {f : ℕ → α} (n : ℕ) {d : ℕ → ENNReal},
  (∀ {k : ℕ}, k < n → edist (f k) (f (k + 1)) ≤ d k) → edist (f 0) (f n) ≤ ∑ i ∈ Finset.range n, d i

A version of edist_le_range_sum_edist with each intermediate distance replaced with an upper estimate.

theorem EMetric.isUniformInducing_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [inst_1 : PseudoEMetricSpace β] {f : γ → β},
  IsUniformInducing f ↔ UniformContinuous f ∧ ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ

theorem EMetric.isUniformEmbedding_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [inst_1 : PseudoEMetricSpace β] {f : γ → β},
  IsUniformEmbedding f ↔
    Function.Injective f ∧ UniformContinuous f ∧ ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ

ε-δ characterization of uniform embeddings on pseudoemetric spaces

theorem EMetric.controlled_of_isUniformInducing E1 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [inst_1 : PseudoEMetricSpace β] {f : γ → β},
  IsUniformInducing f →
    (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, edist a b < δ → edist (f a) (f b) < ε) ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ

If a map between pseudoemetric spaces is a uniform inducing map then the edistance between f x and f y is controlled in terms of the distance between x and y.

theorem EMetric.cauchy_iff E0 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] {f : Filter γ},
  Cauchy f ↔ f ≠ ⊥ ∧ ∀ ε > 0, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, edist x y < ε

ε-δ characterization of Cauchy sequences on pseudoemetric spaces

theorem EMetric.complete_of_convergent_controlled_sequences E1 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] (B : ℕ → ENNReal),
  (∀ (n : ℕ), 0 < B n) →
    (∀ (u : ℕ → γ),
        (∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (u n) (u m) < B N) → ∃ x, Filter.Tendsto u Filter.atTop (nhds x)) →
      CompleteSpace γ

A very useful criterion to show that a space is complete is to show that all sequences which satisfy a bound of the form edist (u n) (u m) < B N for all n m ≥ N are converging. This is often applied for B N = 2^{-N}, i.e., with a very fast convergence to 0, which makes it possible to use arguments of converging series, while this is impossible to do in general for arbitrary Cauchy sequences.

theorem EMetric.complete_of_cauchySeq_tendsto E1 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ],
  (∀ (u : ℕ → γ), CauchySeq u → ∃ a, Filter.Tendsto u Filter.atTop (nhds a)) → CompleteSpace γ

A sequentially complete pseudoemetric space is complete.

theorem EMetric.tendstoLocallyUniformlyOn_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] {ι : Type u_2} [inst_1 : TopologicalSpace β] {F : ι → β → γ}
  {f : β → γ} {p : Filter ι} {s : Set β},
  TendstoLocallyUniformlyOn F f p s ↔
    ∀ ε > 0, ∀ x ∈ s, ∃ t ∈ nhdsWithin x s, ∀ᶠ (n : ι) in p, ∀ y ∈ t, edist (f y) (F n y) < ε

Expressing locally uniform convergence on a set using edist.

theorem EMetric.tendstoUniformlyOn_iff E3 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] {ι : Type u_2} {F : ι → β → γ} {f : β → γ} {p : Filter ι}
  {s : Set β}, TendstoUniformlyOn F f p s ↔ ∀ ε > 0, ∀ᶠ (n : ι) in p, ∀ x ∈ s, edist (f x) (F n x) < ε

Expressing uniform convergence on a set using edist.

theorem EMetric.tendstoLocallyUniformly_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] {ι : Type u_2} [inst_1 : TopologicalSpace β] {F : ι → β → γ}
  {f : β → γ} {p : Filter ι},
  TendstoLocallyUniformly F f p ↔ ∀ ε > 0, ∀ (x : β), ∃ t ∈ nhds x, ∀ᶠ (n : ι) in p, ∀ y ∈ t, edist (f y) (F n y) < ε

Expressing locally uniform convergence using edist.

theorem EMetric.tendstoUniformly_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] {ι : Type u_2} {F : ι → β → γ} {f : β → γ} {p : Filter ι},
  TendstoUniformly F f p ↔ ∀ ε > 0, ∀ᶠ (n : ι) in p, ∀ (x : β), edist (f x) (F n x) < ε

Expressing uniform convergence using edist.

theorem EMetric.inseparable_iff E0 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] {x y : γ}, Inseparable x y ↔ edist x y = 0

theorem Inseparable.edist_eq_zero E1 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] {x y : γ}, Inseparable x y → edist x y = 0

Alias of the forward direction of EMetric.inseparable_iff.

theorem EMetric.cauchySeq_iff E0 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [Nonempty β] [inst_2 : SemilatticeSup β] {u : β → γ},
  CauchySeq u ↔ ∀ ε > 0, ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → edist (u m) (u n) < ε

In a pseudoemetric space, Cauchy sequences are characterized by the fact that, eventually, the pseudoedistance between its elements is arbitrarily small

theorem EMetric.cauchySeq_iff' E1 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [Nonempty β] [inst_2 : SemilatticeSup β] {u : β → γ},
  CauchySeq u ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, edist (u n) (u N) < ε

A variation around the emetric characterization of Cauchy sequences

theorem EMetric.cauchySeq_iff_NNReal E1 #

∀ {γ : Type u} {β : Type v} [inst : PseudoEMetricSpace γ] [Nonempty β] [inst_2 : SemilatticeSup β] {u : β → γ},
  CauchySeq u ↔ ∀ (ε : NNReal), 0 < ε → ∃ N, ∀ (n : β), N ≤ n → edist (u n) (u N) < ↑ε

A variation of the emetric characterization of Cauchy sequences that deals with ℝ≥0 upper bounds.

theorem EMetric.totallyBounded_iff E0 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] {s : Set γ},
  TotallyBounded s ↔ ∀ ε > 0, ∃ t, t.Finite ∧ s ⊆ ⋃ y ∈ t, Metric.eball y ε

theorem EMetric.totallyBounded_iff' E1 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ] {s : Set γ},
  TotallyBounded s ↔ ∀ ε > 0, ∃ t ⊆ s, t.Finite ∧ s ⊆ ⋃ y ∈ t, Metric.eball y ε

theorem EMetric.subset_countable_closure_of_almost_dense_set E1 #

∀ {α : Type u} [inst : TopologicalSpace α] [inst_1 : WeakPseudoEMetricSpace α] (s : Set α),
  (∀ ε > 0, ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, Metric.closedEBall x ε) → ∃ t ⊆ s, t.Countable ∧ s ⊆ closure t

For a set s in a weak pseudo emetric space, if for every ε > 0 there exists a countable set that is ε-dense in s, then there exists a countable subset t ⊆ s that is dense in s.

instance EMetric.secondCountable_of_sigmaCompact E0 #

∀ (γ : Type u) [inst : PseudoEMetricSpace γ] [SigmaCompactSpace γ], SecondCountableTopology γ

A sigma compact pseudo emetric space has second countable topology.

theorem EMetric.secondCountable_of_almost_dense_set E1 #

∀ {γ : Type u} [inst : PseudoEMetricSpace γ],
  (∀ ε > 0, ∃ t, t.Countable ∧ ⋃ x ∈ t, Metric.closedEBall x ε = Set.univ) → SecondCountableTopology γ

instance EMetricSpace.instT0Space E0 #

∀ {γ : Type w} [inst : EMetricSpace γ], T0Space γ

An emetric space is separated

theorem EMetric.isUniformEmbedding_iff' E1 #

∀ {β : Type v} {γ : Type w} [inst : EMetricSpace γ] [inst_1 : PseudoEMetricSpace β] {f : γ → β},
  IsUniformEmbedding f ↔
    (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, edist a b < δ → edist (f a) (f b) < ε) ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ

A map between emetric spaces is a uniform embedding if and only if the edistance between f x and f y is controlled in terms of the distance between x and y and conversely.

abbrev EMetricSpace.ofT0PseudoEMetricSpace E1 #

(α : Type u_2) → [inst : PseudoEMetricSpace α] → [T0Space α] → EMetricSpace α

If a PseudoEMetricSpace is a T₀ space, then it is an EMetricSpace.

instance Prod.emetricSpaceMax E0 #

{β : Type v} → {γ : Type w} → [EMetricSpace γ] → [EMetricSpace β] → EMetricSpace (γ × β)

The product of two emetric spaces, with the max distance, is an extended metric spaces. We make sure that the uniform structure thus constructed is the one corresponding to the product of uniform spaces, to avoid diamond problems.

theorem EMetric.countable_closure_of_compact E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ}, IsCompact s → ∃ t ⊆ s, t.Countable ∧ s = closure t

A compact set in an emetric space is separable, i.e., it is the closure of a countable set.

instance instEDistSeparationQuotient E0 #

{X : Type u_1} → [inst : PseudoEMetricSpace X] → EDist (SeparationQuotient X)

theorem SeparationQuotient.edist_mk E0 #

∀ {X : Type u_1} [inst : PseudoEMetricSpace X] (x y : X),
  edist (SeparationQuotient.mk x) (SeparationQuotient.mk y) = edist x y

instance instEMetricSpaceSeparationQuotient E0 #

{X : Type u_1} → [inst : PseudoEMetricSpace X] → EMetricSpace (SeparationQuotient X)

theorem lebesgue_number_lemma_of_emetric E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {ι : Sort u_2} {c : ι → Set γ},
  IsCompact s → (∀ (i : ι), IsOpen (c i)) → s ⊆ ⋃ i, c i → ∃ δ > 0, ∀ x ∈ s, ∃ i, Metric.eball x δ ⊆ c i

theorem lebesgue_number_lemma_of_emetric_nhds' E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {c : (x : γ) → x ∈ s → Set γ},
  IsCompact s → (∀ (x : γ) (hx : x ∈ s), c x hx ∈ nhds x) → ∃ δ > 0, ∀ x ∈ s, ∃ y, Metric.eball x δ ⊆ c ↑y ⋯

theorem lebesgue_number_lemma_of_emetric_nhds E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {c : γ → Set γ},
  IsCompact s → (∀ x ∈ s, c x ∈ nhds x) → ∃ δ > 0, ∀ x ∈ s, ∃ y, Metric.eball x δ ⊆ c y

theorem lebesgue_number_lemma_of_emetric_nhdsWithin' E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {c : (x : γ) → x ∈ s → Set γ},
  IsCompact s → (∀ (x : γ) (hx : x ∈ s), c x hx ∈ nhdsWithin x s) → ∃ δ > 0, ∀ x ∈ s, ∃ y, Metric.eball x δ ∩ s ⊆ c ↑y ⋯

theorem lebesgue_number_lemma_of_emetric_nhdsWithin E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {c : γ → Set γ},
  IsCompact s → (∀ x ∈ s, c x ∈ nhdsWithin x s) → ∃ δ > 0, ∀ x ∈ s, ∃ y, Metric.eball x δ ∩ s ⊆ c y

theorem lebesgue_number_lemma_of_emetric_sUnion E1 #

∀ {γ : Type w} [inst : EMetricSpace γ] {s : Set γ} {c : Set (Set γ)},
  IsCompact s → (∀ t ∈ c, IsOpen t) → s ⊆ ⋃₀ c → ∃ δ > 0, ∀ x ∈ s, ∃ t ∈ c, Metric.eball x δ ⊆ t

Deprecated aliases

NameNew nameSince
EMetric.nontrivial_iff_nontrivialTopologynontrivial_iff_nontrivialTopology2026-07-31
EMetric.subset_countable_closure_of_compactIsCompact.exists_countable_dense_subset2026-08-06
EMetric.subsingleton_iff_indiscreteTopologysubsingleton_iff_indiscreteTopology2026-07-31