Metamath Proof Explorer


Theorem aks4d1p8d3

Description: The remainder of a division with its maximal prime power is coprime with that prime power. (Contributed by metakunt, 13-Nov-2024)

Ref Expression
Hypotheses aks4d1p8d3.1 ⊢ φ → N ∈ ℕ
aks4d1p8d3.2 ⊢ φ → P ∈ ℙ
aks4d1p8d3.3 ⊢ φ → P ∥ N
Assertion aks4d1p8d3 ⊢ φ → N P P pCnt N gcd P P pCnt N = 1

Proof

Step Hyp Ref Expression
1 aks4d1p8d3.1 ⊢ φ → N ∈ ℕ
2 aks4d1p8d3.2 ⊢ φ → P ∈ ℙ
3 aks4d1p8d3.3 ⊢ φ → P ∥ N
4 pcdvds ⊢ P ∈ ℙ ∧ N ∈ ℕ → P P pCnt N ∥ N
5 2 1 4 syl2anc ⊢ φ → P P pCnt N ∥ N
6 prmnn ⊢ P ∈ ℙ → P ∈ ℕ
7 2 6 syl ⊢ φ → P ∈ ℕ
8 7 nnzd ⊢ φ → P ∈ ℤ
9 2 1 pccld ⊢ φ → P pCnt N ∈ ℕ 0
10 8 9 zexpcld ⊢ φ → P P pCnt N ∈ ℤ
11 8 zcnd ⊢ φ → P ∈ ℂ
12 0red ⊢ φ → 0 ∈ ℝ
13 1red ⊢ φ → 1 ∈ ℝ
14 8 zred ⊢ φ → P ∈ ℝ
15 0lt1 ⊢ 0 < 1
16 15 a1i ⊢ φ → 0 < 1
17 prmgt1 ⊢ P ∈ ℙ → 1 < P
18 2 17 syl ⊢ φ → 1 < P
19 12 13 14 16 18 lttrd ⊢ φ → 0 < P
20 12 19 ltned ⊢ φ → 0 ≠ P
21 20 necomd ⊢ φ → P ≠ 0
22 9 nn0zd ⊢ φ → P pCnt N ∈ ℤ
23 11 21 22 expne0d ⊢ φ → P P pCnt N ≠ 0
24 1 nnzd ⊢ φ → N ∈ ℤ
25 dvdsval2 ⊢ P P pCnt N ∈ ℤ ∧ P P pCnt N ≠ 0 ∧ N ∈ ℤ → P P pCnt N ∥ N ↔ N P P pCnt N ∈ ℤ
26 10 23 24 25 syl3anc ⊢ φ → P P pCnt N ∥ N ↔ N P P pCnt N ∈ ℤ
27 5 26 mpbid ⊢ φ → N P P pCnt N ∈ ℤ
28 27 10 gcdcomd ⊢ φ → N P P pCnt N gcd P P pCnt N = P P pCnt N gcd N P P pCnt N
29 pcndvds2 ⊢ P ∈ ℙ ∧ N ∈ ℕ → ¬ P ∥ N P P pCnt N
30 2 1 29 syl2anc ⊢ φ → ¬ P ∥ N P P pCnt N
31 coprm ⊢ P ∈ ℙ ∧ N P P pCnt N ∈ ℤ → ¬ P ∥ N P P pCnt N ↔ P gcd N P P pCnt N = 1
32 2 27 31 syl2anc ⊢ φ → ¬ P ∥ N P P pCnt N ↔ P gcd N P P pCnt N = 1
33 30 32 mpbid ⊢ φ → P gcd N P P pCnt N = 1
34 pcelnn ⊢ P ∈ ℙ ∧ N ∈ ℕ → P pCnt N ∈ ℕ ↔ P ∥ N
35 2 1 34 syl2anc ⊢ φ → P pCnt N ∈ ℕ ↔ P ∥ N
36 3 35 mpbird ⊢ φ → P pCnt N ∈ ℕ
37 rpexp ⊢ P ∈ ℤ ∧ N P P pCnt N ∈ ℤ ∧ P pCnt N ∈ ℕ → P P pCnt N gcd N P P pCnt N = 1 ↔ P gcd N P P pCnt N = 1
38 8 27 36 37 syl3anc ⊢ φ → P P pCnt N gcd N P P pCnt N = 1 ↔ P gcd N P P pCnt N = 1
39 33 38 mpbird ⊢ φ → P P pCnt N gcd N P P pCnt N = 1
40 28 39 eqtrd ⊢ φ → N P P pCnt N gcd P P pCnt N = 1