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

Theorem oddpwdclemxy 11240
Description: Lemma for oddpwdc 11245. 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 8547 . . . . . 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 8837 . . . . . . . 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 10073 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  NN )
76nnzd 8837 . . . . . . . 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 8442 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  e.  NN )
108, 9eqeltrd 2164 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  NN )
1110nnzd 8837 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  ZZ )
126nncnd 8408 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  CC )
133nncnd 8408 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  CC )
1412, 13mulcomd 7488 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  =  ( X  x.  ( 2 ^ Y ) ) )
158, 14eqtr2d 2121 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( X  x.  (
2 ^ Y ) )  =  A )
16 dvds0lem 10899 . . . . . . . 8  |-  ( ( ( X  e.  ZZ  /\  ( 2 ^ Y
)  e.  ZZ  /\  A  e.  ZZ )  /\  ( X  x.  (
2 ^ Y ) )  =  A )  ->  ( 2 ^ Y )  ||  A
)
174, 7, 11, 15, 16syl31anc 1177 . . . . . . 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 3849 . . . . . . . . . 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 8837 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  ZZ )
216nnne0d 8438 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  =/=  0 )
22 dvdscmulr 10918 . . . . . . . . . . 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 1178 . . . . . . . . . 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 633 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( ( 2 ^ Y )  x.  2 )  ||  A )
262nncnd 8408 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  CC )
2726, 5expp1d 10052 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( Y  +  1 ) )  =  ( ( 2 ^ Y )  x.  2 ) )
2827breq1d 3847 . . . . . . . 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 633 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( 2 ^ ( Y  +  1 ) )  ||  A )
30 pw2dvdseu 11239 . . . . . . . . 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 5642 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
2 ^ z )  =  ( 2 ^ Y ) )
3332breq1d 3847 . . . . . . . . . 10  |-  ( z  =  Y  ->  (
( 2 ^ z
)  ||  A  <->  ( 2 ^ Y )  ||  A ) )
34 oveq1 5641 . . . . . . . . . . . . 13  |-  ( z  =  Y  ->  (
z  +  1 )  =  ( Y  + 
1 ) )
3534oveq2d 5650 . . . . . . . . . . . 12  |-  ( z  =  Y  ->  (
2 ^ ( z  +  1 ) )  =  ( 2 ^ ( Y  +  1 ) ) )
3635breq1d 3847 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
( 2 ^ (
z  +  1 ) )  ||  A  <->  ( 2 ^ ( Y  + 
1 ) )  ||  A ) )
3736notbid 627 . . . . . . . . . 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 5612 . . . . . . . 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 889 . . . . . 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 2164 . . . . 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 10073 . . . 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 8408 . . 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 8439 . . 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 2093 . . . . . 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 5650 . . . . 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 5649 . . . 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 2121 . . 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 8276 . 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 1289    e. wcel 1438    =/= wne 2255   E!wreu 2361   class class class wbr 3837   iota_crio 5589  (class class class)co 5634   0cc0 7329   1c1 7330    + caddc 7332    x. cmul 7334    / cdiv 8113   NNcn 8394   2c2 8444   NN0cn0 8643   ZZcz 8720   ^cexp 9919    || cdvds 10889
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 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-coll 3946  ax-sep 3949  ax-nul 3957  ax-pow 4001  ax-pr 4027  ax-un 4251  ax-setind 4343  ax-iinf 4393  ax-cnex 7415  ax-resscn 7416  ax-1cn 7417  ax-1re 7418  ax-icn 7419  ax-addcl 7420  ax-addrcl 7421  ax-mulcl 7422  ax-mulrcl 7423  ax-addcom 7424  ax-mulcom 7425  ax-addass 7426  ax-mulass 7427  ax-distr 7428  ax-i2m1 7429  ax-0lt1 7430  ax-1rid 7431  ax-0id 7432  ax-rnegex 7433  ax-precex 7434  ax-cnre 7435  ax-pre-ltirr 7436  ax-pre-ltwlin 7437  ax-pre-lttrn 7438  ax-pre-apti 7439  ax-pre-ltadd 7440  ax-pre-mulgt0 7441  ax-pre-mulext 7442  ax-arch 7443
This theorem depends on definitions:  df-bi 115  df-dc 781  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2839  df-csb 2932  df-dif 2999  df-un 3001  df-in 3003  df-ss 3010  df-nul 3285  df-if 3390  df-pw 3427  df-sn 3447  df-pr 3448  df-op 3450  df-uni 3649  df-int 3684  df-iun 3727  df-br 3838  df-opab 3892  df-mpt 3893  df-tr 3929  df-id 4111  df-po 4114  df-iso 4115  df-iord 4184  df-on 4186  df-ilim 4187  df-suc 4189  df-iom 4396  df-xp 4434  df-rel 4435  df-cnv 4436  df-co 4437  df-dm 4438  df-rn 4439  df-res 4440  df-ima 4441  df-iota 4967  df-fun 5004  df-fn 5005  df-f 5006  df-f1 5007  df-fo 5008  df-f1o 5009  df-fv 5010  df-riota 5590  df-ov 5637  df-oprab 5638  df-mpt2 5639  df-1st 5893  df-2nd 5894  df-recs 6052  df-frec 6138  df-pnf 7503  df-mnf 7504  df-xr 7505  df-ltxr 7506  df-le 7507  df-sub 7634  df-neg 7635  df-reap 8028  df-ap 8035  df-div 8114  df-inn 8395  df-2 8452  df-n0 8644  df-z 8721  df-uz 8989  df-q 9074  df-rp 9104  df-fz 9394  df-fl 9642  df-mod 9695  df-iseq 9818  df-seq3 9819  df-exp 9920  df-dvds 10890
This theorem is referenced by:  oddpwdclemdc  11244
  Copyright terms: Public domain W3C validator