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

Theorem pockthlem 16788
Description: Lemma for pockthg 16789. (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 . . . . . 6 (𝜑𝑄 ∈ ℙ)
2 prmnn 16561 . . . . . 6 (𝑄 ∈ ℙ → 𝑄 ∈ ℕ)
31, 2syl 17 . . . . 5 (𝜑𝑄 ∈ ℕ)
4 pockthlem.8 . . . . . 6 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ)
54nnnn0d 12482 . . . . 5 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ0)
63, 5nnexpcld 14158 . . . 4 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℕ)
76nnzd 12535 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ)
8 pockthlem.5 . . . . . 6 (𝜑𝑃 ∈ ℙ)
9 prmnn 16561 . . . . . 6 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
108, 9syl 17 . . . . 5 (𝜑𝑃 ∈ ℕ)
11 pockthlem.9 . . . . 5 (𝜑𝐶 ∈ ℤ)
1210nnzd 12535 . . . . . . . . . 10 (𝜑𝑃 ∈ ℤ)
13 gcddvds 16394 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
1411, 12, 13syl2anc 584 . . . . . . . . 9 (𝜑 → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
1514simpld 495 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝐶)
1611, 12gcdcld 16399 . . . . . . . . . 10 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ0)
1716nn0zd 12534 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∈ ℤ)
18 pockthg.4 . . . . . . . . . . . . . 14 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
19 pockthg.1 . . . . . . . . . . . . . . . . 17 (𝜑𝐴 ∈ ℕ)
20 pockthg.2 . . . . . . . . . . . . . . . . 17 (𝜑𝐵 ∈ ℕ)
2119, 20nnmulcld 12215 . . . . . . . . . . . . . . . 16 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
22 nnuz 12815 . . . . . . . . . . . . . . . 16 ℕ = (ℤ‘1)
2321, 22eleqtrdi 2842 . . . . . . . . . . . . . . 15 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
24 eluzp1p1 12800 . . . . . . . . . . . . . . 15 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2523, 24syl 17 . . . . . . . . . . . . . 14 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2618, 25eqeltrd 2832 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ (ℤ‘(1 + 1)))
27 df-2 12225 . . . . . . . . . . . . . 14 2 = (1 + 1)
2827fveq2i 6850 . . . . . . . . . . . . 13 (ℤ‘2) = (ℤ‘(1 + 1))
2926, 28eleqtrrdi 2843 . . . . . . . . . . . 12 (𝜑𝑁 ∈ (ℤ‘2))
30 eluz2b2 12855 . . . . . . . . . . . 12 (𝑁 ∈ (ℤ‘2) ↔ (𝑁 ∈ ℕ ∧ 1 < 𝑁))
3129, 30sylib 217 . . . . . . . . . . 11 (𝜑 → (𝑁 ∈ ℕ ∧ 1 < 𝑁))
3231simpld 495 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
3332nnzd 12535 . . . . . . . . 9 (𝜑𝑁 ∈ ℤ)
3414simprd 496 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑃)
35 pockthlem.6 . . . . . . . . 9 (𝜑𝑃𝑁)
3617, 12, 33, 34, 35dvdstrd 16188 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑁)
3732nnne0d 12212 . . . . . . . . . 10 (𝜑𝑁 ≠ 0)
38 simpr 485 . . . . . . . . . . 11 ((𝐶 = 0 ∧ 𝑁 = 0) → 𝑁 = 0)
3938necon3ai 2964 . . . . . . . . . 10 (𝑁 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
4037, 39syl 17 . . . . . . . . 9 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
41 dvdslegcd 16395 . . . . . . . . 9 ((((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑁 = 0)) → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
4217, 11, 33, 40, 41syl31anc 1373 . . . . . . . 8 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
4315, 36, 42mp2and 697 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁))
44 pockthlem.10 . . . . . . . . . 10 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = 1)
4544oveq1d 7377 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = (1 gcd 𝑁))
46 1z 12542 . . . . . . . . . . . . . 14 1 ∈ ℤ
47 eluzp1m1 12798 . . . . . . . . . . . . . 14 ((1 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘(1 + 1))) → (𝑁 − 1) ∈ (ℤ‘1))
4846, 26, 47sylancr 587 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ (ℤ‘1))
4948, 22eleqtrrdi 2843 . . . . . . . . . . . 12 (𝜑 → (𝑁 − 1) ∈ ℕ)
5049nnnn0d 12482 . . . . . . . . . . 11 (𝜑 → (𝑁 − 1) ∈ ℕ0)
51 zexpcl 13992 . . . . . . . . . . 11 ((𝐶 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ0) → (𝐶↑(𝑁 − 1)) ∈ ℤ)
5211, 50, 51syl2anc 584 . . . . . . . . . 10 (𝜑 → (𝐶↑(𝑁 − 1)) ∈ ℤ)
53 modgcd 16424 . . . . . . . . . 10 (((𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
5452, 32, 53syl2anc 584 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
55 gcdcom 16404 . . . . . . . . . . 11 ((1 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (1 gcd 𝑁) = (𝑁 gcd 1))
5646, 33, 55sylancr 587 . . . . . . . . . 10 (𝜑 → (1 gcd 𝑁) = (𝑁 gcd 1))
57 gcd1 16419 . . . . . . . . . . 11 (𝑁 ∈ ℤ → (𝑁 gcd 1) = 1)
5833, 57syl 17 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 1) = 1)
5956, 58eqtrd 2771 . . . . . . . . 9 (𝜑 → (1 gcd 𝑁) = 1)
6045, 54, 593eqtr3d 2779 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1)
61 rpexp 16609 . . . . . . . . 9 ((𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ) → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
6211, 33, 49, 61syl3anc 1371 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
6360, 62mpbid 231 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑁) = 1)
6443, 63breqtrd 5136 . . . . . 6 (𝜑 → (𝐶 gcd 𝑃) ≤ 1)
6510nnne0d 12212 . . . . . . . . 9 (𝜑𝑃 ≠ 0)
66 simpr 485 . . . . . . . . . 10 ((𝐶 = 0 ∧ 𝑃 = 0) → 𝑃 = 0)
6766necon3ai 2964 . . . . . . . . 9 (𝑃 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
6865, 67syl 17 . . . . . . . 8 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
69 gcdn0cl 16393 . . . . . . . 8 (((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑃 = 0)) → (𝐶 gcd 𝑃) ∈ ℕ)
7011, 12, 68, 69syl21anc 836 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ)
71 nnle1eq1 12192 . . . . . . 7 ((𝐶 gcd 𝑃) ∈ ℕ → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
7270, 71syl 17 . . . . . 6 (𝜑 → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
7364, 72mpbid 231 . . . . 5 (𝜑 → (𝐶 gcd 𝑃) = 1)
74 odzcl 16676 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∈ ℕ)
7510, 11, 73, 74syl3anc 1371 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∈ ℕ)
7675nnzd 12535 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∈ ℤ)
77 prmuz2 16583 . . . . . . . 8 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
788, 77syl 17 . . . . . . 7 (𝜑𝑃 ∈ (ℤ‘2))
7978, 28eleqtrdi 2842 . . . . . 6 (𝜑𝑃 ∈ (ℤ‘(1 + 1)))
80 eluzp1m1 12798 . . . . . 6 ((1 ∈ ℤ ∧ 𝑃 ∈ (ℤ‘(1 + 1))) → (𝑃 − 1) ∈ (ℤ‘1))
8146, 79, 80sylancr 587 . . . . 5 (𝜑 → (𝑃 − 1) ∈ (ℤ‘1))
8281, 22eleqtrrdi 2843 . . . 4 (𝜑 → (𝑃 − 1) ∈ ℕ)
8382nnzd 12535 . . 3 (𝜑 → (𝑃 − 1) ∈ ℤ)
8419nnzd 12535 . . . . . 6 (𝜑𝐴 ∈ ℤ)
8549nnzd 12535 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℤ)
86 pcdvds 16747 . . . . . . 7 ((𝑄 ∈ ℙ ∧ 𝐴 ∈ ℕ) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
871, 19, 86syl2anc 584 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
8820nnzd 12535 . . . . . . . 8 (𝜑𝐵 ∈ ℤ)
89 dvdsmul1 16171 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → 𝐴 ∥ (𝐴 · 𝐵))
9084, 88, 89syl2anc 584 . . . . . . 7 (𝜑𝐴 ∥ (𝐴 · 𝐵))
9118oveq1d 7377 . . . . . . . 8 (𝜑 → (𝑁 − 1) = (((𝐴 · 𝐵) + 1) − 1))
9221nncnd 12178 . . . . . . . . 9 (𝜑 → (𝐴 · 𝐵) ∈ ℂ)
93 ax-1cn 11118 . . . . . . . . 9 1 ∈ ℂ
94 pncan 11416 . . . . . . . . 9 (((𝐴 · 𝐵) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
9592, 93, 94sylancl 586 . . . . . . . 8 (𝜑 → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
9691, 95eqtrd 2771 . . . . . . 7 (𝜑 → (𝑁 − 1) = (𝐴 · 𝐵))
9790, 96breqtrrd 5138 . . . . . 6 (𝜑𝐴 ∥ (𝑁 − 1))
987, 84, 85, 87, 97dvdstrd 16188 . . . . 5 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1))
996nnne0d 12212 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0)
100 dvdsval2 16150 . . . . . 6 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
1017, 99, 85, 100syl3anc 1371 . . . . 5 (𝜑 → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
10298, 101mpbid 231 . . . 4 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ)
103 peano2zm 12555 . . . . . . . 8 ((𝐶↑(𝑁 − 1)) ∈ ℤ → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
10452, 103syl 17 . . . . . . 7 (𝜑 → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
10532nnred 12177 . . . . . . . . . 10 (𝜑𝑁 ∈ ℝ)
10631simprd 496 . . . . . . . . . 10 (𝜑 → 1 < 𝑁)
107 1mod 13818 . . . . . . . . . 10 ((𝑁 ∈ ℝ ∧ 1 < 𝑁) → (1 mod 𝑁) = 1)
108105, 106, 107syl2anc 584 . . . . . . . . 9 (𝜑 → (1 mod 𝑁) = 1)
10944, 108eqtr4d 2774 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁))
110 1zzd 12543 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
111 moddvds 16158 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 1 ∈ ℤ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11232, 52, 110, 111syl3anc 1371 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
113109, 112mpbid 231 . . . . . . 7 (𝜑𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1))
11412, 33, 104, 35, 113dvdstrd 16188 . . . . . 6 (𝜑𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1))
115 odzdvds 16678 . . . . . . 7 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ (𝑁 − 1) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
11610, 11, 73, 50, 115syl31anc 1373 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
117114, 116mpbid 231 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑁 − 1))
11849nncnd 12178 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℂ)
1196nncnd 12178 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℂ)
120118, 119, 99divcan1d 11941 . . . . 5 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) = (𝑁 − 1))
121117, 120breqtrrd 5138 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))))
122 nprmdvds1 16593 . . . . . 6 (𝑃 ∈ ℙ → ¬ 𝑃 ∥ 1)
1238, 122syl 17 . . . . 5 (𝜑 → ¬ 𝑃 ∥ 1)
1243nnzd 12535 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℤ)
125 iddvdsexp 16173 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) → 𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
126124, 4, 125syl2anc 584 . . . . . . . . . . . . 13 (𝜑𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
127124, 7, 85, 126, 98dvdstrd 16188 . . . . . . . . . . . 12 (𝜑𝑄 ∥ (𝑁 − 1))
1283nnne0d 12212 . . . . . . . . . . . . 13 (𝜑𝑄 ≠ 0)
129 dvdsval2 16150 . . . . . . . . . . . . 13 ((𝑄 ∈ ℤ ∧ 𝑄 ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
130124, 128, 85, 129syl3anc 1371 . . . . . . . . . . . 12 (𝜑 → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
131127, 130mpbid 231 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℤ)
13250nn0ge0d 12485 . . . . . . . . . . . 12 (𝜑 → 0 ≤ (𝑁 − 1))
13349nnred 12177 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ ℝ)
1343nnred 12177 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℝ)
1353nngt0d 12211 . . . . . . . . . . . . 13 (𝜑 → 0 < 𝑄)
136 ge0div 12031 . . . . . . . . . . . . 13 (((𝑁 − 1) ∈ ℝ ∧ 𝑄 ∈ ℝ ∧ 0 < 𝑄) → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
137133, 134, 135, 136syl3anc 1371 . . . . . . . . . . . 12 (𝜑 → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
138132, 137mpbid 231 . . . . . . . . . . 11 (𝜑 → 0 ≤ ((𝑁 − 1) / 𝑄))
139 elnn0z 12521 . . . . . . . . . . 11 (((𝑁 − 1) / 𝑄) ∈ ℕ0 ↔ (((𝑁 − 1) / 𝑄) ∈ ℤ ∧ 0 ≤ ((𝑁 − 1) / 𝑄)))
140131, 138, 139sylanbrc 583 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℕ0)
141 zexpcl 13992 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
14211, 140, 141syl2anc 584 . . . . . . . . 9 (𝜑 → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
143 peano2zm 12555 . . . . . . . . 9 ((𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
144142, 143syl 17 . . . . . . . 8 (𝜑 → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
145 dvdsgcd 16436 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14612, 144, 33, 145syl3anc 1371 . . . . . . 7 (𝜑 → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14735, 146mpan2d 692 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
148 odzdvds 16678 . . . . . . . 8 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
14910, 11, 73, 140, 148syl31anc 1373 . . . . . . 7 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
1503nncnd 12178 . . . . . . . . . . 11 (𝜑𝑄 ∈ ℂ)
1514nnzd 12535 . . . . . . . . . . 11 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℤ)
152150, 128, 151expm1d 14071 . . . . . . . . . 10 (𝜑 → (𝑄↑((𝑄 pCnt 𝐴) − 1)) = ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄))
153152oveq2d 7378 . . . . . . . . 9 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
154133, 6nndivred 12216 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℝ)
155154recnd 11192 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℂ)
156155, 119, 150, 128divassd 11975 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
157120oveq1d 7377 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = ((𝑁 − 1) / 𝑄))
158153, 156, 1573eqtr2d 2777 . . . . . . . 8 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = ((𝑁 − 1) / 𝑄))
159158breq2d 5122 . . . . . . 7 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
160149, 159bitr4d 281 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1)))))
161 pockthlem.11 . . . . . . 7 (𝜑 → (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) = 1)
162161breq2d 5122 . . . . . 6 (𝜑 → (𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) ↔ 𝑃 ∥ 1))
163147, 160, 1623imtr3d 292 . . . . 5 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) → 𝑃 ∥ 1))
164123, 163mtod 197 . . . 4 (𝜑 → ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))
165 prmpwdvds 16787 . . . 4 (((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ) ∧ (𝑄 ∈ ℙ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) ∧ (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) ∧ ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
166102, 76, 1, 4, 121, 164, 165syl222anc 1386 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
167 odzphi 16679 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
16810, 11, 73, 167syl3anc 1371 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
169 phiprm 16660 . . . . 5 (𝑃 ∈ ℙ → (ϕ‘𝑃) = (𝑃 − 1))
1708, 169syl 17 . . . 4 (𝜑 → (ϕ‘𝑃) = (𝑃 − 1))
171168, 170breqtrd 5136 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑃 − 1))
1727, 76, 83, 166, 171dvdstrd 16188 . 2 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1))
173 pcdvdsb 16752 . . 3 ((𝑄 ∈ ℙ ∧ (𝑃 − 1) ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ0) → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
1741, 83, 5, 173syl3anc 1371 . 2 (𝜑 → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
175172, 174mpbird 256 1 (𝜑 → (𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396   = wceq 1541  wcel 2106  wne 2939   class class class wbr 5110  cfv 6501  (class class class)co 7362  cc 11058  cr 11059  0cc0 11060  1c1 11061   + caddc 11063   · cmul 11065   < clt 11198  cle 11199  cmin 11394   / cdiv 11821  cn 12162  2c2 12217  0cn0 12422  cz 12508  cuz 12772   mod cmo 13784  cexp 13977  cdvds 16147   gcd cgcd 16385  cprime 16558  odcodz 16646  ϕcphi 16647   pCnt cpc 16719
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 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2702  ax-rep 5247  ax-sep 5261  ax-nul 5268  ax-pow 5325  ax-pr 5389  ax-un 7677  ax-cnex 11116  ax-resscn 11117  ax-1cn 11118  ax-icn 11119  ax-addcl 11120  ax-addrcl 11121  ax-mulcl 11122  ax-mulrcl 11123  ax-mulcom 11124  ax-addass 11125  ax-mulass 11126  ax-distr 11127  ax-i2m1 11128  ax-1ne0 11129  ax-1rid 11130  ax-rnegex 11131  ax-rrecex 11132  ax-cnre 11133  ax-pre-lttri 11134  ax-pre-lttrn 11135  ax-pre-ltadd 11136  ax-pre-mulgt0 11137  ax-pre-sup 11138
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-rmo 3351  df-reu 3352  df-rab 3406  df-v 3448  df-sbc 3743  df-csb 3859  df-dif 3916  df-un 3918  df-in 3920  df-ss 3930  df-pss 3932  df-nul 4288  df-if 4492  df-pw 4567  df-sn 4592  df-pr 4594  df-op 4598  df-uni 4871  df-int 4913  df-iun 4961  df-br 5111  df-opab 5173  df-mpt 5194  df-tr 5228  df-id 5536  df-eprel 5542  df-po 5550  df-so 5551  df-fr 5593  df-we 5595  df-xp 5644  df-rel 5645  df-cnv 5646  df-co 5647  df-dm 5648  df-rn 5649  df-res 5650  df-ima 5651  df-pred 6258  df-ord 6325  df-on 6326  df-lim 6327  df-suc 6328  df-iota 6453  df-fun 6503  df-fn 6504  df-f 6505  df-f1 6506  df-fo 6507  df-f1o 6508  df-fv 6509  df-riota 7318  df-ov 7365  df-oprab 7366  df-mpo 7367  df-om 7808  df-1st 7926  df-2nd 7927  df-frecs 8217  df-wrecs 8248  df-recs 8322  df-rdg 8361  df-1o 8417  df-2o 8418  df-oadd 8421  df-er 8655  df-en 8891  df-dom 8892  df-sdom 8893  df-fin 8894  df-sup 9387  df-inf 9388  df-dju 9846  df-card 9884  df-pnf 11200  df-mnf 11201  df-xr 11202  df-ltxr 11203  df-le 11204  df-sub 11396  df-neg 11397  df-div 11822  df-nn 12163  df-2 12225  df-3 12226  df-n0 12423  df-xnn0 12495  df-z 12509  df-uz 12773  df-q 12883  df-rp 12925  df-fz 13435  df-fzo 13578  df-fl 13707  df-mod 13785  df-seq 13917  df-exp 13978  df-hash 14241  df-cj 14996  df-re 14997  df-im 14998  df-sqrt 15132  df-abs 15133  df-dvds 16148  df-gcd 16386  df-prm 16559  df-odz 16648  df-phi 16649  df-pc 16720
This theorem is referenced by:  pockthg  16789
  Copyright terms: Public domain W3C validator