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

Theorem pockthlem 16231
Description: Lemma for pockthg 16232. (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 16190 . . . . . . 7 ((𝑄 ∈ ℙ ∧ 𝐴 ∈ ℕ) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
41, 2, 3syl2anc 587 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
52nnzd 12074 . . . . . . . 8 (𝜑𝐴 ∈ ℤ)
6 pockthg.2 . . . . . . . . 9 (𝜑𝐵 ∈ ℕ)
76nnzd 12074 . . . . . . . 8 (𝜑𝐵 ∈ ℤ)
8 dvdsmul1 15623 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → 𝐴 ∥ (𝐴 · 𝐵))
95, 7, 8syl2anc 587 . . . . . . 7 (𝜑𝐴 ∥ (𝐴 · 𝐵))
10 pockthg.4 . . . . . . . . 9 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
1110oveq1d 7150 . . . . . . . 8 (𝜑 → (𝑁 − 1) = (((𝐴 · 𝐵) + 1) − 1))
122, 6nnmulcld 11678 . . . . . . . . . 10 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
1312nncnd 11641 . . . . . . . . 9 (𝜑 → (𝐴 · 𝐵) ∈ ℂ)
14 ax-1cn 10584 . . . . . . . . 9 1 ∈ ℂ
15 pncan 10881 . . . . . . . . 9 (((𝐴 · 𝐵) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
1613, 14, 15sylancl 589 . . . . . . . 8 (𝜑 → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
1711, 16eqtrd 2833 . . . . . . 7 (𝜑 → (𝑁 − 1) = (𝐴 · 𝐵))
189, 17breqtrrd 5058 . . . . . 6 (𝜑𝐴 ∥ (𝑁 − 1))
19 prmnn 16008 . . . . . . . . . 10 (𝑄 ∈ ℙ → 𝑄 ∈ ℕ)
201, 19syl 17 . . . . . . . . 9 (𝜑𝑄 ∈ ℕ)
21 pockthlem.8 . . . . . . . . . 10 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ)
2221nnnn0d 11943 . . . . . . . . 9 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ0)
2320, 22nnexpcld 13602 . . . . . . . 8 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℕ)
2423nnzd 12074 . . . . . . 7 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ)
25 1z 12000 . . . . . . . . . 10 1 ∈ ℤ
26 nnuz 12269 . . . . . . . . . . . . 13 ℕ = (ℤ‘1)
2712, 26eleqtrdi 2900 . . . . . . . . . . . 12 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
28 eluzp1p1 12258 . . . . . . . . . . . 12 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2927, 28syl 17 . . . . . . . . . . 11 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
3010, 29eqeltrd 2890 . . . . . . . . . 10 (𝜑𝑁 ∈ (ℤ‘(1 + 1)))
31 eluzp1m1 12256 . . . . . . . . . 10 ((1 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘(1 + 1))) → (𝑁 − 1) ∈ (ℤ‘1))
3225, 30, 31sylancr 590 . . . . . . . . 9 (𝜑 → (𝑁 − 1) ∈ (ℤ‘1))
3332, 26eleqtrrdi 2901 . . . . . . . 8 (𝜑 → (𝑁 − 1) ∈ ℕ)
3433nnzd 12074 . . . . . . 7 (𝜑 → (𝑁 − 1) ∈ ℤ)
35 dvdstr 15638 . . . . . . 7 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ (𝑁 − 1) ∈ ℤ) → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴𝐴 ∥ (𝑁 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)))
3624, 5, 34, 35syl3anc 1368 . . . . . 6 (𝜑 → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴𝐴 ∥ (𝑁 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)))
374, 18, 36mp2and 698 . . . . 5 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1))
3823nnne0d 11675 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0)
39 dvdsval2 15602 . . . . . 6 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
4024, 38, 34, 39syl3anc 1368 . . . . 5 (𝜑 → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
4137, 40mpbid 235 . . . 4 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ)
42 pockthlem.5 . . . . . . 7 (𝜑𝑃 ∈ ℙ)
43 prmnn 16008 . . . . . . 7 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
4442, 43syl 17 . . . . . 6 (𝜑𝑃 ∈ ℕ)
45 pockthlem.9 . . . . . 6 (𝜑𝐶 ∈ ℤ)
4644nnzd 12074 . . . . . . . . . . 11 (𝜑𝑃 ∈ ℤ)
47 gcddvds 15842 . . . . . . . . . . 11 ((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
4845, 46, 47syl2anc 587 . . . . . . . . . 10 (𝜑 → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
4948simpld 498 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝐶)
5048simprd 499 . . . . . . . . . 10 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑃)
51 pockthlem.6 . . . . . . . . . 10 (𝜑𝑃𝑁)
5245, 46gcdcld 15847 . . . . . . . . . . . 12 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ0)
5352nn0zd 12073 . . . . . . . . . . 11 (𝜑 → (𝐶 gcd 𝑃) ∈ ℤ)
54 df-2 11688 . . . . . . . . . . . . . . . 16 2 = (1 + 1)
5554fveq2i 6648 . . . . . . . . . . . . . . 15 (ℤ‘2) = (ℤ‘(1 + 1))
5630, 55eleqtrrdi 2901 . . . . . . . . . . . . . 14 (𝜑𝑁 ∈ (ℤ‘2))
57 eluz2b2 12309 . . . . . . . . . . . . . 14 (𝑁 ∈ (ℤ‘2) ↔ (𝑁 ∈ ℕ ∧ 1 < 𝑁))
5856, 57sylib 221 . . . . . . . . . . . . 13 (𝜑 → (𝑁 ∈ ℕ ∧ 1 < 𝑁))
5958simpld 498 . . . . . . . . . . . 12 (𝜑𝑁 ∈ ℕ)
6059nnzd 12074 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
61 dvdstr 15638 . . . . . . . . . . 11 (((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝑃 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((𝐶 gcd 𝑃) ∥ 𝑃𝑃𝑁) → (𝐶 gcd 𝑃) ∥ 𝑁))
6253, 46, 60, 61syl3anc 1368 . . . . . . . . . 10 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝑃𝑃𝑁) → (𝐶 gcd 𝑃) ∥ 𝑁))
6350, 51, 62mp2and 698 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑁)
6459nnne0d 11675 . . . . . . . . . . 11 (𝜑𝑁 ≠ 0)
65 simpr 488 . . . . . . . . . . . 12 ((𝐶 = 0 ∧ 𝑁 = 0) → 𝑁 = 0)
6665necon3ai 3012 . . . . . . . . . . 11 (𝑁 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
6764, 66syl 17 . . . . . . . . . 10 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
68 dvdslegcd 15843 . . . . . . . . . 10 ((((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑁 = 0)) → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
6953, 45, 60, 67, 68syl31anc 1370 . . . . . . . . 9 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
7049, 63, 69mp2and 698 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁))
71 pockthlem.10 . . . . . . . . . . 11 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = 1)
7271oveq1d 7150 . . . . . . . . . 10 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = (1 gcd 𝑁))
7333nnnn0d 11943 . . . . . . . . . . . 12 (𝜑 → (𝑁 − 1) ∈ ℕ0)
74 zexpcl 13440 . . . . . . . . . . . 12 ((𝐶 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ0) → (𝐶↑(𝑁 − 1)) ∈ ℤ)
7545, 73, 74syl2anc 587 . . . . . . . . . . 11 (𝜑 → (𝐶↑(𝑁 − 1)) ∈ ℤ)
76 modgcd 15870 . . . . . . . . . . 11 (((𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
7775, 59, 76syl2anc 587 . . . . . . . . . 10 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
78 gcdcom 15852 . . . . . . . . . . . 12 ((1 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (1 gcd 𝑁) = (𝑁 gcd 1))
7925, 60, 78sylancr 590 . . . . . . . . . . 11 (𝜑 → (1 gcd 𝑁) = (𝑁 gcd 1))
80 gcd1 15866 . . . . . . . . . . . 12 (𝑁 ∈ ℤ → (𝑁 gcd 1) = 1)
8160, 80syl 17 . . . . . . . . . . 11 (𝜑 → (𝑁 gcd 1) = 1)
8279, 81eqtrd 2833 . . . . . . . . . 10 (𝜑 → (1 gcd 𝑁) = 1)
8372, 77, 823eqtr3d 2841 . . . . . . . . 9 (𝜑 → ((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1)
84 rpexp 16054 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ) → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
8545, 60, 33, 84syl3anc 1368 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
8683, 85mpbid 235 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑁) = 1)
8770, 86breqtrd 5056 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ≤ 1)
8844nnne0d 11675 . . . . . . . . . 10 (𝜑𝑃 ≠ 0)
89 simpr 488 . . . . . . . . . . 11 ((𝐶 = 0 ∧ 𝑃 = 0) → 𝑃 = 0)
9089necon3ai 3012 . . . . . . . . . 10 (𝑃 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
9188, 90syl 17 . . . . . . . . 9 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
92 gcdn0cl 15841 . . . . . . . . 9 (((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑃 = 0)) → (𝐶 gcd 𝑃) ∈ ℕ)
9345, 46, 91, 92syl21anc 836 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ)
94 nnle1eq1 11655 . . . . . . . 8 ((𝐶 gcd 𝑃) ∈ ℕ → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
9593, 94syl 17 . . . . . . 7 (𝜑 → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
9687, 95mpbid 235 . . . . . 6 (𝜑 → (𝐶 gcd 𝑃) = 1)
97 odzcl 16120 . . . . . 6 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∈ ℕ)
9844, 45, 96, 97syl3anc 1368 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∈ ℕ)
9998nnzd 12074 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∈ ℤ)
10059nnred 11640 . . . . . . . . . 10 (𝜑𝑁 ∈ ℝ)
10158simprd 499 . . . . . . . . . 10 (𝜑 → 1 < 𝑁)
102 1mod 13266 . . . . . . . . . 10 ((𝑁 ∈ ℝ ∧ 1 < 𝑁) → (1 mod 𝑁) = 1)
103100, 101, 102syl2anc 587 . . . . . . . . 9 (𝜑 → (1 mod 𝑁) = 1)
10471, 103eqtr4d 2836 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁))
105 1zzd 12001 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
106 moddvds 15610 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 1 ∈ ℤ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
10759, 75, 105, 106syl3anc 1368 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
108104, 107mpbid 235 . . . . . . 7 (𝜑𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1))
109 peano2zm 12013 . . . . . . . . 9 ((𝐶↑(𝑁 − 1)) ∈ ℤ → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
11075, 109syl 17 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
111 dvdstr 15638 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ) → ((𝑃𝑁𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)) → 𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11246, 60, 110, 111syl3anc 1368 . . . . . . 7 (𝜑 → ((𝑃𝑁𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)) → 𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11351, 108, 112mp2and 698 . . . . . 6 (𝜑𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1))
114 odzdvds 16122 . . . . . . 7 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ (𝑁 − 1) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
11544, 45, 96, 73, 114syl31anc 1370 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
116113, 115mpbid 235 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑁 − 1))
11733nncnd 11641 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℂ)
11823nncnd 11641 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℂ)
119117, 118, 38divcan1d 11406 . . . . 5 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) = (𝑁 − 1))
120116, 119breqtrrd 5058 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))))
121 nprmdvds1 16040 . . . . . 6 (𝑃 ∈ ℙ → ¬ 𝑃 ∥ 1)
12242, 121syl 17 . . . . 5 (𝜑 → ¬ 𝑃 ∥ 1)
12320nnzd 12074 . . . . . . . . . . . . . 14 (𝜑𝑄 ∈ ℤ)
124 iddvdsexp 15625 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) → 𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
125123, 21, 124syl2anc 587 . . . . . . . . . . . . 13 (𝜑𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
126 dvdstr 15638 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)) ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)) → 𝑄 ∥ (𝑁 − 1)))
127123, 24, 34, 126syl3anc 1368 . . . . . . . . . . . . 13 (𝜑 → ((𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)) ∧ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1)) → 𝑄 ∥ (𝑁 − 1)))
128125, 37, 127mp2and 698 . . . . . . . . . . . 12 (𝜑𝑄 ∥ (𝑁 − 1))
12920nnne0d 11675 . . . . . . . . . . . . 13 (𝜑𝑄 ≠ 0)
130 dvdsval2 15602 . . . . . . . . . . . . 13 ((𝑄 ∈ ℤ ∧ 𝑄 ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
131123, 129, 34, 130syl3anc 1368 . . . . . . . . . . . 12 (𝜑 → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
132128, 131mpbid 235 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℤ)
13373nn0ge0d 11946 . . . . . . . . . . . 12 (𝜑 → 0 ≤ (𝑁 − 1))
13433nnred 11640 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ ℝ)
13520nnred 11640 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℝ)
13620nngt0d 11674 . . . . . . . . . . . . 13 (𝜑 → 0 < 𝑄)
137 ge0div 11496 . . . . . . . . . . . . 13 (((𝑁 − 1) ∈ ℝ ∧ 𝑄 ∈ ℝ ∧ 0 < 𝑄) → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
138134, 135, 136, 137syl3anc 1368 . . . . . . . . . . . 12 (𝜑 → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
139133, 138mpbid 235 . . . . . . . . . . 11 (𝜑 → 0 ≤ ((𝑁 − 1) / 𝑄))
140 elnn0z 11982 . . . . . . . . . . 11 (((𝑁 − 1) / 𝑄) ∈ ℕ0 ↔ (((𝑁 − 1) / 𝑄) ∈ ℤ ∧ 0 ≤ ((𝑁 − 1) / 𝑄)))
141132, 139, 140sylanbrc 586 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℕ0)
142 zexpcl 13440 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
14345, 141, 142syl2anc 587 . . . . . . . . 9 (𝜑 → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
144 peano2zm 12013 . . . . . . . . 9 ((𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
145143, 144syl 17 . . . . . . . 8 (𝜑 → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
146 dvdsgcd 15882 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14746, 145, 60, 146syl3anc 1368 . . . . . . 7 (𝜑 → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14851, 147mpan2d 693 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
149 odzdvds 16122 . . . . . . . 8 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
15044, 45, 96, 141, 149syl31anc 1370 . . . . . . 7 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
15120nncnd 11641 . . . . . . . . . . 11 (𝜑𝑄 ∈ ℂ)
15221nnzd 12074 . . . . . . . . . . 11 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℤ)
153151, 129, 152expm1d 13516 . . . . . . . . . 10 (𝜑 → (𝑄↑((𝑄 pCnt 𝐴) − 1)) = ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄))
154153oveq2d 7151 . . . . . . . . 9 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
155134, 23nndivred 11679 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℝ)
156155recnd 10658 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℂ)
157156, 118, 151, 129divassd 11440 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
158119oveq1d 7150 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = ((𝑁 − 1) / 𝑄))
159154, 157, 1583eqtr2d 2839 . . . . . . . 8 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = ((𝑁 − 1) / 𝑄))
160159breq2d 5042 . . . . . . 7 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
161150, 160bitr4d 285 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1)))))
162 pockthlem.11 . . . . . . 7 (𝜑 → (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) = 1)
163162breq2d 5042 . . . . . 6 (𝜑 → (𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) ↔ 𝑃 ∥ 1))
164148, 161, 1633imtr3d 296 . . . . 5 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) → 𝑃 ∥ 1))
165122, 164mtod 201 . . . 4 (𝜑 → ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))
166 prmpwdvds 16230 . . . 4 (((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ) ∧ (𝑄 ∈ ℙ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) ∧ (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) ∧ ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
16741, 99, 1, 21, 120, 165, 166syl222anc 1383 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
168 odzphi 16123 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
16944, 45, 96, 168syl3anc 1368 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
170 phiprm 16104 . . . . 5 (𝑃 ∈ ℙ → (ϕ‘𝑃) = (𝑃 − 1))
17142, 170syl 17 . . . 4 (𝜑 → (ϕ‘𝑃) = (𝑃 − 1))
172169, 171breqtrd 5056 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑃 − 1))
173 prmuz2 16030 . . . . . . . . 9 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
17442, 173syl 17 . . . . . . . 8 (𝜑𝑃 ∈ (ℤ‘2))
175174, 55eleqtrdi 2900 . . . . . . 7 (𝜑𝑃 ∈ (ℤ‘(1 + 1)))
176 eluzp1m1 12256 . . . . . . 7 ((1 ∈ ℤ ∧ 𝑃 ∈ (ℤ‘(1 + 1))) → (𝑃 − 1) ∈ (ℤ‘1))
17725, 175, 176sylancr 590 . . . . . 6 (𝜑 → (𝑃 − 1) ∈ (ℤ‘1))
178177, 26eleqtrrdi 2901 . . . . 5 (𝜑 → (𝑃 − 1) ∈ ℕ)
179178nnzd 12074 . . . 4 (𝜑 → (𝑃 − 1) ∈ ℤ)
180 dvdstr 15638 . . . 4 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ ∧ (𝑃 − 1) ∈ ℤ) → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶) ∧ ((od𝑃)‘𝐶) ∥ (𝑃 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
18124, 99, 179, 180syl3anc 1368 . . 3 (𝜑 → (((𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶) ∧ ((od𝑃)‘𝐶) ∥ (𝑃 − 1)) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
182167, 172, 181mp2and 698 . 2 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1))
183 pcdvdsb 16195 . . 3 ((𝑄 ∈ ℙ ∧ (𝑃 − 1) ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ0) → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
1841, 179, 22, 183syl3anc 1368 . 2 (𝜑 → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
185182, 184mpbird 260 1 (𝜑 → (𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 209  wa 399   = wceq 1538  wcel 2111  wne 2987   class class class wbr 5030  cfv 6324  (class class class)co 7135  cc 10524  cr 10525  0cc0 10526  1c1 10527   + caddc 10529   · cmul 10531   < clt 10664  cle 10665  cmin 10859   / cdiv 11286  cn 11625  2c2 11680  0cn0 11885  cz 11969  cuz 12231   mod cmo 13232  cexp 13425  cdvds 15599   gcd cgcd 15833  cprime 16005  odcodz 16090  ϕcphi 16091   pCnt cpc 16163
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-rep 5154  ax-sep 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295  ax-un 7441  ax-cnex 10582  ax-resscn 10583  ax-1cn 10584  ax-icn 10585  ax-addcl 10586  ax-addrcl 10587  ax-mulcl 10588  ax-mulrcl 10589  ax-mulcom 10590  ax-addass 10591  ax-mulass 10592  ax-distr 10593  ax-i2m1 10594  ax-1ne0 10595  ax-1rid 10596  ax-rnegex 10597  ax-rrecex 10598  ax-cnre 10599  ax-pre-lttri 10600  ax-pre-lttrn 10601  ax-pre-ltadd 10602  ax-pre-mulgt0 10603  ax-pre-sup 10604
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rmo 3114  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4801  df-int 4839  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-tr 5137  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-pred 6116  df-ord 6162  df-on 6163  df-lim 6164  df-suc 6165  df-iota 6283  df-fun 6326  df-fn 6327  df-f 6328  df-f1 6329  df-fo 6330  df-f1o 6331  df-fv 6332  df-riota 7093  df-ov 7138  df-oprab 7139  df-mpo 7140  df-om 7561  df-1st 7671  df-2nd 7672  df-wrecs 7930  df-recs 7991  df-rdg 8029  df-1o 8085  df-2o 8086  df-oadd 8089  df-er 8272  df-map 8391  df-en 8493  df-dom 8494  df-sdom 8495  df-fin 8496  df-sup 8890  df-inf 8891  df-dju 9314  df-card 9352  df-pnf 10666  df-mnf 10667  df-xr 10668  df-ltxr 10669  df-le 10670  df-sub 10861  df-neg 10862  df-div 11287  df-nn 11626  df-2 11688  df-3 11689  df-n0 11886  df-xnn0 11956  df-z 11970  df-uz 12232  df-q 12337  df-rp 12378  df-fz 12886  df-fzo 13029  df-fl 13157  df-mod 13233  df-seq 13365  df-exp 13426  df-hash 13687  df-cj 14450  df-re 14451  df-im 14452  df-sqrt 14586  df-abs 14587  df-dvds 15600  df-gcd 15834  df-prm 16006  df-odz 16092  df-phi 16093  df-pc 16164
This theorem is referenced by:  pockthg  16232
  Copyright terms: Public domain W3C validator