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

Theorem cofuass 13779
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 5207 . . . 4  |-  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) )
2 eqid 2296 . . . . . 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 13773 . . . . 5  |-  ( ph  ->  ( 1st `  ( K  o.func 
H ) )  =  ( ( 1st `  K
)  o.  ( 1st `  H ) ) )
65coeq1d 4861 . . . 4  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) ) )
7 eqid 2296 . . . . . 6  |-  ( Base `  C )  =  (
Base `  C )
8 cofuass.g . . . . . 6  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
97, 8, 3cofu1st 13773 . . . . 5  |-  ( ph  ->  ( 1st `  ( H  o.func 
G ) )  =  ( ( 1st `  H
)  o.  ( 1st `  G ) ) )
109coeq2d 4862 . . . 4  |-  ( ph  ->  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) ) )
111, 6, 103eqtr4a 2354 . . 3  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) )
12 coass 5207 . . . . 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 976 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  H  e.  ( D  Func  E )
)
1443ad2ant1 976 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  K  e.  ( E  Func  F )
)
15 relfunc 13752 . . . . . . . . . . 11  |-  Rel  ( C  Func  D )
16 1st2ndbr 6185 . . . . . . . . . . 11  |-  ( ( Rel  ( C  Func  D )  /\  G  e.  ( C  Func  D
) )  ->  ( 1st `  G ) ( C  Func  D )
( 2nd `  G
) )
1715, 8, 16sylancr 644 . . . . . . . . . 10  |-  ( ph  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
18173ad2ant1 976 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
197, 2, 18funcf1 13756 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) : ( Base `  C ) --> ( Base `  D ) )
20 simp2 956 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  x  e.  (
Base `  C )
)
2119, 20ffvelrnd 5682 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  x
)  e.  ( Base `  D ) )
22 simp3 957 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  y  e.  (
Base `  C )
)
2319, 22ffvelrnd 5682 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  y
)  e.  ( Base `  D ) )
242, 13, 14, 21, 23cofu2nd 13775 . . . . . 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 4861 . . . . 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 976 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  G  e.  ( C  Func  D )
)
277, 26, 13, 20cofu1 13774 . . . . . . 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 13774 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  y )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )
2927, 28oveq12d 5892 . . . . . 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 13775 . . . . . 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 4864 . . . . 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 2354 . . . 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 5928 . . 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 3820 . 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 13778 . . 3  |-  ( ph  ->  ( K  o.func  H )  e.  ( D  Func  F
) )
367, 8, 35cofuval 13772 . 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 13778 . . 3  |-  ( ph  ->  ( H  o.func  G )  e.  ( C  Func  E
) )
387, 37, 4cofuval 13772 . 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 2338 1  |-  ( ph  ->  ( ( K  o.func  H )  o.func 
G )  =  ( K  o.func  ( H  o.func  G )
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ w3a 934    = wceq 1632    e. wcel 1696   <.cop 3656   class class class wbr 4039    o. ccom 4709   Rel wrel 4710   ` cfv 5271  (class class class)co 5874    e. cmpt2 5876   1stc1st 6136   2ndc2nd 6137   Basecbs 13164    Func cfunc 13744    o.func ccofu 13746
This theorem is referenced by:  catccatid  13950
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-rep 4147  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-riota 6320  df-map 6790  df-ixp 6834  df-cat 13586  df-cid 13587  df-func 13748  df-cofu 13750
  Copyright terms: Public domain W3C validator