Description: Every positive integer can be represented as the sum of a power of 2 and a "remainder" smaller than the power. (Contributed by AV, 31-May-2020)
Ref | Expression | ||
---|---|---|---|
Assertion | nnpw2pmod | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | nnre | |
|
2 | 2nn | |
|
3 | 2 | a1i | |
4 | blennnelnn | |
|
5 | nnm1nn0 | |
|
6 | 4 5 | syl | |
7 | 3 6 | nnexpcld | |
8 | 7 | nnrpd | |
9 | modeqmodmin | |
|
10 | 1 8 9 | syl2anc | |
11 | 7 | nnred | |
12 | 1 11 | resubcld | |
13 | nnpw2blen | |
|
14 | 1 11 | subge0d | |
15 | 1 11 11 | ltsubadd2d | |
16 | 2cn | |
|
17 | exp1 | |
|
18 | 17 | eqcomd | |
19 | 16 18 | mp1i | |
20 | 19 | oveq1d | |
21 | 7 | nncnd | |
22 | 21 | 2timesd | |
23 | 16 | a1i | |
24 | 1nn0 | |
|
25 | 24 | a1i | |
26 | 23 6 25 | expaddd | |
27 | 1cnd | |
|
28 | 4 | nncnd | |
29 | 27 28 | pncan3d | |
30 | 29 | oveq2d | |
31 | 26 30 | eqtr3d | |
32 | 20 22 31 | 3eqtr3d | |
33 | 32 | breq2d | |
34 | 15 33 | bitrd | |
35 | 14 34 | anbi12d | |
36 | 13 35 | mpbird | |
37 | modid | |
|
38 | 12 8 36 37 | syl21anc | |
39 | 10 38 | eqtr2d | |
40 | nncn | |
|
41 | nnz | |
|
42 | 41 7 | zmodcld | |
43 | 42 | nn0cnd | |
44 | 40 21 43 | subaddd | |
45 | 39 44 | mpbid | |
46 | 45 | eqcomd | |