Metamath Proof Explorer


Theorem yoneda

Description: The Yoneda Lemma. There is a natural isomorphism between the functors Z and E , where Z ( F , X ) is the natural transformations from Yon ( X ) = Hom ( - , X ) to F , and E ( F , X ) = F ( X ) is the evaluation functor. Here we need two universes to state the claim: the smaller universe U is used for forming the functor category Q = C op -> SetCat ( U ) , which itself does not (necessarily) live in U but instead is an element of the larger universe V . (If U is a Grothendieck universe, then it will be closed under this "presheaf" operation, and so we can set U = V in this case.) (Contributed by Mario Carneiro, 29-Jan-2017)

Ref Expression
Hypotheses yoneda.y Y = Yon C
yoneda.b B = Base C
yoneda.1 1 ˙ = Id C
yoneda.o O = oppCat C
yoneda.s S = SetCat U
yoneda.t T = SetCat V
yoneda.q Q = O FuncCat S
yoneda.h H = Hom F Q
yoneda.r R = Q × c O FuncCat T
yoneda.e E = O eval F S
yoneda.z Z = H func 1 st Y tpos 2 nd Y func Q 2 nd F O ⟨,⟩ F Q 1 st F O
yoneda.c φ C Cat
yoneda.w φ V W
yoneda.u φ ran Hom 𝑓 C U
yoneda.v φ ran Hom 𝑓 Q U V
yoneda.m M = f O Func S , x B a 1 st Y x O Nat S f a x 1 ˙ x
yoneda.i I = Iso R
Assertion yoneda φ M Z I E

Proof

Step Hyp Ref Expression
1 yoneda.y Y = Yon C
2 yoneda.b B = Base C
3 yoneda.1 1 ˙ = Id C
4 yoneda.o O = oppCat C
5 yoneda.s S = SetCat U
6 yoneda.t T = SetCat V
7 yoneda.q Q = O FuncCat S
8 yoneda.h H = Hom F Q
9 yoneda.r R = Q × c O FuncCat T
10 yoneda.e E = O eval F S
11 yoneda.z Z = H func 1 st Y tpos 2 nd Y func Q 2 nd F O ⟨,⟩ F Q 1 st F O
12 yoneda.c φ C Cat
13 yoneda.w φ V W
14 yoneda.u φ ran Hom 𝑓 C U
15 yoneda.v φ ran Hom 𝑓 Q U V
16 yoneda.m M = f O Func S , x B a 1 st Y x O Nat S f a x 1 ˙ x
17 yoneda.i I = Iso R
18 9 fucbas Q × c O Func T = Base R
19 eqid Inv R = Inv R
20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 yonedalem1 φ Z Q × c O Func T E Q × c O Func T
21 20 simpld φ Z Q × c O Func T
22 funcrcl Z Q × c O Func T Q × c O Cat T Cat
23 21 22 syl φ Q × c O Cat T Cat
24 23 simpld φ Q × c O Cat
25 23 simprd φ T Cat
26 9 24 25 fuccat φ R Cat
27 20 simprd φ E Q × c O Func T
28 eqid f O Func S , x B u 1 st f x y B g y Hom C x x 2 nd f y g u = f O Func S , x B u 1 st f x y B g y Hom C x x 2 nd f y g u
29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 19 28 yonedainv φ M Z Inv R E f O Func S , x B u 1 st f x y B g y Hom C x x 2 nd f y g u
30 18 19 26 21 27 17 29 inviso1 φ M Z I E