Proof of Theorem gcd0id
Step | Hyp | Ref
| Expression |
1 | | gcd0val 16056 |
. . . 4
⊢ (0 gcd 0)
= 0 |
2 | | oveq2 7221 |
. . . 4
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (0 gcd 0)) |
3 | | fveq2 6717 |
. . . . 5
⊢ (𝑁 = 0 → (abs‘𝑁) =
(abs‘0)) |
4 | | abs0 14849 |
. . . . 5
⊢
(abs‘0) = 0 |
5 | 3, 4 | eqtrdi 2794 |
. . . 4
⊢ (𝑁 = 0 → (abs‘𝑁) = 0) |
6 | 1, 2, 5 | 3eqtr4a 2804 |
. . 3
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (abs‘𝑁)) |
7 | 6 | adantl 485 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
8 | | 0z 12187 |
. . . . . . 7
⊢ 0 ∈
ℤ |
9 | | gcddvds 16062 |
. . . . . . 7
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → ((0 gcd 𝑁) ∥ 0 ∧ (0 gcd 𝑁) ∥ 𝑁)) |
10 | 8, 9 | mpan 690 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) ∥ 0 ∧ (0 gcd
𝑁) ∥ 𝑁)) |
11 | 10 | simprd 499 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∥ 𝑁) |
12 | 11 | adantr 484 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ∥ 𝑁) |
13 | | gcdcl 16065 |
. . . . . . . 8
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → (0 gcd 𝑁) ∈
ℕ0) |
14 | 8, 13 | mpan 690 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℕ0) |
15 | 14 | nn0zd 12280 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℤ) |
16 | | dvdsleabs 15872 |
. . . . . 6
⊢ (((0 gcd
𝑁) ∈ ℤ ∧
𝑁 ∈ ℤ ∧
𝑁 ≠ 0) → ((0 gcd
𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
17 | 15, 16 | syl3an1 1165 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
18 | 17 | 3anidm12 1421 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
19 | 12, 18 | mpd 15 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ≤ (abs‘𝑁)) |
20 | | zabscl 14877 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℤ) |
21 | | dvds0 15833 |
. . . . . . 7
⊢
((abs‘𝑁)
∈ ℤ → (abs‘𝑁) ∥ 0) |
22 | 20, 21 | syl 17 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥
0) |
23 | | iddvds 15831 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → 𝑁 ∥ 𝑁) |
24 | | absdvdsb 15836 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
25 | 24 | anidms 570 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
26 | 23, 25 | mpbid 235 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥ 𝑁) |
27 | 22, 26 | jca 515 |
. . . . 5
⊢ (𝑁 ∈ ℤ →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
28 | 27 | adantr 484 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
29 | | eqid 2737 |
. . . . . . . 8
⊢ 0 =
0 |
30 | 29 | biantrur 534 |
. . . . . . 7
⊢ (𝑁 = 0 ↔ (0 = 0 ∧ 𝑁 = 0)) |
31 | 30 | necon3abii 2987 |
. . . . . 6
⊢ (𝑁 ≠ 0 ↔ ¬ (0 = 0
∧ 𝑁 =
0)) |
32 | | dvdslegcd 16063 |
. . . . . . . . 9
⊢
((((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (0 = 0 ∧
𝑁 = 0)) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
33 | 32 | ex 416 |
. . . . . . . 8
⊢
(((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (¬ (0 = 0 ∧
𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
34 | 8, 33 | mp3an2 1451 |
. . . . . . 7
⊢
(((abs‘𝑁)
∈ ℤ ∧ 𝑁
∈ ℤ) → (¬ (0 = 0 ∧ 𝑁 = 0) → (((abs‘𝑁) ∥ 0 ∧ (abs‘𝑁) ∥ 𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
35 | 20, 34 | mpancom 688 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (¬ (0
= 0 ∧ 𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
36 | 31, 35 | syl5bi 245 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (𝑁 ≠ 0 →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
37 | 36 | imp 410 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
38 | 28, 37 | mpd 15 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (abs‘𝑁) ≤ (0 gcd 𝑁)) |
39 | 15 | zred 12282 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℝ) |
40 | 20 | zred 12282 |
. . . . 5
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℝ) |
41 | 39, 40 | letri3d 10974 |
. . . 4
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
42 | 41 | adantr 484 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
43 | 19, 38, 42 | mpbir2and 713 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
44 | 7, 43 | pm2.61dane 3029 |
1
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) = (abs‘𝑁)) |