Metamath Proof Explorer


Theorem logbpw2m1

Description: The floor of the binary logarithm of 2 to the power of a positive integer minus 1 is equal to the integer minus 1. (Contributed by AV, 31-May-2020)

Ref Expression
Assertion logbpw2m1 I log 2 2 I 1 = I 1

Proof

Step Hyp Ref Expression
1 2rp 2 +
2 1 a1i I 2 +
3 2nn0 2 0
4 3 a1i I 2 0
5 nnnn0 I I 0
6 4 5 nn0expcld I 2 I 0
7 nnge1 I 1 I
8 2re 2
9 8 a1i I 2
10 1zzd I 1
11 nnz I I
12 1lt2 1 < 2
13 12 a1i I 1 < 2
14 9 10 11 13 leexp2d I 1 I 2 1 2 I
15 2cn 2
16 exp1 2 2 1 = 2
17 15 16 ax-mp 2 1 = 2
18 17 a1i I 2 1 = 2
19 18 breq1d I 2 1 2 I 2 2 I
20 14 19 bitrd I 1 I 2 2 I
21 7 20 mpbid I 2 2 I
22 nn0ge2m1nn 2 I 0 2 2 I 2 I 1
23 6 21 22 syl2anc I 2 I 1
24 23 nnrpd I 2 I 1 +
25 1ne2 1 2
26 25 necomi 2 1
27 26 a1i I 2 1
28 relogbcl 2 + 2 I 1 + 2 1 log 2 2 I 1
29 2 24 27 28 syl3anc I log 2 2 I 1
30 29 flcld I log 2 2 I 1
31 peano2zm I I 1
32 11 31 syl I I 1
33 2z 2
34 uzid 2 2 2
35 33 34 ax-mp 2 2
36 nnlogbexp 2 2 I 1 log 2 2 I 1 = I 1
37 35 32 36 sylancr I log 2 2 I 1 = I 1
38 37 fveq2d I log 2 2 I 1 = I 1
39 flid I 1 I 1 = I 1
40 32 39 syl I I 1 = I 1
41 38 40 eqtrd I log 2 2 I 1 = I 1
42 2nn 2
43 42 a1i I 2
44 nnm1nn0 I I 1 0
45 43 44 nnexpcld I 2 I 1
46 45 nnrpd I 2 I 1 +
47 relogbcl 2 + 2 I 1 + 2 1 log 2 2 I 1
48 2 46 27 47 syl3anc I log 2 2 I 1
49 pw2m1lepw2m1 I 2 I 1 2 I 1
50 35 a1i I 2 2
51 logbleb 2 2 2 I 1 + 2 I 1 + 2 I 1 2 I 1 log 2 2 I 1 log 2 2 I 1
52 50 46 24 51 syl3anc I 2 I 1 2 I 1 log 2 2 I 1 log 2 2 I 1
53 49 52 mpbid I log 2 2 I 1 log 2 2 I 1
54 flwordi log 2 2 I 1 log 2 2 I 1 log 2 2 I 1 log 2 2 I 1 log 2 2 I 1 log 2 2 I 1
55 48 29 53 54 syl3anc I log 2 2 I 1 log 2 2 I 1
56 41 55 eqbrtrrd I I 1 log 2 2 I 1
57 43 5 nnexpcld I 2 I
58 57 nnnn0d I 2 I 0
59 58 21 22 syl2anc I 2 I 1
60 59 nnrpd I 2 I 1 +
61 2 60 27 28 syl3anc I log 2 2 I 1
62 61 flcld I log 2 2 I 1
63 62 zred I log 2 2 I 1
64 nnre I I
65 peano2rem I I 1
66 64 65 syl I I 1
67 peano2re I 1 I - 1 + 1
68 66 67 syl I I - 1 + 1
69 flle log 2 2 I 1 log 2 2 I 1 log 2 2 I 1
70 29 69 syl I log 2 2 I 1 log 2 2 I 1
71 57 nnrpd I 2 I +
72 relogbcl 2 + 2 I + 2 1 log 2 2 I
73 2 71 27 72 syl3anc I log 2 2 I
74 57 nnred I 2 I
75 74 ltm1d I 2 I 1 < 2 I
76 logblt 2 2 2 I 1 + 2 I + 2 I 1 < 2 I log 2 2 I 1 < log 2 2 I
77 50 24 71 76 syl3anc I 2 I 1 < 2 I log 2 2 I 1 < log 2 2 I
78 75 77 mpbid I log 2 2 I 1 < log 2 2 I
79 64 leidd I I I
80 nnlogbexp 2 2 I log 2 2 I = I
81 35 11 80 sylancr I log 2 2 I = I
82 nncn I I
83 npcan1 I I - 1 + 1 = I
84 82 83 syl I I - 1 + 1 = I
85 79 81 84 3brtr4d I log 2 2 I I - 1 + 1
86 29 73 68 78 85 ltletrd I log 2 2 I 1 < I - 1 + 1
87 63 29 68 70 86 lelttrd I log 2 2 I 1 < I - 1 + 1
88 zgeltp1eq log 2 2 I 1 I 1 I 1 log 2 2 I 1 log 2 2 I 1 < I - 1 + 1 log 2 2 I 1 = I 1
89 88 imp log 2 2 I 1 I 1 I 1 log 2 2 I 1 log 2 2 I 1 < I - 1 + 1 log 2 2 I 1 = I 1
90 30 32 56 87 89 syl22anc I log 2 2 I 1 = I 1