Step | Hyp | Ref
| Expression |
1 | | nnnn0 12240 |
. . . 4
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℕ0) |
2 | | 8nn 12068 |
. . . . 5
⊢ 8 ∈
ℕ |
3 | | nnrp 12741 |
. . . . 5
⊢ (8 ∈
ℕ → 8 ∈ ℝ+) |
4 | 2, 3 | ax-mp 5 |
. . . 4
⊢ 8 ∈
ℝ+ |
5 | | modmuladdnn0 13635 |
. . . 4
⊢ ((𝑃 ∈ ℕ0
∧ 8 ∈ ℝ+) → ((𝑃 mod 8) = 7 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 7))) |
6 | 1, 4, 5 | sylancl 586 |
. . 3
⊢ (𝑃 ∈ ℕ → ((𝑃 mod 8) = 7 → ∃𝑘 ∈ ℕ0
𝑃 = ((𝑘 · 8) + 7))) |
7 | | simpr 485 |
. . . . 5
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ 𝑘 ∈
ℕ0) |
8 | | nn0cn 12243 |
. . . . . . . . . . 11
⊢ (𝑘 ∈ ℕ0
→ 𝑘 ∈
ℂ) |
9 | | 8cn 12070 |
. . . . . . . . . . . 12
⊢ 8 ∈
ℂ |
10 | 9 | a1i 11 |
. . . . . . . . . . 11
⊢ (𝑘 ∈ ℕ0
→ 8 ∈ ℂ) |
11 | 8, 10 | mulcomd 10996 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ (𝑘 · 8) = (8
· 𝑘)) |
12 | 11 | adantl 482 |
. . . . . . . . 9
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ (𝑘 · 8) = (8
· 𝑘)) |
13 | 12 | oveq1d 7290 |
. . . . . . . 8
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ ((𝑘 · 8) + 7)
= ((8 · 𝑘) +
7)) |
14 | 13 | eqeq2d 2749 |
. . . . . . 7
⊢ ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
→ (𝑃 = ((𝑘 · 8) + 7) ↔ 𝑃 = ((8 · 𝑘) + 7))) |
15 | 14 | biimpa 477 |
. . . . . 6
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → 𝑃 = ((8 · 𝑘) + 7)) |
16 | | 2lgslem2.n |
. . . . . . 7
⊢ 𝑁 = (((𝑃 − 1) / 2) −
(⌊‘(𝑃 /
4))) |
17 | 16 | 2lgslem3d 26547 |
. . . . . 6
⊢ ((𝑘 ∈ ℕ0
∧ 𝑃 = ((8 ·
𝑘) + 7)) → 𝑁 = ((2 · 𝑘) + 2)) |
18 | 7, 15, 17 | syl2an2r 682 |
. . . . 5
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → 𝑁 = ((2 · 𝑘) + 2)) |
19 | | oveq1 7282 |
. . . . . 6
⊢ (𝑁 = ((2 · 𝑘) + 2) → (𝑁 mod 2) = (((2 · 𝑘) + 2) mod 2)) |
20 | | 2t1e2 12136 |
. . . . . . . . . . . 12
⊢ (2
· 1) = 2 |
21 | 20 | eqcomi 2747 |
. . . . . . . . . . 11
⊢ 2 = (2
· 1) |
22 | 21 | a1i 11 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 2 = (2 · 1)) |
23 | 22 | oveq2d 7291 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + 2)
= ((2 · 𝑘) + (2
· 1))) |
24 | | 2cnd 12051 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 2 ∈ ℂ) |
25 | | 1cnd 10970 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ 1 ∈ ℂ) |
26 | | adddi 10960 |
. . . . . . . . . . 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 1370 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + (2
· 1)) = (2 · (𝑘 + 1))) |
29 | 8, 25 | addcld 10994 |
. . . . . . . . . 10
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℂ) |
30 | 24, 29 | mulcomd 10996 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ (2 · (𝑘 + 1))
= ((𝑘 + 1) ·
2)) |
31 | 23, 28, 30 | 3eqtrd 2782 |
. . . . . . . 8
⊢ (𝑘 ∈ ℕ0
→ ((2 · 𝑘) + 2)
= ((𝑘 + 1) ·
2)) |
32 | 31 | oveq1d 7290 |
. . . . . . 7
⊢ (𝑘 ∈ ℕ0
→ (((2 · 𝑘) +
2) mod 2) = (((𝑘 + 1)
· 2) mod 2)) |
33 | | peano2nn0 12273 |
. . . . . . . . 9
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℕ0) |
34 | 33 | nn0zd 12424 |
. . . . . . . 8
⊢ (𝑘 ∈ ℕ0
→ (𝑘 + 1) ∈
ℤ) |
35 | | 2rp 12735 |
. . . . . . . 8
⊢ 2 ∈
ℝ+ |
36 | | mulmod0 13597 |
. . . . . . . 8
⊢ (((𝑘 + 1) ∈ ℤ ∧ 2
∈ ℝ+) → (((𝑘 + 1) · 2) mod 2) =
0) |
37 | 34, 35, 36 | sylancl 586 |
. . . . . . 7
⊢ (𝑘 ∈ ℕ0
→ (((𝑘 + 1) ·
2) mod 2) = 0) |
38 | 32, 37 | eqtrd 2778 |
. . . . . 6
⊢ (𝑘 ∈ ℕ0
→ (((2 · 𝑘) +
2) mod 2) = 0) |
39 | 19, 38 | sylan9eqr 2800 |
. . . . 5
⊢ ((𝑘 ∈ ℕ0
∧ 𝑁 = ((2 ·
𝑘) + 2)) → (𝑁 mod 2) = 0) |
40 | 7, 18, 39 | syl2an2r 682 |
. . . 4
⊢ (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0)
∧ 𝑃 = ((𝑘 · 8) + 7)) → (𝑁 mod 2) = 0) |
41 | 40 | rexlimdva2 3216 |
. . 3
⊢ (𝑃 ∈ ℕ →
(∃𝑘 ∈
ℕ0 𝑃 =
((𝑘 · 8) + 7) →
(𝑁 mod 2) =
0)) |
42 | 6, 41 | syld 47 |
. 2
⊢ (𝑃 ∈ ℕ → ((𝑃 mod 8) = 7 → (𝑁 mod 2) = 0)) |
43 | 42 | imp 407 |
1
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (𝑁 mod 2) = 0) |