Metamath Proof Explorer


Theorem curry2

Description: Composition with ` ``' ( 1st |`( _V X. { C } ) ) turns any binary operation F with a constant second operand into a function G of the first operand only. This transformation is called "currying". (If this becomes frequently used, we can introduce a new notation for the hypothesis.) (Contributed by NM, 16-Dec-2008)

Ref Expression
Hypothesis curry2.1 G=F1stV×C-1
Assertion curry2 FFnA×BCBG=xAxFC

Proof

Step Hyp Ref Expression
1 curry2.1 G=F1stV×C-1
2 fnfun FFnA×BFunF
3 1stconst CB1stV×C:V×C1-1 ontoV
4 dff1o3 1stV×C:V×C1-1 ontoV1stV×C:V×ContoVFun1stV×C-1
5 4 simprbi 1stV×C:V×C1-1 ontoVFun1stV×C-1
6 3 5 syl CBFun1stV×C-1
7 funco FunFFun1stV×C-1FunF1stV×C-1
8 2 6 7 syl2an FFnA×BCBFunF1stV×C-1
9 dmco domF1stV×C-1=1stV×C-1-1domF
10 fndm FFnA×BdomF=A×B
11 10 adantr FFnA×BCBdomF=A×B
12 11 imaeq2d FFnA×BCB1stV×C-1-1domF=1stV×C-1-1A×B
13 imacnvcnv 1stV×C-1-1A×B=1stV×CA×B
14 df-ima 1stV×CA×B=ran1stV×CA×B
15 resres 1stV×CA×B=1stV×CA×B
16 15 rneqi ran1stV×CA×B=ran1stV×CA×B
17 13 14 16 3eqtri 1stV×C-1-1A×B=ran1stV×CA×B
18 inxp V×CA×B=VA×CB
19 incom VA=AV
20 inv1 AV=A
21 19 20 eqtri VA=A
22 21 xpeq1i VA×CB=A×CB
23 18 22 eqtri V×CA×B=A×CB
24 snssi CBCB
25 df-ss CBCB=C
26 24 25 sylib CBCB=C
27 26 xpeq2d CBA×CB=A×C
28 23 27 eqtrid CBV×CA×B=A×C
29 28 reseq2d CB1stV×CA×B=1stA×C
30 29 rneqd CBran1stV×CA×B=ran1stA×C
31 1stconst CB1stA×C:A×C1-1 ontoA
32 f1ofo 1stA×C:A×C1-1 ontoA1stA×C:A×ContoA
33 forn 1stA×C:A×ContoAran1stA×C=A
34 31 32 33 3syl CBran1stA×C=A
35 30 34 eqtrd CBran1stV×CA×B=A
36 17 35 eqtrid CB1stV×C-1-1A×B=A
37 36 adantl FFnA×BCB1stV×C-1-1A×B=A
38 12 37 eqtrd FFnA×BCB1stV×C-1-1domF=A
39 9 38 eqtrid FFnA×BCBdomF1stV×C-1=A
40 1 fneq1i GFnAF1stV×C-1FnA
41 df-fn F1stV×C-1FnAFunF1stV×C-1domF1stV×C-1=A
42 40 41 bitri GFnAFunF1stV×C-1domF1stV×C-1=A
43 8 39 42 sylanbrc FFnA×BCBGFnA
44 dffn5 GFnAG=xAGx
45 43 44 sylib FFnA×BCBG=xAGx
46 1 fveq1i Gx=F1stV×C-1x
47 dff1o4 1stV×C:V×C1-1 ontoV1stV×CFnV×C1stV×C-1FnV
48 3 47 sylib CB1stV×CFnV×C1stV×C-1FnV
49 48 simprd CB1stV×C-1FnV
50 vex xV
51 fvco2 1stV×C-1FnVxVF1stV×C-1x=F1stV×C-1x
52 49 50 51 sylancl CBF1stV×C-1x=F1stV×C-1x
53 52 ad2antlr FFnA×BCBxAF1stV×C-1x=F1stV×C-1x
54 46 53 eqtrid FFnA×BCBxAGx=F1stV×C-1x
55 3 adantr CBxA1stV×C:V×C1-1 ontoV
56 50 a1i CBxAxV
57 snidg CBCC
58 57 adantr CBxACC
59 56 58 opelxpd CBxAxCV×C
60 55 59 jca CBxA1stV×C:V×C1-1 ontoVxCV×C
61 50 a1i CBxV
62 61 57 opelxpd CBxCV×C
63 62 fvresd CB1stV×CxC=1stxC
64 63 adantr CBxA1stV×CxC=1stxC
65 op1stg xACB1stxC=x
66 65 ancoms CBxA1stxC=x
67 64 66 eqtrd CBxA1stV×CxC=x
68 f1ocnvfv 1stV×C:V×C1-1 ontoVxCV×C1stV×CxC=x1stV×C-1x=xC
69 60 67 68 sylc CBxA1stV×C-1x=xC
70 69 fveq2d CBxAF1stV×C-1x=FxC
71 70 adantll FFnA×BCBxAF1stV×C-1x=FxC
72 df-ov xFC=FxC
73 71 72 eqtr4di FFnA×BCBxAF1stV×C-1x=xFC
74 54 73 eqtrd FFnA×BCBxAGx=xFC
75 74 mpteq2dva FFnA×BCBxAGx=xAxFC
76 45 75 eqtrd FFnA×BCBG=xAxFC