-
Notifications
You must be signed in to change notification settings - Fork 23
/
circle.tex
3620 lines (3326 loc) · 160 KB
/
circle.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
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\chapter{The universal symmetry: the circle}
\label{cha:circle}
An effective principle in mathematics is that when you want to study a certain
phenomenon you should search for a single type that captures this phenomenon.
Here are two examples:\footnote{%
Notice that these have arrows pointing in different directions:
In~\ref{it:one-out} we're mapping \emph{out} of $\bn{1}$,
while in~\ref{it:prop-in} we're mapping \emph{in} to $\Prop$.}
\begin{enumerate}
\item\label{it:one-out}
The contractible type $\bn 1$ has the property that given
any type $A$ a function $\bn 1\to A$ provides exactly the
same information as picking an element in $A$.
For, an equivalence from $A$ to $\bn 1\to A$ is provided by
the function $a \mapsto (x \mapsto a)$, see \cref{xca:Xequiv1toX}.
\item\label{it:prop-in}
The type $\Prop$ of propositions has the property that
given any type $A$ a function $A\to\Prop$ provides exactly
the same information as picking a subtype of $A$,
see \cref{lem:Prop-Set-pointed-families}\ref{lem:Prop-families}.
\end{enumerate}
We are interested in symmetries, and so we should search for a type $X$
which is so that given \emph{any} type $A$ the type of functions
$X\to A$ (or $A\to X$, but that's not what we're going to do)
picks out exactly the symmetries in $A$.
We will soon see that there is such a type:
the circle\footnote{%
We call this type the ``circle''
because it has many properties which are analogues, in our context, of properties of
the topological circle $\setof{(x,y)\in\RR^2}{x^2+y^2=1}$.
See~\cref{sec:topology} for a discussion of the relationship
between topological spaces and types.
In the later chapters on geometry we'll return
to ``real'' geometrical circles.}
which is built \emph{exactly} so that this
``universality with respect to symmetries'' holds.
It may be surprising to see how little it takes to define it;
especially in hindsight when we eventually discover some of the many uses of the circle.
A symmetry in $A$ is an identification $p:a\eqto a$ for some $a:A$.%
\index{symmetry!in a type}
Now, we can take any iteration of $p$ (composing $p$ with itself a number of times),
and we can consider the inverse $p^{-1}$ and \emph{its} iterations.
So, by giving one symmetry we give at the same time a lot of symmetries.
For a particular $p: a\eqto a$ it may be that some of the iterations
can be identified (in their type $a\eqto a$). For instance, it may be
that there is an identification of type $p^2 \eqto p^0$ (as in \cref{xca:C2}).
Even more dramatically: if there is an identification of type
$p\eqto\refl a$, then \emph{all} the
iterations of $p$ can be identified with each other.\marginnote{%
\begin{tikzpicture}
\node (A) at (0,-1.5) {$A$};
\begin{scope}[thick]
\draw (0,-1)
.. controls ++(200:-1) and ++(180:1) .. (2,-2)
.. controls ++(180:-1) and ++(270:1) .. (4,0)
.. controls ++(270:-1) and ++(10:1) .. (2,2.25)
.. controls ++(10:-1) and ++(90:1) .. (-.5,1)
.. controls ++(90:-1) and ++(200:1) .. (0,-1);
\pgfmathsetmacro\gsize{3}%
\pgfmathsetmacro\gscale{min(1,\gsize/4)}%
\pgfmathsetmacro\gyscale{0.25*\gscale*.707}%
\pgfmathsetmacro\gxscale{0.5*\gscale}%
\pgfmathsetmacro\gsep{((\gsize - 2*\gscale)/2*0.5)}%
\pgfmathsetmacro\omrstwo{1 - 1/sqrt(2)}%
\pgfmathsetmacro\sqrtwo{sqrt(2)}%
\draw (1 + \gsep + \gxscale + \gxscale -\omrstwo*\gxscale,0)
.. controls +(-\gxscale*\sqrtwo/3,4/3*\gyscale)
and +(\gxscale*\sqrtwo/3,4/3*\gyscale)
.. ++(-\sqrtwo*\gxscale,0);
\draw (1 + \gsep + \gxscale - \gxscale,0 + \gyscale)%
.. controls +(\gxscale*2/3,-8/3*\gyscale)
and +(-\gxscale*2/3,-8/3*\gyscale)
.. ++(2*\gxscale,0);
\end{scope}
\begin{scope}[shift={(-1.25,-7.25)}]
\node[dot,label=right:$a$] (a) at (1.99,7.58) {};
\draw[->]
(4.02,7.58) .. controls (3.97,8.13) and (3.93,8.66) .. node[auto,swap] {$p$}
(3.07,8.60) .. controls (2.20,8.54) and (1.99,8.00) ..
(1.99,7.58) .. controls (1.98,7.15) and (2.25,6.67) ..
(2.97,6.56) .. controls (3.70,6.44) and (4.06,7.03) ..
(4.02,7.58);
\draw[casblue,->]
(3.25,6.44) .. controls (4.01,6.46) and (4.59,7.71) ..
(3.77,8.45) .. controls (2.95,9.20) and (1.83,8.42) ..
(1.81,7.60) .. controls (1.79,6.78) and (3.00,5.63) ..
(3.94,6.67) .. controls (4.88,7.71) and (4.02,8.50) ..
(3.54,8.78) .. controls (3.05,9.05) and (1.99,8.45) .. node[auto,swap] {$p^2$}
(1.99,7.58) .. controls (1.99,6.70) and (2.49,6.42) ..
(3.25,6.44);
\draw[casred,->]
(3.12,8.52) .. controls (3.69,8.49) and (3.81,8.27) ..
(3.87,7.75) .. controls (3.93,7.23) and (3.67,6.58) ..
(2.95,6.65) .. controls (2.23,6.71) and (1.98,7.01) ..
(1.99,7.58) .. controls (2.00,8.14) and (2.55,8.55) ..
node[auto,swap] {$p^{-1}$}
(3.12,8.52);
\end{scope}
\end{tikzpicture}}
However, in general we must be prepared that all the iterations $p_n$
of $p$ (for $n$ positive, $0$ and negative) are distinct.
Hence, the circle must have a distinct symmetry for every integer.
We would have enjoyed defining the integers this way,
but being that ideological would be somewhat inefficient.
Hence we give a more hands-on approach and define the circle
and the integers separately. Thereafter we prove that the type of
symmetries in the circle is equivalent to the set of integers.
\section{The circle and its universal property}
\label{sec:S1}
Propositional truncation from \cref{sec:prop-trunc} was
the first \emph{higher inductive type}, that is, an inductive type
with constructors both for elements and for identifications,
we introduced.
The circle is another example of a higher inductive type,
see Chapter~6 of the HoTT book\footcite{hottbook} for more information.
\begin{definition}
\label{def:circle}
The circle is a type $\Sc:\UU$ with an element (constructor) $\base : \Sc$ and
an identification (constructor) ${\Sloop}: \base\eqto\base$. For convenience and
clarity the (higher) induction principle for $\Sc$ is explained
by first stating a recursion principle for $\Sc$.
Let $A$ be a type. In order to define a function $f:\Sc\to A$,
it suffices to give an element $a$ of $A$ together with an
identification $l$ of type $a \eqto a$. The function $f$ defined
by this data satisfies $f(\base)\jdeq a$ and
the recursion principle provides an identification of type
$\ap{f}(\Sloop)=l$.
\begin{marginfigure}
\noindent\begin{tikzpicture}
\node (A) at (2,3) {$\sum_{x:\Sc}A(x)$};
\node (Sc) at (2,0) {$\Sc$};
\node (Sloop) at (.9,-.5) {$\Sloop$};
\draw[->] (A) -- node[auto] {$\fst$} (Sc);
\draw[->] (-90:1 and .3) arc (-90:270:1 and .3);
\node[basedot] at (-1,0) {};
% then: A top and bottom
\coordinate[label=above left:$A(\base)$] (A-top-left) at (-1,2.7);
\coordinate (A-bot-left) at (-1,0.9);
\coordinate (A-top-front) at (0,2.4);
\coordinate (A-bot-front) at (0,0.7);
\coordinate (A-top-back) at (0,2.8);
\coordinate (A-bot-back) at (0,1.3);
\coordinate (A-top-right) at (1,2.6);
\coordinate (A-bot-right) at (1,0.8);
\draw (A-top-left) -- (A-bot-left)
.. controls +(-90:.3) and +(-10:-.5) .. (A-bot-front)
.. controls +(-10:.5) and +(90:-.3) .. (A-bot-right)
-- (A-top-right)
.. controls +(-90:.2) and +(170:-.5) .. (A-top-front)
.. controls +(170:.5) and +(90:-.2) .. (A-top-left);
\draw[dashed] (A-bot-left)
.. controls +(90:.3) and +(5:-.4) .. (A-bot-back)
.. controls +(5:.4) and +(-90:-.3) .. (A-bot-right);
\draw (A-top-left)
.. controls +(90:.3) and +(-10:-.3) .. (A-top-back)
.. controls +(-10:.3) and +(-90:-.3) .. (A-top-right);
\node[dot,label=left:$a$] (a-left) at (-1,2) {};
\coordinate (a-front) at (0,1.6);
\coordinate (a-right) at (1,1.8);
\coordinate (a-back) at (0,2.2);
\draw[->] (a-left)
.. controls +(-90:.3) and +(-15:-.4) .. (a-front);
\draw (a-front)
.. controls +(-15:.4) and +(90:-.3) .. node[auto] {$l$} (a-right);
\draw[dashed] (a-left)
.. controls +(90:.3) and +(-5:-.4) .. (a-back)
.. controls +(-5:.4) and +(-90:-.3) .. (a-right);
\end{tikzpicture}
\caption{The induction principle of $\Sc$.}
\label{fig:circle-induction}
\end{marginfigure}
Let $A(x)$ be a family of types parametrized by the variable $x:\Sc$.
The induction principle of $\Sc$ states that, in order to define a family
of elements of $A(x)$ parametrized by the variable $x:\Sc$,
it suffices to give an element $a$ of $A(\base)$ together with an
identification $l$ of type $\pathover{a}{A}{\Sloop}{a}$,
see \cref{fig:circle-induction}.
The function $f : \prod_{x:\Sc}A(x)$ defined by this
data satisfies $f(\base)\jdeq a$ and the induction principle
provides an identification of type $\apd{f}(\Sloop) \eqto l$.
\end{definition}
Giving $a$ as above is referred to as `the base case', and
giving $l$ as `the loop case'. Given this input data to define
a function $f$ will often be abbreviated by writing
$f(\base)\defeq a$ and $f(\Sloop)\defis l$. Notice the use of $\defis$\glossary(2:=){$\defis$}{identification in a definition} in the
second definition, instead of $\defeq$. That signifies that $f(\Sloop)$ and
$l$ are not equal by definition, but rather, that an identification is given between
them, i.e., an element of type $f(\Sloop) \eqto l$ is given, or an element of
$\apd{f}(\Sloop) \eqto l$ is given, in the dependent case.
The following result states that any function from the circle exactly
picks out an element and a symmetry of that element.
This is a ``universal property'' of the circle.
\begin{theorem}\label{lem:freeloopspace}
For all types $A$, the evaluation function
\[
\ev_A : (\Sc\to A)\to \sum_{a:A}(a\eqto a)\text{~defined by~}
\ev_A(g)\defeq (g(\base),g(\Sloop))
\]
is an equivalence, with inverse $\ve_A$ defined by the recursion principle
of the circle.
\end{theorem}
\begin{proof}
Fix $A:\UU$. We apply \cref{lem:weq-iso}.
For all $a:A$ and $l:a\eqto a$ we may construct an identification of type $\ev(\ve(a,l))\eqto(a,l)$
by the recursion principle. It remains to construct identifications
of type $\ve(\ev(f))\eqto f$ for all $f:\Sc\to A$. Such constructions are provided by
the following more general result.
Given $f,g:\Sc\to A$,
$p: f(\base)\eqto g(\base)$, and $q: f(\Sloop) \eqto p^{-1}\cdot g(\Sloop)\cdot p$,
we construct an identification of type $f\eqto g$, as follows.
It suffices, by function extensionality, to construct an element of
type $P(x)\defeq(f(x)\eqto g(x))$ for a variable $x:\Sc$.
This we do by circle induction.
For the base case we take $p$.
The loop case reduces to constructing an identification of type $\trp[P]{\Sloop}(p)\eqto p$, by \cref{def:pathover-trp}.
By \cref{lem:trp-in-fx=Ygx} we have an identification of type
$\trp[P]{\Sloop}(p)\eqto g(\Sloop)\cdot p \cdot f(\Sloop)^{-1}$.
Using $q$ we construct an identification of type $g(\Sloop) \eqto p\cdot f(\Sloop) \cdot p^{-1}$.
Hence we may construct an identification of type $\trp[P]{\Sloop}(p)\eqto p$, by an easy calculation.
Now apply \cref{lem:isEq-pair=}, and we have
constructed a function of type $(\ev(f)\eqto \ev(g)) \to (f\eqto g)$.
Now we get an identification of type $\ve(\ev(f))\eqto f$, for we have an identification of type
$\ev(\ve(\ev(f)))\eqto (f(\base),f(\Sloop))$, and $(f(\base),f(\Sloop))\jdeq\ev(f)$,
with $p\defeq\refl{f(\base)}$ and $q$ coming from the induction principle.
\end{proof}
\begin{corollary}\label{cor:circle-loopspace}
For any $a:A$, the function
\[\ev_A^a:((\Sc,\base)\to_* (A,a))\to (a\eqto a)\]
sending $(g,p)$ to $p^{-1}\cdot g(\Sloop)\cdot p$ is an equivalence.
\end{corollary}
\begin{proof}\hskip-5pt\footnote{%
This can also be done directly:
The inverse to $\ev_A^a$ sends $l : a\eqto a$
to $(\ve_A(a,l), \refl{a})$.
Try to verify this!}
Consider the following diagram (see \cref{rem:diagram}):
\[
\begin{tikzcd}
(\Sc \to A) \ar[rr,"{g\mapsto(g(\base),g,\refl{g(\base)})}"]
\ar[dr,"\ev_A"'] & &
\sum_{a:A}\bigl((\Sc,\base) \ptdto (A,a)\bigr)
\ar[dl,"\tot(\ev_A^-)"] \\
& \,\sum_{a:A}(a\eqto a),
\end{tikzcd}
\]
where the top map is an equivalence by \cref{cor:contract-away},
and the left map is an equivalence by \cref{lem:freeloopspace}.
This diagram represents the identity type $\ev_A \eqto
(g\mapsto (g(\base),\inv{\refl{g(\base)}}\cdot g(\Sloop)\cdot\refl{g(\base)}))$.
An identification of this type is provided by function
extensionality and \cref{xca:path-groupoid-laws}.
The result now follows from \cref{lem:fiberwise-equiv-from-tot}.
\end{proof}
\begin{remark}\label{rem:dep-univ-prop-circle}
By almost the same argument as for \cref{lem:freeloopspace}
one can obtain the dependent universal property of the circle.
Given a type family $A:\Sc\to\UU$, the dependent evaluation function,
which also maps $g$ to $(g(\base),g(\Sloop))$ but has type
$(\prod_{x:\Sc} A(x))\to \sum_{a:A(\base)}(\pathover a A {\Sloop} a)$,
is an equivalence. (Compare the latter type to the type of $\ev_A$
in \cref{lem:freeloopspace} and see \cref{fig:circle-induction}.)
\end{remark}
\begin{marginfigure}
\begin{tikzpicture}
%% draw S1
\node[dot,label=below:$\Sc$] (base) at (0,0) {};%
\draw[->] (base) .. controls ++(45:1) and ++(135:1) .. node (loop)
{} (base);
%% type A
\begin{scope}[xshift=5em]
\draw plot [smooth cycle] coordinates {(0,0) (1.5,0) (1.3,1)
(0,1.5)};%
\node[dot,label=below:$a$] (a) at (.5,.5) {};%
\node (A1) at (1.5,1.5) {$A$}; \draw[->] (a) .. controls
++(-20:1) and ++(-30:.5) .. ++(45:.5) .. controls ++(150:1) and
++(210:1) .. node[very near start] (middle) {} (a);
\end{scope}
%% draw map f
\draw[dashed, ->, shorten <= 3pt, shorten >= 3pt] (loop) to[bend
left] node[above]{$f$} (middle);
\end{tikzpicture}
\end{marginfigure}
\begin{remark}
A function $f:\Sc\to A$ is often called a \emph{loop} in $A$, the
picture being that $f$ throws $\Sloop:\base\eqto\base$ as a lasso in the
type $A$.
Using the equivalence in \cref{cor:circle-loopspace} and univalence,
$a\eqto a$ is identified with the pointed
functions from the circle, which allows for a very graphic
interpretation of the symmetries of $a$ in $A$: they are traced out
by a function $f$ from the circle and can be seen as loops in the type
$A$ starting and ending at $a$!\footnote{%
This is of course how we have been
picturing loops the whole time.}
\end{remark}
\begin{lemma}\label{lem:circleisconnected}
The circle is connected.
\end{lemma}
\begin{proof}
We show $\Trunc{\base\eqto z}$ for all $z:\Sc$ by circle induction
as in \cref{def:circle}.
For the base case we take $\trunc{\refl{\base}}:\Trunc{\base\eqto \base}$.
The loop case is immediate as $\Trunc{\base\eqto \base}$ is a proposition.
\end{proof}
In the proof above, the propositional truncation coming
from the definition of connectedness is essential.
If this truncation were removed we wouldn't know what to do in
the induction step (actually, having an element of type
$\prod_{z:\Sc}(\base\eqto z)$ contradicts the univalence axiom).
This said, the family $R:\Sc\to\UU$ with $R(z)\defequi (\base\eqto z)$
is extremely important for other purposes. In \cref{def:universalcover},
we will call $R$ the ``universal \covering'' of the circle,
and it is the key tool in proving that the type of symmetries in
the circle is a set that can be identified with the set of integers.
Recall that we
use the phrase ``symmetries \emph{in} the circle'' to refer to the
elements of $\base\eqto\base$,\footnote{%
Here we are using ``the circle'' to mean the
\emph{pointed} type $(\Sc,\base)$.
But it also turns out that the type $\base\eqto\base$ is
equivalent to the type $x\eqto x$, for any $x:\Sc$.}
whereas we use the phrase ``symmetries \emph{of} the circle'' to
refer to the elements of $\Sc\eqto_\UU\Sc$.
The latter type is equivalent to $\Sc\amalg\Sc$,
as follows from \cref{xca:S1=S1-components} and \cref{{xca:(S1->S1)_(f)-eqv-S1}}.
In order to proceed, we should properly define the set of integers
and explore the concept of \coverings.
\section{The integers}
\label{sec:integers}
We define the type of integers in one of the many possible ways.\footnote{%
\label{ft:many-integers}Here are some of these alternatives:
\begin{itemize}
\item As the copy of $\NN$ where $2n$ means $n$ and $2n+1$ means $-n-1$, for $n:\NN$.
\item As the sum $\NN\coprod\NN$, where $\inl{n}$ means $-n-1$ and $\inr{n}$ means $n$.
\item As the sum $\NN\coprod\bn1\coprod\NN$, where from the left copy of $\NN$ we get $-n-1$, from the center $0:\bn1$ we get $0$, and from the right copy of $\NN$ we get $n+1$, for $n:\NN$.
\item As the quotient of $\NN\times\NN$ under the equivalence relation
$(n,m) \sim (n',m')$ defined by $n+m' = n'+m$,
where $(n,m)$ represents $n-m$.
\item As the subset of $\NN\times\NN$ consisting of those $(n,m)$ with $n=0\lor m=0$ (picking canonical representatives for the above equivalence relation).
\item As the loops $\base\eqto\base$ in the circle. %$\ddot\smile$
\end{itemize}}
\begin{definition}\label{def:zet}
Let $\zet$ be the higher inductive type with the following three
constructors:\glossary(Z){$\protect\zet$}{the set of integers,
\cref{def:zet}}
\begin{enumerate}
\item $\iota_+: \NN \to \zet$ for the nonnegative numbers,
$0,1,\ldots$\glossary(909iota+){$\iota_+$}{embedding of $\NN$ into $\zet$}
\item $\iota_-: \NNN \to \zet$ for the nonpositive numbers,
$-0,-1,\ldots$\glossary(909iota-){$\iota_-$}{embedding of $\NNN$ into $\zet$}
\item $\zeq : \iota_-(-0) = \iota_+(0)$.
\end{enumerate}
Because we used the copy $\NNN$ for the nonpositive numbers from \cref{exa:nnn},
we can leave out the constructor symbols $\iota_\pm$
when the type is clear from context.
Thus we have $\ldots,-2,-1,-0,0,1,2,\ldots:\zet$ and $\zeq:-0\eqto_\zet0$.
The type $\zet$ comes with an induction principle:
Let $T(z)$ be a family of types parametrized by $z:\zet$.
In order to construct an element $f(z)$ of $T(z)$ for all $z:\zet$,
it suffices to give functions $g$ and $h$ such
that $g(n): T(\iota_+(n))$ and $h(n): T(\iota_-(m))$ for all $n:\NN,m:\NNN$,
together with $q : \pathover {h(-0)} T \zeq {g(0)}$.
Here $g$ and $h$ can be defined by induction on $n:\NN,m:\NNN$.\footnote{%
Of course, giving $h$ is the same as giving $h':\prod_{n:\NN}T(-n)$.}
The resulting function $f:\prod_{z:\zet}T(z)$ satisfies
$f(n)\jdeq g(n)$ and $f(-n)\jdeq h(-n)$ for $n:\NN$,
and there is an (unnamed) element of $\apd{f}(\zeq) = q$.
\end{definition}
Like the type $\NN$, the type $\zet$ is a set with decidable equality
and ordering relations.
One well known self-equivalence is \emph{negation}, ${-}:\zet\to\zet$,
\index{negation!of integer}\glossary(1negation){$-z$}{negation of an integer $z$}
inductively defined by setting
$-\iota_+(n)\defeq \iota_-(-n)$,
$-\iota_-(m)\defeq \iota_+(-m)$,
$\constant{ap}_-(\zeq) \defis \inv{\zeq}$.\footnote{%
Here we included the constructor symbols for clarity,
but the definition allows us to use the negation symbol
unadorned, because the following diagram
is commutative by definition:
\[
\begin{tikzcd}[column sep=large,row sep=large,ampersand replacement=\&]
\NN \ar[r,shift left=1mm,"-"]\ar[d,"\iota_+"']
\& \NNN \ar[l,shift left=1mm,"-"]\ar[d,"\iota_-"] \\
\zet \ar[r,shift left=1mm,"-"]
\& \zet \ar[l,shift left=1mm,"-"]
\end{tikzcd}
\]}
Negation is its own inverse.
The \emph{successor} function $\zs:\zet\to\zet$%
\glossary(s){$\protect\zs$}{successor function on $\zet$} is
likewise defined inductively, setting
$\zs(n) \defeq \Succ(n)$,
$\zs(-0) \defeq 1$,
$\zs(-\Succ(n)) \defeq -n$,
and $\ap{\zs}(\zeq) \defis \refl{1}$.
The successor function $\zs$ is an equivalence.
It is instructive to depict iterating $\zs$ in both directions as
a doubly infinite sequence containing all integers:
\[
\begin{tikzcd}[arrows=mapsto,row sep=tiny]
& & & -0 \ar[dd,eqr]\ar[dr] & & & \\
\cdots\ar[r] & -2\ar[r] & -1\ar[ur] & & 1\ar[r] & 2\ar[r] & \cdots \\
& & & 0 \ar[ur] & & &
\end{tikzcd}
\]
The inverse $\inv\zs$ of $\zs$ is called the \emph{predecessor} function.
We recall the $n$-fold iteration $\zs^n$ defined earlier;
the $n$-fold iteration of $\zs^{-1}$ will be denoted by $\zs^{-n}$.
Since $\zs^0 \jdeq \id \jdeq \zs^{-0}$,
this defines the iteration $\zs^z$ for all $z:\zet$.\footnote{%
In the same way, we can define the iteration
$f^z : X \to X$ for any \emph{equivalence} $f : X \to X$.}\index{iteration}
\emph{Addition} of integers is now defined by iteration:
$z + y \defeq \zs^{y}(z)$. This extends $+$ on the $\iota_+$-image of
$\NN$, see \cref{xca:addition-on-Z-and-N}. From addition and
${-}: \zet\to\zet$ one can define a \emph{subtraction} function
setting $z-y \defeq z+(-y)$.
\glossary(2subtraction){${-}$}{subtraction of integers} Since addition
and subtraction are mutually inverse, the function $w\mapsto z+w$ is
an equivalence, and we may iterate it to define \emph{multiplication}:
$zy \defeq (w \mapsto z+w)^y(0)$.
\begin{xca}\label{xca:addition-on-Z-and-N}
Show that $\iota_+(n+m)=\iota_+(n)+\iota_+(m)$
and $\iota_+(nm) =\iota_+(n)\iota_+(m)$ for all $n,m:\NN$.
\end{xca}
The ordering relations $<$ and $\leq$ on $\zet$ are easily defined
and shown to extend those on $\NN$.
Recall the induction principle for $\zet$ in \cref{def:zet} above.
Instead of defining $g$ and $h$ explicitly, we will often
give $f(0)$ directly, and
define $g'$ and $h'$ such that $g'(z): T(z)\to T(z+1)$
for all $z:\zet$ with $z\geq 0$, and $h'(z): T(z)\to T(z-1)$
for all $z:\zet$ with $z\leq 0$. The function $f$ thus defined
satisfies $f(-0) \jdeq f(0)$,
$f(z+1)\jdeq g'(z,f(z))$ for all $z\geq 0$,
and $f(z-1)\jdeq h'(z,f(z))$ for all $z\leq 0$.
\begin{xca}\label{xca:commutative-add-Z}
Show that $x+y = y+x$ and $xy=yx$ for all $x,y:\zet$.
\end{xca}
\section{\Coverings}
\label{sec:covering}
As mentioned earlier, it is possible to define the integers as the
type $\base\eqto\base$ of symmetries in the circle.
Our investigation of $\base\eqto\base$ will use the concept of \coverings.
Since we are going to return to this concept several times,
we take the time for a fuller treatment before we continue with
proving the equivalence of $\base\eqto\base$ and $\zet$.
\begin{definition}\label{def:covering}
A \emph{\covering} over a type $B$
is a map $f:A\to B$ such that for each $b:B$ the preimage
(fiber) $f^{-1}(b)$ is a set.
We say that a \covering $f:A\to B$ over $B$ is
\begin{itemize}
\item \emph{connected}\index{connected \covering} if $A$ is connected,
%\item \emph{universal}\index{universal \covering} if $A$ and all
%the identity types $a\eqto a$ (for $a:A$) are connected,
\item \emph{finite}\index{finite \covering} if all preimages are finite sets,
\item \emph{decidable}\index{decidable \covering} if all preimages are decidable sets.
\end{itemize}
If $A$ and $B$ are pointed types, a \emph{pointed} \covering is a pointed map
$f:A\to_*B$ such that, when forgetting the points, $f_\div:A_\div\to B_\div$
is a \covering. Here it suffices that $A$ is a pointed type.\footnote{%
Given a pointed type $(A,a)$, a type $B$ and a map $f : A \to B$,
$(f,\refl{f(a)}) : (A,a) \ptdto (B,f(a))$ is a pointed map.
Indeed, the forgetful map $\bigl(\sum_{b:B}((A,a)\ptdto(B,b))\bigr)
\to (A \to B)$ is an equivalence by \cref{cor:contract-away}.}
We do not require the preimages of $f_\div$ to be pointed types.
\end{definition}
With a formula, given a type $B$, the type of \coverings over $B$ is
\[
\SetBundle(B) \defeq \sum_{A:\UU}\sum_{f:A\to B}\prod_{b:B}\isset(f^{-1}(b)),
\]
with variations according to the flavor.
Recall the equivalence in \cref{lem:Prop-Set-pointed-families}\ref{lem:Set-families}
between the type $B\to\Set$ of families of sets parametrized by elements of $B$, and the type
of \coverings over $B$ given above.
We shall frequently use this equivalence, even without explicit mention.
\begin{lemma}\label{lem:setbundle-is-groupoid}
For any type $B$, $\SetBundle(B)$ is a groupoid.
\end{lemma}
\begin{proof}
By \cref{lem:Set-is-groupoid} we have that $\Set$ is a groupoid,
and hence $B\to\Set$ is a groupoid by
\cref{lem:level-n-utils}\ref{level-n-utils-codom}.
\end{proof}
Moreover, by \cref{cor:subtype-same-level}, all variations
of \coverings in \cref{def:covering}
defined by a predicate are groupoids as well. This does not apply
\emph{pointed} \coverings:
a point is extra structure, not just a property.
We should notice that the notion of a \covering is just one step up from the notion of an
injection (a map such that all the preimages are propositions --
following the logic, injections perhaps ought to be called ``proposition bundles'').
The formulation we give is not the only one and for some purposes a formulation
based on $B\to\Set$ is more convenient.
\begin{xca}\label{xca:covering-utils}
Let $A,B$ and $C$ be types. Show:
\begin{enumerate}
\item The (unique) map of type $A\to\bn 1$ is a \covering iff $A$ is a set;
\item For any $b:B$, the map $x \mapsto b$ from $\bn 1$ to $B$ is
a \covering iff $b\eqto b$ is a set;
\item If $f: A\to B$ and $g: B\to C$ are \coverings, then $gf$ is a \covering.
\item\label{it:left-cancel-cover}
If $f: A\to B$ and $g: B\to C$, and $g$ and $gf$ are \coverings,
then $f$ is a \covering. Hint: apply \cref{cor:fib-vs-path} to
$\ap{g}: (b\eqto f(a))\to(g(b)\eqto g(f(a)))$.
\item If $A$ is connected, $a\eqto_A a$ is connected for some $a:A$,
$B$ is a groupoid, and $f: A\to B$ is a \covering, then $A$ is contractible.
Hint: use \cref{cor:fib-vs-path} and \cref{xca:connected-trivia-2}.
\item \label{it:cover-n-type}
If $f: A\to B$ is a \covering and $B$ is an $n$-type with $n\geq 0$,
then $A$ is also an $n$-type.\qedhere
\end{enumerate}
\end{xca}
Figure~\ref{fig:covering} visualizes two examples of \coverings over the circle.
Consider the picture on the left first.
If we let $b$ be the element on the circle marked at the bottom left hand side,
then the preimage $f^{-1}(b)$ is marked by the the two dots
in $A$ straight above $b$, so that in this case each preimage contains
two points (i.e., each preimage can be merely identified with $\bool$).
However, $A$ is not the constant family, like $A'$ depicted on the right,
since we have a string of identifications
$A'\defeq\sum_{z:\Sc}\bool\eqto(\Sc\times\bool)\eqto(\Sc+\Sc)$,
and the latter type is not connected.
Obviously something way more fascinating is going on.
\begin{figure}[hbt]
\begin{sidecaption}%
{A visualization of two \coverings over the circle}[fig:covering]
\centering
\begin{tikzpicture}
\node (A) at (2,1) {$A$};
\node (B) at (2,-2) {$\Sc$};
\draw[->] (A) -- (B);
\draw (0,-2) ellipse (1 and .3);
\draw (-1,0)
.. controls ++( 90:-.3) and ++(210: .4) .. (0,0.15)
.. controls ++(210:-.4) and ++(270: .3) .. (1,1)
.. controls ++(270:-.3) and ++( 0: .1) .. (0,1.3)
.. controls ++( 0:-.1) and ++( 90: .3) .. (-1,1)
.. controls ++( 90:-.3) and ++(150: .4) .. (0,0.15)
.. controls ++(150:-.4) and ++(270: .3) .. (1,0)
.. controls ++(270:-.3) and ++( 0: .1) .. (0,0.3)
.. controls ++( 0:-.1) and ++( 90: .3) .. (-1,0);
\node[fill,circle,inner sep=1pt] at (-1,-2) {};
\node[fill,circle,inner sep=1pt] at (-1,0) {};
\node[fill,circle,inner sep=1pt] at (-1,1) {};
% \node (L) at (1,-3) {(left)};
\begin{scope}[xshift=6cm]
\node (At) at (2,1) {$\Sc+\Sc$};
\node (Bt) at (2,-2) {$\Sc$};
\draw[->] (At) -- (Bt);
\draw (0,-2) ellipse (1 and .3);
\draw (0,0) ellipse (1 and .3);
\draw (0,1) ellipse (1 and .3);
\node[fill,circle,inner sep=1pt] at (-1,-2) {};
\node[fill,circle,inner sep=1pt] at (-1,0) {};
\node[fill,circle,inner sep=1pt] at (-1,1) {};
% \node (Lt) at (1,-3) {(right)};
\end{scope}
\end{tikzpicture}
\end{sidecaption}
\end{figure}
\begin{xca}\label{xca:twoS1coverings}
In this exercise you are asked to elaborate the difference
between $A$ and $A'$ above.
Let $c_\bool \defeq (z\mapsto\bool): \Sc\to\Set$.
\begin{enumerate}
\item
This part is about $A'$. Show that $\sum_{z:\Sc}\bool$ is not connected.
Give an element of the type $c_\bool\eqto\ve_\Set(\bool,\refl{\bool})$.
\item
One can define $A$ by $A\defeq\sum_{z:\Sc}\ve_\Set(\bool,\twist)$.
Show that $A$ is connected.
Give an element of type $(c_\bool\eqto\ve_\Set(\bool,\twist))\to\false$.
Hint: use \cref{xca:C2} and \cref{lem:freeloopspace}.\qedhere
\end{enumerate}
\end{xca}
\begin{remark}
It \emph{is} possible to misunderstand what a ``connected \covering'' is:
the other interpretation ``all the preimages are connected''
would simply give us an equivalence (since connected sets are contractible),
and this is \emph{not} what is intended. (Equivalences are \coverings,
but not necessarily connected \coverings and connected \coverings are not necessarily equivalences.)
Likewise for the other qualifications; for instance, in a ``finite \covering'' $f:A\to B$,
all fibers are finite sets, but
the type $A$ is usually \emph{not} a finite set.
We trust the reader to keep our definitions in mind and not the other interpretations.
\end{remark}
\begin{remark}
\Coverings are closely related to a concept from topology called ``covering spaces''
(or any variant of this concept, including Galois theory) and from algebra as locally constant sheaves (of sets).
Either way, the concept is useful because it singles out the (sub)symmetries.
\end{remark}
In this chapter, we focus on \coverings over the circle.
We start by refining the notion of diagram introduced in
\cref{rem:diagram}.
\begin{remark}\label{rem:subtype-diagram}
Consider the left diagram below, where $i_1, i_2$
are injections constituting $S$ as a subtype of $X$ and
$T$ as a subtype of $Y$, respectively (see \cref{def:subtype}).\footnote{%
To stress that a function is an injection we may decorate
the $\to$ in its type with a hook: $\hookrightarrow$.}
This diagram represents the identity type $f\circ i_1 \eqto i_2\circ g$.
Since $i_2$ is an injection, the type
$\sum_{g:S\to T} (f\circ i_1 \eqto i_2\circ g)$ is a proposition.\footnote{%
Use \cref{xca:prod-of-fibs} to see this.}
\[
\begin{tikzcd}
X \ar[r,"f"] & Y &&
X \ar[r,"f"] & Y \\
S \ar[r,"g"] \ar[u,hookrightarrow,"i_1"] & T \ar[u,hookrightarrow,"i_2"'] &&
X_P \ar[r,dashed,"g"] \ar[u,hookrightarrow,"\fst"] & Y_Q \ar[u,hookrightarrow,"\fst"']
\end{tikzcd}
\]
In the right diagram we depict the case
in which $S$ is given by a predicate $P: X\to\Prop$
and $T$ is given by a predicate $Q: Y\to\Prop$,
with the injections being first projections of the right type.
We can now apply the universal property of subtypes
\cref{xca:subtype-univ-prop} to $Y_Q$ with
$(f\circ\fst) : X_P \to Y$ and get that the three propositions
$\prod_{z:X_P} Q(f(\fst(z)))$ and
$\prod_{x:X}(P(x)\to Q(f(x)))$ and
$\sum_{g:X_P\to Y_Q} (f\circ\fst \eqto \fst\circ g)$
are logically equivalent. If these propositions hold,
we say that $f$ \emph{respects the subtypes} and
we may call the diagram a \emph{subtype diagram}.
\index{diagram!subtype}
If $q$ is a proof of $\prod_{x:X}(P(x)\to Q(f(x)))$,
then we can uniquely define the function $g: X_P\to Y_Q$,
the one labelling the dashed arrow in the right diagram above,
by $(x,p) \mapsto (f(x),q(x,p))$. The functions $f\circ\fst$ and
$\fst\circ g$ are identified by reflexivity.
We may call $g$ the \emph{function induced by $f$ on subtypes},
and will also denote it by $f$.
Now consider the special case in which $f: X\to Y$ is an equivalence.
If the inverse of $f$ also respects the subtypes,
that is, if $\prod_{y:Y}(Q(y)\to P(\inv f(y)))$, then
the function that is induced by $f$ on the subtypes is
also an equivalence. Moreover, the functions induced by $f$ and $\inv f$
are then each other's inverses.
\end{remark}
\begin{theorem}\label{thm:coveringsofS1perms}
In the diagram below, the equivalence $f$ in the second row
is $\preim$ from \cref{lem:typefamiliesandfibrations}, and
the equivalence $g$ in the same row is defined by
$g(S)\defeq (S(\base),\trp[\id_\UU]{S(\Sloop)})$
(\cref{lem:freeloopspace} applied with $A\defeq\UU$,
and \cref{def:idtoeq}).
Along the vertical arrows we have maps that forget the
property that constitutes its domain as a subtype of the
codomain, all modest variations of the first projection.
The statement of the theorem is now that the diagram below
is the composite of subtype diagrams (see \cref{rem:subtype-diagram})
in which the induced functions $f$ and $g$
in the third row are equivalences as well.
\[
\begin{tikzcd}
&& \sum_{X:\UU}(X\to X) \\ %& \sum_{X:\UU}(X\to X\to\UU)
\bigl(\sum_{A:\UU}(A\to\Sc) \ar[r,equivr,"f"]\bigr) &
\bigl(\Sc\to\UU \ar[r,equivr,"g"]\bigr) &
\sum_{X:\UU}(X\equivto X) \ar[u,hookrightarrow]
\\
\SetBundle(\Sc) \ar[r,equivl,"f"'] \ar[u,hookrightarrow] &
\bigl(\Sc\to\Set\bigr) \ar[r,equivl,"g"'] \ar[u,hookrightarrow] &
\sum_{X:\Set}(X\equivto X) \ar[u,hookrightarrow]
\end{tikzcd}
\]
\end{theorem}
\begin{proof}
We prove first that $\preim$ respects the subtypes.
Let $A:\UU$ and $h: \Sc\to A$ such that $(A,h)$ is a \covering.
This means that $\inv h(a)$ is a set, for any $a:A$.
Since $\preim(A,h)(a) \jdeq \inv h(a)$, we immediately get
that $\preim(A,h) : \Sc\to\Set$.
In order to prove that $\inv\preim$ also respects the subtypes
one simply reverses this argument.
Next we prove that $g$ respects the subtypes.
Let $S: \Sc\to\UU$ be such that $S(z)$ is a set for all $z:\Sc$.
This means in particular that $S(\base)$ is a set.
Since $g(S)\jdeq (S(\base),\trp{S(\Sloop)})$, we are done.
In order to prove that $\inv g$ also respects the subtypes
we reason as follows. Let $X:\UU$ and $h: X\equivto X$ be given.
Assume that $X$ is a set. We have $\inv g(X,h)\jdeq
\ve_\UU(X,\etop{h})$, see \cref{lem:freeloopspace}
and \cref{def:univalence}.
Now, since $X\jdeq\ve_\UU(X,\etop{h})(\base)$ is a set
and $\Sc$ is connected,
we have $\inv g(X,h): \Sc\to\Set$ and we are done.
Note that the left subtype diagram is fully general:
it also holds when we replace $\Sc$ by any type $B$.
This is not true for the right subtype diagram.
\end{proof}
In slogan form: A \covering over the circle is a set with
a permutation of its elements.
The fiber over $\base:\Sc$ gives the set,
and transporting along $\Sloop$ gives the permutation.
\begin{example}\label{def:universalcover}
A simple yet important example of a \covering over a groupoid
$B$ with an element $b_0$ is given by the family of identity types
$\uc{b_0}(b) \defeq (b_0 \eqto b)$ parameterized by $b:B$.
\glossary(universal){$\protect\uc{b_0}$}%
{the type family $b \mapsto (b_0 \protect\eqto b)$}
These identity types are indeed sets since $B$ is a groupoid.
The alternative form
of this (pointed) set bundle is the map $\fst: \sum_{b:B}(b_0\eqto b)\to B$,
the domain canonically pointed at $(b_0,\refl{b_0})$, and with
$\refl{b_0}$ as the pointing path of $\fst$.
In the above example, the reader may have noticed that,
by \cref{lem:thepathspaceiscontractible},
$\sum_{b:B}(b_0\eqto b)$ is contractible. Hence yet another
form of this \covering is the constant map
$\cst{b_0}:\bn{1}\to B$, also with pointing path $\refl{b_0}$.
%The alternative form of this \covering is given by the
%fibers of $\cst{b_0}$. By definition,
%$\inv\cst{b_0}(b)\jdeq \sum_{i:\bn{1}} b\eqto b_0$,
%so that these fibers can be identified with $b_0\eqto b$ by univalence.
What is special about these examples is captured by the
following definition and ensuing lemma.
\end{example}
\begin{definition}\label{def:univ-cover}
Let $A$ and $B$ be pointed types and $f: A\ptdto B$ a pointed \covering.
We call $f$ \emph{universal} if for every pointed \covering $g: C\ptdto B$
there is a unique $h: A\ptdto C$ with $f\eqto gh$, that is, if
the following type is contractible:
\[\sum_{h: A\ptdto C} f\eqto_{A\ptdto B} gh.\qedhere\]
\end{definition}
In the above definition we get that $h: A\ptdto C$ is a
\covering as well by \cref{xca:covering-utils}\ref{it:left-cancel-cover}.
The examples preceding \cref{def:univ-cover} are indeed universal
\coverings according to the following lemma.
\begin{lemma}\label{lem:univ-cover-of-groupoid}
Let $(A,a_0)$ be a pointed type, $(B,b_0)$ a pointed
groupoid, and $f : (A,a_0)\ptdto (B,b_0)$ a pointed \covering.
Then $f$ is universal if and only if $A$ is contractible.
\end{lemma}
\begin{proof}
Let conditions be as above and assume $A$ is contractible.
Let $(C,c_0)$ be a pointed type and $g: (C,c_0)\ptdto (B,b_0)$
a \covering. Let $f_0 : b_0\eqto f(a_0)$ and $g_0 : b_0\eqto g(c_0)$
be the respective pointing paths.
Define $h: (A,a_0)\ptdto (C,c_0)$ by $a\mapsto c_0$ with
pointing path $\refl{c_0}$.
Clearly $g_0\inv f_0 : f(a_0) \eqto g(h(a_0))\jdeq g(c_0)$,
which yields an identification of $f(a)$ and $g(h(a))$ for all $a:A$
as $A$ is contractible. Apply now function extensionality
\cref{def:funext} to get an identification of type $f \eqto_{A\to B} gh$.
The pointing path of $gh$ is also $g_0 : b_0 \eqto g(c_0)$.
We get an identification of type $(f,f_0)\eqto_{A\ptdto B} (gh,g_0)$
since $g_0 = (g_0\inv f_0) f_0$.%
\marginnote{Draw the triangle!}
The type $(A,a_0)\ptdto (C,c_0)$ is contractible since $A$ is
contractible, yielding that $h$ is unique.
For the other direction of the lemma we use a reasoning pattern
that is typical for universality. Assume that $f$ is universal.
As shown above, $\cst{b_0}: \bn{1}\ptdto (B,b_0)$ is also universal.
Hence we have maps $h$ and $h'$ and identifications
of all identity types represented in the following diagram,
simplified by ignoring the points:
\[
\begin{tikzcd}[column sep=large,ampersand replacement=\&]
\bn 1\ar[rr,"h'"]\ar[drrr,"\cst{b_0}"'] \& \&
A \ar[rr,"h"] \ar[dr,pos=.7,"f"] \& \&
\bn 1\ar[rr,"h'"]\ar[dl,pos=.7,"\cst{b_0}"'] \& \&
A \ar[dlll,"f"] \\
\& \& \& B \& \& \&
\end{tikzcd}
\]
Using the universality of $f$, we can identify $h'h$ with $\id_A$.
Using the universality of $\cst{b_0}$, we can identify $hh'$ with $\id_\bn{1}$.
Now \cref{lem:weq-iso} yields an equivalence between $\bn{1}$
and $A$, implying that $A$ is contractible.
\end{proof}
A particularly important example of a pointed \covering is the following.
\begin{definition}\label{def:RtoS1}
Recall the set of integers $\zet$ from \cref{def:zet}, with
its successor function $\zs: \zet\equivto\zet$ being an
equivalence. The \covering $R:\Sc\to\UU$ is defined by
the recursion principle of the circle from \cref{def:circle}
by putting $R(\base)\defeq\zet$ and $R(\Sloop)\defis \etop{\zs}$.
This is indeed a set bundle since $\Sc$ is connected,
so that $R(x)$ is a set for all $x:\Sc$.
We also write $R:\Sc\to\Set$.
Recall $\Tot(R)\jdeq\sum_{z:\Sc}R(z)$ and point $\Tot(R)$
at $(\base,0)$. Now define
\[
\exp\defeq\fst:\Tot(R) \to \Sc,
\text{~with pointing path~}\refl{\base}.
\]
We call $\exp$ the \emph{exponential \covering over the circle}.
\end{definition}
\begin{remark} \label{rem:expforreal}%
\begin{marginfigure}
\begin{tikzpicture}[scale=.15]
\node (Sc) at (0,-5) {$\Sc$};
\node[dot,label=left:$2$] (B) at (-10,18) {};
\node[dot,label=left:$1$] (one) at (-10,14) {};
\node[dot,label=left:$0$] (zero) at (-10,10) {};
\node[dot,label=left:$-1$] (mone) at (-10, 6) {};
\node[dot,label=left:$-2$] (C) at (-10, 2) {};
\node[dot] (D) at (-10,-5) {};
\node[label=above:$\Tot(R)$] (R) at (10,20) {};
\node[label=above left:$\zet$] (Z) at (-10,20) {};
\node at (-10,20.8) {$\vdots$};
\node at (-10,.2) {$\vdots$};
\node[label=left:$\Sloop$] (Sloop) at (10,-5) {};
\pgfmathsetmacro\cc{.55228475}% = 4/3*tan(pi/8)
\pgfmathsetmacro\cy{2*\cc}%
\pgfmathsetmacro\cx{10*\cc}%
\pgfmathsetmacro\ay{.35165954}%
\draw (10,0) \foreach \y in {0,4,...,16} {
.. controls (10,\y + \cy + \ay) and (\cx,3 + \y - \ay)
.. (0,3 + \y) .. controls (-\cx,3 + \y + \ay) and (-10,2 + \y + \cy - \ay)
.. (-10,2 + \y) .. controls (-10,2 + \y - \cy + \ay) and (-\cx,1 + \y - \ay)
.. (0,1 + \y) .. controls (\cx,1 + \y + \ay) and (10,4 + \y - \cy - \ay)
.. (10,4 + \y) } ;
\draw (10,-5) .. controls (10,-5 + \cy) and (\cx,-3)
.. (0,-3) .. controls (-\cx,-3) and (-10,-5 + \cy)
.. (-10,-5) .. controls (-10,-5 - \cy) and (-\cx,-7)
.. (0,-7) .. controls (\cx,-7) and (10,-5 - \cy) .. (10,-5);
\end{tikzpicture}
\end{marginfigure}
The reason for the name ``exponential'' comes from the following
visualization. If $x$ is a real number, then the complex
exponentiation $\ee^{2\pi\ii x}=\cos(2\pi x)+\ii\sin(2\pi x)$ has
absolute value $1$ and so defines a continuous function
to the unit circle $\setof{(x,y):\RR^2}{x^2+y^2=1}$,
where we have identified $\RR^2$ with the complex numbers.
Choosing any point $z$ on the unit
circle, we see that the preimage of $z$ under the exponential
function is a shifted copy of the integers inside the reals.\footnote{%
\emph{homotopy types} have to wait until Appendix B.3}
This connection between the integers and the unit circle is
precisely captured in a form that we can take further by studying the
\covering $\exp:\Tot(R)\to \Sc$.
\end{remark}
In the next section we will see that the exponential \covering
of the circle is in fact universal.
We'll continue the general study of \coverings in \cref{sec:gsets}
and indeed throughout the book.
For now, we'll focus our attention on the circle and \coverings over it.
\section{The symmetries in the circle}
\label{sec:symcirc}
With the set $\zet$ of integers \emph{defined} as in \cref{sec:integers},
we will now construct an equivalence between $\zet$ and the type
$\base\eqto_{\Sc}\base$, and that under this equivalence $0:\zet$ corresponds to
$\refl{\base}:\base\eqto \base$, and $1$ to $\Sloop$, and $-1$ to $\Sloop^{-1}$.
More generally, the successor $\zs:\zet\to\zet$ corresponds to composition
with $\Sloop$, while the predecessor $\inv{\zs}$ corresponds to composition
with $\Sloop^{-1}$.\marginnote{%
It follows directly that \emph{addition} of integers corresponds
to \emph{composition} of loops.}
The first step is to identify the exponential \covering \cref{def:RtoS1}
with the universal \covering in \cref{def:universalcover},
\ie identify the type family
\[
R: \Sc\to\UU,\qquad R(\base)\defeq\zet,\, R(\Sloop)\defis \etop{\zs}
\]
with the family
\[
\uc{\base}:\Sc\to\UU,\qquad \uc{\base}(z)\defeq (\base\eqto z).
\]
What does it mean to identify the families $\uc{\base}$ and $R$?
Type families are a special case of functions.
Function extensionality reduces the question to the pointwise
identification of $\uc{\base}$ and $R$ as functions.
Using univalence, it suffices to give
an equivalence from $\uc{\base}(z)$ to $R(z)$ for every $z:\Sc$,
that is, recalling \cref{def:function-type-families}, giving
a (fiberwise) equivalence $f: \uc{\base}\to R$. We will use
\cref{lem:weq-iso}, so will also define $g: R\to\uc{\base}$.
\begin{remark}\label{rem:univalence-transparent}
We recall \cref{lem:trp-in-function-type} defining how
transport behaves in families of function types.
Given a type $A$ and two type families $P,Q:A\to\UU$,
transport along $p:a\eqto a'$ of $h:P(a)\to Q(a)$ can
be identified with the function
$\trp[Q]{p}\circ h\circ \trp[P]{p^{-1}}$
of type $P(a') \to Q(a')$. As a simplification we
could use the notation $\tilde{\blank}$ introduced
after \cref{def:univalence} for the transport functions.
However, we now take the further step of allowing
univalence to be completely transparent,
that is, leaving out both $\tilde{\blank}$ and $\bar{\blank}$
when no confusion can occur. Here this means that
the picture for the transport of $h$ becomes:
\[
\begin{tikzcd}[column sep=huge]
a\ar[d,eqr,"p"] & P(a)\ar[r,"h"]\ar[d,equivr,"P(p)"] &
Q(a)\ar[d,equivr,"Q(p)"] \\
a' & P(a')\ar[r,"Q(p)\,h\,P(p)^{-1}"] & \,Q(a').
\end{tikzcd}
\]
In, for example, the definition of the exponential
\covering $R$ above, this means that we may denote $R(\Sloop)$
as $\zs$ instead of $\etop{\zs}$, and may write $R(\Sloop)(0)=1$.
\end{remark}
If $A$ is $\Sc$, then the induction principle for the circle says
that giving an $h(z):P(z)\to Q(z)$ for all $z:\Sc$ is the same as
specifying an element $h(\base):P(\base)\to Q(\base)$ and,
using \cref{def:pathover-trp} and \cref{rem:univalence-transparent},
an identification
$h(\Sloop):Q(\Sloop)\,h(\base)\,P(\Sloop)^{-1}\eqto h(\base)$,
see the following diagram:
\[
\begin{tikzcd}[column sep=huge]
P(\base)\ar[r,"h(\base)"]\ar[d,equivr,"P(\Sloop)"]
& Q(\base)\ar[d,equivr,"Q(\Sloop)"] \\
P(\base)\ar[r,"h(\base)"] & Q(\base).
\end{tikzcd}
\]
If $P,Q$ are families of sets,
then $h(\Sloop)$ is a proof that this diagram commutes.
We now define $f: \uc{\base}\to R$ and $g: R\to\uc{\base}$ that will turn out to
give inverse equivalences between $\uc{\base}(z)$ and $R(z)$, for each $z:\Sc$.
\begin{marginfigure}
\begin{tikzpicture}[scale=.15]