Documentation

Mathlib.Topology.MetricSpace.Basic

Basic properties of metric spaces, and instances. #

@[instance 100]
instance MetricSpace.instT0Space {γ : Type w} [MetricSpace γ] :
theorem Metric.isUniformEmbedding_iff' {β : Type v} {γ : Type w} [MetricSpace γ] [PseudoMetricSpace β] {f : γβ} :
IsUniformEmbedding f (∀ ε > 0, δ > 0, ∀ {a b : γ}, dist a b < δdist (f a) (f b) < ε) δ > 0, ε > 0, ∀ {a b : γ}, dist (f a) (f b) < εdist a b < δ

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.

@[reducible, inline]

If a PseudoMetricSpace is a T₀ space, then it is a MetricSpace.

Equations
    Instances For
      @[instance 100]

      A metric space induces an emetric space

      Equations
        theorem Metric.isClosed_of_pairwise_le_dist {γ : Type w} [MetricSpace γ] {s : Set γ} {ε : } ( : 0 < ε) (hs : s.Pairwise fun (x y : γ) => ε dist x y) :
        theorem Metric.isClosedEmbedding_of_pairwise_le_dist {γ : Type w} [MetricSpace γ] {α : Type u_2} [TopologicalSpace α] [DiscreteTopology α] {ε : } ( : 0 < ε) {f : αγ} (hf : Pairwise fun (x y : α) => ε dist (f x) (f y)) :
        theorem Metric.isUniformEmbedding_bot_of_pairwise_le_dist {α : Type u} [PseudoMetricSpace α] {β : Type u_2} {ε : } ( : 0 < ε) {f : βα} (hf : Pairwise fun (x y : β) => ε dist (f x) (f y)) :

        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 β.

        @[reducible, inline]
        abbrev EMetricSpace.toMetricSpaceOfDist {α : Type u} [EMetricSpace α] (dist : αα) (dist_nonneg : ∀ (x y : α), 0 dist x y) (h : ∀ (x y : α), edist x y = ENNReal.ofReal (dist x y)) :

        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
          Instances For
            @[reducible, inline]
            abbrev EMetricSpace.toMetricSpace {α : Type u} [EMetricSpace α] (h : ∀ (x y : α), edist x y ) :

            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
              Instances For
                @[reducible, inline]
                abbrev MetricSpace.induced {γ : Type u_2} {β : Type u_3} (f : γβ) (hf : Function.Injective f) (m : MetricSpace β) :

                Metric space structure pulled back by an injective function. Injectivity is necessary to ensure that dist x y = 0 only if x = y.

                Equations
                  Instances For
                    @[reducible, inline]
                    abbrev IsUniformEmbedding.comapMetricSpace {α : Type u_2} {β : Type u_3} [UniformSpace α] [m : MetricSpace β] (f : αβ) (h : IsUniformEmbedding f) :

                    Pull back a metric space structure by a uniform embedding. This is a version of MetricSpace.induced useful in case if the domain already has a UniformSpace structure.

                    Equations
                      Instances For
                        @[reducible, inline]
                        abbrev Topology.IsEmbedding.comapMetricSpace {α : Type u_2} {β : Type u_3} [TopologicalSpace α] [m : MetricSpace β] (f : αβ) (h : IsEmbedding f) :

                        Pull back a metric space structure by an embedding. This is a version of MetricSpace.induced useful in case if the domain already has a TopologicalSpace structure.

                        Equations
                          Instances For
                            instance Subtype.metricSpace {α : Type u_2} {p : αProp} [MetricSpace α] :
                            Equations

                              Instantiate the reals as a metric space.

                              Equations
                                instance Prod.metricSpaceMax {β : Type v} {γ : Type w} [MetricSpace γ] [MetricSpace β] :
                                MetricSpace (γ × β)
                                Equations
                                  instance metricSpacePi {β : Type v} {X : βType u_2} [Fintype β] [(b : β) → MetricSpace (X b)] :
                                  MetricSpace ((b : β) → X b)

                                  A finite product of metric spaces is a metric space, with the sup distance.

                                  Equations
                                    theorem Metric.secondCountable_of_countable_discretization {α : Type u} [PseudoMetricSpace α] (H : ε > 0, ∃ (β : Type u_2) (x : Encodable β) (F : αβ), ∀ (x y : α), F x = F ydist x y ε) :

                                    A metric space is second countable if one can reconstruct up to any ε>0 any element of the space from countably many data.

                                    theorem SeparationQuotient.dist_mk {α : Type u} [PseudoMetricSpace α] (p q : α) :
                                    dist (mk p) (mk q) = dist p q
                                    @[reducible, inline]
                                    abbrev PseudoEMetricSpace.replaceEDist {X : Type u_2} (m : PseudoEMetricSpace X) (d : XXENNReal) (hd : d = edist) :

                                    Build new pseudoemetric space from an old one where the edistance is provably (but typically non-definitionally) equal to some given edistance. We also provide convenience versions for PseudoMetric, Emetric and Metric spaces.

                                    Equations
                                      Instances For
                                        theorem PseudoEMetricSpace.replaceEDist_eq {X : Type u_2} (m : PseudoEMetricSpace X) (d : XXENNReal) (hd : d = edist) :
                                        m.replaceEDist d hd = m
                                        @[reducible, inline]
                                        abbrev PseudoMetricSpace.replaceDist {X : Type u_2} (m : PseudoMetricSpace X) (d : XX) (hd : d = dist) :

                                        Build new pseudometric space from an old one where the distance is provably (but typically non-definitionally) equal to some given distance. We also provide convenience versions for PseudoEMetric, Emetric and Metric spaces.

                                        Equations
                                          Instances For
                                            theorem PseudoMetricSpace.replaceDist_eq {X : Type u_2} (m : PseudoMetricSpace X) (d : XX) (hd : d = dist) :
                                            m.replaceDist d hd = m
                                            @[reducible, inline]
                                            abbrev EMetricSpace.replaceEDist {X : Type u_2} (m : EMetricSpace X) (d : XXENNReal) (hd : d = edist) :

                                            Build new emetric space from an old one where the edistance is provably (but typically non-definitionally) equal to some given edistance. We also provide convenience versions for PseudoEMetric, PseudoMetric and Metric spaces.

                                            Equations
                                              Instances For
                                                theorem EMetricSpace.replaceEDist_eq {X : Type u_2} (m : EMetricSpace X) (d : XXENNReal) (hd : d = edist) :
                                                m.replaceEDist d hd = m
                                                @[reducible, inline]
                                                abbrev MetricSpace.replaceDist {X : Type u_2} (m : MetricSpace X) (d : XX) (hd : d = dist) :

                                                Build new metric space from an old one where the distance is provably (but typically non-definitionally) equal to some given distance. We also provide convenience versions for PseudoEMetric, PseudoMatric and EMetric spaces.

                                                Equations
                                                  Instances For
                                                    theorem MetricSpace.replaceDist_eq {X : Type u_2} (m : MetricSpace X) (d : XX) (hd : d = dist) :
                                                    m.replaceDist d hd = m