Metamath Proof Explorer


Theorem bitsfval

Description: Expand the definition of the bits of an integer. (Contributed by Mario Carneiro, 5-Sep-2016)

Ref Expression
Assertion bitsfval N bits N = m 0 | ¬ 2 N 2 m

Proof

Step Hyp Ref Expression
1 fvoveq1 n = N n 2 m = N 2 m
2 1 breq2d n = N 2 n 2 m 2 N 2 m
3 2 notbid n = N ¬ 2 n 2 m ¬ 2 N 2 m
4 3 rabbidv n = N m 0 | ¬ 2 n 2 m = m 0 | ¬ 2 N 2 m
5 df-bits bits = n m 0 | ¬ 2 n 2 m
6 nn0ex 0 V
7 6 rabex m 0 | ¬ 2 N 2 m V
8 4 5 7 fvmpt N bits N = m 0 | ¬ 2 N 2 m