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

Theorem cofuass 13763
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 5191 . . . 4  |-  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) )
2 eqid 2283 . . . . . 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 13757 . . . . 5  |-  ( ph  ->  ( 1st `  ( K  o.func 
H ) )  =  ( ( 1st `  K
)  o.  ( 1st `  H ) ) )
65coeq1d 4845 . . . 4  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) ) )
7 eqid 2283 . . . . . 6  |-  ( Base `  C )  =  (
Base `  C )
8 cofuass.g . . . . . 6  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
97, 8, 3cofu1st 13757 . . . . 5  |-  ( ph  ->  ( 1st `  ( H  o.func 
G ) )  =  ( ( 1st `  H
)  o.  ( 1st `  G ) ) )
109coeq2d 4846 . . . 4  |-  ( ph  ->  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) ) )
111, 6, 103eqtr4a 2341 . . 3  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) )
12 coass 5191 . . . . 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 13736 . . . . . . . . . . 11  |-  Rel  ( C  Func  D )
16 1st2ndbr 6169 . . . . . . . . . . 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 13740 . . . . . . . 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 5666 . . . . . . 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 5666 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  y
)  e.  ( Base `  D ) )
242, 13, 14, 21, 23cofu2nd 13759 . . . . . 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 4845 . . . . 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 13758 . . . . . . 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 13758 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  y )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )
2927, 28oveq12d 5876 . . . . . 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 13759 . . . . . 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 4848 . . . . 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 2341 . . . 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 5912 . . 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 3804 . 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 13762 . . 3  |-  ( ph  ->  ( K  o.func  H )  e.  ( D  Func  F
) )
367, 8, 35cofuval 13756 . 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 13762 . . 3  |-  ( ph  ->  ( H  o.func  G )  e.  ( C  Func  E
) )
387, 37, 4cofuval 13756 . 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 2325 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 1623    e. wcel 1684   <.cop 3643   class class class wbr 4023    o. ccom 4693   Rel wrel 4694   ` cfv 5255  (class class class)co 5858    e. cmpt2 5860   1stc1st 6120   2ndc2nd 6121   Basecbs 13148    Func cfunc 13728    o.func ccofu 13730
This theorem is referenced by:  catccatid  13934
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-map 6774  df-ixp 6818  df-cat 13570  df-cid 13571  df-func 13732  df-cofu 13734
  Copyright terms: Public domain W3C validator