Metamath Proof Explorer


Theorem cofurid

Description: The identity functor is a right identity for composition. (Contributed by Mario Carneiro, 3-Jan-2017)

Ref Expression
Hypotheses cofulid.g φFCFuncD
cofurid.1 I=idfuncC
Assertion cofurid φFfuncI=F

Proof

Step Hyp Ref Expression
1 cofulid.g φFCFuncD
2 cofurid.1 I=idfuncC
3 eqid BaseC=BaseC
4 funcrcl FCFuncDCCatDCat
5 1 4 syl φCCatDCat
6 5 simpld φCCat
7 2 3 6 idfu1st φ1stI=IBaseC
8 7 coeq2d φ1stF1stI=1stFIBaseC
9 eqid BaseD=BaseD
10 relfunc RelCFuncD
11 1st2ndbr RelCFuncDFCFuncD1stFCFuncD2ndF
12 10 1 11 sylancr φ1stFCFuncD2ndF
13 3 9 12 funcf1 φ1stF:BaseCBaseD
14 fcoi1 1stF:BaseCBaseD1stFIBaseC=1stF
15 13 14 syl φ1stFIBaseC=1stF
16 8 15 eqtrd φ1stF1stI=1stF
17 7 3ad2ant1 φxBaseCyBaseC1stI=IBaseC
18 17 fveq1d φxBaseCyBaseC1stIx=IBaseCx
19 fvresi xBaseCIBaseCx=x
20 19 3ad2ant2 φxBaseCyBaseCIBaseCx=x
21 18 20 eqtrd φxBaseCyBaseC1stIx=x
22 17 fveq1d φxBaseCyBaseC1stIy=IBaseCy
23 fvresi yBaseCIBaseCy=y
24 23 3ad2ant3 φxBaseCyBaseCIBaseCy=y
25 22 24 eqtrd φxBaseCyBaseC1stIy=y
26 21 25 oveq12d φxBaseCyBaseC1stIx2ndF1stIy=x2ndFy
27 6 3ad2ant1 φxBaseCyBaseCCCat
28 eqid HomC=HomC
29 simp2 φxBaseCyBaseCxBaseC
30 simp3 φxBaseCyBaseCyBaseC
31 2 3 27 28 29 30 idfu2nd φxBaseCyBaseCx2ndIy=IxHomCy
32 26 31 coeq12d φxBaseCyBaseC1stIx2ndF1stIyx2ndIy=x2ndFyIxHomCy
33 eqid HomD=HomD
34 12 3ad2ant1 φxBaseCyBaseC1stFCFuncD2ndF
35 3 28 33 34 29 30 funcf2 φxBaseCyBaseCx2ndFy:xHomCy1stFxHomD1stFy
36 fcoi1 x2ndFy:xHomCy1stFxHomD1stFyx2ndFyIxHomCy=x2ndFy
37 35 36 syl φxBaseCyBaseCx2ndFyIxHomCy=x2ndFy
38 32 37 eqtrd φxBaseCyBaseC1stIx2ndF1stIyx2ndIy=x2ndFy
39 38 mpoeq3dva φxBaseC,yBaseC1stIx2ndF1stIyx2ndIy=xBaseC,yBaseCx2ndFy
40 3 12 funcfn2 φ2ndFFnBaseC×BaseC
41 fnov 2ndFFnBaseC×BaseC2ndF=xBaseC,yBaseCx2ndFy
42 40 41 sylib φ2ndF=xBaseC,yBaseCx2ndFy
43 39 42 eqtr4d φxBaseC,yBaseC1stIx2ndF1stIyx2ndIy=2ndF
44 16 43 opeq12d φ1stF1stIxBaseC,yBaseC1stIx2ndF1stIyx2ndIy=1stF2ndF
45 2 idfucl CCatICFuncC
46 6 45 syl φICFuncC
47 3 46 1 cofuval φFfuncI=1stF1stIxBaseC,yBaseC1stIx2ndF1stIyx2ndIy
48 1st2nd RelCFuncDFCFuncDF=1stF2ndF
49 10 1 48 sylancr φF=1stF2ndF
50 44 47 49 3eqtr4d φFfuncI=F