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

Theorem cofuass 17604
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 6169 . . . 4 (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺)))
2 eqid 2738 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
3 cofuass.h . . . . . 6 (𝜑𝐻 ∈ (𝐷 Func 𝐸))
4 cofuass.k . . . . . 6 (𝜑𝐾 ∈ (𝐸 Func 𝐹))
52, 3, 4cofu1st 17598 . . . . 5 (𝜑 → (1st ‘(𝐾func 𝐻)) = ((1st𝐾) ∘ (1st𝐻)))
65coeq1d 5770 . . . 4 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = (((1st𝐾) ∘ (1st𝐻)) ∘ (1st𝐺)))
7 eqid 2738 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
8 cofuass.g . . . . . 6 (𝜑𝐺 ∈ (𝐶 Func 𝐷))
97, 8, 3cofu1st 17598 . . . . 5 (𝜑 → (1st ‘(𝐻func 𝐺)) = ((1st𝐻) ∘ (1st𝐺)))
109coeq2d 5771 . . . 4 (𝜑 → ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))) = ((1st𝐾) ∘ ((1st𝐻) ∘ (1st𝐺))))
111, 6, 103eqtr4a 2804 . . 3 (𝜑 → ((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)) = ((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))))
12 coass 6169 . . . . 5 (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
1333ad2ant1 1132 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐻 ∈ (𝐷 Func 𝐸))
1443ad2ant1 1132 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐾 ∈ (𝐸 Func 𝐹))
15 relfunc 17577 . . . . . . . . . . 11 Rel (𝐶 Func 𝐷)
16 1st2ndbr 7883 . . . . . . . . . . 11 ((Rel (𝐶 Func 𝐷) ∧ 𝐺 ∈ (𝐶 Func 𝐷)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
1715, 8, 16sylancr 587 . . . . . . . . . 10 (𝜑 → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
18173ad2ant1 1132 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺)(𝐶 Func 𝐷)(2nd𝐺))
197, 2, 18funcf1 17581 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐺):(Base‘𝐶)⟶(Base‘𝐷))
20 simp2 1136 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
2119, 20ffvelrnd 6962 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑥) ∈ (Base‘𝐷))
22 simp3 1137 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
2319, 22ffvelrnd 6962 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐺)‘𝑦) ∈ (Base‘𝐷))
242, 13, 14, 21, 23cofu2nd 17600 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))))
2524coeq1d 5770 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = (((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ (((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦))) ∘ (𝑥(2nd𝐺)𝑦)))
2683ad2ant1 1132 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐺 ∈ (𝐶 Func 𝐷))
277, 26, 13, 20cofu1 17599 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑥) = ((1st𝐻)‘((1st𝐺)‘𝑥)))
287, 26, 13, 22cofu1 17599 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st ‘(𝐻func 𝐺))‘𝑦) = ((1st𝐻)‘((1st𝐺)‘𝑦)))
2927, 28oveq12d 7293 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) = (((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))))
307, 26, 13, 20, 22cofu2nd 17600 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd ‘(𝐻func 𝐺))𝑦) = ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))
3129, 30coeq12d 5773 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)) = ((((1st𝐻)‘((1st𝐺)‘𝑥))(2nd𝐾)((1st𝐻)‘((1st𝐺)‘𝑦))) ∘ ((((1st𝐺)‘𝑥)(2nd𝐻)((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))))
3212, 25, 313eqtr4a 2804 . . . 4 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)) = ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))
3332mpoeq3dva 7352 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦))))
3411, 33opeq12d 4812 . 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 17603 . . 3 (𝜑 → (𝐾func 𝐻) ∈ (𝐷 Func 𝐹))
367, 8, 35cofuval 17597 . 2 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = ⟨((1st ‘(𝐾func 𝐻)) ∘ (1st𝐺)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐺)‘𝑥)(2nd ‘(𝐾func 𝐻))((1st𝐺)‘𝑦)) ∘ (𝑥(2nd𝐺)𝑦)))⟩)
378, 3cofucl 17603 . . 3 (𝜑 → (𝐻func 𝐺) ∈ (𝐶 Func 𝐸))
387, 37, 4cofuval 17597 . 2 (𝜑 → (𝐾func (𝐻func 𝐺)) = ⟨((1st𝐾) ∘ (1st ‘(𝐻func 𝐺))), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st ‘(𝐻func 𝐺))‘𝑥)(2nd𝐾)((1st ‘(𝐻func 𝐺))‘𝑦)) ∘ (𝑥(2nd ‘(𝐻func 𝐺))𝑦)))⟩)
3934, 36, 383eqtr4d 2788 1 (𝜑 → ((𝐾func 𝐻) ∘func 𝐺) = (𝐾func (𝐻func 𝐺)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  w3a 1086   = wceq 1539  wcel 2106  cop 4567   class class class wbr 5074  ccom 5593  Rel wrel 5594  cfv 6433  (class class class)co 7275  cmpo 7277  1st c1st 7829  2nd c2nd 7830  Basecbs 16912   Func cfunc 17569  func ccofu 17571
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-ral 3069  df-rex 3070  df-rmo 3071  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-riota 7232  df-ov 7278  df-oprab 7279  df-mpo 7280  df-1st 7831  df-2nd 7832  df-map 8617  df-ixp 8686  df-cat 17377  df-cid 17378  df-func 17573  df-cofu 17575
This theorem is referenced by:  catccatid  17821
  Copyright terms: Public domain W3C validator