Proof of Theorem 2lgslem3
Step | Hyp | Ref
| Expression |
1 | | nnz 12342 |
. . 3
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℤ) |
2 | | lgsdir2lem3 26475 |
. . 3
⊢ ((𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5})) |
3 | 1, 2 | sylan 580 |
. 2
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5})) |
4 | | elun 4083 |
. . 3
⊢ ((𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5}) ↔ ((𝑃 mod 8)
∈ {1, 7} ∨ (𝑃 mod
8) ∈ {3, 5})) |
5 | | ovex 7308 |
. . . . . . . . 9
⊢ (𝑃 mod 8) ∈
V |
6 | 5 | elpr 4584 |
. . . . . . . 8
⊢ ((𝑃 mod 8) ∈ {1, 7} ↔
((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7)) |
7 | | 2lgslem2.n |
. . . . . . . . . . . . 13
⊢ 𝑁 = (((𝑃 − 1) / 2) −
(⌊‘(𝑃 /
4))) |
8 | 7 | 2lgslem3a1 26548 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (𝑁 mod 2) = 0) |
9 | 8 | a1d 25 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0)) |
10 | 9 | expcom 414 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 1 → (𝑃 ∈ ℕ → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0))) |
11 | 10 | impd 411 |
. . . . . . . . 9
⊢ ((𝑃 mod 8) = 1 → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = 0)) |
12 | 7 | 2lgslem3d1 26551 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (𝑁 mod 2) = 0) |
13 | 12 | a1d 25 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0)) |
14 | 13 | expcom 414 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 7 → (𝑃 ∈ ℕ → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0))) |
15 | 14 | impd 411 |
. . . . . . . . 9
⊢ ((𝑃 mod 8) = 7 → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = 0)) |
16 | 11, 15 | jaoi 854 |
. . . . . . . 8
⊢ (((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7) → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = 0)) |
17 | 6, 16 | sylbi 216 |
. . . . . . 7
⊢ ((𝑃 mod 8) ∈ {1, 7} →
((𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃) →
(𝑁 mod 2) =
0)) |
18 | 17 | imp 407 |
. . . . . 6
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
(𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃)) →
(𝑁 mod 2) =
0) |
19 | | iftrue 4465 |
. . . . . . 7
⊢ ((𝑃 mod 8) ∈ {1, 7} →
if((𝑃 mod 8) ∈ {1, 7},
0, 1) = 0) |
20 | 19 | adantr 481 |
. . . . . 6
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
(𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃)) →
if((𝑃 mod 8) ∈ {1, 7},
0, 1) = 0) |
21 | 18, 20 | eqtr4d 2781 |
. . . . 5
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
(𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃)) →
(𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1)) |
22 | 21 | ex 413 |
. . . 4
⊢ ((𝑃 mod 8) ∈ {1, 7} →
((𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃) →
(𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
23 | 5 | elpr 4584 |
. . . . 5
⊢ ((𝑃 mod 8) ∈ {3, 5} ↔
((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5)) |
24 | 7 | 2lgslem3b1 26549 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 3) → (𝑁 mod 2) = 1) |
25 | 24 | expcom 414 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 3 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
26 | 7 | 2lgslem3c1 26550 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 5) → (𝑁 mod 2) = 1) |
27 | 26 | expcom 414 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 5 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
28 | 25, 27 | jaoi 854 |
. . . . . . . . 9
⊢ (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
29 | 28 | imp 407 |
. . . . . . . 8
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (𝑁 mod 2) = 1) |
30 | | 1re 10975 |
. . . . . . . . . . . . . . . 16
⊢ 1 ∈
ℝ |
31 | | 1lt3 12146 |
. . . . . . . . . . . . . . . 16
⊢ 1 <
3 |
32 | 30, 31 | ltneii 11088 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
3 |
33 | 32 | nesymi 3001 |
. . . . . . . . . . . . . 14
⊢ ¬ 3
= 1 |
34 | | 3re 12053 |
. . . . . . . . . . . . . . . 16
⊢ 3 ∈
ℝ |
35 | | 3lt7 12162 |
. . . . . . . . . . . . . . . 16
⊢ 3 <
7 |
36 | 34, 35 | ltneii 11088 |
. . . . . . . . . . . . . . 15
⊢ 3 ≠
7 |
37 | 36 | neii 2945 |
. . . . . . . . . . . . . 14
⊢ ¬ 3
= 7 |
38 | 33, 37 | pm3.2i 471 |
. . . . . . . . . . . . 13
⊢ (¬ 3
= 1 ∧ ¬ 3 = 7) |
39 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 1 ↔ 3 =
1)) |
40 | 39 | notbid 318 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 3 =
1)) |
41 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 7 ↔ 3 =
7)) |
42 | 41 | notbid 318 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 3 =
7)) |
43 | 40, 42 | anbi12d 631 |
. . . . . . . . . . . . 13
⊢ ((𝑃 mod 8) = 3 → ((¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) = 7) ↔
(¬ 3 = 1 ∧ ¬ 3 = 7))) |
44 | 38, 43 | mpbiri 257 |
. . . . . . . . . . . 12
⊢ ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7)) |
45 | | 1lt5 12153 |
. . . . . . . . . . . . . . . 16
⊢ 1 <
5 |
46 | 30, 45 | ltneii 11088 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
5 |
47 | 46 | nesymi 3001 |
. . . . . . . . . . . . . 14
⊢ ¬ 5
= 1 |
48 | | 5re 12060 |
. . . . . . . . . . . . . . . 16
⊢ 5 ∈
ℝ |
49 | | 5lt7 12160 |
. . . . . . . . . . . . . . . 16
⊢ 5 <
7 |
50 | 48, 49 | ltneii 11088 |
. . . . . . . . . . . . . . 15
⊢ 5 ≠
7 |
51 | 50 | neii 2945 |
. . . . . . . . . . . . . 14
⊢ ¬ 5
= 7 |
52 | 47, 51 | pm3.2i 471 |
. . . . . . . . . . . . 13
⊢ (¬ 5
= 1 ∧ ¬ 5 = 7) |
53 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 1 ↔ 5 =
1)) |
54 | 53 | notbid 318 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 5 =
1)) |
55 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 7 ↔ 5 =
7)) |
56 | 55 | notbid 318 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 5 =
7)) |
57 | 54, 56 | anbi12d 631 |
. . . . . . . . . . . . 13
⊢ ((𝑃 mod 8) = 5 → ((¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) = 7) ↔
(¬ 5 = 1 ∧ ¬ 5 = 7))) |
58 | 52, 57 | mpbiri 257 |
. . . . . . . . . . . 12
⊢ ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7)) |
59 | 44, 58 | jaoi 854 |
. . . . . . . . . . 11
⊢ (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
60 | 59 | adantr 481 |
. . . . . . . . . 10
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
61 | | ioran 981 |
. . . . . . . . . . 11
⊢ (¬
((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7) ↔ (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
62 | 61, 6 | xchnxbir 333 |
. . . . . . . . . 10
⊢ (¬
(𝑃 mod 8) ∈ {1, 7}
↔ (¬ (𝑃 mod 8) = 1
∧ ¬ (𝑃 mod 8) =
7)) |
63 | 60, 62 | sylibr 233 |
. . . . . . . . 9
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → ¬
(𝑃 mod 8) ∈ {1,
7}) |
64 | 63 | iffalsed 4470 |
. . . . . . . 8
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) →
if((𝑃 mod 8) ∈ {1, 7},
0, 1) = 1) |
65 | 29, 64 | eqtr4d 2781 |
. . . . . . 7
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1)) |
66 | 65 | a1d 25 |
. . . . . 6
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
67 | 66 | expimpd 454 |
. . . . 5
⊢ (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
68 | 23, 67 | sylbi 216 |
. . . 4
⊢ ((𝑃 mod 8) ∈ {3, 5} →
((𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃) →
(𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
69 | 22, 68 | jaoi 854 |
. . 3
⊢ (((𝑃 mod 8) ∈ {1, 7} ∨
(𝑃 mod 8) ∈ {3, 5})
→ ((𝑃 ∈ ℕ
∧ ¬ 2 ∥ 𝑃)
→ (𝑁 mod 2) =
if((𝑃 mod 8) ∈ {1, 7},
0, 1))) |
70 | 4, 69 | sylbi 216 |
. 2
⊢ ((𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5}) → ((𝑃 ∈
ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
71 | 3, 70 | mpcom 38 |
1
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1)) |