Proof of Theorem nn0gcdsq
Step | Hyp | Ref
| Expression |
1 | | elnn0 12165 |
. 2
⊢ (𝐴 ∈ ℕ0
↔ (𝐴 ∈ ℕ
∨ 𝐴 =
0)) |
2 | | elnn0 12165 |
. 2
⊢ (𝐵 ∈ ℕ0
↔ (𝐵 ∈ ℕ
∨ 𝐵 =
0)) |
3 | | sqgcd 16198 |
. . 3
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |
4 | | nncn 11911 |
. . . . . . 7
⊢ (𝐵 ∈ ℕ → 𝐵 ∈
ℂ) |
5 | | abssq 14946 |
. . . . . . 7
⊢ (𝐵 ∈ ℂ →
((abs‘𝐵)↑2) =
(abs‘(𝐵↑2))) |
6 | 4, 5 | syl 17 |
. . . . . 6
⊢ (𝐵 ∈ ℕ →
((abs‘𝐵)↑2) =
(abs‘(𝐵↑2))) |
7 | | nnz 12272 |
. . . . . . . 8
⊢ (𝐵 ∈ ℕ → 𝐵 ∈
ℤ) |
8 | | gcd0id 16154 |
. . . . . . . 8
⊢ (𝐵 ∈ ℤ → (0 gcd
𝐵) = (abs‘𝐵)) |
9 | 7, 8 | syl 17 |
. . . . . . 7
⊢ (𝐵 ∈ ℕ → (0 gcd
𝐵) = (abs‘𝐵)) |
10 | 9 | oveq1d 7270 |
. . . . . 6
⊢ (𝐵 ∈ ℕ → ((0 gcd
𝐵)↑2) =
((abs‘𝐵)↑2)) |
11 | | sq0 13837 |
. . . . . . . . 9
⊢
(0↑2) = 0 |
12 | 11 | a1i 11 |
. . . . . . . 8
⊢ (𝐵 ∈ ℕ →
(0↑2) = 0) |
13 | 12 | oveq1d 7270 |
. . . . . . 7
⊢ (𝐵 ∈ ℕ →
((0↑2) gcd (𝐵↑2))
= (0 gcd (𝐵↑2))) |
14 | | zsqcl 13776 |
. . . . . . . 8
⊢ (𝐵 ∈ ℤ → (𝐵↑2) ∈
ℤ) |
15 | | gcd0id 16154 |
. . . . . . . 8
⊢ ((𝐵↑2) ∈ ℤ →
(0 gcd (𝐵↑2)) =
(abs‘(𝐵↑2))) |
16 | 7, 14, 15 | 3syl 18 |
. . . . . . 7
⊢ (𝐵 ∈ ℕ → (0 gcd
(𝐵↑2)) =
(abs‘(𝐵↑2))) |
17 | 13, 16 | eqtrd 2778 |
. . . . . 6
⊢ (𝐵 ∈ ℕ →
((0↑2) gcd (𝐵↑2))
= (abs‘(𝐵↑2))) |
18 | 6, 10, 17 | 3eqtr4d 2788 |
. . . . 5
⊢ (𝐵 ∈ ℕ → ((0 gcd
𝐵)↑2) = ((0↑2)
gcd (𝐵↑2))) |
19 | 18 | adantl 481 |
. . . 4
⊢ ((𝐴 = 0 ∧ 𝐵 ∈ ℕ) → ((0 gcd 𝐵)↑2) = ((0↑2) gcd
(𝐵↑2))) |
20 | | oveq1 7262 |
. . . . . . 7
⊢ (𝐴 = 0 → (𝐴 gcd 𝐵) = (0 gcd 𝐵)) |
21 | 20 | oveq1d 7270 |
. . . . . 6
⊢ (𝐴 = 0 → ((𝐴 gcd 𝐵)↑2) = ((0 gcd 𝐵)↑2)) |
22 | | oveq1 7262 |
. . . . . . 7
⊢ (𝐴 = 0 → (𝐴↑2) = (0↑2)) |
23 | 22 | oveq1d 7270 |
. . . . . 6
⊢ (𝐴 = 0 → ((𝐴↑2) gcd (𝐵↑2)) = ((0↑2) gcd (𝐵↑2))) |
24 | 21, 23 | eqeq12d 2754 |
. . . . 5
⊢ (𝐴 = 0 → (((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)) ↔ ((0 gcd 𝐵)↑2) = ((0↑2) gcd (𝐵↑2)))) |
25 | 24 | adantr 480 |
. . . 4
⊢ ((𝐴 = 0 ∧ 𝐵 ∈ ℕ) → (((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)) ↔ ((0 gcd 𝐵)↑2) = ((0↑2) gcd (𝐵↑2)))) |
26 | 19, 25 | mpbird 256 |
. . 3
⊢ ((𝐴 = 0 ∧ 𝐵 ∈ ℕ) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |
27 | | nncn 11911 |
. . . . . . 7
⊢ (𝐴 ∈ ℕ → 𝐴 ∈
ℂ) |
28 | | abssq 14946 |
. . . . . . 7
⊢ (𝐴 ∈ ℂ →
((abs‘𝐴)↑2) =
(abs‘(𝐴↑2))) |
29 | 27, 28 | syl 17 |
. . . . . 6
⊢ (𝐴 ∈ ℕ →
((abs‘𝐴)↑2) =
(abs‘(𝐴↑2))) |
30 | | nnz 12272 |
. . . . . . . 8
⊢ (𝐴 ∈ ℕ → 𝐴 ∈
ℤ) |
31 | | gcdid0 16155 |
. . . . . . . 8
⊢ (𝐴 ∈ ℤ → (𝐴 gcd 0) = (abs‘𝐴)) |
32 | 30, 31 | syl 17 |
. . . . . . 7
⊢ (𝐴 ∈ ℕ → (𝐴 gcd 0) = (abs‘𝐴)) |
33 | 32 | oveq1d 7270 |
. . . . . 6
⊢ (𝐴 ∈ ℕ → ((𝐴 gcd 0)↑2) =
((abs‘𝐴)↑2)) |
34 | 11 | a1i 11 |
. . . . . . . 8
⊢ (𝐴 ∈ ℕ →
(0↑2) = 0) |
35 | 34 | oveq2d 7271 |
. . . . . . 7
⊢ (𝐴 ∈ ℕ → ((𝐴↑2) gcd (0↑2)) =
((𝐴↑2) gcd
0)) |
36 | | zsqcl 13776 |
. . . . . . . 8
⊢ (𝐴 ∈ ℤ → (𝐴↑2) ∈
ℤ) |
37 | | gcdid0 16155 |
. . . . . . . 8
⊢ ((𝐴↑2) ∈ ℤ →
((𝐴↑2) gcd 0) =
(abs‘(𝐴↑2))) |
38 | 30, 36, 37 | 3syl 18 |
. . . . . . 7
⊢ (𝐴 ∈ ℕ → ((𝐴↑2) gcd 0) =
(abs‘(𝐴↑2))) |
39 | 35, 38 | eqtrd 2778 |
. . . . . 6
⊢ (𝐴 ∈ ℕ → ((𝐴↑2) gcd (0↑2)) =
(abs‘(𝐴↑2))) |
40 | 29, 33, 39 | 3eqtr4d 2788 |
. . . . 5
⊢ (𝐴 ∈ ℕ → ((𝐴 gcd 0)↑2) = ((𝐴↑2) gcd
(0↑2))) |
41 | 40 | adantr 480 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 = 0) → ((𝐴 gcd 0)↑2) = ((𝐴↑2) gcd (0↑2))) |
42 | | oveq2 7263 |
. . . . . . 7
⊢ (𝐵 = 0 → (𝐴 gcd 𝐵) = (𝐴 gcd 0)) |
43 | 42 | oveq1d 7270 |
. . . . . 6
⊢ (𝐵 = 0 → ((𝐴 gcd 𝐵)↑2) = ((𝐴 gcd 0)↑2)) |
44 | | oveq1 7262 |
. . . . . . 7
⊢ (𝐵 = 0 → (𝐵↑2) = (0↑2)) |
45 | 44 | oveq2d 7271 |
. . . . . 6
⊢ (𝐵 = 0 → ((𝐴↑2) gcd (𝐵↑2)) = ((𝐴↑2) gcd (0↑2))) |
46 | 43, 45 | eqeq12d 2754 |
. . . . 5
⊢ (𝐵 = 0 → (((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)) ↔ ((𝐴 gcd 0)↑2) = ((𝐴↑2) gcd (0↑2)))) |
47 | 46 | adantl 481 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 = 0) → (((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)) ↔ ((𝐴 gcd 0)↑2) = ((𝐴↑2) gcd (0↑2)))) |
48 | 41, 47 | mpbird 256 |
. . 3
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 = 0) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |
49 | | gcd0val 16132 |
. . . . . 6
⊢ (0 gcd 0)
= 0 |
50 | 49 | oveq1i 7265 |
. . . . 5
⊢ ((0 gcd
0)↑2) = (0↑2) |
51 | 11, 11 | oveq12i 7267 |
. . . . . 6
⊢
((0↑2) gcd (0↑2)) = (0 gcd 0) |
52 | 51, 49 | eqtri 2766 |
. . . . 5
⊢
((0↑2) gcd (0↑2)) = 0 |
53 | 11, 50, 52 | 3eqtr4i 2776 |
. . . 4
⊢ ((0 gcd
0)↑2) = ((0↑2) gcd (0↑2)) |
54 | | oveq12 7264 |
. . . . 5
⊢ ((𝐴 = 0 ∧ 𝐵 = 0) → (𝐴 gcd 𝐵) = (0 gcd 0)) |
55 | 54 | oveq1d 7270 |
. . . 4
⊢ ((𝐴 = 0 ∧ 𝐵 = 0) → ((𝐴 gcd 𝐵)↑2) = ((0 gcd
0)↑2)) |
56 | 22, 44 | oveqan12d 7274 |
. . . 4
⊢ ((𝐴 = 0 ∧ 𝐵 = 0) → ((𝐴↑2) gcd (𝐵↑2)) = ((0↑2) gcd
(0↑2))) |
57 | 53, 55, 56 | 3eqtr4a 2805 |
. . 3
⊢ ((𝐴 = 0 ∧ 𝐵 = 0) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |
58 | 3, 26, 48, 57 | ccase 1034 |
. 2
⊢ (((𝐴 ∈ ℕ ∨ 𝐴 = 0) ∧ (𝐵 ∈ ℕ ∨ 𝐵 = 0)) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |
59 | 1, 2, 58 | syl2anb 597 |
1
⊢ ((𝐴 ∈ ℕ0
∧ 𝐵 ∈
ℕ0) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2))) |