Documentation

Books.ConvexAnalysis_Rockafellar_1970.Chapters.Chap03.section15_part7

def IsMetricFun {n : } (ρ : (Fin n)(Fin n)) :

Text 15.0.14: A metric on ℝⁿ is a function ρ : ℝⁿ × ℝⁿ → ℝ such that: (1) ρ(x, y) > 0 if x ≠ y, and ρ(x, y) = 0 if x = y; (2) ρ(x, y) = ρ(y, x) for all x, y; (3) ρ(x, z) ≤ ρ(x, y) + ρ(y, z) for all x, y, z.

The quantity ρ(x, y) is interpreted as the distance between x and y.

In this development, we use Fin n → ℝ for ℝⁿ. The usual mathlib notion of a metric space is MetricSpace, and IsMetricFun ρ records the book axioms for the distance function ρ.

Equations
Instances For
    theorem eq_of_IsMetricFun_eq_zero {n : } {ρ : (Fin n)(Fin n)} ( : IsMetricFun ρ) {x y : Fin n} (hxy : ρ x y = 0) :
    x = y

    A metric function vanishes only on the diagonal.

    theorem exists_metricSpace_of_IsMetricFun {n : } (ρ : (Fin n)(Fin n)) ( : IsMetricFun ρ) :
    ∃ (ms : MetricSpace (Fin n)), dist = ρ

    Build a metric space structure from a metric function.

    theorem isMetricFun_of_exists_metricSpace {n : } (ρ : (Fin n)(Fin n)) ( : ∃ (ms : MetricSpace (Fin n)), dist = ρ) :

    A metric space with distance ρ satisfies the metric-function axioms.

    theorem isMetricFun_iff_exists_metricSpace {n : } (ρ : (Fin n)(Fin n)) :
    IsMetricFun ρ ∃ (ms : MetricSpace (Fin n)), dist = ρ
    noncomputable def discreteMetricFun {n : } :
    (Fin n)(Fin n)

    Text 15.0.15: An extreme example of a metric on ℝⁿ is the function ρ(x, y) = 0 if x = y and ρ(x, y) = 1 if x ≠ y (the discrete metric).

    This metric has no relation to the algebraic structure of ℝⁿ.

    Equations
    Instances For
      def IsMinkowskiMetricFun {n : } (ρ : (Fin n)(Fin n)) :

      Text 15.0.16: A metric ρ on ℝⁿ is called a Minkowski metric if it satisfies the metric axioms and:

      • Translation invariance: ρ (x + z) (y + z) = ρ x y for all x, y, z.
      • Segment homogeneity: ρ x ((1 - λ) • x + λ • y) = λ * ρ x y for all x, y and λ ∈ [0, 1].
      Equations
      Instances For
        def IsNormFun {n : } (k : (Fin n)) :

        A real-valued function k : ℝⁿ → ℝ is a norm if it is nonnegative, vanishes only at 0, satisfies the triangle inequality, and is absolutely homogeneous: k (r • x) = |r| * k x.

        Equations
        Instances For
          def normFunToMinkowskiMetricFun {n : } (k : (Fin n)) :
          (Fin n)(Fin n)

          Given a norm function k, define the associated distance function ρ x y := k (x - y).

          Equations
          Instances For
            def minkowskiMetricFunToNormFun {n : } (ρ : (Fin n)(Fin n)) :
            (Fin n)

            Given a Minkowski metric ρ, define the associated norm function k x := ρ x 0.

            Equations
            Instances For
              theorem sub_segment_eq_smul_sub {n : } (x y : Fin n) (r : ) :
              x - ((1 - r) x + r y) = r (x - y)

              Displacement to a convex combination is a scalar multiple of the difference.

              A norm induces a Minkowski metric via ρ x y = k (x - y).

              theorem minkowskiMetricFunToNormFun_hom_Icc {n : } {ρ : (Fin n)(Fin n)} ( : IsMinkowskiMetricFun ρ) (x : Fin n) (r : ) :

              For a Minkowski metric, the induced norm is homogeneous on [0,1].

              theorem minkowskiMetricFunToNormFun_neg {n : } {ρ : (Fin n)(Fin n)} ( : IsMinkowskiMetricFun ρ) (x : Fin n) :

              The norm induced by a Minkowski metric is even.

              theorem minkowskiMetricFunToNormFun_hom_nonneg {n : } {ρ : (Fin n)(Fin n)} ( : IsMinkowskiMetricFun ρ) (x : Fin n) (r : ) :

              The norm induced by a Minkowski metric is homogeneous for nonnegative scalars.

              A Minkowski metric induces a norm via k x = ρ x 0.

              theorem minkowskiMetricFun_eq_normFunToMinkowskiMetricFun_minkowskiMetricFunToNormFun {n : } {ρ : (Fin n)(Fin n)} (htrans : ∀ (x y z : Fin n), ρ (x + z) (y + z) = ρ x y) (x y : Fin n) :

              Translation invariance pins down a Minkowski metric by its values at the origin.

              noncomputable def normFunEquivMinkowskiMetricFun {n : } :
              { k : (Fin n) // IsNormFun k } { ρ : (Fin n)(Fin n) // IsMinkowskiMetricFun ρ }

              Text 15.0.17: There is a one-to-one correspondence between Minkowski metrics and norms: if k is a norm then ρ x y := k (x - y) is a Minkowski metric, and conversely every Minkowski metric ρ arises uniquely in this way from the norm k x := ρ x 0.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem isNormFun_gaugeFunction_of_symmClosedBoundedConvex_zeroInterior {n : } {C : Set (Fin n)} (hC_symm : ∀ (x : Fin n), x C -x C) (hC_closed : IsClosed C) (hC_bdd : Bornology.IsBounded C) (hC_conv : Convex C) (hC0 : 0 interior C) :

                The gauge of a symmetric closed bounded convex set with 0 in its interior is a norm.

                theorem gaugeFunction_unitBall_eq {n : } {C : Set (Fin n)} (hC_closed : IsClosed C) (hC_conv : Convex C) (hC0 : 0 interior C) :
                {x : Fin n | gaugeFunction C x 1} = C

                The gauge of a closed convex set with 0 in its interior has unit sublevel set C.

                theorem ball_eq_image_add_smul_of_normFun_unitBall {n : } {k : (Fin n)} {C : Set (Fin n)} (hk : IsNormFun k) (hC : {x : Fin n | k x 1} = C) (x : Fin n) (ε : ) :
                0 < ε{y : Fin n | normFunToMinkowskiMetricFun k x y ε} = (fun (c : Fin n) => x + ε c) '' C

                Metric balls from a norm are translates of scaled unit balls.

                theorem minkowskiMetricFunToNormFun_eq_gaugeFunction_of_ball_property {n : } {C : Set (Fin n)} {ρ : (Fin n)(Fin n)} ( : IsMinkowskiMetricFun ρ) (hball : ∀ (ε : ), 0 < ε{y : Fin n | ρ 0 y ε} = (fun (c : Fin n) => ε c) '' C) (x : Fin n) :

                The induced norm of a Minkowski metric with prescribed balls is the gauge of C.

                theorem existsUnique_minkowskiMetricFun_ball_eq_image_add_smul {n : } {C : Set (Fin n)} (hC_symm : ∀ (x : Fin n), x C -x C) (hC_closed : IsClosed C) (hC_bdd : Bornology.IsBounded C) (hC_conv : Convex C) (hC0 : 0 interior C) :
                ∃! ρ : (Fin n)(Fin n), IsMinkowskiMetricFun ρ ∀ (x : Fin n) (ε : ), 0 < ε{y : Fin n | ρ x y ε} = (fun (c : Fin n) => x + ε c) '' C

                Text 15.0.18: If C is a symmetric closed bounded convex set such that 0 ∈ interior C, then there is a unique Minkowski metric ρ such that the ρ-ball of radius ε > 0 around x is x + ε C, i.e. {y | ρ x y ≤ ε} = {x + ε • c | c ∈ C}.

                def IsOpenOfDistFun {α : Type u_1} (d : αα) (s : Set α) :

                A distance function d : α → α → ℝ defines a notion of "open set" by the usual metric-ball criterion: s is open if for every x ∈ s there exists ε > 0 such that d x y < ε implies y ∈ s.

                Equations
                Instances For
                  def IsClosedOfDistFun {α : Type u_1} (d : αα) (s : Set α) :
                  Equations
                  Instances For
                    def CauchySeqOfDistFun {α : Type u_1} (d : αα) (u : α) :

                    A sequence u : ℕ → α is Cauchy with respect to d if for every ε > 0 there exists N such that d (u m) (u n) < ε for all m,n ≥ N.

                    Equations
                    Instances For
                      noncomputable def piEuclideanDist {n : } (x y : Fin n) :

                      Euclidean distance on ℝⁿ (modeled as Fin n → ℝ), defined by d(x,y) = ‖x - y‖₂ = sqrt (dotProduct (x - y) (x - y)).

                      We use a pi-prefixed name to avoid clashing with mathlib's euclideanDist.

                      Equations
                      Instances For