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

Theorem cofuass 14078
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 5380 . . . 4  |-  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) )
2 eqid 2435 . . . . . 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 14072 . . . . 5  |-  ( ph  ->  ( 1st `  ( K  o.func 
H ) )  =  ( ( 1st `  K
)  o.  ( 1st `  H ) ) )
65coeq1d 5026 . . . 4  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( ( 1st `  K
)  o.  ( 1st `  H ) )  o.  ( 1st `  G
) ) )
7 eqid 2435 . . . . . 6  |-  ( Base `  C )  =  (
Base `  C )
8 cofuass.g . . . . . 6  |-  ( ph  ->  G  e.  ( C 
Func  D ) )
97, 8, 3cofu1st 14072 . . . . 5  |-  ( ph  ->  ( 1st `  ( H  o.func 
G ) )  =  ( ( 1st `  H
)  o.  ( 1st `  G ) ) )
109coeq2d 5027 . . . 4  |-  ( ph  ->  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) )  =  ( ( 1st `  K
)  o.  ( ( 1st `  H )  o.  ( 1st `  G
) ) ) )
111, 6, 103eqtr4a 2493 . . 3  |-  ( ph  ->  ( ( 1st `  ( K  o.func 
H ) )  o.  ( 1st `  G
) )  =  ( ( 1st `  K
)  o.  ( 1st `  ( H  o.func  G )
) ) )
12 coass 5380 . . . . 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 14051 . . . . . . . . . . 11  |-  Rel  ( C  Func  D )
16 1st2ndbr 6388 . . . . . . . . . . 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 14055 . . . . . . . 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 5863 . . . . . . 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 5863 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  G ) `  y
)  e.  ( Base `  D ) )
242, 13, 14, 21, 23cofu2nd 14074 . . . . . 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 5026 . . . . 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 14073 . . . . . . 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 14073 . . . . . . 7  |-  ( (
ph  /\  x  e.  ( Base `  C )  /\  y  e.  ( Base `  C ) )  ->  ( ( 1st `  ( H  o.func  G )
) `  y )  =  ( ( 1st `  H ) `  (
( 1st `  G
) `  y )
) )
2927, 28oveq12d 6091 . . . . . 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 14074 . . . . . 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 5029 . . . . 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 2493 . . . 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 6130 . . 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 3984 . 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 14077 . . 3  |-  ( ph  ->  ( K  o.func  H )  e.  ( D  Func  F
) )
367, 8, 35cofuval 14071 . 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 14077 . . 3  |-  ( ph  ->  ( H  o.func  G )  e.  ( C  Func  E
) )
387, 37, 4cofuval 14071 . 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 2477 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 1652    e. wcel 1725   <.cop 3809   class class class wbr 4204    o. ccom 4874   Rel wrel 4875   ` cfv 5446  (class class class)co 6073    e. cmpt2 6075   1stc1st 6339   2ndc2nd 6340   Basecbs 13461    Func cfunc 14043    o.func ccofu 14045
This theorem is referenced by:  catccatid  14249
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-rep 4312  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-ral 2702  df-rex 2703  df-reu 2704  df-rmo 2705  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-op 3815  df-uni 4008  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-id 4490  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-1st 6341  df-2nd 6342  df-riota 6541  df-map 7012  df-ixp 7056  df-cat 13885  df-cid 13886  df-func 14047  df-cofu 14049
  Copyright terms: Public domain W3C validator