-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrep.tex
2002 lines (1818 loc) · 60 KB
/
rep.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
% Basic Category Theory
% Tom Leinster <[email protected]>
%
% Copyright (c) Tom Leinster 2014-2016
%
% Chapter 4: Representables
%
\chapter{Representables}
\label{ch:rep}
A category is a world of objects, all looking at one another. Each sees
the world from a different viewpoint.
Consider, for instance, the category of topological spaces, and let us ask
how it looks when viewed from the one-point space $1$. A map from $1$ to a
space $X$ is essentially the same thing as a point of $X$, so we might say
that $1$ `sees%
%
\index{functor!seeing@`seeing'}
%
points'. Similarly, a map from $\reals$ to a space $X$
could reasonably be called a curve in $X$, and in this sense, $\reals$ sees
curves.
Now consider the category of groups. A map from the infinite
cyclic group $\integers$%
%
\index{Z@$\integers$ (integers)!group@as group}
%
to a group $G$ amounts to an element of $G$. (For given $g \in G$, there
is a unique homomorphism $\phi\from \integers \to G$ such that $\phi(1) =
g$.) So, $\integers$ sees elements. Similarly, if $p$ is a prime number
then the cyclic group $\integers/p\integers$ sees elements of order $1$ or
$p$.
Any ring homomorphism between fields is injective, so in the category of
fields,%
%
\index{field}
%
a map $K \to L$ is a way of realizing $L$ as an extension of $K$. Hence
each field $K$ sees the extensions of itself. If $K$ and $L$ are fields of
different characteristic then there are no homomorphisms between $K$ and
$L$, so the category of fields is the union of disjoint subcategories
$\Field_0$, $\Field_2$, $\Field_3$, $\Field_5$, \ldots\ consisting of the
fields of characteristics $0, 2, 3, 5$, \ldots. Each field is blind to the
fields of different characteristic.
In the ordered set $(\reals, \mathord{\leq})$, the object $0$ sees whether
a number is nonnegative. In other words, if $x$ is nonnegative then
there is one map $0 \to x$, and if not, there are none.
We can also ask the dual question: fixing an object of a category, what are
the maps \emph{into} it? Let $S$ be the two-element set, for instance.
For an arbitrary set $X$, the maps from $X$ to $S$ correspond to the
subsets of $X$ (as we saw in Section~\ref{sec:Set-properties}). Now give
$S$ the topology in which one of the singleton subsets is open but the
other is not. For any topological space $X$, the continuous maps from $X$
into $S$ correspond to the \emph{open} subsets of $X$.
This chapter explores the theme of how each object sees and is seen by the
category in which it lives. We are naturally led to the notion of
representable functor, which (after adjunctions) provides our second
approach to the idea of universal property.
\section{Definitions and examples}
\label{sec:rep-defns}
Fix an object $A$ of a category $\cat{A}$. We will consider the totality
of maps out of $A$. To each $B \in \cat{A}$, there is assigned the set
(or class) $\cat{A}(A, B)$ of maps from $A$ to $B$. The content of the
following definition is that this assignation is functorial in $B$: any map
$B \to B'$ induces a function $\cat{A}(A, B) \to \cat{A}(A, B')$.
\begin{defn}
\label{defn:co-rep}
Let $\cat{A}$ be a locally small category and $A \in \cat{A}$. We define a
functor
\[
\h^A = \cat{A}(A, \dashbk)\from \cat{A} \to \Set%
%
\ntn{hom-out}
%
\]
as follows:
%
\begin{itemize}
\item
for objects $B \in \cat{A}$, put $\h^A(B) = \cat{A}(A, B)$;
\item
for maps $B \toby{g} B'$ in $\cat{A}$, define
\[
\h^A(g) = \cat{A}(A, g)\from
\cat{A}(A, B) \to \cat{A}(A, B')
\]
by
\[
p
\mapsto
g \of p
\]
for all $p\from A \to B$.
\end{itemize}
\end{defn}
\begin{remarks}
\begin{enumerate}[(b)]
\item
Recall that `locally%
%
\index{locally small}%
\index{category!locally small}
%
small' means that each class $\cat{A}(A, B)$ is in fact a set. This
hypothesis is clearly necessary in order for the definition to make sense.
\item
Sometimes $\h^A(g)$ is written as $g \of \dashbk$%
%
\ntn{of-blank}
%
or $g_*$.%
%
\ntn{lower-star}
%
All three forms, as well as $\cat{A}(A, g)$, are in use.
\end{enumerate}
\end{remarks}
\begin{defn}
Let $\cat{A}$ be a locally small category. A functor $X\from \cat{A} \to
\Set$ is \demph{representable}%
%
\index{functor!representable}
%
if $X \iso \h^A$ for some $A \in \cat{A}$.
A \demph{representation}%
%
\index{representation!functor@of functor}
%
of $X$ is a choice of an object $A \in \cat{A}$ and an isomorphism between
$\h^A$ and $X$.
\end{defn}
%
Representable functors are sometimes just called `representables'. Only
set-valued%
%
\index{functor!set-valued}%
\index{set!valued functor@-valued functor}
%
functors (that is, functors with codomain $\Set$) can be representable.
\begin{example}
\label{eg:co-reps-id-Set}
Consider $\h^1\from \Set \to \Set$, where $1$ is the one-element set.
Since a map from $1$ to a set $B$ amounts to an element of $B$, we have
\[
\h^1(B) \iso B
\]
for each $B \in \Set$. It is easily verified that this isomorphism is
natural in $B$, so $\h^1$ is isomorphic to the identity functor $1_\Set$.
Hence $1_\Set$ is representable.
\end{example}
\begin{example}
\label{eg:co-reps-seeing}
All of the `seeing'%
%
\index{functor!seeing@`seeing'}
%
functors in the introduction to this chapter are representable. The
forgetful%
%
\index{functor!forgetful!representable@is representable}
%
functor $\Tp \to \Set$ is isomorphic to $\h^1 = \Tp(1, \dashbk)$, and the
forgetful functor $\Grp \to \Set$ is isomorphic to $\Grp(\integers,
\dashbk)$. For each prime $p$, there is a functor $U_p\from \Grp \to \Set$
defined on objects by
\[
U_p(G) =
\{\text{elements of }G \text{ of order } 1 \text{ or } p \},
%
\index{group!order of element of}
%
\]
and as claimed above, $U_p \iso \Grp(\integers/p\integers, \dashbk)$
(Exercise~\ref{ex:cyclic-rep}). Hence $U_p$ is representable.
\end{example}
\begin{example}
There is a functor $\ob\from \Cat \to \Set$ sending a small category to its
set%
%
\index{object!set of category@-set of category}
%
of objects. (The category $\Cat$ was introduced in
Definition~\ref{defn:Cat}.) It is representable. Indeed, consider the
terminal category $\One$ (with one object and only the identity map). A
functor from $\One$ to a category $\cat{B}$ simply picks out an object of
$\cat{B}$. Thus,
\[
\h^\One(\cat{B}) \iso \ob\cat{B}.
\]
Again, it is easily verified that this isomorphism is natural in $\cat{B}$;
hence $\ob \iso \Cat(\One, \dashbk)$. It can be shown similarly that the
functor $\Cat \to \Set$ sending a small category to its set of maps is
representable (Exercise~\ref{ex:arrows-rep}).
\end{example}
\begin{example}
Let $M$ be a monoid, regarded as a one-object%
%
\index{monoid!action of}
%
category. Recall from Example~\ref{eg:functor-action} that a set-valued
functor on $M$ is just an $M$-set. Since the category $M$ has only one
object, there is only one representable functor on it (up to isomorphism).
As an $M$-set, the unique representable is the so-called \demph{left
regular%
%
\index{representation!group or monoid@of group or monoid!regular}
%
representation} of $M$, that is, the underlying set of $M$ acted on by
multiplication on the left.
\end{example}
\begin{example}
Let $\Toph_*$%
%
\ntn{Toph-star}
%
be the category whose objects are topological spa\-ces equipped with a
basepoint and whose arrows are homotopy%
%
\index{homotopy}
%
classes of basepoint-preserving continuous maps. Let $S^1 \in \Toph_*$%
%
\ntn{circle}
%
be the circle. Then for any object $X \in \Toph_*$, the maps $S^1 \to X$
in $\Toph_*$ are the elements of the fundamental%
%
\index{group!fundamental}
%
group $\pi_1(X)$. Formally, this says that the composite functor
\[
\Toph_* \toby{\pi_1} \Grp \toby{U} \Set
\]
is isomorphic to $\Toph_*(S^1, \dashbk)$. In particular, it is
representable.
\end{example}
\begin{example}
\label{eg:co-reps-tensor}
Fix a field $k$ and vector spaces $U$ and $V$ over $k$. There is a
functor
\[
\Bilin(U, V; \dashbk)\from \Vect_k \to \Set%
%
\index{map!bilinear}
%
\ntn{Bilin}
%
\]
whose value $\Bilin(U, V; W)$ at $W \in \Vect_k$ is the set of bilinear
maps $U \times V \to W$. It can be shown that this functor is
representable; in other words, there is a space $T$ with the property that
\[
\Bilin(U, V; W) \iso \Vect_k(T, W)
\]
naturally in $W$. This $T$ is the tensor%
%
\index{tensor product}
%
product $U \otimes V$, which we met just after the proof of
Lemma~\ref{lemma:tensor-unique}.
\end{example}
Adjunctions give rise to representable%
%
\index{functor!representable!adjoints@and adjoints}
%
functors in the following way.
\begin{lemma}
\label{lemma:adj-to-rep}
Let $\hadjnli{\cat{A}}{\cat{B}}{F}{G}$ be locally small categories, and let
$A \in \cat{A}$. Then the functor
\[
\cat{A}(A, G(\dashbk))\from \cat{B} \to \Set
\]
(that is, the composite $\cat{B} \toby{G} \cat{A} \toby{\h^A} \Set$) is
representable.
\end{lemma}
\begin{pf}
We have
\[
\cat{A}(A, G(B)) \iso \cat{B}(F(A), B)
\]
for each $B \in \cat{B}$. If we can show that this isomorphism is natural
in $B$, then we will have proved that $\cat{A}(A, G(\dashbk))$ is isomorphic
to $\h^{F(A)}$ and is therefore representable. So, let $B \toby{q} B'$ be
a map in $\cat{B}$. We must show that the square
\[
\xymatrix{
\cat{A}(A, G(B)) \ar[r] \ar[d]_{G(q) \of \dashbk} &
\cat{B}(F(A), B) \ar[d]^{q \of \dashbk} \\
\cat{A}(A, G(B')) \ar[r] &
\cat{B}(F(A), B')
}
\]
commutes, where the horizontal arrows are the bijections provided by the
adjunction. For $f \from A \to G(B)$, we have
\[
\xymatrix@C+3em{
f \ar@{|->}[r] \ar@{|->}[d] &
\bar{f} \ar@{|->}[d] \\
G(q) \of f \ar@{|->}[r] &
*!<0mm,-1.4ex>+\txt{$q \of \bar{f}$\\
$\ovln{G(q) \of f}$,}
}
\]
so we must prove that $q \of \bar{f} = \ovln{G(q) \of f}$. This follows
immediately from the naturality condition~\eqref{eq:adj-nat-a} in the
definition of adjunction (with $g = \bar{f}$).
\end{pf}
You would not expect a randomly-chosen functor into $\Set$ to be
rep\-re\-sen\-table. In some sense, rather few functors are. However,
forgetful%
%
\index{functor!forgetful!representable@is representable|(}
%
functors do tend to be representable:
%
\begin{propn}
\label{propn:ladj-rep}
\hspace*{-2.5pt}Any set-valued functor with a left adjoint is representable.
\end{propn}
\begin{pf}
Let $G\from \cat{A} \to \Set$ be a functor with a left adjoint $F$. Write
$1$ for the one-point set. Then
\[
G(A) \iso \Set(1, G(A))
\]
naturally in $A \in \cat{A}$
(by Example~\ref{eg:co-reps-id-Set}), that is, $G \iso
\Set(1, G(\dashbk))$. So by Lemma~\ref{lemma:adj-to-rep}, $G$ is
representable; indeed, $G \iso \h^{F(1)}$.
\end{pf}
\begin{example}
Several of the examples of representables mentioned above arise as in
Proposition~\ref{propn:ladj-rep}. For instance, $U \from \Tp \to \Set$
has a left adjoint $D$%
%
\index{topological space!discrete}
%
(Example~\ref{eg:adjn:spaces}), and $D(1) \iso 1$, so we recover the result
that $U \iso \h^1$. Similarly, Exercise~\ref{ex:cdoi} asked you to
construct a left adjoint $D$%
%
\index{category!discrete}
%
to the objects functor $\ob\from \Cat \to \Set$. This functor $D$
satisfies $D(1) \iso \One$, proving again that $\ob \iso \h^\One$.
\end{example}
\begin{example}
The forgetful functor $U\from \Vect_k \to \Set$ is representable,\linebreak
since it has a left adjoint.%
%
\index{vector space!free}
%
Indeed, if $F$ denotes the left adjoint then $F(1)$ is the $1$-dimensional
vector space $k$, so $U \iso \h^k$. This is also easy to see directly: a
map from $k$ to a vector space $V$ is uniquely determined by the image of
$1$, which can be any element of $V$; hence $\Vect_k(k, V) \iso U(V)$
naturally in $V$.
\end{example}
\begin{example}
\label{eg:ladj-rep-ring}
Examples~\ref{egs:adjns-alg} began with the declaration that forgetful%
%
\index{functor!forgetful!left adjoint to}
%
functors between categories of algebraic structures usually have left
adjoints. Take the category $\CRing$ of commutative rings%
%
\index{ring!free}
%
and the forgetful functor $U\from \CRing \to \Set$. This general principle
suggests that $U$ has a left adjoint, and Proposition~\ref{propn:ladj-rep}
then tells us that $U$ is representable.
Let us see how this works explicitly. Given a set $S$, let $\integers[S]$
be the ring of polynomials%
%
\index{ring!polynomial}
%
over $\integers$ in commuting variables $x_s$ ($s \in S$). (This was
called $F(S)$ in Example~\ref{egs:free-functors}\bref{eg:free-ring}.) Then
$S \mapsto \integers[S]$ defines a functor $\Set \to \CRing$, and this is
left adjoint to $U$. Hence $U \iso \h^{\integers[x]}$. Again, this
can be verified directly: for any ring $R$, the maps $\integers[x] \to R$
correspond one-to-one with the elements of $R$ (Exercises~\ref{ex:Zx}
and~\ref{ex:free-ring-one-gen}).
%
\index{functor!forgetful!representable@is representable|)}
\end{example}
We have defined, for each object $A$ of our category $\cat{A}$, a functor
$\h^A \in \ftrcat{\cat{A}}{\Set}$. This describes how $A$ sees the world.
As $A$ varies, the view varies. On the other hand, it is always the same
world being seen, so the different views from different objects are somehow
related. (Compare aerial%
%
\index{aerial photography}
%
photos taken from a moving aeroplane, which agree well enough on their
overlaps that they can be patched together to make one big picture.) So
the family $\bigl(\h^A\bigr)_{A \in \cat{A}}$ of `views' has some
consistency to it. What this means is that whenever there is a map between
objects $A$ and $A'$, there is also a map between $\h^A$ and $\h^{A'}$.
Precisely, a map $A' \toby{f} A$ induces a natural transformation
\[
\xymatrix@C+1em{
\cat{A} \rtwocell<4>^{\h^A}_{\h^{A'}}{\hspace{.5em}\h^f} &\Set,
}%
%
\ntn{hom-out-map}
%
\]
whose $B$-component (for $B \in \cat{A}$) is the function
\[
\begin{array}{ccc}
\h^A(B) = \cat{A}(A, B) &\to &\h^{A'}(B) = \cat{A}(A', B) \\
p &\mapsto &p \of f.
\end{array}
\]
Again, $\h^f$
goes by a variety of other names: $\cat{A}(f, \dashbk)$,%
%
\ntn{hom-out-map-blank}
%
$f^*$,%
%
\ntn{upper-star}
%
and $\dashbk \of f$.%
%
\ntn{blank-of}
%
Note the reversal of direction! Each functor $\h^A$ is covariant, but they
come together to form a \emph{contravariant} functor, as in the following
definition.
\begin{defn}
Let $\cat{A}$ be a locally small category. The functor
\[
\h^\bl\from \cat{A}^\op \to \ftrcat{\cat{A}}{\Set}%
%
\ntn{hom-out-blank}
%
\]
is defined on objects $A$ by $\h^\bl(A) = \h^A$ and on maps $f$ by $\h^\bl(f)
= \h^f$.
\end{defn}
The symbol $\bl$ is another type of blank, like $\dashbk$.
All of the definitions presented so far in this chapter can be dualized.
At the formal level, this is trivial: reverse all the arrows, so that every
$\cat{A}$ becomes an $\cat{A}^\op$ and vice versa. But in our usual
examples, the flavour is different. We are no longer asking what objects
\emph{see}, but how they are \emph{seen}.
Let us first dualize Definition~\ref{defn:co-rep}.
\begin{defn}
Let $\cat{A}$ be a locally small category and $A \in \cat{A}$. We define a
functor
\[
\h_A = \cat{A}(\dashbk, A)\from \cat{A}^\op \to \Set%
%
\ntn{hom-in}
%
\]
as follows:
%
\begin{itemize}
\item
for objects $B \in \cat{A}$, put $\h_A(B) = \cat{A}(B, A)$;
\item
for maps $B' \toby{g} B$ in $\cat{A}$, define
\[
\h_A(g) = \cat{A}(g, A) = g^* = \dashbk \of g\from
\cat{A}(B, A) \to \cat{A}(B', A)
\]
by
\[
p
\mapsto
p \of g
\]
for all $p\from B \to A$.
\end{itemize}
\end{defn}
If you know about dual vector spaces, this construction will seem familiar.
In particular, you will not be surprised that a map $B' \to B$ induces a
map in the opposite direction, $\h_A(B) \to \h_A(B')$.
We now define representability for \emph{contravariant} set-valued
functors. Stri\-ctly speaking, this is unnecessary, as a contravariant
functor on $\cat{A}$ is a covariant functor on $\cat{A}^\op$, and we
already know what it means for a covariant set-valued functor to be
representable. But it is useful to have a direct definition.
\begin{defn}
Let $\cat{A}$ be a locally small category. A functor $X\from \cat{A}^\op \to
\Set$ is \demph{representable}%
%
\index{functor!representable}
%
if $X \iso \h_A$ for some $A \in \cat{A}$. A \demph{representation}%
%
\index{representation!functor@of functor}
%
of $X$ is a choice of an object $A \in \cat{A}$ and an isomorphism between
$\h_A$ and $X$.
\end{defn}
\begin{example}
There is a functor
\[
\pset\from \Set^\op \to \Set%
%
\ntn{power-set-ftr}
%
\]
sending each set $B$ to its power%
%
\index{power!set}
%
set $\pset(B)$, and defined on maps $g\from B' \to B$ by $(\pset(g))(U) =
g^{-1}U$ for all $U \in \pset(B)$. (Here $g^{-1}U$ denotes the inverse%
%
\index{inverse!image}
%
image or preimage of $U$ under $g$, defined by $g^{-1} U = \{ x' \in B'
\such g(x') \in U \}$.) As we saw in Section~\ref{sec:Set-properties}, a
subset amounts to a map into the two-point%
%
\index{set!two-element}
%
set $2$. Precisely put, $\pset \iso \h_2$.
\end{example}
\begin{example}
\label{eg:contra-rep-sier}
Similarly, there is a functor
\[
\oset\from\Tp^\op \to \Set%
%
\ntn{oset-ftr}
%
\index{topological space!open subset of}%
\index{open subset}%
\index{set!open}
%
\]
defined on objects $B$ by taking $\oset(B)$ to be the set of open subsets
of $B$. If $S$ denotes the two-point%
%
\index{topological space!two-point}
%
topological space in which exactly one of the two singleton subsets is
open, then continuous maps from a space $B$ into $S$ correspond naturally
to open subsets of $B$ (Exercise~\ref{ex:sierpinski-space}). Hence $\oset
\iso \h_S$, and $\oset$ is representable.
\end{example}
\begin{example}
In Example~\ref{eg:contra-fn-spaces}, we defined a functor $C\from \Tp^\op
\to \Ring$, assigning to each space the ring%
%
\index{ring!functions@of functions}
%
of continuous real-valued functions%
%
\index{topological space!functions on}
%
on it. The composite functor
\[
\Tp^\op \toby{C} \Ring \toby{U} \Set
\]
is representable, since by definition, $U(C(X)) = \Tp(X, \reals)$ for
topological spaces $X$.
\end{example}
Previously, we assembled the covariant representables $\bigl( \h^A
\bigr)_{A \in \cat{A}}$ into one big functor $\h^\bl$. We now do the same
for the contravariant representables $\bigl( \h_A \bigr)_{A \in \cat{A}}$.
Any map $A \toby{f} A'$ in $\cat{A}$ induces a natural transformation
\[
\xymatrix@C+1em{
\cat{A}^\op \rtwocell<4>^{\h_A}_{\h_{A'}}{\hspace{.5em}\h_f} &\Set%
%
\ntn{hom-in-map}
%
}
\]
(also called $\cat{A}(\dashbk, f)$,%
%
\ntn{hom-in-map-blank}
%
$f_*$%
%
\ntn{lower-star-bis}
%
or $f \of \dashbk$),%
%
\ntn{of-blank-bis}
%
whose component at an object $B \in \cat{A}$ is
\[
\begin{array}{ccc}
\h_A(B) = \cat{A}(B, A) &\to &
\h_{A'}(B) = \cat{A}(B, A') \\
p &\mapsto &
f \of p.
\end{array}
\]
\begin{defn}
\label{defn:yon-emb}
Let $\cat{A}$ be a locally small category. The \demph{Yoneda%
%
\index{Yoneda embedding}
%
embedding} of $\cat{A}$ is the functor
\[
\h_\bl\from \cat{A} \to \ftrcat{\cat{A}^\op}{\Set}%
%
\ntn{hom-in-blank}
%
\]
defined on objects $A$ by $\h_\bl(A) = \h_A$ and on maps $f$ by $\h_\bl(f) =
\h_f$.
\end{defn}
Here is a summary of the definitions so far.
%
\begin{center}
\begin{tabular}{ll}
\ \\[-2ex]
For each $A \in \cat{A}$, we have a functor &
$\cat{A} \toby{\h^A} \Set$. \\
Putting them all together gives a functor &
$\cat{A}^\op \toby{\h^\bl} \ftrcat{\cat{A}}{\Set}$.
\vspace*{2ex}\\
For each $A \in \cat{A}$, we have a functor &
$\cat{A}^\op \toby{\h_A} \Set$. \\
Putting them all together gives a functor &
$\cat{A} \toby{\h_\bl} \ftrcat{\cat{A}^\op}{\Set}$.\\[-2ex]
\
\end{tabular}%
\end{center}
%
The second pair of functors is the dual of the first. Both involve
contravariance;%
%
\index{functor!contravariant}%
\index{contravariant}
%
it cannot be avoided.
In the theory of representable functors, it does not make much difference
whether we work with the first or the second pair. Any theorem that we
prove about one dualizes to give a theorem about the other. We choose to
work with the second pair, the $\h_A$s and $\h_\bl$. In a sense to be
explained, $\h_\bl$ `embeds' $\cat{A}$ into $\ftrcat{\cat{A}^\op}{\Set}$.
This can be useful, because the category $\ftrcat{\cat{A}^\op}{\Set}$ has
some good properties that $\cat{A}$ might not have.
Exercise~\ref{ex:yoneda-conservative} asks you to prove that $\h_\bl$ is
injective on isomorphism classes of objects. It is strongly recommended
that you do it before reading on, as it encapsulates the key ideas of the
rest of this chapter.
There is one more functor to define. It unifies the first and second pairs
of functors shown above.
\begin{defn}
Let $\cat{A}$ be a locally small category. The functor
\[
\Hom_\cat{A}\from \cat{A}^\op \times \cat{A} \to \Set%
%
\index{hom-set}
%
\ntn{Hom-functor}
%
\]
is defined by
\[
\xymatrix{
(A, B) \ar@<1ex>[d]^g &
\mapsto \ar@{}[d]|*+{\mapsto} &
\cat{A}(A, B) \ar[d]^{g \of \dashbk \of f} \\
(A', B') \ar@<1ex>[u]^f &
\mapsto &
\cat{A}(A', B').
}
\]
In other words, $\Hom_\cat{A}(A, B) = \cat{A}(A, B)$ and $(\Hom_\cat{A}(f,
g))(p) = g \of p \of f$, whenever $A' \toby{f} A \toby{p} B \toby{g} B'$.
\end{defn}
\begin{remarks}
\label{rmks:global-hom}
\begin{enumerate}[(b)]
\item
The existence of the functor $\Hom_\cat{A}$ is something like the fact that for
a metric%
%
\index{metric space}
%
space $(X, d)$, the metric is itself a continuous map $d\from X \times X
\to \reals$. (If we take two points and move each one slightly, the
distance between them changes only slightly.)
\item
In terms of Exercise~\ref{ex:ftr-on-product}, $\Hom_{\cat{A}}$ is the
functor $\cat{A}^\op \times \cat{A} \to \Set$ corresponding to the families
of functors $\bigl( \h^A \bigr)_{A \in \cat{A}}$ and $\bigl( \h_B \bigr)_{B
\in \cat{A}}$.
\item
\label{rmks:global-hom:cc}
In Example~\ref{eg:adjn:cc}, we saw that for any set $B$, there is an
adjunction $(\dashbk \times B) \ladj (\dashbk)^B$ of functors $\Set \to
\Set$. Similarly, for any category $\cat{B}$, there is an adjunction
$(\dashbk \times \cat{B}) \ladj \ftrcat{\cat{B}}{\dashbk}$ of functors
$\CAT \to \CAT$; in other words, there is a canonical bijection
\[
\CAT(\cat{A} \times \cat{B}, \cat{C})
\iso
\CAT(\cat{A}, \ftrcat{\cat{B}}{\cat{C}})
\]
for $\cat{A}, \cat{B}, \cat{C} \in \CAT$. Under this bijection, the functors
\[
\Hom_\cat{A}\from \cat{A}^\op \times \cat{A} \to \Set,
\qquad
\h^\bl\from \cat{A}^\op \to \ftrcat{\cat{A}}{\Set}
\]
correspond to one another. Thus, $\Hom_\cat{A}$ carries the same
information as $\h^\bl$ (or $\h_\bl$), presented slightly differently.
\end{enumerate}
\end{remarks}
\begin{remark}
\label{rmk:adj-nat}
We can now explain the naturality%
%
\index{adjunction!naturality axiom for}
%
in the definition of adjunction (Definition~\ref{defn:adjn}). Take
categories and functors $\oppairi{\cat{A}}{\cat{B}}{F}{G}$. They give rise
to functors
\[
\xymatrix{
\cat{A}^\op \times \cat{B} \ar[r]^-{1\times G} \ar[d]_{F^\op \times 1} &
\cat{A}^\op \times \cat{A} \ar[d]^{\Hom_\cat{A}} \\
\cat{B}^\op \times \cat{B} \ar[r]_-{\Hom_\cat{B}} &
\Set.
}
\]
The composite functor $\searrows$ sends $(A, B)$ to $\cat{B}(F(A), B)$; it
can be written as $\cat{B}(F(\dashbk), \dashbk)$. The composite
$\esarrows$ sends $(A, B)$ to $\cat{A}(A, G(B))$.
Exercise~\ref{ex:adj-nat} asks you to show that these two functors
\[
\cat{B}(F(\dashbk), \dashbk),
\
\cat{A}(\dashbk, G(\dashbk))
\from
\cat{A}^\op \times \cat{B} \to \Set
\]
are naturally isomorphic if and only if $F$ and $G$ are adjoint. This
justifies the claim in Remark~\ref{rmks:adjts}\bref{rmk:adjts:nat}: the
naturality requirements~\eqref{eq:adj-nat-a} and~\eqref{eq:adj-nat-b} in
the definition of adjunction simply assert that two particular functors
are naturally isomorphic.
\end{remark}
Objects of an arbitrary category do not have elements in any obvious sense.
However, \emph{sets} certainly have elements, and we have observed that an
element of a set $A$ is the same thing as a map $1 \to A$. This inspires
the following definition.
\begin{defn}
\label{defn:gen-elt}
Let $A$ be an object of a category. A \demph{generalized%
%
\index{element!generalized}
%
element} of $A$ is a map with codomain $A$. A map $S \to A$ is a
generalized element of $A$ of \demph{shape%
%
\index{shape!generalized element@of generalized element}
%
$S$}.
\end{defn}
`Generalized element' is nothing more than a synonym of `map', but
sometimes it is useful to think of maps as generalized elements.
For example, when $A$ is a set, a generalized element of $A$ of shape $1$
is an ordinary element of $A$, and a generalized element of $A$ of shape
$\nat$ is a sequence%
%
\index{sequence}
%
in $A$. In the category of topological spaces, the generalized elements of
shape $1$ (the one-point space) are the points, and the generalized
elements of shape $S^1$ (the circle) are, by definition, loops.%
%
\index{loop|(}
%
As this suggests, in categories of geometric objects, we might equally well
say `figures of shape $S$'.
In algebra,%
%
\index{algebra}
%
we are often interested in solutions to equations such as $x^2 + y^2 = 1$.
Perhaps we begin by being particularly interested in solutions in
$\rationals$, but then realize that in order to study rational solutions,
it will be helpful to study solutions in other rings first. (This is often
a fruitful strategy.) Given a ring $A$, a pair $(a, b) \in A \times A$
satisfying $a^2 + b^2 = 1$ amounts to a homomorphism of rings
\[
\integers[x, y]/(x^2 + y^2 - 1) \to A.
%
\index{algebraic geometry}
%
\]
Thus, the solutions to our equation (in any ring) can be seen as the
generalized elements of shape $ \integers[x, y]/(x^2 + y^2 - 1)$.
For an object $S$ of a category $\cat{A}$, the functor
\[
\h^S\from \cat{A} \to \Set
\]
sends an object to its set of generalized elements of shape $S$. The
functoriality tells us that any map $A \to B$ in $\cat{A}$ transforms
$S$-elements of $A$ into $S$-elements of $B$. For example, taking $\cat{A}
= \Tp$ and $S = S^1$, any continuous map $A \to B$ transforms loops in $A$
into loops in $B$.%
%
\index{loop|)}
%
\exs
\begin{question}
Find three examples of representable functors not mentioned above.
\end{question}
\begin{question}
\label{ex:yoneda-conservative}
Let $\cat{A}$ be a locally small category, and let $A, A' \in \cat{A}$ with
$\h_A \iso \h_{A'}$. Prove directly that $A \iso A'$.
\end{question}
\begin{question}
\label{ex:cyclic-rep}
Let $p$ be a prime number. Show that the functor $U_p\from \Grp \to \Set$
defined in Example~\ref{eg:co-reps-seeing} is isomorphic to
$\Grp(\integers/p\integers, \dashbk)$. (To check that there is an
isomorphism of functors~-- that is, a \emph{natural} isomorphism~-- you
will first need to define $U_p$ on maps. There is only one sensible way to
do this.)
\end{question}
\begin{question}
\label{ex:free-ring-one-gen}
Using the result of Exercise~\ref{ex:Zx}\bref{part:Zx-main}, prove that the
forgetful functor $\CRing \to \Set$ is isomorphic to $\CRing(\integers[x],
\dashbk)$, as in Example~\ref{eg:ladj-rep-ring}.
\end{question}
\begin{question}
\label{ex:sierpinski-space}
The \demph{Sierpi\'nski%
%
\index{Sierpi\'nski space}
%
space} is the two-point topological space $S$ in
which one of the singleton subsets is open but the other is not. Prove
that for any topological space $X$, there is a canonical bijection between
the open subsets of $X$ and the continuous maps $X \to S$. Use this to
show that the functor $\oset\from \Tp^\op \to \Set$ of
Example~\ref{eg:contra-rep-sier} is represented by $S$.
\end{question}
\begin{question}
\label{ex:arrows-rep}
Let $M \from \Cat \to \Set$ be the functor that sends a small category
$\cat{A}$ to the set of all maps in $\cat{A}$. Prove that $M$ is
representable.
\end{question}
\begin{question}
\label{ex:adj-nat}
Take locally small categories $\cat{A}$ and $\cat{B}$, and functors
$\oppairi{\cat{A}}{\cat{B}}{F}{G}$. Show that $F$ is left adjoint to $G$
if and only if the two functors
\[
\cat{B}(F(\dashbk), \dashbk),
\
\cat{A}(\dashbk, G(\dashbk))
\from
\cat{A}^\op \times \cat{B} \to \Set
\]
of Remark~\ref{rmk:adj-nat} are naturally isomorphic. (Hint: this
is made easier by using either Exercise~\ref{ex:nat-iso-on-product} or
Exercise~\ref{ex:adj-nat-in-one}.)
\end{question}
\section{The Yoneda lemma}
What do representables see?
Recall from Definition~\ref{defn:presheaf} that functors $\cat{A}^\op \to
\Set$ are sometimes called `presheaves' on $\cat{A}$. So for each $A \in
\cat{A}$ we have a representable presheaf $\h_A$, and we are asking how the
rest of the presheaf category $\pshf{\cat{A}}$ looks from the viewpoint of
$\h_A$. In other words, if $X$ is another presheaf, what are the maps
$\h_A \to X$?
Newcomers to category theory commonly find that the material presented in
this section is where they first get stuck. Typically, the core of the
difficulty is in understanding the question just asked. Let us ask it
again.
We start by fixing a locally small category $\cat{A}$. We then take an
object $A \in \cat{A}$ and a functor $X\from \cat{A}^\op \to \Set$. The
object $A$ gives rise to another functor $\h_A = \cat{A}(\dashbk, A)\from
\cat{A}^\op \to \Set$. The question is: what are the maps $\h_A \to X$?
Since $\h_A$ and $X$ are both objects of the presheaf category
$\pshf{\cat{A}}$, the `maps' concerned are maps in $\pshf{\cat{A}}$. So,
we are asking what natural transformations
%
\begin{equation}
\label{eq:yoneda-transf}
\begin{array}{c}
\xymatrix{
\cat{A}^\op \rtwocell^{\h_A}_{X} &\Set
}
\end{array}
\end{equation}
%
there are. The set of such natural transformations is called
\[
\pshf{\cat{A}}(\h_A, X).
\]
(This is a special case of the notation $\cat{B}(B, B')$ for the set of
maps $B \to B'$ in a category $\cat{B}$. Here, $\cat{B} = \pshf{\cat{A}}$,
$B = \h_A$, and $B' = X$.) We want to know what this set is.
There is an informal principle%
%