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

Theorem hofval 16892
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 16890 . . . 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 477 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  c  =  C )
54fveq2d 6195 . . . 4  |-  ( (
ph  /\  c  =  C )  ->  ( Hom f  `  c )  =  ( Hom f  `  C ) )
6 fvexd 6203 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  e. 
_V )
74fveq2d 6195 . . . . . 6  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  =  ( Base `  C
) )
8 hofval.b . . . . . 6  |-  B  =  ( Base `  C
)
97, 8syl6eqr 2674 . . . . 5  |-  ( (
ph  /\  c  =  C )  ->  ( Base `  c )  =  B )
10 simpr 477 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  b  =  B )
1110sqxpeqd 5141 . . . . . 6  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
b  X.  b )  =  ( B  X.  B ) )
12 simplr 792 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  c  =  C )
1312fveq2d 6195 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( Hom  `  c )  =  ( Hom  `  C
) )
14 hofval.h . . . . . . . . 9  |-  H  =  ( Hom  `  C
)
1513, 14syl6eqr 2674 . . . . . . . 8  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( Hom  `  c )  =  H )
1615oveqd 6667 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( 1st `  y
) ( Hom  `  c
) ( 1st `  x
) )  =  ( ( 1st `  y
) H ( 1st `  x ) ) )
1715oveqd 6667 . . . . . . 7  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( 2nd `  x
) ( Hom  `  c
) ( 2nd `  y
) )  =  ( ( 2nd `  x
) H ( 2nd `  y ) ) )
1815fveq1d 6193 . . . . . . . 8  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
( Hom  `  c ) `
 x )  =  ( H `  x
) )
1912fveq2d 6195 . . . . . . . . . . 11  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (comp `  c )  =  (comp `  C ) )
20 hofval.o . . . . . . . . . . 11  |-  .x.  =  (comp `  C )
2119, 20syl6eqr 2674 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (comp `  c )  =  .x.  )
2221oveqd 6667 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  ( <. ( 1st `  y
) ,  ( 1st `  x ) >. (comp `  c ) ( 2nd `  y ) )  =  ( <. ( 1st `  y
) ,  ( 1st `  x ) >.  .x.  ( 2nd `  y ) ) )
2321oveqd 6667 . . . . . . . . . 10  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
x (comp `  c
) ( 2nd `  y
) )  =  ( x  .x.  ( 2nd `  y ) ) )
2423oveqd 6667 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  (
g ( x (comp `  c ) ( 2nd `  y ) ) h )  =  ( g ( x  .x.  ( 2nd `  y ) ) h ) )
25 eqidd 2623 . . . . . . . . 9  |-  ( ( ( ph  /\  c  =  C )  /\  b  =  B )  ->  f  =  f )
2622, 24, 25oveq123d 6671 . . . . . . . 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 ) )
2718, 26mpteq12dv 4733 . . . . . . 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 ) ) )
2816, 17, 27mpt2eq123dv 6717 . . . . . 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 ) ) ) )
2911, 11, 28mpt2eq123dv 6717 . . . . 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 ) ) ) ) )
306, 9, 29csbied2 3561 . . . 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 ) ) ) ) )
315, 30opeq12d 4410 . . 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 ) ) ) ) >. )
32 hofval.c . . 3  |-  ( ph  ->  C  e.  Cat )
33 opex 4932 . . . 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
3433a1i 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 )
353, 31, 32, 34fvmptd 6288 . 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 ) ) ) ) >. )
361, 35syl5eq 2668 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 384    = wceq 1483    e. wcel 1990   _Vcvv 3200   [_csb 3533   <.cop 4183    |-> cmpt 4729    X. cxp 5112   ` cfv 5888  (class class class)co 6650    |-> cmpt2 6652   1stc1st 7166   2ndc2nd 7167   Basecbs 15857   Hom chom 15952  compcco 15953   Catccat 16325   Hom f chomf 16327  HomFchof 16888
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-sep 4781  ax-nul 4789  ax-pr 4906
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ral 2917  df-rex 2918  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-nul 3916  df-if 4087  df-sn 4178  df-pr 4180  df-op 4184  df-uni 4437  df-br 4654  df-opab 4713  df-mpt 4730  df-id 5024  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-iota 5851  df-fun 5890  df-fv 5896  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-hof 16890
This theorem is referenced by:  hof1fval  16893  hof2fval  16895  hofcl  16899  hofpropd  16907
  Copyright terms: Public domain W3C validator