ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  oddpwdc Unicode version

Theorem oddpwdc 12028
Description: The function  F that decomposes a number into its "odd" and "even" parts, which is to say the largest power of two and largest odd divisor of a number, is a bijection from pairs of a nonnegative integer and an odd number to positive integers. (Contributed by Thierry Arnoux, 15-Aug-2017.)
Hypotheses
Ref Expression
oddpwdc.j  |-  J  =  { z  e.  NN  |  -.  2  ||  z }
oddpwdc.f  |-  F  =  ( x  e.  J ,  y  e.  NN0  |->  ( ( 2 ^ y )  x.  x
) )
Assertion
Ref Expression
oddpwdc  |-  F :
( J  X.  NN0 )
-1-1-onto-> NN
Distinct variable groups:    x, y, z   
x, J, y
Allowed substitution hints:    F( x, y, z)    J( z)

Proof of Theorem oddpwdc
Dummy variable  a is distinct from all other variables.
StepHypRef Expression
1 oddpwdc.f . . 3  |-  F  =  ( x  e.  J ,  y  e.  NN0  |->  ( ( 2 ^ y )  x.  x
) )
2 2cnd 8889 . . . . . 6  |-  ( ( x  e.  J  /\  y  e.  NN0 )  -> 
2  e.  CC )
3 simpr 109 . . . . . 6  |-  ( ( x  e.  J  /\  y  e.  NN0 )  -> 
y  e.  NN0 )
42, 3expcld 10533 . . . . 5  |-  ( ( x  e.  J  /\  y  e.  NN0 )  -> 
( 2 ^ y
)  e.  CC )
5 breq2 3969 . . . . . . . . . 10  |-  ( z  =  x  ->  (
2  ||  z  <->  2  ||  x ) )
65notbid 657 . . . . . . . . 9  |-  ( z  =  x  ->  ( -.  2  ||  z  <->  -.  2  ||  x ) )
7 oddpwdc.j . . . . . . . . 9  |-  J  =  { z  e.  NN  |  -.  2  ||  z }
86, 7elrab2 2871 . . . . . . . 8  |-  ( x  e.  J  <->  ( x  e.  NN  /\  -.  2  ||  x ) )
98simplbi 272 . . . . . . 7  |-  ( x  e.  J  ->  x  e.  NN )
109adantr 274 . . . . . 6  |-  ( ( x  e.  J  /\  y  e.  NN0 )  ->  x  e.  NN )
1110nncnd 8830 . . . . 5  |-  ( ( x  e.  J  /\  y  e.  NN0 )  ->  x  e.  CC )
124, 11mulcld 7881 . . . 4  |-  ( ( x  e.  J  /\  y  e.  NN0 )  -> 
( ( 2 ^ y )  x.  x
)  e.  CC )
1312adantl 275 . . 3  |-  ( ( T.  /\  ( x  e.  J  /\  y  e.  NN0 ) )  -> 
( ( 2 ^ y )  x.  x
)  e.  CC )
14 nnnn0 9080 . . . . . 6  |-  ( a  e.  NN  ->  a  e.  NN0 )
15 2nn 8977 . . . . . . 7  |-  2  e.  NN
16 pw2dvdseu 12022 . . . . . . . 8  |-  ( a  e.  NN  ->  E! z  e.  NN0  ( ( 2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) )
17 riotacl 5788 . . . . . . . 8  |-  ( E! z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a )  ->  ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  a  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  a ) )  e. 
NN0 )
1816, 17syl 14 . . . . . . 7  |-  ( a  e.  NN  ->  ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) )  e.  NN0 )
19 nnexpcl 10414 . . . . . . 7  |-  ( ( 2  e.  NN  /\  ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  a  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  a
) )  e.  NN0 )  ->  ( 2 ^ ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  a  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  a
) ) )  e.  NN )
2015, 18, 19sylancr 411 . . . . . 6  |-  ( a  e.  NN  ->  (
2 ^ ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) )  e.  NN )
21 nn0nndivcl 9135 . . . . . 6  |-  ( ( a  e.  NN0  /\  ( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) )  e.  NN )  ->  ( a  / 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  e.  RR )
2214, 20, 21syl2anc 409 . . . . 5  |-  ( a  e.  NN  ->  (
a  /  ( 2 ^ ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  a  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  a ) ) ) )  e.  RR )
2322, 18jca 304 . . . 4  |-  ( a  e.  NN  ->  (
( a  /  (
2 ^ ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  e.  RR  /\  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) )  e.  NN0 )
)
2423adantl 275 . . 3  |-  ( ( T.  /\  a  e.  NN )  ->  (
( a  /  (
2 ^ ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  e.  RR  /\  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) )  e.  NN0 )
)
258anbi1i 454 . . . . . 6  |-  ( ( x  e.  J  /\  y  e.  NN0 )  <->  ( (
x  e.  NN  /\  -.  2  ||  x )  /\  y  e.  NN0 ) )
2625anbi1i 454 . . . . 5  |-  ( ( ( x  e.  J  /\  y  e.  NN0 )  /\  a  =  ( ( 2 ^ y
)  x.  x ) )  <->  ( ( ( x  e.  NN  /\  -.  2  ||  x )  /\  y  e.  NN0 )  /\  a  =  ( ( 2 ^ y
)  x.  x ) ) )
27 oddpwdclemdc 12027 . . . . 5  |-  ( ( ( ( x  e.  NN  /\  -.  2  ||  x )  /\  y  e.  NN0 )  /\  a  =  ( ( 2 ^ y )  x.  x ) )  <->  ( a  e.  NN  /\  ( x  =  ( a  / 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  /\  y  =  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) ) )
2826, 27bitri 183 . . . 4  |-  ( ( ( x  e.  J  /\  y  e.  NN0 )  /\  a  =  ( ( 2 ^ y
)  x.  x ) )  <->  ( a  e.  NN  /\  ( x  =  ( a  / 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  /\  y  =  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) ) )
2928a1i 9 . . 3  |-  ( T. 
->  ( ( ( x  e.  J  /\  y  e.  NN0 )  /\  a  =  ( ( 2 ^ y )  x.  x ) )  <->  ( a  e.  NN  /\  ( x  =  ( a  / 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) )  /\  y  =  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  a  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  a ) ) ) ) ) )
301, 13, 24, 29f1od2 6176 . 2  |-  ( T. 
->  F : ( J  X.  NN0 ) -1-1-onto-> NN )
3130mptru 1344 1  |-  F :
( J  X.  NN0 )
-1-1-onto-> NN
Colors of variables: wff set class
Syntax hints:   -. wn 3    /\ wa 103    <-> wb 104    = wceq 1335   T. wtru 1336    e. wcel 2128   E!wreu 2437   {crab 2439   class class class wbr 3965    X. cxp 4581   -1-1-onto->wf1o 5166   iota_crio 5773  (class class class)co 5818    e. cmpo 5820   CCcc 7713   RRcr 7714   1c1 7716    + caddc 7718    x. cmul 7720    / cdiv 8528   NNcn 8816   2c2 8867   NN0cn0 9073   ^cexp 10400    || cdvds 11665
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4079  ax-sep 4082  ax-nul 4090  ax-pow 4134  ax-pr 4168  ax-un 4392  ax-setind 4494  ax-iinf 4545  ax-cnex 7806  ax-resscn 7807  ax-1cn 7808  ax-1re 7809  ax-icn 7810  ax-addcl 7811  ax-addrcl 7812  ax-mulcl 7813  ax-mulrcl 7814  ax-addcom 7815  ax-mulcom 7816  ax-addass 7817  ax-mulass 7818  ax-distr 7819  ax-i2m1 7820  ax-0lt1 7821  ax-1rid 7822  ax-0id 7823  ax-rnegex 7824  ax-precex 7825  ax-cnre 7826  ax-pre-ltirr 7827  ax-pre-ltwlin 7828  ax-pre-lttrn 7829  ax-pre-apti 7830  ax-pre-ltadd 7831  ax-pre-mulgt0 7832  ax-pre-mulext 7833  ax-arch 7834
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3395  df-if 3506  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-iun 3851  df-br 3966  df-opab 4026  df-mpt 4027  df-tr 4063  df-id 4252  df-po 4255  df-iso 4256  df-iord 4325  df-on 4327  df-ilim 4328  df-suc 4330  df-iom 4548  df-xp 4589  df-rel 4590  df-cnv 4591  df-co 4592  df-dm 4593  df-rn 4594  df-res 4595  df-ima 4596  df-iota 5132  df-fun 5169  df-fn 5170  df-f 5171  df-f1 5172  df-fo 5173  df-f1o 5174  df-fv 5175  df-riota 5774  df-ov 5821  df-oprab 5822  df-mpo 5823  df-1st 6082  df-2nd 6083  df-recs 6246  df-frec 6332  df-pnf 7897  df-mnf 7898  df-xr 7899  df-ltxr 7900  df-le 7901  df-sub 8031  df-neg 8032  df-reap 8433  df-ap 8440  df-div 8529  df-inn 8817  df-2 8875  df-n0 9074  df-z 9151  df-uz 9423  df-q 9511  df-rp 9543  df-fz 9895  df-fl 10151  df-mod 10204  df-seqfrec 10327  df-exp 10401  df-dvds 11666
This theorem is referenced by:  sqpweven  12029  2sqpwodd  12030  xpnnen  12095
  Copyright terms: Public domain W3C validator