Metamath Proof Explorer


Theorem yoniso

Description: If the codomain is recoverable from a hom-set, then the Yoneda embedding is injective on objects, and hence is an isomorphism from C into a full subcategory of a presheaf category. (Contributed by Mario Carneiro, 30-Jan-2017)

Ref Expression
Hypotheses yoniso.y ⊢ Y = Yon ⁡ C
yoniso.o ⊢ O = oppCat ⁡ C
yoniso.s ⊢ S = SetCat ⁡ U
yoniso.d ⊢ D = CatCat ⁡ V
yoniso.b ⊢ B = Base D
yoniso.i ⊢ I = Iso ⁡ D
yoniso.q ⊢ Q = O FuncCat S
yoniso.e ⊢ E = Q ↾ 𝑠 ran ⁡ 1 st ⁡ Y
yoniso.v ⊢ φ → V ∈ X
yoniso.c ⊢ φ → C ∈ B
yoniso.u ⊢ φ → U ∈ W
yoniso.h ⊢ φ → ran ⁡ Hom 𝑓 ⁡ C ⊆ U
yoniso.eb ⊢ φ → E ∈ B
yoniso.1 ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ x Hom ⁡ C y = y
Assertion yoniso ⊢ φ → Y ∈ C I E

Proof

Step Hyp Ref Expression
1 yoniso.y ⊢ Y = Yon ⁡ C
2 yoniso.o ⊢ O = oppCat ⁡ C
3 yoniso.s ⊢ S = SetCat ⁡ U
4 yoniso.d ⊢ D = CatCat ⁡ V
5 yoniso.b ⊢ B = Base D
6 yoniso.i ⊢ I = Iso ⁡ D
7 yoniso.q ⊢ Q = O FuncCat S
8 yoniso.e ⊢ E = Q ↾ 𝑠 ran ⁡ 1 st ⁡ Y
9 yoniso.v ⊢ φ → V ∈ X
10 yoniso.c ⊢ φ → C ∈ B
11 yoniso.u ⊢ φ → U ∈ W
12 yoniso.h ⊢ φ → ran ⁡ Hom 𝑓 ⁡ C ⊆ U
13 yoniso.eb ⊢ φ → E ∈ B
14 yoniso.1 ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ x Hom ⁡ C y = y
15 relfunc ⊢ Rel ⁡ C Func Q
16 4 5 9 catcbas ⊢ φ → B = V ∩ Cat
17 inss2 ⊢ V ∩ Cat ⊆ Cat
18 16 17 eqsstrdi ⊢ φ → B ⊆ Cat
19 18 10 sseldd ⊢ φ → C ∈ Cat
20 1 19 2 3 7 11 12 yoncl ⊢ φ → Y ∈ C Func Q
21 1st2nd ⊢ Rel ⁡ C Func Q ∧ Y ∈ C Func Q → Y = 1 st ⁡ Y 2 nd ⁡ Y
22 15 20 21 sylancr ⊢ φ → Y = 1 st ⁡ Y 2 nd ⁡ Y
23 1 2 3 7 19 11 12 yonffth ⊢ φ → Y ∈ C Full Q ∩ C Faith Q
24 22 23 eqeltrrd ⊢ φ → 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full Q ∩ C Faith Q
25 eqid ⊢ Base C = Base C
26 2 oppccat ⊢ C ∈ Cat → O ∈ Cat
27 19 26 syl ⊢ φ → O ∈ Cat
28 3 setccat ⊢ U ∈ W → S ∈ Cat
29 11 28 syl ⊢ φ → S ∈ Cat
30 7 27 29 fuccat ⊢ φ → Q ∈ Cat
31 fvex ⊢ 1 st ⁡ Y ∈ V
32 31 rnex ⊢ ran ⁡ 1 st ⁡ Y ∈ V
33 32 a1i ⊢ φ → ran ⁡ 1 st ⁡ Y ∈ V
34 7 fucbas ⊢ O Func S = Base Q
35 1st2ndbr ⊢ Rel ⁡ C Func Q ∧ Y ∈ C Func Q → 1 st ⁡ Y C Func Q 2 nd ⁡ Y
36 15 20 35 sylancr ⊢ φ → 1 st ⁡ Y C Func Q 2 nd ⁡ Y
37 25 34 36 funcf1 ⊢ φ → 1 st ⁡ Y : Base C ⟶ O Func S
38 37 ffnd ⊢ φ → 1 st ⁡ Y Fn Base C
39 dffn3 ⊢ 1 st ⁡ Y Fn Base C ↔ 1 st ⁡ Y : Base C ⟶ ran ⁡ 1 st ⁡ Y
40 38 39 sylib ⊢ φ → 1 st ⁡ Y : Base C ⟶ ran ⁡ 1 st ⁡ Y
41 25 8 30 33 40 ffthres2c ⊢ φ → 1 st ⁡ Y C Full Q ∩ C Faith Q 2 nd ⁡ Y ↔ 1 st ⁡ Y C Full E ∩ C Faith E 2 nd ⁡ Y
42 df-br ⊢ 1 st ⁡ Y C Full Q ∩ C Faith Q 2 nd ⁡ Y ↔ 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full Q ∩ C Faith Q
43 df-br ⊢ 1 st ⁡ Y C Full E ∩ C Faith E 2 nd ⁡ Y ↔ 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full E ∩ C Faith E
44 41 42 43 3bitr3g ⊢ φ → 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full Q ∩ C Faith Q ↔ 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full E ∩ C Faith E
45 24 44 mpbid ⊢ φ → 1 st ⁡ Y 2 nd ⁡ Y ∈ C Full E ∩ C Faith E
46 22 45 eqeltrd ⊢ φ → Y ∈ C Full E ∩ C Faith E
47 fveq2 ⊢ 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → 1 st ⁡ 1 st ⁡ Y ⁡ x = 1 st ⁡ 1 st ⁡ Y ⁡ y
48 47 fveq1d ⊢ 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x
49 48 fveq2d ⊢ 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x
50 simpl ⊢ x ∈ Base C ∧ y ∈ Base C → x ∈ Base C
51 50 50 jca ⊢ x ∈ Base C ∧ y ∈ Base C → x ∈ Base C ∧ x ∈ Base C
52 eleq1w ⊢ y = x → y ∈ Base C ↔ x ∈ Base C
53 52 anbi2d ⊢ y = x → x ∈ Base C ∧ y ∈ Base C ↔ x ∈ Base C ∧ x ∈ Base C
54 53 anbi2d ⊢ y = x → φ ∧ x ∈ Base C ∧ y ∈ Base C ↔ φ ∧ x ∈ Base C ∧ x ∈ Base C
55 2fveq3 ⊢ y = x → 1 st ⁡ 1 st ⁡ Y ⁡ y = 1 st ⁡ 1 st ⁡ Y ⁡ x
56 55 fveq1d ⊢ y = x → 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x
57 56 fveq2d ⊢ y = x → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x
58 id ⊢ y = x → y = x
59 57 58 eqeq12d ⊢ y = x → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = y ↔ F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = x
60 54 59 imbi12d ⊢ y = x → φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = y ↔ φ ∧ x ∈ Base C ∧ x ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = x
61 19 adantr ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → C ∈ Cat
62 simprr ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → y ∈ Base C
63 eqid ⊢ Hom ⁡ C = Hom ⁡ C
64 simprl ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → x ∈ Base C
65 1 25 61 62 63 64 yon11 ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = x Hom ⁡ C y
66 65 fveq2d ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = F ⁡ x Hom ⁡ C y
67 66 14 eqtrd ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x = y
68 60 67 chvarvv ⊢ φ ∧ x ∈ Base C ∧ x ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = x
69 51 68 sylan2 ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = x
70 69 67 eqeq12d ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ x ⁡ x = F ⁡ 1 st ⁡ 1 st ⁡ Y ⁡ y ⁡ x ↔ x = y
71 49 70 imbitrid ⊢ φ ∧ x ∈ Base C ∧ y ∈ Base C → 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → x = y
72 71 ralrimivva ⊢ φ → ∀ x ∈ Base C ∀ y ∈ Base C 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → x = y
73 dff13 ⊢ 1 st ⁡ Y : Base C ⟶ 1-1 O Func S ↔ 1 st ⁡ Y : Base C ⟶ O Func S ∧ ∀ x ∈ Base C ∀ y ∈ Base C 1 st ⁡ Y ⁡ x = 1 st ⁡ Y ⁡ y → x = y
74 37 72 73 sylanbrc ⊢ φ → 1 st ⁡ Y : Base C ⟶ 1-1 O Func S
75 f1f1orn ⊢ 1 st ⁡ Y : Base C ⟶ 1-1 O Func S → 1 st ⁡ Y : Base C ⟶ 1-1 onto ran ⁡ 1 st ⁡ Y
76 74 75 syl ⊢ φ → 1 st ⁡ Y : Base C ⟶ 1-1 onto ran ⁡ 1 st ⁡ Y
77 37 frnd ⊢ φ → ran ⁡ 1 st ⁡ Y ⊆ O Func S
78 8 34 ressbas2 ⊢ ran ⁡ 1 st ⁡ Y ⊆ O Func S → ran ⁡ 1 st ⁡ Y = Base E
79 77 78 syl ⊢ φ → ran ⁡ 1 st ⁡ Y = Base E
80 79 f1oeq3d ⊢ φ → 1 st ⁡ Y : Base C ⟶ 1-1 onto ran ⁡ 1 st ⁡ Y ↔ 1 st ⁡ Y : Base C ⟶ 1-1 onto Base E
81 76 80 mpbid ⊢ φ → 1 st ⁡ Y : Base C ⟶ 1-1 onto Base E
82 eqid ⊢ Base E = Base E
83 4 5 25 82 9 10 13 6 catciso ⊢ φ → Y ∈ C I E ↔ Y ∈ C Full E ∩ C Faith E ∧ 1 st ⁡ Y : Base C ⟶ 1-1 onto Base E
84 46 81 83 mpbir2and ⊢ φ → Y ∈ C I E