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
Build a metric space structure from a metric function.
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 ℝⁿ.
Instances For
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 yfor allx, y, z. - Segment homogeneity:
ρ x ((1 - λ) • x + λ • y) = λ * ρ x yfor allx, yandλ ∈ [0, 1].
Equations
Instances For
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
For a Minkowski metric, the induced norm is homogeneous on [0,1].
The norm induced by a Minkowski metric is even.
The norm induced by a Minkowski metric is homogeneous for nonnegative scalars.
A Minkowski metric induces a norm via k x = ρ x 0.
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
The gauge of a symmetric closed bounded convex set with 0 in its interior is a norm.
The induced norm of a Minkowski metric with prescribed balls is the gauge of 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}.
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.
Instances For
Equations
- IsClosedOfDistFun d s = IsOpenOfDistFun d sᶜ
Instances For
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
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.