Metric spaces #
This file defines metric spaces. Many definitions and theorems expected on metric spaces are already introduced on uniform spaces and topological spaces. For example: open and closed sets, compactness, completeness, continuity and uniform continuity
Main definitions #
has_dist α
: Endows a spaceα
with a functiondist a b
.pseudo_metric_space α
: A space endowed with a distance function, which can be zero even if the two elements are non-equal.metric.ball x ε
: The set of all pointsy
withdist y x < ε
.metric.bounded s
: Whether a subset of apseudo_metric_space
is bounded.metric_space α
: Apseudo_metric_space
with the guaranteedist x y = 0 → x = y
.
Additional useful definitions:
nndist a b
:dist
as a function to the non-negative reals.metric.closed_ball x ε
: The set of all pointsy
withdist y x ≤ ε
.metric.sphere x ε
: The set of all pointsy
withdist y x = ε
.proper_space α
: Apseudo_metric_space
where all closed balls are compact.metric.diam s
: Thesupr
of the distances of members ofs
. Defined in terms ofemetric.diam
, for better handling of the case when it should be infinite.
TODO (anyone): Add "Main results" section.
Implementation notes #
Since a lot of elementary properties don't require eq_of_dist_eq_zero
we start setting up the
theory of pseudo_metric_space
, where we don't require dist x y = 0 → x = y
and we specialize
to metric_space
at the end.
Tags #
metric, pseudo_metric, dist
Construct a uniform structure core from a distance function and metric space axioms.
This is a technical construction that can be immediately used to construct a uniform structure
from a distance function and metric space axioms but is also useful when discussing
metrizable topologies, see pseudo_metric_space.of_metrizable
.
Construct a uniform structure from a distance function and metric space axioms
Equations
- uniform_space_of_dist dist dist_self dist_comm dist_triangle = uniform_space.of_core (uniform_space.core_of_dist dist dist_self dist_comm dist_triangle)
Construct a bornology from a distance function and metric space axioms.
Equations
- bornology.of_dist dist dist_self dist_comm dist_triangle = bornology.of_bounded {s : set α | ∃ (C : ℝ), ∀ ⦃x y : α⦄, x ∈ s → y ∈ s → dist x y ≤ C} _ _ _ _
- dist : α → α → ℝ
The distance function (given an ambient metric space on α
), which returns
a nonnegative real number dist x y
given x y : α
.
- to_has_dist : has_dist α
- dist_self : ∀ (x : α), dist x x = 0
- dist_comm : ∀ (x y : α), dist x y = dist y x
- dist_triangle : ∀ (x y z : α), dist x z ≤ dist x y + dist y z
- edist : α → α → ℝ≥0∞
- edist_dist : (∀ (x y : α), pseudo_metric_space.edist x y = ennreal.of_real (dist x y)) . "edist_dist_tac"
- to_uniform_space : uniform_space α
- uniformity_dist : (𝓤 α = ⨅ (ε : ℝ) (H : ε > 0), 𝓟 {p : α × α | dist p.fst p.snd < ε}) . "control_laws_tac"
- to_bornology : bornology α
- cobounded_sets : (bornology.cobounded α).sets = {s : set α | ∃ (C : ℝ), ∀ ⦃x y : α⦄, x ∈ sᶜ → y ∈ sᶜ → dist x y ≤ C} . "control_laws_tac"
Metric space
Each metric space induces a canonical uniform_space
and hence a canonical topological_space
.
This is enforced in the type class definition, by extending the uniform_space
structure. When
instantiating a metric_space
structure, the uniformity fields are not necessary, they will be
filled in by default. In the same way, each metric space induces an emetric space structure.
It is included in the structure, but filled in by default.
Two pseudo metric space structures with the same distance function coincide.
Equations
Construct a pseudo-metric space structure whose underlying topological space structure (definitionally) agrees which a pre-existing topology which is compatible with a given distance function.
Equations
- pseudo_metric_space.of_metrizable dist dist_self dist_comm dist_triangle H = {to_has_dist := {dist := dist}, dist_self := dist_self, dist_comm := dist_comm, dist_triangle := dist_triangle, edist := λ (x y : α), ↑⟨dist x y, _⟩, edist_dist := _, to_uniform_space := {to_topological_space := _inst_2, to_core := {uniformity := (uniform_space.core_of_dist dist dist_self dist_comm dist_triangle).uniformity, refl := _, symm := _, comp := _}, is_open_uniformity := _}, uniformity_dist := _, to_bornology := bornology.of_dist dist dist_self dist_comm dist_triangle, cobounded_sets := _}
The triangle (polygon) inequality for sequences of points; finset.Ico
version.
The triangle (polygon) inequality for sequences of points; finset.range
version.
A version of dist_le_Ico_sum_dist
with each intermediate distance replaced
with an upper estimate.
A version of dist_le_range_sum_dist
with each intermediate distance replaced
with an upper estimate.
Distance as a nonnegative real number.
Express nndist
in terms of edist
Express edist
in terms of nndist
In a pseudometric space, the extended distance is always finite
In a pseudometric space, the extended distance is always finite
nndist x x
vanishes
Express dist
in terms of nndist
Express nndist
in terms of dist
Triangle inequality for the nonnegative distance
Express dist
in terms of edist
ball x ε
is the set of all points y
with dist y x < ε
Equations
- metric.ball x ε = {y : α | dist y x < ε}
closed_ball x ε
is the set of all points y
with dist y x ≤ ε
Equations
- metric.closed_ball x ε = {y : α | dist y x ≤ ε}
sphere x ε
is the set of all points y
with dist y x = ε
Equations
- metric.sphere x ε = {y : α | dist y x = ε}
If a property holds for all points in closed balls of arbitrarily large radii, then it holds for all points.
If a property holds for all points in balls of arbitrarily large radii, then it holds for all points.
Given f : β → ℝ
, if f
sends {i | p i}
to a set of positive numbers
accumulating to zero, then f i
-neighborhoods of the diagonal form a basis of 𝓤 α
.
For specific bases see uniformity_basis_dist
, uniformity_basis_dist_inv_nat_succ
,
and uniformity_basis_dist_inv_nat_pos
.
Given f : β → ℝ
, if f
sends {i | p i}
to a set of positive numbers
accumulating to zero, then closed neighborhoods of the diagonal of sizes {f i | p i}
form a basis of 𝓤 α
.
Currently we have only one specific basis uniformity_basis_dist_le
based on this constructor.
More can be easily added if needed in the future.
If a map between pseudometric spaces is a uniform embedding then the distance between f x
and f y
is controlled in terms of the distance between x
and y
.
A pseudometric space is totally bounded if one can reconstruct up to any ε>0 any element of the space from finitely many data.
Expressing locally uniform convergence on a set using dist
.
Expressing uniform convergence on a set using dist
.
Expressing locally uniform convergence using dist
.
Expressing uniform convergence using dist
.
A variant of tendsto_at_top
that
uses ∃ N, ∀ n > N, ...
rather than ∃ N, ∀ n ≥ N, ...
Given a point x
in a discrete subset s
of a pseudometric space, there is an open ball
centered at x
and intersecting s
only at x
.
Given a point x
in a discrete subset s
of a pseudometric space, there is a closed ball
of positive radius centered at x
and intersecting s
only at x
.
A pseudometric space induces a pseudoemetric space
Equations
- pseudo_metric_space.to_pseudo_emetric_space = {to_has_edist := {edist := edist pseudo_metric_space.to_has_edist}, edist_self := _, edist_comm := _, edist_triangle := _, to_uniform_space := pseudo_metric_space.to_uniform_space _inst_1, uniformity_edist := _}
In a pseudometric space, an open ball of infinite radius is the whole space
Balls defined using the distance or the edistance coincide
Balls defined using the distance or the edistance coincide
Closed balls defined using the distance or the edistance coincide
Closed balls defined using the distance or the edistance coincide
Build a new pseudometric space from an old one where the bundled uniform structure is provably (but typically non-definitionaly) equal to some given uniform structure. See Note [forgetful inheritance].
Equations
- m.replace_uniformity H = {to_has_dist := {dist := dist pseudo_metric_space.to_has_dist}, dist_self := _, dist_comm := _, dist_triangle := _, edist := edist pseudo_metric_space.to_has_edist, edist_dist := _, to_uniform_space := U, uniformity_dist := _, to_bornology := bornology.of_dist dist dist_self dist_comm dist_triangle, cobounded_sets := _}
One gets a pseudometric 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 pseudometric space and the pseudoemetric 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.
Equations
- pseudo_emetric_space.to_pseudo_metric_space_of_dist dist edist_ne_top h = let m : pseudo_metric_space α := {to_has_dist := {dist := dist}, dist_self := _, dist_comm := _, dist_triangle := _, edist := λ (x y : α), edist x y, edist_dist := _, to_uniform_space := uniform_space_of_dist dist _ _ _, uniformity_dist := _, to_bornology := bornology.of_dist dist _ _ _, cobounded_sets := _} in m.replace_uniformity _
One gets a pseudometric 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 pseudometric space and the emetric space.
Equations
- pseudo_emetric_space.to_pseudo_metric_space h = pseudo_emetric_space.to_pseudo_metric_space_of_dist (λ (x y : α), (edist x y).to_real) h pseudo_emetric_space.to_pseudo_metric_space._proof_1
A very useful criterion to show that a space is complete is to show that all sequences
which satisfy a bound of the form dist (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.
Instantiate the reals as a pseudometric space.
Equations
- real.pseudo_metric_space = {to_has_dist := {dist := λ (x y : ℝ), |x - y|}, dist_self := real.pseudo_metric_space._proof_1, dist_comm := real.pseudo_metric_space._proof_2, dist_triangle := real.pseudo_metric_space._proof_3, edist := λ (x y : ℝ), ↑⟨(λ (x y : ℝ), |x - y|) x y, _⟩, edist_dist := real.pseudo_metric_space._proof_5, to_uniform_space := uniform_space_of_dist (λ (x y : ℝ), |x - y|) real.pseudo_metric_space._proof_6 real.pseudo_metric_space._proof_7 real.pseudo_metric_space._proof_8, uniformity_dist := real.pseudo_metric_space._proof_9, to_bornology := bornology.of_dist (λ (x y : ℝ), |x - y|) real.pseudo_metric_space._proof_10 real.pseudo_metric_space._proof_11 real.pseudo_metric_space._proof_12, cobounded_sets := real.pseudo_metric_space._proof_13}
Special case of the sandwich theorem; see tendsto_of_tendsto_of_tendsto_of_le_of_le'
for the
general case.
Special case of the sandwich theorem; see tendsto_of_tendsto_of_tendsto_of_le_of_le
and tendsto_of_tendsto_of_tendsto_of_le_of_le'
for the general case.
Alias of filter.tendsto.congr_dist
.
If u
is a neighborhood of x
, then for small enough r
, the closed ball
closed_ball x r
is contained in u
.
In a pseudometric space, Cauchy sequences are characterized by the fact that, eventually, the distance between its elements is arbitrarily small
A variation around the pseudometric characterization of Cauchy sequences
If the distance between s n
and s m
, n ≤ m
is bounded above by b n
and b
converges to zero, then s
is a Cauchy sequence.
If the distance between s n
and s m
, n, m ≥ N
is bounded above by b N
and b
converges to zero, then s
is a Cauchy sequence.
A Cauchy sequence on the natural numbers is bounded.
Yet another metric characterization of Cauchy sequences on integers. This one is often the most efficient.
Pseudometric space structure pulled back by a function.
Equations
- pseudo_metric_space.induced f m = {to_has_dist := {dist := λ (x y : α), dist (f x) (f y)}, dist_self := _, dist_comm := _, dist_triangle := _, edist := λ (x y : α), edist (f x) (f y), edist_dist := _, to_uniform_space := uniform_space.comap f pseudo_metric_space.to_uniform_space, uniformity_dist := _, to_bornology := bornology.of_dist (λ (x y : α), dist (f x) (f y)) _ _ _, cobounded_sets := _}
Pull back a pseudometric space structure by a uniform inducing map. This is a version of
pseudo_metric_space.induced
useful in case if the domain already has a uniform_space
structure.
Equations
Equations
Equations
Equations
Equations
- nnreal.pseudo_metric_space = nnreal.pseudo_metric_space._proof_1.mpr subtype.pseudo_metric_space
Equations
- prod.pseudo_metric_space_max = {to_has_dist := {dist := λ (x y : α × β), max (dist x.fst y.fst) (dist x.snd y.snd)}, dist_self := _, dist_comm := _, dist_triangle := _, edist := λ (x y : α × β), max (edist x.fst y.fst) (edist x.snd y.snd), edist_dist := _, to_uniform_space := prod.uniform_space metric_space.to_uniform_space', uniformity_dist := _, to_bornology := bornology.of_dist (λ (x y : α × β), max (dist x.fst y.fst) (dist x.snd y.snd)) prod.pseudo_metric_space_max._proof_6 prod.pseudo_metric_space_max._proof_7 prod.pseudo_metric_space_max._proof_8, cobounded_sets := _}
If a set s
is separable, then the corresponding subtype is separable in a metric space.
This is not obvious, as the countable set whose closure covers s
does not need in general to
be contained in s
.
The preimage of a separable set by an inducing map is separable.
If a map is continuous on a separable set s
, then the image of s
is also separable.
A finite product of pseudometric spaces is a pseudometric space, with the sup distance.
Equations
- pseudo_metric_space_pi = pseudo_emetric_space.to_pseudo_metric_space_of_dist (λ (f g : Π (b : β), π b), ↑(finset.univ.sup (λ (b : β), nndist (f b) (g b)))) pseudo_metric_space_pi._proof_1 pseudo_metric_space_pi._proof_2
An open ball in a product space is a product of open balls. See also metric.ball_pi'
for a version assuming nonempty β
instead of 0 < r
.
An open ball in a product space is a product of open balls. See also metric.ball_pi
for a version assuming 0 < r
instead of nonempty β
.
A closed ball in a product space is a product of closed balls. See also metric.closed_ball_pi'
for a version assuming nonempty β
instead of 0 ≤ r
.
A closed ball in a product space is a product of closed balls. See also metric.closed_ball_pi
for a version assuming 0 ≤ r
instead of nonempty β
.
Any compact set in a pseudometric space can be covered by finitely many balls of a given positive radius
Alias of finite_cover_balls_of_compact
.
- is_compact_closed_ball : ∀ (x : α) (r : ℝ), is_compact (metric.closed_ball x r)
A pseudometric space is proper if all closed balls are compact.
In a proper pseudometric space, all spheres are compact.
In a proper pseudometric space, any sphere is a compact_space
when considered as a subtype.
A proper pseudo metric space is sigma compact, and therefore second countable.
If all closed balls of large enough radius are compact, then the space is proper. Especially useful when the lower bound for the radius is 0.
A proper space is locally compact
A proper space is complete
A finite product of proper spaces is proper.
If a nonempty ball in a proper space includes a closed set s
, then there exists a nonempty
ball with the same center and a strictly smaller radius that includes s
.
If a ball in a proper space includes a closed set s
, then there exists a ball with the same
center and a strictly smaller radius that includes s
.
A pseudometric space is second countable if, for every ε > 0
, there is a countable set which
is ε
-dense.
Boundedness of a subset of a pseudometric space. We formulate the definition to work even in the empty space.
Subsets of a bounded set are also bounded
Closed balls are bounded
Open balls are bounded
Spheres are bounded
Given a point, a bounded subset is included in some ball around this point
Alias of bounded_closure_of_bounded
.
The union of two bounded sets is bounded.
The union of two sets is bounded iff each of the sets is bounded.
A finite union of bounded sets is bounded
A totally bounded set is bounded
A compact set is bounded
A finite set is bounded
Alias of bounded_of_finite
.
A singleton is bounded
Characterization of the boundedness of the range of a function
In a compact space, all sets are bounded
The Heine–Borel theorem: In a proper space, a closed bounded set is compact.
The Heine–Borel theorem: In a proper space, the closure of a bounded set is compact.
The Heine–Borel theorem: In a proper Hausdorff space, a set is compact if and only if it is closed and bounded.
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.
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.diameter
Equations
- metric.diam s = (emetric.diam s).to_real
The diameter of a set is always nonnegative
The empty set has zero diameter
A singleton has zero diameter
If the distance between any two points in a set is bounded by some constant C
,
then ennreal.of_real C
bounds the emetric diameter of this set.
If the distance between any two points in a set is bounded by some non-negative constant, this constant bounds the diameter.
If the distance between any two points in a nonempty set is bounded by some constant, this constant bounds the diameter.
The distance between two points in a set is controlled by the diameter of the set.
Characterize the boundedness of a set in terms of the finiteness of its emetric.diameter.
The distance between two points in a set is controlled by the diameter of the set.
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
If s ⊆ t
, then the diameter of s
is bounded by that of t
, provided t
is bounded.
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.
If two sets intersect, the diameter of the union is bounded by the sum of the diameters.
The diameter of a closed ball of radius r
is at most 2 r
.
The diameter of a ball of radius r
is at most 2 r
.
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.
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.
Under the coercion from ℤ
to ℝ
, inverse images of compact sets are finite.
- to_pseudo_metric_space : pseudo_metric_space α
- eq_of_dist_eq_zero : ∀ {x y : α}, dist x y = 0 → x = y
We now define metric_space
, extending pseudo_metric_space
.
Two metric space structures with the same distance coincide.
Construct a metric space structure whose underlying topological space structure (definitionally) agrees which a pre-existing topology which is compatible with a given distance function.
Equations
- metric_space.of_metrizable dist dist_self dist_comm dist_triangle H eq_of_dist_eq_zero = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist (pseudo_metric_space.of_metrizable dist dist_self dist_comm dist_triangle H), dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist (pseudo_metric_space.of_metrizable dist dist_self dist_comm dist_triangle H), edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space (pseudo_metric_space.of_metrizable dist dist_self dist_comm dist_triangle H), uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology (pseudo_metric_space.of_metrizable dist dist_self dist_comm dist_triangle H), cobounded_sets := _}, eq_of_dist_eq_zero := eq_of_dist_eq_zero}
Deduce the equality of points with the vanishing of the nonnegative distance
Characterize the equality of points with the vanishing of the nonnegative distance
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.
If a pseudo_metric_space
is separated, then it is a metric_space
.
Equations
- metric.of_t2_pseudo_metric_space h = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist _inst_3, dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist _inst_3, edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space _inst_3, uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology _inst_3, cobounded_sets := _}, eq_of_dist_eq_zero := _}
A metric space induces an emetric space
Equations
- metric.metric_space.to_emetric_space = {to_pseudo_emetric_space := {to_has_edist := pseudo_emetric_space.to_has_edist pseudo_metric_space.to_pseudo_emetric_space, edist_self := _, edist_comm := _, edist_triangle := _, to_uniform_space := pseudo_emetric_space.to_uniform_space pseudo_metric_space.to_pseudo_emetric_space, uniformity_edist := _}, eq_of_edist_eq_zero := _}
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 β
.
Build a new metric space from an old one where the bundled uniform structure is provably (but typically non-definitionaly) equal to some given uniform structure. See Note [forgetful inheritance].
Equations
- m.replace_uniformity H = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist (metric_space.to_pseudo_metric_space.replace_uniformity H), dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist (metric_space.to_pseudo_metric_space.replace_uniformity H), edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space (metric_space.to_pseudo_metric_space.replace_uniformity H), uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology (metric_space.to_pseudo_metric_space.replace_uniformity H), cobounded_sets := _}, eq_of_dist_eq_zero := _}
Build a new metric space from an old one where the bundled topological structure is provably (but typically non-definitionaly) equal to some given topological structure. See Note [forgetful inheritance].
Equations
- m.replace_topology H = let t : uniform_space γ := pseudo_metric_space.to_uniform_space.replace_topology H, _inst : uniform_space γ := t in m.replace_uniformity _
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.
Equations
- emetric_space.to_metric_space_of_dist dist edist_ne_top h = {to_pseudo_metric_space := {to_has_dist := {dist := dist}, dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist (pseudo_emetric_space.to_pseudo_metric_space_of_dist dist edist_ne_top h), edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space (pseudo_emetric_space.to_pseudo_metric_space_of_dist dist edist_ne_top h), uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology (pseudo_emetric_space.to_pseudo_metric_space_of_dist dist edist_ne_top h), cobounded_sets := _}, eq_of_dist_eq_zero := _}
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.
Equations
- emetric_space.to_metric_space h = emetric_space.to_metric_space_of_dist (λ (x y : α), (edist x y).to_real) h emetric_space.to_metric_space._proof_1
Metric space structure pulled back by an injective function. Injectivity is necessary to
ensure that dist x y = 0
only if x = y
.
Equations
- metric_space.induced f hf m = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist (pseudo_metric_space.induced f metric_space.to_pseudo_metric_space), dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist (pseudo_metric_space.induced f metric_space.to_pseudo_metric_space), edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space (pseudo_metric_space.induced f metric_space.to_pseudo_metric_space), uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology (pseudo_metric_space.induced f metric_space.to_pseudo_metric_space), cobounded_sets := _}, eq_of_dist_eq_zero := _}
Pull back a metric space structure by a uniform embedding. This is a version of
metric_space.induced
useful in case if the domain already has a uniform_space
structure.
Equations
- uniform_embedding.comap_metric_space f h = (metric_space.induced f _ _inst_4).replace_uniformity _
Pull back a metric space structure by an embedding. This is a version of
metric_space.induced
useful in case if the domain already has a topological_space
structure.
Equations
- embedding.comap_metric_space f h = let _inst : uniform_space α := embedding.comap_uniform_space f h in uniform_embedding.comap_metric_space f _
Equations
Equations
- empty.metric_space = {to_pseudo_metric_space := {to_has_dist := {dist := λ (_x _x : empty), 0}, dist_self := empty.metric_space._proof_1, dist_comm := empty.metric_space._proof_2, dist_triangle := empty.metric_space._proof_3, edist := λ (x y : empty), ↑⟨(λ (_x _x : empty), 0) x y, _⟩, edist_dist := empty.metric_space._proof_5, to_uniform_space := empty.uniform_space, uniformity_dist := empty.metric_space._proof_6, to_bornology := bornology.of_dist (λ (_x _x : empty), 0) empty.metric_space._proof_7 empty.metric_space._proof_8 empty.metric_space._proof_9, cobounded_sets := empty.metric_space._proof_10}, eq_of_dist_eq_zero := empty.metric_space._proof_11}
Equations
- punit.metric_space = {to_pseudo_metric_space := {to_has_dist := {dist := λ (_x _x : punit), 0}, dist_self := punit.metric_space._proof_1, dist_comm := punit.metric_space._proof_2, dist_triangle := punit.metric_space._proof_3, edist := λ (x y : punit), ↑⟨(λ (_x _x : punit), 0) x y, _⟩, edist_dist := punit.metric_space._proof_5, to_uniform_space := punit.uniform_space, uniformity_dist := punit.metric_space._proof_6, to_bornology := bornology.of_dist (λ (_x _x : punit), 0) punit.metric_space._proof_7 punit.metric_space._proof_8 punit.metric_space._proof_9, cobounded_sets := punit.metric_space._proof_10}, eq_of_dist_eq_zero := punit.metric_space._proof_11}
Instantiate the reals as a metric space.
Equations
- real.metric_space = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist real.pseudo_metric_space, dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist real.pseudo_metric_space, edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space real.pseudo_metric_space, uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology real.pseudo_metric_space, cobounded_sets := _}, eq_of_dist_eq_zero := real.metric_space._proof_1}
Equations
Equations
- prod.metric_space_max = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist prod.pseudo_metric_space_max, dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist prod.pseudo_metric_space_max, edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space prod.pseudo_metric_space_max, uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology prod.pseudo_metric_space_max, cobounded_sets := _}, eq_of_dist_eq_zero := _}
A finite product of metric spaces is a metric space, with the sup distance.
Equations
- metric_space_pi = {to_pseudo_metric_space := {to_has_dist := pseudo_metric_space.to_has_dist pseudo_metric_space_pi, dist_self := _, dist_comm := _, dist_triangle := _, edist := pseudo_metric_space.edist pseudo_metric_space_pi, edist_dist := _, to_uniform_space := pseudo_metric_space.to_uniform_space pseudo_metric_space_pi, uniformity_dist := _, to_bornology := pseudo_metric_space.to_bornology pseudo_metric_space_pi, cobounded_sets := _}, eq_of_dist_eq_zero := _}
A metric space is second countable if one can reconstruct up to any ε>0
any element of the
space from countably many data.
The canonical equivalence relation on a pseudometric space.
The canonical quotient of a pseudometric space, identifying points at distance 0
.
Equations
Equations
- has_dist_metric_quot = {dist := quotient.lift₂ (λ (p q : α), dist p q) has_dist_metric_quot._proof_1}
Equations
- metric_space_quot = {to_pseudo_metric_space := {to_has_dist := has_dist_metric_quot _inst_3, dist_self := _, dist_comm := _, dist_triangle := _, edist := λ (x y : pseudo_metric_quot α), ↑⟨quotient.lift₂ (λ (p q : α), dist p q) has_dist_metric_quot._proof_1 x y, _⟩, edist_dist := _, to_uniform_space := uniform_space_of_dist (quotient.lift₂ (λ (p q : α), dist p q) has_dist_metric_quot._proof_1) metric_space_quot._proof_6 metric_space_quot._proof_7 metric_space_quot._proof_8, uniformity_dist := _, to_bornology := bornology.of_dist (quotient.lift₂ (λ (p q : α), dist p q) has_dist_metric_quot._proof_1) metric_space_quot._proof_10 metric_space_quot._proof_11 metric_space_quot._proof_12, cobounded_sets := _}, eq_of_dist_eq_zero := _}