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

Theorem curry1 6441
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 5545 . . . . 5  |-  ( F  Fn  ( A  X.  B )  ->  Fun  F )
2 2ndconst 6439 . . . . . 6  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
3 dff1o3 5683 . . . . . . 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 452 . . . . . 6  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) : ( { C }  X.  _V )
-1-1-onto-> _V  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
52, 4syl 16 . . . . 5  |-  ( C  e.  A  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
6 funco 5494 . . . . 5  |-  ( ( Fun  F  /\  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) )
71, 5, 6syl2an 465 . . . 4  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) )
8 dmco 5381 . . . . 5  |-  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " dom  F )
9 fndm 5547 . . . . . . . 8  |-  ( F  Fn  ( A  X.  B )  ->  dom  F  =  ( A  X.  B ) )
109adantr 453 . . . . . . 7  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  dom  F  =  ( A  X.  B ) )
1110imaeq2d 5206 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) ) )
12 imacnvcnv 5337 . . . . . . . . 9  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ( ( 2nd  |`  ( { C }  X.  _V ) ) "
( A  X.  B
) )
13 df-ima 4894 . . . . . . . . 9  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  ran  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )
14 resres 5162 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )  =  ( 2nd  |`  (
( { C }  X.  _V )  i^i  ( A  X.  B ) ) )
1514rneqi 5099 . . . . . . . . 9  |-  ran  (
( 2nd  |`  ( { C }  X.  _V ) )  |`  ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
1612, 13, 153eqtri 2462 . . . . . . . 8  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
17 inxp 5010 . . . . . . . . . . . . 13  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  ( _V 
i^i  B ) )
18 incom 3535 . . . . . . . . . . . . . . 15  |-  ( _V 
i^i  B )  =  ( B  i^i  _V )
19 inv1 3656 . . . . . . . . . . . . . . 15  |-  ( B  i^i  _V )  =  B
2018, 19eqtri 2458 . . . . . . . . . . . . . 14  |-  ( _V 
i^i  B )  =  B
2120xpeq2i 4902 . . . . . . . . . . . . 13  |-  ( ( { C }  i^i  A )  X.  ( _V 
i^i  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
2217, 21eqtri 2458 . . . . . . . . . . . 12  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
23 snssi 3944 . . . . . . . . . . . . . 14  |-  ( C  e.  A  ->  { C }  C_  A )
24 df-ss 3336 . . . . . . . . . . . . . 14  |-  ( { C }  C_  A  <->  ( { C }  i^i  A )  =  { C } )
2523, 24sylib 190 . . . . . . . . . . . . 13  |-  ( C  e.  A  ->  ( { C }  i^i  A
)  =  { C } )
2625xpeq1d 4904 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  (
( { C }  i^i  A )  X.  B
)  =  ( { C }  X.  B
) )
2722, 26syl5eq 2482 . . . . . . . . . . 11  |-  ( C  e.  A  ->  (
( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( { C }  X.  B ) )
2827reseq2d 5149 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ( 2nd  |`  ( { C }  X.  B
) ) )
2928rneqd 5100 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ran  ( 2nd  |`  ( { C }  X.  B ) ) )
30 2ndconst 6439 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -1-1-onto-> B )
31 f1ofo 5684 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -1-1-onto-> B  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -onto-> B )
32 forn 5659 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -onto-> B  ->  ran  ( 2nd  |`  ( { C }  X.  B
) )  =  B )
3330, 31, 323syl 19 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( { C }  X.  B
) )  =  B )
3429, 33eqtrd 2470 . . . . . . . 8  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  B )
3516, 34syl5eq 2482 . . . . . . 7  |-  ( C  e.  A  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  B )
3635adantl 454 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  B )
3711, 36eqtrd 2470 . . . . 5  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  B )
388, 37syl5eq 2482 . . . 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 5542 . . . . 5  |-  ( G  Fn  B  <->  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  Fn  B )
41 df-fn 5460 . . . . 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 242 . . . 4  |-  ( G  Fn  B  <->  ( Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  /\  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  =  B ) )
437, 38, 42sylanbrc 647 . . 3  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  Fn  B )
44 dffn5 5775 . . 3  |-  ( G  Fn  B  <->  G  =  ( x  e.  B  |->  ( G `  x
) ) )
4543, 44sylib 190 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( G `
 x ) ) )
4639fveq1i 5732 . . . . 5  |-  ( G `
 x )  =  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )
47 dff1o4 5685 . . . . . . . . 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 190 . . . . . . . 8  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) )  Fn  ( { C }  X.  _V )  /\  `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn 
_V ) )
4948simprd 451 . . . . . . 7  |-  ( C  e.  A  ->  `' ( 2nd  |`  ( { C }  X.  _V )
)  Fn  _V )
50 vex 2961 . . . . . . . 8  |-  x  e. 
_V
51 fvco2 5801 . . . . . . . 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 654 . . . . . . 7  |-  ( `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn  _V  ->  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
5349, 52syl 16 . . . . . 6  |-  ( C  e.  A  ->  (
( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) `  x
)  =  ( F `
 ( `' ( 2nd  |`  ( { C }  X.  _V )
) `  x )
) )
5453ad2antlr 709 . . . . 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 2482 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
562adantr 453 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
57 snidg 3841 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  C  e.  { C } )
5857, 50jctir 526 . . . . . . . . . . 11  |-  ( C  e.  A  ->  ( C  e.  { C }  /\  x  e.  _V ) )
59 opelxp 4911 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  <->  ( C  e.  { C }  /\  x  e.  _V )
)
6058, 59sylibr 205 . . . . . . . . . 10  |-  ( C  e.  A  ->  <. C ,  x >.  e.  ( { C }  X.  _V ) )
6160adantr 453 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  -> 
<. C ,  x >.  e.  ( { C }  X.  _V ) )
6256, 61jca 520 . . . . . . . 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 5748 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
6460, 63syl 16 . . . . . . . . . 10  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
65 op2ndg 6363 . . . . . . . . . . 11  |-  ( ( C  e.  A  /\  x  e.  _V )  ->  ( 2nd `  <. C ,  x >. )  =  x )
6650, 65mpan2 654 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd `  <. C ,  x >. )  =  x )
6764, 66eqtrd 2470 . . . . . . . . 9  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
6867adantr 453 . . . . . . . 8  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( ( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
69 f1ocnvfv 6019 . . . . . . . 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 59 . . . . . . 7  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x )  =  <. C ,  x >. )
7170fveq2d 5735 . . . . . 6  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) )  =  ( F `  <. C ,  x >. ) )
7271adantll 696 . . . . 5  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( F `  <. C ,  x >. )
)
73 df-ov 6087 . . . . 5  |-  ( C F x )  =  ( F `  <. C ,  x >. )
7472, 73syl6eqr 2488 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( C F x ) )
7555, 74eqtrd 2470 . . 3  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( C F x ) )
7675mpteq2dva 4298 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( x  e.  B  |->  ( G `  x
) )  =  ( x  e.  B  |->  ( C F x ) ) )
7745, 76eqtrd 2470 1  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( C F x ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 360    = wceq 1653    e. wcel 1726   _Vcvv 2958    i^i cin 3321    C_ wss 3322   {csn 3816   <.cop 3819    e. cmpt 4269    X. cxp 4879   `'ccnv 4880   dom cdm 4881   ran crn 4882    |` cres 4883   "cima 4884    o. ccom 4885   Fun wfun 5451    Fn wfn 5452   -onto->wfo 5455   -1-1-onto->wf1o 5456   ` cfv 5457  (class class class)co 6084   2ndc2nd 6351
This theorem is referenced by:  curry1val  6442  curry1f  6443
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-ral 2712  df-rex 2713  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-nul 3631  df-if 3742  df-sn 3822  df-pr 3823  df-op 3825  df-uni 4018  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-id 4501  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-1st 6352  df-2nd 6353
  Copyright terms: Public domain W3C validator