Proof of Theorem 2lgsoddprm
Step | Hyp | Ref
| Expression |
1 | | eldifi 4057 |
. . 3
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
2 | | 2lgs 26460 |
. . 3
⊢ (𝑃 ∈ ℙ → ((2
/L 𝑃) = 1
↔ (𝑃 mod 8) ∈ {1,
7})) |
3 | 1, 2 | syl 17 |
. 2
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 /L 𝑃) = 1 ↔ (𝑃 mod 8) ∈ {1, 7})) |
4 | | simpl 482 |
. . . . 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 16440 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℕ
∧ ¬ 2 ∥ 𝑃)) |
8 | | nnz 12272 |
. . . . . . . . . . . 12
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℤ) |
9 | 8 | anim1i 614 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃)) |
10 | 7, 9 | syl 17 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (𝑃 ∈ ℤ
∧ ¬ 2 ∥ 𝑃)) |
11 | | sqoddm1div8z 15991 |
. . . . . . . . . 10
⊢ ((𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃) → (((𝑃↑2) − 1) / 8) ∈
ℤ) |
12 | 10, 11 | syl 17 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (((𝑃↑2) −
1) / 8) ∈ ℤ) |
13 | | m1exp1 16013 |
. . . . . . . . 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 26468 |
. . . . . . . . 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 304 |
. . . . . . 7
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (1 = (-1↑(((𝑃↑2) − 1) / 8)) ↔ (𝑃 mod 8) ∈ {1,
7})) |
18 | 17 | biimparc 479 |
. . . . . 6
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
𝑃 ∈ (ℙ ∖
{2})) → 1 = (-1↑(((𝑃↑2) − 1) / 8))) |
19 | 18 | adantl 481 |
. . . . 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 420 |
. . 3
⊢ ((2
/L 𝑃) = 1
→ ((𝑃 mod 8) ∈
{1, 7} → (𝑃 ∈
(ℙ ∖ {2}) → (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8))))) |
22 | | 2z 12282 |
. . . . . 6
⊢ 2 ∈
ℤ |
23 | | prmz 16308 |
. . . . . . 7
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℤ) |
24 | 1, 23 | syl 17 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℤ) |
25 | | lgscl1 26373 |
. . . . . 6
⊢ ((2
∈ ℤ ∧ 𝑃
∈ ℤ) → (2 /L 𝑃) ∈ {-1, 0, 1}) |
26 | 22, 24, 25 | sylancr 586 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 /L 𝑃) ∈ {-1, 0, 1}) |
27 | | ovex 7288 |
. . . . . . 7
⊢ (2
/L 𝑃)
∈ V |
28 | 27 | eltp 4621 |
. . . . . 6
⊢ ((2
/L 𝑃)
∈ {-1, 0, 1} ↔ ((2 /L 𝑃) = -1 ∨ (2 /L 𝑃) = 0 ∨ (2
/L 𝑃) =
1)) |
29 | | simpl 482 |
. . . . . . . . . 10
⊢ (((2
/L 𝑃) =
-1 ∧ (𝑃 ∈ (ℙ
∖ {2}) ∧ ¬ (𝑃
mod 8) ∈ {1, 7})) → (2 /L 𝑃) = -1) |
30 | 16 | notbid 317 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (¬ 2 ∥ (((𝑃↑2) − 1) / 8) ↔ ¬ (𝑃 mod 8) ∈ {1,
7})) |
31 | 30 | biimpar 477 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ¬ (𝑃 mod 8)
∈ {1, 7}) → ¬ 2 ∥ (((𝑃↑2) − 1) / 8)) |
32 | | m1expo 16012 |
. . . . . . . . . . . . 13
⊢
(((((𝑃↑2)
− 1) / 8) ∈ ℤ ∧ ¬ 2 ∥ (((𝑃↑2) − 1) / 8)) →
(-1↑(((𝑃↑2)
− 1) / 8)) = -1) |
33 | 12, 31, 32 | syl2an2r 681 |
. . . . . . . . . . . 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 481 |
. . . . . . . . . 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 420 |
. . . . . . 7
⊢ ((2
/L 𝑃) =
-1 → (𝑃 ∈
(ℙ ∖ {2}) → (¬ (𝑃 mod 8) ∈ {1, 7} → (¬ (2
/L 𝑃) = 1
→ (2 /L 𝑃) = (-1↑(((𝑃↑2) − 1) /
8)))))) |
39 | | eldifsn 4717 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
↔ (𝑃 ∈ ℙ
∧ 𝑃 ≠
2)) |
40 | | simpr 484 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 2) → 𝑃 ≠ 2) |
41 | 40 | necomd 2998 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 2) → 2 ≠ 𝑃) |
42 | 39, 41 | sylbi 216 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 2 ≠ 𝑃) |
43 | | 2prm 16325 |
. . . . . . . . . . 11
⊢ 2 ∈
ℙ |
44 | | prmrp 16345 |
. . . . . . . . . . 11
⊢ ((2
∈ ℙ ∧ 𝑃
∈ ℙ) → ((2 gcd 𝑃) = 1 ↔ 2 ≠ 𝑃)) |
45 | 43, 1, 44 | sylancr 586 |
. . . . . . . . . 10
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 gcd 𝑃) = 1
↔ 2 ≠ 𝑃)) |
46 | 42, 45 | mpbird 256 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 gcd 𝑃) =
1) |
47 | | lgsne0 26388 |
. . . . . . . . . 10
⊢ ((2
∈ ℤ ∧ 𝑃
∈ ℤ) → ((2 /L 𝑃) ≠ 0 ↔ (2 gcd 𝑃) = 1)) |
48 | 22, 24, 47 | sylancr 586 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((2 /L 𝑃) ≠ 0 ↔ (2 gcd 𝑃) = 1)) |
49 | 46, 48 | mpbird 256 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (2 /L 𝑃) ≠ 0) |
50 | | eqneqall 2953 |
. . . . . . . 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 1425 |
. . . . . 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 381 |
. 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))) |