Proof of Theorem bitsshft
Step | Hyp | Ref
| Expression |
1 | | simpll 763 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → 𝐴 ∈ ℤ) |
2 | | 2nn 11976 |
. . . . . . . . . . 11
⊢ 2 ∈
ℕ |
3 | 2 | a1i 11 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → 2 ∈ ℕ) |
4 | | simplr 765 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → 𝑁 ∈
ℕ0) |
5 | 3, 4 | nnexpcld 13888 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (2↑𝑁) ∈ ℕ) |
6 | 5 | nnzd 12354 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (2↑𝑁) ∈ ℤ) |
7 | | dvdsmul2 15916 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧
(2↑𝑁) ∈ ℤ)
→ (2↑𝑁) ∥
(𝐴 · (2↑𝑁))) |
8 | 1, 6, 7 | syl2anc 583 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (2↑𝑁) ∥ (𝐴 · (2↑𝑁))) |
9 | 1, 6 | zmulcld 12361 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (𝐴 · (2↑𝑁)) ∈ ℤ) |
10 | | bitsuz 16109 |
. . . . . . . 8
⊢ (((𝐴 · (2↑𝑁)) ∈ ℤ ∧ 𝑁 ∈ ℕ0)
→ ((2↑𝑁) ∥
(𝐴 · (2↑𝑁)) ↔ (bits‘(𝐴 · (2↑𝑁))) ⊆
(ℤ≥‘𝑁))) |
11 | 9, 4, 10 | syl2anc 583 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → ((2↑𝑁) ∥ (𝐴 · (2↑𝑁)) ↔ (bits‘(𝐴 · (2↑𝑁))) ⊆
(ℤ≥‘𝑁))) |
12 | 8, 11 | mpbid 231 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (bits‘(𝐴 · (2↑𝑁))) ⊆
(ℤ≥‘𝑁)) |
13 | 12 | sseld 3916 |
. . . . 5
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) → 𝑛 ∈ (ℤ≥‘𝑁))) |
14 | | uznn0sub 12546 |
. . . . 5
⊢ (𝑛 ∈
(ℤ≥‘𝑁) → (𝑛 − 𝑁) ∈
ℕ0) |
15 | 13, 14 | syl6 35 |
. . . 4
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) → (𝑛 − 𝑁) ∈
ℕ0)) |
16 | | bitsss 16061 |
. . . . . 6
⊢
(bits‘𝐴)
⊆ ℕ0 |
17 | 16 | a1i 11 |
. . . . 5
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (bits‘𝐴) ⊆
ℕ0) |
18 | 17 | sseld 3916 |
. . . 4
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → ((𝑛 − 𝑁) ∈ (bits‘𝐴) → (𝑛 − 𝑁) ∈
ℕ0)) |
19 | | 2cnd 11981 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 2
∈ ℂ) |
20 | 2 | a1i 11 |
. . . . . . . . . . . . 13
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 2
∈ ℕ) |
21 | 20 | nnne0d 11953 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 2 ≠
0) |
22 | | simplr 765 |
. . . . . . . . . . . . 13
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 𝑁 ∈
ℕ0) |
23 | 22 | nn0zd 12353 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 𝑁 ∈
ℤ) |
24 | | simprl 767 |
. . . . . . . . . . . . 13
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 𝑛 ∈
ℕ0) |
25 | 24 | nn0zd 12353 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 𝑛 ∈
ℤ) |
26 | 19, 21, 23, 25 | expsubd 13803 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑(𝑛 − 𝑁)) = ((2↑𝑛) / (2↑𝑁))) |
27 | 26 | oveq2d 7271 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (𝐴 / (2↑(𝑛 − 𝑁))) = (𝐴 / ((2↑𝑛) / (2↑𝑁)))) |
28 | | simpl 482 |
. . . . . . . . . . . . 13
⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
→ 𝐴 ∈
ℤ) |
29 | 28 | zcnd 12356 |
. . . . . . . . . . . 12
⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
→ 𝐴 ∈
ℂ) |
30 | 29 | adantr 480 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → 𝐴 ∈
ℂ) |
31 | 20, 24 | nnexpcld 13888 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑛) ∈
ℕ) |
32 | 31 | nncnd 11919 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑛) ∈
ℂ) |
33 | 20, 22 | nnexpcld 13888 |
. . . . . . . . . . . 12
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑁) ∈
ℕ) |
34 | 33 | nncnd 11919 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑁) ∈
ℂ) |
35 | 31 | nnne0d 11953 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑛) ≠
0) |
36 | 33 | nnne0d 11953 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(2↑𝑁) ≠
0) |
37 | 30, 32, 34, 35, 36 | divdiv2d 11713 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (𝐴 / ((2↑𝑛) / (2↑𝑁))) = ((𝐴 · (2↑𝑁)) / (2↑𝑛))) |
38 | 27, 37 | eqtr2d 2779 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
((𝐴 · (2↑𝑁)) / (2↑𝑛)) = (𝐴 / (2↑(𝑛 − 𝑁)))) |
39 | 38 | fveq2d 6760 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
(⌊‘((𝐴 ·
(2↑𝑁)) / (2↑𝑛))) = (⌊‘(𝐴 / (2↑(𝑛 − 𝑁))))) |
40 | 39 | breq2d 5082 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (2
∥ (⌊‘((𝐴
· (2↑𝑁)) /
(2↑𝑛))) ↔ 2
∥ (⌊‘(𝐴 /
(2↑(𝑛 − 𝑁)))))) |
41 | 40 | notbid 317 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (¬
2 ∥ (⌊‘((𝐴 · (2↑𝑁)) / (2↑𝑛))) ↔ ¬ 2 ∥
(⌊‘(𝐴 /
(2↑(𝑛 − 𝑁)))))) |
42 | 9 | adantrr 713 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (𝐴 · (2↑𝑁)) ∈
ℤ) |
43 | | bitsval2 16060 |
. . . . . . 7
⊢ (((𝐴 · (2↑𝑁)) ∈ ℤ ∧ 𝑛 ∈ ℕ0)
→ (𝑛 ∈
(bits‘(𝐴 ·
(2↑𝑁))) ↔ ¬ 2
∥ (⌊‘((𝐴
· (2↑𝑁)) /
(2↑𝑛))))) |
44 | 42, 24, 43 | syl2anc 583 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) ↔ ¬ 2 ∥
(⌊‘((𝐴 ·
(2↑𝑁)) / (2↑𝑛))))) |
45 | | bitsval2 16060 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ (𝑛 − 𝑁) ∈ ℕ0) → ((𝑛 − 𝑁) ∈ (bits‘𝐴) ↔ ¬ 2 ∥
(⌊‘(𝐴 /
(2↑(𝑛 − 𝑁)))))) |
46 | 45 | ad2ant2rl 745 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) →
((𝑛 − 𝑁) ∈ (bits‘𝐴) ↔ ¬ 2 ∥
(⌊‘(𝐴 /
(2↑(𝑛 − 𝑁)))))) |
47 | 41, 44, 46 | 3bitr4d 310 |
. . . . 5
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ (𝑛 ∈
ℕ0 ∧ (𝑛 − 𝑁) ∈ ℕ0)) → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) ↔ (𝑛 − 𝑁) ∈ (bits‘𝐴))) |
48 | 47 | expr 456 |
. . . 4
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → ((𝑛 − 𝑁) ∈ ℕ0 → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) ↔ (𝑛 − 𝑁) ∈ (bits‘𝐴)))) |
49 | 15, 18, 48 | pm5.21ndd 380 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
∧ 𝑛 ∈
ℕ0) → (𝑛 ∈ (bits‘(𝐴 · (2↑𝑁))) ↔ (𝑛 − 𝑁) ∈ (bits‘𝐴))) |
50 | 49 | rabbi2dva 4148 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
→ (ℕ0 ∩ (bits‘(𝐴 · (2↑𝑁)))) = {𝑛 ∈ ℕ0 ∣ (𝑛 − 𝑁) ∈ (bits‘𝐴)}) |
51 | | bitsss 16061 |
. . 3
⊢
(bits‘(𝐴
· (2↑𝑁)))
⊆ ℕ0 |
52 | | sseqin2 4146 |
. . 3
⊢
((bits‘(𝐴
· (2↑𝑁)))
⊆ ℕ0 ↔ (ℕ0 ∩
(bits‘(𝐴 ·
(2↑𝑁)))) =
(bits‘(𝐴 ·
(2↑𝑁)))) |
53 | 51, 52 | mpbi 229 |
. 2
⊢
(ℕ0 ∩ (bits‘(𝐴 · (2↑𝑁)))) = (bits‘(𝐴 · (2↑𝑁))) |
54 | 50, 53 | eqtr3di 2794 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0)
→ {𝑛 ∈
ℕ0 ∣ (𝑛 − 𝑁) ∈ (bits‘𝐴)} = (bits‘(𝐴 · (2↑𝑁)))) |