The areas / V13. General topology
Mathlib.Topology.MetricSpace.Basic
41 declarations and 3 deprecated aliases. Mathlib docs · Source
instance MetricSpace.instT0Space E0 #
∀ {γ : Type w} [inst : MetricSpace γ], T0Space γ
theorem Metric.isUniformEmbedding_iff' E1 #
∀ {β : Type v} {γ : Type w} [inst : MetricSpace γ] [inst_1 : PseudoMetricSpace β] {f : γ → β},
IsUniformEmbedding f ↔
(∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, dist a b < δ → dist (f a) (f b) < ε) ∧
∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, dist (f a) (f b) < ε → dist a b < δ
A map between metric spaces is a uniform embedding if and only if the distance between f x
and f y is controlled in terms of the distance between x and y and conversely.
abbrev MetricSpace.ofT0PseudoMetricSpace E1 #
(α : Type u_2) → [inst : PseudoMetricSpace α] → [T0Space α] → MetricSpace α
If a PseudoMetricSpace is a T₀ space, then it is a MetricSpace.
instance MetricSpace.toEMetricSpace E0 #
{γ : Type w} → [MetricSpace γ] → EMetricSpace γ
A metric space induces an emetric space
theorem Metric.isClosed_of_pairwise_le_dist E1 #
∀ {γ : Type w} [inst : MetricSpace γ] {s : Set γ} {ε : ℝ}, 0 < ε → (s.Pairwise fun x y ↦ ε ≤ dist x y) → IsClosed s
theorem Metric.isClosedEmbedding_of_pairwise_le_dist E1 #
∀ {γ : Type w} [inst : MetricSpace γ] {α : Type u_2} [inst_1 : TopologicalSpace α] [DiscreteTopology α] {ε : ℝ},
0 < ε → ∀ {f : α → γ}, (Pairwise fun x y ↦ ε ≤ dist (f x) (f y)) → Topology.IsClosedEmbedding f
theorem Metric.isUniformEmbedding_bot_of_pairwise_le_dist E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {β : Type u_2} {ε : ℝ},
0 < ε → ∀ {f : β → α}, (Pairwise fun x y ↦ ε ≤ dist (f x) (f y)) → IsUniformEmbedding f
If f : β → α sends any two distinct points to points at distance at least ε > 0, then
f is a uniform embedding with respect to the discrete uniformity on β.
abbrev EMetricSpace.toMetricSpaceOfDist E1 #
{α : Type u} →
[inst : EMetricSpace α] →
(dist : α → α → ℝ) →
(∀ (x y : α), 0 ≤ dist x y) → (∀ (x y : α), edist x y = ENNReal.ofReal (dist x y)) → MetricSpace α
One gets a metric space from an emetric space if the edistance is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the uniformity are defeq in the metric space and the emetric space. In this definition, the distance is given separately, to be able to prescribe some expression which is not defeq to the push-forward of the edistance to reals.
abbrev EMetricSpace.toMetricSpace E1 #
{α : Type u} → [inst : EMetricSpace α] → (∀ (x y : α), edist x y ≠ ⊤) → MetricSpace α
One gets a metric space from an emetric space if the edistance is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the uniformity are defeq in the metric space and the emetric space.
abbrev MetricSpace.induced E1 #
{γ : Type u_2} → {β : Type u_3} → (f : γ → β) → Function.Injective f → MetricSpace β → MetricSpace γ
Metric space structure pulled back by an injective function. Injectivity is necessary to
ensure that dist x y = 0 only if x = y.
abbrev IsUniformEmbedding.comapMetricSpace E1 #
{α : Type u_2} →
{β : Type u_3} → [inst : UniformSpace α] → [m : MetricSpace β] → (f : α → β) → IsUniformEmbedding f → MetricSpace α
Pull back a metric space structure by a uniform embedding. This is a version of
MetricSpace.induced useful in case if the domain already has a UniformSpace structure.
abbrev Topology.IsEmbedding.comapMetricSpace E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : TopologicalSpace α] → [m : MetricSpace β] → (f : α → β) → Topology.IsEmbedding f → MetricSpace α
Pull back a metric space structure by an embedding. This is a version of
MetricSpace.induced useful in case if the domain already has a TopologicalSpace structure.
instance Subtype.metricSpace E0 #
{α : Type u_2} → {p : α → Prop} → [MetricSpace α] → MetricSpace (Subtype p)
instance AddOpposite.instMetricSpace E0 #
{α : Type u_2} → [MetricSpace α] → MetricSpace αᵃᵒᵖ
instance MulOpposite.instMetricSpace E0 #
{α : Type u_2} → [MetricSpace α] → MetricSpace αᵐᵒᵖ
instance Real.metricSpace E3 #
MetricSpace ℝ
Instantiate the reals as a metric space.
instance instMetricSpaceNNReal E0 #
MetricSpace NNReal
theorem NNReal.isUniformEmbedding_coe E0 #
IsUniformEmbedding NNReal.toReal
theorem NNReal.isEmbedding_coe E0 #
Topology.IsEmbedding NNReal.toReal
theorem NNReal.isClosedEmbedding_coe E0 #
Topology.IsClosedEmbedding NNReal.toReal
instance instMetricSpaceULift E0 #
{β : Type v} → [MetricSpace β] → MetricSpace (ULift.{u_2, v} β)
instance Prod.metricSpaceMax E0 #
{β : Type v} → {γ : Type w} → [MetricSpace γ] → [MetricSpace β] → MetricSpace (γ × β)
instance metricSpacePi E3 #
{β : Type v} → {X : β → Type u_2} → [Fintype β] → [(b : β) → MetricSpace (X b)] → MetricSpace ((b : β) → X b)
A finite product of metric spaces is a metric space, with the sup distance.
theorem Metric.secondCountable_of_countable_discretization E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α],
(∀ ε > 0, ∃ β x F, ∀ (x y : α), F x = F y → dist x y ≤ ε) → SecondCountableTopology α
A metric space is second countable if one can reconstruct up to any ε>0 any element of the
space from countably many data.
theorem dist_congr_right E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {x y z : α}, dist x y = 0 → dist x z = dist y z
theorem dist_congr_left E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {x y z : α}, dist x y = 0 → dist z x = dist z y
theorem dist_congr E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {w x y z : α}, dist w x = 0 → dist y z = 0 → dist w y = dist x z
instance SeparationQuotient.instDist E0 #
{α : Type u} → [inst : PseudoMetricSpace α] → Dist (SeparationQuotient α)
theorem SeparationQuotient.dist_mk E0 #
∀ {α : Type u} [inst : PseudoMetricSpace α] (p q : α),
dist (SeparationQuotient.mk p) (SeparationQuotient.mk q) = dist p q
instance SeparationQuotient.instMetricSpace E0 #
{α : Type u} → [inst : PseudoMetricSpace α] → MetricSpace (SeparationQuotient α)
theorem nnDist_congr_right E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {x y z : α}, nnDist x y = 0 → nnDist x z = nnDist y z
theorem nnDist_congr_left E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {x y z : α}, nnDist x y = 0 → nnDist z x = nnDist z y
theorem nnDist_congr E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {w x y z : α}, nnDist w x = 0 → nnDist y z = 0 → nnDist w y = nnDist x z
abbrev PseudoEMetricSpace.replaceEDist E1 #
{X : Type u_2} → (m : PseudoEMetricSpace X) → (d : X → X → ENNReal) → d = edist → PseudoEMetricSpace X
Build new pseudoemetric space from an old one where the edistance is provably (but typically non-definitionally) equal to some given edistance. We also provide convenience versions for PseudoMetric, Emetric and Metric spaces.
theorem PseudoEMetricSpace.replaceEDist_eq E0 #
∀ {X : Type u_2} (m : PseudoEMetricSpace X) (d : X → X → ENNReal) (hd : d = edist), m.replaceEDist d hd = m
abbrev PseudoMetricSpace.replaceDist E1 #
{X : Type u_2} → (m : PseudoMetricSpace X) → (d : X → X → ℝ) → d = dist → PseudoMetricSpace X
Build new pseudometric space from an old one where the distance is provably (but typically non-definitionally) equal to some given distance. We also provide convenience versions for PseudoEMetric, Emetric and Metric spaces.
theorem PseudoMetricSpace.replaceDist_eq E0 #
∀ {X : Type u_2} (m : PseudoMetricSpace X) (d : X → X → ℝ) (hd : d = dist), m.replaceDist d hd = m
abbrev EMetricSpace.replaceEDist E1 #
{X : Type u_2} → (m : EMetricSpace X) → (d : X → X → ENNReal) → d = edist → EMetricSpace X
Build new emetric space from an old one where the edistance is provably (but typically non-definitionally) equal to some given edistance. We also provide convenience versions for PseudoEMetric, PseudoMetric and Metric spaces.
theorem EMetricSpace.replaceEDist_eq E0 #
∀ {X : Type u_2} (m : EMetricSpace X) (d : X → X → ENNReal) (hd : d = edist), m.replaceEDist d hd = m
abbrev MetricSpace.replaceDist E1 #
{X : Type u_2} → (m : MetricSpace X) → (d : X → X → ℝ) → d = dist → MetricSpace X
Build new metric space from an old one where the distance is provably (but typically non-definitionally) equal to some given distance. We also provide convenience versions for PseudoEMetric, PseudoMatric and EMetric spaces.
theorem MetricSpace.replaceDist_eq E0 #
∀ {X : Type u_2} (m : MetricSpace X) (d : X → X → ℝ) (hd : d = dist), m.replaceDist d hd = m
Deprecated aliases
| Name | New name | Since |
|---|---|---|
nndist_congr | nnDist_congr | 2026-11-07 |
nndist_congr_left | nnDist_congr_left | 2026-11-07 |
nndist_congr_right | nnDist_congr_right | 2026-11-07 |