Proof of Theorem gcd0id
Step | Hyp | Ref
| Expression |
1 | | gcd0val 11915 |
. . . 4
⊢ (0 gcd 0)
= 0 |
2 | | oveq2 5861 |
. . . 4
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (0 gcd 0)) |
3 | | fveq2 5496 |
. . . . 5
⊢ (𝑁 = 0 → (abs‘𝑁) =
(abs‘0)) |
4 | | abs0 11022 |
. . . . 5
⊢
(abs‘0) = 0 |
5 | 3, 4 | eqtrdi 2219 |
. . . 4
⊢ (𝑁 = 0 → (abs‘𝑁) = 0) |
6 | 1, 2, 5 | 3eqtr4a 2229 |
. . 3
⊢ (𝑁 = 0 → (0 gcd 𝑁) = (abs‘𝑁)) |
7 | 6 | adantl 275 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
8 | | df-ne 2341 |
. . 3
⊢ (𝑁 ≠ 0 ↔ ¬ 𝑁 = 0) |
9 | | 0z 9223 |
. . . . . . . 8
⊢ 0 ∈
ℤ |
10 | | gcddvds 11918 |
. . . . . . . 8
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → ((0 gcd 𝑁) ∥ 0 ∧ (0 gcd 𝑁) ∥ 𝑁)) |
11 | 9, 10 | mpan 422 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → ((0 gcd
𝑁) ∥ 0 ∧ (0 gcd
𝑁) ∥ 𝑁)) |
12 | 11 | simprd 113 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∥ 𝑁) |
13 | 12 | adantr 274 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ∥ 𝑁) |
14 | | gcdcl 11921 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → (0 gcd 𝑁) ∈
ℕ0) |
15 | 9, 14 | mpan 422 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℕ0) |
16 | 15 | nn0zd 9332 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℤ) |
17 | | dvdsleabs 11805 |
. . . . . . 7
⊢ (((0 gcd
𝑁) ∈ ℤ ∧
𝑁 ∈ ℤ ∧
𝑁 ≠ 0) → ((0 gcd
𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
18 | 16, 17 | syl3an1 1266 |
. . . . . 6
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
19 | 18 | 3anidm12 1290 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → ((0 gcd 𝑁) ∥ 𝑁 → (0 gcd 𝑁) ≤ (abs‘𝑁))) |
20 | 13, 19 | mpd 13 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) ≤ (abs‘𝑁)) |
21 | | zabscl 11050 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℤ) |
22 | | dvds0 11768 |
. . . . . . . 8
⊢
((abs‘𝑁)
∈ ℤ → (abs‘𝑁) ∥ 0) |
23 | 21, 22 | syl 14 |
. . . . . . 7
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∥
0) |
24 | | iddvds 11766 |
. . . . . . . 8
⊢ (𝑁 ∈ ℤ → 𝑁 ∥ 𝑁) |
25 | | absdvdsb 11771 |
. . . . . . . . 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 2170 |
. . . . . . . . 9
⊢ 0 =
0 |
31 | 30 | biantrur 301 |
. . . . . . . 8
⊢ (𝑁 = 0 ↔ (0 = 0 ∧ 𝑁 = 0)) |
32 | 31 | necon3abii 2376 |
. . . . . . 7
⊢ (𝑁 ≠ 0 ↔ ¬ (0 = 0
∧ 𝑁 =
0)) |
33 | | dvdslegcd 11919 |
. . . . . . . . . 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 1320 |
. . . . . . . 8
⊢
(((abs‘𝑁)
∈ ℤ ∧ 𝑁
∈ ℤ) → (¬ (0 = 0 ∧ 𝑁 = 0) → (((abs‘𝑁) ∥ 0 ∧ (abs‘𝑁) ∥ 𝑁) → (abs‘𝑁) ≤ (0 gcd 𝑁)))) |
36 | 21, 35 | mpancom 420 |
. . . . . . 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 9334 |
. . . . . 6
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) ∈
ℝ) |
41 | 21 | zred 9334 |
. . . . . 6
⊢ (𝑁 ∈ ℤ →
(abs‘𝑁) ∈
ℝ) |
42 | 40, 41 | letri3d 8035 |
. . . . 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 939 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
45 | 8, 44 | sylan2br 286 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ ¬
𝑁 = 0) → (0 gcd 𝑁) = (abs‘𝑁)) |
46 | | zdceq 9287 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 0 ∈
ℤ) → DECID 𝑁 = 0) |
47 | 9, 46 | mpan2 423 |
. . 3
⊢ (𝑁 ∈ ℤ →
DECID 𝑁 =
0) |
48 | | exmiddc 831 |
. . 3
⊢
(DECID 𝑁 = 0 → (𝑁 = 0 ∨ ¬ 𝑁 = 0)) |
49 | 47, 48 | syl 14 |
. 2
⊢ (𝑁 ∈ ℤ → (𝑁 = 0 ∨ ¬ 𝑁 = 0)) |
50 | 7, 45, 49 | mpjaodan 793 |
1
⊢ (𝑁 ∈ ℤ → (0 gcd
𝑁) = (abs‘𝑁)) |