Metamath Proof Explorer


Theorem 2ebits

Description: The bits of a power of two. (Contributed by Mario Carneiro, 5-Sep-2016)

Ref Expression
Assertion 2ebits N 0 bits 2 N = N

Proof

Step Hyp Ref Expression
1 2nn 2
2 1 a1i N 0 2
3 id N 0 N 0
4 2 3 nnexpcld N 0 2 N
5 4 nncnd N 0 2 N
6 oveq2 k = N 2 k = 2 N
7 6 sumsn N 0 2 N k N 2 k = 2 N
8 5 7 mpdan N 0 k N 2 k = 2 N
9 8 fveq2d N 0 bits k N 2 k = bits 2 N
10 snssi N 0 N 0
11 snfi N Fin
12 elfpw N 𝒫 0 Fin N 0 N Fin
13 10 11 12 sylanblrc N 0 N 𝒫 0 Fin
14 bitsinv2 N 𝒫 0 Fin bits k N 2 k = N
15 13 14 syl N 0 bits k N 2 k = N
16 9 15 eqtr3d N 0 bits 2 N = N