Step | Hyp | Ref
| Expression |
1 | | nnnn0 12170 |
. . . 4
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℕ0) |
2 | | 8nn 11998 |
. . . . 5
⊢ 8 ∈
ℕ |
3 | | nnrp 12670 |
. . . . 5
⊢ (8 ∈
ℕ → 8 ∈ ℝ+) |
4 | 2, 3 | ax-mp 5 |
. . . 4
⊢ 8 ∈
ℝ+ |
5 | | modmuladdnn0 13563 |
. . . 4
⊢ ((𝑃 ∈ ℕ0
∧ 8 ∈ ℝ+) → ((𝑃 mod 8) = 7 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 7))) |
6 | 1, 4, 5 | sylancl 585 |
. . 3
⊢ (𝑃 ∈ ℕ → ((𝑃 mod 8) = 7 → ∃𝑘 ∈ ℕ0
𝑃 = ((𝑘 · 8) + 7))) |
7 | | simpr 484 |
. . . . 5
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ 𝑘 ∈
ℕ0) |
8 | | nn0cn 12173 |
. . . . . . . . . . 11
⊢ (𝑘 ∈ ℕ0
→ 𝑘 ∈
ℂ) |
9 | | 8cn 12000 |
. . . . . . . . . . . 12
⊢ 8 ∈
ℂ |
10 | 9 | a1i 11 |
. . . . . . . . . . 11
⊢ (𝑘 ∈ ℕ0
→ 8 ∈ ℂ) |
11 | 8, 10 | mulcomd 10927 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ (𝑘 · 8) = (8
· 𝑘)) |
12 | 11 | adantl 481 |
. . . . . . . . 9
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ (𝑘 · 8) = (8
· 𝑘)) |
13 | 12 | oveq1d 7270 |
. . . . . . . 8
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ ((𝑘 · 8) + 7)
= ((8 · 𝑘) +
7)) |
14 | 13 | eqeq2d 2749 |
. . . . . . 7
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ (𝑃 = ((𝑘 · 8) + 7) ↔ 𝑃 = ((8 · 𝑘) + 7))) |
15 | 14 | biimpa 476 |
. . . . . 6
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → 𝑃 = ((8 · 𝑘) + 7)) |
16 | | 2lgslem2.n |
. . . . . . 7
⊢ 𝑁 = (((𝑃 − 1) / 2) −
(⌊‘(𝑃 /
4))) |
17 | 16 | 2lgslem3d 26452 |
. . . . . 6
⊢ ((𝑘 ∈ ℕ0
∧ 𝑃 = ((8 ·
𝑘) + 7)) → 𝑁 = ((2 · 𝑘) + 2)) |
18 | 7, 15, 17 | syl2an2r 681 |
. . . . 5
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → 𝑁 = ((2 · 𝑘) + 2)) |
19 | | oveq1 7262 |
. . . . . 6
⊢ (𝑁 = ((2 · 𝑘) + 2) → (𝑁 mod 2) = (((2 · 𝑘) + 2) mod 2)) |
20 | | 2t1e2 12066 |
. . . . . . . . . . . 12
⊢ (2
· 1) = 2 |
21 | 20 | eqcomi 2747 |
. . . . . . . . . . 11
⊢ 2 = (2
· 1) |
22 | 21 | a1i 11 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 2 = (2 · 1)) |
23 | 22 | oveq2d 7271 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + 2)
= ((2 · 𝑘) + (2
· 1))) |
24 | | 2cnd 11981 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 2 ∈ ℂ) |
25 | | 1cnd 10901 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 1 ∈ ℂ) |
26 | | adddi 10891 |
. . . . . . . . . . 11
⊢ ((2
∈ ℂ ∧ 𝑘
∈ ℂ ∧ 1 ∈ ℂ) → (2 · (𝑘 + 1)) = ((2 · 𝑘) + (2 · 1))) |
27 | 26 | eqcomd 2744 |
. . . . . . . . . 10
⊢ ((2
∈ ℂ ∧ 𝑘
∈ ℂ ∧ 1 ∈ ℂ) → ((2 · 𝑘) + (2 · 1)) = (2 · (𝑘 + 1))) |
28 | 24, 8, 25, 27 | syl3anc 1369 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + (2
· 1)) = (2 · (𝑘 + 1))) |
29 | 8, 25 | addcld 10925 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℂ) |
30 | 24, 29 | mulcomd 10927 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ (2 · (𝑘 + 1))
= ((𝑘 + 1) ·
2)) |
31 | 23, 28, 30 | 3eqtrd 2782 |
. . . . . . . 8
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + 2)
= ((𝑘 + 1) ·
2)) |
32 | 31 | oveq1d 7270 |
. . . . . . 7
⊢ (𝑘 ∈ ℕ0
→ (((2 · 𝑘) +
2) mod 2) = (((𝑘 + 1)
· 2) mod 2)) |
33 | | peano2nn0 12203 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℕ0) |
34 | 33 | nn0zd 12353 |
. . . . . . . 8
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℤ) |
35 | | 2rp 12664 |
. . . . . . . 8
⊢ 2 ∈
ℝ+ |
36 | | mulmod0 13525 |
. . . . . . . 8
⊢ (((𝑘 + 1) ∈ ℤ ∧ 2
∈ ℝ+) → (((𝑘 + 1) · 2) mod 2) =
0) |
37 | 34, 35, 36 | sylancl 585 |
. . . . . . 7
⊢ (𝑘 ∈ ℕ0
→ (((𝑘 + 1) ·
2) mod 2) = 0) |
38 | 32, 37 | eqtrd 2778 |
. . . . . 6
⊢ (𝑘 ∈ ℕ0
→ (((2 · 𝑘) +
2) mod 2) = 0) |
39 | 19, 38 | sylan9eqr 2801 |
. . . . 5
⊢ ((𝑘 ∈ ℕ0
∧ 𝑁 = ((2 ·
𝑘) + 2)) → (𝑁 mod 2) = 0) |
40 | 7, 18, 39 | syl2an2r 681 |
. . . 4
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → (𝑁 mod 2) = 0) |
41 | 40 | rexlimdva2 3215 |
. . 3
⊢ (𝑃 ∈ ℕ →
(∃𝑘 ∈
ℕ0 𝑃 =
((𝑘 · 8) + 7) →
(𝑁 mod 2) =
0)) |
42 | 6, 41 | syld 47 |
. 2
⊢ (𝑃 ∈ ℕ → ((𝑃 mod 8) = 7 → (𝑁 mod 2) = 0)) |
43 | 42 | imp 406 |
1
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (𝑁 mod 2) = 0) |