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

Theorem cofuass 16318
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 5557 . . . 4 (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺)))
2 eqid 2609 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
3 cofuass.h . . . . . 6 (𝜑𝐻 ∈ (𝐷 Func 𝐸))
4 cofuass.k . . . . . 6 (𝜑𝐾 ∈ (𝐸 Func 𝐹))
52, 3, 4cofu1st 16312 . . . . 5 (𝜑 → (1st ‘(𝐾func 𝐻)) = ((1st𝐾) ∘ (1st𝐻)))
65coeq1d 5193 . . . 4 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)))
7 eqid 2609 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
8 cofuass.g . . . . . 6 (𝜑𝐺 ∈ (𝐶 Func 𝐷))
97, 8, 3cofu1st 16312 . . . . 5 (𝜑 → (1st ‘(𝐻func 𝐺)) = ((1st𝐻) ∘ (1st𝐺)))
109coeq2d 5194 . . . 4 (𝜑 → ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺))))
111, 6, 103eqtr4a 2669 . . 3 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))))
12 coass 5557 . . . . 5 (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
1333ad2ant1 1074 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐻 ∈ (𝐷 Func 𝐸))
1443ad2ant1 1074 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐾 ∈ (𝐸 Func 𝐹))
15 relfunc 16291 . . . . . . . . . . 11 Rel (𝐶 Func 𝐷)
16 1st2ndbr 7085 . . . . . . . . . . 11 ((Rel (𝐶 Func 𝐷) ∧ 𝐺 ∈ (𝐶 Func 𝐷)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
1715, 8, 16sylancr 693 . . . . . . . . . 10 (𝜑 → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
18173ad2ant1 1074 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
197, 2, 18funcf1 16295 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺):(Base‘𝐶)⟶(Base‘𝐷))
20 simp2 1054 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
2119, 20ffvelrnd 6253 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑥) ∈ (Base‘𝐷))
22 simp3 1055 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
2319, 22ffvelrnd 6253 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑦) ∈ (Base‘𝐷))
242, 13, 14, 21, 23cofu2nd 16314 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))))
2524coeq1d 5193 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)))
2683ad2ant1 1074 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐺 ∈ (𝐶 Func 𝐷))
277, 26, 13, 20cofu1 16313 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑥) = ((1st𝐻)‘((1st𝐺)‘𝑥)))
287, 26, 13, 22cofu1 16313 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑦) = ((1st𝐻)‘((1st𝐺)‘𝑦)))
2927, 28oveq12d 6545 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) = (((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))))
307, 26, 13, 20, 22cofu2nd 16314 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd ‘(𝐻func 𝐺))𝑦) = ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
3129, 30coeq12d 5196 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))))
3212, 25, 313eqtr4a 2669 . . . 4 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))
3332mpt2eq3dva 6595 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦))))
3411, 33opeq12d 4342 . 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 16317 . . 3 (𝜑 → (𝐾func 𝐻) ∈ (𝐷 Func 𝐹))
367, 8, 35cofuval 16311 . 2 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = ⟨((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))⟩)
378, 3cofucl 16317 . . 3 (𝜑 → (𝐻func 𝐺) ∈ (𝐶 Func 𝐸))
387, 37, 4cofuval 16311 . 2 (𝜑 → (𝐾func (𝐻func 𝐺)) = ⟨((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))⟩)
3934, 36, 383eqtr4d 2653 1 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = (𝐾func (𝐻func 𝐺)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  w3a 1030   = wceq 1474  wcel 1976  cop 4130   class class class wbr 4577  ccom 5032  Rel wrel 5033  cfv 5790  (class class class)co 6527  cmpt2 6529  1st c1st 7034  2nd c2nd 7035  Basecbs 15641   Func cfunc 16283  func ccofu 16285
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2033  ax-13 2233  ax-ext 2589  ax-rep 4693  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6824
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2461  df-mo 2462  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-ral 2900  df-rex 2901  df-reu 2902  df-rmo 2903  df-rab 2904  df-v 3174  df-sbc 3402  df-csb 3499  df-dif 3542  df-un 3544  df-in 3546  df-ss 3553  df-nul 3874  df-if 4036  df-pw 4109  df-sn 4125  df-pr 4127  df-op 4131  df-uni 4367  df-iun 4451  df-br 4578  df-opab 4638  df-mpt 4639  df-id 4943  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-rn 5039  df-res 5040  df-ima 5041  df-iota 5754  df-fun 5792  df-fn 5793  df-f 5794  df-f1 5795  df-fo 5796  df-f1o 5797  df-fv 5798  df-riota 6489  df-ov 6530  df-oprab 6531  df-mpt2 6532  df-1st 7036  df-2nd 7037  df-map 7723  df-ixp 7772  df-cat 16098  df-cid 16099  df-func 16287  df-cofu 16289
This theorem is referenced by:  catccatid  16521
  Copyright terms: Public domain W3C validator