-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheuclid.tex
753 lines (604 loc) · 31.5 KB
/
euclid.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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
%%!TEX root =the-euclid.tex
%arXiv
\chapter{The ghost of Euclid}
\section{Geodesics, triangles and hinges}
\label{sec:geods}
\parbf{Geodesics and their relatives.}
Let $\spc{X}$ be a metric space, and let $\II\subset \R$\index{$\II$ (interval)} be an interval.
A globally distance-preserving map $\gamma\:\II\to \spc{X}$ is called a \index{unit-speed geodesic}\emph{unit-speed geodesic}.
(Various authors call it differently: \index{shortest path}\emph{shortest path}, \index{minimizing geodesic}\emph{minimizing geodesic}.)
In other words, $\gamma\:\II\to \spc{X}$ is a unit-speed geodesic if the equality
\[\dist{\gamma(s)}{\gamma(t)}{\spc{X}}=|s-t|\]
holds for any pair $s,t\in \II$.
A unit-speed geodesic between $p$ and $q$ in $\spc{X}$ will be denoted by $\geod_{[p q]}$\index{$\geod_{[{p}{q}]}$ (unit-speed geodesic)}.
We will always assume $\geod_{[p q]}$ is parametrized starting at $p$;
that is, $\geod_{[p q]}(0)=p$ and $\geod_{[p q]}(\dist{p}{q}{})=q$.
The image of $\geod_{[p q]}$ will be denoted by $[p q]$\index{$[{p}{q}]$ (geodesic)} and called a \index{geodesic}\emph{geodesic}.
The term \index{geodesic}\emph{geodesic} will also be used for a linear reparametrization of a unit-speed geodesic.
With a slight abuse of notation, we will use the notation $[p q]$ also for the class of all linear reparametrizations of $\geod_{[p q]}$.
A unit-speed geodesic $\gamma\:\RR_{\ge0}\to \spc{X}$ is called a \index{half-line}\emph{half-line}.
A unit-speed geodesic $\gamma\:\RR\to \spc{X}$ is called a \index{line}\emph{line}.
A piecewise geodesic curve is called a \index{polygonal line}\emph{polygonal line};
we may say a \textit{polygonal line $p_1,\dots,p_n$} meaning a polygonal line with edges $[p_1p_2],\dots,[p_{n-1}p_n]$.
A closed polygonal line will be also called a polygon.
We may write $[p q]_{\spc{X}}$
to emphasize that the geodesic $[p q]$ is in the space~${\spc{X}}$.
Also, we use the following short-cut notation:
\begin{align*}
\mathopen{]} p q \mathclose{[}&=[pq]\setminus\{p,q\},
&
\mathopen{]} p q ]&=[pq]\setminus\{p\},
&
[ p q \mathclose{[}&=[pq]\setminus\{q\}.
\end{align*}
In general, a geodesic between $p$ and $q$ need not exist, and if it does exist, it need not to be unique.
However, once we write $\geod_{[p q]}$ or $[p q]$, we mean that we have fixed a choice of a geodesic.
A constant-speed geodesic $\gamma\:[0,1]\to\spc{X}$ is called a \index{geodesic!path}\emph{geodesic path}.
Given a geodesic $[p q]$,
we denote by $\geodpath_{[pq]}$ the corresponding geodesic path;
that is,
$$\geodpath_{[pq]}(t)\z\equiv\geod_{[pq]}(t\cdot\dist[{{}}]{p}{q}{}).$$
A curve $\gamma\:\II\to \spc{X}$ is called a \index{local geodesic}\emph{local geodesic} if for any $t\in\II$ there is a neighborhood $U\ni t$ in $\II$ such that the restriction $\gamma|_U$ is a constant-speed geodesic.
If $\II=[0,1]$, then $\gamma$ is called a \emph{local geodesic path}.
\begin{thm}{Proposition}\label{prop:busemann}
Suppose $\spc{X}$ is a metric space and $\gamma\:[0,\infty)\to \spc{X}$ is a half-line.
Then the \index{Busemann function}\emph{Busemann function} $\bus_\gamma\:\spc{X}\to \RR$
\[\bus_\gamma(x)=\lim_{t\to\infty}\dist{\gamma(t)}{x}{}- t\eqlbl{eq:def:busemann*}\]
is defined
and is $1$-Lipschitz.
\end{thm}
\parit{Proof.}
By the triangle inequality, the function $t\mapsto\dist{\gamma(t)}{x}{}- t$ is nonincreasing.
Clearly $\dist{\gamma(t)}{x}{}- t\ge-\dist{\gamma(0)}{x}{}$.
Thus the limit in \ref{eq:def:busemann*} is defined,
and it is 1-Lipschitz as a limit of 1-Lipschitz functions.
\qeds
\begin{thm}{Example}
If $\spc{X}$ is a Euclidean space and $\gamma(t)=p+t\cdot v$ where $v$ is a unit vector,
then
\[\bus_\gamma(x)=\langle x-p, v\rangle.\]
\end{thm}
\parbf{Triangles.}
For a triple of points $p,q,r\in \spc{X}$, a choice of a triple of geodesics $([q r], [r p], [p q])$ will be called a \index{triangle}\emph{triangle}, and we will use the short notation
$\trig p q r=([q r], [r p], [p q])$\index{$\trig{p}{q}{r}$ (triangle)}.
Again, given a triple $p,q,r\in \spc{X}$, there may be no triangle
$\trig p q r$, simply because one of the pairs of these points cannot be joined by a geodesic. Or there may be many different triangles, any of which can be denoted by $\trig p q r$.
Once we write $\trig p q r$, it means we have chosen such a triangle;
that is, made a choice of each $[q r]$, $[r p]$, and $[p q]$.
The value
$\dist{p}{q}{}+\dist{q}{r}{}+\dist{r}{p}{}$
will be called the \index{perimeter!perimeter of a triangle}\emph{perimeter of triangle} $\trig p q r$;
it obviously coincides with perimeter of the triple $p$, $q$, $r$ as defined below.
\parbf{Hinges.}
Let $p,x,y\in \spc{X}$ be a triple of points such that $p$ is distinct from $x$ and $y$.
A pair of geodesics $([p x],[p y])$ will be called a \index{hinge}\emph{hinge}, and will be denoted by
$\hinge p x y=([p x],[p y])$\index{$\hinge{{p}}{{q}}{{r}}$ (hinge)}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Model angles and triangles}\label{sec:mod-tri/angles}
Let $\spc{X}$ be a metric space,
$p,q,r\in \spc{X}$,
and $\kappa\in\RR$.
Let us define the \index{model triangle}\emph{model triangle} $\trig{\tilde p}{\tilde q}{\tilde r}$
(briefly,
$\trig{\tilde p}{\tilde q}{\tilde r}=\modtrig\kappa(p q r)$%
\index{$\modtrig\kappa$ (model triangle)!$\modtrig\kappa({p}{q}{r})$}) to be a triangle in the model plane $\Lob2\kappa$ such that
\[\dist{\tilde p}{\tilde q}{}=\dist{p}{q}{},
\quad \dist{\tilde q}{\tilde r}{}=\dist{q}{r}{},
\quad \dist{\tilde r}{\tilde p}{}=\dist{r}{p}{}.\]
In the notation of Section~\ref{model},
$\modtrig\kappa(p q r)=\modtrig\kappa\{\dist{q}{r}{},\dist{r}{p}{},\dist{p}{q}{}\}$.
If $\kappa\le 0$, the model triangle is always defined, that is, it exists and is unique up to an isometry of $\Lob2\kappa$.
If $\kappa>0$, the model triangle is said to be defined if in addition
\[\dist{p}{q}{}+\dist{q}{r}{}+\dist{r}{p}{}< 2\cdot\varpi\kappa;\]
here $\varpi\kappa$ denotes the diameter of the model space $\Lob2\kappa$.
In this case, the model triangle also exists and is unique up to an isometry of $\Lob2\kappa$.
The value $\dist{p}{q}{}+\dist{q}{r}{}+\dist{r}{p}{}$ will be called the \index{perimeter!perimeter of a triple}\emph{perimeter of the triple} $p$, $q$, $r$.
If for $p,q,r\in \spc{X}$,
$\trig{\tilde p}{\tilde q}{\tilde r}=\modtrig\kappa(p q r)$ is defined
and $\dist{p}{q}{},\dist{p}{r}{}>0$, the angle measure of
$\trig{\tilde p}{\tilde q}{\tilde r}$ at $\tilde p$ will be called the \index{model angle}\emph{model angle} of the triple $p$, $q$, $r$, and will be denoted by
$\angk\kappa p q r$%
\index{$\tangle\mc\kappa$ (model angle)!$\angk\kappa{{p}}{{q}}{{r}}$}.
In the notation of Section~\ref{model},
\[\angk\kappa p q r=\tangle\mc\kappa\{\dist{q}{r}{};\dist{p}{q}{},\dist{p}{r}{}\}.\]
\begin{wrapfigure}{r}{25mm}
\vskip-0mm
\centering
\includegraphics{mppics/pic-605}
\end{wrapfigure}
\begin{thm}{Alexandrov's lemma}
\index{Alexandrov's lemma}
\label{lem:alex}
Let $p,q,r,z$ be distinct points in a metric space such that $z\in \mathopen{]}p r\mathclose{[}$ and
\[\dist{p}{q}{}+\dist{q}{r}{}+\dist{r}{p}{}< 2\cdot\varpi\kappa.\]
Then
the following expressions have the same sign:
\begin{subthm}{lem-alex-difference}
$
\angk\kappa p q r-\angk\kappa p q z$,
\end{subthm}
\begin{subthm}{lem-alex-angle}
$\angk\kappa z q p
+\angk\kappa z q r -\pi$.
\end{subthm}
Moreover,
\[\angk\kappa q p r \ge \angk\kappa q p z + \angk\kappa q z r,\]
with equality if and only if the expressions in \ref{SHORT.lem-alex-difference} and \ref{SHORT.lem-alex-angle} vanish.
\end{thm}
\parit{Proof.}
By the triangle inequality,
\[
\dist{p}{q}{}+\dist{q}{z}{}+\dist{z}{p}{}\le \dist{p}{q}{}+\dist{q}{r}{}+\dist{r}{p}{}< 2\cdot\varpi\kappa.
\]
Therefore the model triangle $\trig{\tilde p}{\tilde q}{\tilde z}=\modtrig\kappa(p q z)$ is defined.
Take
a point $\tilde r$ on the extension of
$[\tilde p \tilde z]$ beyond $\tilde z$ so that $\dist{\tilde p}{\tilde r}{}=\dist{p}{r}{}$ (and therefore $\dist{\tilde p}{\tilde z}{}=\dist{p}{z}{}$).
From monotonicity of the function $a\mapsto\tangle\mc\kappa\{a;b,c\}$ (\ref{increase}),
the following expressions have the same sign:
\begin{enumerate}[(i)]
\item $\mangle\hinge{\tilde p}{\tilde q}{\tilde r}-\angk\kappa{p}{q}{r}$;
\item $\dist{\tilde p}{\tilde r}{}-\dist{p}{r}{}$;
\item $\mangle\hinge{\tilde z}{\tilde q}{\tilde r}-\angk\kappa{z}{q}{r}$.
\end{enumerate}
\begin{wrapfigure}{r}{25mm}
\vskip-0mm
\centering
\includegraphics{mppics/pic-610}
\bigskip
\includegraphics{mppics/pic-611}
\vskip-0mm
\end{wrapfigure}
Since
\[\mangle\hinge{\tilde p}{\tilde q}{\tilde r}=\mangle\hinge{\tilde p}{\tilde q}{\tilde z}=\angk\kappa{p}{q}{z}\]
and
\[ \mangle\hinge{\tilde z}{\tilde q}{\tilde r}
=\pi-\mangle\hinge{\tilde z}{\tilde p}{\tilde q}
=\pi-\angk\kappa{z}{p}{q},\]
the first statement follows.
For the second statement, let us redifine $\tilde r$;
construct $\trig{\tilde q}{\tilde z}{\tilde r}=\modtrig\kappa(q z r)$ on the opposite side of $[\tilde q\tilde z]$ from $\trig{\tilde p}{\tilde q}{\tilde z}$.
Since
\begin{align*}
\dist{\tilde p}{\tilde r}{}&\le \dist{\tilde p}{\tilde z}{} + \dist{\tilde z}{\tilde r}{}=
\\
&=\dist{p}{z}{}+\dist{z}{r}{}=
\\
&=\dist{p}{r}{},
\end{align*}
we have
\begin{align*}
\angk\kappa{q}{p}{z} + \angk\kappa{q}{z}{r}
&
=
\mangle\hinge{\tilde q}{\tilde p}{\tilde z}+ \mangle\hinge{\tilde q}{\tilde z}{\tilde r}
=
\\
&
=
\mangle\hinge{\tilde q}{\tilde p}{\tilde r}
\le
\\
&\le \angk\kappa q p r.
\end{align*}
Equality holds if and only if $\dist{\tilde p}{\tilde r}{}=\dist{p}{r}{}$,
as required.\qeds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Angles and the first variation}\label{sec:angles}
Given a hinge $\hinge p x y$, we define its \index{angle}\emph{angle} to be \index{$\mangle$ (angle measure)!$\mangle\hinge{{p}}{{q}}{{r}}$}
\[\mangle\hinge p x y
\df
\lim_{\bar x,\bar y\to p} \angk\kappa p{\bar x}{\bar y},\eqlbl{eq:angle-def}\]
for $\bar x\in\mathopen{]}p x]$ and $\bar y\in\mathopen{]}p y]$, if this limit exists.
Similarly to $\angk\kappa p{x}{y}$,
we will use the short notation\index{$\side\kappa$ (model side)!$\side\kappa \hinge{{p}}{{q}}{{r}}$}
\[\side\kappa \hinge p x y=
\side\kappa \left\{\mangle\hinge p x y;\dist{p}{x}{},\dist{p}{y}{}\right\},\]
where the right-hand side is defined in Section~\ref{model}. %on page~\pageref{page:model-side}.%V: I don't like using hard page references. They might change in formatting. %A: what do you mean by ``hard''? it is automatic as any other refs we use.
The value $\side\kappa \hinge p x y$ will be called the \index{model side}\emph{model side}
of the hinge $\hinge p x y$.
\begin{thm}{Lemma}\label{lem:k-K-angle}
Let $p,x,y$ be a triple of points in a metric space with perimeter $\ell$.
Then for any $\kappa,\Kappa\in\RR$,
\[|\angk\Kappa p{x}{y}-\angk\kappa p{x}{y}|
\le
100(|\Kappa|+|\kappa|)\cdot\ell^2,
\eqlbl{eq:k-K},\]
whenever the left-hand side is defined.
\end{thm}
Lemma~\ref{lem:k-K-angle} implies that
the definition of angle is independent of $\kappa$.
In particular, one can take $\kappa=0$ in \ref{eq:angle-def};
thus the angle can be calculated from the cosine law:
\[\cos\angk{0}{p}{x}{y}
=
\frac{\dist[2]{p}{x}{}+\dist[2]{p}{y}{}-\dist[2]{x}{y}{}}{2\cdot \dist[{{}}]{p}{x}{}\cdot\dist[{{}}]{p}{y}{}}.\]
\parit{Proof.}
The function $\kappa\mapsto \angk\kappa p{x}{y}$ is nondecreasing (\ref{k-decrease}).
Thus, for $\Kappa>\kappa$, we have
\begin{align*}
0\le \angk\Kappa p{x}{y}-\angk{\kappa}p{x}{y}
&\le \angk\Kappa p{x}{y}+\angk\Kappa {x}p{y}+\angk\Kappa {y}p{x}-
\\
&\quad-\angk\kappa p{x}{y}-\angk\kappa {x}p{y}-\angk\kappa {y}p{x}
=
\\
&=\Kappa\cdot\area\modtrig\Kappa(pxy)-\kappa\cdot\area\modtrig\kappa(pxy).
\end{align*}
Note that for $ \kappa\ge 0$ a triangle of perimeter $\ell$ in $\Lob2\kappa$ lies in a ball of radius $2\cdot \ell$, which easily implies that $\area\modtrig\kappa(pxy)\le 100\cdot\ell^2$.
For $\kappa<0$ one gets the same estimate by a direct computation in the hyperbolic plane.
Therefore
\begin{align*}
\area\modtrig\kappa(pxy)&\le 100\cdot\ell^2,
&
\area\modtrig\Kappa(pxy)&\le 100\cdot\ell^2.
\end{align*}
Thus \ref{eq:k-K} follows.
\qeds
\begin{thm}{Triangle inequality for angles}
\label{claim:angle-3angle-inq}
Let $[px^1]$, $[px^2]$, and $[px^3]$ be three geodesics in a metric space.
If all of the angles $\alpha^{i j}=\mangle\hinge p {x^i}{x^j}$ are defined, then they satisfy the triangle inequality:
\[\alpha^{13}\le \alpha^{12}+\alpha^{23}.\]
\end{thm}
\parit{Proof.}
Since $\alpha^{13}\le\pi$, we can assume that $\alpha^{12}+\alpha^{23}< \pi$.
Set $\gamma^i\z=\geod_{[px^i]}$.
Given any $\eps>0$, for all sufficiently small $t,\tau,s\in\RR_{\ge0}$ we have
\begin{align*}
\dist{\gamma^1(t)}{\gamma^3(\tau)}{}
&\le
\dist{\gamma^1(t)}{\gamma^2(s)}{}+\dist{\gamma^2(s)}{\gamma^3(\tau)}{}<\\
&<
\sqrt{t^2+s^2-2\cdot t\cdot s\cdot \cos(\alpha^{12}+\eps)} +
\\
&\quad+\sqrt{s^2+\tau^2-2\cdot s\cdot \tau\cdot \cos(\alpha^{23}+\eps)}\le
\end{align*}
\begin{wrapfigure}{o}{30 mm}
\vskip-15mm
\centering
\includegraphics{mppics/pic-615}
\vskip4mm
\end{wrapfigure}
Below we define
$s(t,\tau)$ so that for
$s=s(t,\tau)$, this chain of inequalities can be continued as follows:
\[\le
\sqrt{t^2+\tau^2-2\cdot t\cdot \tau\cdot \cos(\alpha^{12}+\alpha^{23}+2\cdot \eps)}.
\]
Thus for any $\eps>0$,
\[\alpha^{13}\le \alpha^{12}+\alpha^{23}+2\cdot \eps.\]
Hence the result follows.
To define $s(t,\tau)$, consider three half-lines $\tilde \gamma^1$, $\tilde \gamma^2$, $\tilde \gamma^3$ on a Euclidean plane starting at one point, such that
$\mangle(\tilde \gamma^1,\tilde \gamma^2)\z=\alpha^{12}+\eps$,
$\mangle(\tilde \gamma^2,\tilde \gamma^3)\z=\alpha^{23}+\eps$,
and $\mangle(\tilde \gamma^1,\tilde \gamma^3)\z=\alpha^{12}\z+\alpha^{23}\z+2\cdot \eps$.
We parametrize each half-line by the distance from the starting point.
Given two positive numbers $t,\tau\in\RR_{\ge0}$, let $s=s(t,\tau)$ be
the number such that
$\tilde \gamma^2(s)\in[\tilde \gamma^1(t)\ \tilde \gamma^3(\tau)]$.
Clearly $s\le\max\{t,\tau\}$, so $t,\tau,s$ may be taken sufficiently small.
\qeds
\begin{thm}{Exercise}\label{ex:adjacent-angles}
Prove that the sum of adjacent angles is at least $\pi$.
More precisely,
suppose that the hinges $\hinge pxz$ and $\hinge pyz$ are \index{adjacent hinges}\emph{adjacent};
that is, the side $[pz]$ is shared and the union of two sides $[px]$ and $[py]$ is a geodesic $[xy]$.
Then
\[\mangle\hinge pxz+\mangle\hinge pyz\ge \pi\]
whenever each angle on the left-hand side is defined.
\end{thm}
The above inequality can be strict.
For example in a metric tree angles between any two different edges coming out of the same vertex are all equal to $\pi$.
\begin{thm}{First variation inequality}\label{lem:first-var}
Assume that for a hinge $\hinge q p x$,
the angle $\alpha=\mangle\hinge q p x$ is defined. Then
\[\dist{p}{\geod_{[qx]}(t)}{}
\le
\dist{q}{p}{}-t\cdot \cos\alpha+o(t).\]
\end{thm}
\parit{Proof.}
Take a sufficiently small $\eps>0$.
For all sufficiently small $t>0$, we have
\begin{align*}
\dist{\geod_{[qp]}(t/\eps)}{\geod_{[qx]}(t)}{}
&\le
\tfrac{t}{\eps}\cdot \sqrt{1+\eps^2 -2\cdot \eps\cdot \cos\alpha}+o(t)\le
\\
&\le \tfrac{t}{\eps} -t\cdot \cos\alpha + t\cdot \eps.
\end{align*}
Applying the triangle inequality, we get
\begin{align*}
\dist{p}{\geod_{[qx]}(t)}{}
&\le \dist{p}{\geod_{[qp]}(t/\eps)}{}+\dist{\geod_{[qp]}(t/\eps)}{\geod_{[qx]}(t)}{}
\le
\\
&\le
\dist{p}{q}{} -t\cdot \cos\alpha + t\cdot \eps
\end{align*}
for any $\eps>0$ and all sufficiently small $t$.
Hence the result.
\qeds
\section{Space of directions}
%and tangent space}
\label{sec:tangent-space+directions}
Let $\spc{X}$ be a metric space.
If the angle $\mangle\hinge pxy$ is defined for any hinge $\hinge pxy$ in $\spc{X}$,
then we will say that the space $\spc{X}$ has \index{angle!defined angles}\emph{defined angles}.
Let us note that this is a strong condition. For example a Banach space which has defined angles must be Hilbert.
%We shall see that, according to
%the corollaries \ref{cor:monoton:sup}
%and \ref{cor:monoton-cba:angle=inf},
%$\Alex{}$ and $\CAT{}$ spaces have defined angles.
Let $\spc{X}$ be a space with defined angles. For $p\in \spc{X}$,
consider the set $\mathfrak{S}_p$
of all nontrivial unit-speed geodesics starting at $p$.
By \ref{claim:angle-3angle-inq}, the triangle inequality holds for $\mangle$ on $\mathfrak{S}_p$,
that is, $(\mathfrak{S}_p,\mangle)$
forms a pseudometric space.
The metric space corresponding to $(\mathfrak{S}_p,\mangle)$ is called the \index{direction!space of geodesic directions}\emph{space of geodesic directions} at $p$, denoted by $\Sigma'_p$ or $\Sigma'_p\spc{X}$.
The elements of $\Sigma'_p$ are called \emph{geodesic directions} at $p$.
Each geodesic direction is formed by an equivalence class of geodesics starting from $p$
for the equivalence relation
\[[px]\sim[py]\quad \Longleftrightarrow\quad \mangle\hinge pxy=0;\]
the direction of $[px]$ is denoted by $\dir px $.\index{$\dir{p}{q}$ (direction)}
The completion of $\Sigma'_p$ is called the \index{direction!space of directions}\emph{space of directions} at $p$ and is denoted by $\Sigma_p$ or $\Sigma_p\spc{X}$.
The elements of $\Sigma_p$ are called \index{direction}\emph{directions} at $p$.
\section{Tangent space}\label{sec: tangent space}
The \index{cone}\emph{Euclidean cone} $\spc{Y}=\Cone\spc{X}$
over a metric space $\spc{X}$
is defined as the metric space whose underlying set consists of
equivalence classes in
$[0,\infty)\times \spc{X}$ with the equivalence relation ``$\sim$'' given by $(0,p)\sim (0,q)$ for any points $p,q\in\spc{X}$,
and whose metric is given by the cosine rule
\[
\dist{(s,p)}{(t,q)}{\spc{Y}}
=
\sqrt{s^2+t^2-2\cdot s\cdot t\cdot \cos\theta},
\]
where $\theta= \min\{\pi, \dist{p}{q}{\spc{X}}\}$.
The point in $\spc{Y}$ that corresponds $(t,x)\in[0,\infty)\times \spc{X}$ will be denoted by $t\cdot x$.
The point in $\Cone{\spc{X}}$ formed by the equivalence class of $\{\0\}\times\spc{X}$ is called the \index{tip of a cone}\emph{tip of the cone} and is denoted by $\0$ or $\0_{\spc{Y}}$.
For $v\in\spc{Y}$ the distance $\dist{\0}{v}{\spc{Y}}$ is called the norm of $v$ and is denoted by $|v|$ or $|v|_{\spc{Y}}$.
The \index{scalar product}\emph{scalar product} $\<v,w\>$
of two vectors $v=s\cdot p$ and $w=t\cdot q$
is defined by
\[\<v,w\>
\df |v|\cdot|w|\cdot\cos\theta;
\]
we set $\<v,w\>\df0$ if $v=\0$ or $w=\0$.
\begin{thm}{Example}
$\Cone\SS^n$ is isometric to $\R^{n+1}$.
If $G< \O(n+1)$ is a closed subgroup, then $\Cone(\SS^n/G)$ is isometric to $\R^{n+1}/G$.
\end{thm}
The Euclidean cone $\Cone\Sigma_p$ over the space of directions $\Sigma_p$ is called the \index{tangent space}\emph{tangent space} at $p$ and is denoted by $\T_p$ or $\T_p\spc{X}$.
The elements of $\T_p\spc{X}$ will be called \index{tangent vector}\emph{tangent vectors} at $p$
(despite the fact that $\T_p$ is only a cone --- not a vector space).
The tangent space $\T_p$ could be also defined directly, without introducing the space of directions.
To do so, consider the set $\mathfrak{T}_p$ of all geodesics starting at $p$, with arbitrary speed.
Given $\alpha,\beta\in \mathfrak{T}_p$,
set
\[\dist{\alpha}{\beta}{\mathfrak{T}_p}
=
\lim_{\eps\to0}
\frac{\dist{\alpha(\eps)}{\beta(\eps)}{\spc{X}}}\eps.
\eqlbl{eq:dist-in-T_p}.\]
If the angles in $\spc{X}$ are defined, then so is
the limit in \ref{eq:dist-in-T_p}, and we obtain a pseudometric on $\mathfrak{T}_p$.
The corresponding metric space admits a natural isometric identification with the cone $\T'_p=\Cone\Sigma'_p$.
The vectors of $\T'_p$ are the equivalence classes for the relation
\[\alpha\sim\beta\quad \Longleftrightarrow\quad \dist{\alpha(t)}{\beta(t)}{\spc{X}}=o(t).\]
The completion of $\T'_p$ is therefore naturally isometric to $\T_p$.
A vector in $\T'_p$ that corresponds to the geodesic path $\geod_{[pq]}$ is called the \index{logarithm}\emph{logarithm of $[pq]$} and denoted by $\ddir pq$.\index{$\ddir {p}{q}$ (logarithm)}
\section{Velocity of curves}
\begin{thm}{Definition}\label{def:right-derivative}
Let $\spc{X}$ be a metric space,
let $a>0$,
and let $\alpha\:[0,a)\to \spc{X}$ be a function, not necessarily continuous, such that $\alpha(0)=p$.
We say that $v\in\T_p$ is the \index{right derivative}\emph{right derivative} of $\alpha$ at $0$,
briefly $\alpha^+(0)\z=v$\index{$\alpha^\pm$ one-sided derivative}, if for some (and therefore any) sequence of vectors $v_n\in\T'_p$ such that $v_n\to v$ as $n\to\infty$,
and corresponding geodesics $\gamma_n$,
we have
\[\limsup_{\eps\to0+}\frac{\dist{\alpha(\eps)}{\gamma_n(\eps)}{\spc{X}}}{\eps}\to 0\quad \text{as}\quad n\to\infty.\]
We define right and left derivatives $\alpha^+(t_0)$ and $\alpha^-(t_0)$
of $\alpha$ at $t_0\in\II$ by
\[\alpha^\pm(t_0)=\check\alpha^+(0),\] where $\check\alpha(t)=\alpha(t_0\pm t)$.
\end{thm}
The sign convention is not quite standard; if $\alpha$ is a smooth curve in a Riemannian manifold, then we have
$\alpha^+(t)=-\alpha^-(t)$.
Note that if $\gamma$ is a geodesic starting at $p$
and the tangent vector $v\in\T_p'$ corresponds to $\gamma$,
then $\gamma^+(0)=v$.
\begin{thm}{Exercise}\label{ex:tangent-vect=o(t)}
Assume $\spc{X}$ is a metric space with defined angles,
and let $\alpha,\beta\:[0,a)\to\spc{X}$
be two maps such that the right derivatives $\alpha^+(0)$, $\beta^+(0)$ are defined and $\alpha^+(0)=\beta^+(0)$.
Show that
\[\dist{\alpha(t)}{\beta(t)}{\spc{X}}=o(t).\]
\end{thm}
\begin{thm}{Proposition}
Let $\spc{X}$ be a metric space with defined angles, and let $p\in \spc{X}$.
Then for any tangent vector $v\in\T_p\spc{X}$ there is a map $\alpha\:[0,\eps)\to \spc{X}$ such that $\alpha^+(0)=v$.
\end{thm}
\parit{Proof.}
If $v\in \T_p'$, then for the corresponding geodesic $\alpha$ we have $\alpha^+(0)\z=v$.
Given $v\in \T_p$, construct a sequence $v_n\in\T'_p$
such that $v_n\to v$, and let $\gamma_n$ be a sequence of corresponding geodesics.
The needed map $\alpha$ can be found among the maps such that $\alpha(0)\z=p$ and
\[\alpha(t)=\gamma_n(t)\quad \text{if}\quad \eps_{n+1}\le t<\eps_n,\]
where $\eps_n$
is a decreasing sequence converging to $0$ as $n\to\infty$.
In order to satisfy the conclusion of the proposition, one has to choose the sequence $\eps_n$ converging to $0$ very fast.
Note that in this construction $\alpha$ is not continuous.
\qeds
\begin{thm}{Definition}\label{def:diff-curv}
Let $\spc{X}$ be a metric space, and let $\alpha\:\II\to \spc{X}$ be a curve.
For $t_0\in\II$,
if $\alpha^+(t_0)$ or $\alpha^-(t_0)$ or both are defined,
we say respectively that $\alpha$ is
\index{curve!differentiable curve}
\index{curve!left/right differentiable}
\emph{right} or \emph{left} or \emph{both-sided differentiable} at $t_0$.
In the exceptional cases where $t_0$ is the left (respectively, right) end of $\II$, $\alpha$ is by definition left (respectively, right) differentiable at $t_0$.
If $\alpha$ is both-sided differentiable at $t$, and
\[|\alpha^+(t)|=|\alpha^-(t)|=\tfrac12\cdot\dist{\alpha^+(t)}{\alpha^-(t)}{\T_{\alpha(t)}},\] then we say that $\alpha$ is \emph{differentiable} at $t$.
\end{thm}
\begin{thm}{Exercise}\label{ex:both-sided-diff}
Assume $\spc{X}$ is a metric space with defined angles.
Show that any geodesic $\gamma\:\II\to\spc{X}$ is differentiable everywhere.
\end{thm}
Recall that the speed of a curve is defined in \ref{thm:speed}.
\begin{thm}{Exercise}\label{ex:diff}
Let $\alpha$ be a curve in a metric space with defined angles.
Suppose that $\speed_t\alpha$, $\alpha^+(t)$, and $\alpha^-(t)$ are defined.
Show that $\alpha$ is differentiable at $t$.
\end{thm}
\section{Differential}\index{differential!of a function}
\begin{thm}{Definition}\label{def:differential}
Let $\spc{X}$ be a metric space with defined angles, and let
$f\:\spc{X}\subto\RR$ be a subfunction.
For $p\in\Dom f$, a function $\phi\:\T_p\to\RR$ is called the \index{differential}\emph{differential} of $f$ at $p$
(briefly $\phi=\dd_pf$) if for any map $\alpha\:\II\to \spc{X}$ such that $\II$ is a real interval, $\alpha(0)=p$, and $\alpha^+(0)$ is defined, we have \[(f\circ\alpha)^+(0)=\phi(\alpha^+(0)).\]
\end{thm}
\begin{thm}{Proposition}\label{prop:differential}
Let $f\:\spc{X}\subto\RR$ be a locally Lipschitz semiconcave subfunction
on a metric space $\spc{X}$ with defined angles.
Then the differential $\dd_pf$ is uniquely defined for any $p\in\Dom f$. Moreover,
\begin{subthm}{prop:differential:lip}
The differential $\dd_pf\:\T_p\to\RR$ is Lipschitz and
\[\lip\dd_pf\le \lip_pf;\]
that is, the Lipschitz constant of $\dd_pf$ does not exceed the Lipschitz constant of $f$ in any neighborhood of $p$.
\end{subthm}
\begin{subthm}{prop:differential:homo}
$\dd_pf\:\T_p\to\RR$ is a positive homogeneous function;
that is, for any $r\ge 0$ and $v\in\T_p$ we have
\[r\cdot\dd_pf(v)=\dd_pf(r\cdot v).\]
\end{subthm}
\begin{subthm}{prop:differential:ultra}
The differential $\dd_pf\:\T_p\to\RR$ is the restriction of ultradifferential defined in Section~\ref{sec:ultradifferential};
that is,
\[\dd_pf=\dd^\o_pf|_{\T_p}.\]
\end{subthm}
\end{thm}
\parit{Proof.}
Passing to a subdomain of $f$ if necessary,
we can assume that $f$ is $\Lip$-Lipschitz and $\lambda$-concave for some $\Lip,\lambda\in\RR$.
Take a geodesic $\gamma$ in $\Dom f$ starting at $p$.
Since $f\circ\gamma$ is $\lambda$-concave,
the right derivative $(f\circ\gamma)^+(0)$ is defined.
Since $f$ is $\Lip$-Lipschitz, we have
\[|(f\circ\gamma)^+(0)-(f\circ\gamma_1)^+(0)|
\le
\Lip\cdot\dist[{{}}]{\gamma^+(0)}{\gamma_1^+(0)}{}\eqlbl{gam-bargam}\]
for any other geodesic $\gamma_1$ starting at $p$.
Define $\phi\:\T'_p\to\RR\:\gamma^+(0)\mapsto(f\circ\gamma)^+(0)$.
From \ref{gam-bargam}, $\phi$ is an $\Lip$-Lipschtz function defined on $\T_p'$.
Thus we can extend $\phi$ to all of $\T_p$ as an $\Lip$-Lipschitz function.
{\sloppy
It remains to check that $\phi$ is the differential of $f$ at $p$.
Assume $\alpha\:[0,a)\to\spc{X}$ is a map such that $\alpha(0)=p$ and $\alpha^+(0)=v\in \T_p$.
Let $\gamma_n\in\Gamma_p$ be a sequence of geodesics as in the definition \ref{def:right-derivative};
that is, if
\[v_n=\gamma^+_n(0)\quad \text{and}\quad a_n= \limsup_{t\to0+}{\dist{\alpha(t)}{\gamma_n(t)}{}}/{t},\]
then $a_n\to 0$ and $v_n\to v$ as $n\to\infty$.
Then
\[\phi(v)=\lim_{n\to\infty}\phi(v_n),\] \[f\circ\gamma_n(t)=f(p)+\phi(v_n)\cdot t+o(t),\]
\[|f\circ\alpha(t)-f\circ\gamma_n(t)|
\le
\Lip\cdot\dist[{{}}]{\alpha(t)}{\gamma_n(t)}{}.\]
Hence
\[f\circ\alpha(t)=f(p)+\phi(v)\cdot t+o(t).\]
The last part follows from the definitions of differential and ultradifferential; see Section~\ref{sec:Ultralimits of functions}.
\qeds
}
\section{Ultratangent space}
\label{sec: ultradiff}
Fix a selective ultrafilter $\o$ on the set of natural numbers.
For a metric space $\spc{X}$ and $r>0$,
we will denote by $r\cdot\spc{X}$ its \index{blowup}\emph{$r$-blowup},
which is a metric space with the same underlying set as $\spc{X}$ and the metric multiplied by $r$.
The tautological bijection $\spc{X}\to r\cdot\spc{X}$ will be denoted by $x\mapsto x^r$,
so
\[\dist{x^r}{y^r}{}
=
r\cdot\dist[{{}}]{x}{y}{}\]
for any $x,y\in \spc{X}$.
The \emph{$\o$-blowup} $\o\cdot\spc{X}$ of $\spc{X}$ is defined to be the $\o$-limit
of the $n$-blowups $n\cdot\spc{X}$; that is,
\[\o\cdot\spc{X}
\df
\lim_{n\to\o} n\cdot\spc{X}.\]
Given a point $x\in \spc{X}$, we can consider the sequence $x^n$, where $x^n\in n\cdot\spc{X}$ is the image of $x$ under $n$-blowup.
Note that if $x\ne y$, then
\[\dist{x^\o}{y^\o}{\o\cdot\spc{X}}=\infty;\]
that is,
$x^\o$ and $y^\o$
belong to different metric components of $\o\cdot\spc{X}$.
The metric component of $x^\o$ in $\o\cdot\spc{X}$ is called the \index{ultratangent space}\emph{ultratangent space} of $\spc{X}$ at $x$ and is denoted by $\T^\o_x\spc{X}$ or $\T^\o_x$.
Equivalently, the ultratangent space $\T^\o_x\spc{X}$ can be defined as follows.
Consider all the sequences of points $x_n\in \spc{X}$ such that the sequence
$(n\cdot\dist{x}{x_n}{\spc{X}})$ is bounded.
Define the pseudodistance between two such sequences as
\[\dist{(x_n)}{(y_n)}{}
=
\lim_{n\to\o}n\cdot\dist{x_n}{y_n}{\spc{X}}.\]
Then $\T^\o_x\spc{X}$ is the corresponding metric space.
Tangent spaces (see Section \ref{sec: tangent space}) as well as ultratangent spaces
generalize the notion of tangent spaces on Riemannian manifolds.
In the simplest cases these two notions define the same space.
However in general they are different and are both useful ---
often a lack of a property in one is compensated by the other. %V: Tangent spaces are only defined later in chapter 6. This makes this whole paragraph very confusing. I added a forward reference to the section about tangent spaces but I think that's still confusing. I would move this discussion to the section on tangent spaces. The same goes for the next theorem. %S: agreed. %A: we did not try to put everything in right order --- this is an example (ref is good).
It is clear from the definition that a tangent space has a cone structure.
On the other hand, in general an ultratangent space does not have a cone structure.
Hilbert's cube $\prod_{n=1}^\infty[0,2^{-n}]$ is an example.
We remark that Hilbert's cube is a $\Alex{0}$ as well as a $\CAT{0}$ Alexandrov space.
The next theorem shows that the tangent space $\T_p$ can be (and often will be) considered as a subset of $\T^\o_p$.
\begin{thm}{Theorem}\label{thm:tangent-ultratangent}
\label{thm:T-in-T^w}
Let $\spc{X}$ be a metric space with defined angles.
Then for any $p\in \spc{L}$, there is a distance-preserving map
\[\iota:\T_p\hookrightarrow \T^\o_p\]
such that for any geodesic $\gamma$ starting at $p$
we have
\[\gamma^+(0)\stackrel{\iota}{\mapsto} \lim_{n\to\o}[\gamma(\tfrac1n)]^n.\]
\end{thm}
\parit{Proof.}
Given $v\in \T'_p$,
choose a geodesic $\gamma$ that starts at $p$ and such that $\gamma^+(0)\z=v$.
Set $v^n=[\gamma(\tfrac1n)]^n\in n\cdot \spc{X}$ and
\[v^\o=\lim_{n\to\o}v^n.\]
Note that the value $v^\o\in\T^\o_p$ does not depend on the choice of $\gamma$;
that is, if $\gamma_1$ is another geodesic starting at $p$ such that $\gamma_1^+(0)=v$,
then
\[\lim_{n\to\o}v^n=\lim_{n\to\o}v_1^n,\]
where $v_1^n=[\gamma_1(\tfrac1n)]^n\in n\cdot \spc{X}$.
The latter follows since
\[\dist{\gamma(t)}{\gamma_1(t)}{\spc{X}}=o(t),\]
and therefore $\dist{v^n}{v_1^n}{n\cdot \spc{X}}\to 0$ as $n\to\infty$.
Set $\iota(v)=v^\o$.
Since angles between geodesics in $\spc{X}$ are defined, for any $v,w\in \T_p'$, we have
$n\cdot\dist[{{}}]{v_n}{w_n}{}\to\dist{v}{w}{}$.
Thus $\dist{v_\o}{w_\o}{}=\dist{v}{w}{}$; that is, $\iota\:\T_p'\to\T_p$ is a distance-preserving map.
Since $\T_p'$ is dense in $\T_p$,
we can extend $\iota$ to a distance-preserving map $\T_p\to \T^\o_p$.
\qeds
\section{Ultradifferential}\label{sec:ultradifferential}
Given a function $f\:\spc{L}\to\RR$, consider the sequence of functions $f_n\:n\cdot\spc{L}\to\RR$ defined by
\[f_n(x^n)=n\cdot(f(x)-f(p)),\]
where $x\mapsto x^n$ denotes the natural map $\spc{L}\to n\cdot\spc{L}$.
While $n\cdot(\spc{L},p)\to(\T^\o,\0)$ as $n\to\o$,
the functions $f_n$ converge to the \emph{$\o$-differential} of $f$ at $p$.
It will be denoted by $\dd_p^\o f$:
\[\dd_p^\o f\:\T_p^\o\to\RR,\quad \dd_p^\o f=\lim_{n\to\o} f_n.\]
Clearly, the \index{ultradifferential}$\o$-differential $\dd_p^\o f$ of a locally Lipschitz subfunction $f$ is defined and Lipschitz at each point $p\in \Dom f$.
\section{Remarks}
\label{page:upper-angle}
Spaces with defined angles include $\CAT{}{}$ and $\Alex{}{}$ spaces;
see \ref{angle} and \ref{cor:monoton-cba:angle=inf}.
For general metric spaces, angles may not exist, \index{$\mangle$ (angle measure)!$\mangle^\text{up}$}
and given a hinge $\hinge p x y$ it is more natural to consider the \index{angle!upper angle}\emph{upper angle} defined by
\[\mangle^\text{up}\hinge p x y
\df
\limsup_{\bar x,\bar y\to p} \angk\kappa p{\bar x}{\bar y},\]
where $\bar x\in\mathopen{]}p x]$ and $\bar y\in\mathopen{]}p y]$.
The triangle inequality (\ref{claim:angle-3angle-inq}) holds for upper angles as well.