Proof of Theorem gcd0id
Step | Hyp | Ref
| Expression |
1 | | gcd0val 11893 |
. . . 4
⊢ (0 gcd 0)
= 0 |
2 | | oveq2 5850 |
. . . 4
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (0 gcd 0)) |
3 | | fveq2 5486 |
. . . . 5
⊢ (𝑁 = 0 → (abs‘𝑁) =
(abs‘0)) |
4 | | abs0 11000 |
. . . . 5
⊢
(abs‘0) = 0 |
5 | 3, 4 | eqtrdi 2215 |
. . . 4
⊢ (𝑁 = 0 → (abs‘𝑁) = 0) |
6 | 1, 2, 5 | 3eqtr4a 2225 |
. . 3
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (abs‘𝑁)) |
7 | 6 | adantl 275 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
8 | | df-ne 2337 |
. . 3
⊢ (𝑁 ≠ 0 ↔ ¬ 𝑁 = 0) |
9 | | 0z 9202 |
. . . . . . . 8
⊢ 0 ∈
ℤ |
10 | | gcddvds 11896 |
. . . . . . . 8
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → ((0 gcd 𝑁) ∥ 0 ∧ (0 gcd 𝑁) ∥ 𝑁)) |
11 | 9, 10 | mpan 421 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) ∥ 0 ∧ (0 gcd
𝑁) ∥ 𝑁)) |
12 | 11 | simprd 113 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∥ 𝑁) |
13 | 12 | adantr 274 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ∥ 𝑁) |
14 | | gcdcl 11899 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → (0 gcd 𝑁) ∈
ℕ0) |
15 | 9, 14 | mpan 421 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℕ0) |
16 | 15 | nn0zd 9311 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℤ) |
17 | | dvdsleabs 11783 |
. . . . . . 7
⊢ (((0 gcd
𝑁) ∈ ℤ ∧
𝑁 ∈ ℤ ∧
𝑁 ≠ 0) → ((0 gcd
𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
18 | 16, 17 | syl3an1 1261 |
. . . . . 6
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
19 | 18 | 3anidm12 1285 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
20 | 13, 19 | mpd 13 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ≤ (abs‘𝑁)) |
21 | | zabscl 11028 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℤ) |
22 | | dvds0 11746 |
. . . . . . . 8
⊢
((abs‘𝑁)
∈ ℤ → (abs‘𝑁) ∥ 0) |
23 | 21, 22 | syl 14 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥
0) |
24 | | iddvds 11744 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ → 𝑁 ∥ 𝑁) |
25 | | absdvdsb 11749 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
26 | 25 | anidms 395 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ → (𝑁 ∥ 𝑁 ↔ (abs‘𝑁) ∥ 𝑁)) |
27 | 24, 26 | mpbid 146 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥ 𝑁) |
28 | 23, 27 | jca 304 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
29 | 28 | adantr 274 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁)) |
30 | | eqid 2165 |
. . . . . . . . 9
⊢ 0 =
0 |
31 | 30 | biantrur 301 |
. . . . . . . 8
⊢ (𝑁 = 0 ↔ (0 = 0 ∧ 𝑁 = 0)) |
32 | 31 | necon3abii 2372 |
. . . . . . 7
⊢ (𝑁 ≠ 0 ↔ ¬ (0 = 0
∧ 𝑁 =
0)) |
33 | | dvdslegcd 11897 |
. . . . . . . . . 10
⊢
((((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (0 = 0 ∧
𝑁 = 0)) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
34 | 33 | ex 114 |
. . . . . . . . 9
⊢
(((abs‘𝑁)
∈ ℤ ∧ 0 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (¬ (0 = 0 ∧
𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
35 | 9, 34 | mp3an2 1315 |
. . . . . . . 8
⊢
(((abs‘𝑁)
∈ ℤ ∧ 𝑁
∈ ℤ) → (¬ (0 = 0 ∧ 𝑁 = 0) → (((abs‘𝑁) ∥ 0 ∧ (abs‘𝑁) ∥ 𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
36 | 21, 35 | mpancom 419 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (¬ (0
= 0 ∧ 𝑁 = 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
37 | 32, 36 | syl5bi 151 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (𝑁 ≠ 0 →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
38 | 37 | imp 123 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) →
(((abs‘𝑁) ∥ 0
∧ (abs‘𝑁) ∥
𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁))) |
39 | 29, 38 | mpd 13 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (abs‘𝑁) ≤ (0 gcd 𝑁)) |
40 | 16 | zred 9313 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℝ) |
41 | 21 | zred 9313 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℝ) |
42 | 40, 41 | letri3d 8014 |
. . . . 5
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
43 | 42 | adantr 274 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) = (abs‘𝑁) ↔ ((0 gcd 𝑁) ≤ (abs‘𝑁) ∧ (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
44 | 20, 39, 43 | mpbir2and 934 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
45 | 8, 44 | sylan2br 286 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ ¬
𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
46 | | zdceq 9266 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 0 ∈
ℤ) → DECID 𝑁 = 0) |
47 | 9, 46 | mpan2 422 |
. . 3
⊢ (𝑁 ∈ ℤ →
DECID 𝑁 =
0) |
48 | | exmiddc 826 |
. . 3
⊢
(DECID 𝑁 = 0 → (𝑁 = 0 ∨ ¬ 𝑁 = 0)) |
49 | 47, 48 | syl 14 |
. 2
⊢ (𝑁 ∈ ℤ → (𝑁 = 0 ∨ ¬ 𝑁 = 0)) |
50 | 7, 45, 49 | mpjaodan 788 |
1
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) = (abs‘𝑁)) |