Metamath Proof Explorer


Theorem yonedalem3a

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

Ref Expression
Hypotheses yoneda.y 𝑌 = ( Yon ‘ 𝐶 )
yoneda.b 𝐵 = ( Base ‘ 𝐶 )
yoneda.1 1 = ( Id ‘ 𝐶 )
yoneda.o 𝑂 = ( oppCat ‘ 𝐶 )
yoneda.s 𝑆 = ( SetCat ‘ 𝑈 )
yoneda.t 𝑇 = ( SetCat ‘ 𝑉 )
yoneda.q 𝑄 = ( 𝑂 FuncCat 𝑆 )
yoneda.h 𝐻 = ( HomF𝑄 )
yoneda.r 𝑅 = ( ( 𝑄 ×c 𝑂 ) FuncCat 𝑇 )
yoneda.e 𝐸 = ( 𝑂 evalF 𝑆 )
yoneda.z 𝑍 = ( 𝐻func ( ( ⟨ ( 1st𝑌 ) , tpos ( 2nd𝑌 ) ⟩ ∘func ( 𝑄 2ndF 𝑂 ) ) ⟨,⟩F ( 𝑄 1stF 𝑂 ) ) )
yoneda.c ( 𝜑𝐶 ∈ Cat )
yoneda.w ( 𝜑𝑉𝑊 )
yoneda.u ( 𝜑 → ran ( Homf𝐶 ) ⊆ 𝑈 )
yoneda.v ( 𝜑 → ( ran ( Homf𝑄 ) ∪ 𝑈 ) ⊆ 𝑉 )
yonedalem21.f ( 𝜑𝐹 ∈ ( 𝑂 Func 𝑆 ) )
yonedalem21.x ( 𝜑𝑋𝐵 )
yonedalem3a.m 𝑀 = ( 𝑓 ∈ ( 𝑂 Func 𝑆 ) , 𝑥𝐵 ↦ ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑥 ) ( 𝑂 Nat 𝑆 ) 𝑓 ) ↦ ( ( 𝑎𝑥 ) ‘ ( 1𝑥 ) ) ) )
Assertion yonedalem3a ( 𝜑 → ( ( 𝐹 𝑀 𝑋 ) = ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) ∧ ( 𝐹 𝑀 𝑋 ) : ( 𝐹 ( 1st𝑍 ) 𝑋 ) ⟶ ( 𝐹 ( 1st𝐸 ) 𝑋 ) ) )

Proof

Step Hyp Ref Expression
1 yoneda.y 𝑌 = ( Yon ‘ 𝐶 )
2 yoneda.b 𝐵 = ( Base ‘ 𝐶 )
3 yoneda.1 1 = ( Id ‘ 𝐶 )
4 yoneda.o 𝑂 = ( oppCat ‘ 𝐶 )
5 yoneda.s 𝑆 = ( SetCat ‘ 𝑈 )
6 yoneda.t 𝑇 = ( SetCat ‘ 𝑉 )
7 yoneda.q 𝑄 = ( 𝑂 FuncCat 𝑆 )
8 yoneda.h 𝐻 = ( HomF𝑄 )
9 yoneda.r 𝑅 = ( ( 𝑄 ×c 𝑂 ) FuncCat 𝑇 )
10 yoneda.e 𝐸 = ( 𝑂 evalF 𝑆 )
11 yoneda.z 𝑍 = ( 𝐻func ( ( ⟨ ( 1st𝑌 ) , tpos ( 2nd𝑌 ) ⟩ ∘func ( 𝑄 2ndF 𝑂 ) ) ⟨,⟩F ( 𝑄 1stF 𝑂 ) ) )
12 yoneda.c ( 𝜑𝐶 ∈ Cat )
13 yoneda.w ( 𝜑𝑉𝑊 )
14 yoneda.u ( 𝜑 → ran ( Homf𝐶 ) ⊆ 𝑈 )
15 yoneda.v ( 𝜑 → ( ran ( Homf𝑄 ) ∪ 𝑈 ) ⊆ 𝑉 )
16 yonedalem21.f ( 𝜑𝐹 ∈ ( 𝑂 Func 𝑆 ) )
17 yonedalem21.x ( 𝜑𝑋𝐵 )
18 yonedalem3a.m 𝑀 = ( 𝑓 ∈ ( 𝑂 Func 𝑆 ) , 𝑥𝐵 ↦ ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑥 ) ( 𝑂 Nat 𝑆 ) 𝑓 ) ↦ ( ( 𝑎𝑥 ) ‘ ( 1𝑥 ) ) ) )
19 simpr ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → 𝑥 = 𝑋 )
20 19 fveq2d ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( ( 1st𝑌 ) ‘ 𝑥 ) = ( ( 1st𝑌 ) ‘ 𝑋 ) )
21 simpl ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → 𝑓 = 𝐹 )
22 20 21 oveq12d ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( ( ( 1st𝑌 ) ‘ 𝑥 ) ( 𝑂 Nat 𝑆 ) 𝑓 ) = ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) )
23 19 fveq2d ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( 𝑎𝑥 ) = ( 𝑎𝑋 ) )
24 19 fveq2d ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( 1𝑥 ) = ( 1𝑋 ) )
25 23 24 fveq12d ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( ( 𝑎𝑥 ) ‘ ( 1𝑥 ) ) = ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) )
26 22 25 mpteq12dv ( ( 𝑓 = 𝐹𝑥 = 𝑋 ) → ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑥 ) ( 𝑂 Nat 𝑆 ) 𝑓 ) ↦ ( ( 𝑎𝑥 ) ‘ ( 1𝑥 ) ) ) = ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) )
27 ovex ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ∈ V
28 27 mptex ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) ∈ V
29 26 18 28 ovmpoa ( ( 𝐹 ∈ ( 𝑂 Func 𝑆 ) ∧ 𝑋𝐵 ) → ( 𝐹 𝑀 𝑋 ) = ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) )
30 16 17 29 syl2anc ( 𝜑 → ( 𝐹 𝑀 𝑋 ) = ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) )
31 eqid ( 𝑂 Nat 𝑆 ) = ( 𝑂 Nat 𝑆 )
32 simpr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) )
33 31 32 nat1st2nd ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → 𝑎 ∈ ( ⟨ ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) , ( 2nd ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ⟩ ( 𝑂 Nat 𝑆 ) ⟨ ( 1st𝐹 ) , ( 2nd𝐹 ) ⟩ ) )
34 4 2 oppcbas 𝐵 = ( Base ‘ 𝑂 )
35 eqid ( Hom ‘ 𝑆 ) = ( Hom ‘ 𝑆 )
36 17 adantr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → 𝑋𝐵 )
37 31 33 34 35 36 natcl ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( 𝑎𝑋 ) ∈ ( ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ( Hom ‘ 𝑆 ) ( ( 1st𝐹 ) ‘ 𝑋 ) ) )
38 15 unssbd ( 𝜑𝑈𝑉 )
39 13 38 ssexd ( 𝜑𝑈 ∈ V )
40 39 adantr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → 𝑈 ∈ V )
41 eqid ( Base ‘ 𝑆 ) = ( Base ‘ 𝑆 )
42 relfunc Rel ( 𝑂 Func 𝑆 )
43 1 2 12 17 4 5 39 14 yon1cl ( 𝜑 → ( ( 1st𝑌 ) ‘ 𝑋 ) ∈ ( 𝑂 Func 𝑆 ) )
44 1st2ndbr ( ( Rel ( 𝑂 Func 𝑆 ) ∧ ( ( 1st𝑌 ) ‘ 𝑋 ) ∈ ( 𝑂 Func 𝑆 ) ) → ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ( 𝑂 Func 𝑆 ) ( 2nd ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) )
45 42 43 44 sylancr ( 𝜑 → ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ( 𝑂 Func 𝑆 ) ( 2nd ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) )
46 34 41 45 funcf1 ( 𝜑 → ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) : 𝐵 ⟶ ( Base ‘ 𝑆 ) )
47 46 17 ffvelrnd ( 𝜑 → ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ∈ ( Base ‘ 𝑆 ) )
48 5 39 setcbas ( 𝜑𝑈 = ( Base ‘ 𝑆 ) )
49 47 48 eleqtrrd ( 𝜑 → ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ∈ 𝑈 )
50 49 adantr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ∈ 𝑈 )
51 1st2ndbr ( ( Rel ( 𝑂 Func 𝑆 ) ∧ 𝐹 ∈ ( 𝑂 Func 𝑆 ) ) → ( 1st𝐹 ) ( 𝑂 Func 𝑆 ) ( 2nd𝐹 ) )
52 42 16 51 sylancr ( 𝜑 → ( 1st𝐹 ) ( 𝑂 Func 𝑆 ) ( 2nd𝐹 ) )
53 34 41 52 funcf1 ( 𝜑 → ( 1st𝐹 ) : 𝐵 ⟶ ( Base ‘ 𝑆 ) )
54 53 17 ffvelrnd ( 𝜑 → ( ( 1st𝐹 ) ‘ 𝑋 ) ∈ ( Base ‘ 𝑆 ) )
55 54 48 eleqtrrd ( 𝜑 → ( ( 1st𝐹 ) ‘ 𝑋 ) ∈ 𝑈 )
56 55 adantr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( ( 1st𝐹 ) ‘ 𝑋 ) ∈ 𝑈 )
57 5 40 35 50 56 elsetchom ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( ( 𝑎𝑋 ) ∈ ( ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ( Hom ‘ 𝑆 ) ( ( 1st𝐹 ) ‘ 𝑋 ) ) ↔ ( 𝑎𝑋 ) : ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ⟶ ( ( 1st𝐹 ) ‘ 𝑋 ) ) )
58 37 57 mpbid ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( 𝑎𝑋 ) : ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) ⟶ ( ( 1st𝐹 ) ‘ 𝑋 ) )
59 eqid ( Hom ‘ 𝐶 ) = ( Hom ‘ 𝐶 )
60 2 59 3 12 17 catidcl ( 𝜑 → ( 1𝑋 ) ∈ ( 𝑋 ( Hom ‘ 𝐶 ) 𝑋 ) )
61 1 2 12 17 59 17 yon11 ( 𝜑 → ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) = ( 𝑋 ( Hom ‘ 𝐶 ) 𝑋 ) )
62 60 61 eleqtrrd ( 𝜑 → ( 1𝑋 ) ∈ ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) )
63 62 adantr ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( 1𝑋 ) ∈ ( ( 1st ‘ ( ( 1st𝑌 ) ‘ 𝑋 ) ) ‘ 𝑋 ) )
64 58 63 ffvelrnd ( ( 𝜑𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ) → ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ∈ ( ( 1st𝐹 ) ‘ 𝑋 ) )
65 64 fmpttd ( 𝜑 → ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) : ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ⟶ ( ( 1st𝐹 ) ‘ 𝑋 ) )
66 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 yonedalem21 ( 𝜑 → ( 𝐹 ( 1st𝑍 ) 𝑋 ) = ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) )
67 4 oppccat ( 𝐶 ∈ Cat → 𝑂 ∈ Cat )
68 12 67 syl ( 𝜑𝑂 ∈ Cat )
69 5 setccat ( 𝑈 ∈ V → 𝑆 ∈ Cat )
70 39 69 syl ( 𝜑𝑆 ∈ Cat )
71 10 68 70 34 16 17 evlf1 ( 𝜑 → ( 𝐹 ( 1st𝐸 ) 𝑋 ) = ( ( 1st𝐹 ) ‘ 𝑋 ) )
72 30 66 71 feq123d ( 𝜑 → ( ( 𝐹 𝑀 𝑋 ) : ( 𝐹 ( 1st𝑍 ) 𝑋 ) ⟶ ( 𝐹 ( 1st𝐸 ) 𝑋 ) ↔ ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) : ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ⟶ ( ( 1st𝐹 ) ‘ 𝑋 ) ) )
73 65 72 mpbird ( 𝜑 → ( 𝐹 𝑀 𝑋 ) : ( 𝐹 ( 1st𝑍 ) 𝑋 ) ⟶ ( 𝐹 ( 1st𝐸 ) 𝑋 ) )
74 30 73 jca ( 𝜑 → ( ( 𝐹 𝑀 𝑋 ) = ( 𝑎 ∈ ( ( ( 1st𝑌 ) ‘ 𝑋 ) ( 𝑂 Nat 𝑆 ) 𝐹 ) ↦ ( ( 𝑎𝑋 ) ‘ ( 1𝑋 ) ) ) ∧ ( 𝐹 𝑀 𝑋 ) : ( 𝐹 ( 1st𝑍 ) 𝑋 ) ⟶ ( 𝐹 ( 1st𝐸 ) 𝑋 ) ) )