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 = F 2 nd C × V -1
Assertion curry1 F Fn A × B C A G = x B C F x

Proof

Step Hyp Ref Expression
1 curry1.1 G = F 2 nd C × V -1
2 fnfun F Fn A × B Fun F
3 2ndconst C A 2 nd C × V : C × V 1-1 onto V
4 dff1o3 2 nd C × V : C × V 1-1 onto V 2 nd C × V : C × V onto V Fun 2 nd C × V -1
5 4 simprbi 2 nd C × V : C × V 1-1 onto V Fun 2 nd C × V -1
6 3 5 syl C A Fun 2 nd C × V -1
7 funco Fun F Fun 2 nd C × V -1 Fun F 2 nd C × V -1
8 2 6 7 syl2an F Fn A × B C A Fun F 2 nd C × V -1
9 dmco dom F 2 nd C × V -1 = 2 nd C × V -1 -1 dom F
10 fndm F Fn A × B dom F = A × B
11 10 adantr F Fn A × B C A dom F = A × B
12 11 imaeq2d F Fn A × B C A 2 nd C × V -1 -1 dom F = 2 nd C × V -1 -1 A × B
13 imacnvcnv 2 nd C × V -1 -1 A × B = 2 nd C × V A × B
14 df-ima 2 nd C × V A × B = ran 2 nd C × V A × B
15 resres 2 nd C × V A × B = 2 nd C × V A × B
16 15 rneqi ran 2 nd C × V A × B = ran 2 nd C × V A × B
17 13 14 16 3eqtri 2 nd C × V -1 -1 A × B = ran 2 nd C × V A × B
18 inxp C × V A × B = C A × V B
19 incom V B = B V
20 inv1 B V = B
21 19 20 eqtri V B = B
22 21 xpeq2i C A × V B = C A × B
23 18 22 eqtri C × V A × B = C A × B
24 snssi C A C A
25 df-ss C A C A = C
26 24 25 sylib C A C A = C
27 26 xpeq1d C A C A × B = C × B
28 23 27 eqtrid C A C × V A × B = C × B
29 28 reseq2d C A 2 nd C × V A × B = 2 nd C × B
30 29 rneqd C A ran 2 nd C × V A × B = ran 2 nd C × B
31 2ndconst C A 2 nd C × B : C × B 1-1 onto B
32 f1ofo 2 nd C × B : C × B 1-1 onto B 2 nd C × B : C × B onto B
33 forn 2 nd C × B : C × B onto B ran 2 nd C × B = B
34 31 32 33 3syl C A ran 2 nd C × B = B
35 30 34 eqtrd C A ran 2 nd C × V A × B = B
36 17 35 eqtrid C A 2 nd C × V -1 -1 A × B = B
37 36 adantl F Fn A × B C A 2 nd C × V -1 -1 A × B = B
38 12 37 eqtrd F Fn A × B C A 2 nd C × V -1 -1 dom F = B
39 9 38 eqtrid F Fn A × B C A dom F 2 nd C × V -1 = B
40 1 fneq1i G Fn B F 2 nd C × V -1 Fn B
41 df-fn F 2 nd C × V -1 Fn B Fun F 2 nd C × V -1 dom F 2 nd C × V -1 = B
42 40 41 bitri G Fn B Fun F 2 nd C × V -1 dom F 2 nd C × V -1 = B
43 8 39 42 sylanbrc F Fn A × B C A G Fn B
44 dffn5 G Fn B G = x B G x
45 43 44 sylib F Fn A × B C A G = x B G x
46 1 fveq1i G x = F 2 nd C × V -1 x
47 dff1o4 2 nd C × V : C × V 1-1 onto V 2 nd C × V Fn C × V 2 nd C × V -1 Fn V
48 3 47 sylib C A 2 nd C × V Fn C × V 2 nd C × V -1 Fn V
49 fvco2 2 nd C × V -1 Fn V x V F 2 nd C × V -1 x = F 2 nd C × V -1 x
50 49 elvd 2 nd C × V -1 Fn V F 2 nd C × V -1 x = F 2 nd C × V -1 x
51 48 50 simpl2im C A F 2 nd C × V -1 x = F 2 nd C × V -1 x
52 51 ad2antlr F Fn A × B C A x B F 2 nd C × V -1 x = F 2 nd C × V -1 x
53 46 52 eqtrid F Fn A × B C A x B G x = F 2 nd C × V -1 x
54 3 adantr C A x B 2 nd C × V : C × V 1-1 onto V
55 snidg C A C C
56 vex x V
57 opelxp C x C × V C C x V
58 55 56 57 sylanblrc C A C x C × V
59 58 adantr C A x B C x C × V
60 54 59 jca C A x B 2 nd C × V : C × V 1-1 onto V C x C × V
61 58 fvresd C A 2 nd C × V C x = 2 nd C x
62 op2ndg C A x V 2 nd C x = x
63 62 elvd C A 2 nd C x = x
64 61 63 eqtrd C A 2 nd C × V C x = x
65 64 adantr C A x B 2 nd C × V C x = x
66 f1ocnvfv 2 nd C × V : C × V 1-1 onto V C x C × V 2 nd C × V C x = x 2 nd C × V -1 x = C x
67 60 65 66 sylc C A x B 2 nd C × V -1 x = C x
68 67 fveq2d C A x B F 2 nd C × V -1 x = F C x
69 68 adantll F Fn A × B C A x B F 2 nd C × V -1 x = F C x
70 df-ov C F x = F C x
71 69 70 eqtr4di F Fn A × B C A x B F 2 nd C × V -1 x = C F x
72 53 71 eqtrd F Fn A × B C A x B G x = C F x
73 72 mpteq2dva F Fn A × B C A x B G x = x B C F x
74 45 73 eqtrd F Fn A × B C A G = x B C F x