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

Theorem curry1 6338
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 5446 . . . . 5  |-  ( F  Fn  ( A  X.  B )  ->  Fun  F )
2 2ndconst 6336 . . . . . 6  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
3 dff1o3 5584 . . . . . . 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 450 . . . . . 6  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) : ( { C }  X.  _V )
-1-1-onto-> _V  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
52, 4syl 15 . . . . 5  |-  ( C  e.  A  ->  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )
6 funco 5395 . . . . 5  |-  ( ( Fun  F  /\  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) )
71, 5, 6syl2an 463 . . . 4  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) )
8 dmco 5284 . . . . 5  |-  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " dom  F )
9 fndm 5448 . . . . . . . 8  |-  ( F  Fn  ( A  X.  B )  ->  dom  F  =  ( A  X.  B ) )
109adantr 451 . . . . . . 7  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  dom  F  =  ( A  X.  B ) )
1110imaeq2d 5115 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) ) )
12 imacnvcnv 5240 . . . . . . . . 9  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ( ( 2nd  |`  ( { C }  X.  _V ) ) "
( A  X.  B
) )
13 df-ima 4805 . . . . . . . . 9  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  ran  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )
14 resres 5071 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )  =  ( 2nd  |`  (
( { C }  X.  _V )  i^i  ( A  X.  B ) ) )
1514rneqi 5008 . . . . . . . . 9  |-  ran  (
( 2nd  |`  ( { C }  X.  _V ) )  |`  ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
1612, 13, 153eqtri 2390 . . . . . . . 8  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
17 inxp 4921 . . . . . . . . . . . . 13  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  ( _V 
i^i  B ) )
18 incom 3449 . . . . . . . . . . . . . . 15  |-  ( _V 
i^i  B )  =  ( B  i^i  _V )
19 inv1 3569 . . . . . . . . . . . . . . 15  |-  ( B  i^i  _V )  =  B
2018, 19eqtri 2386 . . . . . . . . . . . . . 14  |-  ( _V 
i^i  B )  =  B
2120xpeq2i 4813 . . . . . . . . . . . . 13  |-  ( ( { C }  i^i  A )  X.  ( _V 
i^i  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
2217, 21eqtri 2386 . . . . . . . . . . . 12  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
23 snssi 3857 . . . . . . . . . . . . . 14  |-  ( C  e.  A  ->  { C }  C_  A )
24 df-ss 3252 . . . . . . . . . . . . . 14  |-  ( { C }  C_  A  <->  ( { C }  i^i  A )  =  { C } )
2523, 24sylib 188 . . . . . . . . . . . . 13  |-  ( C  e.  A  ->  ( { C }  i^i  A
)  =  { C } )
2625xpeq1d 4815 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  (
( { C }  i^i  A )  X.  B
)  =  ( { C }  X.  B
) )
2722, 26syl5eq 2410 . . . . . . . . . . 11  |-  ( C  e.  A  ->  (
( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( { C }  X.  B ) )
2827reseq2d 5058 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ( 2nd  |`  ( { C }  X.  B
) ) )
2928rneqd 5009 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ran  ( 2nd  |`  ( { C }  X.  B ) ) )
30 2ndconst 6336 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -1-1-onto-> B )
31 f1ofo 5585 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -1-1-onto-> B  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -onto-> B )
32 forn 5560 . . . . . . . . . 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 2398 . . . . . . . 8  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  B )
3516, 34syl5eq 2410 . . . . . . 7  |-  ( C  e.  A  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  B )
3635adantl 452 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  B )
3711, 36eqtrd 2398 . . . . 5  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  B )
388, 37syl5eq 2410 . . . 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 5443 . . . . 5  |-  ( G  Fn  B  <->  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  Fn  B )
41 df-fn 5361 . . . . 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 240 . . . 4  |-  ( G  Fn  B  <->  ( Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  /\  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  =  B ) )
437, 38, 42sylanbrc 645 . . 3  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  Fn  B )
44 dffn5 5675 . . 3  |-  ( G  Fn  B  <->  G  =  ( x  e.  B  |->  ( G `  x
) ) )
4543, 44sylib 188 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( G `
 x ) ) )
4639fveq1i 5633 . . . . 5  |-  ( G `
 x )  =  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )
47 dff1o4 5586 . . . . . . . . 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 188 . . . . . . . 8  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) )  Fn  ( { C }  X.  _V )  /\  `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn 
_V ) )
4948simprd 449 . . . . . . 7  |-  ( C  e.  A  ->  `' ( 2nd  |`  ( { C }  X.  _V )
)  Fn  _V )
50 vex 2876 . . . . . . . 8  |-  x  e. 
_V
51 fvco2 5701 . . . . . . . 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 652 . . . . . . 7  |-  ( `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn  _V  ->  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
5349, 52syl 15 . . . . . 6  |-  ( C  e.  A  ->  (
( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) `  x
)  =  ( F `
 ( `' ( 2nd  |`  ( { C }  X.  _V )
) `  x )
) )
5453ad2antlr 707 . . . . 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 2410 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
562adantr 451 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
57 snidg 3754 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  C  e.  { C } )
5857, 50jctir 524 . . . . . . . . . . 11  |-  ( C  e.  A  ->  ( C  e.  { C }  /\  x  e.  _V ) )
59 opelxp 4822 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  <->  ( C  e.  { C }  /\  x  e.  _V )
)
6058, 59sylibr 203 . . . . . . . . . 10  |-  ( C  e.  A  ->  <. C ,  x >.  e.  ( { C }  X.  _V ) )
6160adantr 451 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  -> 
<. C ,  x >.  e.  ( { C }  X.  _V ) )
6256, 61jca 518 . . . . . . . 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 5649 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
6460, 63syl 15 . . . . . . . . . 10  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  ( 2nd `  <. C ,  x >. )
)
65 op2ndg 6260 . . . . . . . . . . 11  |-  ( ( C  e.  A  /\  x  e.  _V )  ->  ( 2nd `  <. C ,  x >. )  =  x )
6650, 65mpan2 652 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd `  <. C ,  x >. )  =  x )
6764, 66eqtrd 2398 . . . . . . . . 9  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
6867adantr 451 . . . . . . . 8  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( ( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
69 f1ocnvfv 5916 . . . . . . . 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 56 . . . . . . 7  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x )  =  <. C ,  x >. )
7170fveq2d 5636 . . . . . 6  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) )  =  ( F `  <. C ,  x >. ) )
7271adantll 694 . . . . 5  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( F `  <. C ,  x >. )
)
73 df-ov 5984 . . . . 5  |-  ( C F x )  =  ( F `  <. C ,  x >. )
7472, 73syl6eqr 2416 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( C F x ) )
7555, 74eqtrd 2398 . . 3  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( C F x ) )
7675mpteq2dva 4208 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( x  e.  B  |->  ( G `  x
) )  =  ( x  e.  B  |->  ( C F x ) ) )
7745, 76eqtrd 2398 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 358    = wceq 1647    e. wcel 1715   _Vcvv 2873    i^i cin 3237    C_ wss 3238   {csn 3729   <.cop 3732    e. cmpt 4179    X. cxp 4790   `'ccnv 4791   dom cdm 4792   ran crn 4793    |` cres 4794   "cima 4795    o. ccom 4796   Fun wfun 5352    Fn wfn 5353   -onto->wfo 5356   -1-1-onto->wf1o 5357   ` cfv 5358  (class class class)co 5981   2ndc2nd 6248
This theorem is referenced by:  curry1val  6339  curry1f  6340
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1551  ax-5 1562  ax-17 1621  ax-9 1659  ax-8 1680  ax-13 1717  ax-14 1719  ax-6 1734  ax-7 1739  ax-11 1751  ax-12 1937  ax-ext 2347  ax-sep 4243  ax-nul 4251  ax-pow 4290  ax-pr 4316  ax-un 4615
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 937  df-tru 1324  df-ex 1547  df-nf 1550  df-sb 1654  df-eu 2221  df-mo 2222  df-clab 2353  df-cleq 2359  df-clel 2362  df-nfc 2491  df-ne 2531  df-ral 2633  df-rex 2634  df-rab 2637  df-v 2875  df-sbc 3078  df-csb 3168  df-dif 3241  df-un 3243  df-in 3245  df-ss 3252  df-nul 3544  df-if 3655  df-sn 3735  df-pr 3736  df-op 3738  df-uni 3930  df-iun 4009  df-br 4126  df-opab 4180  df-mpt 4181  df-id 4412  df-xp 4798  df-rel 4799  df-cnv 4800  df-co 4801  df-dm 4802  df-rn 4803  df-res 4804  df-ima 4805  df-iota 5322  df-fun 5360  df-fn 5361  df-f 5362  df-f1 5363  df-fo 5364  df-f1o 5365  df-fv 5366  df-ov 5984  df-1st 6249  df-2nd 6250
  Copyright terms: Public domain W3C validator