Proof of Theorem expgcd
Step | Hyp | Ref
| Expression |
1 | | gcdnncl 16214 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → (𝐴 gcd 𝐵) ∈ ℕ) |
2 | 1 | 3adant3 1131 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ∈
ℕ) |
3 | | simp3 1137 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝑁 ∈
ℕ0) |
4 | 2, 3 | nnexpcld 13960 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) ∈ ℕ) |
5 | 4 | nncnd 11989 |
. . 3
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) ∈ ℂ) |
6 | 5 | mulid1d 10992 |
. 2
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 gcd 𝐵)↑𝑁) · 1) = ((𝐴 gcd 𝐵)↑𝑁)) |
7 | | nnexpcl 13795 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴↑𝑁) ∈
ℕ) |
8 | 7 | 3adant2 1130 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴↑𝑁) ∈
ℕ) |
9 | 8 | nnzd 12425 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴↑𝑁) ∈
ℤ) |
10 | | nnexpcl 13795 |
. . . . . . 7
⊢ ((𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐵↑𝑁) ∈
ℕ) |
11 | 10 | 3adant1 1129 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐵↑𝑁) ∈
ℕ) |
12 | 11 | nnzd 12425 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐵↑𝑁) ∈
ℤ) |
13 | | simpl 483 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝐴 ∈
ℕ) |
14 | 13 | nnzd 12425 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝐴 ∈
ℤ) |
15 | | simpr 485 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝐵 ∈
ℕ) |
16 | 15 | nnzd 12425 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝐵 ∈
ℤ) |
17 | | gcddvds 16210 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 gcd 𝐵) ∥ 𝐴 ∧ (𝐴 gcd 𝐵) ∥ 𝐵)) |
18 | 14, 16, 17 | syl2anc 584 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝐴 gcd 𝐵) ∥ 𝐴 ∧ (𝐴 gcd 𝐵) ∥ 𝐵)) |
19 | 18 | 3adant3 1131 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵) ∥ 𝐴 ∧ (𝐴 gcd 𝐵) ∥ 𝐵)) |
20 | 19 | simpld 495 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ∥ 𝐴) |
21 | 2 | nnzd 12425 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ∈
ℤ) |
22 | | simp1 1135 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐴 ∈
ℕ) |
23 | 22 | nnzd 12425 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐴 ∈
ℤ) |
24 | | dvdsexpim 40328 |
. . . . . . 7
⊢ (((𝐴 gcd 𝐵) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐴 gcd 𝐵) ∥ 𝐴 → ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐴↑𝑁))) |
25 | 21, 23, 3, 24 | syl3anc 1370 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵) ∥ 𝐴 → ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐴↑𝑁))) |
26 | 20, 25 | mpd 15 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐴↑𝑁)) |
27 | 19 | simprd 496 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ∥ 𝐵) |
28 | | simp2 1136 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐵 ∈
ℕ) |
29 | 28 | nnzd 12425 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐵 ∈
ℤ) |
30 | | dvdsexpim 40328 |
. . . . . . 7
⊢ (((𝐴 gcd 𝐵) ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((𝐴 gcd 𝐵) ∥ 𝐵 → ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐵↑𝑁))) |
31 | 21, 29, 3, 30 | syl3anc 1370 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵) ∥ 𝐵 → ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐵↑𝑁))) |
32 | 27, 31 | mpd 15 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐵↑𝑁)) |
33 | | gcddiv 16259 |
. . . . 5
⊢ ((((𝐴↑𝑁) ∈ ℤ ∧ (𝐵↑𝑁) ∈ ℤ ∧ ((𝐴 gcd 𝐵)↑𝑁) ∈ ℕ) ∧ (((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐴↑𝑁) ∧ ((𝐴 gcd 𝐵)↑𝑁) ∥ (𝐵↑𝑁))) → (((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = (((𝐴↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)) gcd ((𝐵↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)))) |
34 | 9, 12, 4, 26, 32, 33 | syl32anc 1377 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = (((𝐴↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)) gcd ((𝐵↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)))) |
35 | | nncn 11981 |
. . . . . . 7
⊢ (𝐴 ∈ ℕ → 𝐴 ∈
ℂ) |
36 | 35 | 3ad2ant1 1132 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐴 ∈
ℂ) |
37 | 2 | nncnd 11989 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ∈
ℂ) |
38 | 2 | nnne0d 12023 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 gcd 𝐵) ≠ 0) |
39 | 36, 37, 38, 3 | expdivd 13878 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 / (𝐴 gcd 𝐵))↑𝑁) = ((𝐴↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁))) |
40 | | nncn 11981 |
. . . . . . 7
⊢ (𝐵 ∈ ℕ → 𝐵 ∈
ℂ) |
41 | 40 | 3ad2ant2 1133 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ 𝐵 ∈
ℂ) |
42 | 41, 37, 38, 3 | expdivd 13878 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐵 / (𝐴 gcd 𝐵))↑𝑁) = ((𝐵↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁))) |
43 | 39, 42 | oveq12d 7293 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 / (𝐴 gcd 𝐵))↑𝑁) gcd ((𝐵 / (𝐴 gcd 𝐵))↑𝑁)) = (((𝐴↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)) gcd ((𝐵↑𝑁) / ((𝐴 gcd 𝐵)↑𝑁)))) |
44 | | gcddiv 16259 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ (𝐴 gcd 𝐵) ∈ ℕ) ∧ ((𝐴 gcd 𝐵) ∥ 𝐴 ∧ (𝐴 gcd 𝐵) ∥ 𝐵)) → ((𝐴 gcd 𝐵) / (𝐴 gcd 𝐵)) = ((𝐴 / (𝐴 gcd 𝐵)) gcd (𝐵 / (𝐴 gcd 𝐵)))) |
45 | 23, 29, 2, 19, 44 | syl31anc 1372 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵) / (𝐴 gcd 𝐵)) = ((𝐴 / (𝐴 gcd 𝐵)) gcd (𝐵 / (𝐴 gcd 𝐵)))) |
46 | 37, 38 | dividd 11749 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵) / (𝐴 gcd 𝐵)) = 1) |
47 | 45, 46 | eqtr3d 2780 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 / (𝐴 gcd 𝐵)) gcd (𝐵 / (𝐴 gcd 𝐵))) = 1) |
48 | | divgcdnn 16222 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℤ) → (𝐴 / (𝐴 gcd 𝐵)) ∈ ℕ) |
49 | 22, 29, 48 | syl2anc 584 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 / (𝐴 gcd 𝐵)) ∈ ℕ) |
50 | 49 | nnnn0d 12293 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐴 / (𝐴 gcd 𝐵)) ∈
ℕ0) |
51 | | divgcdnnr 16223 |
. . . . . . . 8
⊢ ((𝐵 ∈ ℕ ∧ 𝐴 ∈ ℤ) → (𝐵 / (𝐴 gcd 𝐵)) ∈ ℕ) |
52 | 28, 23, 51 | syl2anc 584 |
. . . . . . 7
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐵 / (𝐴 gcd 𝐵)) ∈ ℕ) |
53 | 52 | nnnn0d 12293 |
. . . . . 6
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (𝐵 / (𝐴 gcd 𝐵)) ∈
ℕ0) |
54 | | nn0rppwr 40333 |
. . . . . 6
⊢ (((𝐴 / (𝐴 gcd 𝐵)) ∈ ℕ0 ∧ (𝐵 / (𝐴 gcd 𝐵)) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 / (𝐴 gcd 𝐵)) gcd (𝐵 / (𝐴 gcd 𝐵))) = 1 → (((𝐴 / (𝐴 gcd 𝐵))↑𝑁) gcd ((𝐵 / (𝐴 gcd 𝐵))↑𝑁)) = 1)) |
55 | 50, 53, 3, 54 | syl3anc 1370 |
. . . . 5
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 / (𝐴 gcd 𝐵)) gcd (𝐵 / (𝐴 gcd 𝐵))) = 1 → (((𝐴 / (𝐴 gcd 𝐵))↑𝑁) gcd ((𝐵 / (𝐴 gcd 𝐵))↑𝑁)) = 1)) |
56 | 47, 55 | mpd 15 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 / (𝐴 gcd 𝐵))↑𝑁) gcd ((𝐵 / (𝐴 gcd 𝐵))↑𝑁)) = 1) |
57 | 34, 43, 56 | 3eqtr2d 2784 |
. . 3
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = 1) |
58 | | gcdnncl 16214 |
. . . . . 6
⊢ (((𝐴↑𝑁) ∈ ℕ ∧ (𝐵↑𝑁) ∈ ℕ) → ((𝐴↑𝑁) gcd (𝐵↑𝑁)) ∈ ℕ) |
59 | 58 | nncnd 11989 |
. . . . 5
⊢ (((𝐴↑𝑁) ∈ ℕ ∧ (𝐵↑𝑁) ∈ ℕ) → ((𝐴↑𝑁) gcd (𝐵↑𝑁)) ∈ ℂ) |
60 | 8, 11, 59 | syl2anc 584 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴↑𝑁) gcd (𝐵↑𝑁)) ∈ ℂ) |
61 | 4 | nnne0d 12023 |
. . . 4
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) ≠ 0) |
62 | | ax-1cn 10929 |
. . . . 5
⊢ 1 ∈
ℂ |
63 | | divmul 11636 |
. . . . 5
⊢ ((((𝐴↑𝑁) gcd (𝐵↑𝑁)) ∈ ℂ ∧ 1 ∈ ℂ
∧ (((𝐴 gcd 𝐵)↑𝑁) ∈ ℂ ∧ ((𝐴 gcd 𝐵)↑𝑁) ≠ 0)) → ((((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = 1 ↔ (((𝐴 gcd 𝐵)↑𝑁) · 1) = ((𝐴↑𝑁) gcd (𝐵↑𝑁)))) |
64 | 62, 63 | mp3an2 1448 |
. . . 4
⊢ ((((𝐴↑𝑁) gcd (𝐵↑𝑁)) ∈ ℂ ∧ (((𝐴 gcd 𝐵)↑𝑁) ∈ ℂ ∧ ((𝐴 gcd 𝐵)↑𝑁) ≠ 0)) → ((((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = 1 ↔ (((𝐴 gcd 𝐵)↑𝑁) · 1) = ((𝐴↑𝑁) gcd (𝐵↑𝑁)))) |
65 | 60, 5, 61, 64 | syl12anc 834 |
. . 3
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((((𝐴↑𝑁) gcd (𝐵↑𝑁)) / ((𝐴 gcd 𝐵)↑𝑁)) = 1 ↔ (((𝐴 gcd 𝐵)↑𝑁) · 1) = ((𝐴↑𝑁) gcd (𝐵↑𝑁)))) |
66 | 57, 65 | mpbid 231 |
. 2
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ (((𝐴 gcd 𝐵)↑𝑁) · 1) = ((𝐴↑𝑁) gcd (𝐵↑𝑁))) |
67 | 6, 66 | eqtr3d 2780 |
1
⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝑁 ∈ ℕ0)
→ ((𝐴 gcd 𝐵)↑𝑁) = ((𝐴↑𝑁) gcd (𝐵↑𝑁))) |