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

Theorem cofuass 14015
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 5330 . . . 4  |-  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) )
2 eqid 2389 . . . . . 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 14009 . . . . 5  |-  ( ph  ->  ( 1st `  ( K  o.func 
H ) )  =  ( ( 1st `  K
)  o.  ( 1st `  H ) ) )
65coeq1d 4976 . . . 4  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) ) )
7 eqid 2389 . . . . . 6  |-  ( Base `  C )  =  (
Base `  C )
8 cofuass.g . . . . . 6  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
97, 8, 3cofu1st 14009 . . . . 5  |-  ( ph  ->  ( 1st `  ( H  o.func 
G ) )  =  ( ( 1st `  H
)  o.  ( 1st `  G ) ) )
109coeq2d 4977 . . . 4  |-  ( ph  ->  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) ) )
111, 6, 103eqtr4a 2447 . . 3  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) )
12 coass 5330 . . . . 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 978 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  H  e.  ( D  Func  E )
)
1443ad2ant1 978 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  K  e.  ( E  Func  F )
)
15 relfunc 13988 . . . . . . . . . . 11  |-  Rel  ( C  Func  D )
16 1st2ndbr 6337 . . . . . . . . . . 11  |-  ( ( Rel  ( C  Func  D )  /\  G  e.  ( C  Func  D
) )  ->  ( 1st `  G ) ( C  Func  D )
( 2nd `  G
) )
1715, 8, 16sylancr 645 . . . . . . . . . 10  |-  ( ph  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
18173ad2ant1 978 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) ( C  Func  D ) ( 2nd `  G
) )
197, 2, 18funcf1 13992 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( 1st `  G
) : ( Base `  C ) --> ( Base `  D ) )
20 simp2 958 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  x  e.  (
Base `  C )
)
2119, 20ffvelrnd 5812 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  x
)  e.  ( Base `  D ) )
22 simp3 959 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  y  e.  (
Base `  C )
)
2319, 22ffvelrnd 5812 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  y
)  e.  ( Base `  D ) )
242, 13, 14, 21, 23cofu2nd 14011 . . . . . 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 4976 . . . . 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 978 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  G  e.  ( C  Func  D )
)
277, 26, 13, 20cofu1 14010 . . . . . . 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 14010 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  y )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )
2927, 28oveq12d 6040 . . . . . 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 14011 . . . . . 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 4979 . . . . 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 2447 . . . 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 6079 . . 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 3936 . 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 14014 . . 3  |-  ( ph  ->  ( K  o.func  H )  e.  ( D  Func  F
) )
367, 8, 35cofuval 14008 . 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 14014 . . 3  |-  ( ph  ->  ( H  o.func  G )  e.  ( C  Func  E
) )
387, 37, 4cofuval 14008 . 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 2431 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 936    = wceq 1649    e. wcel 1717   <.cop 3762   class class class wbr 4155    o. ccom 4824   Rel wrel 4825   ` cfv 5396  (class class class)co 6022    e. cmpt2 6024   1stc1st 6288   2ndc2nd 6289   Basecbs 13398    Func cfunc 13980    o.func ccofu 13982
This theorem is referenced by:  catccatid  14186
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2370  ax-rep 4263  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-ral 2656  df-rex 2657  df-reu 2658  df-rmo 2659  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-op 3768  df-uni 3960  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-id 4441  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-1st 6290  df-2nd 6291  df-riota 6487  df-map 6958  df-ixp 7002  df-cat 13822  df-cid 13823  df-func 13984  df-cofu 13986
  Copyright terms: Public domain W3C validator