# mathlibdocumentation

topology.metric_space.gluing

# Metric space gluing #

Gluing two metric spaces along a common subset. Formally, we are given

     Φ
Z ---> X
|
|Ψ
v
Y


where hΦ : isometry Φ and hΨ : isometry Ψ. We want to complete the square by a space glue_space hΦ hΨ and two isometries to_glue_l hΦ hΨ and to_glue_r hΦ hΨ that make the square commute. We start by defining a predistance on the disjoint union X ⊕ Y, for which points Φ p and Ψ p are at distance 0. The (quotient) metric space associated to this predistance is the desired space.

This is an instance of a more general construction, where Φ and Ψ do not have to be isometries, but the distances in the image almost coincide, up to 2ε say. Then one can almost glue the two spaces so that the images of a point under Φ and Ψ are ε-close. If ε > 0, this yields a metric space structure on X ⊕ Y, without the need to take a quotient. In particular, when X and Y are inhabited, this gives a natural metric space structure on X ⊕ Y, where the basepoints are at distance 1, say, and the distances between other points are obtained by going through the two basepoints.

We also define the inductive limit of metric spaces. Given

     f 0        f 1        f 2        f 3
X 0 -----> X 1 -----> X 2 -----> X 3 -----> ...


where the X n are metric spaces and f n isometric embeddings, we define the inductive limit of the X n, also known as the increasing union of the X n in this context, if we identify X n and X (n+1) through f n. This is a metric space in which all X n embed isometrically and in a way compatible with f n.

def metric.glue_dist {X : Type u} {Y : Type v} {Z : Type w} [metric_space X] [metric_space Y] (Φ : Z → X) (Ψ : Z → Y) (ε : ) :
X YX Y

Define a predistance on X ⊕ Y, for which Φ p and Ψ p are at distance ε

Equations
theorem metric.glue_dist_glued_points {X : Type u} {Y : Type v} {Z : Type w} [metric_space X] [metric_space Y] [nonempty Z] (Φ : Z → X) (Ψ : Z → Y) (ε : ) (p : Z) :
ε (sum.inl (Φ p)) (sum.inr (Ψ p)) = ε
def metric.glue_metric_approx {X : Type u} {Y : Type v} {Z : Type w} [metric_space X] [metric_space Y] [nonempty Z] (Φ : Z → X) (Ψ : Z → Y) (ε : ) (ε0 : 0 < ε) (H : ∀ (p q : Z), |dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)| 2 * ε) :

Given two maps Φ and Ψ intro metric spaces X and Y such that the distances between Φ p and Φ q, and between Ψ p and Ψ q, coincide up to 2 ε where ε > 0, one can almost glue the two spaces X and Y along the images of Φ and Ψ, so that Φ p and Ψ p are at distance ε.

Equations
def metric.sum.dist {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] :
X YX Y

Distance on a disjoint union. There are many (noncanonical) ways to put a distance compatible with each factor. If the two spaces are bounded, one can say for instance that each point in the first is at distance diam X + diam Y + 1 of each point in the second. Instead, we choose a construction that works for unbounded spaces, but requires basepoints. We embed isometrically each factor, set the basepoints at distance 1, arbitrarily, and say that the distance from a to b is the sum of the distances of a and b to their respective basepoints, plus the distance 1 between the basepoints. Since there is an arbitrary choice in this construction, it is not an instance by default.

Equations
theorem metric.sum.dist_eq_glue_dist {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] {p q : X Y} :
= metric.glue_dist (λ (_x : unit), default X) (λ (_x : unit), default Y) 1 p q
theorem metric.sum.one_dist_le {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] {x : X} {y : Y} :
1 (sum.inr y)
theorem metric.sum.one_dist_le' {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] {x : X} {y : Y} :
1 (sum.inl x)
def metric.metric_space_sum {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] :

The distance on the disjoint union indeed defines a metric space. All the distance properties follow from our choice of the distance. The harder work is to show that the uniform structure defined by the distance coincides with the disjoint union uniform structure.

Equations
theorem metric.sum.dist_eq {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] {x y : X Y} :
dist x y =
theorem metric.isometry_on_inl {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] :

The left injection of a space in a disjoint union in an isometry

theorem metric.isometry_on_inr {X : Type u} {Y : Type v} [metric_space X] [metric_space Y] [inhabited X] [inhabited Y] :

The right injection of a space in a disjoint union in an isometry

def metric.glue_premetric {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :

Given two isometric embeddings Φ : Z → X and Ψ : Z → Y, we define a pseudo metric space structure on X ⊕ Y by declaring that Φ x and Ψ x are at distance 0.

Equations
def metric.glue_space {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :
Type (max u v)

Given two isometric embeddings Φ : Z → X and Ψ : Z → Y, we define a space glue_space hΦ hΨ by identifying in X ⊕ Y the points Φ x and Ψ x.

Equations
@[instance]
def metric.metric_space_glue_space {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :
Equations
def metric.to_glue_l {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) (x : X) :

The canonical map from X to the space obtained by gluing isometric subsets in X and Y.

Equations
def metric.to_glue_r {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) (y : Y) :

The canonical map from Y to the space obtained by gluing isometric subsets in X and Y.

Equations
@[instance]
def metric.inhabited_left {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) [inhabited X] :
Equations
@[instance]
def metric.inhabited_right {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) [inhabited Y] :
Equations
theorem metric.to_glue_commute {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :
Φ = Ψ
theorem metric.to_glue_l_isometry {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :
theorem metric.to_glue_r_isometry {X : Type u} {Y : Type v} {Z : Type w} [nonempty Z] [metric_space Z] [metric_space X] [metric_space Y] {Φ : Z → X} {Ψ : Z → Y} (hΦ : isometry Φ) (hΨ : isometry Ψ) :
def metric.inductive_limit_dist {X : Type u} [Π (n : ), metric_space (X n)] (f : Π (n : ), X nX (n + 1)) (x y : Σ (n : ), X n) :

Predistance on the disjoint union Σ n, X n.

Equations
theorem metric.inductive_limit_dist_eq_dist {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) (x y : Σ (n : ), X n) (m : ) (hx : x.fst m) (hy : y.fst m) :
= dist f x.snd) f y.snd)

The predistance on the disjoint union Σ n, X n can be computed in any X k for large enough k.

def metric.inductive_premetric {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) :
pseudo_metric_space (Σ (n : ), X n)

Premetric space structure on Σ n, X n.

Equations
def metric.inductive_limit {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) :
Type u

The type giving the inductive limit in a metric space context.

Equations
@[instance]
def metric.metric_space_inductive_limit {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) :

Metric space structure on the inductive limit.

Equations
def metric.to_inductive_limit {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) (n : ) (x : X n) :

Mapping each X n to the inductive limit.

Equations
@[instance]
def metric.inductive_limit.inhabited {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) [inhabited (X 0)] :
Equations
theorem metric.to_inductive_limit_isometry {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) (n : ) :

The map to_inductive_limit n mapping X n to the inductive limit is an isometry.

theorem metric.to_inductive_limit_commute {X : Type u} [Π (n : ), metric_space (X n)] {f : Π (n : ), X nX (n + 1)} (I : ∀ (n : ), isometry (f n)) (n : ) :
f n =

The maps to_inductive_limit n are compatible with the maps f n.