Proof of Theorem gausslemma2dlem0i
Step | Hyp | Ref
| Expression |
1 | | 2z 12282 |
. . 3
⊢ 2 ∈
ℤ |
2 | | gausslemma2dlem0.p |
. . . 4
⊢ (𝜑 → 𝑃 ∈ (ℙ ∖
{2})) |
3 | | id 22 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈ (ℙ
∖ {2})) |
4 | 3 | gausslemma2dlem0a 26409 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℕ) |
5 | 4 | nnzd 12354 |
. . . 4
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℤ) |
6 | 2, 5 | syl 17 |
. . 3
⊢ (𝜑 → 𝑃 ∈ ℤ) |
7 | | lgscl1 26373 |
. . 3
⊢ ((2
∈ ℤ ∧ 𝑃
∈ ℤ) → (2 /L 𝑃) ∈ {-1, 0, 1}) |
8 | 1, 6, 7 | sylancr 586 |
. 2
⊢ (𝜑 → (2 /L
𝑃) ∈ {-1, 0,
1}) |
9 | | ovex 7288 |
. . . 4
⊢ (2
/L 𝑃)
∈ V |
10 | 9 | eltp 4621 |
. . 3
⊢ ((2
/L 𝑃)
∈ {-1, 0, 1} ↔ ((2 /L 𝑃) = -1 ∨ (2 /L 𝑃) = 0 ∨ (2
/L 𝑃) =
1)) |
11 | | gausslemma2dlem0.m |
. . . . . . . . 9
⊢ 𝑀 = (⌊‘(𝑃 / 4)) |
12 | | gausslemma2dlem0.h |
. . . . . . . . 9
⊢ 𝐻 = ((𝑃 − 1) / 2) |
13 | | gausslemma2dlem0.n |
. . . . . . . . 9
⊢ 𝑁 = (𝐻 − 𝑀) |
14 | 2, 11, 12, 13 | gausslemma2dlem0h 26416 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ∈
ℕ0) |
15 | 14 | nn0zd 12353 |
. . . . . . 7
⊢ (𝜑 → 𝑁 ∈ ℤ) |
16 | | m1expcl2 13732 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(-1↑𝑁) ∈ {-1,
1}) |
17 | 15, 16 | syl 17 |
. . . . . 6
⊢ (𝜑 → (-1↑𝑁) ∈ {-1, 1}) |
18 | | ovex 7288 |
. . . . . . . 8
⊢
(-1↑𝑁) ∈
V |
19 | 18 | elpr 4581 |
. . . . . . 7
⊢
((-1↑𝑁) ∈
{-1, 1} ↔ ((-1↑𝑁)
= -1 ∨ (-1↑𝑁) =
1)) |
20 | | eqcom 2745 |
. . . . . . . . . 10
⊢
((-1↑𝑁) = -1
↔ -1 = (-1↑𝑁)) |
21 | 20 | biimpi 215 |
. . . . . . . . 9
⊢
((-1↑𝑁) = -1
→ -1 = (-1↑𝑁)) |
22 | 21 | 2a1d 26 |
. . . . . . . 8
⊢
((-1↑𝑁) = -1
→ (𝜑 → ((-1 mod
𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)))) |
23 | | eldifi 4057 |
. . . . . . . . . . . . 13
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
24 | | prmnn 16307 |
. . . . . . . . . . . . . . 15
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
25 | 24 | nnred 11918 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℝ) |
26 | | prmgt1 16330 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ ℙ → 1 <
𝑃) |
27 | 25, 26 | jca 511 |
. . . . . . . . . . . . 13
⊢ (𝑃 ∈ ℙ → (𝑃 ∈ ℝ ∧ 1 <
𝑃)) |
28 | 23, 27 | syl 17 |
. . . . . . . . . . . 12
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℝ
∧ 1 < 𝑃)) |
29 | | 1mod 13551 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℝ ∧ 1 <
𝑃) → (1 mod 𝑃) = 1) |
30 | 2, 28, 29 | 3syl 18 |
. . . . . . . . . . 11
⊢ (𝜑 → (1 mod 𝑃) = 1) |
31 | 30 | eqeq2d 2749 |
. . . . . . . . . 10
⊢ (𝜑 → ((-1 mod 𝑃) = (1 mod 𝑃) ↔ (-1 mod 𝑃) = 1)) |
32 | | oddprmge3 16333 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
(ℤ≥‘3)) |
33 | | m1modge3gt1 13566 |
. . . . . . . . . . . 12
⊢ (𝑃 ∈
(ℤ≥‘3) → 1 < (-1 mod 𝑃)) |
34 | | breq2 5074 |
. . . . . . . . . . . . 13
⊢ ((-1 mod
𝑃) = 1 → (1 < (-1
mod 𝑃) ↔ 1 <
1)) |
35 | | 1re 10906 |
. . . . . . . . . . . . . . 15
⊢ 1 ∈
ℝ |
36 | 35 | ltnri 11014 |
. . . . . . . . . . . . . 14
⊢ ¬ 1
< 1 |
37 | 36 | pm2.21i 119 |
. . . . . . . . . . . . 13
⊢ (1 < 1
→ -1 = 1) |
38 | 34, 37 | syl6bi 252 |
. . . . . . . . . . . 12
⊢ ((-1 mod
𝑃) = 1 → (1 < (-1
mod 𝑃) → -1 =
1)) |
39 | 33, 38 | syl5com 31 |
. . . . . . . . . . 11
⊢ (𝑃 ∈
(ℤ≥‘3) → ((-1 mod 𝑃) = 1 → -1 = 1)) |
40 | 2, 32, 39 | 3syl 18 |
. . . . . . . . . 10
⊢ (𝜑 → ((-1 mod 𝑃) = 1 → -1 = 1)) |
41 | 31, 40 | sylbid 239 |
. . . . . . . . 9
⊢ (𝜑 → ((-1 mod 𝑃) = (1 mod 𝑃) → -1 = 1)) |
42 | | oveq1 7262 |
. . . . . . . . . . 11
⊢
((-1↑𝑁) = 1
→ ((-1↑𝑁) mod
𝑃) = (1 mod 𝑃)) |
43 | 42 | eqeq2d 2749 |
. . . . . . . . . 10
⊢
((-1↑𝑁) = 1
→ ((-1 mod 𝑃) =
((-1↑𝑁) mod 𝑃) ↔ (-1 mod 𝑃) = (1 mod 𝑃))) |
44 | | eqeq2 2750 |
. . . . . . . . . 10
⊢
((-1↑𝑁) = 1
→ (-1 = (-1↑𝑁)
↔ -1 = 1)) |
45 | 43, 44 | imbi12d 344 |
. . . . . . . . 9
⊢
((-1↑𝑁) = 1
→ (((-1 mod 𝑃) =
((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)) ↔ ((-1 mod 𝑃) = (1 mod 𝑃) → -1 = 1))) |
46 | 41, 45 | syl5ibr 245 |
. . . . . . . 8
⊢
((-1↑𝑁) = 1
→ (𝜑 → ((-1 mod
𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)))) |
47 | 22, 46 | jaoi 853 |
. . . . . . 7
⊢
(((-1↑𝑁) = -1
∨ (-1↑𝑁) = 1)
→ (𝜑 → ((-1 mod
𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)))) |
48 | 19, 47 | sylbi 216 |
. . . . . 6
⊢
((-1↑𝑁) ∈
{-1, 1} → (𝜑 → ((-1
mod 𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)))) |
49 | 17, 48 | mpcom 38 |
. . . . 5
⊢ (𝜑 → ((-1 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁))) |
50 | | oveq1 7262 |
. . . . . . 7
⊢ ((2
/L 𝑃) =
-1 → ((2 /L 𝑃) mod 𝑃) = (-1 mod 𝑃)) |
51 | 50 | eqeq1d 2740 |
. . . . . 6
⊢ ((2
/L 𝑃) =
-1 → (((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) ↔ (-1 mod 𝑃) = ((-1↑𝑁) mod 𝑃))) |
52 | | eqeq1 2742 |
. . . . . 6
⊢ ((2
/L 𝑃) =
-1 → ((2 /L 𝑃) = (-1↑𝑁) ↔ -1 = (-1↑𝑁))) |
53 | 51, 52 | imbi12d 344 |
. . . . 5
⊢ ((2
/L 𝑃) =
-1 → ((((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)) ↔ ((-1 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → -1 = (-1↑𝑁)))) |
54 | 49, 53 | syl5ibr 245 |
. . . 4
⊢ ((2
/L 𝑃) =
-1 → (𝜑 → (((2
/L 𝑃) mod
𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)))) |
55 | 2 | gausslemma2dlem0a 26409 |
. . . . . . . . 9
⊢ (𝜑 → 𝑃 ∈ ℕ) |
56 | 55 | nnrpd 12699 |
. . . . . . . 8
⊢ (𝜑 → 𝑃 ∈
ℝ+) |
57 | | 0mod 13550 |
. . . . . . . 8
⊢ (𝑃 ∈ ℝ+
→ (0 mod 𝑃) =
0) |
58 | 56, 57 | syl 17 |
. . . . . . 7
⊢ (𝜑 → (0 mod 𝑃) = 0) |
59 | 58 | eqeq1d 2740 |
. . . . . 6
⊢ (𝜑 → ((0 mod 𝑃) = ((-1↑𝑁) mod 𝑃) ↔ 0 = ((-1↑𝑁) mod 𝑃))) |
60 | | oveq1 7262 |
. . . . . . . . . . . . 13
⊢
((-1↑𝑁) = -1
→ ((-1↑𝑁) mod
𝑃) = (-1 mod 𝑃)) |
61 | 60 | eqeq2d 2749 |
. . . . . . . . . . . 12
⊢
((-1↑𝑁) = -1
→ (0 = ((-1↑𝑁)
mod 𝑃) ↔ 0 = (-1 mod
𝑃))) |
62 | 61 | adantr 480 |
. . . . . . . . . . 11
⊢
(((-1↑𝑁) = -1
∧ 𝜑) → (0 =
((-1↑𝑁) mod 𝑃) ↔ 0 = (-1 mod 𝑃))) |
63 | | negmod0 13526 |
. . . . . . . . . . . . . . 15
⊢ ((1
∈ ℝ ∧ 𝑃
∈ ℝ+) → ((1 mod 𝑃) = 0 ↔ (-1 mod 𝑃) = 0)) |
64 | | eqcom 2745 |
. . . . . . . . . . . . . . 15
⊢ ((-1 mod
𝑃) = 0 ↔ 0 = (-1 mod
𝑃)) |
65 | 63, 64 | bitrdi 286 |
. . . . . . . . . . . . . 14
⊢ ((1
∈ ℝ ∧ 𝑃
∈ ℝ+) → ((1 mod 𝑃) = 0 ↔ 0 = (-1 mod 𝑃))) |
66 | 35, 56, 65 | sylancr 586 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((1 mod 𝑃) = 0 ↔ 0 = (-1 mod 𝑃))) |
67 | 30 | eqeq1d 2740 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((1 mod 𝑃) = 0 ↔ 1 = 0)) |
68 | | ax-1ne0 10871 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
0 |
69 | | eqneqall 2953 |
. . . . . . . . . . . . . . 15
⊢ (1 = 0
→ (1 ≠ 0 → 0 = (-1↑𝑁))) |
70 | 68, 69 | mpi 20 |
. . . . . . . . . . . . . 14
⊢ (1 = 0
→ 0 = (-1↑𝑁)) |
71 | 67, 70 | syl6bi 252 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((1 mod 𝑃) = 0 → 0 = (-1↑𝑁))) |
72 | 66, 71 | sylbird 259 |
. . . . . . . . . . . 12
⊢ (𝜑 → (0 = (-1 mod 𝑃) → 0 = (-1↑𝑁))) |
73 | 72 | adantl 481 |
. . . . . . . . . . 11
⊢
(((-1↑𝑁) = -1
∧ 𝜑) → (0 = (-1 mod
𝑃) → 0 =
(-1↑𝑁))) |
74 | 62, 73 | sylbid 239 |
. . . . . . . . . 10
⊢
(((-1↑𝑁) = -1
∧ 𝜑) → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁))) |
75 | 74 | ex 412 |
. . . . . . . . 9
⊢
((-1↑𝑁) = -1
→ (𝜑 → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁)))) |
76 | 42 | eqeq2d 2749 |
. . . . . . . . . . . 12
⊢
((-1↑𝑁) = 1
→ (0 = ((-1↑𝑁)
mod 𝑃) ↔ 0 = (1 mod
𝑃))) |
77 | 76 | adantr 480 |
. . . . . . . . . . 11
⊢
(((-1↑𝑁) = 1
∧ 𝜑) → (0 =
((-1↑𝑁) mod 𝑃) ↔ 0 = (1 mod 𝑃))) |
78 | | eqcom 2745 |
. . . . . . . . . . . . . 14
⊢ (0 = (1
mod 𝑃) ↔ (1 mod 𝑃) = 0) |
79 | 78, 67 | syl5bb 282 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (0 = (1 mod 𝑃) ↔ 1 =
0)) |
80 | 79, 70 | syl6bi 252 |
. . . . . . . . . . . 12
⊢ (𝜑 → (0 = (1 mod 𝑃) → 0 = (-1↑𝑁))) |
81 | 80 | adantl 481 |
. . . . . . . . . . 11
⊢
(((-1↑𝑁) = 1
∧ 𝜑) → (0 = (1 mod
𝑃) → 0 =
(-1↑𝑁))) |
82 | 77, 81 | sylbid 239 |
. . . . . . . . . 10
⊢
(((-1↑𝑁) = 1
∧ 𝜑) → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁))) |
83 | 82 | ex 412 |
. . . . . . . . 9
⊢
((-1↑𝑁) = 1
→ (𝜑 → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁)))) |
84 | 75, 83 | jaoi 853 |
. . . . . . . 8
⊢
(((-1↑𝑁) = -1
∨ (-1↑𝑁) = 1)
→ (𝜑 → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁)))) |
85 | 19, 84 | sylbi 216 |
. . . . . . 7
⊢
((-1↑𝑁) ∈
{-1, 1} → (𝜑 → (0 =
((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁)))) |
86 | 17, 85 | mpcom 38 |
. . . . . 6
⊢ (𝜑 → (0 = ((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁))) |
87 | 59, 86 | sylbid 239 |
. . . . 5
⊢ (𝜑 → ((0 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁))) |
88 | | oveq1 7262 |
. . . . . . 7
⊢ ((2
/L 𝑃) = 0
→ ((2 /L 𝑃) mod 𝑃) = (0 mod 𝑃)) |
89 | 88 | eqeq1d 2740 |
. . . . . 6
⊢ ((2
/L 𝑃) = 0
→ (((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) ↔ (0 mod 𝑃) = ((-1↑𝑁) mod 𝑃))) |
90 | | eqeq1 2742 |
. . . . . 6
⊢ ((2
/L 𝑃) = 0
→ ((2 /L 𝑃) = (-1↑𝑁) ↔ 0 = (-1↑𝑁))) |
91 | 89, 90 | imbi12d 344 |
. . . . 5
⊢ ((2
/L 𝑃) = 0
→ ((((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)) ↔ ((0 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → 0 = (-1↑𝑁)))) |
92 | 87, 91 | syl5ibr 245 |
. . . 4
⊢ ((2
/L 𝑃) = 0
→ (𝜑 → (((2
/L 𝑃) mod
𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)))) |
93 | 30 | eqeq1d 2740 |
. . . . . 6
⊢ (𝜑 → ((1 mod 𝑃) = ((-1↑𝑁) mod 𝑃) ↔ 1 = ((-1↑𝑁) mod 𝑃))) |
94 | | eqcom 2745 |
. . . . . . . . . . 11
⊢ (1 = (-1
mod 𝑃) ↔ (-1 mod 𝑃) = 1) |
95 | | eqcom 2745 |
. . . . . . . . . . 11
⊢ (1 = -1
↔ -1 = 1) |
96 | 40, 94, 95 | 3imtr4g 295 |
. . . . . . . . . 10
⊢ (𝜑 → (1 = (-1 mod 𝑃) → 1 =
-1)) |
97 | 60 | eqeq2d 2749 |
. . . . . . . . . . 11
⊢
((-1↑𝑁) = -1
→ (1 = ((-1↑𝑁)
mod 𝑃) ↔ 1 = (-1 mod
𝑃))) |
98 | | eqeq2 2750 |
. . . . . . . . . . 11
⊢
((-1↑𝑁) = -1
→ (1 = (-1↑𝑁)
↔ 1 = -1)) |
99 | 97, 98 | imbi12d 344 |
. . . . . . . . . 10
⊢
((-1↑𝑁) = -1
→ ((1 = ((-1↑𝑁)
mod 𝑃) → 1 =
(-1↑𝑁)) ↔ (1 =
(-1 mod 𝑃) → 1 =
-1))) |
100 | 96, 99 | syl5ibr 245 |
. . . . . . . . 9
⊢
((-1↑𝑁) = -1
→ (𝜑 → (1 =
((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁)))) |
101 | | eqcom 2745 |
. . . . . . . . . . 11
⊢
((-1↑𝑁) = 1
↔ 1 = (-1↑𝑁)) |
102 | 101 | biimpi 215 |
. . . . . . . . . 10
⊢
((-1↑𝑁) = 1
→ 1 = (-1↑𝑁)) |
103 | 102 | 2a1d 26 |
. . . . . . . . 9
⊢
((-1↑𝑁) = 1
→ (𝜑 → (1 =
((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁)))) |
104 | 100, 103 | jaoi 853 |
. . . . . . . 8
⊢
(((-1↑𝑁) = -1
∨ (-1↑𝑁) = 1)
→ (𝜑 → (1 =
((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁)))) |
105 | 19, 104 | sylbi 216 |
. . . . . . 7
⊢
((-1↑𝑁) ∈
{-1, 1} → (𝜑 → (1 =
((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁)))) |
106 | 17, 105 | mpcom 38 |
. . . . . 6
⊢ (𝜑 → (1 = ((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁))) |
107 | 93, 106 | sylbid 239 |
. . . . 5
⊢ (𝜑 → ((1 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁))) |
108 | | oveq1 7262 |
. . . . . . 7
⊢ ((2
/L 𝑃) = 1
→ ((2 /L 𝑃) mod 𝑃) = (1 mod 𝑃)) |
109 | 108 | eqeq1d 2740 |
. . . . . 6
⊢ ((2
/L 𝑃) = 1
→ (((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) ↔ (1 mod 𝑃) = ((-1↑𝑁) mod 𝑃))) |
110 | | eqeq1 2742 |
. . . . . 6
⊢ ((2
/L 𝑃) = 1
→ ((2 /L 𝑃) = (-1↑𝑁) ↔ 1 = (-1↑𝑁))) |
111 | 109, 110 | imbi12d 344 |
. . . . 5
⊢ ((2
/L 𝑃) = 1
→ ((((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)) ↔ ((1 mod 𝑃) = ((-1↑𝑁) mod 𝑃) → 1 = (-1↑𝑁)))) |
112 | 107, 111 | syl5ibr 245 |
. . . 4
⊢ ((2
/L 𝑃) = 1
→ (𝜑 → (((2
/L 𝑃) mod
𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)))) |
113 | 54, 92, 112 | 3jaoi 1425 |
. . 3
⊢ (((2
/L 𝑃) =
-1 ∨ (2 /L 𝑃) = 0 ∨ (2 /L 𝑃) = 1) → (𝜑 → (((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)))) |
114 | 10, 113 | sylbi 216 |
. 2
⊢ ((2
/L 𝑃)
∈ {-1, 0, 1} → (𝜑
→ (((2 /L 𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁)))) |
115 | 8, 114 | mpcom 38 |
1
⊢ (𝜑 → (((2 /L
𝑃) mod 𝑃) = ((-1↑𝑁) mod 𝑃) → (2 /L 𝑃) = (-1↑𝑁))) |