Metamath Proof Explorer


Theorem cofuass

Description: Functor composition is associative. (Contributed by Mario Carneiro, 3-Jan-2017)

Ref Expression
Hypotheses cofuass.g φ G C Func D
cofuass.h φ H D Func E
cofuass.k φ K E Func F
Assertion cofuass φ K func H func G = K func H func G

Proof

Step Hyp Ref Expression
1 cofuass.g φ G C Func D
2 cofuass.h φ H D Func E
3 cofuass.k φ K E Func F
4 coass 1 st K 1 st H 1 st G = 1 st K 1 st H 1 st G
5 eqid Base D = Base D
6 5 2 3 cofu1st φ 1 st K func H = 1 st K 1 st H
7 6 coeq1d φ 1 st K func H 1 st G = 1 st K 1 st H 1 st G
8 eqid Base C = Base C
9 8 1 2 cofu1st φ 1 st H func G = 1 st H 1 st G
10 9 coeq2d φ 1 st K 1 st H func G = 1 st K 1 st H 1 st G
11 4 7 10 3eqtr4a φ 1 st K func H 1 st G = 1 st K 1 st H func G
12 coass 1 st H 1 st G x 2 nd K 1 st H 1 st G y 1 st G x 2 nd H 1 st G y x 2 nd G y = 1 st H 1 st G x 2 nd K 1 st H 1 st G y 1 st G x 2 nd H 1 st G y x 2 nd G y
13 2 3ad2ant1 φ x Base C y Base C H D Func E
14 3 3ad2ant1 φ x Base C y Base C K E Func F
15 relfunc Rel C Func D
16 1st2ndbr Rel C Func D G C Func D 1 st G C Func D 2 nd G
17 15 1 16 sylancr φ 1 st G C Func D 2 nd G
18 17 3ad2ant1 φ x Base C y Base C 1 st G C Func D 2 nd G
19 8 5 18 funcf1 φ x Base C y Base C 1 st G : Base C Base D
20 simp2 φ x Base C y Base C x Base C
21 19 20 ffvelrnd φ x Base C y Base C 1 st G x Base D
22 simp3 φ x Base C y Base C y Base C
23 19 22 ffvelrnd φ x Base C y Base C 1 st G y Base D
24 5 13 14 21 23 cofu2nd φ x Base C y Base C 1 st G x 2 nd K func H 1 st G y = 1 st H 1 st G x 2 nd K 1 st H 1 st G y 1 st G x 2 nd H 1 st G y
25 24 coeq1d φ x Base C y Base C 1 st G x 2 nd K func H 1 st G y x 2 nd G y = 1 st H 1 st G x 2 nd K 1 st H 1 st G y 1 st G x 2 nd H 1 st G y x 2 nd G y
26 1 3ad2ant1 φ x Base C y Base C G C Func D
27 8 26 13 20 cofu1 φ x Base C y Base C 1 st H func G x = 1 st H 1 st G x
28 8 26 13 22 cofu1 φ x Base C y Base C 1 st H func G y = 1 st H 1 st G y
29 27 28 oveq12d φ x Base C y Base C 1 st H func G x 2 nd K 1 st H func G y = 1 st H 1 st G x 2 nd K 1 st H 1 st G y
30 8 26 13 20 22 cofu2nd φ x Base C y Base C x 2 nd H func G y = 1 st G x 2 nd H 1 st G y x 2 nd G y
31 29 30 coeq12d φ x Base C y Base C 1 st H func G x 2 nd K 1 st H func G y x 2 nd H func G y = 1 st H 1 st G x 2 nd K 1 st H 1 st G y 1 st G x 2 nd H 1 st G y x 2 nd G y
32 12 25 31 3eqtr4a φ x Base C y Base C 1 st G x 2 nd K func H 1 st G y x 2 nd G y = 1 st H func G x 2 nd K 1 st H func G y x 2 nd H func G y
33 32 mpoeq3dva φ x Base C , y Base C 1 st G x 2 nd K func H 1 st G y x 2 nd G y = x Base C , y Base C 1 st H func G x 2 nd K 1 st H func G y x 2 nd H func G y
34 11 33 opeq12d φ 1 st K func H 1 st G x Base C , y Base C 1 st G x 2 nd K func H 1 st G y x 2 nd G y = 1 st K 1 st H func G x Base C , y Base C 1 st H func G x 2 nd K 1 st H func G y x 2 nd H func G y
35 2 3 cofucl φ K func H D Func F
36 8 1 35 cofuval φ K func H func G = 1 st K func H 1 st G x Base C , y Base C 1 st G x 2 nd K func H 1 st G y x 2 nd G y
37 1 2 cofucl φ H func G C Func E
38 8 37 3 cofuval φ K func H func G = 1 st K 1 st H func G x Base C , y Base C 1 st H func G x 2 nd K 1 st H func G y x 2 nd H func G y
39 34 36 38 3eqtr4d φ K func H func G = K func H func G