Mathbox for Alexander van der Vekens |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > Mathboxes > nnpw2blen | Structured version Visualization version GIF version |
Description: A positive integer is between 2 to the power of its binary length minus 1 and 2 to the power of its binary length. (Contributed by AV, 31-May-2020.) |
Ref | Expression |
---|---|
nnpw2blen | ⊢ (𝑁 ∈ ℕ → ((2↑((#b‘𝑁) − 1)) ≤ 𝑁 ∧ 𝑁 < (2↑(#b‘𝑁)))) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | 2rp 12763 | . . . . . . . . . 10 ⊢ 2 ∈ ℝ+ | |
2 | 1 | a1i 11 | . . . . . . . . 9 ⊢ (𝑁 ∈ ℕ → 2 ∈ ℝ+) |
3 | nnrp 12769 | . . . . . . . . 9 ⊢ (𝑁 ∈ ℕ → 𝑁 ∈ ℝ+) | |
4 | 1ne2 12209 | . . . . . . . . . . 11 ⊢ 1 ≠ 2 | |
5 | 4 | necomi 2993 | . . . . . . . . . 10 ⊢ 2 ≠ 1 |
6 | 5 | a1i 11 | . . . . . . . . 9 ⊢ (𝑁 ∈ ℕ → 2 ≠ 1) |
7 | relogbcl 25951 | . . . . . . . . 9 ⊢ ((2 ∈ ℝ+ ∧ 𝑁 ∈ ℝ+ ∧ 2 ≠ 1) → (2 logb 𝑁) ∈ ℝ) | |
8 | 2, 3, 6, 7 | syl3anc 1369 | . . . . . . . 8 ⊢ (𝑁 ∈ ℕ → (2 logb 𝑁) ∈ ℝ) |
9 | 8 | flcld 13546 | . . . . . . 7 ⊢ (𝑁 ∈ ℕ → (⌊‘(2 logb 𝑁)) ∈ ℤ) |
10 | 9 | zcnd 12455 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → (⌊‘(2 logb 𝑁)) ∈ ℂ) |
11 | pncan1 11427 | . . . . . 6 ⊢ ((⌊‘(2 logb 𝑁)) ∈ ℂ → (((⌊‘(2 logb 𝑁)) + 1) − 1) = (⌊‘(2 logb 𝑁))) | |
12 | 10, 11 | syl 17 | . . . . 5 ⊢ (𝑁 ∈ ℕ → (((⌊‘(2 logb 𝑁)) + 1) − 1) = (⌊‘(2 logb 𝑁))) |
13 | 12 | oveq2d 7311 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑(((⌊‘(2 logb 𝑁)) + 1) − 1)) = (2↑(⌊‘(2 logb 𝑁)))) |
14 | blennn 45961 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → (#b‘𝑁) = ((⌊‘(2 logb 𝑁)) + 1)) | |
15 | 14 | oveq1d 7310 | . . . . 5 ⊢ (𝑁 ∈ ℕ → ((#b‘𝑁) − 1) = (((⌊‘(2 logb 𝑁)) + 1) − 1)) |
16 | 15 | oveq2d 7311 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑((#b‘𝑁) − 1)) = (2↑(((⌊‘(2 logb 𝑁)) + 1) − 1))) |
17 | 2cnd 12079 | . . . . 5 ⊢ (𝑁 ∈ ℕ → 2 ∈ ℂ) | |
18 | 2ne0 12105 | . . . . . 6 ⊢ 2 ≠ 0 | |
19 | 18 | a1i 11 | . . . . 5 ⊢ (𝑁 ∈ ℕ → 2 ≠ 0) |
20 | 17, 19, 9 | cxpexpzd 25894 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑𝑐(⌊‘(2 logb 𝑁))) = (2↑(⌊‘(2 logb 𝑁)))) |
21 | 13, 16, 20 | 3eqtr4d 2783 | . . 3 ⊢ (𝑁 ∈ ℕ → (2↑((#b‘𝑁) − 1)) = (2↑𝑐(⌊‘(2 logb 𝑁)))) |
22 | flle 13547 | . . . . . 6 ⊢ ((2 logb 𝑁) ∈ ℝ → (⌊‘(2 logb 𝑁)) ≤ (2 logb 𝑁)) | |
23 | 8, 22 | syl 17 | . . . . 5 ⊢ (𝑁 ∈ ℕ → (⌊‘(2 logb 𝑁)) ≤ (2 logb 𝑁)) |
24 | 2re 12075 | . . . . . . 7 ⊢ 2 ∈ ℝ | |
25 | 24 | a1i 11 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → 2 ∈ ℝ) |
26 | 1lt2 12172 | . . . . . . 7 ⊢ 1 < 2 | |
27 | 26 | a1i 11 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → 1 < 2) |
28 | 9 | zred 12454 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → (⌊‘(2 logb 𝑁)) ∈ ℝ) |
29 | 25, 27, 28, 8 | cxpled 25903 | . . . . 5 ⊢ (𝑁 ∈ ℕ → ((⌊‘(2 logb 𝑁)) ≤ (2 logb 𝑁) ↔ (2↑𝑐(⌊‘(2 logb 𝑁))) ≤ (2↑𝑐(2 logb 𝑁)))) |
30 | 23, 29 | mpbid 231 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑𝑐(⌊‘(2 logb 𝑁))) ≤ (2↑𝑐(2 logb 𝑁))) |
31 | 2cn 12076 | . . . . . 6 ⊢ 2 ∈ ℂ | |
32 | eldifpr 4596 | . . . . . 6 ⊢ (2 ∈ (ℂ ∖ {0, 1}) ↔ (2 ∈ ℂ ∧ 2 ≠ 0 ∧ 2 ≠ 1)) | |
33 | 31, 18, 5, 32 | mpbir3an 1339 | . . . . 5 ⊢ 2 ∈ (ℂ ∖ {0, 1}) |
34 | nncn 12009 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → 𝑁 ∈ ℂ) | |
35 | nnne0 12035 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → 𝑁 ≠ 0) | |
36 | eldifsn 4723 | . . . . . 6 ⊢ (𝑁 ∈ (ℂ ∖ {0}) ↔ (𝑁 ∈ ℂ ∧ 𝑁 ≠ 0)) | |
37 | 34, 35, 36 | sylanbrc 582 | . . . . 5 ⊢ (𝑁 ∈ ℕ → 𝑁 ∈ (ℂ ∖ {0})) |
38 | cxplogb 25964 | . . . . 5 ⊢ ((2 ∈ (ℂ ∖ {0, 1}) ∧ 𝑁 ∈ (ℂ ∖ {0})) → (2↑𝑐(2 logb 𝑁)) = 𝑁) | |
39 | 33, 37, 38 | sylancr 586 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑𝑐(2 logb 𝑁)) = 𝑁) |
40 | 30, 39 | breqtrd 5103 | . . 3 ⊢ (𝑁 ∈ ℕ → (2↑𝑐(⌊‘(2 logb 𝑁))) ≤ 𝑁) |
41 | 21, 40 | eqbrtrd 5099 | . 2 ⊢ (𝑁 ∈ ℕ → (2↑((#b‘𝑁) − 1)) ≤ 𝑁) |
42 | flltp1 13548 | . . . . . 6 ⊢ ((2 logb 𝑁) ∈ ℝ → (2 logb 𝑁) < ((⌊‘(2 logb 𝑁)) + 1)) | |
43 | 8, 42 | syl 17 | . . . . 5 ⊢ (𝑁 ∈ ℕ → (2 logb 𝑁) < ((⌊‘(2 logb 𝑁)) + 1)) |
44 | 9 | peano2zd 12457 | . . . . . . 7 ⊢ (𝑁 ∈ ℕ → ((⌊‘(2 logb 𝑁)) + 1) ∈ ℤ) |
45 | 44 | zred 12454 | . . . . . 6 ⊢ (𝑁 ∈ ℕ → ((⌊‘(2 logb 𝑁)) + 1) ∈ ℝ) |
46 | 25, 27, 8, 45 | cxpltd 25902 | . . . . 5 ⊢ (𝑁 ∈ ℕ → ((2 logb 𝑁) < ((⌊‘(2 logb 𝑁)) + 1) ↔ (2↑𝑐(2 logb 𝑁)) < (2↑𝑐((⌊‘(2 logb 𝑁)) + 1)))) |
47 | 43, 46 | mpbid 231 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑𝑐(2 logb 𝑁)) < (2↑𝑐((⌊‘(2 logb 𝑁)) + 1))) |
48 | 17, 19, 44 | cxpexpzd 25894 | . . . 4 ⊢ (𝑁 ∈ ℕ → (2↑𝑐((⌊‘(2 logb 𝑁)) + 1)) = (2↑((⌊‘(2 logb 𝑁)) + 1))) |
49 | 47, 39, 48 | 3brtr3d 5108 | . . 3 ⊢ (𝑁 ∈ ℕ → 𝑁 < (2↑((⌊‘(2 logb 𝑁)) + 1))) |
50 | 14 | oveq2d 7311 | . . 3 ⊢ (𝑁 ∈ ℕ → (2↑(#b‘𝑁)) = (2↑((⌊‘(2 logb 𝑁)) + 1))) |
51 | 49, 50 | breqtrrd 5105 | . 2 ⊢ (𝑁 ∈ ℕ → 𝑁 < (2↑(#b‘𝑁))) |
52 | 41, 51 | jca 511 | 1 ⊢ (𝑁 ∈ ℕ → ((2↑((#b‘𝑁) − 1)) ≤ 𝑁 ∧ 𝑁 < (2↑(#b‘𝑁)))) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 395 = wceq 1537 ∈ wcel 2101 ≠ wne 2938 ∖ cdif 3886 {csn 4564 {cpr 4566 class class class wbr 5077 ‘cfv 6447 (class class class)co 7295 ℂcc 10897 ℝcr 10898 0cc0 10899 1c1 10900 + caddc 10902 < clt 11037 ≤ cle 11038 − cmin 11233 ℕcn 12001 2c2 12056 ℝ+crp 12758 ⌊cfl 13538 ↑cexp 13810 ↑𝑐ccxp 25739 logb clogb 25942 #bcblen 45955 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1793 ax-4 1807 ax-5 1909 ax-6 1967 ax-7 2007 ax-8 2103 ax-9 2111 ax-10 2132 ax-11 2149 ax-12 2166 ax-ext 2704 ax-rep 5212 ax-sep 5226 ax-nul 5233 ax-pow 5291 ax-pr 5355 ax-un 7608 ax-inf2 9427 ax-cnex 10955 ax-resscn 10956 ax-1cn 10957 ax-icn 10958 ax-addcl 10959 ax-addrcl 10960 ax-mulcl 10961 ax-mulrcl 10962 ax-mulcom 10963 ax-addass 10964 ax-mulass 10965 ax-distr 10966 ax-i2m1 10967 ax-1ne0 10968 ax-1rid 10969 ax-rnegex 10970 ax-rrecex 10971 ax-cnre 10972 ax-pre-lttri 10973 ax-pre-lttrn 10974 ax-pre-ltadd 10975 ax-pre-mulgt0 10976 ax-pre-sup 10977 ax-addf 10978 ax-mulf 10979 |
This theorem depends on definitions: df-bi 206 df-an 396 df-or 844 df-3or 1086 df-3an 1087 df-tru 1540 df-fal 1550 df-ex 1778 df-nf 1782 df-sb 2063 df-mo 2535 df-eu 2564 df-clab 2711 df-cleq 2725 df-clel 2811 df-nfc 2884 df-ne 2939 df-nel 3045 df-ral 3060 df-rex 3069 df-rmo 3222 df-reu 3223 df-rab 3224 df-v 3436 df-sbc 3719 df-csb 3835 df-dif 3892 df-un 3894 df-in 3896 df-ss 3906 df-pss 3908 df-nul 4260 df-if 4463 df-pw 4538 df-sn 4565 df-pr 4567 df-tp 4569 df-op 4571 df-uni 4842 df-int 4883 df-iun 4929 df-iin 4930 df-br 5078 df-opab 5140 df-mpt 5161 df-tr 5195 df-id 5491 df-eprel 5497 df-po 5505 df-so 5506 df-fr 5546 df-se 5547 df-we 5548 df-xp 5597 df-rel 5598 df-cnv 5599 df-co 5600 df-dm 5601 df-rn 5602 df-res 5603 df-ima 5604 df-pred 6206 df-ord 6273 df-on 6274 df-lim 6275 df-suc 6276 df-iota 6399 df-fun 6449 df-fn 6450 df-f 6451 df-f1 6452 df-fo 6453 df-f1o 6454 df-fv 6455 df-isom 6456 df-riota 7252 df-ov 7298 df-oprab 7299 df-mpo 7300 df-of 7553 df-om 7733 df-1st 7851 df-2nd 7852 df-supp 7998 df-frecs 8117 df-wrecs 8148 df-recs 8222 df-rdg 8261 df-1o 8317 df-2o 8318 df-er 8518 df-map 8637 df-pm 8638 df-ixp 8706 df-en 8754 df-dom 8755 df-sdom 8756 df-fin 8757 df-fsupp 9157 df-fi 9198 df-sup 9229 df-inf 9230 df-oi 9297 df-card 9725 df-pnf 11039 df-mnf 11040 df-xr 11041 df-ltxr 11042 df-le 11043 df-sub 11235 df-neg 11236 df-div 11661 df-nn 12002 df-2 12064 df-3 12065 df-4 12066 df-5 12067 df-6 12068 df-7 12069 df-8 12070 df-9 12071 df-n0 12262 df-z 12348 df-dec 12466 df-uz 12611 df-q 12717 df-rp 12759 df-xneg 12876 df-xadd 12877 df-xmul 12878 df-ioo 13111 df-ioc 13112 df-ico 13113 df-icc 13114 df-fz 13268 df-fzo 13411 df-fl 13540 df-mod 13618 df-seq 13750 df-exp 13811 df-fac 14016 df-bc 14045 df-hash 14073 df-shft 14806 df-cj 14838 df-re 14839 df-im 14840 df-sqrt 14974 df-abs 14975 df-limsup 15208 df-clim 15225 df-rlim 15226 df-sum 15426 df-ef 15805 df-sin 15807 df-cos 15808 df-pi 15810 df-struct 16876 df-sets 16893 df-slot 16911 df-ndx 16923 df-base 16941 df-ress 16970 df-plusg 17003 df-mulr 17004 df-starv 17005 df-sca 17006 df-vsca 17007 df-ip 17008 df-tset 17009 df-ple 17010 df-ds 17012 df-unif 17013 df-hom 17014 df-cco 17015 df-rest 17161 df-topn 17162 df-0g 17180 df-gsum 17181 df-topgen 17182 df-pt 17183 df-prds 17186 df-xrs 17241 df-qtop 17246 df-imas 17247 df-xps 17249 df-mre 17323 df-mrc 17324 df-acs 17326 df-mgm 18354 df-sgrp 18403 df-mnd 18414 df-submnd 18459 df-mulg 18729 df-cntz 18951 df-cmn 19416 df-psmet 20617 df-xmet 20618 df-met 20619 df-bl 20620 df-mopn 20621 df-fbas 20622 df-fg 20623 df-cnfld 20626 df-top 22071 df-topon 22088 df-topsp 22110 df-bases 22124 df-cld 22198 df-ntr 22199 df-cls 22200 df-nei 22277 df-lp 22315 df-perf 22316 df-cn 22406 df-cnp 22407 df-haus 22494 df-tx 22741 df-hmeo 22934 df-fil 23025 df-fm 23117 df-flim 23118 df-flf 23119 df-xms 23501 df-ms 23502 df-tms 23503 df-cncf 24069 df-limc 25058 df-dv 25059 df-log 25740 df-cxp 25741 df-logb 25943 df-blen 45956 |
This theorem is referenced by: nnpw2blenfzo 45967 nnpw2pmod 45969 |
Copyright terms: Public domain | W3C validator |