Metamath Proof Explorer


Theorem curfuncf

Description: Cancellation of curry with uncurry. (Contributed by Mario Carneiro, 13-Jan-2017)

Ref Expression
Hypotheses uncfval.g F=⟨“CDE”⟩uncurryFG
uncfval.c φDCat
uncfval.d φECat
uncfval.f φGCFuncDFuncCatE
Assertion curfuncf φCDcurryFF=G

Proof

Step Hyp Ref Expression
1 uncfval.g F=⟨“CDE”⟩uncurryFG
2 uncfval.c φDCat
3 uncfval.d φECat
4 uncfval.f φGCFuncDFuncCatE
5 2 ad2antrr φxBaseCyBaseDDCat
6 3 ad2antrr φxBaseCyBaseDECat
7 4 ad2antrr φxBaseCyBaseDGCFuncDFuncCatE
8 eqid BaseC=BaseC
9 eqid BaseD=BaseD
10 simplr φxBaseCyBaseDxBaseC
11 simpr φxBaseCyBaseDyBaseD
12 1 5 6 7 8 9 10 11 uncf1 φxBaseCyBaseDx1stFy=1st1stGxy
13 12 mpteq2dva φxBaseCyBaseDx1stFy=yBaseD1st1stGxy
14 eqid BaseE=BaseE
15 relfunc RelDFuncE
16 eqid DFuncCatE=DFuncCatE
17 16 fucbas DFuncE=BaseDFuncCatE
18 relfunc RelCFuncDFuncCatE
19 1st2ndbr RelCFuncDFuncCatEGCFuncDFuncCatE1stGCFuncDFuncCatE2ndG
20 18 4 19 sylancr φ1stGCFuncDFuncCatE2ndG
21 8 17 20 funcf1 φ1stG:BaseCDFuncE
22 21 ffvelcdmda φxBaseC1stGxDFuncE
23 1st2ndbr RelDFuncE1stGxDFuncE1st1stGxDFuncE2nd1stGx
24 15 22 23 sylancr φxBaseC1st1stGxDFuncE2nd1stGx
25 9 14 24 funcf1 φxBaseC1st1stGx:BaseDBaseE
26 25 feqmptd φxBaseC1st1stGx=yBaseD1st1stGxy
27 13 26 eqtr4d φxBaseCyBaseDx1stFy=1st1stGx
28 2 ad3antrrr φxBaseCyBaseDzBaseDgyHomDzDCat
29 3 ad3antrrr φxBaseCyBaseDzBaseDgyHomDzECat
30 4 ad3antrrr φxBaseCyBaseDzBaseDgyHomDzGCFuncDFuncCatE
31 simpllr φxBaseCyBaseDzBaseDgyHomDzxBaseC
32 simplrl φxBaseCyBaseDzBaseDgyHomDzyBaseD
33 eqid HomC=HomC
34 eqid HomD=HomD
35 simprr φxBaseCyBaseDzBaseDzBaseD
36 35 adantr φxBaseCyBaseDzBaseDgyHomDzzBaseD
37 eqid IdC=IdC
38 funcrcl GCFuncDFuncCatECCatDFuncCatECat
39 4 38 syl φCCatDFuncCatECat
40 39 simpld φCCat
41 40 ad3antrrr φxBaseCyBaseDzBaseDgyHomDzCCat
42 8 33 37 41 31 catidcl φxBaseCyBaseDzBaseDgyHomDzIdCxxHomCx
43 simpr φxBaseCyBaseDzBaseDgyHomDzgyHomDz
44 1 28 29 30 8 9 31 32 33 34 31 36 42 43 uncf2 φxBaseCyBaseDzBaseDgyHomDzIdCxxy2ndFxzg=x2ndGxIdCxz1st1stGxy1st1stGxzcompE1st1stGxzy2nd1stGxzg
45 eqid IdDFuncCatE=IdDFuncCatE
46 20 ad3antrrr φxBaseCyBaseDzBaseDgyHomDz1stGCFuncDFuncCatE2ndG
47 8 37 45 46 31 funcid φxBaseCyBaseDzBaseDgyHomDzx2ndGxIdCx=IdDFuncCatE1stGx
48 eqid IdE=IdE
49 22 ad2antrr φxBaseCyBaseDzBaseDgyHomDz1stGxDFuncE
50 16 45 48 49 fucid φxBaseCyBaseDzBaseDgyHomDzIdDFuncCatE1stGx=IdE1st1stGx
51 47 50 eqtrd φxBaseCyBaseDzBaseDgyHomDzx2ndGxIdCx=IdE1st1stGx
52 51 fveq1d φxBaseCyBaseDzBaseDgyHomDzx2ndGxIdCxz=IdE1st1stGxz
53 25 ad2antrr φxBaseCyBaseDzBaseDgyHomDz1st1stGx:BaseDBaseE
54 fvco3 1st1stGx:BaseDBaseEzBaseDIdE1st1stGxz=IdE1st1stGxz
55 53 36 54 syl2anc φxBaseCyBaseDzBaseDgyHomDzIdE1st1stGxz=IdE1st1stGxz
56 52 55 eqtrd φxBaseCyBaseDzBaseDgyHomDzx2ndGxIdCxz=IdE1st1stGxz
57 56 oveq1d φxBaseCyBaseDzBaseDgyHomDzx2ndGxIdCxz1st1stGxy1st1stGxzcompE1st1stGxzy2nd1stGxzg=IdE1st1stGxz1st1stGxy1st1stGxzcompE1st1stGxzy2nd1stGxzg
58 eqid HomE=HomE
59 53 32 ffvelcdmd φxBaseCyBaseDzBaseDgyHomDz1st1stGxyBaseE
60 eqid compE=compE
61 53 36 ffvelcdmd φxBaseCyBaseDzBaseDgyHomDz1st1stGxzBaseE
62 24 adantr φxBaseCyBaseDzBaseD1st1stGxDFuncE2nd1stGx
63 simprl φxBaseCyBaseDzBaseDyBaseD
64 9 34 58 62 63 35 funcf2 φxBaseCyBaseDzBaseDy2nd1stGxz:yHomDz1st1stGxyHomE1st1stGxz
65 64 ffvelcdmda φxBaseCyBaseDzBaseDgyHomDzy2nd1stGxzg1st1stGxyHomE1st1stGxz
66 14 58 48 29 59 60 61 65 catlid φxBaseCyBaseDzBaseDgyHomDzIdE1st1stGxz1st1stGxy1st1stGxzcompE1st1stGxzy2nd1stGxzg=y2nd1stGxzg
67 44 57 66 3eqtrd φxBaseCyBaseDzBaseDgyHomDzIdCxxy2ndFxzg=y2nd1stGxzg
68 67 mpteq2dva φxBaseCyBaseDzBaseDgyHomDzIdCxxy2ndFxzg=gyHomDzy2nd1stGxzg
69 64 feqmptd φxBaseCyBaseDzBaseDy2nd1stGxz=gyHomDzy2nd1stGxzg
70 68 69 eqtr4d φxBaseCyBaseDzBaseDgyHomDzIdCxxy2ndFxzg=y2nd1stGxz
71 70 3impb φxBaseCyBaseDzBaseDgyHomDzIdCxxy2ndFxzg=y2nd1stGxz
72 71 mpoeq3dva φxBaseCyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=yBaseD,zBaseDy2nd1stGxz
73 9 24 funcfn2 φxBaseC2nd1stGxFnBaseD×BaseD
74 fnov 2nd1stGxFnBaseD×BaseD2nd1stGx=yBaseD,zBaseDy2nd1stGxz
75 73 74 sylib φxBaseC2nd1stGx=yBaseD,zBaseDy2nd1stGxz
76 72 75 eqtr4d φxBaseCyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=2nd1stGx
77 27 76 opeq12d φxBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=1st1stGx2nd1stGx
78 1st2nd RelDFuncE1stGxDFuncE1stGx=1st1stGx2nd1stGx
79 15 22 78 sylancr φxBaseC1stGx=1st1stGx2nd1stGx
80 77 79 eqtr4d φxBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=1stGx
81 80 mpteq2dva φxBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=xBaseC1stGx
82 21 feqmptd φ1stG=xBaseC1stGx
83 81 82 eqtr4d φxBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzg=1stG
84 2 ad3antrrr φxBaseCyBaseCgxHomCyzBaseDDCat
85 3 ad3antrrr φxBaseCyBaseCgxHomCyzBaseDECat
86 4 ad3antrrr φxBaseCyBaseCgxHomCyzBaseDGCFuncDFuncCatE
87 simprl φxBaseCyBaseCxBaseC
88 87 ad2antrr φxBaseCyBaseCgxHomCyzBaseDxBaseC
89 simpr φxBaseCyBaseCgxHomCyzBaseDzBaseD
90 simprr φxBaseCyBaseCyBaseC
91 90 ad2antrr φxBaseCyBaseCgxHomCyzBaseDyBaseC
92 simplr φxBaseCyBaseCgxHomCyzBaseDgxHomCy
93 eqid IdD=IdD
94 9 34 93 84 89 catidcl φxBaseCyBaseCgxHomCyzBaseDIdDzzHomDz
95 1 84 85 86 8 9 88 89 33 34 91 89 92 94 uncf2 φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=x2ndGygz1st1stGxz1st1stGxzcompE1st1stGyzz2nd1stGxzIdDz
96 22 adantrr φxBaseCyBaseC1stGxDFuncE
97 96 adantr φxBaseCyBaseCgxHomCy1stGxDFuncE
98 15 97 23 sylancr φxBaseCyBaseCgxHomCy1st1stGxDFuncE2nd1stGx
99 98 adantr φxBaseCyBaseCgxHomCyzBaseD1st1stGxDFuncE2nd1stGx
100 9 93 48 99 89 funcid φxBaseCyBaseCgxHomCyzBaseDz2nd1stGxzIdDz=IdE1st1stGxz
101 100 oveq2d φxBaseCyBaseCgxHomCyzBaseDx2ndGygz1st1stGxz1st1stGxzcompE1st1stGyzz2nd1stGxzIdDz=x2ndGygz1st1stGxz1st1stGxzcompE1st1stGyzIdE1st1stGxz
102 9 14 98 funcf1 φxBaseCyBaseCgxHomCy1st1stGx:BaseDBaseE
103 102 ffvelcdmda φxBaseCyBaseCgxHomCyzBaseD1st1stGxzBaseE
104 21 ffvelcdmda φyBaseC1stGyDFuncE
105 104 adantrl φxBaseCyBaseC1stGyDFuncE
106 105 adantr φxBaseCyBaseCgxHomCy1stGyDFuncE
107 1st2ndbr RelDFuncE1stGyDFuncE1st1stGyDFuncE2nd1stGy
108 15 106 107 sylancr φxBaseCyBaseCgxHomCy1st1stGyDFuncE2nd1stGy
109 9 14 108 funcf1 φxBaseCyBaseCgxHomCy1st1stGy:BaseDBaseE
110 109 ffvelcdmda φxBaseCyBaseCgxHomCyzBaseD1st1stGyzBaseE
111 eqid DNatE=DNatE
112 16 111 fuchom DNatE=HomDFuncCatE
113 20 ad3antrrr φxBaseCyBaseCgxHomCyzBaseD1stGCFuncDFuncCatE2ndG
114 8 33 112 113 88 91 funcf2 φxBaseCyBaseCgxHomCyzBaseDx2ndGy:xHomCy1stGxDNatE1stGy
115 114 92 ffvelcdmd φxBaseCyBaseCgxHomCyzBaseDx2ndGyg1stGxDNatE1stGy
116 111 115 nat1st2nd φxBaseCyBaseCgxHomCyzBaseDx2ndGyg1st1stGx2nd1stGxDNatE1st1stGy2nd1stGy
117 111 116 9 58 89 natcl φxBaseCyBaseCgxHomCyzBaseDx2ndGygz1st1stGxzHomE1st1stGyz
118 14 58 48 85 103 60 110 117 catrid φxBaseCyBaseCgxHomCyzBaseDx2ndGygz1st1stGxz1st1stGxzcompE1st1stGyzIdE1st1stGxz=x2ndGygz
119 95 101 118 3eqtrd φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=x2ndGygz
120 119 mpteq2dva φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=zBaseDx2ndGygz
121 20 adantr φxBaseCyBaseC1stGCFuncDFuncCatE2ndG
122 8 33 112 121 87 90 funcf2 φxBaseCyBaseCx2ndGy:xHomCy1stGxDNatE1stGy
123 122 ffvelcdmda φxBaseCyBaseCgxHomCyx2ndGyg1stGxDNatE1stGy
124 111 123 nat1st2nd φxBaseCyBaseCgxHomCyx2ndGyg1st1stGx2nd1stGxDNatE1st1stGy2nd1stGy
125 111 124 9 natfn φxBaseCyBaseCgxHomCyx2ndGygFnBaseD
126 dffn5 x2ndGygFnBaseDx2ndGyg=zBaseDx2ndGygz
127 125 126 sylib φxBaseCyBaseCgxHomCyx2ndGyg=zBaseDx2ndGygz
128 120 127 eqtr4d φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=x2ndGyg
129 128 mpteq2dva φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=gxHomCyx2ndGyg
130 122 feqmptd φxBaseCyBaseCx2ndGy=gxHomCyx2ndGyg
131 129 130 eqtr4d φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=x2ndGy
132 131 3impb φxBaseCyBaseCgxHomCyzBaseDgxz2ndFyzIdDz=x2ndGy
133 132 mpoeq3dva φxBaseC,yBaseCgxHomCyzBaseDgxz2ndFyzIdDz=xBaseC,yBaseCx2ndGy
134 8 20 funcfn2 φ2ndGFnBaseC×BaseC
135 fnov 2ndGFnBaseC×BaseC2ndG=xBaseC,yBaseCx2ndGy
136 134 135 sylib φ2ndG=xBaseC,yBaseCx2ndGy
137 133 136 eqtr4d φxBaseC,yBaseCgxHomCyzBaseDgxz2ndFyzIdDz=2ndG
138 83 137 opeq12d φxBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzgxBaseC,yBaseCgxHomCyzBaseDgxz2ndFyzIdDz=1stG2ndG
139 eqid CDcurryFF=CDcurryFF
140 1 2 3 4 uncfcl φFC×cDFuncE
141 139 8 40 2 140 9 34 37 33 93 curfval φCDcurryFF=xBaseCyBaseDx1stFyyBaseD,zBaseDgyHomDzIdCxxy2ndFxzgxBaseC,yBaseCgxHomCyzBaseDgxz2ndFyzIdDz
142 1st2nd RelCFuncDFuncCatEGCFuncDFuncCatEG=1stG2ndG
143 18 4 142 sylancr φG=1stG2ndG
144 138 141 143 3eqtr4d φCDcurryFF=G