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

Theorem cofuass 16549
Description: Functor composition is associative. (Contributed by Mario Carneiro, 3-Jan-2017.)
Hypotheses
Ref Expression
cofuass.g  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
cofuass.h  |-  ( ph  ->  H  e.  ( D 
Func  E ) )
cofuass.k  |-  ( ph  ->  K  e.  ( E 
Func  F ) )
Assertion
Ref Expression
cofuass  |-  ( ph  ->  ( ( K  o.func  H )  o.func 
G )  =  ( K  o.func  ( H  o.func  G )
) )

Proof of Theorem cofuass
Dummy variables  x  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 coass 5654 . . . 4  |-  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) )
2 eqid 2622 . . . . . 6  |-  ( Base `  D )  =  (
Base `  D )
3 cofuass.h . . . . . 6  |-  ( ph  ->  H  e.  ( D 
Func  E ) )
4 cofuass.k . . . . . 6  |-  ( ph  ->  K  e.  ( E 
Func  F ) )
52, 3, 4cofu1st 16543 . . . . 5  |-  ( ph  ->  ( 1st `  ( K  o.func 
H ) )  =  ( ( 1st `  K
)  o.  ( 1st `  H ) ) )
65coeq1d 5283 . . . 4  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) ) )
7 eqid 2622 . . . . . 6  |-  ( Base `  C )  =  (
Base `  C )
8 cofuass.g . . . . . 6  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
97, 8, 3cofu1st 16543 . . . . 5  |-  ( ph  ->  ( 1st `  ( H  o.func 
G ) )  =  ( ( 1st `  H
)  o.  ( 1st `  G ) ) )
109coeq2d 5284 . . . 4  |-  ( ph  ->  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) ) )
111, 6, 103eqtr4a 2682 . . 3  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) )
12 coass 5654 . . . . 5  |-  ( ( ( ( ( 1st `  H ) `  (
( 1st `  G
) `  x )
) ( 2nd `  K
) ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )  o.  (
( ( 1st `  G
) `  x )
( 2nd `  H
) ( ( 1st `  G ) `  y
) ) )  o.  ( x ( 2nd `  G ) y ) )  =  ( ( ( ( 1st `  H
) `  ( ( 1st `  G ) `  x ) ) ( 2nd `  K ) ( ( 1st `  H
) `  ( ( 1st `  G ) `  y ) ) )  o.  ( ( ( ( 1st `  G
) `  x )
( 2nd `  H
) ( ( 1st `  G ) `  y
) )  o.  (
x ( 2nd `  G
) y ) ) )
1333ad2ant1 1082 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  H  e.  ( D  Func  E )
)
1443ad2ant1 1082 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  K  e.  ( E  Func  F )
)
15 relfunc 16522 . . . . . . . . . . 11  |-  Rel  ( C  Func  D )
16 1st2ndbr 7217 . . . . . . . . . . 11  |-  ( ( Rel  ( C  Func  D )  /\  G  e.  ( C  Func  D
) )  ->  ( 1st `  G ) ( C  Func  D )
( 2nd `  G
) )
1715, 8, 16sylancr 695 . . . . . . . . . 10  |-  ( ph  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
18173ad2ant1 1082 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
197, 2, 18funcf1 16526 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) : ( Base `  C ) --> ( Base `  D ) )
20 simp2 1062 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  x  e.  (
Base `  C )
)
2119, 20ffvelrnd 6360 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  x
)  e.  ( Base `  D ) )
22 simp3 1063 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  y  e.  (
Base `  C )
)
2319, 22ffvelrnd 6360 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  y
)  e.  ( Base `  D ) )
242, 13, 14, 21, 23cofu2nd 16545 . . . . . 6  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( ( 1st `  G ) `
 x ) ( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  =  ( ( ( ( 1st `  H
) `  ( ( 1st `  G ) `  x ) ) ( 2nd `  K ) ( ( 1st `  H
) `  ( ( 1st `  G ) `  y ) ) )  o.  ( ( ( 1st `  G ) `
 x ) ( 2nd `  H ) ( ( 1st `  G
) `  y )
) ) )
2524coeq1d 5283 . . . . 5  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( ( ( 1st `  G
) `  x )
( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  o.  ( x ( 2nd `  G
) y ) )  =  ( ( ( ( ( 1st `  H
) `  ( ( 1st `  G ) `  x ) ) ( 2nd `  K ) ( ( 1st `  H
) `  ( ( 1st `  G ) `  y ) ) )  o.  ( ( ( 1st `  G ) `
 x ) ( 2nd `  H ) ( ( 1st `  G
) `  y )
) )  o.  (
x ( 2nd `  G
) y ) ) )
2683ad2ant1 1082 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  G  e.  ( C  Func  D )
)
277, 26, 13, 20cofu1 16544 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  x )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  x )
) )
287, 26, 13, 22cofu1 16544 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  y )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )
2927, 28oveq12d 6668 . . . . . 6  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  =  ( ( ( 1st `  H ) `  (
( 1st `  G
) `  x )
) ( 2nd `  K
) ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) ) )
307, 26, 13, 20, 22cofu2nd 16545 . . . . . 6  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( x ( 2nd `  ( H  o.func 
G ) ) y )  =  ( ( ( ( 1st `  G
) `  x )
( 2nd `  H
) ( ( 1st `  G ) `  y
) )  o.  (
x ( 2nd `  G
) y ) ) )
3129, 30coeq12d 5286 . . . . 5  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  o.  ( x ( 2nd `  ( H  o.func  G )
) y ) )  =  ( ( ( ( 1st `  H
) `  ( ( 1st `  G ) `  x ) ) ( 2nd `  K ) ( ( 1st `  H
) `  ( ( 1st `  G ) `  y ) ) )  o.  ( ( ( ( 1st `  G
) `  x )
( 2nd `  H
) ( ( 1st `  G ) `  y
) )  o.  (
x ( 2nd `  G
) y ) ) ) )
3212, 25, 313eqtr4a 2682 . . . 4  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( ( ( 1st `  G
) `  x )
( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  o.  ( x ( 2nd `  G
) y ) )  =  ( ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  o.  ( x ( 2nd `  ( H  o.func  G )
) y ) ) )
3332mpt2eq3dva 6719 . . 3  |-  ( ph  ->  ( x  e.  (
Base `  C ) ,  y  e.  ( Base `  C )  |->  ( ( ( ( 1st `  G ) `  x
) ( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  o.  ( x ( 2nd `  G
) y ) ) )  =  ( x  e.  ( Base `  C
) ,  y  e.  ( Base `  C
)  |->  ( ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  o.  ( x ( 2nd `  ( H  o.func  G )
) y ) ) ) )
3411, 33opeq12d 4410 . 2  |-  ( ph  -> 
<. ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) ) ,  ( x  e.  ( Base `  C ) ,  y  e.  ( Base `  C
)  |->  ( ( ( ( 1st `  G
) `  x )
( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  o.  ( x ( 2nd `  G
) y ) ) ) >.  =  <. ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) ,  ( x  e.  ( Base `  C ) ,  y  e.  ( Base `  C
)  |->  ( ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  o.  ( x ( 2nd `  ( H  o.func  G )
) y ) ) ) >. )
353, 4cofucl 16548 . . 3  |-  ( ph  ->  ( K  o.func  H )  e.  ( D  Func  F
) )
367, 8, 35cofuval 16542 . 2  |-  ( ph  ->  ( ( K  o.func  H )  o.func 
G )  =  <. ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) ) ,  ( x  e.  ( Base `  C ) ,  y  e.  ( Base `  C
)  |->  ( ( ( ( 1st `  G
) `  x )
( 2nd `  ( K  o.func 
H ) ) ( ( 1st `  G
) `  y )
)  o.  ( x ( 2nd `  G
) y ) ) ) >. )
378, 3cofucl 16548 . . 3  |-  ( ph  ->  ( H  o.func  G )  e.  ( C  Func  E
) )
387, 37, 4cofuval 16542 . 2  |-  ( ph  ->  ( K  o.func  ( H  o.func  G ) )  =  <. ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) ,  ( x  e.  ( Base `  C ) ,  y  e.  ( Base `  C
)  |->  ( ( ( ( 1st `  ( H  o.func 
G ) ) `  x ) ( 2nd `  K ) ( ( 1st `  ( H  o.func 
G ) ) `  y ) )  o.  ( x ( 2nd `  ( H  o.func  G )
) y ) ) ) >. )
3934, 36, 383eqtr4d 2666 1  |-  ( ph  ->  ( ( K  o.func  H )  o.func 
G )  =  ( K  o.func  ( H  o.func  G )
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ w3a 1037    = wceq 1483    e. wcel 1990   <.cop 4183   class class class wbr 4653    o. ccom 5118   Rel wrel 5119   ` cfv 5888  (class class class)co 6650    |-> cmpt2 6652   1stc1st 7166   2ndc2nd 7167   Basecbs 15857    Func cfunc 16514    o.func ccofu 16516
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-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-rep 4771  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949
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-ne 2795  df-ral 2917  df-rex 2918  df-reu 2919  df-rmo 2920  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-pw 4160  df-sn 4178  df-pr 4180  df-op 4184  df-uni 4437  df-iun 4522  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-rn 5125  df-res 5126  df-ima 5127  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-riota 6611  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-1st 7168  df-2nd 7169  df-map 7859  df-ixp 7909  df-cat 16329  df-cid 16330  df-func 16518  df-cofu 16520
This theorem is referenced by:  catccatid  16752
  Copyright terms: Public domain W3C validator