Metamath Proof Explorer


Theorem curry1

Description: Composition with ` ``' ( 2nd |`( { C } X. _V ) ) turns any binary operation F with a constant first operand into a function G of the second operand only. This transformation is called "currying". (Contributed by NM, 28-Mar-2008) (Revised by Mario Carneiro, 26-Dec-2014)

Ref Expression
Hypothesis curry1.1 G=F2ndC×V-1
Assertion curry1 FFnA×BCAG=xBCFx

Proof

Step Hyp Ref Expression
1 curry1.1 G=F2ndC×V-1
2 fnfun FFnA×BFunF
3 2ndconst CA2ndC×V:C×V1-1 ontoV
4 dff1o3 2ndC×V:C×V1-1 ontoV2ndC×V:C×VontoVFun2ndC×V-1
5 4 simprbi 2ndC×V:C×V1-1 ontoVFun2ndC×V-1
6 3 5 syl CAFun2ndC×V-1
7 funco FunFFun2ndC×V-1FunF2ndC×V-1
8 2 6 7 syl2an FFnA×BCAFunF2ndC×V-1
9 dmco domF2ndC×V-1=2ndC×V-1-1domF
10 fndm FFnA×BdomF=A×B
11 10 adantr FFnA×BCAdomF=A×B
12 11 imaeq2d FFnA×BCA2ndC×V-1-1domF=2ndC×V-1-1A×B
13 imacnvcnv 2ndC×V-1-1A×B=2ndC×VA×B
14 df-ima 2ndC×VA×B=ran2ndC×VA×B
15 resres 2ndC×VA×B=2ndC×VA×B
16 15 rneqi ran2ndC×VA×B=ran2ndC×VA×B
17 13 14 16 3eqtri 2ndC×V-1-1A×B=ran2ndC×VA×B
18 inxp C×VA×B=CA×VB
19 incom VB=BV
20 inv1 BV=B
21 19 20 eqtri VB=B
22 21 xpeq2i CA×VB=CA×B
23 18 22 eqtri C×VA×B=CA×B
24 snssi CACA
25 df-ss CACA=C
26 24 25 sylib CACA=C
27 26 xpeq1d CACA×B=C×B
28 23 27 eqtrid CAC×VA×B=C×B
29 28 reseq2d CA2ndC×VA×B=2ndC×B
30 29 rneqd CAran2ndC×VA×B=ran2ndC×B
31 2ndconst CA2ndC×B:C×B1-1 ontoB
32 f1ofo 2ndC×B:C×B1-1 ontoB2ndC×B:C×BontoB
33 forn 2ndC×B:C×BontoBran2ndC×B=B
34 31 32 33 3syl CAran2ndC×B=B
35 30 34 eqtrd CAran2ndC×VA×B=B
36 17 35 eqtrid CA2ndC×V-1-1A×B=B
37 36 adantl FFnA×BCA2ndC×V-1-1A×B=B
38 12 37 eqtrd FFnA×BCA2ndC×V-1-1domF=B
39 9 38 eqtrid FFnA×BCAdomF2ndC×V-1=B
40 1 fneq1i GFnBF2ndC×V-1FnB
41 df-fn F2ndC×V-1FnBFunF2ndC×V-1domF2ndC×V-1=B
42 40 41 bitri GFnBFunF2ndC×V-1domF2ndC×V-1=B
43 8 39 42 sylanbrc FFnA×BCAGFnB
44 dffn5 GFnBG=xBGx
45 43 44 sylib FFnA×BCAG=xBGx
46 1 fveq1i Gx=F2ndC×V-1x
47 dff1o4 2ndC×V:C×V1-1 ontoV2ndC×VFnC×V2ndC×V-1FnV
48 3 47 sylib CA2ndC×VFnC×V2ndC×V-1FnV
49 fvco2 2ndC×V-1FnVxVF2ndC×V-1x=F2ndC×V-1x
50 49 elvd 2ndC×V-1FnVF2ndC×V-1x=F2ndC×V-1x
51 48 50 simpl2im CAF2ndC×V-1x=F2ndC×V-1x
52 51 ad2antlr FFnA×BCAxBF2ndC×V-1x=F2ndC×V-1x
53 46 52 eqtrid FFnA×BCAxBGx=F2ndC×V-1x
54 3 adantr CAxB2ndC×V:C×V1-1 ontoV
55 snidg CACC
56 vex xV
57 opelxp CxC×VCCxV
58 55 56 57 sylanblrc CACxC×V
59 58 adantr CAxBCxC×V
60 54 59 jca CAxB2ndC×V:C×V1-1 ontoVCxC×V
61 58 fvresd CA2ndC×VCx=2ndCx
62 op2ndg CAxV2ndCx=x
63 62 elvd CA2ndCx=x
64 61 63 eqtrd CA2ndC×VCx=x
65 64 adantr CAxB2ndC×VCx=x
66 f1ocnvfv 2ndC×V:C×V1-1 ontoVCxC×V2ndC×VCx=x2ndC×V-1x=Cx
67 60 65 66 sylc CAxB2ndC×V-1x=Cx
68 67 fveq2d CAxBF2ndC×V-1x=FCx
69 68 adantll FFnA×BCAxBF2ndC×V-1x=FCx
70 df-ov CFx=FCx
71 69 70 eqtr4di FFnA×BCAxBF2ndC×V-1x=CFx
72 53 71 eqtrd FFnA×BCAxBGx=CFx
73 72 mpteq2dva FFnA×BCAxBGx=xBCFx
74 45 73 eqtrd FFnA×BCAG=xBCFx