MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  pockthlem Structured version   Visualization version   GIF version

Theorem pockthlem 15447
Description: Lemma for pockthg 15448. (Contributed by Mario Carneiro, 2-Mar-2014.)
Hypotheses
Ref Expression
pockthg.1 (𝜑𝐴 ∈ ℕ)
pockthg.2 (𝜑𝐵 ∈ ℕ)
pockthg.3 (𝜑𝐵 < 𝐴)
pockthg.4 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
pockthlem.5 (𝜑𝑃 ∈ ℙ)
pockthlem.6 (𝜑𝑃𝑁)
pockthlem.7 (𝜑𝑄 ∈ ℙ)
pockthlem.8 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ)
pockthlem.9 (𝜑𝐶 ∈ ℤ)
pockthlem.10 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = 1)
pockthlem.11 (𝜑 → (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) = 1)
Assertion
Ref Expression
pockthlem (𝜑 → (𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)))

Proof of Theorem pockthlem
StepHypRef Expression
1 pockthlem.7 . . . . . . 7 (𝜑𝑄 ∈ ℙ)
2 pockthg.1 . . . . . . 7 (𝜑𝐴 ∈ ℕ)
3 pcdvds 15406 . . . . . . 7 ((𝑄 ∈ ℙ ∧ 𝐴 ∈ ℕ) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
41, 2, 3syl2anc 691 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
52nnzd 11357 . . . . . . . 8 (𝜑𝐴 ∈ ℤ)
6 pockthg.2 . . . . . . . . 9 (𝜑𝐵 ∈ ℕ)
76nnzd 11357 . . . . . . . 8 (𝜑𝐵 ∈ ℤ)
8 dvdsmul1 14841 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → 𝐴 ∥ (𝐴 · 𝐵))
95, 7, 8syl2anc 691 . . . . . . 7 (𝜑𝐴 ∥ (𝐴 · 𝐵))
10 pockthg.4 . . . . . . . . 9 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
1110oveq1d 6564 . . . . . . . 8 (𝜑 → (𝑁 − 1) = (((𝐴 · 𝐵) + 1) − 1))
122, 6nnmulcld 10945 . . . . . . . . . 10 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
1312nncnd 10913 . . . . . . . . 9 (𝜑 → (𝐴 · 𝐵) ∈ ℂ)
14 ax-1cn 9873 . . . . . . . . 9 1 ∈ ℂ
15 pncan 10166 . . . . . . . . 9 (((𝐴 · 𝐵) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
1613, 14, 15sylancl 693 . . . . . . . 8 (𝜑 → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
1711, 16eqtrd 2644 . . . . . . 7 (𝜑 → (𝑁 − 1) = (𝐴 · 𝐵))
189, 17breqtrrd 4611 . . . . . 6 (𝜑𝐴 ∥ (𝑁 − 1))
19 prmnn 15226 . . . . . . . . . 10 (𝑄 ∈ ℙ → 𝑄 ∈ ℕ)
201, 19syl 17 . . . . . . . . 9 (𝜑𝑄 ∈ ℕ)
21 pockthlem.8 . . . . . . . . . 10 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ)
2221nnnn0d 11228 . . . . . . . . 9 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ0)
2320, 22nnexpcld 12892 . . . . . . . 8 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℕ)
2423nnzd 11357 . . . . . . 7 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ)
25 1z 11284 . . . . . . . . . 10 1 ∈ ℤ
26 nnuz 11599 . . . . . . . . . . . . 13 ℕ = (ℤ‘1)
2712, 26syl6eleq 2698 . . . . . . . . . . . 12 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
28 eluzp1p1 11589 . . . . . . . . . . . 12 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2927, 28syl 17 . . . . . . . . . . 11 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
3010, 29eqeltrd 2688 . . . . . . . . . 10 (𝜑𝑁 ∈ (ℤ‘(1 + 1)))
31 eluzp1m1 11587 . . . . . . . . . 10 ((1 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘(1 + 1))) → (𝑁 − 1) ∈ (ℤ‘1))
3225, 30, 31sylancr 694 . . . . . . . . 9 (𝜑 → (𝑁 − 1) ∈ (ℤ‘1))
3332, 26syl6eleqr 2699 . . . . . . . 8 (𝜑 → (𝑁 − 1) ∈ ℕ)
3433nnzd 11357 . . . . . . 7 (𝜑 → (𝑁 − 1) ∈ ℤ)
35 dvdstr 14856 . . . . . . 7 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ (𝑁 − 1) ∈ ℤ) → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴𝐴 ∥ (𝑁 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)))
3624, 5, 34, 35syl3anc 1318 . . . . . 6 (𝜑 → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴𝐴 ∥ (𝑁 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)))
374, 18, 36mp2and 711 . . . . 5 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1))
3823nnne0d 10942 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0)
39 dvdsval2 14824 . . . . . 6 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
4024, 38, 34, 39syl3anc 1318 . . . . 5 (𝜑 → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
4137, 40mpbid 221 . . . 4 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ)
42 pockthlem.5 . . . . . . 7 (𝜑𝑃 ∈ ℙ)
43 prmnn 15226 . . . . . . 7 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
4442, 43syl 17 . . . . . 6 (𝜑𝑃 ∈ ℕ)
45 pockthlem.9 . . . . . 6 (𝜑𝐶 ∈ ℤ)
4644nnzd 11357 . . . . . . . . . . 11 (𝜑𝑃 ∈ ℤ)
47 gcddvds 15063 . . . . . . . . . . 11 ((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
4845, 46, 47syl2anc 691 . . . . . . . . . 10 (𝜑 → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
4948simpld 474 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝐶)
5048simprd 478 . . . . . . . . . 10 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑃)
51 pockthlem.6 . . . . . . . . . 10 (𝜑𝑃𝑁)
5245, 46gcdcld 15068 . . . . . . . . . . . 12 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ0)
5352nn0zd 11356 . . . . . . . . . . 11 (𝜑 → (𝐶 gcd 𝑃) ∈ ℤ)
54 df-2 10956 . . . . . . . . . . . . . . . 16 2 = (1 + 1)
5554fveq2i 6106 . . . . . . . . . . . . . . 15 (ℤ‘2) = (ℤ‘(1 + 1))
5630, 55syl6eleqr 2699 . . . . . . . . . . . . . 14 (𝜑𝑁 ∈ (ℤ‘2))
57 eluz2b2 11637 . . . . . . . . . . . . . 14 (𝑁 ∈ (ℤ‘2) ↔ (𝑁 ∈ ℕ ∧ 1 < 𝑁))
5856, 57sylib 207 . . . . . . . . . . . . 13 (𝜑 → (𝑁 ∈ ℕ ∧ 1 < 𝑁))
5958simpld 474 . . . . . . . . . . . 12 (𝜑𝑁 ∈ ℕ)
6059nnzd 11357 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
61 dvdstr 14856 . . . . . . . . . . 11 (((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝑃 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((𝐶 gcd 𝑃) ∥ 𝑃𝑃𝑁) → (𝐶 gcd 𝑃) ∥ 𝑁))
6253, 46, 60, 61syl3anc 1318 . . . . . . . . . 10 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝑃𝑃𝑁) → (𝐶 gcd 𝑃) ∥ 𝑁))
6350, 51, 62mp2and 711 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑁)
6459nnne0d 10942 . . . . . . . . . . 11 (𝜑𝑁 ≠ 0)
65 simpr 476 . . . . . . . . . . . 12 ((𝐶 = 0 ∧ 𝑁 = 0) → 𝑁 = 0)
6665necon3ai 2807 . . . . . . . . . . 11 (𝑁 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
6764, 66syl 17 . . . . . . . . . 10 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
68 dvdslegcd 15064 . . . . . . . . . 10 ((((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑁 = 0)) → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
6953, 45, 60, 67, 68syl31anc 1321 . . . . . . . . 9 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
7049, 63, 69mp2and 711 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁))
71 pockthlem.10 . . . . . . . . . . 11 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = 1)
7271oveq1d 6564 . . . . . . . . . 10 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = (1 gcd 𝑁))
7333nnnn0d 11228 . . . . . . . . . . . 12 (𝜑 → (𝑁 − 1) ∈ ℕ0)
74 zexpcl 12737 . . . . . . . . . . . 12 ((𝐶 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ0) → (𝐶↑(𝑁 − 1)) ∈ ℤ)
7545, 73, 74syl2anc 691 . . . . . . . . . . 11 (𝜑 → (𝐶↑(𝑁 − 1)) ∈ ℤ)
76 modgcd 15091 . . . . . . . . . . 11 (((𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
7775, 59, 76syl2anc 691 . . . . . . . . . 10 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
78 gcdcom 15073 . . . . . . . . . . . 12 ((1 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (1 gcd 𝑁) = (𝑁 gcd 1))
7925, 60, 78sylancr 694 . . . . . . . . . . 11 (𝜑 → (1 gcd 𝑁) = (𝑁 gcd 1))
80 gcd1 15087 . . . . . . . . . . . 12 (𝑁 ∈ ℤ → (𝑁 gcd 1) = 1)
8160, 80syl 17 . . . . . . . . . . 11 (𝜑 → (𝑁 gcd 1) = 1)
8279, 81eqtrd 2644 . . . . . . . . . 10 (𝜑 → (1 gcd 𝑁) = 1)
8372, 77, 823eqtr3d 2652 . . . . . . . . 9 (𝜑 → ((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1)
84 rpexp 15270 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ) → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
8545, 60, 33, 84syl3anc 1318 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
8683, 85mpbid 221 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑁) = 1)
8770, 86breqtrd 4609 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ≤ 1)
8844nnne0d 10942 . . . . . . . . . 10 (𝜑𝑃 ≠ 0)
89 simpr 476 . . . . . . . . . . 11 ((𝐶 = 0 ∧ 𝑃 = 0) → 𝑃 = 0)
9089necon3ai 2807 . . . . . . . . . 10 (𝑃 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
9188, 90syl 17 . . . . . . . . 9 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
92 gcdn0cl 15062 . . . . . . . . 9 (((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑃 = 0)) → (𝐶 gcd 𝑃) ∈ ℕ)
9345, 46, 91, 92syl21anc 1317 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ)
94 nnle1eq1 10925 . . . . . . . 8 ((𝐶 gcd 𝑃) ∈ ℕ → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
9593, 94syl 17 . . . . . . 7 (𝜑 → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
9687, 95mpbid 221 . . . . . 6 (𝜑 → (𝐶 gcd 𝑃) = 1)
97 odzcl 15336 . . . . . 6 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∈ ℕ)
9844, 45, 96, 97syl3anc 1318 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∈ ℕ)
9998nnzd 11357 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∈ ℤ)
10059nnred 10912 . . . . . . . . . 10 (𝜑𝑁 ∈ ℝ)
10158simprd 478 . . . . . . . . . 10 (𝜑 → 1 < 𝑁)
102 1mod 12564 . . . . . . . . . 10 ((𝑁 ∈ ℝ ∧ 1 < 𝑁) → (1 mod 𝑁) = 1)
103100, 101, 102syl2anc 691 . . . . . . . . 9 (𝜑 → (1 mod 𝑁) = 1)
10471, 103eqtr4d 2647 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁))
105 1zzd 11285 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
106 moddvds 14829 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 1 ∈ ℤ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
10759, 75, 105, 106syl3anc 1318 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
108104, 107mpbid 221 . . . . . . 7 (𝜑𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1))
109 peano2zm 11297 . . . . . . . . 9 ((𝐶↑(𝑁 − 1)) ∈ ℤ → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
11075, 109syl 17 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
111 dvdstr 14856 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ) → ((𝑃𝑁𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)) → 𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11246, 60, 110, 111syl3anc 1318 . . . . . . 7 (𝜑 → ((𝑃𝑁𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)) → 𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11351, 108, 112mp2and 711 . . . . . 6 (𝜑𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1))
114 odzdvds 15338 . . . . . . 7 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ (𝑁 − 1) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
11544, 45, 96, 73, 114syl31anc 1321 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
116113, 115mpbid 221 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑁 − 1))
11733nncnd 10913 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℂ)
11823nncnd 10913 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℂ)
119117, 118, 38divcan1d 10681 . . . . 5 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) = (𝑁 − 1))
120116, 119breqtrrd 4611 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))))
121 nprmdvds1 15256 . . . . . 6 (𝑃 ∈ ℙ → ¬ 𝑃 ∥ 1)
12242, 121syl 17 . . . . 5 (𝜑 → ¬ 𝑃 ∥ 1)
12320nnzd 11357 . . . . . . . . . . . . . 14 (𝜑𝑄 ∈ ℤ)
124 iddvdsexp 14843 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) → 𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
125123, 21, 124syl2anc 691 . . . . . . . . . . . . 13 (𝜑𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
126 dvdstr 14856 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)) ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)) → 𝑄 ∥ (𝑁 − 1)))
127123, 24, 34, 126syl3anc 1318 . . . . . . . . . . . . 13 (𝜑 → ((𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)) ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)) → 𝑄 ∥ (𝑁 − 1)))
128125, 37, 127mp2and 711 . . . . . . . . . . . 12 (𝜑𝑄 ∥ (𝑁 − 1))
12920nnne0d 10942 . . . . . . . . . . . . 13 (𝜑𝑄 ≠ 0)
130 dvdsval2 14824 . . . . . . . . . . . . 13 ((𝑄 ∈ ℤ ∧ 𝑄 ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
131123, 129, 34, 130syl3anc 1318 . . . . . . . . . . . 12 (𝜑 → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
132128, 131mpbid 221 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℤ)
13373nn0ge0d 11231 . . . . . . . . . . . 12 (𝜑 → 0 ≤ (𝑁 − 1))
13433nnred 10912 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ ℝ)
13520nnred 10912 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℝ)
13620nngt0d 10941 . . . . . . . . . . . . 13 (𝜑 → 0 < 𝑄)
137 ge0div 10769 . . . . . . . . . . . . 13 (((𝑁 − 1) ∈ ℝ ∧ 𝑄 ∈ ℝ ∧ 0 < 𝑄) → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
138134, 135, 136, 137syl3anc 1318 . . . . . . . . . . . 12 (𝜑 → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
139133, 138mpbid 221 . . . . . . . . . . 11 (𝜑 → 0 ≤ ((𝑁 − 1) / 𝑄))
140 elnn0z 11267 . . . . . . . . . . 11 (((𝑁 − 1) / 𝑄) ∈ ℕ0 ↔ (((𝑁 − 1) / 𝑄) ∈ ℤ ∧ 0 ≤ ((𝑁 − 1) / 𝑄)))
141132, 139, 140sylanbrc 695 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℕ0)
142 zexpcl 12737 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
14345, 141, 142syl2anc 691 . . . . . . . . 9 (𝜑 → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
144 peano2zm 11297 . . . . . . . . 9 ((𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
145143, 144syl 17 . . . . . . . 8 (𝜑 → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
146 dvdsgcd 15099 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14746, 145, 60, 146syl3anc 1318 . . . . . . 7 (𝜑 → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14851, 147mpan2d 706 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
149 odzdvds 15338 . . . . . . . 8 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
15044, 45, 96, 141, 149syl31anc 1321 . . . . . . 7 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
15120nncnd 10913 . . . . . . . . . . 11 (𝜑𝑄 ∈ ℂ)
15221nnzd 11357 . . . . . . . . . . 11 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℤ)
153151, 129, 152expm1d 12880 . . . . . . . . . 10 (𝜑 → (𝑄↑((𝑄 pCnt 𝐴) − 1)) = ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄))
154153oveq2d 6565 . . . . . . . . 9 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
155134, 23nndivred 10946 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℝ)
156155recnd 9947 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℂ)
157156, 118, 151, 129divassd 10715 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
158119oveq1d 6564 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = ((𝑁 − 1) / 𝑄))
159154, 157, 1583eqtr2d 2650 . . . . . . . 8 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = ((𝑁 − 1) / 𝑄))
160159breq2d 4595 . . . . . . 7 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
161150, 160bitr4d 270 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1)))))
162 pockthlem.11 . . . . . . 7 (𝜑 → (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) = 1)
163162breq2d 4595 . . . . . 6 (𝜑 → (𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) ↔ 𝑃 ∥ 1))
164148, 161, 1633imtr3d 281 . . . . 5 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) → 𝑃 ∥ 1))
165122, 164mtod 188 . . . 4 (𝜑 → ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))
166 prmpwdvds 15446 . . . 4 (((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ) ∧ (𝑄 ∈ ℙ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) ∧ (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) ∧ ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
16741, 99, 1, 21, 120, 165, 166syl222anc 1334 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
168 odzphi 15339 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
16944, 45, 96, 168syl3anc 1318 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
170 phiprm 15320 . . . . 5 (𝑃 ∈ ℙ → (ϕ‘𝑃) = (𝑃 − 1))
17142, 170syl 17 . . . 4 (𝜑 → (ϕ‘𝑃) = (𝑃 − 1))
172169, 171breqtrd 4609 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑃 − 1))
173 prmuz2 15246 . . . . . . . . 9 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
17442, 173syl 17 . . . . . . . 8 (𝜑𝑃 ∈ (ℤ‘2))
175174, 55syl6eleq 2698 . . . . . . 7 (𝜑𝑃 ∈ (ℤ‘(1 + 1)))
176 eluzp1m1 11587 . . . . . . 7 ((1 ∈ ℤ ∧ 𝑃 ∈ (ℤ‘(1 + 1))) → (𝑃 − 1) ∈ (ℤ‘1))
17725, 175, 176sylancr 694 . . . . . 6 (𝜑 → (𝑃 − 1) ∈ (ℤ‘1))
178177, 26syl6eleqr 2699 . . . . 5 (𝜑 → (𝑃 − 1) ∈ ℕ)
179178nnzd 11357 . . . 4 (𝜑 → (𝑃 − 1) ∈ ℤ)
180 dvdstr 14856 . . . 4 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ ∧ (𝑃 − 1) ∈ ℤ) → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶) ∧ ((od𝑃)‘𝐶) ∥ (𝑃 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
18124, 99, 179, 180syl3anc 1318 . . 3 (𝜑 → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶) ∧ ((od𝑃)‘𝐶) ∥ (𝑃 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
182167, 172, 181mp2and 711 . 2 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1))
183 pcdvdsb 15411 . . 3 ((𝑄 ∈ ℙ ∧ (𝑃 − 1) ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ0) → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
1841, 179, 22, 183syl3anc 1318 . 2 (𝜑 → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
185182, 184mpbird 246 1 (𝜑 → (𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 195  wa 383   = wceq 1475  wcel 1977  wne 2780   class class class wbr 4583  cfv 5804  (class class class)co 6549  cc 9813  cr 9814  0cc0 9815  1c1 9816   + caddc 9818   · cmul 9820   < clt 9953  cle 9954  cmin 10145   / cdiv 10563  cn 10897  2c2 10947  0cn0 11169  cz 11254  cuz 11563   mod cmo 12530  cexp 12722  cdvds 14821   gcd cgcd 15054  cprime 15223  odcodz 15306  ϕcphi 15307   pCnt cpc 15379
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847  ax-cnex 9871  ax-resscn 9872  ax-1cn 9873  ax-icn 9874  ax-addcl 9875  ax-addrcl 9876  ax-mulcl 9877  ax-mulrcl 9878  ax-mulcom 9879  ax-addass 9880  ax-mulass 9881  ax-distr 9882  ax-i2m1 9883  ax-1ne0 9884  ax-1rid 9885  ax-rnegex 9886  ax-rrecex 9887  ax-cnre 9888  ax-pre-lttri 9889  ax-pre-lttrn 9890  ax-pre-ltadd 9891  ax-pre-mulgt0 9892  ax-pre-sup 9893
This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3or 1032  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-nel 2783  df-ral 2901  df-rex 2902  df-reu 2903  df-rmo 2904  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-pss 3556  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-tp 4130  df-op 4132  df-uni 4373  df-int 4411  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-tr 4681  df-eprel 4949  df-id 4953  df-po 4959  df-so 4960  df-fr 4997  df-we 4999  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-pred 5597  df-ord 5643  df-on 5644  df-lim 5645  df-suc 5646  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-riota 6511  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-om 6958  df-1st 7059  df-2nd 7060  df-wrecs 7294  df-recs 7355  df-rdg 7393  df-1o 7447  df-2o 7448  df-oadd 7451  df-er 7629  df-map 7746  df-en 7842  df-dom 7843  df-sdom 7844  df-fin 7845  df-sup 8231  df-inf 8232  df-card 8648  df-cda 8873  df-pnf 9955  df-mnf 9956  df-xr 9957  df-ltxr 9958  df-le 9959  df-sub 10147  df-neg 10148  df-div 10564  df-nn 10898  df-2 10956  df-3 10957  df-n0 11170  df-xnn0 11241  df-z 11255  df-uz 11564  df-q 11665  df-rp 11709  df-fz 12198  df-fzo 12335  df-fl 12455  df-mod 12531  df-seq 12664  df-exp 12723  df-hash 12980  df-cj 13687  df-re 13688  df-im 13689  df-sqrt 13823  df-abs 13824  df-dvds 14822  df-gcd 15055  df-prm 15224  df-odz 15308  df-phi 15309  df-pc 15380
This theorem is referenced by:  pockthg  15448
  Copyright terms: Public domain W3C validator