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

Theorem cofurid 17161
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 2821 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
3 cofulid.g . . . . . . . 8 (𝜑𝐹 ∈ (𝐶 Func 𝐷))
4 funcrcl 17133 . . . . . . . 8 (𝐹 ∈ (𝐶 Func 𝐷) → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
53, 4syl 17 . . . . . . 7 (𝜑 → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
65simpld 497 . . . . . 6 (𝜑𝐶 ∈ Cat)
71, 2, 6idfu1st 17149 . . . . 5 (𝜑 → (1st𝐼) = ( I ↾ (Base‘𝐶)))
87coeq2d 5733 . . . 4 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))))
9 eqid 2821 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
10 relfunc 17132 . . . . . . 7 Rel (𝐶 Func 𝐷)
11 1st2ndbr 7741 . . . . . . 7 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
1210, 3, 11sylancr 589 . . . . . 6 (𝜑 → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
132, 9, 12funcf1 17136 . . . . 5 (𝜑 → (1st𝐹):(Base‘𝐶)⟶(Base‘𝐷))
14 fcoi1 6552 . . . . 5 ((1st𝐹):(Base‘𝐶)⟶(Base‘𝐷) → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
1513, 14syl 17 . . . 4 (𝜑 → ((1st𝐹) ∘ ( I ↾ (Base‘𝐶))) = (1st𝐹))
168, 15eqtrd 2856 . . 3 (𝜑 → ((1st𝐹) ∘ (1st𝐼)) = (1st𝐹))
1773ad2ant1 1129 . . . . . . . . . 10 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐼) = ( I ↾ (Base‘𝐶)))
1817fveq1d 6672 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = (( I ↾ (Base‘𝐶))‘𝑥))
19 fvresi 6935 . . . . . . . . . 10 (𝑥 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
20193ad2ant2 1130 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑥) = 𝑥)
2118, 20eqtrd 2856 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑥) = 𝑥)
2217fveq1d 6672 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = (( I ↾ (Base‘𝐶))‘𝑦))
23 fvresi 6935 . . . . . . . . . 10 (𝑦 ∈ (Base‘𝐶) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
24233ad2ant3 1131 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (Base‘𝐶))‘𝑦) = 𝑦)
2522, 24eqtrd 2856 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐼)‘𝑦) = 𝑦)
2621, 25oveq12d 7174 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) = (𝑥(2nd𝐹)𝑦))
2763ad2ant1 1129 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐶 ∈ Cat)
28 eqid 2821 . . . . . . . 8 (Hom ‘𝐶) = (Hom ‘𝐶)
29 simp2 1133 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
30 simp3 1134 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
311, 2, 27, 28, 29, 30idfu2nd 17147 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐼)𝑦) = ( I ↾ (𝑥(Hom ‘𝐶)𝑦)))
3226, 31coeq12d 5735 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))))
33 eqid 2821 . . . . . . . 8 (Hom ‘𝐷) = (Hom ‘𝐷)
34123ad2ant1 1129 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
352, 28, 33, 34, 29, 30funcf2 17138 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)))
36 fcoi1 6552 . . . . . . 7 ((𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3735, 36syl 17 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((𝑥(2nd𝐹)𝑦) ∘ ( I ↾ (𝑥(Hom ‘𝐶)𝑦))) = (𝑥(2nd𝐹)𝑦))
3832, 37eqtrd 2856 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)) = (𝑥(2nd𝐹)𝑦))
3938mpoeq3dva 7231 . . . 4 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
402, 12funcfn2 17139 . . . . 5 (𝜑 → (2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)))
41 fnov 7282 . . . . 5 ((2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)) ↔ (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4240, 41sylib 220 . . . 4 (𝜑 → (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
4339, 42eqtr4d 2859 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦))) = (2nd𝐹))
4416, 43opeq12d 4811 . 2 (𝜑 → ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩ = ⟨(1st𝐹), (2nd𝐹)⟩)
451idfucl 17151 . . . 4 (𝐶 ∈ Cat → 𝐼 ∈ (𝐶 Func 𝐶))
466, 45syl 17 . . 3 (𝜑𝐼 ∈ (𝐶 Func 𝐶))
472, 46, 3cofuval 17152 . 2 (𝜑 → (𝐹func 𝐼) = ⟨((1st𝐹) ∘ (1st𝐼)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐼)‘𝑥)(2nd𝐹)((1st𝐼)‘𝑦)) ∘ (𝑥(2nd𝐼)𝑦)))⟩)
48 1st2nd 7738 . . 3 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → 𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4910, 3, 48sylancr 589 . 2 (𝜑𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
5044, 47, 493eqtr4d 2866 1 (𝜑 → (𝐹func 𝐼) = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 398  w3a 1083   = wceq 1537  wcel 2114  cop 4573   class class class wbr 5066   I cid 5459   × cxp 5553  cres 5557  ccom 5559  Rel wrel 5560   Fn wfn 6350  wf 6351  cfv 6355  (class class class)co 7156  cmpo 7158  1st c1st 7687  2nd c2nd 7688  Basecbs 16483  Hom chom 16576  Catccat 16935   Func cfunc 17124  idfunccidfu 17125  func ccofu 17126
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2793  ax-rep 5190  ax-sep 5203  ax-nul 5210  ax-pow 5266  ax-pr 5330  ax-un 7461
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ne 3017  df-ral 3143  df-rex 3144  df-reu 3145  df-rmo 3146  df-rab 3147  df-v 3496  df-sbc 3773  df-csb 3884  df-dif 3939  df-un 3941  df-in 3943  df-ss 3952  df-nul 4292  df-if 4468  df-pw 4541  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4839  df-iun 4921  df-br 5067  df-opab 5129  df-mpt 5147  df-id 5460  df-xp 5561  df-rel 5562  df-cnv 5563  df-co 5564  df-dm 5565  df-rn 5566  df-res 5567  df-ima 5568  df-iota 6314  df-fun 6357  df-fn 6358  df-f 6359  df-f1 6360  df-fo 6361  df-f1o 6362  df-fv 6363  df-riota 7114  df-ov 7159  df-oprab 7160  df-mpo 7161  df-1st 7689  df-2nd 7690  df-map 8408  df-ixp 8462  df-cat 16939  df-cid 16940  df-func 17128  df-idfu 17129  df-cofu 17130
This theorem is referenced by:  catccatid  17362
  Copyright terms: Public domain W3C validator