Proof of Theorem gcd0id
Step | Hyp | Ref
| Expression |
1 | | gcd0val 16204 |
. . . 4
⊢ (0 gcd 0)
= 0 |
2 | | oveq2 7283 |
. . . 4
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (0 gcd 0)) |
3 | | fveq2 6774 |
. . . . 5
⊢ (𝑁 = 0 → (abs‘𝑁) =
(abs‘0)) |
4 | | abs0 14997 |
. . . . 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 482 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
8 | | 0z 12330 |
. . . . . . 7
⊢ 0 ∈
ℤ |
9 | | gcddvds 16210 |
. . . . . . 7
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → ((0 gcd 𝑁) ∥ 0 ∧ (0 gcd 𝑁) ∥ 𝑁)) |
10 | 8, 9 | mpan 687 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) ∥ 0 ∧ (0 gcd
𝑁) ∥ 𝑁)) |
11 | 10 | simprd 496 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∥ 𝑁) |
12 | 11 | adantr 481 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ∥ 𝑁) |
13 | | gcdcl 16213 |
. . . . . . . 8
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → (0 gcd 𝑁) ∈
ℕ0) |
14 | 8, 13 | mpan 687 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℕ0) |
15 | 14 | nn0zd 12424 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℤ) |
16 | | dvdsleabs 16020 |
. . . . . 6
⊢ (((0 gcd
𝑁) ∈ ℤ ∧
𝑁 ∈ ℤ ∧
𝑁 ≠ 0) → ((0 gcd
𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
17 | 15, 16 | syl3an1 1162 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
18 | 17 | 3anidm12 1418 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
19 | 12, 18 | mpd 15 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ≤ (abs‘𝑁)) |
20 | | zabscl 15025 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℤ) |
21 | | dvds0 15981 |
. . . . . . 7
⊢
((abs‘𝑁)
∈ ℤ → (abs‘𝑁) ∥ 0) |
22 | 20, 21 | syl 17 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥
0) |
23 | | iddvds 15979 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → 𝑁 ∥ 𝑁) |
24 | | absdvdsb 15984 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
25 | 24 | anidms 567 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
26 | 23, 25 | mpbid 231 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥ 𝑁) |
27 | 22, 26 | jca 512 |
. . . . 5
⊢ (𝑁 ∈ ℤ →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
28 | 27 | adantr 481 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
29 | | eqid 2738 |
. . . . . . . 8
⊢ 0 =
0 |
30 | 29 | biantrur 531 |
. . . . . . 7
⊢ (𝑁 = 0 ↔ (0 = 0 ∧ 𝑁 = 0)) |
31 | 30 | necon3abii 2990 |
. . . . . 6
⊢ (𝑁 ≠ 0 ↔ ¬ (0 = 0
∧ 𝑁 =
0)) |
32 | | dvdslegcd 16211 |
. . . . . . . . 9
⊢
((((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (0 = 0 ∧
𝑁 = 0)) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
33 | 32 | ex 413 |
. . . . . . . 8
⊢
(((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (¬ (0 = 0 ∧
𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
34 | 8, 33 | mp3an2 1448 |
. . . . . . 7
⊢
(((abs‘𝑁)
∈ ℤ ∧ 𝑁
∈ ℤ) → (¬ (0 = 0 ∧ 𝑁 = 0) → (((abs‘𝑁) ∥ 0 ∧ (abs‘𝑁) ∥ 𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
35 | 20, 34 | mpancom 685 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (¬ (0
= 0 ∧ 𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
36 | 31, 35 | syl5bi 241 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (𝑁 ≠ 0 →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
37 | 36 | imp 407 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
38 | 28, 37 | mpd 15 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (abs‘𝑁) ≤ (0 gcd 𝑁)) |
39 | 15 | zred 12426 |
. . . . 5
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℝ) |
40 | 20 | zred 12426 |
. . . . 5
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℝ) |
41 | 39, 40 | letri3d 11117 |
. . . 4
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
42 | 41 | adantr 481 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
43 | 19, 38, 42 | mpbir2and 710 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
44 | 7, 43 | pm2.61dane 3032 |
1
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) = (abs‘𝑁)) |