Metamath Proof Explorer


Theorem bitsval

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

Ref Expression
Assertion bitsval M bits N N M 0 ¬ 2 N 2 M

Proof

Step Hyp Ref Expression
1 df-bits bits = n m 0 | ¬ 2 n 2 m
2 1 mptrcl M bits N N
3 bitsfval N bits N = m 0 | ¬ 2 N 2 m
4 3 eleq2d N M bits N M m 0 | ¬ 2 N 2 m
5 oveq2 m = M 2 m = 2 M
6 5 oveq2d m = M N 2 m = N 2 M
7 6 fveq2d m = M N 2 m = N 2 M
8 7 breq2d m = M 2 N 2 m 2 N 2 M
9 8 notbid m = M ¬ 2 N 2 m ¬ 2 N 2 M
10 9 elrab M m 0 | ¬ 2 N 2 m M 0 ¬ 2 N 2 M
11 4 10 bitrdi N M bits N M 0 ¬ 2 N 2 M
12 2 11 biadanii M bits N N M 0 ¬ 2 N 2 M
13 3anass N M 0 ¬ 2 N 2 M N M 0 ¬ 2 N 2 M
14 12 13 bitr4i M bits N N M 0 ¬ 2 N 2 M