Metamath Proof Explorer


Theorem catcfuccl

Description: The category of categories for a weak universe is closed under the functor category operation. (Contributed by Mario Carneiro, 12-Jan-2017) (Proof shortened by AV, 14-Oct-2024)

Ref Expression
Hypotheses catcfuccl.c C = CatCat U
catcfuccl.b B = Base C
catcfuccl.o Q = X FuncCat Y
catcfuccl.u φ U WUni
catcfuccl.1 φ ω U
catcfuccl.x φ X B
catcfuccl.y φ Y B
Assertion catcfuccl φ Q B

Proof

Step Hyp Ref Expression
1 catcfuccl.c C = CatCat U
2 catcfuccl.b B = Base C
3 catcfuccl.o Q = X FuncCat Y
4 catcfuccl.u φ U WUni
5 catcfuccl.1 φ ω U
6 catcfuccl.x φ X B
7 catcfuccl.y φ Y B
8 eqid X Func Y = X Func Y
9 eqid X Nat Y = X Nat Y
10 eqid Base X = Base X
11 eqid comp Y = comp Y
12 1 2 4 catcbas φ B = U Cat
13 6 12 eleqtrd φ X U Cat
14 13 elin2d φ X Cat
15 7 12 eleqtrd φ Y U Cat
16 15 elin2d φ Y Cat
17 eqidd φ v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x = v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x
18 3 8 9 10 11 14 16 17 fucval φ Q = Base ndx X Func Y Hom ndx X Nat Y comp ndx v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x
19 baseid Base = Slot Base ndx
20 4 5 wunndx φ ndx U
21 19 4 20 wunstr φ Base ndx U
22 1 2 4 6 catcbascl φ X U
23 1 2 4 7 catcbascl φ Y U
24 4 22 23 wunfunc φ X Func Y U
25 4 21 24 wunop φ Base ndx X Func Y U
26 homid Hom = Slot Hom ndx
27 26 4 20 wunstr φ Hom ndx U
28 4 22 23 wunnat φ X Nat Y U
29 4 27 28 wunop φ Hom ndx X Nat Y U
30 ccoid comp = Slot comp ndx
31 30 4 20 wunstr φ comp ndx U
32 4 24 24 wunxp φ X Func Y × X Func Y U
33 4 32 24 wunxp φ X Func Y × X Func Y × X Func Y U
34 1 2 4 7 catcccocl φ comp Y U
35 4 34 wunrn φ ran comp Y U
36 4 35 wununi φ ran comp Y U
37 4 36 wunrn φ ran ran comp Y U
38 4 37 wununi φ ran ran comp Y U
39 4 38 wunpw φ 𝒫 ran ran comp Y U
40 1 2 4 6 catcbaselcl φ Base X U
41 4 39 40 wunmap φ 𝒫 ran ran comp Y Base X U
42 4 28 wunrn φ ran X Nat Y U
43 4 42 wununi φ ran X Nat Y U
44 4 43 43 wunxp φ ran X Nat Y × ran X Nat Y U
45 4 41 44 wunpm φ 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y U
46 fvex 1 st v V
47 fvex 2 nd v V
48 ovex 𝒫 ran ran comp Y Base X V
49 ovex X Nat Y V
50 49 rnex ran X Nat Y V
51 50 uniex ran X Nat Y V
52 51 51 xpex ran X Nat Y × ran X Nat Y V
53 eqid x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x = x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x
54 ovssunirn b x 1 st f x 1 st g x comp Y 1 st h x a x ran 1 st f x 1 st g x comp Y 1 st h x
55 ovssunirn 1 st f x 1 st g x comp Y 1 st h x ran comp Y
56 rnss 1 st f x 1 st g x comp Y 1 st h x ran comp Y ran 1 st f x 1 st g x comp Y 1 st h x ran ran comp Y
57 uniss ran 1 st f x 1 st g x comp Y 1 st h x ran ran comp Y ran 1 st f x 1 st g x comp Y 1 st h x ran ran comp Y
58 55 56 57 mp2b ran 1 st f x 1 st g x comp Y 1 st h x ran ran comp Y
59 54 58 sstri b x 1 st f x 1 st g x comp Y 1 st h x a x ran ran comp Y
60 ovex b x 1 st f x 1 st g x comp Y 1 st h x a x V
61 60 elpw b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y b x 1 st f x 1 st g x comp Y 1 st h x a x ran ran comp Y
62 59 61 mpbir b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y
63 62 a1i x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y
64 53 63 fmpti x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : Base X 𝒫 ran ran comp Y
65 fvex comp Y V
66 65 rnex ran comp Y V
67 66 uniex ran comp Y V
68 67 rnex ran ran comp Y V
69 68 uniex ran ran comp Y V
70 69 pwex 𝒫 ran ran comp Y V
71 fvex Base X V
72 70 71 elmap x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : Base X 𝒫 ran ran comp Y
73 64 72 mpbir x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X
74 73 rgen2w b g X Nat Y h a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X
75 eqid b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x = b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x
76 75 fmpo b g X Nat Y h a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : g X Nat Y h × f X Nat Y g 𝒫 ran ran comp Y Base X
77 74 76 mpbi b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : g X Nat Y h × f X Nat Y g 𝒫 ran ran comp Y Base X
78 ovssunirn g X Nat Y h ran X Nat Y
79 ovssunirn f X Nat Y g ran X Nat Y
80 xpss12 g X Nat Y h ran X Nat Y f X Nat Y g ran X Nat Y g X Nat Y h × f X Nat Y g ran X Nat Y × ran X Nat Y
81 78 79 80 mp2an g X Nat Y h × f X Nat Y g ran X Nat Y × ran X Nat Y
82 elpm2r 𝒫 ran ran comp Y Base X V ran X Nat Y × ran X Nat Y V b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : g X Nat Y h × f X Nat Y g 𝒫 ran ran comp Y Base X g X Nat Y h × f X Nat Y g ran X Nat Y × ran X Nat Y b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
83 48 52 77 81 82 mp4an b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
84 83 sbcth 2 nd v V [˙ 2 nd v / g]˙ b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
85 sbcel1g 2 nd v V [˙ 2 nd v / g]˙ b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
86 84 85 mpbid 2 nd v V 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
87 47 86 ax-mp 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
88 87 sbcth 1 st v V [˙ 1 st v / f]˙ 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
89 sbcel1g 1 st v V [˙ 1 st v / f]˙ 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
90 88 89 mpbid 1 st v V 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
91 46 90 ax-mp 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
92 91 rgen2w v X Func Y × X Func Y h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
93 eqid v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x = v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x
94 93 fmpo v X Func Y × X Func Y h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : X Func Y × X Func Y × X Func Y 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
95 92 94 mpbi v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : X Func Y × X Func Y × X Func Y 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
96 95 a1i φ v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x : X Func Y × X Func Y × X Func Y 𝒫 ran ran comp Y Base X 𝑝𝑚 ran X Nat Y × ran X Nat Y
97 4 33 45 96 wunf φ v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x U
98 4 31 97 wunop φ comp ndx v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x U
99 4 25 29 98 wuntp φ Base ndx X Func Y Hom ndx X Nat Y comp ndx v X Func Y × X Func Y , h X Func Y 1 st v / f 2 nd v / g b g X Nat Y h , a f X Nat Y g x Base X b x 1 st f x 1 st g x comp Y 1 st h x a x U
100 18 99 eqeltrd φ Q U
101 3 14 16 fuccat φ Q Cat
102 100 101 elind φ Q U Cat
103 102 12 eleqtrrd φ Q B