Proof of Theorem sqgcd
Step | Hyp | Ref
| Expression |
1 | | gcdnncl 15950 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∈ ℕ) |
2 | 1 | nnsqcld 13697 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) ∈ ℕ) |
3 | 2 | nncnd 11732 |
. . 3
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) ∈ ℂ) |
4 | 3 | mulid1d 10736 |
. 2
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀 gcd 𝑁)↑2) · 1) = ((𝑀 gcd 𝑁)↑2)) |
5 | | nnsqcl 13585 |
. . . . . . 7
⊢ (𝑀 ∈ ℕ → (𝑀↑2) ∈
ℕ) |
6 | 5 | nnzd 12167 |
. . . . . 6
⊢ (𝑀 ∈ ℕ → (𝑀↑2) ∈
ℤ) |
7 | 6 | adantr 484 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀↑2) ∈
ℤ) |
8 | | nnsqcl 13585 |
. . . . . . 7
⊢ (𝑁 ∈ ℕ → (𝑁↑2) ∈
ℕ) |
9 | 8 | nnzd 12167 |
. . . . . 6
⊢ (𝑁 ∈ ℕ → (𝑁↑2) ∈
ℤ) |
10 | 9 | adantl 485 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑁↑2) ∈
ℤ) |
11 | | nnz 12085 |
. . . . . . . 8
⊢ (𝑀 ∈ ℕ → 𝑀 ∈
ℤ) |
12 | | nnz 12085 |
. . . . . . . 8
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℤ) |
13 | | gcddvds 15946 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)) |
14 | 11, 12, 13 | syl2an 599 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)) |
15 | 14 | simpld 498 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∥ 𝑀) |
16 | 1 | nnzd 12167 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∈ ℤ) |
17 | 11 | adantr 484 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑀 ∈
ℤ) |
18 | | dvdssqim 16000 |
. . . . . . 7
⊢ (((𝑀 gcd 𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 → ((𝑀 gcd 𝑁)↑2) ∥ (𝑀↑2))) |
19 | 16, 17, 18 | syl2anc 587 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) ∥ 𝑀 → ((𝑀 gcd 𝑁)↑2) ∥ (𝑀↑2))) |
20 | 15, 19 | mpd 15 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) ∥ (𝑀↑2)) |
21 | 14 | simprd 499 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∥ 𝑁) |
22 | 12 | adantl 485 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑁 ∈
ℤ) |
23 | | dvdssqim 16000 |
. . . . . . 7
⊢ (((𝑀 gcd 𝑁) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑁 → ((𝑀 gcd 𝑁)↑2) ∥ (𝑁↑2))) |
24 | 16, 22, 23 | syl2anc 587 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) ∥ 𝑁 → ((𝑀 gcd 𝑁)↑2) ∥ (𝑁↑2))) |
25 | 21, 24 | mpd 15 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) ∥ (𝑁↑2)) |
26 | | gcddiv 15995 |
. . . . 5
⊢ ((((𝑀↑2) ∈ ℤ ∧
(𝑁↑2) ∈ ℤ
∧ ((𝑀 gcd 𝑁)↑2) ∈ ℕ) ∧
(((𝑀 gcd 𝑁)↑2) ∥ (𝑀↑2) ∧ ((𝑀 gcd 𝑁)↑2) ∥ (𝑁↑2))) → (((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = (((𝑀↑2) / ((𝑀 gcd 𝑁)↑2)) gcd ((𝑁↑2) / ((𝑀 gcd 𝑁)↑2)))) |
27 | 7, 10, 2, 20, 25, 26 | syl32anc 1379 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = (((𝑀↑2) / ((𝑀 gcd 𝑁)↑2)) gcd ((𝑁↑2) / ((𝑀 gcd 𝑁)↑2)))) |
28 | | nncn 11724 |
. . . . . . 7
⊢ (𝑀 ∈ ℕ → 𝑀 ∈
ℂ) |
29 | 28 | adantr 484 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑀 ∈
ℂ) |
30 | 1 | nncnd 11732 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∈ ℂ) |
31 | 1 | nnne0d 11766 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ≠ 0) |
32 | 29, 30, 31 | sqdivd 13615 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 / (𝑀 gcd 𝑁))↑2) = ((𝑀↑2) / ((𝑀 gcd 𝑁)↑2))) |
33 | | nncn 11724 |
. . . . . . 7
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℂ) |
34 | 33 | adantl 485 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑁 ∈
ℂ) |
35 | 34, 30, 31 | sqdivd 13615 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑁 / (𝑀 gcd 𝑁))↑2) = ((𝑁↑2) / ((𝑀 gcd 𝑁)↑2))) |
36 | 32, 35 | oveq12d 7188 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀 / (𝑀 gcd 𝑁))↑2) gcd ((𝑁 / (𝑀 gcd 𝑁))↑2)) = (((𝑀↑2) / ((𝑀 gcd 𝑁)↑2)) gcd ((𝑁↑2) / ((𝑀 gcd 𝑁)↑2)))) |
37 | | gcddiv 15995 |
. . . . . . 7
⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑀 gcd 𝑁) ∈ ℕ) ∧ ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)) → ((𝑀 gcd 𝑁) / (𝑀 gcd 𝑁)) = ((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁)))) |
38 | 17, 22, 1, 14, 37 | syl31anc 1374 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) / (𝑀 gcd 𝑁)) = ((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁)))) |
39 | 30, 31 | dividd 11492 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) / (𝑀 gcd 𝑁)) = 1) |
40 | 38, 39 | eqtr3d 2775 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁))) = 1) |
41 | | dvdsval2 15702 |
. . . . . . . . 9
⊢ (((𝑀 gcd 𝑁) ∈ ℤ ∧ (𝑀 gcd 𝑁) ≠ 0 ∧ 𝑀 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ↔ (𝑀 / (𝑀 gcd 𝑁)) ∈ ℤ)) |
42 | 16, 31, 17, 41 | syl3anc 1372 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ↔ (𝑀 / (𝑀 gcd 𝑁)) ∈ ℤ)) |
43 | 15, 42 | mpbid 235 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 / (𝑀 gcd 𝑁)) ∈ ℤ) |
44 | | nnre 11723 |
. . . . . . . . 9
⊢ (𝑀 ∈ ℕ → 𝑀 ∈
ℝ) |
45 | 44 | adantr 484 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑀 ∈
ℝ) |
46 | 1 | nnred 11731 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∈ ℝ) |
47 | | nngt0 11747 |
. . . . . . . . 9
⊢ (𝑀 ∈ ℕ → 0 <
𝑀) |
48 | 47 | adantr 484 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 0 <
𝑀) |
49 | 1 | nngt0d 11765 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 0 <
(𝑀 gcd 𝑁)) |
50 | 45, 46, 48, 49 | divgt0d 11653 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 0 <
(𝑀 / (𝑀 gcd 𝑁))) |
51 | | elnnz 12072 |
. . . . . . 7
⊢ ((𝑀 / (𝑀 gcd 𝑁)) ∈ ℕ ↔ ((𝑀 / (𝑀 gcd 𝑁)) ∈ ℤ ∧ 0 < (𝑀 / (𝑀 gcd 𝑁)))) |
52 | 43, 50, 51 | sylanbrc 586 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 / (𝑀 gcd 𝑁)) ∈ ℕ) |
53 | | dvdsval2 15702 |
. . . . . . . . 9
⊢ (((𝑀 gcd 𝑁) ∈ ℤ ∧ (𝑀 gcd 𝑁) ≠ 0 ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑁 ↔ (𝑁 / (𝑀 gcd 𝑁)) ∈ ℤ)) |
54 | 16, 31, 22, 53 | syl3anc 1372 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁) ∥ 𝑁 ↔ (𝑁 / (𝑀 gcd 𝑁)) ∈ ℤ)) |
55 | 21, 54 | mpbid 235 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑁 / (𝑀 gcd 𝑁)) ∈ ℤ) |
56 | | nnre 11723 |
. . . . . . . . 9
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℝ) |
57 | 56 | adantl 485 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 𝑁 ∈
ℝ) |
58 | | nngt0 11747 |
. . . . . . . . 9
⊢ (𝑁 ∈ ℕ → 0 <
𝑁) |
59 | 58 | adantl 485 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 0 <
𝑁) |
60 | 57, 46, 59, 49 | divgt0d 11653 |
. . . . . . 7
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → 0 <
(𝑁 / (𝑀 gcd 𝑁))) |
61 | | elnnz 12072 |
. . . . . . 7
⊢ ((𝑁 / (𝑀 gcd 𝑁)) ∈ ℕ ↔ ((𝑁 / (𝑀 gcd 𝑁)) ∈ ℤ ∧ 0 < (𝑁 / (𝑀 gcd 𝑁)))) |
62 | 55, 60, 61 | sylanbrc 586 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑁 / (𝑀 gcd 𝑁)) ∈ ℕ) |
63 | | 2nn 11789 |
. . . . . . 7
⊢ 2 ∈
ℕ |
64 | | rppwr 16005 |
. . . . . . 7
⊢ (((𝑀 / (𝑀 gcd 𝑁)) ∈ ℕ ∧ (𝑁 / (𝑀 gcd 𝑁)) ∈ ℕ ∧ 2 ∈ ℕ)
→ (((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁))) = 1 → (((𝑀 / (𝑀 gcd 𝑁))↑2) gcd ((𝑁 / (𝑀 gcd 𝑁))↑2)) = 1)) |
65 | 63, 64 | mp3an3 1451 |
. . . . . 6
⊢ (((𝑀 / (𝑀 gcd 𝑁)) ∈ ℕ ∧ (𝑁 / (𝑀 gcd 𝑁)) ∈ ℕ) → (((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁))) = 1 → (((𝑀 / (𝑀 gcd 𝑁))↑2) gcd ((𝑁 / (𝑀 gcd 𝑁))↑2)) = 1)) |
66 | 52, 62, 65 | syl2anc 587 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀 / (𝑀 gcd 𝑁)) gcd (𝑁 / (𝑀 gcd 𝑁))) = 1 → (((𝑀 / (𝑀 gcd 𝑁))↑2) gcd ((𝑁 / (𝑀 gcd 𝑁))↑2)) = 1)) |
67 | 40, 66 | mpd 15 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀 / (𝑀 gcd 𝑁))↑2) gcd ((𝑁 / (𝑀 gcd 𝑁))↑2)) = 1) |
68 | 27, 36, 67 | 3eqtr2d 2779 |
. . 3
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = 1) |
69 | 6, 9 | anim12i 616 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀↑2) ∈ ℤ ∧
(𝑁↑2) ∈
ℤ)) |
70 | 5 | nnne0d 11766 |
. . . . . . . . 9
⊢ (𝑀 ∈ ℕ → (𝑀↑2) ≠
0) |
71 | 70 | neneqd 2939 |
. . . . . . . 8
⊢ (𝑀 ∈ ℕ → ¬
(𝑀↑2) =
0) |
72 | 71 | intnanrd 493 |
. . . . . . 7
⊢ (𝑀 ∈ ℕ → ¬
((𝑀↑2) = 0 ∧
(𝑁↑2) =
0)) |
73 | 72 | adantr 484 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ¬
((𝑀↑2) = 0 ∧
(𝑁↑2) =
0)) |
74 | | gcdn0cl 15945 |
. . . . . 6
⊢ ((((𝑀↑2) ∈ ℤ ∧
(𝑁↑2) ∈ ℤ)
∧ ¬ ((𝑀↑2) = 0
∧ (𝑁↑2) = 0))
→ ((𝑀↑2) gcd
(𝑁↑2)) ∈
ℕ) |
75 | 69, 73, 74 | syl2anc 587 |
. . . . 5
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀↑2) gcd (𝑁↑2)) ∈ ℕ) |
76 | 75 | nncnd 11732 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀↑2) gcd (𝑁↑2)) ∈ ℂ) |
77 | 2 | nnne0d 11766 |
. . . 4
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) ≠ 0) |
78 | | ax-1cn 10673 |
. . . . 5
⊢ 1 ∈
ℂ |
79 | | divmul 11379 |
. . . . 5
⊢ ((((𝑀↑2) gcd (𝑁↑2)) ∈ ℂ ∧ 1 ∈
ℂ ∧ (((𝑀 gcd
𝑁)↑2) ∈ ℂ
∧ ((𝑀 gcd 𝑁)↑2) ≠ 0)) →
((((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = 1 ↔ (((𝑀 gcd 𝑁)↑2) · 1) = ((𝑀↑2) gcd (𝑁↑2)))) |
80 | 78, 79 | mp3an2 1450 |
. . . 4
⊢ ((((𝑀↑2) gcd (𝑁↑2)) ∈ ℂ ∧ (((𝑀 gcd 𝑁)↑2) ∈ ℂ ∧ ((𝑀 gcd 𝑁)↑2) ≠ 0)) → ((((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = 1 ↔ (((𝑀 gcd 𝑁)↑2) · 1) = ((𝑀↑2) gcd (𝑁↑2)))) |
81 | 76, 3, 77, 80 | syl12anc 836 |
. . 3
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) →
((((𝑀↑2) gcd (𝑁↑2)) / ((𝑀 gcd 𝑁)↑2)) = 1 ↔ (((𝑀 gcd 𝑁)↑2) · 1) = ((𝑀↑2) gcd (𝑁↑2)))) |
82 | 68, 81 | mpbid 235 |
. 2
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (((𝑀 gcd 𝑁)↑2) · 1) = ((𝑀↑2) gcd (𝑁↑2))) |
83 | 4, 82 | eqtr3d 2775 |
1
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝑀 gcd 𝑁)↑2) = ((𝑀↑2) gcd (𝑁↑2))) |