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

Theorem oddpwdclemxy 10738
Description: Lemma for oddpwdc 10743. Another way of stating that decomposing a natural number into a power of two and an odd number is unique. (Contributed by Jim Kingdon, 16-Nov-2021.)
Assertion
Ref Expression
oddpwdclemxy  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 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
) ) ) )
Distinct variable groups:    z, A    z, Y
Allowed substitution hint:    X( z)

Proof of Theorem oddpwdclemxy
StepHypRef Expression
1 2nn 8296 . . . . . 6  |-  2  e.  NN
21a1i 9 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  NN )
3 simplll 500 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  NN )
43nnzd 8585 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  ZZ )
5 simplr 497 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  Y  e.  NN0 )
62, 5nnexpcld 9760 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  NN )
76nnzd 8585 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  ZZ )
8 simpr 108 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  =  ( (
2 ^ Y )  x.  X ) )
96, 3nnmulcld 8190 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  e.  NN )
108, 9eqeltrd 2159 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  NN )
1110nnzd 8585 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  ZZ )
126nncnd 8156 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  CC )
133nncnd 8156 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  CC )
1412, 13mulcomd 7238 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  =  ( X  x.  ( 2 ^ Y ) ) )
158, 14eqtr2d 2116 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( X  x.  (
2 ^ Y ) )  =  A )
16 dvds0lem 10397 . . . . . . . 8  |-  ( ( ( X  e.  ZZ  /\  ( 2 ^ Y
)  e.  ZZ  /\  A  e.  ZZ )  /\  ( X  x.  (
2 ^ Y ) )  =  A )  ->  ( 2 ^ Y )  ||  A
)
174, 7, 11, 15, 16syl31anc 1173 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  ||  A )
18 simpllr 501 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  2  ||  X )
198breq2d 3818 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  A  <->  ( ( 2 ^ Y
)  x.  2 ) 
||  ( ( 2 ^ Y )  x.  X ) ) )
202nnzd 8585 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  ZZ )
216nnne0d 8186 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  =/=  0 )
22 dvdscmulr 10416 . . . . . . . . . . 11  |-  ( ( 2  e.  ZZ  /\  X  e.  ZZ  /\  (
( 2 ^ Y
)  e.  ZZ  /\  ( 2 ^ Y
)  =/=  0 ) )  ->  ( (
( 2 ^ Y
)  x.  2 ) 
||  ( ( 2 ^ Y )  x.  X )  <->  2  ||  X ) )
2320, 4, 7, 21, 22syl112anc 1174 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  (
( 2 ^ Y
)  x.  X )  <->  2  ||  X ) )
2419, 23bitrd 186 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  A  <->  2 
||  X ) )
2518, 24mtbird 631 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( ( 2 ^ Y )  x.  2 )  ||  A )
262nncnd 8156 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  CC )
2726, 5expp1d 9739 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( Y  +  1 ) )  =  ( ( 2 ^ Y )  x.  2 ) )
2827breq1d 3816 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ ( Y  +  1 ) )  ||  A  <->  ( ( 2 ^ Y
)  x.  2 ) 
||  A ) )
2925, 28mtbird 631 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( 2 ^ ( Y  +  1 ) )  ||  A )
30 pw2dvdseu 10737 . . . . . . . . 9  |-  ( A  e.  NN  ->  E! z  e.  NN0  ( ( 2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) )
3110, 30syl 14 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  E! z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )
32 oveq2 5572 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
2 ^ z )  =  ( 2 ^ Y ) )
3332breq1d 3816 . . . . . . . . . 10  |-  ( z  =  Y  ->  (
( 2 ^ z
)  ||  A  <->  ( 2 ^ Y )  ||  A ) )
34 oveq1 5571 . . . . . . . . . . . . 13  |-  ( z  =  Y  ->  (
z  +  1 )  =  ( Y  + 
1 ) )
3534oveq2d 5580 . . . . . . . . . . . 12  |-  ( z  =  Y  ->  (
2 ^ ( z  +  1 ) )  =  ( 2 ^ ( Y  +  1 ) ) )
3635breq1d 3816 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
( 2 ^ (
z  +  1 ) )  ||  A  <->  ( 2 ^ ( Y  + 
1 ) )  ||  A ) )
3736notbid 625 . . . . . . . . . 10  |-  ( z  =  Y  ->  ( -.  ( 2 ^ (
z  +  1 ) )  ||  A  <->  -.  (
2 ^ ( Y  +  1 ) ) 
||  A ) )
3833, 37anbi12d 457 . . . . . . . . 9  |-  ( z  =  Y  ->  (
( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
)  <->  ( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  + 
1 ) )  ||  A ) ) )
3938riota2 5542 . . . . . . . 8  |-  ( ( Y  e.  NN0  /\  E! z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  ->  (
( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  +  1 ) )  ||  A
)  <->  ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) )  =  Y ) )
405, 31, 39syl2anc 403 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  + 
1 ) )  ||  A )  <->  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) )  =  Y ) )
4117, 29, 40mpbi2and 885 . . . . . 6  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  =  Y )
4241, 5eqeltrd 2159 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  e.  NN0 )
432, 42nnexpcld 9760 . . . 4  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  e.  NN )
4443nncnd 8156 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  e.  CC )
4543nnap0d 8187 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) ) #  0 )
4641eqcomd 2088 . . . . . 6  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  Y  =  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )
4746oveq2d 5580 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  =  ( 2 ^ ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) ) ) )
4847oveq1d 5579 . . . 4  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  =  ( ( 2 ^ ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  x.  X
) )
498, 48eqtr2d 2116 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) )  x.  X )  =  A )
5044, 13, 45, 49mvllmulapd 8024 . 2  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  =  ( A  /  ( 2 ^ ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) ) ) )
5150, 46jca 300 1  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 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
) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    = wceq 1285    e. wcel 1434    =/= wne 2249   E!wreu 2355   class class class wbr 3806   iota_crio 5519  (class class class)co 5564   0cc0 7079   1c1 7080    + caddc 7082    x. cmul 7084    / cdiv 7863   NNcn 8142   2c2 8192   NN0cn0 8391   ZZcz 8468   ^cexp 9608    || cdvds 10387
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3914  ax-sep 3917  ax-nul 3925  ax-pow 3969  ax-pr 3993  ax-un 4217  ax-setind 4309  ax-iinf 4358  ax-cnex 7165  ax-resscn 7166  ax-1cn 7167  ax-1re 7168  ax-icn 7169  ax-addcl 7170  ax-addrcl 7171  ax-mulcl 7172  ax-mulrcl 7173  ax-addcom 7174  ax-mulcom 7175  ax-addass 7176  ax-mulass 7177  ax-distr 7178  ax-i2m1 7179  ax-0lt1 7180  ax-1rid 7181  ax-0id 7182  ax-rnegex 7183  ax-precex 7184  ax-cnre 7185  ax-pre-ltirr 7186  ax-pre-ltwlin 7187  ax-pre-lttrn 7188  ax-pre-apti 7189  ax-pre-ltadd 7190  ax-pre-mulgt0 7191  ax-pre-mulext 7192  ax-arch 7193
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2612  df-sbc 2826  df-csb 2919  df-dif 2985  df-un 2987  df-in 2989  df-ss 2996  df-nul 3269  df-if 3370  df-pw 3403  df-sn 3423  df-pr 3424  df-op 3426  df-uni 3623  df-int 3658  df-iun 3701  df-br 3807  df-opab 3861  df-mpt 3862  df-tr 3897  df-id 4077  df-po 4080  df-iso 4081  df-iord 4150  df-on 4152  df-ilim 4153  df-suc 4155  df-iom 4361  df-xp 4398  df-rel 4399  df-cnv 4400  df-co 4401  df-dm 4402  df-rn 4403  df-res 4404  df-ima 4405  df-iota 4918  df-fun 4955  df-fn 4956  df-f 4957  df-f1 4958  df-fo 4959  df-f1o 4960  df-fv 4961  df-riota 5520  df-ov 5567  df-oprab 5568  df-mpt2 5569  df-1st 5819  df-2nd 5820  df-recs 5975  df-frec 6061  df-pnf 7253  df-mnf 7254  df-xr 7255  df-ltxr 7256  df-le 7257  df-sub 7384  df-neg 7385  df-reap 7778  df-ap 7785  df-div 7864  df-inn 8143  df-2 8201  df-n0 8392  df-z 8469  df-uz 8737  df-q 8822  df-rp 8852  df-fz 9142  df-fl 9388  df-mod 9441  df-iseq 9558  df-iexp 9609  df-dvds 10388
This theorem is referenced by:  oddpwdclemdc  10742
  Copyright terms: Public domain W3C validator