-
Notifications
You must be signed in to change notification settings - Fork 1
/
metr.tex
730 lines (574 loc) · 31 KB
/
metr.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
%%!TEX root =the-metr.tex
%array^
\chapter{Metric spaces}
In this chapter we fix conventions and notations. We are assuming that the reader is familiar with basic notions in metric geometry.
\section{Metrics and their relatives}
\label{sec:metric spaces}
\parbf{Definitions.}
Let $\II$ be a subinterval of $[0,\infty]$.
A function $\rho$ defined on $\spc{X}\times\spc{X}$ is called an $\II$-valued metric if the following conditions hold:
\begin{itemize}
\item $\rho(x,x)=0$ for any $x$;
\item $\rho(x,y)\in \II$ for any pair $x\ne y$;
\item $\rho(x,y)+\rho(x,z)\ge \rho(y,z)$ for any triple of points $x,y, z$.
\end{itemize}
The value $\rho(x,y)$ is also called the \index{distance}\emph{distance} between $x$ and $y$.
The above definition will be used for four choices of the interval $\II$: $(0,\infty)$, $(0,\infty]$, $[0,\infty)$, and $[0,\infty]$.
Any $\II$-valued metric can be referred to briefly as a metric;
the interval should be apparent from context but by default, a metric is $(0,\infty)$-valued.
If we need to be more specific, we may also use the following names:
\begin{itemize}
\item a $(0,\infty)$-valued metric may be called a \index{genuine metric}\emph{genuine metric}.
\item a $(0,\infty]$-valued metric may be called an \index{$\infty$-metric}\emph{$\infty$-metric}.
\item a $[0,\infty)$-valued metric may be called a \index{genuine pseudometric}\emph{genuine pseudometric}.
\item a $[0,\infty]$-valued metric may be called a \index{pseudometric}\emph{pseudometric} or an \index{$\infty$-pseudometric}\emph{$\infty$-pseudometric}.
\end{itemize}
A metric space is a set equipped with a metric.
The distance between points $x$ and $y$ in a metric space $\spc{X}$ will usually be denoted by \[\dist{x}{y}{}\qquad\text{or}\quad \dist{x}{y}{\spc{X}};\]
the latter will be used if we need to emphasize that we are working in the space $\spc{X}$.
The function $\distfun{x}{}{}\:\spc{X}\to\RR$ defined as
\[\distfun{x}{}{}\:y\mapsto\dist{x}{y}{}\]
will be called the \index{distance function}\emph{distance function} from $x$.
Any subset $A$ in a metric space $\spc{X}$ will be also considered as a \index{subspace}\emph{subspace};
that is, a metric space with the metric defined by restricting the metric of $\spc{X}$ to $A\times A\subset \spc{X}\times\spc{X}$.
The \index{direct product}\emph{direct product} $\spc{X}\times \spc{Y}$ of two metric spaces $\spc{X}$ and $\spc{Y}$ is defined as the metric space carrying the metric
\[
\dist{(p,\phi)}{(q,\psi)}{} =\sqrt{\dist[2]{p}{q}{} + \dist[2]{\phi}{\psi}{}}
\]
for $p,q\in \spc{X}$ and $\phi,\psi\in \spc{Y}$.
A map between two metric spaces is called an \index{isometry}\emph{isometry} if it is a bijection and preserves distances between points.
\parbf{Zero and infinity.}
Genuine metric spaces are the main objects of study in this book.
However, the generalizations above are useful
in various definitions and constructions.
For example, the construction of length metric (see Section~\ref{sec:intrinsic}) uses infinite distances.
The following definition gives another example.
\begin{thm}{Definition}\label{def:disjoint-union}
Assume $\{\spc{X}_\alpha\}_{\alpha\in\IndexSet}$ is a collection of $\infty$-metric spaces.
The disjoint union
$$\bm{X}=\bigsqcup_{\alpha\in\IndexSet}\spc{X}_\alpha$$
has a natural $\infty$-metric on it defined as follows:
given two points $x\in\spc{X}_\alpha$ and $y\in\spc{X}_\beta$,
let
\[
\begin{matrix}
\dist{x}{y}{\bm{X}}=\infty&\text{if}\quad\alpha\ne\beta,
\\
\dist{x}{y}{\bm{X}}=\dist{x}{y}{\spc{X}_\alpha}&\text{if}\quad\alpha=\beta.
\end{matrix}
\]
The resulting $\infty$-metric space $\bm{X}$ will be called the \index{disjoint union of metric spaces}\emph{disjoint union} of $\{\spc{X}_\alpha\}_{\alpha\in\IndexSet}$, denoted by \[\bigsqcup_{\alpha\in\IndexSet}\spc{X}_\alpha.\]
\end{thm}
Now let us give examples showing that vanishing and infinite distance between distinct points can appear naturally and useful in constructions.
Suppose a set ${\spc{X}}$ comes with a set of metrics $\dist{}{}{\alpha}$ for $\alpha\in\IndexSet$.
Then
\[\dist{x}{y}{}=\sup\set{\dist{x}{y}{\alpha}}{\alpha\in\IndexSet}\]
is in general only an $\infty$-metric;
that is, even if the metrics $\dist{}{}{\alpha}$ are genuine, then $\dist{}{}{}$ might be $(0,\infty]$-valued.
Let $\spc{X}$ be a set,
let $\spc{Y}$ be a metric space, and
let $\map\:\spc{X}\to\spc{Y}$ be a map.
If $\map$ is not injective,
then the {}\emph{pullback}
\[\dist{x}{y}{\spc{X}}=\dist{\map(x)}{\map(y)}{\spc{Y}}\]
defines only a pseudometric on $\spc{X}$.
\parbf{Corresponding metric space and metric component.}
The following two observations show that
nearly any question about metric spaces can be reduced to a question about genuine metric spaces.
Assume $\spc{X}$ is a pseudometric space.
Set
$x\sim y$ if $\dist{x}{y}{}=0$.
Note that if $x\sim x'$, then $\dist{y}{x}{}=\dist{y}{x'}{}$ for any $y\in\spc{X}$.
Thus, $\dist{}{}{}$ defines a metric on the
quotient set $\spc{X}/{\sim}$.
This way we obtain a metric space $\spc{X}'$.
The space $\spc{X}'$ is called the
\emph{corresponding metric space} for the pseudometric space $\spc{X}$.
Often we do not distinguish between $\spc{X}'$ and~$\spc{X}$.
Set $x\approx y$ if and only if $\dist{x}{y}{}<\infty$;
this is another equivalence relation on $\spc{X}$.
The equivalence class of a point $x\in\spc{X}$ will be called the \index{metric component}\emph{metric component}
of $x$; it will be denoted by $\spc{X}_x$\index{ $\spc{X}_x$ (metric component)}.
One could think of $\spc{X}_x$ as $\oBall(x,\infty)_{\spc{X}}$, the open ball centered at $x$ and radius $\infty$ in $\spc{X}$; see definition below.
It follows that any $\infty$-metric space is a {}\emph{disjoint union} of genuine metric spaces, the metric components of the original $\infty$-metric space; see Definition~\ref{def:disjoint-union}
To summarize this discussion: given a $[0,\infty]$-valued metric space $\spc{X}$, we may pass to the corresponding $(0,\infty]$-valued metric space $\spc{X}'$ and break the latter into a disjoint union of metric components, each of which is a genuine metric space.
\section{Notations}
\label{sec:notations}
\parbf{Balls.}
Given $R\in[0,\infty]$ and a point $x$ in a metric space $\spc{X}$, the sets
\begin{align*}
\oBall(x,R)&=\set{y\in \spc{X}}{\dist{x}{y}{}<R},
\\
\cBall[x,R]&=\set{y\in \spc{X}}{ \dist{x}{y}{}\le R}%V: I suggest using just square brackets or just a bar over B for closed balls. Using both is an overkill. %S. I prefer B(A,R) and \bar B(A,R) where A is radius, B and \bar B tell open or closed. This is easiest and makes most sense. A: for me [] reinforse the meaning, but I will agree on \bar B(x,R)
\end{align*}
are called the \index{open ball}\emph{open} and the \index{closed ball}\emph{closed balls} of radius $R$ with center $x$, respectively.
If we need to emphasize that these balls are taken in the space $\spc{X}$,
we write\index{$\oBall(x,R)_{\spc{X}}$ (open ball)}\index{$\cBall[x,R]_{\spc{X}}$ (closed ball)}
\[\oBall(x,R)_{\spc{X}}\quad\text{and}\quad \cBall[x,R]_{\spc{X}},\]
respectively.
Since in the model space $\Lob{m}{\kappa}$ all balls of the same radius are isometric,
often we will not need to specify the center of the ball,
and may write
\[\oBall(R)_{\Lob{m}{\kappa}}\quad\text{and}\quad\cBall[R]_{\Lob{m}{\kappa}},\]
respectively.
A set $A\subset\spc{X}$ is called \index{bounded set}\emph{bounded} if $A\subset\oBall(x,R)$ for some $x\in\spc{X}$ and $R<\infty$.
\parbf{Distances to sets.}
For subset $A\subset \spc{X}$,
let us denote the distance from $A$ to a point $x$ in $\spc{X}$ by $\distfun{A}{x}$\index{$\distfun{A}{x}$ (distance)};
that is,
\[\distfun{A}{x}
\df
\inf\set{\dist{a}{x}{}}{a\in A}.\]
For any subset $A\subset\spc{X}$, the sets \index{$\oBall(A,R)$ (open $R$-neighborhood)}\index{$\cBall[A,R]$ (closed $R$-neighborhood)}
\begin{align*}
\oBall(A,R)&=\set{y\in \spc{X}}{ \distfun{A}{y}{}<R},
\\
\cBall[A,R]&=\set{y\in \spc{X}}{\distfun{A}{y}{}\le R}
\end{align*}
are called the \index{open $R$-neighborhood}\emph{open} and \index{closed $R$-neighborhood}\emph{closed $R$-neighborhoods} of $A$, respectively.
\parbf{Diameter, radius, and packing.}
Let $\spc{X}$ be a metric space.
Then the \index{diameter}\emph{diameter} of $\spc{X}$ is defined as
\[\diam \spc{X}=\sup\set{\dist{x}{y}{}}{x,y\in \spc{X}}.\]
The \index{radius}\emph{radius} of $\spc{X}$ is defined as
\[\rad \spc{X}=\inf\set{R>0}{\oBall(x,R)= \spc{X}\ \text{for some}\ x\in\spc{X}}.\]
The \index{$\eps$-pack}\emph{$\eps$-pack} of $\spc{X}$ (or \index{packing number}\emph{packing number}) is the maximal number (possibly infinite) of points in $\spc{X}$ at distance $>\eps$ from each other; it is denoted by $\pack_\eps\spc{X}$\index{$\pack_\eps\spc{X}$}.
If $m=\pack_\eps\spc{X}<\infty$, then a set $\{x^1,x^2,\dots,x^m\}$ in $\spc{X}$
such that $\dist{x^i}{x^j}{}>\eps$ is called a \index{maximal packing}\emph{maximal $\eps$-packing} in $\spc{X}$.
\parbf{G-delta sets.}
Recall that an arbitrary union of open balls in a metric space is called an \index{open set}\emph{open set}.
A subset of a metric space is called a \index{G-delta set}\emph{G-delta set} if it can be presented as an intersection of a countable number of open subsets.
\begin{thm}{Baire's theorem}
Let $\{\Omega_n\}$, $n\in \NN$, be a collection of open dense subsets of complete metric space $\spc{X}$.
Then $\bigcap_{n\in \NN}\Omega_n$ is dense in $\spc{X}$.
\end{thm}
\parbf{Proper spaces.}
A metric space $\spc{X}$ is called \index{proper space}\emph{proper} if all closed bounded sets in $\spc{X}$ are compact.
This condition is equivalent to each of the following statements:
\begin{enumerate}
\item For some (and therefore any) point $p\in \spc{X}$ and any $R<\infty$,
the closed ball $\cBall[p,R]\subset\spc{X}$ is compact.
\item The function $\distfun{p}{}{}\:\spc{X}\to\RR$ is proper for some (and therefore any) point $p\in \spc{X}$.
\end{enumerate}
We will also often use the following two classical statements:
\begin{thm}{Proposition}
Proper metric spaces are separable and second countable.
\end{thm}
\begin{thm}{Proposition}\label{compact=seq-compact}
Let $\spc{X}$ be a metric space.
Then the following are equivalent
\begin{subthm}{}
$\spc{X}$ is compact;
\end{subthm}
\begin{subthm}{}
$\spc{X}$ is \index{sequentially compact}\emph{sequentially compact}; that is, any sequence of points in $\spc{X}$ contains a convergent subsequence;
\end{subthm}
\begin{subthm}{}
$\spc{X}$ is complete and for any $\eps>0$ there is a \index{$\eps$-net}\emph{finite $\eps$-net} in $\spc{X}$; that is, there is a finite collection of points $p_1,\ldots,p_{N}$ such that $\bigcup_i\oBall(p_i,\eps)=\spc{X}$.
\end{subthm}
\begin{subthm}{}
$\spc{X}$ is complete and for any $\eps>0$ there is a {}\emph{compact $\eps$-net} in $\spc{X}$; that is, $\oBall(K,\eps)=\spc{X}$ for a compact set $K\subset \spc{X}$.
\end{subthm}
\end{thm}
\section{Length spaces}\label{sec:intrinsic}
A \index{curve}\emph{curve} in a metric space $\spc{X}$ is a continuous map $\alpha\:\II\to \spc{X}$, where $\II$ is a {}\emph{real interval} (that is, an arbitrary convex subset of $\RR$).
\begin{thm}{Definition}\label{def:length}
Let $\spc{X}$ be a metric space.
Given a curve $\alpha\: \II\to \spc{X}$, we define its \index{length}\emph{length} as
\[
\length \alpha \df \sup\set{\sum_{i\ge 1} \dist{\alpha(t_i)}{\alpha (t_{i-1})}{}}{t_0,\dots,t_n\in \II,t_0\le\ldots\le t_n}.
\]
\end{thm}
The following lemma is an easy exercise.
%The same definition works for arbitrary map $\alpha\:\II\to \spc{X}$, not necessary continuous.
\begin{thm}{Lower semicontinuity of length}\label{thm:semicont-of-length}
Assume $\alpha_n\:\II\to \spc{X}$ is a sequence of curves that converges pointwise to a curve $\alpha_\infty\:\II\to \spc{X}$.
Then
\[\length\alpha_\infty\le \liminf_{n\to\infty}\length\alpha_n.\]
\end{thm}
Given two points $x$ and $y$ in a metric space $\spc{X}$,
consider the value
\[\yetdist{x}{y}{}=\inf_{\alpha}\{\length\alpha\},\]
where infimum is taken for all paths $\alpha$ from $x$ to $y$.
It is easy to see that $\yetdist{}{}{}$ defines a $(0,\infty]$-valued metric on $\spc{X}$;
it will be called the \index{induced length metric}\emph{induced length metric} on $\spc{X}$.
Clearly
\[\yetdist{x}{y}{}\ge \dist{x}{y}{}\]
for any $x,y\in \spc{X}$.
It easily follows from the definition that the length of a curve $\alpha$ with respect to $\yetdist{}{}{}$ is equal to the length of $\alpha$ with respect to $\dist{}{}{}$.
In particular, iterating the construction produces the same metric $\yetdist{}{}{}$.
\begin{thm}{Definition}\label{def:length-space}
If $\yetdist{x}{y}{}=\dist{x}{y}{}$ for any pair of points $x,y$ in a metric space $\spc{X}$, then $\dist{}{}{}$ is called \index{length metric}\emph{length metric}, and $\spc{X}$ is called a \index{length space}\emph{length space}.
\end{thm}
In other words, a metric space $\spc{X}$ is a
\emph{length space}
if for any $\eps>0$ and any two points $x,y\in \spc{X}$ with $\dist{x}{y}{}<\infty$ there is a path $\alpha\:[0,1]\to\spc{X}$ connecting $x$ to $y$ such that
\[\length\alpha<\dist{x}{y}{}+\eps.\]
In this book, most of the time we consider length spaces.
If $\spc{X}$ is a length space,
and $A\subset \spc{X}$, then the set $A$ comes with the inherited metric from $\spc{X}$,
which might be not a length metric.
The corresponding length metric on $A$ will be denoted by $\dist{}{}{A}$.
\parbf{Variations of the definition.}
We will need the following variations of Definition~\ref{def:length-space}:
\index{R-geodesic space}
\index{R-length space}
\begin{itemize}
\item Assume $R>0$.
If $\yetdist{x}{y}{}=\dist{x}{y}{}$ for any pair $\dist{x}{y}{}<R$, then $\spc{X}$ is called an \index{$R$-length space}\emph{$R$-length space}.
\item
If any point in $\spc{X}$ admits a neighborhood $\Omega$ such that $\yetdist{x}{y}{}=\dist{x}{y}{}$ for any pair of points $x,y\in \Omega$, then $\spc{X}$ is called a \index{length space!locally length space}\emph{locally length space}.
\item
A metric space is called \index{geodesic!space}\emph{geodesic} if for any two points $x,y$ with $\dist{x}{y}{}<\infty$ there is a geodesic $[x y]$ in $\spc X$.
\item
Assume $R>0$. A metric space is called
\index{$R$-geodesic space}\emph{$R$-geodesic}
if for any two points $x,y$ such that $\dist{x}{y}{}<R$ there is a geodesic $[x y]$ in $\spc X$.
\end{itemize}
Note that the notions of $\infty$-length spaces and length spaces are the same.
Clearly, any geodesic space is a length space
and any $R$-geodesic space is $R$-length.
\begin{thm}{Example}
Consider a metric space $\spc{X}$ obtained by gluing a countable collection of disjoint intervals $\II_n$ of length $1+\tfrac1n$ where for each $\II_n$ one end is glued to $p$ and the other to $q$.
Then $\spc{X}$ carries a natural complete length metric such that $\dist{p}{q}{}=1$, but there is no geodesic connecting $p$ to~$q$.
\end{thm}
\begin{thm}{Exercise}\label{ex:complete=>complete}
Let $\spc{X}$ be a metric space,
and let $\yetdist{}{}{}$ be the length metric on it.
Show the following:
\begin{subthm}{ex:complete=>complete:complete}
If $\spc{X}$ is complete, then $(\spc{X},\yetdist{}{}{})$ is complete.
\end{subthm}
\begin{subthm}{ex:complete=>complete:compact}
If $\spc{X}$ is compact, then $(\spc{X},\yetdist{}{}{})$ is geodesic.
\end{subthm}
\end{thm}
\begin{thm}{Exercise}\label{ex:no-geod}
Give an example of a complete length space such that no pair of distinct points can be joined by a geodesic.
\end{thm}
\begin{thm}{Exercise}\label{ex:compact+connceted}
Let $\spc{X}$ be a complete length space.
Show that for any compact subset $K$ in $\spc{X}$
there is a compact path-connected subset $K'$ that contains $K$.
\end{thm}
\begin{thm}{Definition}
Consider two points $x$ and $y$ in a metric space $\spc{X}$.
\begin{enumerate}[(i)]
\item A point $z\in \spc{X}$ is called a \index{midpoint}\emph{midpoint} between $x$ and $y$ if
\[\dist{x}{z}{}=\dist{y}{z}{}=\tfrac12\cdot\dist[{{}}]{x}{y}{}.\]
\item Assume $\eps\ge 0$.
A point $z\in \spc{X}$ is called an \index{$\eps$-midpoint}\emph{$\eps$-midpoint} between $x$ and $y$
if
\[\dist{x}{z}{}\le\tfrac12\cdot\dist[{{}}]{x}{y}{}+\eps,
\quad\text{and}\quad
\dist{y}{z}{}\le\tfrac12\cdot\dist[{{}}]{x}{y}{}+\eps.\]
\end{enumerate}
\end{thm}
Note that a $0$-midpoint is the same as a midpoint.
The following lemma was essentially proved by Karl Menger \cite[Section 6]{menger}.
\begin{thm}{Lemma}\label{lem:mid>geod}
Let $\spc{X}$ be a complete metric space.
\begin{subthm}{lem:mid>length}
Assume that for any pair of points $x,y\in \spc{X}$, and any $\eps>0$,
there is an $\eps$-midpoint $z$.
Then $\spc{X}$ is a length space.
\end{subthm}
\begin{subthm}{lem:mid>geod:geod}
Assume that for any pair of points $x,y\in \spc{X}$,
there is a midpoint $z$.
Then $\spc{X}$ is a geodesic space.
\end{subthm}
\begin{subthm}{lem:mid>geod:R}
If for some $R>0$, the assumptions \ref{SHORT.lem:mid>length} or \ref{SHORT.lem:mid>geod:geod} hold only for pairs of points $x,y\in \spc{X}$ such that $\dist{x}{y}{}<R$,
then $\spc{X}$ is an $R$-length or an $R$-geodesic space, respectively.
\end{subthm}
\end{thm}
\parit{Proof.}
Fix a pair of points $x,y\in \spc{X}$.
Let $\eps_n=\frac\eps{2^{2\cdot n}}$.
Set $\alpha(0)=x$,
and $\alpha(1)=y$.
Let $\alpha(\tfrac12)$ be an $\eps_1$-midpoint between $\alpha(0)$ and $\alpha(1)$.
Further, let $\alpha(\frac14)$
and $\alpha(\frac34)$ be $\eps_2$-midpoints
between the pairs $(\alpha(0),\alpha(\tfrac12))$
and $(\alpha(\tfrac12),\alpha(1))$, respectively.
Applying the above procedure recursively,
on the $n$-th step we define $\alpha(\tfrac{\kay}{2^n})$,
for every odd integer $\kay$ such that $0<\tfrac\kay{2^n}<1$, to be an $\eps_{n}$-midpoint between the already defined
$\alpha(\tfrac{\kay-1}{2^n})$ and $\alpha(\tfrac{\kay+1}{2^n})$.
This way we define $\alpha(t)$ for all dyadic rationals $t$ in $[0,1]$.
If $t\in[0,1]$ is not a dyadic rational, consider a sequence of dyadic rationals $t_n\to t$ as $n\to\infty$.
By completeness of $\spc{X}$, the sequence $\alpha(t_n)$ converges;
let $\alpha(t)$ be its limit.
It is easy to see that $\alpha(t)$
does not depend on the choice of the sequence $t_n$,
and $\alpha\:[0,1]\to\spc{X}$ is a path from $x$ to $y$.
Moreover,
\[\begin{aligned}
\length\alpha&\le \dist{x}{y}{}+\sum_{n=1}^\infty 2^{n-1}\cdot\eps_n\le
\\
&\le \dist{x}{y}{}+\tfrac\eps2.
\end{aligned}
\eqlbl{eq:eps-midpoint}
\]
Since $\eps>0$ is arbitrary, we have \ref{SHORT.lem:mid>length}.
To prove \ref{SHORT.lem:mid>geod:geod},
one should repeat the same argument
taking midpoints instead of $\eps_n$-midpoints.
In this case, \ref{eq:eps-midpoint} holds for $\eps_n=\eps=0$.
The proof of \ref{SHORT.lem:mid>geod:R} is obtained by a straightforward modification of the proofs above.
\qeds
\begin{thm}{Exercise}\label{ex:menger}
Suppose that for any two distinct points $x$ and $y$ in a complete metric space $\spc{X}$ there is yet another point $z$ such that
\[
\dist xz{}+\dist yz{}=\dist xy{}.
\]
Show that $\spc{X}$ is geodesic.
\end{thm}
Since in a compact set a sequence of $\tfrac1n$-midpoints $(z_n)$ contains a convergent subsequence,
Lemma \ref{lem:mid>geod} implies the following.
\begin{thm}{Corollary}
A proper length space is geodesic.
\end{thm}
{\sloppy
\begin{thm}{Hopf--Rinow theorem}\label{thm:Hopf-Rinow}
Any complete, locally compact length space is proper.
\end{thm}
}
\parit{Proof.}
Let $\spc{X}$ be a locally compact length space.
Given $x\in \spc{X}$, denote by $\rho(x)$ the supremum of all $R>0$ such that
the closed ball $\cBall[x,R]$ is compact.
Since $\spc{X}$ is locally compact,
$$\rho(x)>0\quad\text{for any}\quad x\in \spc{X}.\eqlbl{eq:rho>0}$$
It is sufficient to show that $\rho(x)=\infty$ for some (and therefore any) point $x\in \spc{X}$.
Assume the contrary; that is, $\rho(x)<\infty$.
\begin{clm}{} $B=\cBall[x,\rho(x)]$ is compact for any $x$.
\end{clm}
Indeed, $\spc{X}$ is a length space;
therefore for any $\eps>0$,
the set $\cBall[x,\rho(x)\z-\eps]$ is a compact $\eps$-net in $B$.
Since $B$ is closed and hence complete, it is compact by Proposition~\ref{compact=seq-compact}.
\claimqeds
\begin{clm}{} $|\rho(x)-\rho(y)|\le \dist{x}{y}{\spc{X}}$ for any $x,y\in\spc{X}$;
in particular $\rho\:\spc{X}\to\RR$ is a continuous function.
\end{clm}
Indeed, assume the contrary; that is, $\rho(x)+\dist{x}{y}{}<\rho(y)$ for $x,y\in \spc{X}$.
Then
$\cBall[x,\rho(x)+\eps]$ is a closed subset of $\cBall[y,\rho(y)]$ for $\eps>0$.
Then compactness of $\cBall[y,\rho(y)]$ implies compactness of $\cBall[x,\rho(x)+\eps]$, a contradiction.\claimqeds
Set $\eps=\min_{y\in B}\{\rho(y)\}$;
the minimum is defined since $B$ is compact.
From \ref{eq:rho>0}, we have $\eps>0$.
Choose a finite $\tfrac\eps{10}$-net $\{a_1,a_2,\dots,a_n\}$ in $B$.
The union $W$ of the closed balls $\cBall[a_i,\eps]$ is compact.
Clearly
$\cBall[x,\rho(x)+\frac\eps{10}]\subset W$.
Therefore $\cBall[x,\rho(x)+\frac\eps{10}]$ is compact,
a contradiction.
\qeds
\begin{thm}{Exercise}\label{exercise from BH}
Construct a geodesic space that is locally compact,
but whose completion is neither geodesic nor locally compact.
\end{thm}
\section{Convex sets}
\begin{thm}{Definition}
\label{def:convex-set}
Let $\spc{X}$ be a geodesic space, and let $A\subset\spc{X}$.
$A$ is
\index{convex set}\emph{convex}
if for every two points $p,q\in A$ any geodesic $[pq]$ lies in~$A$.
$A$ is
\index{convex set!weakly convex set}\emph{weakly convex}
if for every two points $p,q\in A$
there is a geodesic $[pq]$
that lies in $A$.
We say that $A$ is
\index{convex set!totally convex set}\emph{totally convex}
if for every two points $p,q\in A$, every local geodesic from $p$ to $q$ lies in $A$.
If for some $R\in (0,\infty]$ these definitions are applied only for pairs of points such that $\dist{p}{q}{}<R$ and only for the geodesics of length $<R$,
then $A$ is called
\index{$R$-convex set}\emph{$R$-convex},
\emph{weakly $R$-convex},
or \emph{totally $R$-convex}, respectively.
A set $A\subset\spc{X}$ is called
\index{convex set!locally convex set}\emph{locally convex}
if every point $a\in A$ admits an open neighborhood $\Omega\ni a$
such that for every two points $p,q\in A\cap\Omega$ every geodesic $[pq]\subset \Omega$ lies in $A$.
Similarly one defines locally weakly convex and locally totally convex sets. %DO we neeed all of them??
\end{thm}
\parbf{Remarks.} Let us state a few observations that easily follow from the definition.
\begin{itemize}
\item The notion of ({}\emph{weakly}) {}\emph{convex set} is the same as ({}\emph{weakly}) {}\emph{$\infty$-convex set}.
\item The inherited metric on a weakly convex set coincides with its length metric.
\item Any open set is locally convex by definition.
\end{itemize}
The following proposition states that weak convexity survives under ultralimits.
An analogous statement about convexity does not hold;
for example, there is a sequence of convex discs in $\mathbb{S}^2$ that converges to a hemisphere, which is not convex.
\begin{thm}{Proposition}\label{prop:weak-convex-stable}% V: Should this Proposition be moved to Chapter 3???
Let $\spc{X}_n,$ be a sequence of geodesic spaces.
Let $\o$ be an ultrafilter on $\mathbb N$ (see Definition~\ref{def:ultrafilter}).
Assume that $A_n\subset \spc{X}_n$ is a sequence of weakly convex sets,
$\spc{X}_n\to \spc{X}_\o$,
and $A_n\to A_\o\subset \spc{X}_\o$ as $n\to\o$.
Then $A_\o$ is a weakly convex set of $\spc{X}_\o$.
\end{thm}
\parit{Proof.}
Fix $x_\o,y_\o\in A_\o$.
Consider sequences $x_n,y_n\in A_n$ such that $x_n\to x_\o$ and $y_n\to y_\o$ as $n\to\o$.
Denote by $\alpha_n$ a geodesic path from $x_n$ to $y_n$ that lies in $A_n$.
Let
\[\alpha_\o(t)=\lim_{n\to \o}\alpha_n(t).\]
It remains to observe that $\alpha_\o$ is a geodesic path that lies in $A_\o$.
\qeds
\section{Quotient spaces}\label{sec:quotient}
\parbf{Quotient spaces.} Assume $\spc{X}$ is a metric space
with an equivalence relation $\sim$.
Note that given a family of pseudometrics $\rho_\alpha$ on $\spc{X}/{\sim}$,
their least upper bound
\[\rho(x,y)=\sup_\alpha\{\,\rho_\alpha(x,y)\,\}\]
is also a pseudometric.
If for the projections $\spc{X}\to(\spc{X}/{\sim},\rho_\alpha)$ are \index{short map}\emph{short} (that is, \textit{distance non-increasing}), then so is $\spc{X}\to(\spc{X}/{\sim},\rho)$.
It follows that
the quotient space $\spc{X}/{\sim}$ admits a natural quotient pseudometric;
this is the maximal pseudometric on $\spc{X}/{\sim}$
that makes the quotient map
$\spc{X}\to\spc{X}/{\sim}$ short.
The corresponding metric space will be also denoted as $\spc{X}/{\sim}$
and will be called the \index{quotient space}\emph{quotient space} of $\spc{X}$ by the equivalence relation $\sim$.
In general, the points of the metric space $\spc{X}/{\sim}$
are formed by equivalence classes in $\spc{X}$
for a wider equivalence relation.
However, in most of the cases we will consider,
the set of equivalence classes will coincide with the set of points in the metric space $\spc{X}/{\sim}$.
\begin{thm}{Proposition}\label{prop:length-X}
Let $\sim$ be an equivalence relation on a length space~$\spc{X}$.
Then $\spc{X}/{\sim}$ is a length space.
\end{thm}
\parit{Proof.}
Let $\spc{Y}$ be an arbitrary metric space.
Since $\spc{X}$ is a length space,
a map $f\:\spc{X}\to \spc{Y}$ is short if and only if
\[\length(f\circ\alpha)\le \length\alpha\]
for any curve
$\alpha\:\II\to \spc{X}$.
Denote by $\yetdist{}{}{}$ the length metric on $\spc{Y}$.
It follows that if $f\:\spc{X}\to \spc{Y}$ is short,
then so is
$f\:\spc{X}\to (\spc{Y},\yetdist{}{}{})$.
Consider the quotient map
$f\:\spc{X}\to\spc{X}/{\sim}$.
Recall that the space $\spc{X}/{\sim}$ is defined by the maximal pseudometric that makes $f$ short.
Denoting by $\yetdist{}{}{}$ the length metric on $\spc{X}/{\sim}$,
it follows that
\[f\:\spc{X}\to(\spc{X}/{\sim},\yetdist{}{}{})\]
is also short.
Note that
\[\yetdist{x}{y}{}\ge\dist{x}{y}{\spc{X}/{\sim}}\]
for any $x,y\in \spc{X}/{\sim}$.
From maximality of $\dist{}{}{\spc{X}/{\sim}}$, we get
\[\yetdist{x}{y}{}=\dist{x}{y}{\spc{X}/{\sim}}\]
for any $x,y\in \spc{X}/{\sim}$;
that is, $\spc{X}/{\sim}$ is a length space.
\qeds
\parbf{Group actions.}
Assume a group $G$ acts on a metric space $\spc{X}$.
Consider a relation $\sim$ on $\spc{X}$
defined by $x\sim y$ if there is $g\in G$ such that $x=g\cdot y$.
Note that $\sim$ is an equivalence relation.
In this case, the quotient space $\spc{X}/{\sim}$ will also be denoted by $\spc{X}/G$, and can be regarded as the space of $G$-orbits in $\spc{X}$.
Assume that a group $G$ acts on $\spc{X}$ by isometries.
Then the distance between orbits $G\cdot x$ and $G\cdot y$ in $\spc{X}/G$
can be defined directly:
\[\dist{G\cdot x}{G\cdot y}{\spc{X}/G}=\inf\set{\dist{x}{g\cdot y}{\spc{X}}
=
\dist{g^{-1}\cdot x}{y}{\spc{X}}}{g\in G}.\]
If the $G$-orbits are closed, then $\dist{G\cdot x}{G\cdot y}{\spc{X}/G}=0$ if and only if $G\cdot x=G\cdot y$.
In this case, the quotient space $\spc{X}/G$ is a genuine metric space.
The following proposition follows from the definition of a quotient space:
\begin{thm}{Proposition}\label{prop:submetry-X/G}
Assume $\spc{X}$ is a metric space and a group $G$ acts on $\spc{X}$ by isometries.
Then the projection $\pi\co \spc{X}\to\spc{X}/G$ is a \emph{submetry};
that is, $\pi(\oBall(p,r))=\oBall(\pi(p),r)$ for any $p\in \spc{X}, r>0$ (see Definition~\ref{def:submetry}).
\end{thm}
\section{Gluing and doubling}\label{sec:doubling}
\parbf{Gluing.}
Recall that the disjoint union of metric spaces can be also considered as a metric space; see Definition~\ref{def:disjoint-union}.
Therefore the quotient space construction works as well for an equivalence relation on the disjoint union of metric spaces.
Consider two metric spaces $\spc{X}_1$ and $\spc{X}_2$
with subsets $A_1\subset\spc{X}_1$ and $A_2\subset\spc{X}_2$,
and a bijection $\phi\:A_1\to A_2$.
Consider the minimal equivalence relation on $\spc{X}_1\sqcup\spc{X}_2$
such that $a\sim \phi(a)$ for any $a\in A_1$.
In this case, the corresponding quotient space
$(\spc{X}_1\sqcup\spc{X}_2)/{\sim}$ will be called the \index{gluing}\emph{gluing of $\spc{X}$ and $\spc{Y}$ along $\phi$} and is denoted by
\[\spc{X}_1\sqcup_{\phi}\spc{X}_2.\]
Note that if the map $\phi\:A_1\to A_2$ is distance-preserving,
then the inclusions $\iota_i\:\spc{X}_i\to \spc{X}_1\sqcup_{\phi}\spc{X}_2$ are also distance-preserving, and
\[\dist{\iota_1(x_1)}{\iota_2(x_2)}{\spc{X}_1\sqcup_{\phi}\spc{X}_2}
=
\inf_{a_2=\phi(a_1)}
\{\,\dist{x_1}{a_1}{\spc{X}_1}+\dist{x_2}{a_2}{\spc{X}_2}\,\}\]
for any $x_1\in \spc{X}_1$ and $x_2\in \spc{X}_2$.
\parbf{Doubling.}
Let $\spc{V}$ be a metric space,
and let $A\subset \spc{V}$ be a closed subset.
A metric space $\spc{W}$ glued from two copies of $\spc{V}$ along $A$ is called the \index{doubling}\emph{doubling of $\spc{V}$ in $A$}.
The space $\spc{W}$ is completely described by the following properties:
\begin{itemize}
\item The space $\spc{W}$ contains $\spc{V}$ as a subspace;
in particular the set $A$ can be treated as a subset of $\spc{W}$.
\item There is an isometric involution of $\spc{W}$ which is called a \index{reflection}\emph{reflection in $A$};
it will be denoted by $x\mapsto x'$.
\item For any $x\in \spc{W}$ we have $x\in \spc{V}$ or $x'\in \spc{V}$, and
\[
\dist{x'}{y}{\spc{W}}
=\dist{x}{y'}{\spc{W}}
=\inf_{a\in A}\{\dist{x}{a}{\spc{V}}+\dist{a}{y}{\spc{V}}\}
\]
for any $x,y\in \spc{V}$.
\end{itemize}
The image of $\spc{V}$ under reflection in $A$ will be denoted by $\spc{V}'$.
The subspace $\spc{V}'$ is an isometric copy of $\spc{V}$.
Clearly $\spc{V}\cup\spc{V}'=\spc{W}$ and $\spc{V}\cap\spc{V}'=A$.
Moreover, $a=a'$ $\Longleftrightarrow$ $a\in A$.
The following proposition follows directly from the definitions.
\begin{thm}{Proposition}\label{prop:doubling}
Assume $\spc{W}$ is the doubling of the metric space $\spc{V}$ in its closed subset $A$.
Then:
\begin{subthm}{}
If $\spc{V}$ is a complete length space, then so is $\spc{W}$.
\end{subthm}
\begin{subthm}{}
If $\spc{V}$ is proper, then so is $\spc{W}$.
In this case, for any $x,y\in\spc{V}$ there is $a\in A$ such that
\[\dist{x}{a}{\spc{V}}+\dist{a}{y}{\spc{V}}=\dist{x}{y'}{\spc{W}}.\]
\end{subthm}
\begin{subthm}{prop:doubling:projection}
Given $x\in \spc{W}$, let $\bar x=x$ if $x\in \spc{V}$,
and $\bar x=x'$ otherwise. The map $\spc{W}\to\spc{V}$ defined by $x\mapsto \bar x$ is short and length-preserving.
In particular, if $\gamma$ is a geodesic in $\spc{W}$ with ends in $\spc{V}$, then $\bar\gamma$ is a geodesic in $\spc{V}$ with the same ends.
\end{subthm}
\end{thm}
\section{Kuratowsky embedding}\label{Kuratowsky embedding}
Given a metric space $\spc{X}$,
let us denote by $\Bnd(\spc{X},\RR)$\index{ $\Bnd(\spc{X},\RR)$ (space of bounded functions)} the space of all bounded functions on $\spc{X}$ equipped with the sup-norm
\[\|f\|=\sup_{x\in\spc{X}}\{|f(x)|\}.\]
\parbf{Kuratowski embedding.}
Given a point $p\in\spc{X}$, consider the
map $\kur_p\:\spc{X}\to\Bnd(\spc{X},\RR)$
defined by $\kur_p x=\distfun{x}{}{}-\distfun{p}{}{}$.
The map $\kur_p$ will be called the \index{Kuratowski map}\emph{Kuratowski map at $p$}.
From the triangle inequality, we have
\[\|\kur_p x-\kur_p y\|
=
\sup_{z\in\spc{X}}\{|\dist{x}{z}{}-\dist{y}{z}{}|\}
=
\dist{x}{y}{}.\]
Therefore, for any $p\in\spc{X}$, the Kuratowski map gives a distance-preserving map $\kur_p\:\spc{X}\hookrightarrow\Bnd(\spc{X},\RR)$.
Thus we can (and often will) consider the space $\spc{X}$ as a subset of $\Bnd(\spc{X},\RR)$.
\begin{thm}{Exercise}\label{ex:compact-in-lenght}
Show that any compact metric space is isometric to a subspace in a compact length space.
\end{thm}