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

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

Proof of Theorem pw2dvds
StepHypRef Expression
1 id 19 . 2  |-  ( N  e.  NN  ->  N  e.  NN )
2 2nn 8778 . . . 4  |-  2  e.  NN
3 nnnn0 8881 . . . 4  |-  ( N  e.  NN  ->  N  e.  NN0 )
4 nnexpcl 10192 . . . 4  |-  ( ( 2  e.  NN  /\  N  e.  NN0 )  -> 
( 2 ^ N
)  e.  NN )
52, 3, 4sylancr 408 . . 3  |-  ( N  e.  NN  ->  (
2 ^ N )  e.  NN )
6 1zzd 8978 . . . 4  |-  ( N  e.  NN  ->  1  e.  ZZ )
7 2z 8979 . . . . . 6  |-  2  e.  ZZ
8 zexpcl 10194 . . . . . 6  |-  ( ( 2  e.  ZZ  /\  N  e.  NN0 )  -> 
( 2 ^ N
)  e.  ZZ )
97, 3, 8sylancr 408 . . . . 5  |-  ( N  e.  NN  ->  (
2 ^ N )  e.  ZZ )
109, 6zsubcld 9075 . . . 4  |-  ( N  e.  NN  ->  (
( 2 ^ N
)  -  1 )  e.  ZZ )
11 nnz 8970 . . . 4  |-  ( N  e.  NN  ->  N  e.  ZZ )
12 nnge1 8646 . . . 4  |-  ( N  e.  NN  ->  1  <_  N )
13 uzid 9235 . . . . . . 7  |-  ( 2  e.  ZZ  ->  2  e.  ( ZZ>= `  2 )
)
147, 13ax-mp 7 . . . . . 6  |-  2  e.  ( ZZ>= `  2 )
15 bernneq3 10300 . . . . . 6  |-  ( ( 2  e.  ( ZZ>= ` 
2 )  /\  N  e.  NN0 )  ->  N  <  ( 2 ^ N
) )
1614, 3, 15sylancr 408 . . . . 5  |-  ( N  e.  NN  ->  N  <  ( 2 ^ N
) )
17 zltlem1 9008 . . . . . 6  |-  ( ( N  e.  ZZ  /\  ( 2 ^ N
)  e.  ZZ )  ->  ( N  < 
( 2 ^ N
)  <->  N  <_  ( ( 2 ^ N )  -  1 ) ) )
1811, 9, 17syl2anc 406 . . . . 5  |-  ( N  e.  NN  ->  ( N  <  ( 2 ^ N )  <->  N  <_  ( ( 2 ^ N
)  -  1 ) ) )
1916, 18mpbid 146 . . . 4  |-  ( N  e.  NN  ->  N  <_  ( ( 2 ^ N )  -  1 ) )
20 elfz4 9685 . . . 4  |-  ( ( ( 1  e.  ZZ  /\  ( ( 2 ^ N )  -  1 )  e.  ZZ  /\  N  e.  ZZ )  /\  ( 1  <_  N  /\  N  <_  ( ( 2 ^ N )  -  1 ) ) )  ->  N  e.  ( 1 ... (
( 2 ^ N
)  -  1 ) ) )
216, 10, 11, 12, 19, 20syl32anc 1205 . . 3  |-  ( N  e.  NN  ->  N  e.  ( 1 ... (
( 2 ^ N
)  -  1 ) ) )
22 fzm1ndvds 11395 . . 3  |-  ( ( ( 2 ^ N
)  e.  NN  /\  N  e.  ( 1 ... ( ( 2 ^ N )  - 
1 ) ) )  ->  -.  ( 2 ^ N )  ||  N )
235, 21, 22syl2anc 406 . 2  |-  ( N  e.  NN  ->  -.  ( 2 ^ N
)  ||  N )
24 pw2dvdslemn 11681 . 2  |-  ( ( N  e.  NN  /\  N  e.  NN  /\  -.  ( 2 ^ N
)  ||  N )  ->  E. m  e.  NN0  ( ( 2 ^ m )  ||  N  /\  -.  ( 2 ^ ( m  +  1 ) )  ||  N
) )
251, 23, 24mpd3an23 1298 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 103    <-> wb 104    e. wcel 1461   E.wrex 2389   class class class wbr 3893   ` cfv 5079  (class class class)co 5726   1c1 7541    + caddc 7543    < clt 7717    <_ cle 7718    - cmin 7849   NNcn 8623   2c2 8674   NN0cn0 8874   ZZcz 8951   ZZ>=cuz 9221   ...cfz 9676   ^cexp 10178    || cdvds 11334
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1404  ax-7 1405  ax-gen 1406  ax-ie1 1450  ax-ie2 1451  ax-8 1463  ax-10 1464  ax-11 1465  ax-i12 1466  ax-bndl 1467  ax-4 1468  ax-13 1472  ax-14 1473  ax-17 1487  ax-i9 1491  ax-ial 1495  ax-i5r 1496  ax-ext 2095  ax-coll 4001  ax-sep 4004  ax-nul 4012  ax-pow 4056  ax-pr 4089  ax-un 4313  ax-setind 4410  ax-iinf 4460  ax-cnex 7629  ax-resscn 7630  ax-1cn 7631  ax-1re 7632  ax-icn 7633  ax-addcl 7634  ax-addrcl 7635  ax-mulcl 7636  ax-mulrcl 7637  ax-addcom 7638  ax-mulcom 7639  ax-addass 7640  ax-mulass 7641  ax-distr 7642  ax-i2m1 7643  ax-0lt1 7644  ax-1rid 7645  ax-0id 7646  ax-rnegex 7647  ax-precex 7648  ax-cnre 7649  ax-pre-ltirr 7650  ax-pre-ltwlin 7651  ax-pre-lttrn 7652  ax-pre-apti 7653  ax-pre-ltadd 7654  ax-pre-mulgt0 7655  ax-pre-mulext 7656  ax-arch 7657
This theorem depends on definitions:  df-bi 116  df-dc 803  df-3or 944  df-3an 945  df-tru 1315  df-fal 1318  df-nf 1418  df-sb 1717  df-eu 1976  df-mo 1977  df-clab 2100  df-cleq 2106  df-clel 2109  df-nfc 2242  df-ne 2281  df-nel 2376  df-ral 2393  df-rex 2394  df-reu 2395  df-rmo 2396  df-rab 2397  df-v 2657  df-sbc 2877  df-csb 2970  df-dif 3037  df-un 3039  df-in 3041  df-ss 3048  df-nul 3328  df-if 3439  df-pw 3476  df-sn 3497  df-pr 3498  df-op 3500  df-uni 3701  df-int 3736  df-iun 3779  df-br 3894  df-opab 3948  df-mpt 3949  df-tr 3985  df-id 4173  df-po 4176  df-iso 4177  df-iord 4246  df-on 4248  df-ilim 4249  df-suc 4251  df-iom 4463  df-xp 4503  df-rel 4504  df-cnv 4505  df-co 4506  df-dm 4507  df-rn 4508  df-res 4509  df-ima 4510  df-iota 5044  df-fun 5081  df-fn 5082  df-f 5083  df-f1 5084  df-fo 5085  df-f1o 5086  df-fv 5087  df-riota 5682  df-ov 5729  df-oprab 5730  df-mpo 5731  df-1st 5989  df-2nd 5990  df-recs 6153  df-frec 6239  df-pnf 7719  df-mnf 7720  df-xr 7721  df-ltxr 7722  df-le 7723  df-sub 7851  df-neg 7852  df-reap 8248  df-ap 8255  df-div 8339  df-inn 8624  df-2 8682  df-n0 8875  df-z 8952  df-uz 9222  df-q 9307  df-rp 9337  df-fz 9677  df-fl 9929  df-mod 9982  df-seqfrec 10105  df-exp 10179  df-dvds 11335
This theorem is referenced by:  pw2dvdseu  11684  oddpwdclemdvds  11686  oddpwdclemndvds  11687
  Copyright terms: Public domain W3C validator