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

Theorem cofurid 16758
 Description: The identity functor is a right identity for composition. (Contributed by Mario Carneiro, 3-Jan-2017.)
Hypotheses
Ref Expression
cofulid.g (𝜑𝐹 ∈ (𝐶 Func 𝐷))
cofurid.1 𝐼 = (idfunc𝐶)
Assertion
Ref Expression
cofurid (𝜑 → (𝐹func 𝐼) = 𝐹)

Proof of Theorem cofurid
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 cofurid.1 . . . . . 6 𝐼 = (idfunc𝐶)
2 eqid 2771 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
3 cofulid.g . . . . . . . 8 (𝜑𝐹 ∈ (𝐶 Func 𝐷))
4 funcrcl 16730 . . . . . . . 8 (𝐹 ∈ (𝐶 Func 𝐷) → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
53, 4syl 17 . . . . . . 7 (𝜑 → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
65simpld 482 . . . . . 6 (𝜑𝐶 ∈ Cat)
71, 2, 6idfu1st 16746 . . . . 5 (𝜑 → (1st𝐼) = ( I ↾ (Base‘𝐶)))
87coeq2d 5423 . . . 4 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))))
9 eqid 2771 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
10 relfunc 16729 . . . . . . 7 Rel (𝐶 Func 𝐷)
11 1st2ndbr 7366 . . . . . . 7 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
1210, 3, 11sylancr 575 . . . . . 6 (𝜑 → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
132, 9, 12funcf1 16733 . . . . 5 (𝜑 → (1st𝐹):(Base‘𝐶)⟶(Base‘𝐷))
14 fcoi1 6218 . . . . 5 ((1st𝐹):(Base‘𝐶)⟶(Base‘𝐷) → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
1513, 14syl 17 . . . 4 (𝜑 → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
168, 15eqtrd 2805 . . 3 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = (1st𝐹))
1773ad2ant1 1127 . . . . . . . . . 10 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐼) = ( I ↾ (Base‘𝐶)))
1817fveq1d 6334 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = (( I ↾ (Base‘𝐶))‘𝑥))
19 fvresi 6583 . . . . . . . . . 10 (𝑥 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
20193ad2ant2 1128 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
2118, 20eqtrd 2805 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = 𝑥)
2217fveq1d 6334 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = (( I ↾ (Base‘𝐶))‘𝑦))
23 fvresi 6583 . . . . . . . . . 10 (𝑦 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
24233ad2ant3 1129 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
2522, 24eqtrd 2805 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = 𝑦)
2621, 25oveq12d 6811 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) = (𝑥(2nd𝐹)𝑦))
2763ad2ant1 1127 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐶 ∈ Cat)
28 eqid 2771 . . . . . . . 8 (Hom ‘𝐶) = (Hom ‘𝐶)
29 simp2 1131 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
30 simp3 1132 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
311, 2, 27, 28, 29, 30idfu2nd 16744 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐼)𝑦) = ( I ↾ (𝑥(Hom ‘𝐶)𝑦)))
3226, 31coeq12d 5425 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))))
33 eqid 2771 . . . . . . . 8 (Hom ‘𝐷) = (Hom ‘𝐷)
34123ad2ant1 1127 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
352, 28, 33, 34, 29, 30funcf2 16735 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)))
36 fcoi1 6218 . . . . . . 7 ((𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3735, 36syl 17 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3832, 37eqtrd 2805 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = (𝑥(2nd𝐹)𝑦))
3938mpt2eq3dva 6866 . . . 4 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
402, 12funcfn2 16736 . . . . 5 (𝜑 → (2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)))
41 fnov 6915 . . . . 5 ((2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)) ↔ (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4240, 41sylib 208 . . . 4 (𝜑 → (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4339, 42eqtr4d 2808 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (2nd𝐹))
4416, 43opeq12d 4547 . 2 (𝜑 → ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩ = ⟨(1st𝐹), (2nd𝐹)⟩)
451idfucl 16748 . . . 4 (𝐶 ∈ Cat → 𝐼 ∈ (𝐶 Func 𝐶))
466, 45syl 17 . . 3 (𝜑𝐼 ∈ (𝐶 Func 𝐶))
472, 46, 3cofuval 16749 . 2 (𝜑 → (𝐹func 𝐼) = ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩)
48 1st2nd 7363 . . 3 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → 𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4910, 3, 48sylancr 575 . 2 (𝜑𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
5044, 47, 493eqtr4d 2815 1 (𝜑 → (𝐹func 𝐼) = 𝐹)
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 382   ∧ w3a 1071   = wceq 1631   ∈ wcel 2145  ⟨cop 4322   class class class wbr 4786   I cid 5156   × cxp 5247   ↾ cres 5251   ∘ ccom 5253  Rel wrel 5254   Fn wfn 6026  ⟶wf 6027  ‘cfv 6031  (class class class)co 6793   ↦ cmpt2 6795  1st c1st 7313  2nd c2nd 7314  Basecbs 16064  Hom chom 16160  Catccat 16532   Func cfunc 16721  idfunccidfu 16722   ∘func ccofu 16723 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-8 2147  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-rep 4904  ax-sep 4915  ax-nul 4923  ax-pow 4974  ax-pr 5034  ax-un 7096 This theorem depends on definitions:  df-bi 197  df-an 383  df-or 837  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-ral 3066  df-rex 3067  df-reu 3068  df-rmo 3069  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-nul 4064  df-if 4226  df-pw 4299  df-sn 4317  df-pr 4319  df-op 4323  df-uni 4575  df-iun 4656  df-br 4787  df-opab 4847  df-mpt 4864  df-id 5157  df-xp 5255  df-rel 5256  df-cnv 5257  df-co 5258  df-dm 5259  df-rn 5260  df-res 5261  df-ima 5262  df-iota 5994  df-fun 6033  df-fn 6034  df-f 6035  df-f1 6036  df-fo 6037  df-f1o 6038  df-fv 6039  df-riota 6754  df-ov 6796  df-oprab 6797  df-mpt2 6798  df-1st 7315  df-2nd 7316  df-map 8011  df-ixp 8063  df-cat 16536  df-cid 16537  df-func 16725  df-idfu 16726  df-cofu 16727 This theorem is referenced by:  catccatid  16959
 Copyright terms: Public domain W3C validator