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

Theorem cofuass 16770
 Description: Functor composition is associative. (Contributed by Mario Carneiro, 3-Jan-2017.)
Hypotheses
Ref Expression
cofuass.g (𝜑𝐺 ∈ (𝐶 Func 𝐷))
cofuass.h (𝜑𝐻 ∈ (𝐷 Func 𝐸))
cofuass.k (𝜑𝐾 ∈ (𝐸 Func 𝐹))
Assertion
Ref Expression
cofuass (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = (𝐾func (𝐻func 𝐺)))

Proof of Theorem cofuass
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 coass 5815 . . . 4 (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺)))
2 eqid 2760 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
3 cofuass.h . . . . . 6 (𝜑𝐻 ∈ (𝐷 Func 𝐸))
4 cofuass.k . . . . . 6 (𝜑𝐾 ∈ (𝐸 Func 𝐹))
52, 3, 4cofu1st 16764 . . . . 5 (𝜑 → (1st ‘(𝐾func 𝐻)) = ((1st𝐾) ∘ (1st𝐻)))
65coeq1d 5439 . . . 4 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)))
7 eqid 2760 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
8 cofuass.g . . . . . 6 (𝜑𝐺 ∈ (𝐶 Func 𝐷))
97, 8, 3cofu1st 16764 . . . . 5 (𝜑 → (1st ‘(𝐻func 𝐺)) = ((1st𝐻) ∘ (1st𝐺)))
109coeq2d 5440 . . . 4 (𝜑 → ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺))))
111, 6, 103eqtr4a 2820 . . 3 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))))
12 coass 5815 . . . . 5 (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
1333ad2ant1 1128 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐻 ∈ (𝐷 Func 𝐸))
1443ad2ant1 1128 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐾 ∈ (𝐸 Func 𝐹))
15 relfunc 16743 . . . . . . . . . . 11 Rel (𝐶 Func 𝐷)
16 1st2ndbr 7385 . . . . . . . . . . 11 ((Rel (𝐶 Func 𝐷) ∧ 𝐺 ∈ (𝐶 Func 𝐷)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
1715, 8, 16sylancr 698 . . . . . . . . . 10 (𝜑 → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
18173ad2ant1 1128 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
197, 2, 18funcf1 16747 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺):(Base‘𝐶)⟶(Base‘𝐷))
20 simp2 1132 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
2119, 20ffvelrnd 6524 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑥) ∈ (Base‘𝐷))
22 simp3 1133 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
2319, 22ffvelrnd 6524 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑦) ∈ (Base‘𝐷))
242, 13, 14, 21, 23cofu2nd 16766 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))))
2524coeq1d 5439 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)))
2683ad2ant1 1128 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐺 ∈ (𝐶 Func 𝐷))
277, 26, 13, 20cofu1 16765 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑥) = ((1st𝐻)‘((1st𝐺)‘𝑥)))
287, 26, 13, 22cofu1 16765 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑦) = ((1st𝐻)‘((1st𝐺)‘𝑦)))
2927, 28oveq12d 6832 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) = (((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))))
307, 26, 13, 20, 22cofu2nd 16766 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd ‘(𝐻func 𝐺))𝑦) = ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
3129, 30coeq12d 5442 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))))
3212, 25, 313eqtr4a 2820 . . . 4 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))
3332mpt2eq3dva 6885 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦))))
3411, 33opeq12d 4561 . 2 (𝜑 → ⟨((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))⟩ = ⟨((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))⟩)
353, 4cofucl 16769 . . 3 (𝜑 → (𝐾func 𝐻) ∈ (𝐷 Func 𝐹))
367, 8, 35cofuval 16763 . 2 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = ⟨((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))⟩)
378, 3cofucl 16769 . . 3 (𝜑 → (𝐻func 𝐺) ∈ (𝐶 Func 𝐸))
387, 37, 4cofuval 16763 . 2 (𝜑 → (𝐾func (𝐻func 𝐺)) = ⟨((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))⟩)
3934, 36, 383eqtr4d 2804 1 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = (𝐾func (𝐻func 𝐺)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ w3a 1072   = wceq 1632   ∈ wcel 2139  ⟨cop 4327   class class class wbr 4804   ∘ ccom 5270  Rel wrel 5271  ‘cfv 6049  (class class class)co 6814   ↦ cmpt2 6816  1st c1st 7332  2nd c2nd 7333  Basecbs 16079   Func cfunc 16735   ∘func ccofu 16737 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1871  ax-4 1886  ax-5 1988  ax-6 2054  ax-7 2090  ax-8 2141  ax-9 2148  ax-10 2168  ax-11 2183  ax-12 2196  ax-13 2391  ax-ext 2740  ax-rep 4923  ax-sep 4933  ax-nul 4941  ax-pow 4992  ax-pr 5055  ax-un 7115 This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3an 1074  df-tru 1635  df-ex 1854  df-nf 1859  df-sb 2047  df-eu 2611  df-mo 2612  df-clab 2747  df-cleq 2753  df-clel 2756  df-nfc 2891  df-ne 2933  df-ral 3055  df-rex 3056  df-reu 3057  df-rmo 3058  df-rab 3059  df-v 3342  df-sbc 3577  df-csb 3675  df-dif 3718  df-un 3720  df-in 3722  df-ss 3729  df-nul 4059  df-if 4231  df-pw 4304  df-sn 4322  df-pr 4324  df-op 4328  df-uni 4589  df-iun 4674  df-br 4805  df-opab 4865  df-mpt 4882  df-id 5174  df-xp 5272  df-rel 5273  df-cnv 5274  df-co 5275  df-dm 5276  df-rn 5277  df-res 5278  df-ima 5279  df-iota 6012  df-fun 6051  df-fn 6052  df-f 6053  df-f1 6054  df-fo 6055  df-f1o 6056  df-fv 6057  df-riota 6775  df-ov 6817  df-oprab 6818  df-mpt2 6819  df-1st 7334  df-2nd 7335  df-map 8027  df-ixp 8077  df-cat 16550  df-cid 16551  df-func 16739  df-cofu 16741 This theorem is referenced by:  catccatid  16973
 Copyright terms: Public domain W3C validator