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 = log2N+1
2 2rp 2+
3 2 a1i N2+
4 nnrp NN+
5 1ne2 12
6 5 necomi 21
7 6 a1i N21
8 relogbcl 2+N+21log2N
9 3 4 7 8 syl3anc Nlog2N
10 2z 2
11 uzid 222
12 10 11 mp1i N22
13 nnre NN
14 nnge1 N1N
15 1re 1
16 elicopnf 1N1+∞N1N
17 15 16 ax-mp N1+∞N1N
18 13 14 17 sylanbrc NN1+∞
19 rege1logbzge0 22N1+∞0log2N
20 12 18 19 syl2anc N0log2N
21 flge0nn0 log2N0log2Nlog2N0
22 9 20 21 syl2anc Nlog2N0
23 nn0p1nn log2N0log2N+1
24 22 23 syl Nlog2N+1
25 1 24 eqeltrd N#b N