L^p
distance on products of two metric spaces #
Given two metric spaces, one can put the max distance on their product, but there is also
a whole family of natural distances, indexed by a parameter p : ℝ≥0∞
, that also induce
the product topology. We define them in this file. For 0 < p < ∞
, the distance on α × β
is given by
$$ d(x, y) = \left(d(x_1, y_1)^p + d(x_2, y_2)^p\right)^{1/p}. $$
For p = ∞
the distance is the supremum of the distances and p = 0
the distance is the
cardinality of the elements that are not equal.
We give instances of this construction for emetric spaces, metric spaces, normed groups and normed spaces.
To avoid conflicting instances, all these are defined on a copy of the original Prod-type, named
WithLp p (α × β)
. The assumption [Fact (1 ≤ p)]
is required for the metric and normed space
instances.
We ensure that the topology, bornology and uniform structure on WithLp p (α × β)
are (defeq to)
the product topology, product bornology and product uniformity, to be able to use freely continuity
statements for the coordinate functions, for instance.
Implementation notes #
This file is a straight-forward adaptation of Mathlib.Analysis.Normed.Lp.PiLp
.
Note that the unapplied versions of these lemmas are deliberately omitted, as they break the use of the type synonym.
Definition of edist
, dist
and norm
on WithLp p (α × β)
#
In this section we define the edist
, dist
and norm
functions on WithLp p (α × β)
without
assuming [Fact (1 ≤ p)]
or metric properties of the spaces α
and β
. This allows us to provide
the rewrite lemmas for each of three cases p = 0
, p = ∞
and 0 < p.toReal
.
Endowing the space WithLp p (α × β)
with the L^p
edistance. We register this instance
separate from WithLp.instProdPseudoEMetric
since the latter requires the type class hypothesis
[Fact (1 ≤ p)]
in order to prove the triangle inequality.
Registering this separately allows for a future emetric-like structure on WithLp p (α × β)
for
p < 1
satisfying a relaxed triangle inequality. The terminology for this varies throughout the
literature, but it is sometimes called a quasi-metric or semi-metric.
Equations
- One or more equations did not get rendered due to their size.
The distance from one point to itself is always zero.
This holds independent of p
and does not require [Fact (1 ≤ p)]
. We keep it separate
from WithLp.instProdPseudoEMetricSpace
so it can be used also for p < 1
.
The distance is symmetric.
This holds independent of p
and does not require [Fact (1 ≤ p)]
. We keep it separate
from WithLp.instProdPseudoEMetricSpace
so it can be used also for p < 1
.
Endowing the space WithLp p (α × β)
with the L^p
distance. We register this instance
separate from WithLp.instProdPseudoMetricSpace
since the latter requires the type class hypothesis
[Fact (1 ≤ p)]
in order to prove the triangle inequality.
Registering this separately allows for a future metric-like structure on WithLp p (α × β)
for
p < 1
satisfying a relaxed triangle inequality. The terminology for this varies throughout the
literature, but it is sometimes called a quasi-metric or semi-metric.
Equations
- One or more equations did not get rendered due to their size.
Endowing the space WithLp p (α × β)
with the L^p
norm. We register this instance
separate from WithLp.instProdSeminormedAddCommGroup
since the latter requires the type class
hypothesis [Fact (1 ≤ p)]
in order to prove the triangle inequality.
Registering this separately allows for a future norm-like structure on WithLp p (α × β)
for
p < 1
satisfying a relaxed triangle inequality. These are called quasi-norms.
Equations
- One or more equations did not get rendered due to their size.
The uniformity on finite L^p
products is the product uniformity #
In this section, we put the L^p
edistance on WithLp p (α × β)
, and we check that the uniformity
coming from this edistance coincides with the product uniformity, by showing that the canonical
map to the Prod type (with the L^∞
distance) is a uniform embedding, as it is both Lipschitz and
antiLipschitz.
We only register this emetric space structure as a temporary instance, as the true instance (to be registered later) will have as uniformity exactly the product uniformity, instead of the one coming from the edistance (which is equal to it, but not defeq). See Note [forgetful inheritance] explaining why having definitionally the right uniformity is often important.
Endowing the space WithLp p (α × β)
with the L^p
pseudoemetric structure. This definition is
not satisfactory, as it does not register the fact that the topology and the uniform structure
coincide with the product one. Therefore, we do not register it as an instance. Using this as a
temporary pseudoemetric space instance, we will show that the uniform structure is equal (but not
defeq) to the product one, and then register an instance in which we replace the uniform structure
by the product one using this pseudoemetric space and PseudoEMetricSpace.replaceUniformity
.
Equations
- WithLp.prodPseudoEMetricAux p α β = PseudoEMetricSpace.mk ⋯ ⋯ ⋯ (uniformSpaceOfEDist edist ⋯ ⋯ ⋯) ⋯
Instances For
An auxiliary lemma used twice in the proof of WithLp.prodPseudoMetricAux
below. Not intended
for use outside this file.
Endowing the space WithLp p (α × β)
with the L^p
pseudometric structure. This definition is
not satisfactory, as it does not register the fact that the topology, the uniform structure, and the
bornology coincide with the product ones. Therefore, we do not register it as an instance. Using
this as a temporary pseudoemetric space instance, we will show that the uniform structure is equal
(but not defeq) to the product one, and then register an instance in which we replace the uniform
structure and the bornology by the product ones using this pseudometric space,
PseudoMetricSpace.replaceUniformity
, and PseudoMetricSpace.replaceBornology
.
See note [reducible non-instances]
Equations
Instances For
Instances on L^p
products #
Equations
- WithLp.instProdTopologicalSpace p α β = instTopologicalSpaceProd
Equations
- WithLp.instProdUniformSpace p α β = instUniformSpaceProd
WithLp.equiv
as a continuous linear equivalence.
Equations
- WithLp.prodContinuousLinearEquiv p 𝕜 α β = { toLinearEquiv := WithLp.linearEquiv p 𝕜 (α × β), continuous_toFun := ⋯, continuous_invFun := ⋯ }
Instances For
Throughout the rest of the file, we assume 1 ≤ p
PseudoEMetricSpace
instance on the product of two pseudoemetric spaces, using the
L^p
pseudoedistance, and having as uniformity the product uniformity.
Equations
- WithLp.instProdPseudoEMetricSpace p α β = (WithLp.prodPseudoEMetricAux p α β).replaceUniformity ⋯
EMetricSpace
instance on the product of two emetric spaces, using the L^p
edistance, and having as uniformity the product uniformity.
Equations
- WithLp.instProdEMetricSpace p α β = EMetricSpace.ofT0PseudoEMetricSpace (WithLp p (α × β))
PseudoMetricSpace
instance on the product of two pseudometric spaces, using the
L^p
distance, and having as uniformity the product uniformity.
Equations
- WithLp.instProdPseudoMetricSpace p α β = ((WithLp.prodPseudoMetricAux p α β).replaceUniformity ⋯).replaceBornology ⋯
MetricSpace
instance on the product of two metric spaces, using the L^p
distance,
and having as uniformity the product uniformity.
Equations
- WithLp.instProdMetricSpace p α β = MetricSpace.ofT0PseudoMetricSpace (WithLp p (α × β))
Seminormed group instance on the product of two normed groups, using the L^p
norm.
Equations
normed group instance on the product of two normed groups, using the L^p
norm.
Equations
The canonical map WithLp.equiv
between WithLp ∞ (α × β)
and α × β
as a linear isometric
equivalence.
Equations
- WithLp.prodEquivₗᵢ = { toFun := (WithLp.equiv ⊤ (α × β)).toFun, map_add' := ⋯, map_smul' := ⋯, invFun := (WithLp.equiv ⊤ (α × β)).invFun, left_inv := ⋯, right_inv := ⋯, norm_map' := ⋯ }
Instances For
The product of two normed spaces is a normed space, with the L^p
norm.
Equations
- WithLp.instProdNormedSpace p 𝕜 α β = NormedSpace.mk ⋯