Metamath Proof Explorer


Theorem yonedalem22

Description: Lemma for yoneda . (Contributed by Mario Carneiro, 29-Jan-2017)

Ref Expression
Hypotheses yoneda.y Y=YonC
yoneda.b B=BaseC
yoneda.1 1˙=IdC
yoneda.o O=oppCatC
yoneda.s S=SetCatU
yoneda.t T=SetCatV
yoneda.q Q=OFuncCatS
yoneda.h H=HomFQ
yoneda.r R=Q×cOFuncCatT
yoneda.e E=OevalFS
yoneda.z Z=Hfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFO
yoneda.c φCCat
yoneda.w φVW
yoneda.u φranHom𝑓CU
yoneda.v φranHom𝑓QUV
yonedalem21.f φFOFuncS
yonedalem21.x φXB
yonedalem22.g φGOFuncS
yonedalem22.p φPB
yonedalem22.a φAFONatSG
yonedalem22.k φKPHomCX
Assertion yonedalem22 φAFX2ndZGPK=P2ndYXK1stYXF2ndH1stYPGA

Proof

Step Hyp Ref Expression
1 yoneda.y Y=YonC
2 yoneda.b B=BaseC
3 yoneda.1 1˙=IdC
4 yoneda.o O=oppCatC
5 yoneda.s S=SetCatU
6 yoneda.t T=SetCatV
7 yoneda.q Q=OFuncCatS
8 yoneda.h H=HomFQ
9 yoneda.r R=Q×cOFuncCatT
10 yoneda.e E=OevalFS
11 yoneda.z Z=Hfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFO
12 yoneda.c φCCat
13 yoneda.w φVW
14 yoneda.u φranHom𝑓CU
15 yoneda.v φranHom𝑓QUV
16 yonedalem21.f φFOFuncS
17 yonedalem21.x φXB
18 yonedalem22.g φGOFuncS
19 yonedalem22.p φPB
20 yonedalem22.a φAFONatSG
21 yonedalem22.k φKPHomCX
22 11 fveq2i 2ndZ=2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFO
23 22 oveqi FX2ndZGP=FX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGP
24 23 oveqi AFX2ndZGPK=AFX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPK
25 df-ov AFX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPK=FX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK
26 24 25 eqtri AFX2ndZGPK=FX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK
27 eqid Q×cO=Q×cO
28 7 fucbas OFuncS=BaseQ
29 4 2 oppcbas B=BaseO
30 27 28 29 xpcbas OFuncS×B=BaseQ×cO
31 eqid 1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFO=1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFO
32 eqid oppCatQ×cQ=oppCatQ×cQ
33 4 oppccat CCatOCat
34 12 33 syl φOCat
35 15 unssbd φUV
36 13 35 ssexd φUV
37 5 setccat UVSCat
38 36 37 syl φSCat
39 7 34 38 fuccat φQCat
40 eqid Q2ndFO=Q2ndFO
41 27 39 34 40 2ndfcl φQ2ndFOQ×cOFuncO
42 eqid oppCatQ=oppCatQ
43 relfunc RelCFuncQ
44 1 12 4 5 7 36 14 yoncl φYCFuncQ
45 1st2ndbr RelCFuncQYCFuncQ1stYCFuncQ2ndY
46 43 44 45 sylancr φ1stYCFuncQ2ndY
47 4 42 46 funcoppc φ1stYOFuncoppCatQtpos2ndY
48 df-br 1stYOFuncoppCatQtpos2ndY1stYtpos2ndYOFuncoppCatQ
49 47 48 sylib φ1stYtpos2ndYOFuncoppCatQ
50 41 49 cofucl φ1stYtpos2ndYfuncQ2ndFOQ×cOFuncoppCatQ
51 eqid Q1stFO=Q1stFO
52 27 39 34 51 1stfcl φQ1stFOQ×cOFuncQ
53 31 32 50 52 prfcl φ1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOQ×cOFuncoppCatQ×cQ
54 15 unssad φranHom𝑓QV
55 8 42 6 39 13 54 hofcl φHoppCatQ×cQFuncT
56 16 17 opelxpd φFXOFuncS×B
57 18 19 opelxpd φGPOFuncS×B
58 eqid HomQ×cO=HomQ×cO
59 eqid HomC=HomC
60 59 4 oppchom XHomOP=PHomCX
61 21 60 eleqtrrdi φKXHomOP
62 20 61 opelxpd φAKFONatSG×XHomOP
63 eqid ONatS=ONatS
64 7 63 fuchom ONatS=HomQ
65 eqid HomO=HomO
66 27 28 29 64 65 16 17 18 19 58 xpchom2 φFXHomQ×cOGP=FONatSG×XHomOP
67 62 66 eleqtrrd φAKFXHomQ×cOGP
68 30 53 55 56 57 58 67 cofu2 φFX2ndHfunc1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK=1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX2ndH1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK
69 26 68 eqtrid φAFX2ndZGPK=1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX2ndH1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK
70 31 30 58 50 52 56 prf1 φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX=1st1stYtpos2ndYfuncQ2ndFOFX1stQ1stFOFX
71 30 41 49 56 cofu1 φ1st1stYtpos2ndYfuncQ2ndFOFX=1st1stYtpos2ndY1stQ2ndFOFX
72 fvex 1stYV
73 fvex 2ndYV
74 73 tposex tpos2ndYV
75 72 74 op1st 1st1stYtpos2ndY=1stY
76 75 a1i φ1st1stYtpos2ndY=1stY
77 27 30 58 39 34 40 56 2ndf1 φ1stQ2ndFOFX=2ndFX
78 op2ndg FOFuncSXB2ndFX=X
79 16 17 78 syl2anc φ2ndFX=X
80 77 79 eqtrd φ1stQ2ndFOFX=X
81 76 80 fveq12d φ1st1stYtpos2ndY1stQ2ndFOFX=1stYX
82 71 81 eqtrd φ1st1stYtpos2ndYfuncQ2ndFOFX=1stYX
83 27 30 58 39 34 51 56 1stf1 φ1stQ1stFOFX=1stFX
84 op1stg FOFuncSXB1stFX=F
85 16 17 84 syl2anc φ1stFX=F
86 83 85 eqtrd φ1stQ1stFOFX=F
87 82 86 opeq12d φ1st1stYtpos2ndYfuncQ2ndFOFX1stQ1stFOFX=1stYXF
88 70 87 eqtrd φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX=1stYXF
89 31 30 58 50 52 57 prf1 φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGP=1st1stYtpos2ndYfuncQ2ndFOGP1stQ1stFOGP
90 30 41 49 57 cofu1 φ1st1stYtpos2ndYfuncQ2ndFOGP=1st1stYtpos2ndY1stQ2ndFOGP
91 27 30 58 39 34 40 57 2ndf1 φ1stQ2ndFOGP=2ndGP
92 op2ndg GOFuncSPB2ndGP=P
93 18 19 92 syl2anc φ2ndGP=P
94 91 93 eqtrd φ1stQ2ndFOGP=P
95 76 94 fveq12d φ1st1stYtpos2ndY1stQ2ndFOGP=1stYP
96 90 95 eqtrd φ1st1stYtpos2ndYfuncQ2ndFOGP=1stYP
97 27 30 58 39 34 51 57 1stf1 φ1stQ1stFOGP=1stGP
98 op1stg GOFuncSPB1stGP=G
99 18 19 98 syl2anc φ1stGP=G
100 97 99 eqtrd φ1stQ1stFOGP=G
101 96 100 opeq12d φ1st1stYtpos2ndYfuncQ2ndFOGP1stQ1stFOGP=1stYPG
102 89 101 eqtrd φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGP=1stYPG
103 88 102 oveq12d φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX2ndH1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGP=1stYXF2ndH1stYPG
104 31 30 58 50 52 56 57 67 prf2 φFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK=FX2nd1stYtpos2ndYfuncQ2ndFOGPAKFX2ndQ1stFOGPAK
105 30 41 49 56 57 58 67 cofu2 φFX2nd1stYtpos2ndYfuncQ2ndFOGPAK=1stQ2ndFOFX2nd1stYtpos2ndY1stQ2ndFOGPFX2ndQ2ndFOGPAK
106 72 74 op2nd 2nd1stYtpos2ndY=tpos2ndY
107 106 oveqi 1stQ2ndFOFX2nd1stYtpos2ndY1stQ2ndFOGP=1stQ2ndFOFXtpos2ndY1stQ2ndFOGP
108 ovtpos 1stQ2ndFOFXtpos2ndY1stQ2ndFOGP=1stQ2ndFOGP2ndY1stQ2ndFOFX
109 107 108 eqtri 1stQ2ndFOFX2nd1stYtpos2ndY1stQ2ndFOGP=1stQ2ndFOGP2ndY1stQ2ndFOFX
110 94 80 oveq12d φ1stQ2ndFOGP2ndY1stQ2ndFOFX=P2ndYX
111 109 110 eqtrid φ1stQ2ndFOFX2nd1stYtpos2ndY1stQ2ndFOGP=P2ndYX
112 27 30 58 39 34 40 56 57 2ndf2 φFX2ndQ2ndFOGP=2ndFXHomQ×cOGP
113 112 fveq1d φFX2ndQ2ndFOGPAK=2ndFXHomQ×cOGPAK
114 67 fvresd φ2ndFXHomQ×cOGPAK=2ndAK
115 op2ndg AFONatSGKPHomCX2ndAK=K
116 20 21 115 syl2anc φ2ndAK=K
117 113 114 116 3eqtrd φFX2ndQ2ndFOGPAK=K
118 111 117 fveq12d φ1stQ2ndFOFX2nd1stYtpos2ndY1stQ2ndFOGPFX2ndQ2ndFOGPAK=P2ndYXK
119 105 118 eqtrd φFX2nd1stYtpos2ndYfuncQ2ndFOGPAK=P2ndYXK
120 27 30 58 39 34 51 56 57 1stf2 φFX2ndQ1stFOGP=1stFXHomQ×cOGP
121 120 fveq1d φFX2ndQ1stFOGPAK=1stFXHomQ×cOGPAK
122 67 fvresd φ1stFXHomQ×cOGPAK=1stAK
123 op1stg AFONatSGKPHomCX1stAK=A
124 20 21 123 syl2anc φ1stAK=A
125 121 122 124 3eqtrd φFX2ndQ1stFOGPAK=A
126 119 125 opeq12d φFX2nd1stYtpos2ndYfuncQ2ndFOGPAKFX2ndQ1stFOGPAK=P2ndYXKA
127 104 126 eqtrd φFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK=P2ndYXKA
128 103 127 fveq12d φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX2ndH1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK=1stYXF2ndH1stYPGP2ndYXKA
129 df-ov P2ndYXK1stYXF2ndH1stYPGA=1stYXF2ndH1stYPGP2ndYXKA
130 128 129 eqtr4di φ1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOFX2ndH1st1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPFX2nd1stYtpos2ndYfuncQ2ndFO⟨,⟩FQ1stFOGPAK=P2ndYXK1stYXF2ndH1stYPGA
131 69 130 eqtrd φAFX2ndZGPK=P2ndYXK1stYXF2ndH1stYPGA