MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  curry1 Structured version   Visualization version   Unicode version

Theorem curry1 7269
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.)
Hypothesis
Ref Expression
curry1.1  |-  G  =  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )
Assertion
Ref Expression
curry1  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( C F x ) ) )
Distinct variable groups:    x, A    x, B    x, C    x, F    x, G

Proof of Theorem curry1
StepHypRef Expression
1 fnfun 5988 . . . . 5  |-  ( F  Fn  ( A  X.  B )  ->  Fun  F )
2 2ndconst 7266 . . . . . 6  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
3 dff1o3 6143 . . . . . . 7  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) : ( { C }  X.  _V )
-1-1-onto-> _V 
<->  ( ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -onto-> _V  /\  Fun  `' ( 2nd  |`  ( { C }  X.  _V )
) ) )
43simprbi 480 . . . . . 6  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) : ( { C }  X.  _V )
-1-1-onto-> _V  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
52, 4syl 17 . . . . 5  |-  ( C  e.  A  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
6 funco 5928 . . . . 5  |-  ( ( Fun  F  /\  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) )
71, 5, 6syl2an 494 . . . 4  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) )
8 dmco 5643 . . . . 5  |-  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " dom  F )
9 fndm 5990 . . . . . . . 8  |-  ( F  Fn  ( A  X.  B )  ->  dom  F  =  ( A  X.  B ) )
109adantr 481 . . . . . . 7  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  dom  F  =  ( A  X.  B ) )
1110imaeq2d 5466 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) ) )
12 imacnvcnv 5599 . . . . . . . . 9  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ( ( 2nd  |`  ( { C }  X.  _V ) ) "
( A  X.  B
) )
13 df-ima 5127 . . . . . . . . 9  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  ran  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )
14 resres 5409 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )  =  ( 2nd  |`  (
( { C }  X.  _V )  i^i  ( A  X.  B ) ) )
1514rneqi 5352 . . . . . . . . 9  |-  ran  (
( 2nd  |`  ( { C }  X.  _V ) )  |`  ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
1612, 13, 153eqtri 2648 . . . . . . . 8  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
17 inxp 5254 . . . . . . . . . . . . 13  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  ( _V 
i^i  B ) )
18 incom 3805 . . . . . . . . . . . . . . 15  |-  ( _V 
i^i  B )  =  ( B  i^i  _V )
19 inv1 3970 . . . . . . . . . . . . . . 15  |-  ( B  i^i  _V )  =  B
2018, 19eqtri 2644 . . . . . . . . . . . . . 14  |-  ( _V 
i^i  B )  =  B
2120xpeq2i 5136 . . . . . . . . . . . . 13  |-  ( ( { C }  i^i  A )  X.  ( _V 
i^i  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
2217, 21eqtri 2644 . . . . . . . . . . . 12  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
23 snssi 4339 . . . . . . . . . . . . . 14  |-  ( C  e.  A  ->  { C }  C_  A )
24 df-ss 3588 . . . . . . . . . . . . . 14  |-  ( { C }  C_  A  <->  ( { C }  i^i  A )  =  { C } )
2523, 24sylib 208 . . . . . . . . . . . . 13  |-  ( C  e.  A  ->  ( { C }  i^i  A
)  =  { C } )
2625xpeq1d 5138 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  (
( { C }  i^i  A )  X.  B
)  =  ( { C }  X.  B
) )
2722, 26syl5eq 2668 . . . . . . . . . . 11  |-  ( C  e.  A  ->  (
( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( { C }  X.  B ) )
2827reseq2d 5396 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ( 2nd  |`  ( { C }  X.  B
) ) )
2928rneqd 5353 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ran  ( 2nd  |`  ( { C }  X.  B ) ) )
30 2ndconst 7266 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -1-1-onto-> B )
31 f1ofo 6144 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -1-1-onto-> B  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -onto-> B )
32 forn 6118 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -onto-> B  ->  ran  ( 2nd  |`  ( { C }  X.  B
) )  =  B )
3330, 31, 323syl 18 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( { C }  X.  B
) )  =  B )
3429, 33eqtrd 2656 . . . . . . . 8  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  B )
3516, 34syl5eq 2668 . . . . . . 7  |-  ( C  e.  A  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  B )
3635adantl 482 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  B )
3711, 36eqtrd 2656 . . . . 5  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  B )
388, 37syl5eq 2668 . . . 4  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  =  B )
39 curry1.1 . . . . . 6  |-  G  =  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )
4039fneq1i 5985 . . . . 5  |-  ( G  Fn  B  <->  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  Fn  B )
41 df-fn 5891 . . . . 5  |-  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  Fn  B  <->  ( Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  /\  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  =  B ) )
4240, 41bitri 264 . . . 4  |-  ( G  Fn  B  <->  ( Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  /\  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  =  B ) )
437, 38, 42sylanbrc 698 . . 3  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  Fn  B )
44 dffn5 6241 . . 3  |-  ( G  Fn  B  <->  G  =  ( x  e.  B  |->  ( G `  x
) ) )
4543, 44sylib 208 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( G `
 x ) ) )
4639fveq1i 6192 . . . . 5  |-  ( G `
 x )  =  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )
47 dff1o4 6145 . . . . . . . . 9  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) : ( { C }  X.  _V )
-1-1-onto-> _V 
<->  ( ( 2nd  |`  ( { C }  X.  _V ) )  Fn  ( { C }  X.  _V )  /\  `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn 
_V ) )
482, 47sylib 208 . . . . . . . 8  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) )  Fn  ( { C }  X.  _V )  /\  `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn 
_V ) )
4948simprd 479 . . . . . . 7  |-  ( C  e.  A  ->  `' ( 2nd  |`  ( { C }  X.  _V )
)  Fn  _V )
50 vex 3203 . . . . . . . 8  |-  x  e. 
_V
51 fvco2 6273 . . . . . . . 8  |-  ( ( `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn  _V  /\  x  e.  _V )  ->  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
5250, 51mpan2 707 . . . . . . 7  |-  ( `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn  _V  ->  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
5349, 52syl 17 . . . . . 6  |-  ( C  e.  A  ->  (
( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) `  x
)  =  ( F `
 ( `' ( 2nd  |`  ( { C }  X.  _V )
) `  x )
) )
5453ad2antlr 763 . . . . 5  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
5546, 54syl5eq 2668 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
562adantr 481 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
57 snidg 4206 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  C  e.  { C } )
5857, 50jctir 561 . . . . . . . . . . 11  |-  ( C  e.  A  ->  ( C  e.  { C }  /\  x  e.  _V ) )
59 opelxp 5146 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  <->  ( C  e.  { C }  /\  x  e.  _V )
)
6058, 59sylibr 224 . . . . . . . . . 10  |-  ( C  e.  A  ->  <. C ,  x >.  e.  ( { C }  X.  _V ) )
6160adantr 481 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  -> 
<. C ,  x >.  e.  ( { C }  X.  _V ) )
6256, 61jca 554 . . . . . . . 8  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V  /\  <. C ,  x >.  e.  ( { C }  X.  _V ) ) )
63 fvres 6207 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
6460, 63syl 17 . . . . . . . . . 10  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
65 op2ndg 7181 . . . . . . . . . . 11  |-  ( ( C  e.  A  /\  x  e.  _V )  ->  ( 2nd `  <. C ,  x >. )  =  x )
6650, 65mpan2 707 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd `  <. C ,  x >. )  =  x )
6764, 66eqtrd 2656 . . . . . . . . 9  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
6867adantr 481 . . . . . . . 8  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( ( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
69 f1ocnvfv 6534 . . . . . . . 8  |-  ( ( ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V  /\  <. C ,  x >.  e.  ( { C }  X.  _V ) )  ->  (
( ( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x  ->  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
)  =  <. C ,  x >. ) )
7062, 68, 69sylc 65 . . . . . . 7  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x )  =  <. C ,  x >. )
7170fveq2d 6195 . . . . . 6  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) )  =  ( F `  <. C ,  x >. ) )
7271adantll 750 . . . . 5  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( F `  <. C ,  x >. )
)
73 df-ov 6653 . . . . 5  |-  ( C F x )  =  ( F `  <. C ,  x >. )
7472, 73syl6eqr 2674 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( C F x ) )
7555, 74eqtrd 2656 . . 3  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( C F x ) )
7675mpteq2dva 4744 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( x  e.  B  |->  ( G `  x
) )  =  ( x  e.  B  |->  ( C F x ) ) )
7745, 76eqtrd 2656 1  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( C F x ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 384    = wceq 1483    e. wcel 1990   _Vcvv 3200    i^i cin 3573    C_ wss 3574   {csn 4177   <.cop 4183    |-> cmpt 4729    X. cxp 5112   `'ccnv 5113   dom cdm 5114   ran crn 5115    |` cres 5116   "cima 5117    o. ccom 5118   Fun wfun 5882    Fn wfn 5883   -onto->wfo 5886   -1-1-onto->wf1o 5887   ` cfv 5888  (class class class)co 6650   2ndc2nd 7167
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ne 2795  df-ral 2917  df-rex 2918  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-nul 3916  df-if 4087  df-sn 4178  df-pr 4180  df-op 4184  df-uni 4437  df-iun 4522  df-br 4654  df-opab 4713  df-mpt 4730  df-id 5024  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-rn 5125  df-res 5126  df-ima 5127  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-ov 6653  df-1st 7168  df-2nd 7169
This theorem is referenced by:  curry1val  7270  curry1f  7271
  Copyright terms: Public domain W3C validator