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

Theorem cofurid 17149
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 2818 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
3 cofulid.g . . . . . . . 8 (𝜑𝐹 ∈ (𝐶 Func 𝐷))
4 funcrcl 17121 . . . . . . . 8 (𝐹 ∈ (𝐶 Func 𝐷) → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
53, 4syl 17 . . . . . . 7 (𝜑 → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
65simpld 495 . . . . . 6 (𝜑𝐶 ∈ Cat)
71, 2, 6idfu1st 17137 . . . . 5 (𝜑 → (1st𝐼) = ( I ↾ (Base‘𝐶)))
87coeq2d 5726 . . . 4 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))))
9 eqid 2818 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
10 relfunc 17120 . . . . . . 7 Rel (𝐶 Func 𝐷)
11 1st2ndbr 7730 . . . . . . 7 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
1210, 3, 11sylancr 587 . . . . . 6 (𝜑 → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
132, 9, 12funcf1 17124 . . . . 5 (𝜑 → (1st𝐹):(Base‘𝐶)⟶(Base‘𝐷))
14 fcoi1 6545 . . . . 5 ((1st𝐹):(Base‘𝐶)⟶(Base‘𝐷) → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
1513, 14syl 17 . . . 4 (𝜑 → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
168, 15eqtrd 2853 . . 3 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = (1st𝐹))
1773ad2ant1 1125 . . . . . . . . . 10 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐼) = ( I ↾ (Base‘𝐶)))
1817fveq1d 6665 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = (( I ↾ (Base‘𝐶))‘𝑥))
19 fvresi 6927 . . . . . . . . . 10 (𝑥 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
20193ad2ant2 1126 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
2118, 20eqtrd 2853 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = 𝑥)
2217fveq1d 6665 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = (( I ↾ (Base‘𝐶))‘𝑦))
23 fvresi 6927 . . . . . . . . . 10 (𝑦 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
24233ad2ant3 1127 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
2522, 24eqtrd 2853 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = 𝑦)
2621, 25oveq12d 7163 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) = (𝑥(2nd𝐹)𝑦))
2763ad2ant1 1125 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐶 ∈ Cat)
28 eqid 2818 . . . . . . . 8 (Hom ‘𝐶) = (Hom ‘𝐶)
29 simp2 1129 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
30 simp3 1130 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
311, 2, 27, 28, 29, 30idfu2nd 17135 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐼)𝑦) = ( I ↾ (𝑥(Hom ‘𝐶)𝑦)))
3226, 31coeq12d 5728 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))))
33 eqid 2818 . . . . . . . 8 (Hom ‘𝐷) = (Hom ‘𝐷)
34123ad2ant1 1125 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
352, 28, 33, 34, 29, 30funcf2 17126 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)))
36 fcoi1 6545 . . . . . . 7 ((𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3735, 36syl 17 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3832, 37eqtrd 2853 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = (𝑥(2nd𝐹)𝑦))
3938mpoeq3dva 7220 . . . 4 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
402, 12funcfn2 17127 . . . . 5 (𝜑 → (2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)))
41 fnov 7271 . . . . 5 ((2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)) ↔ (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4240, 41sylib 219 . . . 4 (𝜑 → (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4339, 42eqtr4d 2856 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (2nd𝐹))
4416, 43opeq12d 4803 . 2 (𝜑 → ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩ = ⟨(1st𝐹), (2nd𝐹)⟩)
451idfucl 17139 . . . 4 (𝐶 ∈ Cat → 𝐼 ∈ (𝐶 Func 𝐶))
466, 45syl 17 . . 3 (𝜑𝐼 ∈ (𝐶 Func 𝐶))
472, 46, 3cofuval 17140 . 2 (𝜑 → (𝐹func 𝐼) = ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩)
48 1st2nd 7727 . . 3 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → 𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4910, 3, 48sylancr 587 . 2 (𝜑𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
5044, 47, 493eqtr4d 2863 1 (𝜑 → (𝐹func 𝐼) = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396  w3a 1079   = wceq 1528  wcel 2105  cop 4563   class class class wbr 5057   I cid 5452   × cxp 5546  cres 5550  ccom 5552  Rel wrel 5553   Fn wfn 6343  wf 6344  cfv 6348  (class class class)co 7145  cmpo 7147  1st c1st 7676  2nd c2nd 7677  Basecbs 16471  Hom chom 16564  Catccat 16923   Func cfunc 17112  idfunccidfu 17113  func ccofu 17114
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1787  ax-4 1801  ax-5 1902  ax-6 1961  ax-7 2006  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2151  ax-12 2167  ax-ext 2790  ax-rep 5181  ax-sep 5194  ax-nul 5201  ax-pow 5257  ax-pr 5320  ax-un 7450
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 842  df-3an 1081  df-tru 1531  df-ex 1772  df-nf 1776  df-sb 2061  df-mo 2615  df-eu 2647  df-clab 2797  df-cleq 2811  df-clel 2890  df-nfc 2960  df-ne 3014  df-ral 3140  df-rex 3141  df-reu 3142  df-rmo 3143  df-rab 3144  df-v 3494  df-sbc 3770  df-csb 3881  df-dif 3936  df-un 3938  df-in 3940  df-ss 3949  df-nul 4289  df-if 4464  df-pw 4537  df-sn 4558  df-pr 4560  df-op 4564  df-uni 4831  df-iun 4912  df-br 5058  df-opab 5120  df-mpt 5138  df-id 5453  df-xp 5554  df-rel 5555  df-cnv 5556  df-co 5557  df-dm 5558  df-rn 5559  df-res 5560  df-ima 5561  df-iota 6307  df-fun 6350  df-fn 6351  df-f 6352  df-f1 6353  df-fo 6354  df-f1o 6355  df-fv 6356  df-riota 7103  df-ov 7148  df-oprab 7149  df-mpo 7150  df-1st 7678  df-2nd 7679  df-map 8397  df-ixp 8450  df-cat 16927  df-cid 16928  df-func 17116  df-idfu 17117  df-cofu 17118
This theorem is referenced by:  catccatid  17350
  Copyright terms: Public domain W3C validator