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

Theorem pw2dvdseu 10690
Description: A natural number has a unique highest power of two which divides it. (Contributed by Jim Kingdon, 16-Nov-2021.)
Assertion
Ref Expression
pw2dvdseu  |-  ( N  e.  NN  ->  E! m  e.  NN0  ( ( 2 ^ m ) 
||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N ) )
Distinct variable group:    m, N

Proof of Theorem pw2dvdseu
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 pw2dvds 10688 . 2  |-  ( N  e.  NN  ->  E. m  e.  NN0  ( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  + 
1 ) )  ||  N ) )
2 simpll 496 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  N  e.  NN )
3 simplrl 502 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  m  e.  NN0 )
4 simplrr 503 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  x  e.  NN0 )
5 simprll 504 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  ( 2 ^ m )  ||  N
)
6 simprrr 507 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  -.  ( 2 ^ ( x  + 
1 ) )  ||  N )
72, 3, 4, 5, 6pw2dvdseulemle 10689 . . . . . 6  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  m  <_  x
)
8 simprrl 506 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  ( 2 ^ x )  ||  N
)
9 simprlr 505 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  -.  ( 2 ^ ( m  + 
1 ) )  ||  N )
102, 4, 3, 8, 9pw2dvdseulemle 10689 . . . . . 6  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  x  <_  m
)
113nn0red 8409 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  m  e.  RR )
124nn0red 8409 . . . . . . 7  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  x  e.  RR )
1311, 12letri3d 7293 . . . . . 6  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  ( m  =  x  <->  ( m  <_  x  /\  x  <_  m
) ) )
147, 10, 13mpbir2and 886 . . . . 5  |-  ( ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  /\  ( (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )  ->  m  =  x )
1514ex 113 . . . 4  |-  ( ( N  e.  NN  /\  ( m  e.  NN0  /\  x  e.  NN0 )
)  ->  ( (
( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  +  1 ) )  ||  N
)  /\  ( (
2 ^ x ) 
||  N  /\  -.  ( 2 ^ (
x  +  1 ) )  ||  N ) )  ->  m  =  x ) )
1615ralrimivva 2444 . . 3  |-  ( N  e.  NN  ->  A. m  e.  NN0  A. x  e. 
NN0  ( ( ( ( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  /\  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) )  ->  m  =  x )
)
17 oveq2 5551 . . . . . 6  |-  ( m  =  x  ->  (
2 ^ m )  =  ( 2 ^ x ) )
1817breq1d 3803 . . . . 5  |-  ( m  =  x  ->  (
( 2 ^ m
)  ||  N  <->  ( 2 ^ x )  ||  N ) )
19 oveq1 5550 . . . . . . . 8  |-  ( m  =  x  ->  (
m  +  1 )  =  ( x  + 
1 ) )
2019oveq2d 5559 . . . . . . 7  |-  ( m  =  x  ->  (
2 ^ ( m  +  1 ) )  =  ( 2 ^ ( x  +  1 ) ) )
2120breq1d 3803 . . . . . 6  |-  ( m  =  x  ->  (
( 2 ^ (
m  +  1 ) )  ||  N  <->  ( 2 ^ ( x  + 
1 ) )  ||  N ) )
2221notbid 625 . . . . 5  |-  ( m  =  x  ->  ( -.  ( 2 ^ (
m  +  1 ) )  ||  N  <->  -.  (
2 ^ ( x  +  1 ) ) 
||  N ) )
2318, 22anbi12d 457 . . . 4  |-  ( m  =  x  ->  (
( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  +  1 ) )  ||  N
)  <->  ( ( 2 ^ x )  ||  N  /\  -.  ( 2 ^ ( x  + 
1 ) )  ||  N ) ) )
2423rmo4 2786 . . 3  |-  ( E* m  e.  NN0  (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  <->  A. m  e.  NN0  A. x  e.  NN0  (
( ( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  + 
1 ) )  ||  N )  /\  (
( 2 ^ x
)  ||  N  /\  -.  ( 2 ^ (
x  +  1 ) )  ||  N ) )  ->  m  =  x ) )
2516, 24sylibr 132 . 2  |-  ( N  e.  NN  ->  E* m  e.  NN0  ( ( 2 ^ m ) 
||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N ) )
26 reu5 2567 . 2  |-  ( E! m  e.  NN0  (
( 2 ^ m
)  ||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N )  <-> 
( E. m  e. 
NN0  ( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  + 
1 ) )  ||  N )  /\  E* m  e.  NN0  ( ( 2 ^ m ) 
||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N ) ) )
271, 25, 26sylanbrc 408 1  |-  ( N  e.  NN  ->  E! m  e.  NN0  ( ( 2 ^ m ) 
||  N  /\  -.  ( 2 ^ (
m  +  1 ) )  ||  N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    e. wcel 1434   A.wral 2349   E.wrex 2350   E!wreu 2351   E*wrmo 2352   class class class wbr 3793  (class class class)co 5543   1c1 7044    + caddc 7046    <_ cle 7216   NNcn 8106   2c2 8156   NN0cn0 8355   ^cexp 9572    || cdvds 10340
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 2064  ax-coll 3901  ax-sep 3904  ax-nul 3912  ax-pow 3956  ax-pr 3972  ax-un 4196  ax-setind 4288  ax-iinf 4337  ax-cnex 7129  ax-resscn 7130  ax-1cn 7131  ax-1re 7132  ax-icn 7133  ax-addcl 7134  ax-addrcl 7135  ax-mulcl 7136  ax-mulrcl 7137  ax-addcom 7138  ax-mulcom 7139  ax-addass 7140  ax-mulass 7141  ax-distr 7142  ax-i2m1 7143  ax-0lt1 7144  ax-1rid 7145  ax-0id 7146  ax-rnegex 7147  ax-precex 7148  ax-cnre 7149  ax-pre-ltirr 7150  ax-pre-ltwlin 7151  ax-pre-lttrn 7152  ax-pre-apti 7153  ax-pre-ltadd 7154  ax-pre-mulgt0 7155  ax-pre-mulext 7156  ax-arch 7157
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 1687  df-eu 1945  df-mo 1946  df-clab 2069  df-cleq 2075  df-clel 2078  df-nfc 2209  df-ne 2247  df-nel 2341  df-ral 2354  df-rex 2355  df-reu 2356  df-rmo 2357  df-rab 2358  df-v 2604  df-sbc 2817  df-csb 2910  df-dif 2976  df-un 2978  df-in 2980  df-ss 2987  df-nul 3259  df-if 3360  df-pw 3392  df-sn 3412  df-pr 3413  df-op 3415  df-uni 3610  df-int 3645  df-iun 3688  df-br 3794  df-opab 3848  df-mpt 3849  df-tr 3884  df-id 4056  df-po 4059  df-iso 4060  df-iord 4129  df-on 4131  df-ilim 4132  df-suc 4134  df-iom 4340  df-xp 4377  df-rel 4378  df-cnv 4379  df-co 4380  df-dm 4381  df-rn 4382  df-res 4383  df-ima 4384  df-iota 4897  df-fun 4934  df-fn 4935  df-f 4936  df-f1 4937  df-fo 4938  df-f1o 4939  df-fv 4940  df-riota 5499  df-ov 5546  df-oprab 5547  df-mpt2 5548  df-1st 5798  df-2nd 5799  df-recs 5954  df-frec 6040  df-pnf 7217  df-mnf 7218  df-xr 7219  df-ltxr 7220  df-le 7221  df-sub 7348  df-neg 7349  df-reap 7742  df-ap 7749  df-div 7828  df-inn 8107  df-2 8165  df-n0 8356  df-z 8433  df-uz 8701  df-q 8786  df-rp 8816  df-fz 9106  df-fl 9352  df-mod 9405  df-iseq 9522  df-iexp 9573  df-dvds 10341
This theorem is referenced by:  oddpwdclemxy  10691  oddpwdclemdvds  10692  oddpwdclemndvds  10693  oddpwdclemodd  10694  oddpwdclemdc  10695  oddpwdc  10696
  Copyright terms: Public domain W3C validator