Proof of Theorem 2sqlem8a
Step | Hyp | Ref
| Expression |
1 | | 2sqlem8.1 |
. . . 4
⊢ (𝜑 → 𝐴 ∈ ℤ) |
2 | | 2sqlem8.m |
. . . . . 6
⊢ (𝜑 → 𝑀 ∈
(ℤ≥‘2)) |
3 | | eluz2b3 12662 |
. . . . . 6
⊢ (𝑀 ∈
(ℤ≥‘2) ↔ (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
4 | 2, 3 | sylib 217 |
. . . . 5
⊢ (𝜑 → (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
5 | 4 | simpld 495 |
. . . 4
⊢ (𝜑 → 𝑀 ∈ ℕ) |
6 | | 2sqlem8.c |
. . . 4
⊢ 𝐶 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
7 | 1, 5, 6 | 4sqlem5 16643 |
. . 3
⊢ (𝜑 → (𝐶 ∈ ℤ ∧ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
8 | 7 | simpld 495 |
. 2
⊢ (𝜑 → 𝐶 ∈ ℤ) |
9 | | 2sqlem8.2 |
. . . 4
⊢ (𝜑 → 𝐵 ∈ ℤ) |
10 | | 2sqlem8.d |
. . . 4
⊢ 𝐷 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
11 | 9, 5, 10 | 4sqlem5 16643 |
. . 3
⊢ (𝜑 → (𝐷 ∈ ℤ ∧ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
12 | 11 | simpld 495 |
. 2
⊢ (𝜑 → 𝐷 ∈ ℤ) |
13 | 4 | simprd 496 |
. . . 4
⊢ (𝜑 → 𝑀 ≠ 1) |
14 | | simpr 485 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝐶↑2) = 0) → (𝐶↑2) = 0) |
15 | 1, 5, 6, 14 | 4sqlem9 16647 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝐶↑2) = 0) → (𝑀↑2) ∥ (𝐴↑2)) |
16 | 15 | ex 413 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶↑2) = 0 → (𝑀↑2) ∥ (𝐴↑2))) |
17 | | eluzelz 12592 |
. . . . . . . . . 10
⊢ (𝑀 ∈
(ℤ≥‘2) → 𝑀 ∈ ℤ) |
18 | 2, 17 | syl 17 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 ∈ ℤ) |
19 | | dvdssq 16272 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (𝑀 ∥ 𝐴 ↔ (𝑀↑2) ∥ (𝐴↑2))) |
20 | 18, 1, 19 | syl2anc 584 |
. . . . . . . 8
⊢ (𝜑 → (𝑀 ∥ 𝐴 ↔ (𝑀↑2) ∥ (𝐴↑2))) |
21 | 16, 20 | sylibrd 258 |
. . . . . . 7
⊢ (𝜑 → ((𝐶↑2) = 0 → 𝑀 ∥ 𝐴)) |
22 | | simpr 485 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝐷↑2) = 0) → (𝐷↑2) = 0) |
23 | 9, 5, 10, 22 | 4sqlem9 16647 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝐷↑2) = 0) → (𝑀↑2) ∥ (𝐵↑2)) |
24 | 23 | ex 413 |
. . . . . . . 8
⊢ (𝜑 → ((𝐷↑2) = 0 → (𝑀↑2) ∥ (𝐵↑2))) |
25 | | dvdssq 16272 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝑀 ∥ 𝐵 ↔ (𝑀↑2) ∥ (𝐵↑2))) |
26 | 18, 9, 25 | syl2anc 584 |
. . . . . . . 8
⊢ (𝜑 → (𝑀 ∥ 𝐵 ↔ (𝑀↑2) ∥ (𝐵↑2))) |
27 | 24, 26 | sylibrd 258 |
. . . . . . 7
⊢ (𝜑 → ((𝐷↑2) = 0 → 𝑀 ∥ 𝐵)) |
28 | | 2sqlem8.3 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐴 gcd 𝐵) = 1) |
29 | | ax-1ne0 10940 |
. . . . . . . . . . . 12
⊢ 1 ≠
0 |
30 | 29 | a1i 11 |
. . . . . . . . . . 11
⊢ (𝜑 → 1 ≠ 0) |
31 | 28, 30 | eqnetrd 3011 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐴 gcd 𝐵) ≠ 0) |
32 | 31 | neneqd 2948 |
. . . . . . . . 9
⊢ (𝜑 → ¬ (𝐴 gcd 𝐵) = 0) |
33 | | gcdeq0 16224 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
34 | 1, 9, 33 | syl2anc 584 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
35 | 32, 34 | mtbid 324 |
. . . . . . . 8
⊢ (𝜑 → ¬ (𝐴 = 0 ∧ 𝐵 = 0)) |
36 | | dvdslegcd 16211 |
. . . . . . . 8
⊢ (((𝑀 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ¬
(𝐴 = 0 ∧ 𝐵 = 0)) → ((𝑀 ∥ 𝐴 ∧ 𝑀 ∥ 𝐵) → 𝑀 ≤ (𝐴 gcd 𝐵))) |
37 | 18, 1, 9, 35, 36 | syl31anc 1372 |
. . . . . . 7
⊢ (𝜑 → ((𝑀 ∥ 𝐴 ∧ 𝑀 ∥ 𝐵) → 𝑀 ≤ (𝐴 gcd 𝐵))) |
38 | 21, 27, 37 | syl2and 608 |
. . . . . 6
⊢ (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) → 𝑀 ≤ (𝐴 gcd 𝐵))) |
39 | 28 | breq2d 5086 |
. . . . . . 7
⊢ (𝜑 → (𝑀 ≤ (𝐴 gcd 𝐵) ↔ 𝑀 ≤ 1)) |
40 | | nnle1eq1 12003 |
. . . . . . . 8
⊢ (𝑀 ∈ ℕ → (𝑀 ≤ 1 ↔ 𝑀 = 1)) |
41 | 5, 40 | syl 17 |
. . . . . . 7
⊢ (𝜑 → (𝑀 ≤ 1 ↔ 𝑀 = 1)) |
42 | 39, 41 | bitrd 278 |
. . . . . 6
⊢ (𝜑 → (𝑀 ≤ (𝐴 gcd 𝐵) ↔ 𝑀 = 1)) |
43 | 38, 42 | sylibd 238 |
. . . . 5
⊢ (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) → 𝑀 = 1)) |
44 | 43 | necon3ad 2956 |
. . . 4
⊢ (𝜑 → (𝑀 ≠ 1 → ¬ ((𝐶↑2) = 0 ∧ (𝐷↑2) = 0))) |
45 | 13, 44 | mpd 15 |
. . 3
⊢ (𝜑 → ¬ ((𝐶↑2) = 0 ∧ (𝐷↑2) = 0)) |
46 | 8 | zcnd 12427 |
. . . . 5
⊢ (𝜑 → 𝐶 ∈ ℂ) |
47 | | sqeq0 13840 |
. . . . 5
⊢ (𝐶 ∈ ℂ → ((𝐶↑2) = 0 ↔ 𝐶 = 0)) |
48 | 46, 47 | syl 17 |
. . . 4
⊢ (𝜑 → ((𝐶↑2) = 0 ↔ 𝐶 = 0)) |
49 | 12 | zcnd 12427 |
. . . . 5
⊢ (𝜑 → 𝐷 ∈ ℂ) |
50 | | sqeq0 13840 |
. . . . 5
⊢ (𝐷 ∈ ℂ → ((𝐷↑2) = 0 ↔ 𝐷 = 0)) |
51 | 49, 50 | syl 17 |
. . . 4
⊢ (𝜑 → ((𝐷↑2) = 0 ↔ 𝐷 = 0)) |
52 | 48, 51 | anbi12d 631 |
. . 3
⊢ (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) ↔ (𝐶 = 0 ∧ 𝐷 = 0))) |
53 | 45, 52 | mtbid 324 |
. 2
⊢ (𝜑 → ¬ (𝐶 = 0 ∧ 𝐷 = 0)) |
54 | | gcdn0cl 16209 |
. 2
⊢ (((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) ∧ ¬
(𝐶 = 0 ∧ 𝐷 = 0)) → (𝐶 gcd 𝐷) ∈ ℕ) |
55 | 8, 12, 53, 54 | syl21anc 835 |
1
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℕ) |