Proof of Theorem 2lgslem3
Step | Hyp | Ref
| Expression |
1 | | nnz 12272 |
. . 3
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℤ) |
2 | | lgsdir2lem3 26380 |
. . 3
⊢ ((𝑃 ∈ ℤ ∧ ¬ 2
∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5})) |
3 | 1, 2 | sylan 579 |
. 2
⊢ ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5})) |
4 | | elun 4079 |
. . 3
⊢ ((𝑃 mod 8) ∈ ({1, 7} ∪ {3,
5}) ↔ ((𝑃 mod 8)
∈ {1, 7} ∨ (𝑃 mod
8) ∈ {3, 5})) |
5 | | ovex 7288 |
. . . . . . . . 9
⊢ (𝑃 mod 8) ∈
V |
6 | 5 | elpr 4581 |
. . . . . . . 8
⊢ ((𝑃 mod 8) ∈ {1, 7} ↔
((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7)) |
7 | | 2lgslem2.n |
. . . . . . . . . . . . 13
⊢ 𝑁 = (((𝑃 − 1) / 2) −
(⌊‘(𝑃 /
4))) |
8 | 7 | 2lgslem3a1 26453 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (𝑁 mod 2) = 0) |
9 | 8 | a1d 25 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0)) |
10 | 9 | expcom 413 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 1 → (𝑃 ∈ ℕ → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0))) |
11 | 10 | impd 410 |
. . . . . . . . 9
⊢ ((𝑃 mod 8) = 1 → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = 0)) |
12 | 7 | 2lgslem3d1 26456 |
. . . . . . . . . . . 12
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (𝑁 mod 2) = 0) |
13 | 12 | a1d 25 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0)) |
14 | 13 | expcom 413 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 7 → (𝑃 ∈ ℕ → (¬ 2
∥ 𝑃 → (𝑁 mod 2) = 0))) |
15 | 14 | impd 410 |
. . . . . . . . 9
⊢ ((𝑃 mod 8) = 7 → ((𝑃 ∈ ℕ ∧ ¬ 2
∥ 𝑃) → (𝑁 mod 2) = 0)) |
16 | 11, 15 | jaoi 853 |
. . . . . . . 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 406 |
. . . . . 6
⊢ (((𝑃 mod 8) ∈ {1, 7} ∧
(𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃)) →
(𝑁 mod 2) =
0) |
19 | | iftrue 4462 |
. . . . . . 7
⊢ ((𝑃 mod 8) ∈ {1, 7} →
if((𝑃 mod 8) ∈ {1, 7},
0, 1) = 0) |
20 | 19 | adantr 480 |
. . . . . 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 412 |
. . . 4
⊢ ((𝑃 mod 8) ∈ {1, 7} →
((𝑃 ∈ ℕ ∧
¬ 2 ∥ 𝑃) →
(𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0,
1))) |
23 | 5 | elpr 4581 |
. . . . 5
⊢ ((𝑃 mod 8) ∈ {3, 5} ↔
((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5)) |
24 | 7 | 2lgslem3b1 26454 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 3) → (𝑁 mod 2) = 1) |
25 | 24 | expcom 413 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 3 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
26 | 7 | 2lgslem3c1 26455 |
. . . . . . . . . . 11
⊢ ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 5) → (𝑁 mod 2) = 1) |
27 | 26 | expcom 413 |
. . . . . . . . . 10
⊢ ((𝑃 mod 8) = 5 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
28 | 25, 27 | jaoi 853 |
. . . . . . . . 9
⊢ (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1)) |
29 | 28 | imp 406 |
. . . . . . . 8
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (𝑁 mod 2) = 1) |
30 | | 1re 10906 |
. . . . . . . . . . . . . . . 16
⊢ 1 ∈
ℝ |
31 | | 1lt3 12076 |
. . . . . . . . . . . . . . . 16
⊢ 1 <
3 |
32 | 30, 31 | ltneii 11018 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
3 |
33 | 32 | nesymi 3000 |
. . . . . . . . . . . . . 14
⊢ ¬ 3
= 1 |
34 | | 3re 11983 |
. . . . . . . . . . . . . . . 16
⊢ 3 ∈
ℝ |
35 | | 3lt7 12092 |
. . . . . . . . . . . . . . . 16
⊢ 3 <
7 |
36 | 34, 35 | ltneii 11018 |
. . . . . . . . . . . . . . 15
⊢ 3 ≠
7 |
37 | 36 | neii 2944 |
. . . . . . . . . . . . . 14
⊢ ¬ 3
= 7 |
38 | 33, 37 | pm3.2i 470 |
. . . . . . . . . . . . 13
⊢ (¬ 3
= 1 ∧ ¬ 3 = 7) |
39 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 1 ↔ 3 =
1)) |
40 | 39 | notbid 317 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 3 =
1)) |
41 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 7 ↔ 3 =
7)) |
42 | 41 | notbid 317 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 3 =
7)) |
43 | 40, 42 | anbi12d 630 |
. . . . . . . . . . . . 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 12083 |
. . . . . . . . . . . . . . . 16
⊢ 1 <
5 |
46 | 30, 45 | ltneii 11018 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
5 |
47 | 46 | nesymi 3000 |
. . . . . . . . . . . . . 14
⊢ ¬ 5
= 1 |
48 | | 5re 11990 |
. . . . . . . . . . . . . . . 16
⊢ 5 ∈
ℝ |
49 | | 5lt7 12090 |
. . . . . . . . . . . . . . . 16
⊢ 5 <
7 |
50 | 48, 49 | ltneii 11018 |
. . . . . . . . . . . . . . 15
⊢ 5 ≠
7 |
51 | 50 | neii 2944 |
. . . . . . . . . . . . . 14
⊢ ¬ 5
= 7 |
52 | 47, 51 | pm3.2i 470 |
. . . . . . . . . . . . 13
⊢ (¬ 5
= 1 ∧ ¬ 5 = 7) |
53 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 1 ↔ 5 =
1)) |
54 | 53 | notbid 317 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 5 =
1)) |
55 | | eqeq1 2742 |
. . . . . . . . . . . . . . 15
⊢ ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 7 ↔ 5 =
7)) |
56 | 55 | notbid 317 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 5 =
7)) |
57 | 54, 56 | anbi12d 630 |
. . . . . . . . . . . . 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 853 |
. . . . . . . . . . 11
⊢ (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
60 | 59 | adantr 480 |
. . . . . . . . . 10
⊢ ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
61 | | ioran 980 |
. . . . . . . . . . 11
⊢ (¬
((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7) ↔ (¬
(𝑃 mod 8) = 1 ∧ ¬
(𝑃 mod 8) =
7)) |
62 | 61, 6 | xchnxbir 332 |
. . . . . . . . . 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 4467 |
. . . . . . . 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 453 |
. . . . 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 853 |
. . 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)) |