Pseudo-metric spaces #
This file defines pseudo-metric spaces: these differ from metric spaces by not imposing the
condition dist x y = 0 → x = y
.
Many definitions and theorems expected on (pseudo-)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 #
Dist α
: Endows a spaceα
with a functiondist a b
.PseudoMetricSpace α
: 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 aPseudoMetricSpace
is bounded.MetricSpace α
: APseudoMetricSpace
with the guaranteedist x y = 0 → x = y
.
Additional useful definitions:
nndist a b
:dist
as a function to the non-negative reals.Metric.closedBall x ε
: The set of all pointsy
withdist y x ≤ ε
.Metric.sphere x ε
: The set of all pointsy
withdist y x = ε
.
TODO (anyone): Add "Main results" section.
Tags #
pseudo_metric, dist
Construct a uniform structure from a distance function and metric space axioms
Equations
- UniformSpace.ofDist dist dist_self dist_comm dist_triangle = UniformSpace.ofFun dist dist_self dist_comm dist_triangle UniformSpace.ofDist_aux
Instances For
Construct a bornology from a distance function and metric space axioms.
Equations
- Bornology.ofDist dist dist_comm dist_triangle = Bornology.ofBounded {s : Set α | ∃ (C : ℝ), ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C} ⋯ ⋯ ⋯ ⋯
Instances For
Pseudo metric and Metric spaces
A pseudo metric space is endowed with a distance for which the requirement d(x,y)=0 → x = y
might
not hold. A metric space is a pseudo metric space such that d(x,y)=0 → x = y
.
Each pseudo metric space induces a canonical UniformSpace
and hence a canonical
TopologicalSpace
This is enforced in the type class definition, by extending the UniformSpace
structure. When instantiating a PseudoMetricSpace
structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
- dist : α → α → ℝ
- edist : α → α → ENNReal
- edist_dist : ∀ (x y : α), PseudoMetricSpace.edist x y = ENNReal.ofReal (dist x y)
- toUniformSpace : UniformSpace α
- uniformity_dist : uniformity α = ⨅ (ε : ℝ), ⨅ (_ : ε > 0), Filter.principal {p : α × α | dist p.1 p.2 < ε}
- toBornology : Bornology α
Instances
Two pseudo metric space structures with the same distance function coincide.
Equations
- PseudoMetricSpace.toEDist = { edist := PseudoMetricSpace.edist }
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
- One or more equations did not get rendered due to their size.
Instances For
Extension for the positivity
tactic: distances are nonnegative.
Instances For
Distance as a nonnegative real number.
In a pseudometric space, the extended distance is always finite
In a pseudometric space, the extended distance is always finite
nndist x x
vanishes
Triangle inequality for the nonnegative distance
If a point belongs to an open ball, then there is a strictly smaller radius whose ball also contains it.
See also exists_lt_subset_ball
.
closedBall x ε
is the set of all points y
with dist y x ≤ ε
Equations
- Metric.closedBall x ε = {y : α | dist y x ≤ ε}
Instances For
Equations
- ⋯ = ⋯
Closed balls and spheres coincide when the radius is non-positive
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.
Constant size closed neighborhoods of the diagonal form a basis of the uniformity filter.
A constant size neighborhood of the diagonal is an entourage.
A version of Filter.eventually_prod_iff
where the first filter consists of neighborhoods
in a pseudo-metric space.
A version of Filter.eventually_prod_iff
where the second filter consists of neighborhoods
in a pseudo-metric space.
A variant of tendsto_atTop
that
uses ∃ N, ∀ n > N, ...
rather than ∃ N, ∀ n ≥ N, ...
(Pseudo) metric space has discrete UniformSpace
structure
iff the distances between distinct points are uniformly bounded away from zero.
If the distances between distinct points in a (pseudo) metric space are uniformly bounded away from zero, then the space has discrete topology.
A pseudometric space induces a pseudoemetric space
Equations
- PseudoMetricSpace.toPseudoEMetricSpace = PseudoEMetricSpace.mk ⋯ ⋯ ⋯ PseudoMetricSpace.toUniformSpace ⋯
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]. See Note [reducible non-instances].
Equations
- m.replaceUniformity H = PseudoMetricSpace.mk ⋯ ⋯ ⋯ PseudoMetricSpace.edist ⋯ U ⋯ PseudoMetricSpace.toBornology ⋯
Instances For
Build a new pseudo 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]. See Note [reducible non-instances].
Equations
- m.replaceTopology H = m.replaceUniformity ⋯
Instances For
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. See note [reducible non-instances].
Equations
- PseudoEMetricSpace.toPseudoMetricSpaceOfDist dist edist_ne_top h = PseudoMetricSpace.mk ⋯ ⋯ ⋯ edist ⋯ PseudoEMetricSpace.toUniformSpace ⋯ (Bornology.ofDist dist ⋯ ⋯) ⋯
Instances For
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
- PseudoEMetricSpace.toPseudoMetricSpace h = PseudoEMetricSpace.toPseudoMetricSpaceOfDist (fun (x y : α) => (edist x y).toReal) h ⋯
Instances For
Build a new pseudometric space from an old one where the bundled bornology structure is provably (but typically non-definitionaly) equal to some given bornology structure. See Note [forgetful inheritance]. See Note [reducible non-instances].
Equations
- m.replaceBornology H = PseudoMetricSpace.mk ⋯ ⋯ ⋯ PseudoMetricSpace.edist ⋯ PseudoMetricSpace.toUniformSpace ⋯ B ⋯
Instances For
Instantiate the reals as a pseudometric space.
Equations
- One or more equations did not get rendered due to their size.
Alias of Filter.Tendsto.congr_dist
.
ε-characterization of the closure in pseudometric spaces
If a map is continuous on a separable set s
, then the image of s
is also separable.
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
.
Any compact set in a pseudometric space can be covered by finitely many balls of a given positive radius
Equations
- instPseudoMetricSpaceAdditive = inst
Equations
- instPseudoMetricSpaceMultiplicative = inst
Equations
- instPseudoMetricSpaceOrderDual = inst