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

Theorem pockthg 16953
Description: The generalized Pocklington's theorem. If 𝑁 − 1 = 𝐴 · 𝐵 where 𝐵 < 𝐴, then 𝑁 is prime if and only if for every prime factor 𝑝 of 𝐴, there is an 𝑥 such that 𝑥↑(𝑁 − 1) = 1( mod 𝑁) and gcd (𝑥↑((𝑁 − 1) / 𝑝) − 1, 𝑁) = 1. (Contributed by Mario Carneiro, 2-Mar-2014.)
Hypotheses
Ref Expression
pockthg.1 (𝜑𝐴 ∈ ℕ)
pockthg.2 (𝜑𝐵 ∈ ℕ)
pockthg.3 (𝜑𝐵 < 𝐴)
pockthg.4 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
pockthg.5 (𝜑 → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
Assertion
Ref Expression
pockthg (𝜑𝑁 ∈ ℙ)
Distinct variable groups:   𝑥,𝑝,𝑁   𝐴,𝑝,𝑥   𝜑,𝑝,𝑥
Allowed substitution hints:   𝐵(𝑥,𝑝)

Proof of Theorem pockthg
Dummy variable 𝑞 is distinct from all other variables.
StepHypRef Expression
1 pockthg.4 . . 3 (𝜑𝑁 = ((𝐴 · 𝐵) + 1))
2 pockthg.1 . . . . . . 7 (𝜑𝐴 ∈ ℕ)
3 pockthg.2 . . . . . . 7 (𝜑𝐵 ∈ ℕ)
42, 3nnmulcld 12346 . . . . . 6 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
5 nnuz 12946 . . . . . 6 ℕ = (ℤ‘1)
64, 5eleqtrdi 2854 . . . . 5 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
7 eluzp1p1 12931 . . . . 5 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
86, 7syl 17 . . . 4 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
9 df-2 12356 . . . . 5 2 = (1 + 1)
109fveq2i 6923 . . . 4 (ℤ‘2) = (ℤ‘(1 + 1))
118, 10eleqtrrdi 2855 . . 3 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘2))
121, 11eqeltrd 2844 . 2 (𝜑𝑁 ∈ (ℤ‘2))
13 eluzelre 12914 . . . . . . . . 9 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℝ)
1412, 13syl 17 . . . . . . . 8 (𝜑𝑁 ∈ ℝ)
1514adantr 480 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ∈ ℝ)
162nnred 12308 . . . . . . . . 9 (𝜑𝐴 ∈ ℝ)
1716resqcld 14175 . . . . . . . 8 (𝜑 → (𝐴↑2) ∈ ℝ)
1817adantr 480 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) ∈ ℝ)
19 prmnn 16721 . . . . . . . . . 10 (𝑞 ∈ ℙ → 𝑞 ∈ ℕ)
2019ad2antrl 727 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ)
2120nnred 12308 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℝ)
2221resqcld 14175 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞↑2) ∈ ℝ)
23 pockthg.3 . . . . . . . . . . 11 (𝜑𝐵 < 𝐴)
243nnred 12308 . . . . . . . . . . . 12 (𝜑𝐵 ∈ ℝ)
252nngt0d 12342 . . . . . . . . . . . 12 (𝜑 → 0 < 𝐴)
26 ltmul2 12145 . . . . . . . . . . . 12 ((𝐵 ∈ ℝ ∧ 𝐴 ∈ ℝ ∧ (𝐴 ∈ ℝ ∧ 0 < 𝐴)) → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2724, 16, 16, 25, 26syl112anc 1374 . . . . . . . . . . 11 (𝜑 → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2823, 27mpbid 232 . . . . . . . . . 10 (𝜑 → (𝐴 · 𝐵) < (𝐴 · 𝐴))
292, 2nnmulcld 12346 . . . . . . . . . . 11 (𝜑 → (𝐴 · 𝐴) ∈ ℕ)
30 nnltp1le 12699 . . . . . . . . . . 11 (((𝐴 · 𝐵) ∈ ℕ ∧ (𝐴 · 𝐴) ∈ ℕ) → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
314, 29, 30syl2anc 583 . . . . . . . . . 10 (𝜑 → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
3228, 31mpbid 232 . . . . . . . . 9 (𝜑 → ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴))
332nncnd 12309 . . . . . . . . . 10 (𝜑𝐴 ∈ ℂ)
3433sqvald 14193 . . . . . . . . 9 (𝜑 → (𝐴↑2) = (𝐴 · 𝐴))
3532, 1, 343brtr4d 5198 . . . . . . . 8 (𝜑𝑁 ≤ (𝐴↑2))
3635adantr 480 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ≤ (𝐴↑2))
37 pockthg.5 . . . . . . . . . . . . 13 (𝜑 → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
3837adantr 480 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
39 prmnn 16721 . . . . . . . . . . . . . . . . . . . 20 (𝑝 ∈ ℙ → 𝑝 ∈ ℕ)
4039ad2antrl 727 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℕ)
4140nncnd 12309 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℂ)
4241exp1d 14191 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) = 𝑝)
43 nnge1 12321 . . . . . . . . . . . . . . . . . . 19 ((𝑝 pCnt 𝐴) ∈ ℕ → 1 ≤ (𝑝 pCnt 𝐴))
4443ad2antll 728 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ≤ (𝑝 pCnt 𝐴))
45 simprl 770 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℙ)
462nnzd 12666 . . . . . . . . . . . . . . . . . . . 20 (𝜑𝐴 ∈ ℤ)
4746ad2antrr 725 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝐴 ∈ ℤ)
48 1nn0 12569 . . . . . . . . . . . . . . . . . . . 20 1 ∈ ℕ0
4948a1i 11 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ∈ ℕ0)
50 pcdvdsb 16916 . . . . . . . . . . . . . . . . . . 19 ((𝑝 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ 1 ∈ ℕ0) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5145, 47, 49, 50syl3anc 1371 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5244, 51mpbid 232 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) ∥ 𝐴)
5342, 52eqbrtrrd 5190 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝𝐴)
54 simpl1 1191 . . . . . . . . . . . . . . . . . . . 20 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝜑)
5554, 2syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝐴 ∈ ℕ)
5654, 3syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝐵 ∈ ℕ)
5754, 23syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝐵 < 𝐴)
5854, 1syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑁 = ((𝐴 · 𝐵) + 1))
59 simpl2l 1226 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑞 ∈ ℙ)
60 simpl2r 1227 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑞𝑁)
61 simpl3l 1228 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑝 ∈ ℙ)
62 simpl3r 1229 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (𝑝 pCnt 𝐴) ∈ ℕ)
63 simprl 770 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑥 ∈ ℤ)
64 simprrl 780 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → ((𝑥↑(𝑁 − 1)) mod 𝑁) = 1)
65 simprrr 781 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)
6655, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65pockthlem 16952 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
6766rexlimdvaa 3162 . . . . . . . . . . . . . . . . 17 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
68673expa 1118 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
6953, 68embantd 59 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
7069expr 456 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
71 id 22 . . . . . . . . . . . . . . . . . 18 (𝑝 ∈ ℙ → 𝑝 ∈ ℙ)
72 prmuz2 16743 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ ℙ → 𝑞 ∈ (ℤ‘2))
73 uz2m1nn 12988 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ (ℤ‘2) → (𝑞 − 1) ∈ ℕ)
7472, 73syl 17 . . . . . . . . . . . . . . . . . . 19 (𝑞 ∈ ℙ → (𝑞 − 1) ∈ ℕ)
7574ad2antrl 727 . . . . . . . . . . . . . . . . . 18 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℕ)
76 pccl 16896 . . . . . . . . . . . . . . . . . 18 ((𝑝 ∈ ℙ ∧ (𝑞 − 1) ∈ ℕ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7771, 75, 76syl2anr 596 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7877nn0ge0d 12616 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 0 ≤ (𝑝 pCnt (𝑞 − 1)))
79 breq1 5169 . . . . . . . . . . . . . . . 16 ((𝑝 pCnt 𝐴) = 0 → ((𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)) ↔ 0 ≤ (𝑝 pCnt (𝑞 − 1))))
8078, 79syl5ibrcom 247 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8180a1dd 50 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
82 simpr 484 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝑝 ∈ ℙ)
832ad2antrr 725 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝐴 ∈ ℕ)
8482, 83pccld 16897 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt 𝐴) ∈ ℕ0)
85 elnn0 12555 . . . . . . . . . . . . . . 15 ((𝑝 pCnt 𝐴) ∈ ℕ0 ↔ ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8684, 85sylib 218 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8770, 81, 86mpjaod 859 . . . . . . . . . . . . 13 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8887ralimdva 3173 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8938, 88mpd 15 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
9075nnzd 12666 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℤ)
91 pc2dvds 16926 . . . . . . . . . . . 12 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℤ) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9246, 90, 91syl2an2r 684 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9389, 92mpbird 257 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∥ (𝑞 − 1))
94 dvdsle 16358 . . . . . . . . . . 11 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℕ) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9546, 75, 94syl2an2r 684 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9693, 95mpd 15 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ≤ (𝑞 − 1))
972nnnn0d 12613 . . . . . . . . . 10 (𝜑𝐴 ∈ ℕ0)
9820nnnn0d 12613 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ0)
99 nn0ltlem1 12703 . . . . . . . . . 10 ((𝐴 ∈ ℕ0𝑞 ∈ ℕ0) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10097, 98, 99syl2an2r 684 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10196, 100mpbird 257 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 < 𝑞)
10216adantr 480 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∈ ℝ)
10397nn0ge0d 12616 . . . . . . . . . 10 (𝜑 → 0 ≤ 𝐴)
104103adantr 480 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝐴)
10598nn0ge0d 12616 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝑞)
106102, 21, 104, 105lt2sqd 14305 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞 ↔ (𝐴↑2) < (𝑞↑2)))
107101, 106mpbid 232 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) < (𝑞↑2))
10815, 18, 22, 36, 107lelttrd 11448 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 < (𝑞↑2))
10915, 22ltnled 11437 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑁 < (𝑞↑2) ↔ ¬ (𝑞↑2) ≤ 𝑁))
110108, 109mpbid 232 . . . . 5 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ¬ (𝑞↑2) ≤ 𝑁)
111110expr 456 . . . 4 ((𝜑𝑞 ∈ ℙ) → (𝑞𝑁 → ¬ (𝑞↑2) ≤ 𝑁))
112111con2d 134 . . 3 ((𝜑𝑞 ∈ ℙ) → ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
113112ralrimiva 3152 . 2 (𝜑 → ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
114 isprm5 16754 . 2 (𝑁 ∈ ℙ ↔ (𝑁 ∈ (ℤ‘2) ∧ ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁)))
11512, 113, 114sylanbrc 582 1 (𝜑𝑁 ∈ ℙ)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 206  wa 395  wo 846  w3a 1087   = wceq 1537  wcel 2108  wral 3067  wrex 3076   class class class wbr 5166  cfv 6573  (class class class)co 7448  cr 11183  0cc0 11184  1c1 11185   + caddc 11187   · cmul 11189   < clt 11324  cle 11325  cmin 11520   / cdiv 11947  cn 12293  2c2 12348  0cn0 12553  cz 12639  cuz 12903   mod cmo 13920  cexp 14112  cdvds 16302   gcd cgcd 16540  cprime 16718   pCnt cpc 16883
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1793  ax-4 1807  ax-5 1909  ax-6 1967  ax-7 2007  ax-8 2110  ax-9 2118  ax-10 2141  ax-11 2158  ax-12 2178  ax-ext 2711  ax-rep 5303  ax-sep 5317  ax-nul 5324  ax-pow 5383  ax-pr 5447  ax-un 7770  ax-cnex 11240  ax-resscn 11241  ax-1cn 11242  ax-icn 11243  ax-addcl 11244  ax-addrcl 11245  ax-mulcl 11246  ax-mulrcl 11247  ax-mulcom 11248  ax-addass 11249  ax-mulass 11250  ax-distr 11251  ax-i2m1 11252  ax-1ne0 11253  ax-1rid 11254  ax-rnegex 11255  ax-rrecex 11256  ax-cnre 11257  ax-pre-lttri 11258  ax-pre-lttrn 11259  ax-pre-ltadd 11260  ax-pre-mulgt0 11261  ax-pre-sup 11262
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 847  df-3or 1088  df-3an 1089  df-tru 1540  df-fal 1550  df-ex 1778  df-nf 1782  df-sb 2065  df-mo 2543  df-eu 2572  df-clab 2718  df-cleq 2732  df-clel 2819  df-nfc 2895  df-ne 2947  df-nel 3053  df-ral 3068  df-rex 3077  df-rmo 3388  df-reu 3389  df-rab 3444  df-v 3490  df-sbc 3805  df-csb 3922  df-dif 3979  df-un 3981  df-in 3983  df-ss 3993  df-pss 3996  df-nul 4353  df-if 4549  df-pw 4624  df-sn 4649  df-pr 4651  df-op 4655  df-uni 4932  df-int 4971  df-iun 5017  df-br 5167  df-opab 5229  df-mpt 5250  df-tr 5284  df-id 5593  df-eprel 5599  df-po 5607  df-so 5608  df-fr 5652  df-we 5654  df-xp 5706  df-rel 5707  df-cnv 5708  df-co 5709  df-dm 5710  df-rn 5711  df-res 5712  df-ima 5713  df-pred 6332  df-ord 6398  df-on 6399  df-lim 6400  df-suc 6401  df-iota 6525  df-fun 6575  df-fn 6576  df-f 6577  df-f1 6578  df-fo 6579  df-f1o 6580  df-fv 6581  df-riota 7404  df-ov 7451  df-oprab 7452  df-mpo 7453  df-om 7904  df-1st 8030  df-2nd 8031  df-frecs 8322  df-wrecs 8353  df-recs 8427  df-rdg 8466  df-1o 8522  df-2o 8523  df-oadd 8526  df-er 8763  df-en 9004  df-dom 9005  df-sdom 9006  df-fin 9007  df-sup 9511  df-inf 9512  df-dju 9970  df-card 10008  df-pnf 11326  df-mnf 11327  df-xr 11328  df-ltxr 11329  df-le 11330  df-sub 11522  df-neg 11523  df-div 11948  df-nn 12294  df-2 12356  df-3 12357  df-n0 12554  df-xnn0 12626  df-z 12640  df-uz 12904  df-q 13014  df-rp 13058  df-fz 13568  df-fzo 13712  df-fl 13843  df-mod 13921  df-seq 14053  df-exp 14113  df-hash 14380  df-cj 15148  df-re 15149  df-im 15150  df-sqrt 15284  df-abs 15285  df-dvds 16303  df-gcd 16541  df-prm 16719  df-odz 16812  df-phi 16813  df-pc 16884
This theorem is referenced by:  pockthi  16954  proththd  47488
  Copyright terms: Public domain W3C validator