Metric spaces
ClassMetric space#
A metric space is a type endowed with a ℝ-valued distance dist satisfying
dist x y = 0 ↔ x = y, commutativity dist x y = dist y x, and the triangle inequality
dist x z ≤ dist x y + dist y z.
See pseudometric spaces (PseudoMetricSpace) for the similar class with the dist x y = 0 ↔ x = y
assumption weakened to dist x x = 0.
Any metric space is a T1 topological space and a uniform space (see TopologicalSpace, T1Space,
UniformSpace), where the topology and uniformity come from the metric.
We make the uniformity/topology part of the data instead of deriving it from the metric.
This e.g. ensures that we do not get a diamond when doing
[MetricSpace α] [MetricSpace β] : TopologicalSpace (α × β):
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance].
MetricSpace.{u} (α : Type u) : Type u
Sources
Uses 2 · Used by 45
DefinitionBall#
ball x ε is the set of all points y with dist y x < ε
Metric.ball.{u} {α : Type u} [PseudoMetricSpace α] (x : α) (ε : ℝ) : Set α
Sources
Uses 2 · Used by 14
TheoremSequential compactness is equivalent to compactness (Bolzano-Weierstrass)#
A version of Bolzano-Weierstrass: in a (pseudo)metrizable space, a set is compact if and only if it is sequentially compact.
isCompact_iff_isSeqCompact.{u_1} {X : Type u_1} [TopologicalSpace X]
[TopologicalSpace.PseudoMetrizableSpace X] {s : Set X} : IsCompact s ↔ IsSeqCompact s
Sources
Uses 5
TheoremHeine-Borel theorem (proper metric space version)#
The Heine–Borel theorem: In a proper metric space, a set is compact if and only if it is closed and bounded.
Metric.isCompact_iff_isClosed_bounded.{u_2} {α : Type u_2} {s : Set α} [MetricSpace α]
[ProperSpace α] : IsCompact s ↔ IsClosed s ∧ Bornology.IsBounded s
The 1000+ list (Q253214) also cites FiniteDimensional.proper.
Sources
- Mathlib documentation:
Metric.isCompact_iff_isClosed_bounded - Source of
Metric.isCompact_iff_isClosed_boundedin Mathlib/Topology/MetricSpace/Bounded.lean - Mathlib overview: Topology › Metric spaces
- Mathlib undergraduate list: Single Variable Real Analysis › Topology of R
- 1000+ theorems list: Q253214
- 1000+ theorems project: Q253214
- Wikipedia: Heine–Borel theorem
- Wikidata: Q253214
Uses 4 · Used by 2
DefinitionLipschitz continuity#
A function f is Lipschitz continuous with constant K ≥ 0 if for all x, y
we have dist (f x) (f y) ≤ K * dist x y.
LipschitzWith.{u, v} {α : Type u} {β : Type v} [PseudoEMetricSpace α] [PseudoEMetricSpace β]
(K : NNReal) (f : α → β) : Prop
Sources
Uses 1 · Used by 14
DefinitionHölder continuity#
A function f : X → Y between two PseudoEMetricSpaces is Hölder continuous with constant
C : ℝ≥0 and exponent r : ℝ≥0, if edist (f x) (f y) ≤ C * edist x y ^ r for all x y : X.
HolderWith.{u_1, u_2} {X : Type u_1} {Y : Type u_2} [PseudoEMetricSpace X] [PseudoEMetricSpace Y]
(C r : NNReal) (f : X → Y) : Prop
Sources
Uses 1
TheoremContraction mapping theorem#
Banach fixed-point theorem, contraction mapping theorem, EMetricSpace version.
A contracting map on a complete metric space has a fixed point.
We include more conclusions in this theorem to avoid proving them again later.
The main API for this theorem are the functions efixedPoint and fixedPoint,
and lemmas about these functions.
ContractingWith.exists_fixedPoint.{u_1} {α : Type u_1} [EMetricSpace α] {K : NNReal} {f : α → α}
[CompleteSpace α] (hf : ContractingWith K f) (x : α) (hx : edist x (f x) ≠ ⊤) :
∃ y,
Function.IsFixedPt f y ∧
Filter.Tendsto (fun n => f^[n] x) Filter.atTop (nhds y) ∧
∀ (n : ℕ), edist (f^[n] x) y ≤ edist x (f x) * ↑K ^ n / (1 - ↑K)
Sources
- Mathlib documentation:
ContractingWith.exists_fixedPoint - Source of
ContractingWith.exists_fixedPointin Mathlib/Topology/MetricSpace/Contracting.lean - Mathlib overview: Topology › Metric spaces
- Mathlib undergraduate list: Topology › Topology and Metric Spaces
- 1000+ theorems list: Q220680
- 1000+ theorems project: Q220680
- Wikipedia: Banach fixed-point theorem
- Wikidata: Q220680
Uses 4
TheoremBaire theorem#
First Baire theorem: a completely pseudometrizable topological space has Baire property.
BaireSpace.of_completelyPseudoMetrizable.{u_1} {X : Type u_1} [TopologicalSpace X]
[TopologicalSpace.IsCompletelyPseudoMetrizableSpace X] : BaireSpace X
The 1000+ list (Q1052678) also cites BaireSpace.of_t2Space_locallyCompactSpace.
Sources
- Mathlib documentation:
BaireSpace.of_completelyPseudoMetrizable - Source of
BaireSpace.of_completelyPseudoMetrizablein Mathlib/Topology/Baire/CompleteMetrizable.lean - Mathlib overview: Topology › Metric spaces
- 1000+ theorems list: Q1052678
- 1000+ theorems project: Q1052678
- Wikipedia: Baire category theorem
- Wikidata: Q1052678
Uses 5 · Used by 2
TheoremArzela-Ascoli theorem#
Third \(main\) version, with pointwise equicontinuity and range in a compact subset, but without closedness. The closure is then compact.
BoundedContinuousFunction.arzela_ascoli.{u, v} {α : Type u} {β : Type v} [TopologicalSpace α]
[CompactSpace α] [PseudoMetricSpace β] [T2Space β] (s : Set β) (hs : IsCompact s)
(A : Set (BoundedContinuousFunction α β))
(in_s : ∀ (f : BoundedContinuousFunction α β) (x : α), f ∈ A → f x ∈ s)
(H : Equicontinuous fun x => ⇑↑x) : IsCompact (closure A)
Sources
- Mathlib documentation:
BoundedContinuousFunction.arzela_ascoli - Source of
BoundedContinuousFunction.arzela_ascoliin Mathlib/Topology/ContinuousMap/Bounded/ArzelaAscoli.lean - Mathlib overview: Topology › Metric spaces
- Mathlib undergraduate list: Topology › Normed vector spaces on \(\R\) and \(\C\)
- 1000+ theorems list: Q1477053
- 1000+ theorems project: Q1477053
- Wikipedia: Arzelà–Ascoli theorem
- Wikidata: Q1477053
Uses 10
DefinitionHausdorff distance#
The Hausdorff edistance between two sets is the smallest r such that each set
is contained in the r-neighborhood of the other one
Metric.hausdorffEDist.{u} {α : Type u} [PseudoEMetricSpace α] (s t : Set α) : ENNReal
Sources
Uses 1
DefinitionGromov-Hausdorff space#
The Gromov-Hausdorff space
GromovHausdorff.GHSpace : Type
Sources
Uses 3
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.