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

Theorem cofurid 16994
 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 2797 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
3 cofulid.g . . . . . . . 8 (𝜑𝐹 ∈ (𝐶 Func 𝐷))
4 funcrcl 16966 . . . . . . . 8 (𝐹 ∈ (𝐶 Func 𝐷) → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
53, 4syl 17 . . . . . . 7 (𝜑 → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
65simpld 495 . . . . . 6 (𝜑𝐶 ∈ Cat)
71, 2, 6idfu1st 16982 . . . . 5 (𝜑 → (1st𝐼) = ( I ↾ (Base‘𝐶)))
87coeq2d 5626 . . . 4 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))))
9 eqid 2797 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
10 relfunc 16965 . . . . . . 7 Rel (𝐶 Func 𝐷)
11 1st2ndbr 7604 . . . . . . 7 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
1210, 3, 11sylancr 587 . . . . . 6 (𝜑 → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
132, 9, 12funcf1 16969 . . . . 5 (𝜑 → (1st𝐹):(Base‘𝐶)⟶(Base‘𝐷))
14 fcoi1 6427 . . . . 5 ((1st𝐹):(Base‘𝐶)⟶(Base‘𝐷) → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
1513, 14syl 17 . . . 4 (𝜑 → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
168, 15eqtrd 2833 . . 3 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = (1st𝐹))
1773ad2ant1 1126 . . . . . . . . . 10 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐼) = ( I ↾ (Base‘𝐶)))
1817fveq1d 6547 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = (( I ↾ (Base‘𝐶))‘𝑥))
19 fvresi 6805 . . . . . . . . . 10 (𝑥 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
20193ad2ant2 1127 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
2118, 20eqtrd 2833 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = 𝑥)
2217fveq1d 6547 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = (( I ↾ (Base‘𝐶))‘𝑦))
23 fvresi 6805 . . . . . . . . . 10 (𝑦 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
24233ad2ant3 1128 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
2522, 24eqtrd 2833 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = 𝑦)
2621, 25oveq12d 7041 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) = (𝑥(2nd𝐹)𝑦))
2763ad2ant1 1126 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐶 ∈ Cat)
28 eqid 2797 . . . . . . . 8 (Hom ‘𝐶) = (Hom ‘𝐶)
29 simp2 1130 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
30 simp3 1131 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
311, 2, 27, 28, 29, 30idfu2nd 16980 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐼)𝑦) = ( I ↾ (𝑥(Hom ‘𝐶)𝑦)))
3226, 31coeq12d 5628 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))))
33 eqid 2797 . . . . . . . 8 (Hom ‘𝐷) = (Hom ‘𝐷)
34123ad2ant1 1126 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
352, 28, 33, 34, 29, 30funcf2 16971 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)))
36 fcoi1 6427 . . . . . . 7 ((𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3735, 36syl 17 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3832, 37eqtrd 2833 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = (𝑥(2nd𝐹)𝑦))
3938mpoeq3dva 7096 . . . 4 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
402, 12funcfn2 16972 . . . . 5 (𝜑 → (2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)))
41 fnov 7145 . . . . 5 ((2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)) ↔ (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4240, 41sylib 219 . . . 4 (𝜑 → (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4339, 42eqtr4d 2836 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (2nd𝐹))
4416, 43opeq12d 4724 . 2 (𝜑 → ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩ = ⟨(1st𝐹), (2nd𝐹)⟩)
451idfucl 16984 . . . 4 (𝐶 ∈ Cat → 𝐼 ∈ (𝐶 Func 𝐶))
466, 45syl 17 . . 3 (𝜑𝐼 ∈ (𝐶 Func 𝐶))
472, 46, 3cofuval 16985 . 2 (𝜑 → (𝐹func 𝐼) = ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩)
48 1st2nd 7601 . . 3 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → 𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4910, 3, 48sylancr 587 . 2 (𝜑𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
5044, 47, 493eqtr4d 2843 1 (𝜑 → (𝐹func 𝐼) = 𝐹)
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 396   ∧ w3a 1080   = wceq 1525   ∈ wcel 2083  ⟨cop 4484   class class class wbr 4968   I cid 5354   × cxp 5448   ↾ cres 5452   ∘ ccom 5454  Rel wrel 5455   Fn wfn 6227  ⟶wf 6228  ‘cfv 6232  (class class class)co 7023   ∈ cmpo 7025  1st c1st 7550  2nd c2nd 7551  Basecbs 16316  Hom chom 16409  Catccat 16768   Func cfunc 16957  idfunccidfu 16958   ∘func ccofu 16959 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1781  ax-4 1795  ax-5 1892  ax-6 1951  ax-7 1996  ax-8 2085  ax-9 2093  ax-10 2114  ax-11 2128  ax-12 2143  ax-13 2346  ax-ext 2771  ax-rep 5088  ax-sep 5101  ax-nul 5108  ax-pow 5164  ax-pr 5228  ax-un 7326 This theorem depends on definitions:  df-bi 208  df-an 397  df-or 843  df-3an 1082  df-tru 1528  df-ex 1766  df-nf 1770  df-sb 2045  df-mo 2578  df-eu 2614  df-clab 2778  df-cleq 2790  df-clel 2865  df-nfc 2937  df-ne 2987  df-ral 3112  df-rex 3113  df-reu 3114  df-rmo 3115  df-rab 3116  df-v 3442  df-sbc 3712  df-csb 3818  df-dif 3868  df-un 3870  df-in 3872  df-ss 3880  df-nul 4218  df-if 4388  df-pw 4461  df-sn 4479  df-pr 4481  df-op 4485  df-uni 4752  df-iun 4833  df-br 4969  df-opab 5031  df-mpt 5048  df-id 5355  df-xp 5456  df-rel 5457  df-cnv 5458  df-co 5459  df-dm 5460  df-rn 5461  df-res 5462  df-ima 5463  df-iota 6196  df-fun 6234  df-fn 6235  df-f 6236  df-f1 6237  df-fo 6238  df-f1o 6239  df-fv 6240  df-riota 6984  df-ov 7026  df-oprab 7027  df-mpo 7028  df-1st 7552  df-2nd 7553  df-map 8265  df-ixp 8318  df-cat 16772  df-cid 16773  df-func 16961  df-idfu 16962  df-cofu 16963 This theorem is referenced by:  catccatid  17195
 Copyright terms: Public domain W3C validator