Lean library · module TopologyByExample.Theorems.MetricBanachEmbedding

A Banach-space embedding of an arbitrary metric space

Source file

This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports
variable {X : Type*} [MetricSpace X]

definition embed

TopologyByExample.MetricBanachEmbedding.embed

The distance from a point, normalized by subtracting the distance from a fixed base point.

def embed (o x : X) : BoundedContinuousFunction X ℝ
Definition
:=
  BoundedContinuousFunction.ofNormedAddCommGroup
    (fun z ↦ dist x z - dist o z)
    ((continuous_const.dist continuous_id).sub (continuous_const.dist continuous_id))
    (dist x o) (fun z ↦ by simpa only [Real.norm_eq_abs] using abs_dist_sub_le x o z)

theorem embed_apply

TopologyByExample.MetricBanachEmbedding.embed_apply

Evaluating the embedding gives the normalized distance function.

@[simp] theorem embed_apply (o x z : X) : embed o x z = dist x z - dist o z
Proof
:= rfl

theorem isometry_embed

TopologyByExample.MetricBanachEmbedding.isometry_embed

The normalized distance embedding preserves distances exactly.

theorem isometry_embed (o : X) : Isometry (embed o)
Proof
:= by
  apply Isometry.of_dist_eq
  intro x y
  apply le_antisymm
  · apply (BoundedContinuousFunction.dist_le dist_nonneg).mpr
    intro z
    simpa only [Real.dist_eq, embed_apply, sub_sub_sub_cancel_right] using abs_dist_sub_le x y z
  · have h := BoundedContinuousFunction.dist_coe_le_dist (f := embed o x) (g := embed o y) y
    simpa [Real.dist_eq] using h

theorem isClosedEmbedding_embed

TopologyByExample.MetricBanachEmbedding.isClosedEmbedding_embed

A complete metric space has closed image under the embedding.

theorem isClosedEmbedding_embed [CompleteSpace X] (o : X) :
    IsClosedEmbedding (embed o)
Proof
:= (isometry_embed o).isClosedEmbedding