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

Theorem curry1 6405
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 5509 . . . . 5  |-  ( F  Fn  ( A  X.  B )  ->  Fun  F )
2 2ndconst 6403 . . . . . 6  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
3 dff1o3 5647 . . . . . . 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 451 . . . . . 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 5458 . . . . 5  |-  ( ( Fun  F  /\  Fun  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) ) )
71, 5, 6syl2an 464 . . . 4  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) )
8 dmco 5345 . . . . 5  |-  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " dom  F )
9 fndm 5511 . . . . . . . 8  |-  ( F  Fn  ( A  X.  B )  ->  dom  F  =  ( A  X.  B ) )
109adantr 452 . . . . . . 7  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  dom  F  =  ( A  X.  B ) )
1110imaeq2d 5170 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) ) )
12 imacnvcnv 5301 . . . . . . . . 9  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ( ( 2nd  |`  ( { C }  X.  _V ) ) "
( A  X.  B
) )
13 df-ima 4858 . . . . . . . . 9  |-  ( ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  ran  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )
14 resres 5126 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  _V )
)  |`  ( A  X.  B ) )  =  ( 2nd  |`  (
( { C }  X.  _V )  i^i  ( A  X.  B ) ) )
1514rneqi 5063 . . . . . . . . 9  |-  ran  (
( 2nd  |`  ( { C }  X.  _V ) )  |`  ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
1612, 13, 153eqtri 2436 . . . . . . . 8  |-  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B
) ) )
17 inxp 4974 . . . . . . . . . . . . 13  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  ( _V 
i^i  B ) )
18 incom 3501 . . . . . . . . . . . . . . 15  |-  ( _V 
i^i  B )  =  ( B  i^i  _V )
19 inv1 3622 . . . . . . . . . . . . . . 15  |-  ( B  i^i  _V )  =  B
2018, 19eqtri 2432 . . . . . . . . . . . . . 14  |-  ( _V 
i^i  B )  =  B
2120xpeq2i 4866 . . . . . . . . . . . . 13  |-  ( ( { C }  i^i  A )  X.  ( _V 
i^i  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
2217, 21eqtri 2432 . . . . . . . . . . . 12  |-  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( ( { C }  i^i  A
)  X.  B )
23 snssi 3910 . . . . . . . . . . . . . 14  |-  ( C  e.  A  ->  { C }  C_  A )
24 df-ss 3302 . . . . . . . . . . . . . 14  |-  ( { C }  C_  A  <->  ( { C }  i^i  A )  =  { C } )
2523, 24sylib 189 . . . . . . . . . . . . 13  |-  ( C  e.  A  ->  ( { C }  i^i  A
)  =  { C } )
2625xpeq1d 4868 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  (
( { C }  i^i  A )  X.  B
)  =  ( { C }  X.  B
) )
2722, 26syl5eq 2456 . . . . . . . . . . 11  |-  ( C  e.  A  ->  (
( { C }  X.  _V )  i^i  ( A  X.  B ) )  =  ( { C }  X.  B ) )
2827reseq2d 5113 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ( 2nd  |`  ( { C }  X.  B
) ) )
2928rneqd 5064 . . . . . . . . 9  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  ran  ( 2nd  |`  ( { C }  X.  B ) ) )
30 2ndconst 6403 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -1-1-onto-> B )
31 f1ofo 5648 . . . . . . . . . 10  |-  ( ( 2nd  |`  ( { C }  X.  B
) ) : ( { C }  X.  B ) -1-1-onto-> B  ->  ( 2nd  |`  ( { C }  X.  B ) ) : ( { C }  X.  B ) -onto-> B )
32 forn 5623 . . . . . . . . . 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 2444 . . . . . . . 8  |-  ( C  e.  A  ->  ran  ( 2nd  |`  ( ( { C }  X.  _V )  i^i  ( A  X.  B ) ) )  =  B )
3516, 34syl5eq 2456 . . . . . . 7  |-  ( C  e.  A  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V ) ) " ( A  X.  B ) )  =  B )
3635adantl 453 . . . . . 6  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " ( A  X.  B ) )  =  B )
3711, 36eqtrd 2444 . . . . 5  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( `' `' ( 2nd  |`  ( { C }  X.  _V )
) " dom  F
)  =  B )
388, 37syl5eq 2456 . . . 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 5506 . . . . 5  |-  ( G  Fn  B  <->  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) )  Fn  B )
41 df-fn 5424 . . . . 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 241 . . . 4  |-  ( G  Fn  B  <->  ( Fun  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  /\  dom  ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V )
) )  =  B ) )
437, 38, 42sylanbrc 646 . . 3  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  Fn  B )
44 dffn5 5739 . . 3  |-  ( G  Fn  B  <->  G  =  ( x  e.  B  |->  ( G `  x
) ) )
4543, 44sylib 189 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  G  =  ( x  e.  B  |->  ( G `
 x ) ) )
4639fveq1i 5696 . . . . 5  |-  ( G `
 x )  =  ( ( F  o.  `' ( 2nd  |`  ( { C }  X.  _V ) ) ) `  x )
47 dff1o4 5649 . . . . . . . . 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 189 . . . . . . . 8  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) )  Fn  ( { C }  X.  _V )  /\  `' ( 2nd  |`  ( { C }  X.  _V ) )  Fn 
_V ) )
4948simprd 450 . . . . . . 7  |-  ( C  e.  A  ->  `' ( 2nd  |`  ( { C }  X.  _V )
)  Fn  _V )
50 vex 2927 . . . . . . . 8  |-  x  e. 
_V
51 fvco2 5765 . . . . . . . 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 653 . . . . . . 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 708 . . . . 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 2456 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) ) )
562adantr 452 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( 2nd  |`  ( { C }  X.  _V ) ) : ( { C }  X.  _V ) -1-1-onto-> _V )
57 snidg 3807 . . . . . . . . . . . 12  |-  ( C  e.  A  ->  C  e.  { C } )
5857, 50jctir 525 . . . . . . . . . . 11  |-  ( C  e.  A  ->  ( C  e.  { C }  /\  x  e.  _V ) )
59 opelxp 4875 . . . . . . . . . . 11  |-  ( <. C ,  x >.  e.  ( { C }  X.  _V )  <->  ( C  e.  { C }  /\  x  e.  _V )
)
6058, 59sylibr 204 . . . . . . . . . 10  |-  ( C  e.  A  ->  <. C ,  x >.  e.  ( { C }  X.  _V ) )
6160adantr 452 . . . . . . . . 9  |-  ( ( C  e.  A  /\  x  e.  B )  -> 
<. C ,  x >.  e.  ( { C }  X.  _V ) )
6256, 61jca 519 . . . . . . . 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 5712 . . . . . . . . . . 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 6327 . . . . . . . . . . 11  |-  ( ( C  e.  A  /\  x  e.  _V )  ->  ( 2nd `  <. C ,  x >. )  =  x )
6650, 65mpan2 653 . . . . . . . . . 10  |-  ( C  e.  A  ->  ( 2nd `  <. C ,  x >. )  =  x )
6764, 66eqtrd 2444 . . . . . . . . 9  |-  ( C  e.  A  ->  (
( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
6867adantr 452 . . . . . . . 8  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( ( 2nd  |`  ( { C }  X.  _V ) ) `  <. C ,  x >. )  =  x )
69 f1ocnvfv 5983 . . . . . . . 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 58 . . . . . . 7  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x )  =  <. C ,  x >. )
7170fveq2d 5699 . . . . . 6  |-  ( ( C  e.  A  /\  x  e.  B )  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x
) )  =  ( F `  <. C ,  x >. ) )
7271adantll 695 . . . . 5  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( F `  <. C ,  x >. )
)
73 df-ov 6051 . . . . 5  |-  ( C F x )  =  ( F `  <. C ,  x >. )
7472, 73syl6eqr 2462 . . . 4  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( F `  ( `' ( 2nd  |`  ( { C }  X.  _V ) ) `  x ) )  =  ( C F x ) )
7555, 74eqtrd 2444 . . 3  |-  ( ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  /\  x  e.  B
)  ->  ( G `  x )  =  ( C F x ) )
7675mpteq2dva 4263 . 2  |-  ( ( F  Fn  ( A  X.  B )  /\  C  e.  A )  ->  ( x  e.  B  |->  ( G `  x
) )  =  ( x  e.  B  |->  ( C F x ) ) )
7745, 76eqtrd 2444 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 359    = wceq 1649    e. wcel 1721   _Vcvv 2924    i^i cin 3287    C_ wss 3288   {csn 3782   <.cop 3785    e. cmpt 4234    X. cxp 4843   `'ccnv 4844   dom cdm 4845   ran crn 4846    |` cres 4847   "cima 4848    o. ccom 4849   Fun wfun 5415    Fn wfn 5416   -onto->wfo 5419   -1-1-onto->wf1o 5420   ` cfv 5421  (class class class)co 6048   2ndc2nd 6315
This theorem is referenced by:  curry1val  6406  curry1f  6407
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2393  ax-sep 4298  ax-nul 4306  ax-pow 4345  ax-pr 4371  ax-un 4668
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2266  df-mo 2267  df-clab 2399  df-cleq 2405  df-clel 2408  df-nfc 2537  df-ne 2577  df-ral 2679  df-rex 2680  df-rab 2683  df-v 2926  df-sbc 3130  df-csb 3220  df-dif 3291  df-un 3293  df-in 3295  df-ss 3302  df-nul 3597  df-if 3708  df-sn 3788  df-pr 3789  df-op 3791  df-uni 3984  df-iun 4063  df-br 4181  df-opab 4235  df-mpt 4236  df-id 4466  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5385  df-fun 5423  df-fn 5424  df-f 5425  df-f1 5426  df-fo 5427  df-f1o 5428  df-fv 5429  df-ov 6051  df-1st 6316  df-2nd 6317
  Copyright terms: Public domain W3C validator