Metamath Proof Explorer


Theorem blennnelnn

Description: The binary length of a positive integer is a positive integer. (Contributed by AV, 25-May-2020)

Ref Expression
Assertion blennnelnn N # b N

Proof

Step Hyp Ref Expression
1 blennn N # b N = log 2 N + 1
2 2rp 2 +
3 2 a1i N 2 +
4 nnrp N N +
5 1ne2 1 2
6 5 necomi 2 1
7 6 a1i N 2 1
8 relogbcl 2 + N + 2 1 log 2 N
9 3 4 7 8 syl3anc N log 2 N
10 2z 2
11 uzid 2 2 2
12 10 11 mp1i N 2 2
13 nnre N N
14 nnge1 N 1 N
15 1re 1
16 elicopnf 1 N 1 +∞ N 1 N
17 15 16 ax-mp N 1 +∞ N 1 N
18 13 14 17 sylanbrc N N 1 +∞
19 rege1logbzge0 2 2 N 1 +∞ 0 log 2 N
20 12 18 19 syl2anc N 0 log 2 N
21 flge0nn0 log 2 N 0 log 2 N log 2 N 0
22 9 20 21 syl2anc N log 2 N 0
23 nn0p1nn log 2 N 0 log 2 N + 1
24 22 23 syl N log 2 N + 1
25 1 24 eqeltrd N # b N