Metamath Proof Explorer


Theorem hofval

Description: Value of the Hom functor, which is a bifunctor (a functor of two arguments), contravariant in the first argument and covariant in the second, from ( oppCatC ) X. C to SetCat , whose object part is the hom-function Hom , and with morphism part given by pre- and post-composition. (Contributed by Mario Carneiro, 15-Jan-2017)

Ref Expression
Hypotheses hofval.m M = Hom F C
hofval.c φ C Cat
hofval.b B = Base C
hofval.h H = Hom C
hofval.o · ˙ = comp C
Assertion hofval φ M = Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f

Proof

Step Hyp Ref Expression
1 hofval.m M = Hom F C
2 hofval.c φ C Cat
3 hofval.b B = Base C
4 hofval.h H = Hom C
5 hofval.o · ˙ = comp C
6 df-hof Hom F = c Cat Hom 𝑓 c Base c / b x b × b , y b × b f 1 st y Hom c 1 st x , g 2 nd x Hom c 2 nd y h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f
7 simpr φ c = C c = C
8 7 fveq2d φ c = C Hom 𝑓 c = Hom 𝑓 C
9 fvexd φ c = C Base c V
10 7 fveq2d φ c = C Base c = Base C
11 10 3 eqtr4di φ c = C Base c = B
12 simpr φ c = C b = B b = B
13 12 sqxpeqd φ c = C b = B b × b = B × B
14 simplr φ c = C b = B c = C
15 14 fveq2d φ c = C b = B Hom c = Hom C
16 15 4 eqtr4di φ c = C b = B Hom c = H
17 16 oveqd φ c = C b = B 1 st y Hom c 1 st x = 1 st y H 1 st x
18 16 oveqd φ c = C b = B 2 nd x Hom c 2 nd y = 2 nd x H 2 nd y
19 16 fveq1d φ c = C b = B Hom c x = H x
20 14 fveq2d φ c = C b = B comp c = comp C
21 20 5 eqtr4di φ c = C b = B comp c = · ˙
22 21 oveqd φ c = C b = B 1 st y 1 st x comp c 2 nd y = 1 st y 1 st x · ˙ 2 nd y
23 21 oveqd φ c = C b = B x comp c 2 nd y = x · ˙ 2 nd y
24 23 oveqd φ c = C b = B g x comp c 2 nd y h = g x · ˙ 2 nd y h
25 eqidd φ c = C b = B f = f
26 22 24 25 oveq123d φ c = C b = B g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
27 19 26 mpteq12dv φ c = C b = B h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
28 17 18 27 mpoeq123dv φ c = C b = B f 1 st y Hom c 1 st x , g 2 nd x Hom c 2 nd y h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
29 13 13 28 mpoeq123dv φ c = C b = B x b × b , y b × b f 1 st y Hom c 1 st x , g 2 nd x Hom c 2 nd y h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
30 9 11 29 csbied2 φ c = C Base c / b x b × b , y b × b f 1 st y Hom c 1 st x , g 2 nd x Hom c 2 nd y h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
31 8 30 opeq12d φ c = C Hom 𝑓 c Base c / b x b × b , y b × b f 1 st y Hom c 1 st x , g 2 nd x Hom c 2 nd y h Hom c x g x comp c 2 nd y h 1 st y 1 st x comp c 2 nd y f = Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
32 opex Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f V
33 32 a1i φ Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f V
34 6 31 2 33 fvmptd2 φ Hom F C = Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f
35 1 34 eqtrid φ M = Hom 𝑓 C x B × B , y B × B f 1 st y H 1 st x , g 2 nd x H 2 nd y h H x g x · ˙ 2 nd y h 1 st y 1 st x · ˙ 2 nd y f