Step | Hyp | Ref
| Expression |
1 | | prmnn 15226 |
. . . 4
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
2 | | nnnn0 11176 |
. . . 4
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℕ0) |
3 | | oddnn02np1 14910 |
. . . 4
⊢ (𝑃 ∈ ℕ0
→ (¬ 2 ∥ 𝑃
↔ ∃𝑛 ∈
ℕ0 ((2 · 𝑛) + 1) = 𝑃)) |
4 | 1, 2, 3 | 3syl 18 |
. . 3
⊢ (𝑃 ∈ ℙ → (¬ 2
∥ 𝑃 ↔
∃𝑛 ∈
ℕ0 ((2 · 𝑛) + 1) = 𝑃)) |
5 | | iftrue 4042 |
. . . . . . . . . 10
⊢ (2
∥ 𝑛 → if(2
∥ 𝑛, (𝑛 / 2), ((𝑛 − 1) / 2)) = (𝑛 / 2)) |
6 | 5 | adantr 480 |
. . . . . . . . 9
⊢ ((2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ if(2 ∥ 𝑛,
(𝑛 / 2), ((𝑛 − 1) / 2)) = (𝑛 / 2)) |
7 | | 2nn 11062 |
. . . . . . . . . . 11
⊢ 2 ∈
ℕ |
8 | | nn0ledivnn 11817 |
. . . . . . . . . . 11
⊢ ((𝑛 ∈ ℕ0
∧ 2 ∈ ℕ) → (𝑛 / 2) ≤ 𝑛) |
9 | 7, 8 | mpan2 703 |
. . . . . . . . . 10
⊢ (𝑛 ∈ ℕ0
→ (𝑛 / 2) ≤ 𝑛) |
10 | 9 | adantl 481 |
. . . . . . . . 9
⊢ ((2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ (𝑛 / 2) ≤ 𝑛) |
11 | 6, 10 | eqbrtrd 4605 |
. . . . . . . 8
⊢ ((2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ if(2 ∥ 𝑛,
(𝑛 / 2), ((𝑛 − 1) / 2)) ≤ 𝑛) |
12 | | iffalse 4045 |
. . . . . . . . . 10
⊢ (¬ 2
∥ 𝑛 → if(2
∥ 𝑛, (𝑛 / 2), ((𝑛 − 1) / 2)) = ((𝑛 − 1) / 2)) |
13 | 12 | adantr 480 |
. . . . . . . . 9
⊢ ((¬ 2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ if(2 ∥ 𝑛,
(𝑛 / 2), ((𝑛 − 1) / 2)) = ((𝑛 − 1) /
2)) |
14 | | nn0re 11178 |
. . . . . . . . . . . 12
⊢ (𝑛 ∈ ℕ0
→ 𝑛 ∈
ℝ) |
15 | | peano2rem 10227 |
. . . . . . . . . . . . 13
⊢ (𝑛 ∈ ℝ → (𝑛 − 1) ∈
ℝ) |
16 | 15 | rehalfcld 11156 |
. . . . . . . . . . . 12
⊢ (𝑛 ∈ ℝ → ((𝑛 − 1) / 2) ∈
ℝ) |
17 | 14, 16 | syl 17 |
. . . . . . . . . . 11
⊢ (𝑛 ∈ ℕ0
→ ((𝑛 − 1) / 2)
∈ ℝ) |
18 | 14 | rehalfcld 11156 |
. . . . . . . . . . 11
⊢ (𝑛 ∈ ℕ0
→ (𝑛 / 2) ∈
ℝ) |
19 | 14 | lem1d 10836 |
. . . . . . . . . . . 12
⊢ (𝑛 ∈ ℕ0
→ (𝑛 − 1) ≤
𝑛) |
20 | 14, 15 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑛 ∈ ℕ0
→ (𝑛 − 1) ∈
ℝ) |
21 | | 2re 10967 |
. . . . . . . . . . . . . . 15
⊢ 2 ∈
ℝ |
22 | | 2pos 10989 |
. . . . . . . . . . . . . . 15
⊢ 0 <
2 |
23 | 21, 22 | pm3.2i 470 |
. . . . . . . . . . . . . 14
⊢ (2 ∈
ℝ ∧ 0 < 2) |
24 | 23 | a1i 11 |
. . . . . . . . . . . . 13
⊢ (𝑛 ∈ ℕ0
→ (2 ∈ ℝ ∧ 0 < 2)) |
25 | | lediv1 10767 |
. . . . . . . . . . . . 13
⊢ (((𝑛 − 1) ∈ ℝ ∧
𝑛 ∈ ℝ ∧ (2
∈ ℝ ∧ 0 < 2)) → ((𝑛 − 1) ≤ 𝑛 ↔ ((𝑛 − 1) / 2) ≤ (𝑛 / 2))) |
26 | 20, 14, 24, 25 | syl3anc 1318 |
. . . . . . . . . . . 12
⊢ (𝑛 ∈ ℕ0
→ ((𝑛 − 1) ≤
𝑛 ↔ ((𝑛 − 1) / 2) ≤ (𝑛 / 2))) |
27 | 19, 26 | mpbid 221 |
. . . . . . . . . . 11
⊢ (𝑛 ∈ ℕ0
→ ((𝑛 − 1) / 2)
≤ (𝑛 /
2)) |
28 | 17, 18, 14, 27, 9 | letrd 10073 |
. . . . . . . . . 10
⊢ (𝑛 ∈ ℕ0
→ ((𝑛 − 1) / 2)
≤ 𝑛) |
29 | 28 | adantl 481 |
. . . . . . . . 9
⊢ ((¬ 2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ ((𝑛 − 1) / 2)
≤ 𝑛) |
30 | 13, 29 | eqbrtrd 4605 |
. . . . . . . 8
⊢ ((¬ 2
∥ 𝑛 ∧ 𝑛 ∈ ℕ0)
→ if(2 ∥ 𝑛,
(𝑛 / 2), ((𝑛 − 1) / 2)) ≤ 𝑛) |
31 | 11, 30 | pm2.61ian 827 |
. . . . . . 7
⊢ (𝑛 ∈ ℕ0
→ if(2 ∥ 𝑛,
(𝑛 / 2), ((𝑛 − 1) / 2)) ≤ 𝑛) |
32 | 31 | ad2antlr 759 |
. . . . . 6
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → if(2 ∥
𝑛, (𝑛 / 2), ((𝑛 − 1) / 2)) ≤ 𝑛) |
33 | | nn0z 11277 |
. . . . . . . 8
⊢ (𝑛 ∈ ℕ0
→ 𝑛 ∈
ℤ) |
34 | 33 | adantl 481 |
. . . . . . 7
⊢ ((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
→ 𝑛 ∈
ℤ) |
35 | | eqcom 2617 |
. . . . . . . 8
⊢ (((2
· 𝑛) + 1) = 𝑃 ↔ 𝑃 = ((2 · 𝑛) + 1)) |
36 | 35 | biimpi 205 |
. . . . . . 7
⊢ (((2
· 𝑛) + 1) = 𝑃 → 𝑃 = ((2 · 𝑛) + 1)) |
37 | | flodddiv4 14975 |
. . . . . . 7
⊢ ((𝑛 ∈ ℤ ∧ 𝑃 = ((2 · 𝑛) + 1)) →
(⌊‘(𝑃 / 4)) =
if(2 ∥ 𝑛, (𝑛 / 2), ((𝑛 − 1) / 2))) |
38 | 34, 36, 37 | syl2an 493 |
. . . . . 6
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) →
(⌊‘(𝑃 / 4)) =
if(2 ∥ 𝑛, (𝑛 / 2), ((𝑛 − 1) / 2))) |
39 | | oveq1 6556 |
. . . . . . . . . . 11
⊢ (𝑃 = ((2 · 𝑛) + 1) → (𝑃 − 1) = (((2 · 𝑛) + 1) −
1)) |
40 | 39 | eqcoms 2618 |
. . . . . . . . . 10
⊢ (((2
· 𝑛) + 1) = 𝑃 → (𝑃 − 1) = (((2 · 𝑛) + 1) −
1)) |
41 | 40 | adantl 481 |
. . . . . . . . 9
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → (𝑃 − 1) = (((2 ·
𝑛) + 1) −
1)) |
42 | | 2nn0 11186 |
. . . . . . . . . . . . . 14
⊢ 2 ∈
ℕ0 |
43 | 42 | a1i 11 |
. . . . . . . . . . . . 13
⊢ (𝑛 ∈ ℕ0
→ 2 ∈ ℕ0) |
44 | | id 22 |
. . . . . . . . . . . . 13
⊢ (𝑛 ∈ ℕ0
→ 𝑛 ∈
ℕ0) |
45 | 43, 44 | nn0mulcld 11233 |
. . . . . . . . . . . 12
⊢ (𝑛 ∈ ℕ0
→ (2 · 𝑛)
∈ ℕ0) |
46 | 45 | nn0cnd 11230 |
. . . . . . . . . . 11
⊢ (𝑛 ∈ ℕ0
→ (2 · 𝑛)
∈ ℂ) |
47 | | pncan1 10333 |
. . . . . . . . . . 11
⊢ ((2
· 𝑛) ∈ ℂ
→ (((2 · 𝑛) +
1) − 1) = (2 · 𝑛)) |
48 | 46, 47 | syl 17 |
. . . . . . . . . 10
⊢ (𝑛 ∈ ℕ0
→ (((2 · 𝑛) +
1) − 1) = (2 · 𝑛)) |
49 | 48 | ad2antlr 759 |
. . . . . . . . 9
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → (((2 ·
𝑛) + 1) − 1) = (2
· 𝑛)) |
50 | 41, 49 | eqtrd 2644 |
. . . . . . . 8
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → (𝑃 − 1) = (2 · 𝑛)) |
51 | 50 | oveq1d 6564 |
. . . . . . 7
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → ((𝑃 − 1) / 2) = ((2 ·
𝑛) / 2)) |
52 | | nn0cn 11179 |
. . . . . . . . 9
⊢ (𝑛 ∈ ℕ0
→ 𝑛 ∈
ℂ) |
53 | | 2cnd 10970 |
. . . . . . . . 9
⊢ (𝑛 ∈ ℕ0
→ 2 ∈ ℂ) |
54 | | 2ne0 10990 |
. . . . . . . . . 10
⊢ 2 ≠
0 |
55 | 54 | a1i 11 |
. . . . . . . . 9
⊢ (𝑛 ∈ ℕ0
→ 2 ≠ 0) |
56 | 52, 53, 55 | divcan3d 10685 |
. . . . . . . 8
⊢ (𝑛 ∈ ℕ0
→ ((2 · 𝑛) / 2)
= 𝑛) |
57 | 56 | ad2antlr 759 |
. . . . . . 7
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → ((2 ·
𝑛) / 2) = 𝑛) |
58 | 51, 57 | eqtrd 2644 |
. . . . . 6
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) → ((𝑃 − 1) / 2) = 𝑛) |
59 | 32, 38, 58 | 3brtr4d 4615 |
. . . . 5
⊢ (((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
∧ ((2 · 𝑛) + 1)
= 𝑃) →
(⌊‘(𝑃 / 4))
≤ ((𝑃 − 1) /
2)) |
60 | 59 | ex 449 |
. . . 4
⊢ ((𝑃 ∈ ℙ ∧ 𝑛 ∈ ℕ0)
→ (((2 · 𝑛) +
1) = 𝑃 →
(⌊‘(𝑃 / 4))
≤ ((𝑃 − 1) /
2))) |
61 | 60 | rexlimdva 3013 |
. . 3
⊢ (𝑃 ∈ ℙ →
(∃𝑛 ∈
ℕ0 ((2 · 𝑛) + 1) = 𝑃 → (⌊‘(𝑃 / 4)) ≤ ((𝑃 − 1) / 2))) |
62 | 4, 61 | sylbid 229 |
. 2
⊢ (𝑃 ∈ ℙ → (¬ 2
∥ 𝑃 →
(⌊‘(𝑃 / 4))
≤ ((𝑃 − 1) /
2))) |
63 | 62 | imp 444 |
1
⊢ ((𝑃 ∈ ℙ ∧ ¬ 2
∥ 𝑃) →
(⌊‘(𝑃 / 4))
≤ ((𝑃 − 1) /
2)) |