MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  hofval Structured version   Unicode version

Theorem hofval 15173
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  (oppCat `  C )  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.)
Hypotheses
Ref Expression
hofval.m  |-  M  =  (HomF
`  C )
hofval.c  |-  ( ph  ->  C  e.  Cat )
hofval.b  |-  B  =  ( Base `  C
)
hofval.h  |-  H  =  ( Hom  `  C
)
hofval.o  |-  .x.  =  (comp `  C )
Assertion
Ref Expression
hofval  |-  ( ph  ->  M  =  <. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B )  |->  ( f  e.  ( ( 1st `  y ) H ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y ) )  |->  ( h  e.  ( H `  x
)  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) ( <.
( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >. )
Distinct variable groups:    f, g, h, x, y, B    ph, f,
g, h, x, y    C, f, g, h, x, y    f, H, g, h, x, y    .x. , f,
g, h, x, y
Allowed substitution hints:    M( x, y, f, g, h)

Proof of Theorem hofval
Dummy variables  b 
c are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 hofval.m . 2  |-  M  =  (HomF
`  C )
2 df-hof 15171 . . . 4  |- HomF  =  ( c  e.  Cat  |->  <. ( Hom f  `  c ) ,  [_ ( Base `  c )  /  b ]_ ( x  e.  ( b  X.  b ) ,  y  e.  ( b  X.  b ) 
|->  ( f  e.  ( ( 1st `  y
) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) ) ) >.
)
32a1i 11 . . 3  |-  ( ph  -> HomF  =  ( c  e.  Cat  |->  <. ( Hom f  `  c ) , 
[_ ( Base `  c
)  /  b ]_ ( x  e.  (
b  X.  b ) ,  y  e.  ( b  X.  b ) 
|->  ( f  e.  ( ( 1st `  y
) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) ) ) >.
) )
4 simpr 461 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  c  =  C )
54fveq2d 5796 . . . 4  |-  ( (
ph  /\  c  =  C )  ->  ( Hom f  `  c )  =  ( Hom f  `  C ) )
6 fvex 5802 . . . . . 6  |-  ( Base `  c )  e.  _V
76a1i 11 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  e. 
_V )
84fveq2d 5796 . . . . . 6  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  =  ( Base `  C
) )
9 hofval.b . . . . . 6  |-  B  =  ( Base `  C
)
108, 9syl6eqr 2510 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  =  B )
11 simpr 461 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  b  =  B )
1211, 11xpeq12d 4966 . . . . . 6  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
b  X.  b )  =  ( B  X.  B ) )
13 simplr 754 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  c  =  C )
1413fveq2d 5796 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( Hom  `  c )  =  ( Hom  `  C
) )
15 hofval.h . . . . . . . . 9  |-  H  =  ( Hom  `  C
)
1614, 15syl6eqr 2510 . . . . . . . 8  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( Hom  `  c )  =  H )
1716oveqd 6210 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( 1st `  y
) ( Hom  `  c
) ( 1st `  x
) )  =  ( ( 1st `  y
) H ( 1st `  x ) ) )
1816oveqd 6210 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( 2nd `  x
) ( Hom  `  c
) ( 2nd `  y
) )  =  ( ( 2nd `  x
) H ( 2nd `  y ) ) )
1916fveq1d 5794 . . . . . . . 8  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( Hom  `  c ) `
 x )  =  ( H `  x
) )
2013fveq2d 5796 . . . . . . . . . . 11  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (comp `  c )  =  (comp `  C ) )
21 hofval.o . . . . . . . . . . 11  |-  .x.  =  (comp `  C )
2220, 21syl6eqr 2510 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (comp `  c )  =  .x.  )
2322oveqd 6210 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( <. ( 1st `  y
) ,  ( 1st `  x ) >. (comp `  c ) ( 2nd `  y ) )  =  ( <. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) )
2422oveqd 6210 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
x (comp `  c
) ( 2nd `  y
) )  =  ( x  .x.  ( 2nd `  y ) ) )
2524oveqd 6210 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
g ( x (comp `  c ) ( 2nd `  y ) ) h )  =  ( g ( x  .x.  ( 2nd `  y ) ) h ) )
26 eqidd 2452 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  f  =  f )
2723, 25, 26oveq123d 6214 . . . . . . . 8  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( g ( x (comp `  c )
( 2nd `  y
) ) h ) ( <. ( 1st `  y
) ,  ( 1st `  x ) >. (comp `  c ) ( 2nd `  y ) ) f )  =  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) )
2819, 27mpteq12dv 4471 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) )  =  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) )
2917, 18, 28mpt2eq123dv 6250 . . . . . 6  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
f  e.  ( ( 1st `  y ) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) )  =  ( f  e.  ( ( 1st `  y ) H ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y ) )  |->  ( h  e.  ( H `  x
)  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) ( <.
( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) )
3012, 12, 29mpt2eq123dv 6250 . . . . 5  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
x  e.  ( b  X.  b ) ,  y  e.  ( b  X.  b )  |->  ( f  e.  ( ( 1st `  y ) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) ) )  =  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B ) 
|->  ( f  e.  ( ( 1st `  y
) H ( 1st `  x ) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y
) )  |->  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) )
317, 10, 30csbied2 3416 . . . 4  |-  ( (
ph  /\  c  =  C )  ->  [_ ( Base `  c )  / 
b ]_ ( x  e.  ( b  X.  b
) ,  y  e.  ( b  X.  b
)  |->  ( f  e.  ( ( 1st `  y
) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) ) )  =  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B ) 
|->  ( f  e.  ( ( 1st `  y
) H ( 1st `  x ) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y
) )  |->  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) )
325, 31opeq12d 4168 . . 3  |-  ( (
ph  /\  c  =  C )  ->  <. ( Hom f  `  c ) ,  [_ ( Base `  c )  /  b ]_ (
x  e.  ( b  X.  b ) ,  y  e.  ( b  X.  b )  |->  ( f  e.  ( ( 1st `  y ) ( Hom  `  c
) ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) ( Hom  `  c ) ( 2nd `  y ) )  |->  ( h  e.  ( ( Hom  `  c ) `  x )  |->  ( ( g ( x (comp `  c ) ( 2nd `  y ) ) h ) ( <. ( 1st `  y ) ,  ( 1st `  x
) >. (comp `  c
) ( 2nd `  y
) ) f ) ) ) ) >.  =  <. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B
) ,  y  e.  ( B  X.  B
)  |->  ( f  e.  ( ( 1st `  y
) H ( 1st `  x ) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y
) )  |->  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >. )
33 hofval.c . . 3  |-  ( ph  ->  C  e.  Cat )
34 opex 4657 . . . 4  |-  <. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B )  |->  ( f  e.  ( ( 1st `  y ) H ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y ) )  |->  ( h  e.  ( H `  x
)  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) ( <.
( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >.  e.  _V
3534a1i 11 . . 3  |-  ( ph  -> 
<. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B ) 
|->  ( f  e.  ( ( 1st `  y
) H ( 1st `  x ) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y
) )  |->  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >.  e.  _V )
363, 32, 33, 35fvmptd 5881 . 2  |-  ( ph  ->  (HomF
`  C )  = 
<. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B ) 
|->  ( f  e.  ( ( 1st `  y
) H ( 1st `  x ) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y
) )  |->  ( h  e.  ( H `  x )  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) (
<. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >. )
371, 36syl5eq 2504 1  |-  ( ph  ->  M  =  <. ( Hom f  `  C ) ,  ( x  e.  ( B  X.  B ) ,  y  e.  ( B  X.  B )  |->  ( f  e.  ( ( 1st `  y ) H ( 1st `  x
) ) ,  g  e.  ( ( 2nd `  x ) H ( 2nd `  y ) )  |->  ( h  e.  ( H `  x
)  |->  ( ( g ( x  .x.  ( 2nd `  y ) ) h ) ( <.
( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) f ) ) ) ) >. )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1370    e. wcel 1758   _Vcvv 3071   [_csb 3389   <.cop 3984    |-> cmpt 4451    X. cxp 4939   ` cfv 5519  (class class class)co 6193    |-> cmpt2 6195   1stc1st 6678   2ndc2nd 6679   Basecbs 14285   Hom chom 14360  compcco 14361   Catccat 14713   Hom f chomf 14715  HomFchof 15169
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-sep 4514  ax-nul 4522  ax-pr 4632
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-ral 2800  df-rex 2801  df-rab 2804  df-v 3073  df-sbc 3288  df-csb 3390  df-dif 3432  df-un 3434  df-in 3436  df-ss 3443  df-nul 3739  df-if 3893  df-sn 3979  df-pr 3981  df-op 3985  df-uni 4193  df-br 4394  df-opab 4452  df-mpt 4453  df-id 4737  df-xp 4947  df-rel 4948  df-cnv 4949  df-co 4950  df-dm 4951  df-iota 5482  df-fun 5521  df-fv 5527  df-ov 6196  df-oprab 6197  df-mpt2 6198  df-hof 15171
This theorem is referenced by:  hof1fval  15174  hof2fval  15176  hofcl  15180  hofpropd  15188
  Copyright terms: Public domain W3C validator