Extended metric spaces #
This file is devoted to the definition and study of EMetricSpace
s, i.e., metric
spaces in which the distance is allowed to take the value ∞. This extended distance is
called edist
, and takes values in ℝ≥0∞
.
Many definitions and theorems expected on emetric spaces are already introduced on uniform spaces and topological spaces. For example: open and closed sets, compactness, completeness, continuity and uniform continuity.
The class EMetricSpace
therefore extends UniformSpace
(and TopologicalSpace
).
Since a lot of elementary properties don't require eq_of_edist_eq_zero
we start setting up the
theory of PseudoEMetricSpace
, where we don't require edist x y = 0 → x = y
and we specialize
to EMetricSpace
at the end.
Characterizing uniformities associated to a (generalized) distance function D
in terms of the elements of the uniformity.
Creating a uniform space from an extended distance.
Equations
- uniformSpaceOfEDist edist edist_self edist_comm edist_triangle = UniformSpace.ofFun edist edist_self edist_comm edist_triangle uniformSpaceOfEDist.proof_1
Instances For
A pseudo extended metric space is a type endowed with a ℝ≥0∞
-valued distance edist
satisfying reflexivity edist x x = 0
, commutativity edist x y = edist y x
, and the triangle
inequality edist x z ≤ edist x y + edist y z
.
Note that we do not require edist x y = 0 → x = y
. See extended metric spaces (EMetricSpace
) for
the similar class with that stronger assumption.
Any pseudo extended metric space is a topological space and a uniform space (see TopologicalSpace
,
UniformSpace
), where the topology and uniformity come from the metric.
Note that a T1 pseudo extended metric space is just an extended metric space.
We make the uniformity/topology part of the data instead of deriving it from the metric. This eg
ensures that we do not get a diamond when doing
[PseudoEMetricSpace α] [PseudoEMetricSpace β] : TopologicalSpace (α × β)
:
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance].
- toUniformSpace : UniformSpace α
Instances
Two pseudo emetric space structures with the same edistance function coincide.
Triangle inequality for the extended distance
Reformulation of the uniform structure in terms of the extended distance
Characterization of the elements of the uniformity in terms of the extended distance
Given f : β → ℝ≥0∞
, 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_edist
, uniformity_basis_edist'
,
uniformity_basis_edist_nnreal
, and uniformity_basis_edist_inv_nat
.
Given f : β → ℝ≥0∞
, if f
sends {i | p i}
to a set of positive numbers
accumulating to zero, then closed f i
-neighborhoods of the diagonal form a basis of 𝓤 α
.
For specific bases see uniformity_basis_edist_le
and uniformity_basis_edist_le'
.
Fixed size neighborhoods of the diagonal belong to the uniform structure
ε-δ characterization of uniform continuity on a set for pseudoemetric spaces
ε-δ characterization of uniform continuity on pseudoemetric spaces
Auxiliary function to replace the uniformity on a pseudoemetric space with a uniformity which is equal to the original one, but maybe not defeq. This is useful if one wants to construct a pseudoemetric space with a specified uniformity. See Note [forgetful inheritance] explaining why having definitionally the right uniformity is often important. See note [reducible non-instances].
Equations
- m.replaceUniformity H = PseudoEMetricSpace.mk ⋯ ⋯ ⋯ U ⋯
Instances For
The extended pseudometric induced by a function taking values in a pseudoemetric space. See note [reducible non-instances].
Equations
Instances For
Pseudoemetric space instance on subsets of pseudoemetric spaces
Equations
The extended pseudodistance on a subset of a pseudoemetric space is the restriction of the original pseudodistance, by definition.
The extended pseudodistance on a subtype of a pseudoemetric space is the restriction of the original pseudodistance, by definition.
Pseudoemetric space instance on the multiplicative opposite of a pseudoemetric space.
Pseudoemetric space instance on the additive opposite of a pseudoemetric space.
Equations
The product of two pseudoemetric spaces, with the max distance, is an extended pseudometric spaces. We make sure that the uniform structure thus constructed is the one corresponding to the product of uniform spaces, to avoid diamond problems.
Equations
EMetric.ball x ε
is the set of all points y
with edist y x < ε
Instances For
EMetric.closedBall x ε
is the set of all points y
with edist y x ≤ ε
Instances For
Relation “two points are at a finite edistance” is an equivalence relation.
Equations
- EMetric.edistLtTopSetoid = { r := fun (x y : α) => edist x y < ⊤, iseqv := ⋯ }
Instances For
ε-characterization of the closure in pseudoemetric spaces
For a set s
in a 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
.
An extended metric space is a type endowed with a ℝ≥0∞
-valued distance edist
satisfying
edist x y = 0 ↔ x = y
, commutativity edist x y = edist y x
, and the triangle inequality
edist x z ≤ edist x y + edist y z
.
See pseudo extended metric spaces (PseudoEMetricSpace
) for the similar class with the
edist x y = 0 ↔ x = y
assumption weakened to edist x x = 0
.
Any extended 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 eg ensures that we do not get a diamond when doing
[EMetricSpace α] [EMetricSpace β] : TopologicalSpace (α × β)
:
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance].
- uniformity_edist : uniformity α = ⨅ (ε : ENNReal), ⨅ (_ : ε > 0), Filter.principal {p : α × α | edist p.1 p.2 < ε}
Instances
Characterize the equality of points by the vanishing of their extended distance
Two points coincide if their distance is < ε
for all positive ε
Auxiliary function to replace the uniformity on an emetric space with a uniformity which is equal to the original one, but maybe not defeq. This is useful if one wants to construct an emetric space with a specified uniformity. See Note [forgetful inheritance] explaining why having definitionally the right uniformity is often important. See note [reducible non-instances].
Equations
Instances For
The extended metric induced by an injective function taking values in an emetric space. See Note [reducible non-instances].
Equations
- EMetricSpace.induced f hf m = EMetricSpace.mk ⋯
Instances For
EMetric space instance on subsets of emetric spaces
Equations
EMetric space instance on the multiplicative opposite of an emetric space.
Equations
EMetric space instance on the additive opposite of an emetric space.
Equations
Equations
Reformulation of the uniform structure in terms of the extended distance
Additive
, Multiplicative
#
The distance on those type synonyms is inherited without change.
Equations
- instEDistAdditive = inst✝
Equations
- instEDistMultiplicative = inst✝
Equations
Equations
Equations
- instEMetricSpaceAdditive = inst✝
Equations
Order dual #
The distance on this type synonym is inherited without change.
Equations
- instEDistOrderDual = inst✝
Equations
Equations
- instEMetricSpaceOrderDual = inst✝