Users' Mathboxes Mathbox for Brendan Leahy < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  unccur Structured version   Visualization version   Unicode version

Theorem unccur 33392
Description: Uncurrying of currying. (Contributed by Brendan Leahy, 5-Jun-2021.)
Assertion
Ref Expression
unccur  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  -> uncurry curry  F  =  F )

Proof of Theorem unccur
Dummy variables  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ffn 6045 . . . . . . . . 9  |-  ( F : ( A  X.  B ) --> C  ->  F  Fn  ( A  X.  B ) )
21anim1i 592 . . . . . . . 8  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } ) )  ->  ( F  Fn  ( A  X.  B )  /\  B  e.  ( V  \  { (/)
} ) ) )
323adant3 1081 . . . . . . 7  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  ->  ( F  Fn  ( A  X.  B )  /\  B  e.  ( V  \  { (/)
} ) ) )
4 3anass 1042 . . . . . . . . . . 11  |-  ( ( F  Fn  ( A  X.  B )  /\  x  e.  A  /\  y  e.  B )  <->  ( F  Fn  ( A  X.  B )  /\  ( x  e.  A  /\  y  e.  B
) ) )
5 curfv 33389 . . . . . . . . . . 11  |-  ( ( ( F  Fn  ( A  X.  B )  /\  x  e.  A  /\  y  e.  B )  /\  B  e.  ( V  \  { (/) } ) )  ->  ( (curry  F `
 x ) `  y )  =  ( x F y ) )
64, 5sylanbr 490 . . . . . . . . . 10  |-  ( ( ( F  Fn  ( A  X.  B )  /\  ( x  e.  A  /\  y  e.  B
) )  /\  B  e.  ( V  \  { (/)
} ) )  -> 
( (curry  F `  x ) `  y
)  =  ( x F y ) )
76an32s 846 . . . . . . . . 9  |-  ( ( ( F  Fn  ( A  X.  B )  /\  B  e.  ( V  \  { (/) } ) )  /\  ( x  e.  A  /\  y  e.  B ) )  -> 
( (curry  F `  x ) `  y
)  =  ( x F y ) )
87eqeq1d 2624 . . . . . . . 8  |-  ( ( ( F  Fn  ( A  X.  B )  /\  B  e.  ( V  \  { (/) } ) )  /\  ( x  e.  A  /\  y  e.  B ) )  -> 
( ( (curry  F `  x ) `  y
)  =  z  <->  ( x F y )  =  z ) )
9 eqcom 2629 . . . . . . . 8  |-  ( ( x F y )  =  z  <->  z  =  ( x F y ) )
108, 9syl6bb 276 . . . . . . 7  |-  ( ( ( F  Fn  ( A  X.  B )  /\  B  e.  ( V  \  { (/) } ) )  /\  ( x  e.  A  /\  y  e.  B ) )  -> 
( ( (curry  F `  x ) `  y
)  =  z  <->  z  =  ( x F y ) ) )
113, 10sylan 488 . . . . . 6  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  (
x  e.  A  /\  y  e.  B )
)  ->  ( (
(curry  F `  x ) `
 y )  =  z  <->  z  =  ( x F y ) ) )
12 curf 33387 . . . . . . . . . 10  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  -> curry  F : A
--> ( C  ^m  B
) )
1312ffvelrnda 6359 . . . . . . . . 9  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  x  e.  A )  ->  (curry  F `
 x )  e.  ( C  ^m  B
) )
14 elmapfn 7880 . . . . . . . . 9  |-  ( (curry 
F `  x )  e.  ( C  ^m  B
)  ->  (curry  F `  x )  Fn  B
)
1513, 14syl 17 . . . . . . . 8  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  x  e.  A )  ->  (curry  F `
 x )  Fn  B )
16 fnbrfvb 6236 . . . . . . . 8  |-  ( ( (curry  F `  x
)  Fn  B  /\  y  e.  B )  ->  ( ( (curry  F `  x ) `  y
)  =  z  <->  y (curry  F `
 x ) z ) )
1715, 16sylan 488 . . . . . . 7  |-  ( ( ( ( F :
( A  X.  B
) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  x  e.  A )  /\  y  e.  B )  ->  (
( (curry  F `  x ) `  y
)  =  z  <->  y (curry  F `
 x ) z ) )
1817anasss 679 . . . . . 6  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  (
x  e.  A  /\  y  e.  B )
)  ->  ( (
(curry  F `  x ) `
 y )  =  z  <->  y (curry  F `  x ) z ) )
19 ibar 525 . . . . . . 7  |-  ( ( x  e.  A  /\  y  e.  B )  ->  ( z  =  ( x F y )  <-> 
( ( x  e.  A  /\  y  e.  B )  /\  z  =  ( x F y ) ) ) )
2019adantl 482 . . . . . 6  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  (
x  e.  A  /\  y  e.  B )
)  ->  ( z  =  ( x F y )  <->  ( (
x  e.  A  /\  y  e.  B )  /\  z  =  (
x F y ) ) ) )
2111, 18, 203bitr3d 298 . . . . 5  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  (
x  e.  A  /\  y  e.  B )
)  ->  ( y
(curry  F `  x ) z  <->  ( ( x  e.  A  /\  y  e.  B )  /\  z  =  ( x F y ) ) ) )
22 df-br 4654 . . . . . . . . . . 11  |-  ( y (curry  F `  x
) z  <->  <. y ,  z >.  e.  (curry  F `
 x ) )
23 elfvdm 6220 . . . . . . . . . . 11  |-  ( <.
y ,  z >.  e.  (curry  F `  x
)  ->  x  e.  dom curry  F )
2422, 23sylbi 207 . . . . . . . . . 10  |-  ( y (curry  F `  x
) z  ->  x  e.  dom curry  F )
25 fdm 6051 . . . . . . . . . . . 12  |-  (curry  F : A --> ( C  ^m  B )  ->  dom curry  F  =  A )
2625eleq2d 2687 . . . . . . . . . . 11  |-  (curry  F : A --> ( C  ^m  B )  ->  (
x  e.  dom curry  F  <->  x  e.  A ) )
2726biimpa 501 . . . . . . . . . 10  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  x  e.  dom curry  F )  ->  x  e.  A
)
2824, 27sylan2 491 . . . . . . . . 9  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  y (curry  F `  x
) z )  ->  x  e.  A )
29 ffvelrn 6357 . . . . . . . . . . . . 13  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  x  e.  A )  ->  (curry  F `  x
)  e.  ( C  ^m  B ) )
30 elmapi 7879 . . . . . . . . . . . . 13  |-  ( (curry 
F `  x )  e.  ( C  ^m  B
)  ->  (curry  F `  x ) : B --> C )
31 fdm 6051 . . . . . . . . . . . . 13  |-  ( (curry 
F `  x ) : B --> C  ->  dom  (curry  F `  x )  =  B )
3229, 30, 313syl 18 . . . . . . . . . . . 12  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  x  e.  A )  ->  dom  (curry  F `  x )  =  B )
33 vex 3203 . . . . . . . . . . . . 13  |-  y  e. 
_V
34 vex 3203 . . . . . . . . . . . . 13  |-  z  e. 
_V
3533, 34breldm 5329 . . . . . . . . . . . 12  |-  ( y (curry  F `  x
) z  ->  y  e.  dom  (curry  F `  x ) )
36 eleq2 2690 . . . . . . . . . . . . 13  |-  ( dom  (curry  F `  x
)  =  B  -> 
( y  e.  dom  (curry  F `  x )  <-> 
y  e.  B ) )
3736biimpa 501 . . . . . . . . . . . 12  |-  ( ( dom  (curry  F `  x )  =  B  /\  y  e.  dom  (curry  F `  x ) )  ->  y  e.  B )
3832, 35, 37syl2an 494 . . . . . . . . . . 11  |-  ( ( (curry  F : A --> ( C  ^m  B )  /\  x  e.  A
)  /\  y (curry  F `
 x ) z )  ->  y  e.  B )
3938an32s 846 . . . . . . . . . 10  |-  ( ( (curry  F : A --> ( C  ^m  B )  /\  y (curry  F `  x ) z )  /\  x  e.  A
)  ->  y  e.  B )
4028, 39mpdan 702 . . . . . . . . 9  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  y (curry  F `  x
) z )  -> 
y  e.  B )
4128, 40jca 554 . . . . . . . 8  |-  ( (curry 
F : A --> ( C  ^m  B )  /\  y (curry  F `  x
) z )  -> 
( x  e.  A  /\  y  e.  B
) )
4212, 41sylan 488 . . . . . . 7  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  y
(curry  F `  x ) z )  ->  (
x  e.  A  /\  y  e.  B )
)
4342stoic1a 1697 . . . . . 6  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  -.  ( x  e.  A  /\  y  e.  B
) )  ->  -.  y (curry  F `  x
) z )
44 simpl 473 . . . . . . . 8  |-  ( ( ( x  e.  A  /\  y  e.  B
)  /\  z  =  ( x F y ) )  ->  (
x  e.  A  /\  y  e.  B )
)
4544con3i 150 . . . . . . 7  |-  ( -.  ( x  e.  A  /\  y  e.  B
)  ->  -.  (
( x  e.  A  /\  y  e.  B
)  /\  z  =  ( x F y ) ) )
4645adantl 482 . . . . . 6  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  -.  ( x  e.  A  /\  y  e.  B
) )  ->  -.  ( ( x  e.  A  /\  y  e.  B )  /\  z  =  ( x F y ) ) )
4743, 462falsed 366 . . . . 5  |-  ( ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/)
} )  /\  C  e.  W )  /\  -.  ( x  e.  A  /\  y  e.  B
) )  ->  (
y (curry  F `  x ) z  <->  ( (
x  e.  A  /\  y  e.  B )  /\  z  =  (
x F y ) ) ) )
4821, 47pm2.61dan 832 . . . 4  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  ->  (
y (curry  F `  x ) z  <->  ( (
x  e.  A  /\  y  e.  B )  /\  z  =  (
x F y ) ) ) )
4948oprabbidv 6709 . . 3  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  ->  { <. <.
x ,  y >. ,  z >.  |  y (curry  F `  x
) z }  =  { <. <. x ,  y
>. ,  z >.  |  ( ( x  e.  A  /\  y  e.  B )  /\  z  =  ( x F y ) ) } )
50 df-unc 7394 . . 3  |- uncurry curry  F  =  { <. <. x ,  y
>. ,  z >.  |  y (curry  F `  x ) z }
51 df-mpt2 6655 . . 3  |-  ( x  e.  A ,  y  e.  B  |->  ( x F y ) )  =  { <. <. x ,  y >. ,  z
>.  |  ( (
x  e.  A  /\  y  e.  B )  /\  z  =  (
x F y ) ) }
5249, 50, 513eqtr4g 2681 . 2  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  -> uncurry curry  F  =  ( x  e.  A ,  y  e.  B  |->  ( x F y ) ) )
53 fnov 6768 . . . 4  |-  ( F  Fn  ( A  X.  B )  <->  F  =  ( x  e.  A ,  y  e.  B  |->  ( x F y ) ) )
541, 53sylib 208 . . 3  |-  ( F : ( A  X.  B ) --> C  ->  F  =  ( x  e.  A ,  y  e.  B  |->  ( x F y ) ) )
55543ad2ant1 1082 . 2  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  ->  F  =  ( x  e.  A ,  y  e.  B  |->  ( x F y ) ) )
5652, 55eqtr4d 2659 1  |-  ( ( F : ( A  X.  B ) --> C  /\  B  e.  ( V  \  { (/) } )  /\  C  e.  W )  -> uncurry curry  F  =  F )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 196    /\ wa 384    /\ w3a 1037    = wceq 1483    e. wcel 1990    \ cdif 3571   (/)c0 3915   {csn 4177   <.cop 4183   class class class wbr 4653    X. cxp 5112   dom cdm 5114    Fn wfn 5883   -->wf 5884   ` cfv 5888  (class class class)co 6650   {coprab 6651    |-> cmpt2 6652  curry ccur 7391  uncurry cunc 7392    ^m cmap 7857
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-rep 4771  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-reu 2919  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-pw 4160  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-oprab 6654  df-mpt2 6655  df-1st 7168  df-2nd 7169  df-cur 7393  df-unc 7394  df-map 7859
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator