ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  pockthlem GIF version

Theorem pockthlem 12265
Description: Lemma for pockthg 12266. (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 12021 . . . . . 6 (𝑄 ∈ ℙ → 𝑄 ∈ ℕ)
31, 2syl 14 . . . . 5 (𝜑𝑄 ∈ ℕ)
4 pockthlem.8 . . . . . 6 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ)
54nnnn0d 9158 . . . . 5 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℕ0)
63, 5nnexpcld 10599 . . . 4 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℕ)
76nnzd 9303 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ)
8 pockthlem.5 . . . . . 6 (𝜑𝑃 ∈ ℙ)
9 prmnn 12021 . . . . . 6 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
108, 9syl 14 . . . . 5 (𝜑𝑃 ∈ ℕ)
11 pockthlem.9 . . . . 5 (𝜑𝐶 ∈ ℤ)
1210nnzd 9303 . . . . . . . . . 10 (𝜑𝑃 ∈ ℤ)
13 gcddvds 11881 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
1411, 12, 13syl2anc 409 . . . . . . . . 9 (𝜑 → ((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑃))
1514simpld 111 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝐶)
1611, 12gcdcld 11886 . . . . . . . . . 10 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ0)
1716nn0zd 9302 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∈ ℤ)
18 pockthg.4 . . . . . . . . . . . . . 14 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
19 pockthg.1 . . . . . . . . . . . . . . . . 17 (𝜑𝐴 ∈ ℕ)
20 pockthg.2 . . . . . . . . . . . . . . . . 17 (𝜑𝐵 ∈ ℕ)
2119, 20nnmulcld 8897 . . . . . . . . . . . . . . . 16 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
22 nnuz 9492 . . . . . . . . . . . . . . . 16 ℕ = (ℤ‘1)
2321, 22eleqtrdi 2257 . . . . . . . . . . . . . . 15 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
24 eluzp1p1 9482 . . . . . . . . . . . . . . 15 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2523, 24syl 14 . . . . . . . . . . . . . 14 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
2618, 25eqeltrd 2241 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ (ℤ‘(1 + 1)))
27 df-2 8907 . . . . . . . . . . . . . 14 2 = (1 + 1)
2827fveq2i 5483 . . . . . . . . . . . . 13 (ℤ‘2) = (ℤ‘(1 + 1))
2926, 28eleqtrrdi 2258 . . . . . . . . . . . 12 (𝜑𝑁 ∈ (ℤ‘2))
30 eluz2b2 9532 . . . . . . . . . . . 12 (𝑁 ∈ (ℤ‘2) ↔ (𝑁 ∈ ℕ ∧ 1 < 𝑁))
3129, 30sylib 121 . . . . . . . . . . 11 (𝜑 → (𝑁 ∈ ℕ ∧ 1 < 𝑁))
3231simpld 111 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
3332nnzd 9303 . . . . . . . . 9 (𝜑𝑁 ∈ ℤ)
3414simprd 113 . . . . . . . . 9 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑃)
35 pockthlem.6 . . . . . . . . 9 (𝜑𝑃𝑁)
3617, 12, 33, 34, 35dvdstrd 11755 . . . . . . . 8 (𝜑 → (𝐶 gcd 𝑃) ∥ 𝑁)
3732nnne0d 8893 . . . . . . . . . 10 (𝜑𝑁 ≠ 0)
38 simpr 109 . . . . . . . . . . 11 ((𝐶 = 0 ∧ 𝑁 = 0) → 𝑁 = 0)
3938necon3ai 2383 . . . . . . . . . 10 (𝑁 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
4037, 39syl 14 . . . . . . . . 9 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑁 = 0))
41 dvdslegcd 11882 . . . . . . . . 9 ((((𝐶 gcd 𝑃) ∈ ℤ ∧ 𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑁 = 0)) → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
4217, 11, 33, 40, 41syl31anc 1230 . . . . . . . 8 (𝜑 → (((𝐶 gcd 𝑃) ∥ 𝐶 ∧ (𝐶 gcd 𝑃) ∥ 𝑁) → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁)))
4315, 36, 42mp2and 430 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ≤ (𝐶 gcd 𝑁))
44 pockthlem.10 . . . . . . . . . 10 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = 1)
4544oveq1d 5851 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = (1 gcd 𝑁))
46 1z 9208 . . . . . . . . . . . . . 14 1 ∈ ℤ
47 eluzp1m1 9480 . . . . . . . . . . . . . 14 ((1 ∈ ℤ ∧ 𝑁 ∈ (ℤ‘(1 + 1))) → (𝑁 − 1) ∈ (ℤ‘1))
4846, 26, 47sylancr 411 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ (ℤ‘1))
4948, 22eleqtrrdi 2258 . . . . . . . . . . . 12 (𝜑 → (𝑁 − 1) ∈ ℕ)
5049nnnn0d 9158 . . . . . . . . . . 11 (𝜑 → (𝑁 − 1) ∈ ℕ0)
51 zexpcl 10460 . . . . . . . . . . 11 ((𝐶 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ0) → (𝐶↑(𝑁 − 1)) ∈ ℤ)
5211, 50, 51syl2anc 409 . . . . . . . . . 10 (𝜑 → (𝐶↑(𝑁 − 1)) ∈ ℤ)
53 modgcd 11909 . . . . . . . . . 10 (((𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
5452, 32, 53syl2anc 409 . . . . . . . . 9 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) gcd 𝑁) = ((𝐶↑(𝑁 − 1)) gcd 𝑁))
55 gcdcom 11891 . . . . . . . . . . 11 ((1 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (1 gcd 𝑁) = (𝑁 gcd 1))
5646, 33, 55sylancr 411 . . . . . . . . . 10 (𝜑 → (1 gcd 𝑁) = (𝑁 gcd 1))
57 gcd1 11905 . . . . . . . . . . 11 (𝑁 ∈ ℤ → (𝑁 gcd 1) = 1)
5833, 57syl 14 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 1) = 1)
5956, 58eqtrd 2197 . . . . . . . . 9 (𝜑 → (1 gcd 𝑁) = 1)
6045, 54, 593eqtr3d 2205 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1)
61 rpexp 12064 . . . . . . . . 9 ((𝐶 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑁 − 1) ∈ ℕ) → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
6211, 33, 49, 61syl3anc 1227 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) gcd 𝑁) = 1 ↔ (𝐶 gcd 𝑁) = 1))
6360, 62mpbid 146 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑁) = 1)
6443, 63breqtrd 4002 . . . . . 6 (𝜑 → (𝐶 gcd 𝑃) ≤ 1)
6510nnne0d 8893 . . . . . . . . 9 (𝜑𝑃 ≠ 0)
66 simpr 109 . . . . . . . . . 10 ((𝐶 = 0 ∧ 𝑃 = 0) → 𝑃 = 0)
6766necon3ai 2383 . . . . . . . . 9 (𝑃 ≠ 0 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
6865, 67syl 14 . . . . . . . 8 (𝜑 → ¬ (𝐶 = 0 ∧ 𝑃 = 0))
69 gcdn0cl 11880 . . . . . . . 8 (((𝐶 ∈ ℤ ∧ 𝑃 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝑃 = 0)) → (𝐶 gcd 𝑃) ∈ ℕ)
7011, 12, 68, 69syl21anc 1226 . . . . . . 7 (𝜑 → (𝐶 gcd 𝑃) ∈ ℕ)
71 nnle1eq1 8872 . . . . . . 7 ((𝐶 gcd 𝑃) ∈ ℕ → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
7270, 71syl 14 . . . . . 6 (𝜑 → ((𝐶 gcd 𝑃) ≤ 1 ↔ (𝐶 gcd 𝑃) = 1))
7364, 72mpbid 146 . . . . 5 (𝜑 → (𝐶 gcd 𝑃) = 1)
74 odzcl 12154 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∈ ℕ)
7510, 11, 73, 74syl3anc 1227 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∈ ℕ)
7675nnzd 9303 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∈ ℤ)
77 prmuz2 12042 . . . . . . . 8 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
788, 77syl 14 . . . . . . 7 (𝜑𝑃 ∈ (ℤ‘2))
7978, 28eleqtrdi 2257 . . . . . 6 (𝜑𝑃 ∈ (ℤ‘(1 + 1)))
80 eluzp1m1 9480 . . . . . 6 ((1 ∈ ℤ ∧ 𝑃 ∈ (ℤ‘(1 + 1))) → (𝑃 − 1) ∈ (ℤ‘1))
8146, 79, 80sylancr 411 . . . . 5 (𝜑 → (𝑃 − 1) ∈ (ℤ‘1))
8281, 22eleqtrrdi 2258 . . . 4 (𝜑 → (𝑃 − 1) ∈ ℕ)
8382nnzd 9303 . . 3 (𝜑 → (𝑃 − 1) ∈ ℤ)
8419nnzd 9303 . . . . . 6 (𝜑𝐴 ∈ ℤ)
8549nnzd 9303 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℤ)
86 pcdvds 12225 . . . . . . 7 ((𝑄 ∈ ℙ ∧ 𝐴 ∈ ℕ) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
871, 19, 86syl2anc 409 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ 𝐴)
8820nnzd 9303 . . . . . . . 8 (𝜑𝐵 ∈ ℤ)
89 dvdsmul1 11739 . . . . . . . 8 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → 𝐴 ∥ (𝐴 · 𝐵))
9084, 88, 89syl2anc 409 . . . . . . 7 (𝜑𝐴 ∥ (𝐴 · 𝐵))
9118oveq1d 5851 . . . . . . . 8 (𝜑 → (𝑁 − 1) = (((𝐴 · 𝐵) + 1) − 1))
9221nncnd 8862 . . . . . . . . 9 (𝜑 → (𝐴 · 𝐵) ∈ ℂ)
93 ax-1cn 7837 . . . . . . . . 9 1 ∈ ℂ
94 pncan 8095 . . . . . . . . 9 (((𝐴 · 𝐵) ∈ ℂ ∧ 1 ∈ ℂ) → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
9592, 93, 94sylancl 410 . . . . . . . 8 (𝜑 → (((𝐴 · 𝐵) + 1) − 1) = (𝐴 · 𝐵))
9691, 95eqtrd 2197 . . . . . . 7 (𝜑 → (𝑁 − 1) = (𝐴 · 𝐵))
9790, 96breqtrrd 4004 . . . . . 6 (𝜑𝐴 ∥ (𝑁 − 1))
987, 84, 85, 87, 97dvdstrd 11755 . . . . 5 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1))
996nnne0d 8893 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0)
100 dvdsval2 11716 . . . . . 6 (((𝑄↑(𝑄 pCnt 𝐴)) ∈ ℤ ∧ (𝑄↑(𝑄 pCnt 𝐴)) ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
1017, 99, 85, 100syl3anc 1227 . . . . 5 (𝜑 → ((𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ))
10298, 101mpbid 146 . . . 4 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ)
103 peano2zm 9220 . . . . . . . 8 ((𝐶↑(𝑁 − 1)) ∈ ℤ → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
10452, 103syl 14 . . . . . . 7 (𝜑 → ((𝐶↑(𝑁 − 1)) − 1) ∈ ℤ)
105 nnq 9562 . . . . . . . . . . 11 (𝑁 ∈ ℕ → 𝑁 ∈ ℚ)
10632, 105syl 14 . . . . . . . . . 10 (𝜑𝑁 ∈ ℚ)
10731simprd 113 . . . . . . . . . 10 (𝜑 → 1 < 𝑁)
108 q1mod 10281 . . . . . . . . . 10 ((𝑁 ∈ ℚ ∧ 1 < 𝑁) → (1 mod 𝑁) = 1)
109106, 107, 108syl2anc 409 . . . . . . . . 9 (𝜑 → (1 mod 𝑁) = 1)
11044, 109eqtr4d 2200 . . . . . . . 8 (𝜑 → ((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁))
111 1zzd 9209 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
112 moddvds 11725 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐶↑(𝑁 − 1)) ∈ ℤ ∧ 1 ∈ ℤ) → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
11332, 52, 111, 112syl3anc 1227 . . . . . . . 8 (𝜑 → (((𝐶↑(𝑁 − 1)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1)))
114110, 113mpbid 146 . . . . . . 7 (𝜑𝑁 ∥ ((𝐶↑(𝑁 − 1)) − 1))
11512, 33, 104, 35, 114dvdstrd 11755 . . . . . 6 (𝜑𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1))
116 odzdvds 12156 . . . . . . 7 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ (𝑁 − 1) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
11710, 11, 73, 50, 116syl31anc 1230 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑(𝑁 − 1)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (𝑁 − 1)))
118115, 117mpbid 146 . . . . 5 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑁 − 1))
11949nncnd 8862 . . . . . 6 (𝜑 → (𝑁 − 1) ∈ ℂ)
1206nncnd 8862 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∈ ℂ)
1216nnap0d 8894 . . . . . 6 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) # 0)
122119, 120, 121divcanap1d 8678 . . . . 5 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) = (𝑁 − 1))
123118, 122breqtrrd 4004 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))))
124 nprmdvds1 12051 . . . . . 6 (𝑃 ∈ ℙ → ¬ 𝑃 ∥ 1)
1258, 124syl 14 . . . . 5 (𝜑 → ¬ 𝑃 ∥ 1)
1263nnzd 9303 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℤ)
127 iddvdsexp 11741 . . . . . . . . . . . . . 14 ((𝑄 ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) → 𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
128126, 4, 127syl2anc 409 . . . . . . . . . . . . 13 (𝜑𝑄 ∥ (𝑄↑(𝑄 pCnt 𝐴)))
129126, 7, 85, 128, 98dvdstrd 11755 . . . . . . . . . . . 12 (𝜑𝑄 ∥ (𝑁 − 1))
1303nnne0d 8893 . . . . . . . . . . . . 13 (𝜑𝑄 ≠ 0)
131 dvdsval2 11716 . . . . . . . . . . . . 13 ((𝑄 ∈ ℤ ∧ 𝑄 ≠ 0 ∧ (𝑁 − 1) ∈ ℤ) → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
132126, 130, 85, 131syl3anc 1227 . . . . . . . . . . . 12 (𝜑 → (𝑄 ∥ (𝑁 − 1) ↔ ((𝑁 − 1) / 𝑄) ∈ ℤ))
133129, 132mpbid 146 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℤ)
13450nn0ge0d 9161 . . . . . . . . . . . 12 (𝜑 → 0 ≤ (𝑁 − 1))
13549nnred 8861 . . . . . . . . . . . . 13 (𝜑 → (𝑁 − 1) ∈ ℝ)
1363nnred 8861 . . . . . . . . . . . . 13 (𝜑𝑄 ∈ ℝ)
1373nngt0d 8892 . . . . . . . . . . . . 13 (𝜑 → 0 < 𝑄)
138 ge0div 8757 . . . . . . . . . . . . 13 (((𝑁 − 1) ∈ ℝ ∧ 𝑄 ∈ ℝ ∧ 0 < 𝑄) → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
139135, 136, 137, 138syl3anc 1227 . . . . . . . . . . . 12 (𝜑 → (0 ≤ (𝑁 − 1) ↔ 0 ≤ ((𝑁 − 1) / 𝑄)))
140134, 139mpbid 146 . . . . . . . . . . 11 (𝜑 → 0 ≤ ((𝑁 − 1) / 𝑄))
141 elnn0z 9195 . . . . . . . . . . 11 (((𝑁 − 1) / 𝑄) ∈ ℕ0 ↔ (((𝑁 − 1) / 𝑄) ∈ ℤ ∧ 0 ≤ ((𝑁 − 1) / 𝑄)))
142133, 140, 141sylanbrc 414 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / 𝑄) ∈ ℕ0)
143 zexpcl 10460 . . . . . . . . . 10 ((𝐶 ∈ ℤ ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
14411, 142, 143syl2anc 409 . . . . . . . . 9 (𝜑 → (𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ)
145 peano2zm 9220 . . . . . . . . 9 ((𝐶↑((𝑁 − 1) / 𝑄)) ∈ ℤ → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
146144, 145syl 14 . . . . . . . 8 (𝜑 → ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ)
147 dvdsgcd 11930 . . . . . . . 8 ((𝑃 ∈ ℤ ∧ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14812, 146, 33, 147syl3anc 1227 . . . . . . 7 (𝜑 → ((𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ∧ 𝑃𝑁) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
14935, 148mpan2d 425 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) → 𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁)))
150 odzdvds 12156 . . . . . . . 8 (((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) ∧ ((𝑁 − 1) / 𝑄) ∈ ℕ0) → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
15110, 11, 73, 142, 150syl31anc 1230 . . . . . . 7 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
1523nncnd 8862 . . . . . . . . . . 11 (𝜑𝑄 ∈ ℂ)
1533nnap0d 8894 . . . . . . . . . . 11 (𝜑𝑄 # 0)
1544nnzd 9303 . . . . . . . . . . 11 (𝜑 → (𝑄 pCnt 𝐴) ∈ ℤ)
155152, 153, 154expm1apd 10587 . . . . . . . . . 10 (𝜑 → (𝑄↑((𝑄 pCnt 𝐴) − 1)) = ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄))
156155oveq2d 5852 . . . . . . . . 9 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
157135, 6nndivred 8898 . . . . . . . . . . 11 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℝ)
158157recnd 7918 . . . . . . . . . 10 (𝜑 → ((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℂ)
159158, 120, 152, 153divassapd 8713 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · ((𝑄↑(𝑄 pCnt 𝐴)) / 𝑄)))
160122oveq1d 5851 . . . . . . . . 9 (𝜑 → ((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) / 𝑄) = ((𝑁 − 1) / 𝑄))
161156, 159, 1603eqtr2d 2203 . . . . . . . 8 (𝜑 → (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) = ((𝑁 − 1) / 𝑄))
162161breq2d 3988 . . . . . . 7 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) ↔ ((od𝑃)‘𝐶) ∥ ((𝑁 − 1) / 𝑄)))
163151, 162bitr4d 190 . . . . . 6 (𝜑 → (𝑃 ∥ ((𝐶↑((𝑁 − 1) / 𝑄)) − 1) ↔ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1)))))
164 pockthlem.11 . . . . . . 7 (𝜑 → (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) = 1)
165164breq2d 3988 . . . . . 6 (𝜑 → (𝑃 ∥ (((𝐶↑((𝑁 − 1) / 𝑄)) − 1) gcd 𝑁) ↔ 𝑃 ∥ 1))
166149, 163, 1653imtr3d 201 . . . . 5 (𝜑 → (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))) → 𝑃 ∥ 1))
167125, 166mtod 653 . . . 4 (𝜑 → ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))
168 prmpwdvds 12264 . . . 4 (((((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) ∈ ℤ ∧ ((od𝑃)‘𝐶) ∈ ℤ) ∧ (𝑄 ∈ ℙ ∧ (𝑄 pCnt 𝐴) ∈ ℕ) ∧ (((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑(𝑄 pCnt 𝐴))) ∧ ¬ ((od𝑃)‘𝐶) ∥ (((𝑁 − 1) / (𝑄↑(𝑄 pCnt 𝐴))) · (𝑄↑((𝑄 pCnt 𝐴) − 1))))) → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
169102, 76, 1, 4, 123, 167, 168syl222anc 1243 . . 3 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ ((od𝑃)‘𝐶))
170 odzphi 12157 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝐶 ∈ ℤ ∧ (𝐶 gcd 𝑃) = 1) → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
17110, 11, 73, 170syl3anc 1227 . . . 4 (𝜑 → ((od𝑃)‘𝐶) ∥ (ϕ‘𝑃))
172 phiprm 12134 . . . . 5 (𝑃 ∈ ℙ → (ϕ‘𝑃) = (𝑃 − 1))
1738, 172syl 14 . . . 4 (𝜑 → (ϕ‘𝑃) = (𝑃 − 1))
174171, 173breqtrd 4002 . . 3 (𝜑 → ((od𝑃)‘𝐶) ∥ (𝑃 − 1))
1757, 76, 83, 169, 174dvdstrd 11755 . 2 (𝜑 → (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1))
176 pcdvdsb 12230 . . 3 ((𝑄 ∈ ℙ ∧ (𝑃 − 1) ∈ ℤ ∧ (𝑄 pCnt 𝐴) ∈ ℕ0) → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
1771, 83, 5, 176syl3anc 1227 . 2 (𝜑 → ((𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)) ↔ (𝑄↑(𝑄 pCnt 𝐴)) ∥ (𝑃 − 1)))
178175, 177mpbird 166 1 (𝜑 → (𝑄 pCnt 𝐴) ≤ (𝑄 pCnt (𝑃 − 1)))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104   = wceq 1342  wcel 2135  wne 2334   class class class wbr 3976  cfv 5182  (class class class)co 5836  cc 7742  cr 7743  0cc0 7744  1c1 7745   + caddc 7747   · cmul 7749   < clt 7924  cle 7925  cmin 8060   / cdiv 8559  cn 8848  2c2 8899  0cn0 9105  cz 9182  cuz 9457  cq 9548   mod cmo 10247  cexp 10444  cdvds 11713   gcd cgcd 11860  cprime 12018  odcodz 12119  ϕcphi 12120   pCnt cpc 12195
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1434  ax-7 1435  ax-gen 1436  ax-ie1 1480  ax-ie2 1481  ax-8 1491  ax-10 1492  ax-11 1493  ax-i12 1494  ax-bndl 1496  ax-4 1497  ax-17 1513  ax-i9 1517  ax-ial 1521  ax-i5r 1522  ax-13 2137  ax-14 2138  ax-ext 2146  ax-coll 4091  ax-sep 4094  ax-nul 4102  ax-pow 4147  ax-pr 4181  ax-un 4405  ax-setind 4508  ax-iinf 4559  ax-cnex 7835  ax-resscn 7836  ax-1cn 7837  ax-1re 7838  ax-icn 7839  ax-addcl 7840  ax-addrcl 7841  ax-mulcl 7842  ax-mulrcl 7843  ax-addcom 7844  ax-mulcom 7845  ax-addass 7846  ax-mulass 7847  ax-distr 7848  ax-i2m1 7849  ax-0lt1 7850  ax-1rid 7851  ax-0id 7852  ax-rnegex 7853  ax-precex 7854  ax-cnre 7855  ax-pre-ltirr 7856  ax-pre-ltwlin 7857  ax-pre-lttrn 7858  ax-pre-apti 7859  ax-pre-ltadd 7860  ax-pre-mulgt0 7861  ax-pre-mulext 7862  ax-arch 7863  ax-caucvg 7864
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 968  df-3an 969  df-tru 1345  df-fal 1348  df-nf 1448  df-sb 1750  df-eu 2016  df-mo 2017  df-clab 2151  df-cleq 2157  df-clel 2160  df-nfc 2295  df-ne 2335  df-nel 2430  df-ral 2447  df-rex 2448  df-reu 2449  df-rmo 2450  df-rab 2451  df-v 2723  df-sbc 2947  df-csb 3041  df-dif 3113  df-un 3115  df-in 3117  df-ss 3124  df-nul 3405  df-if 3516  df-pw 3555  df-sn 3576  df-pr 3577  df-op 3579  df-uni 3784  df-int 3819  df-iun 3862  df-br 3977  df-opab 4038  df-mpt 4039  df-tr 4075  df-id 4265  df-po 4268  df-iso 4269  df-iord 4338  df-on 4340  df-ilim 4341  df-suc 4343  df-iom 4562  df-xp 4604  df-rel 4605  df-cnv 4606  df-co 4607  df-dm 4608  df-rn 4609  df-res 4610  df-ima 4611  df-iota 5147  df-fun 5184  df-fn 5185  df-f 5186  df-f1 5187  df-fo 5188  df-f1o 5189  df-fv 5190  df-isom 5191  df-riota 5792  df-ov 5839  df-oprab 5840  df-mpo 5841  df-1st 6100  df-2nd 6101  df-recs 6264  df-irdg 6329  df-frec 6350  df-1o 6375  df-2o 6376  df-oadd 6379  df-er 6492  df-en 6698  df-dom 6699  df-fin 6700  df-sup 6940  df-inf 6941  df-pnf 7926  df-mnf 7927  df-xr 7928  df-ltxr 7929  df-le 7930  df-sub 8062  df-neg 8063  df-reap 8464  df-ap 8471  df-div 8560  df-inn 8849  df-2 8907  df-3 8908  df-4 8909  df-n0 9106  df-z 9183  df-uz 9458  df-q 9549  df-rp 9581  df-fz 9936  df-fzo 10068  df-fl 10195  df-mod 10248  df-seqfrec 10371  df-exp 10445  df-ihash 10678  df-cj 10770  df-re 10771  df-im 10772  df-rsqrt 10926  df-abs 10927  df-clim 11206  df-proddc 11478  df-dvds 11714  df-gcd 11861  df-prm 12019  df-odz 12121  df-phi 12122  df-pc 12196
This theorem is referenced by:  pockthg  12266
  Copyright terms: Public domain W3C validator