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.proof_1
Instances For
Construct a bornology from a distance function and metric space axioms.
Equations
- One or more equations did not get rendered due to their size.
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
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.
Extension for the positivity
tactic: distances are nonnegative.
Equations
- One or more equations did not get rendered due to their size.
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
- (_ : IsEmpty ↑(Metric.sphere x ε)) = (_ : IsEmpty ↑(Metric.sphere x ε))
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.
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 uniform convergence using dist
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 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, ...
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
- One or more equations did not get rendered due to their size.
Expressing the uniformity in terms of 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
- One or more equations did not get rendered due to their size.
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].
Equations
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
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.
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].
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiate the reals as a pseudometric space.
Equations
- One or more equations did not get rendered due to their size.
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
Metric.closedBall x r
is contained in u
.
Pseudometric space structure pulled back by a function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pull back a pseudometric space structure by an inducing map. This is a version of
PseudoMetricSpace.induced
useful in case if the domain already has a TopologicalSpace
structure.
Equations
- Inducing.comapPseudoMetricSpace hf = PseudoMetricSpace.replaceTopology (PseudoMetricSpace.induced f m) (_ : inst = TopologicalSpace.induced f UniformSpace.toTopologicalSpace)
Instances For
Pull back a pseudometric space structure by a uniform inducing map. This is a version of
PseudoMetricSpace.induced
useful in case if the domain already has a UniformSpace
structure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Subtype.pseudoMetricSpace = PseudoMetricSpace.induced Subtype.val inst
Equations
- AddOpposite.instPseudoMetricSpace = PseudoMetricSpace.induced AddOpposite.unop inst
Equations
- MulOpposite.instPseudoMetricSpace = PseudoMetricSpace.induced MulOpposite.unop inst
Equations
- instPseudoMetricSpaceNNReal = Subtype.pseudoMetricSpace
Equations
- instPseudoMetricSpaceULift = PseudoMetricSpace.induced ULift.down inst
Equations
- One or more equations did not get rendered due to their size.
ε-characterization of the closure in pseudometric spaces
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 compact set is separable.
A finite product of pseudometric spaces is a pseudometric space, with the sup distance.
Equations
- One or more equations did not get rendered due to their size.
An open ball in a product space is a product of open balls. See also 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 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 closedBall_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 closedBall_pi
for a version assuming 0 ≤ r
instead of Nonempty β
.
A sphere in a product space is a union of spheres on each component restricted to the closed ball.
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
A pseudometric space is second countable if, for every ε > 0
, there is a countable set which
is ε
-dense.