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

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

Proof of Theorem cofulid
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 cofulid.1 . . . . . 6 𝐼 = (idfunc𝐷)
2 eqid 2622 . . . . . 6 (Base‘𝐷) = (Base‘𝐷)
3 cofulid.g . . . . . . . 8 (𝜑𝐹 ∈ (𝐶 Func 𝐷))
4 funcrcl 16523 . . . . . . . 8 (𝐹 ∈ (𝐶 Func 𝐷) → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
53, 4syl 17 . . . . . . 7 (𝜑 → (𝐶 ∈ Cat ∧ 𝐷 ∈ Cat))
65simprd 479 . . . . . 6 (𝜑𝐷 ∈ Cat)
71, 2, 6idfu1st 16539 . . . . 5 (𝜑 → (1st𝐼) = ( I ↾ (Base‘𝐷)))
87coeq1d 5283 . . . 4 (𝜑 → ((1st𝐼) ∘ (1st𝐹)) = (( I ↾ (Base‘𝐷)) ∘ (1st𝐹)))
9 eqid 2622 . . . . . 6 (Base‘𝐶) = (Base‘𝐶)
10 relfunc 16522 . . . . . . 7 Rel (𝐶 Func 𝐷)
11 1st2ndbr 7217 . . . . . . 7 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
1210, 3, 11sylancr 695 . . . . . 6 (𝜑 → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
139, 2, 12funcf1 16526 . . . . 5 (𝜑 → (1st𝐹):(Base‘𝐶)⟶(Base‘𝐷))
14 fcoi2 6079 . . . . 5 ((1st𝐹):(Base‘𝐶)⟶(Base‘𝐷) → (( I ↾ (Base‘𝐷)) ∘ (1st𝐹)) = (1st𝐹))
1513, 14syl 17 . . . 4 (𝜑 → (( I ↾ (Base‘𝐷)) ∘ (1st𝐹)) = (1st𝐹))
168, 15eqtrd 2656 . . 3 (𝜑 → ((1st𝐼) ∘ (1st𝐹)) = (1st𝐹))
1763ad2ant1 1082 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝐷 ∈ Cat)
18 eqid 2622 . . . . . . . 8 (Hom ‘𝐷) = (Hom ‘𝐷)
1913ffvelrnda 6359 . . . . . . . . 9 ((𝜑𝑥 ∈ (Base‘𝐶)) → ((1st𝐹)‘𝑥) ∈ (Base‘𝐷))
20193adant3 1081 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐹)‘𝑥) ∈ (Base‘𝐷))
2113ffvelrnda 6359 . . . . . . . . 9 ((𝜑𝑦 ∈ (Base‘𝐶)) → ((1st𝐹)‘𝑦) ∈ (Base‘𝐷))
22213adant2 1080 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((1st𝐹)‘𝑦) ∈ (Base‘𝐷))
231, 2, 17, 18, 20, 22idfu2nd 16537 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) = ( I ↾ (((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦))))
2423coeq1d 5283 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦)) = (( I ↾ (((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦))) ∘ (𝑥(2nd𝐹)𝑦)))
25 eqid 2622 . . . . . . . 8 (Hom ‘𝐶) = (Hom ‘𝐶)
26123ad2ant1 1082 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (1st𝐹)(𝐶 Func 𝐷)(2nd𝐹))
27 simp2 1062 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑥 ∈ (Base‘𝐶))
28 simp3 1063 . . . . . . . 8 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → 𝑦 ∈ (Base‘𝐶))
299, 25, 18, 26, 27, 28funcf2 16528 . . . . . . 7 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)))
30 fcoi2 6079 . . . . . . 7 ((𝑥(2nd𝐹)𝑦):(𝑥(Hom ‘𝐶)𝑦)⟶(((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦)) → (( I ↾ (((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦))) ∘ (𝑥(2nd𝐹)𝑦)) = (𝑥(2nd𝐹)𝑦))
3129, 30syl 17 . . . . . 6 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → (( I ↾ (((1st𝐹)‘𝑥)(Hom ‘𝐷)((1st𝐹)‘𝑦))) ∘ (𝑥(2nd𝐹)𝑦)) = (𝑥(2nd𝐹)𝑦))
3224, 31eqtrd 2656 . . . . 5 ((𝜑𝑥 ∈ (Base‘𝐶) ∧ 𝑦 ∈ (Base‘𝐶)) → ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦)) = (𝑥(2nd𝐹)𝑦))
3332mpt2eq3dva 6719 . . . 4 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦))) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
349, 12funcfn2 16529 . . . . 5 (𝜑 → (2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)))
35 fnov 6768 . . . . 5 ((2nd𝐹) Fn ((Base‘𝐶) × (Base‘𝐶)) ↔ (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
3634, 35sylib 208 . . . 4 (𝜑 → (2nd𝐹) = (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ (𝑥(2nd𝐹)𝑦)))
3733, 36eqtr4d 2659 . . 3 (𝜑 → (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦))) = (2nd𝐹))
3816, 37opeq12d 4410 . 2 (𝜑 → ⟨((1st𝐼) ∘ (1st𝐹)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦)))⟩ = ⟨(1st𝐹), (2nd𝐹)⟩)
391idfucl 16541 . . . 4 (𝐷 ∈ Cat → 𝐼 ∈ (𝐷 Func 𝐷))
406, 39syl 17 . . 3 (𝜑𝐼 ∈ (𝐷 Func 𝐷))
419, 3, 40cofuval 16542 . 2 (𝜑 → (𝐼func 𝐹) = ⟨((1st𝐼) ∘ (1st𝐹)), (𝑥 ∈ (Base‘𝐶), 𝑦 ∈ (Base‘𝐶) ↦ ((((1st𝐹)‘𝑥)(2nd𝐼)((1st𝐹)‘𝑦)) ∘ (𝑥(2nd𝐹)𝑦)))⟩)
42 1st2nd 7214 . . 3 ((Rel (𝐶 Func 𝐷) ∧ 𝐹 ∈ (𝐶 Func 𝐷)) → 𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4310, 3, 42sylancr 695 . 2 (𝜑𝐹 = ⟨(1st𝐹), (2nd𝐹)⟩)
4438, 41, 433eqtr4d 2666 1 (𝜑 → (𝐼func 𝐹) = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 384  w3a 1037   = wceq 1483  wcel 1990  cop 4183   class class class wbr 4653   I cid 5023   × cxp 5112  cres 5116  ccom 5118  Rel wrel 5119   Fn wfn 5883  wf 5884  cfv 5888  (class class class)co 6650  cmpt2 6652  1st c1st 7166  2nd c2nd 7167  Basecbs 15857  Hom chom 15952  Catccat 16325   Func cfunc 16514  idfunccidfu 16515  func ccofu 16516
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-rep 4771  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ne 2795  df-ral 2917  df-rex 2918  df-reu 2919  df-rmo 2920  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-nul 3916  df-if 4087  df-pw 4160  df-sn 4178  df-pr 4180  df-op 4184  df-uni 4437  df-iun 4522  df-br 4654  df-opab 4713  df-mpt 4730  df-id 5024  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-rn 5125  df-res 5126  df-ima 5127  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-riota 6611  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-1st 7168  df-2nd 7169  df-map 7859  df-ixp 7909  df-cat 16329  df-cid 16330  df-func 16518  df-idfu 16519  df-cofu 16520
This theorem is referenced by:  catccatid  16752
  Copyright terms: Public domain W3C validator