Proof of Theorem 2lgsoddprm
Step | Hyp | Ref
| Expression |
1 | | eldifi 4061 |
. . 3
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
2 | | 2lgs 26555 |
. . 3
⊢ (𝑃 ∈ ℙ → ((2
/L 𝑃) = 1
↔ (𝑃 mod 8) ∈ {1,
7})) |
3 | 1, 2 | syl 17 |
. 2
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 /L 𝑃) = 1 ↔ (𝑃 mod 8) ∈ {1, 7})) |
4 | | simpl 483 |
. . . . 5
⊢ (((2
/L 𝑃) = 1
∧ ((𝑃 mod 8) ∈ {1,
7} ∧ 𝑃 ∈ (ℙ
∖ {2}))) → (2 /L 𝑃) = 1) |
5 | | eqcom 2745 |
. . . . . . . . 9
⊢ (1 =
(-1↑(((𝑃↑2)
− 1) / 8)) ↔ (-1↑(((𝑃↑2) − 1) / 8)) =
1) |
6 | 5 | a1i 11 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (1 = (-1↑(((𝑃↑2) − 1) / 8)) ↔
(-1↑(((𝑃↑2)
− 1) / 8)) = 1)) |
7 | | nnoddn2prm 16512 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℕ
∧ ¬ 2 ∥ 𝑃)) |
8 | | nnz 12342 |
. . . . . . . . . . . 12
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℤ) |
9 | 8 | anim1i 615 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃)) |
10 | 7, 9 | syl 17 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℤ
∧ ¬ 2 ∥ 𝑃)) |
11 | | sqoddm1div8z 16063 |
. . . . . . . . . 10
⊢ ((𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃) → (((𝑃↑2) − 1) / 8) ∈
ℤ) |
12 | 10, 11 | syl 17 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (((𝑃↑2) −
1) / 8) ∈ ℤ) |
13 | | m1exp1 16085 |
. . . . . . . . 9
⊢ ((((𝑃↑2) − 1) / 8) ∈
ℤ → ((-1↑(((𝑃↑2) − 1) / 8)) = 1 ↔ 2
∥ (((𝑃↑2)
− 1) / 8))) |
14 | 12, 13 | syl 17 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((-1↑(((𝑃↑2) − 1) / 8)) = 1 ↔ 2
∥ (((𝑃↑2)
− 1) / 8))) |
15 | | 2lgsoddprmlem4 26563 |
. . . . . . . . 9
⊢ ((𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃) → (2
∥ (((𝑃↑2)
− 1) / 8) ↔ (𝑃
mod 8) ∈ {1, 7})) |
16 | 10, 15 | syl 17 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 ∥ (((𝑃↑2) − 1) / 8) ↔ (𝑃 mod 8) ∈ {1,
7})) |
17 | 6, 14, 16 | 3bitrd 305 |
. . . . . . 7
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (1 = (-1↑(((𝑃↑2) − 1) / 8)) ↔ (𝑃 mod 8) ∈ {1,
7})) |
18 | 17 | biimparc 480 |
. . . . . 6
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
𝑃 ∈ (ℙ ∖
{2})) → 1 = (-1↑(((𝑃↑2) − 1) / 8))) |
19 | 18 | adantl 482 |
. . . . 5
⊢ (((2
/L 𝑃) = 1
∧ ((𝑃 mod 8) ∈ {1,
7} ∧ 𝑃 ∈ (ℙ
∖ {2}))) → 1 = (-1↑(((𝑃↑2) − 1) / 8))) |
20 | 4, 19 | eqtrd 2778 |
. . . 4
⊢ (((2
/L 𝑃) = 1
∧ ((𝑃 mod 8) ∈ {1,
7} ∧ 𝑃 ∈ (ℙ
∖ {2}))) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) / 8))) |
21 | 20 | exp32 421 |
. . 3
⊢ ((2
/L 𝑃) = 1
→ ((𝑃 mod 8) ∈
{1, 7} → (𝑃 ∈
(ℙ ∖ {2}) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8))))) |
22 | | 2z 12352 |
. . . . . 6
⊢ 2 ∈
ℤ |
23 | | prmz 16380 |
. . . . . . 7
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℤ) |
24 | 1, 23 | syl 17 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℤ) |
25 | | lgscl1 26468 |
. . . . . 6
⊢ ((2
∈ ℤ ∧ 𝑃
∈ ℤ) → (2 /L 𝑃) ∈ {-1, 0, 1}) |
26 | 22, 24, 25 | sylancr 587 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 /L 𝑃) ∈ {-1, 0, 1}) |
27 | | ovex 7308 |
. . . . . . 7
⊢ (2
/L 𝑃)
∈ V |
28 | 27 | eltp 4624 |
. . . . . 6
⊢ ((2
/L 𝑃)
∈ {-1, 0, 1} ↔ ((2 /L 𝑃) = -1 ∨ (2 /L 𝑃) = 0 ∨ (2
/L 𝑃) =
1)) |
29 | | simpl 483 |
. . . . . . . . . 10
⊢ (((2
/L 𝑃) =
-1 ∧ (𝑃 ∈ (ℙ
∖ {2}) ∧ ¬ (𝑃
mod 8) ∈ {1, 7})) → (2 /L 𝑃) = -1) |
30 | 16 | notbid 318 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (¬ 2 ∥ (((𝑃↑2) − 1) / 8) ↔ ¬ (𝑃 mod 8) ∈ {1,
7})) |
31 | 30 | biimpar 478 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ¬ (𝑃 mod 8)
∈ {1, 7}) → ¬ 2 ∥ (((𝑃↑2) − 1) / 8)) |
32 | | m1expo 16084 |
. . . . . . . . . . . . 13
⊢
(((((𝑃↑2)
− 1) / 8) ∈ ℤ ∧ ¬ 2 ∥ (((𝑃↑2) − 1) / 8)) →
(-1↑(((𝑃↑2)
− 1) / 8)) = -1) |
33 | 12, 31, 32 | syl2an2r 682 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ¬ (𝑃 mod 8)
∈ {1, 7}) → (-1↑(((𝑃↑2) − 1) / 8)) =
-1) |
34 | 33 | eqcomd 2744 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ¬ (𝑃 mod 8)
∈ {1, 7}) → -1 = (-1↑(((𝑃↑2) − 1) / 8))) |
35 | 34 | adantl 482 |
. . . . . . . . . 10
⊢ (((2
/L 𝑃) =
-1 ∧ (𝑃 ∈ (ℙ
∖ {2}) ∧ ¬ (𝑃
mod 8) ∈ {1, 7})) → -1 = (-1↑(((𝑃↑2) − 1) / 8))) |
36 | 29, 35 | eqtrd 2778 |
. . . . . . . . 9
⊢ (((2
/L 𝑃) =
-1 ∧ (𝑃 ∈ (ℙ
∖ {2}) ∧ ¬ (𝑃
mod 8) ∈ {1, 7})) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) / 8))) |
37 | 36 | a1d 25 |
. . . . . . . 8
⊢ (((2
/L 𝑃) =
-1 ∧ (𝑃 ∈ (ℙ
∖ {2}) ∧ ¬ (𝑃
mod 8) ∈ {1, 7})) → (¬ (2 /L 𝑃) = 1 → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))) |
38 | 37 | exp32 421 |
. . . . . . 7
⊢ ((2
/L 𝑃) =
-1 → (𝑃 ∈
(ℙ ∖ {2}) → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
39 | | eldifsn 4720 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
↔ (𝑃 ∈ ℙ
∧ 𝑃 ≠
2)) |
40 | | simpr 485 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 2) → 𝑃 ≠ 2) |
41 | 40 | necomd 2999 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 2) → 2 ≠ 𝑃) |
42 | 39, 41 | sylbi 216 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 2 ≠ 𝑃) |
43 | | 2prm 16397 |
. . . . . . . . . . 11
⊢ 2 ∈
ℙ |
44 | | prmrp 16417 |
. . . . . . . . . . 11
⊢ ((2
∈ ℙ ∧ 𝑃
∈ ℙ) → ((2 gcd 𝑃) = 1 ↔ 2 ≠ 𝑃)) |
45 | 43, 1, 44 | sylancr 587 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 gcd 𝑃) = 1
↔ 2 ≠ 𝑃)) |
46 | 42, 45 | mpbird 256 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 gcd 𝑃) =
1) |
47 | | lgsne0 26483 |
. . . . . . . . . 10
⊢ ((2
∈ ℤ ∧ 𝑃
∈ ℤ) → ((2 /L 𝑃) ≠ 0 ↔ (2 gcd 𝑃) = 1)) |
48 | 22, 24, 47 | sylancr 587 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 /L 𝑃) ≠ 0 ↔ (2 gcd 𝑃) = 1)) |
49 | 46, 48 | mpbird 256 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 /L 𝑃) ≠ 0) |
50 | | eqneqall 2954 |
. . . . . . . 8
⊢ ((2
/L 𝑃) = 0
→ ((2 /L 𝑃) ≠ 0 → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
51 | 49, 50 | syl5 34 |
. . . . . . 7
⊢ ((2
/L 𝑃) = 0
→ (𝑃 ∈ (ℙ
∖ {2}) → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
52 | | pm2.24 124 |
. . . . . . . 8
⊢ ((2
/L 𝑃) = 1
→ (¬ (2 /L 𝑃) = 1 → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))) |
53 | 52 | 2a1d 26 |
. . . . . . 7
⊢ ((2
/L 𝑃) = 1
→ (𝑃 ∈ (ℙ
∖ {2}) → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
54 | 38, 51, 53 | 3jaoi 1426 |
. . . . . 6
⊢ (((2
/L 𝑃) =
-1 ∨ (2 /L 𝑃) = 0 ∨ (2 /L 𝑃) = 1) → (𝑃 ∈ (ℙ ∖ {2}) → (¬
(𝑃 mod 8) ∈ {1, 7}
→ (¬ (2 /L 𝑃) = 1 → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
55 | 28, 54 | sylbi 216 |
. . . . 5
⊢ ((2
/L 𝑃)
∈ {-1, 0, 1} → (𝑃
∈ (ℙ ∖ {2}) → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
56 | 26, 55 | mpcom 38 |
. . . 4
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (¬ (𝑃 mod 8)
∈ {1, 7} → (¬ (2 /L 𝑃) = 1 → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8))))) |
57 | 56 | com13 88 |
. . 3
⊢ (¬ (2
/L 𝑃) = 1
→ (¬ (𝑃 mod 8)
∈ {1, 7} → (𝑃
∈ (ℙ ∖ {2}) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8))))) |
58 | 21, 57 | bija 382 |
. 2
⊢ (((2
/L 𝑃) = 1
↔ (𝑃 mod 8) ∈ {1,
7}) → (𝑃 ∈
(ℙ ∖ {2}) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) / 8)))) |
59 | 3, 58 | mpcom 38 |
1
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) / 8))) |