Proof of Theorem gausslemma2dlem5
Step | Hyp | Ref
| Expression |
1 | | gausslemma2d.p |
. . 3
⊢ (𝜑 → 𝑃 ∈ (ℙ ∖
{2})) |
2 | | gausslemma2d.h |
. . 3
⊢ 𝐻 = ((𝑃 − 1) / 2) |
3 | | gausslemma2d.r |
. . 3
⊢ 𝑅 = (𝑥 ∈ (1...𝐻) ↦ if((𝑥 · 2) < (𝑃 / 2), (𝑥 · 2), (𝑃 − (𝑥 · 2)))) |
4 | | gausslemma2d.m |
. . 3
⊢ 𝑀 = (⌊‘(𝑃 / 4)) |
5 | 1, 2, 3, 4 | gausslemma2dlem5a 26423 |
. 2
⊢ (𝜑 → (∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑅‘𝑘) mod 𝑃) = (∏𝑘 ∈ ((𝑀 + 1)...𝐻)(-1 · (𝑘 · 2)) mod 𝑃)) |
6 | | fzfi 13620 |
. . . . . 6
⊢ ((𝑀 + 1)...𝐻) ∈ Fin |
7 | 6 | a1i 11 |
. . . . 5
⊢ (𝜑 → ((𝑀 + 1)...𝐻) ∈ Fin) |
8 | | neg1cn 12017 |
. . . . . 6
⊢ -1 ∈
ℂ |
9 | 8 | a1i 11 |
. . . . 5
⊢ ((𝜑 ∧ 𝑘 ∈ ((𝑀 + 1)...𝐻)) → -1 ∈
ℂ) |
10 | | elfzelz 13185 |
. . . . . . . 8
⊢ (𝑘 ∈ ((𝑀 + 1)...𝐻) → 𝑘 ∈ ℤ) |
11 | | 2z 12282 |
. . . . . . . . 9
⊢ 2 ∈
ℤ |
12 | 11 | a1i 11 |
. . . . . . . 8
⊢ (𝑘 ∈ ((𝑀 + 1)...𝐻) → 2 ∈ ℤ) |
13 | 10, 12 | zmulcld 12361 |
. . . . . . 7
⊢ (𝑘 ∈ ((𝑀 + 1)...𝐻) → (𝑘 · 2) ∈ ℤ) |
14 | 13 | zcnd 12356 |
. . . . . 6
⊢ (𝑘 ∈ ((𝑀 + 1)...𝐻) → (𝑘 · 2) ∈ ℂ) |
15 | 14 | adantl 481 |
. . . . 5
⊢ ((𝜑 ∧ 𝑘 ∈ ((𝑀 + 1)...𝐻)) → (𝑘 · 2) ∈ ℂ) |
16 | 7, 9, 15 | fprodmul 15598 |
. . . 4
⊢ (𝜑 → ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(-1 · (𝑘 · 2)) = (∏𝑘 ∈ ((𝑀 + 1)...𝐻)-1 · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2))) |
17 | 6, 8 | pm3.2i 470 |
. . . . . . 7
⊢ (((𝑀 + 1)...𝐻) ∈ Fin ∧ -1 ∈
ℂ) |
18 | | fprodconst 15616 |
. . . . . . 7
⊢ ((((𝑀 + 1)...𝐻) ∈ Fin ∧ -1 ∈ ℂ) →
∏𝑘 ∈ ((𝑀 + 1)...𝐻)-1 = (-1↑(♯‘((𝑀 + 1)...𝐻)))) |
19 | 17, 18 | mp1i 13 |
. . . . . 6
⊢ (𝜑 → ∏𝑘 ∈ ((𝑀 + 1)...𝐻)-1 = (-1↑(♯‘((𝑀 + 1)...𝐻)))) |
20 | | nnoddn2prm 16440 |
. . . . . . . . . . . . . . 15
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℕ
∧ ¬ 2 ∥ 𝑃)) |
21 | | nnre 11910 |
. . . . . . . . . . . . . . . 16
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℝ) |
22 | 21 | adantr 480 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → 𝑃 ∈
ℝ) |
23 | 1, 20, 22 | 3syl 18 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 𝑃 ∈ ℝ) |
24 | | 4re 11987 |
. . . . . . . . . . . . . . 15
⊢ 4 ∈
ℝ |
25 | 24 | a1i 11 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 4 ∈
ℝ) |
26 | | 4ne0 12011 |
. . . . . . . . . . . . . . 15
⊢ 4 ≠
0 |
27 | 26 | a1i 11 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 4 ≠ 0) |
28 | 23, 25, 27 | redivcld 11733 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝑃 / 4) ∈ ℝ) |
29 | 28 | flcld 13446 |
. . . . . . . . . . . 12
⊢ (𝜑 → (⌊‘(𝑃 / 4)) ∈
ℤ) |
30 | 4, 29 | eqeltrid 2843 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝑀 ∈ ℤ) |
31 | 30 | peano2zd 12358 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑀 + 1) ∈ ℤ) |
32 | | nnz 12272 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℤ) |
33 | | oddm1d2 15997 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ ℤ → (¬ 2
∥ 𝑃 ↔ ((𝑃 − 1) / 2) ∈
ℤ)) |
34 | 32, 33 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑃 ∈ ℕ → (¬ 2
∥ 𝑃 ↔ ((𝑃 − 1) / 2) ∈
ℤ)) |
35 | 34 | biimpa 476 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → ((𝑃 − 1) / 2) ∈
ℤ) |
36 | 1, 20, 35 | 3syl 18 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝑃 − 1) / 2) ∈
ℤ) |
37 | 2, 36 | eqeltrid 2843 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐻 ∈ ℤ) |
38 | 1, 4, 2 | gausslemma2dlem0f 26414 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑀 + 1) ≤ 𝐻) |
39 | | eluz2 12517 |
. . . . . . . . . 10
⊢ (𝐻 ∈
(ℤ≥‘(𝑀 + 1)) ↔ ((𝑀 + 1) ∈ ℤ ∧ 𝐻 ∈ ℤ ∧ (𝑀 + 1) ≤ 𝐻)) |
40 | 31, 37, 38, 39 | syl3anbrc 1341 |
. . . . . . . . 9
⊢ (𝜑 → 𝐻 ∈ (ℤ≥‘(𝑀 + 1))) |
41 | | hashfz 14070 |
. . . . . . . . 9
⊢ (𝐻 ∈
(ℤ≥‘(𝑀 + 1)) → (♯‘((𝑀 + 1)...𝐻)) = ((𝐻 − (𝑀 + 1)) + 1)) |
42 | 40, 41 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → (♯‘((𝑀 + 1)...𝐻)) = ((𝐻 − (𝑀 + 1)) + 1)) |
43 | 37 | zcnd 12356 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐻 ∈ ℂ) |
44 | 30 | zcnd 12356 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∈ ℂ) |
45 | | 1cnd 10901 |
. . . . . . . . . 10
⊢ (𝜑 → 1 ∈
ℂ) |
46 | 43, 44, 45 | nppcan2d 11288 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐻 − (𝑀 + 1)) + 1) = (𝐻 − 𝑀)) |
47 | | gausslemma2d.n |
. . . . . . . . 9
⊢ 𝑁 = (𝐻 − 𝑀) |
48 | 46, 47 | eqtr4di 2797 |
. . . . . . . 8
⊢ (𝜑 → ((𝐻 − (𝑀 + 1)) + 1) = 𝑁) |
49 | 42, 48 | eqtrd 2778 |
. . . . . . 7
⊢ (𝜑 → (♯‘((𝑀 + 1)...𝐻)) = 𝑁) |
50 | 49 | oveq2d 7271 |
. . . . . 6
⊢ (𝜑 →
(-1↑(♯‘((𝑀
+ 1)...𝐻))) =
(-1↑𝑁)) |
51 | 19, 50 | eqtrd 2778 |
. . . . 5
⊢ (𝜑 → ∏𝑘 ∈ ((𝑀 + 1)...𝐻)-1 = (-1↑𝑁)) |
52 | 51 | oveq1d 7270 |
. . . 4
⊢ (𝜑 → (∏𝑘 ∈ ((𝑀 + 1)...𝐻)-1 · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2)) = ((-1↑𝑁) · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2))) |
53 | 16, 52 | eqtrd 2778 |
. . 3
⊢ (𝜑 → ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(-1 · (𝑘 · 2)) = ((-1↑𝑁) · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2))) |
54 | 53 | oveq1d 7270 |
. 2
⊢ (𝜑 → (∏𝑘 ∈ ((𝑀 + 1)...𝐻)(-1 · (𝑘 · 2)) mod 𝑃) = (((-1↑𝑁) · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2)) mod 𝑃)) |
55 | 5, 54 | eqtrd 2778 |
1
⊢ (𝜑 → (∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑅‘𝑘) mod 𝑃) = (((-1↑𝑁) · ∏𝑘 ∈ ((𝑀 + 1)...𝐻)(𝑘 · 2)) mod 𝑃)) |