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

Theorem pockthg 16778
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 12206 . . . . . 6 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
5 nnuz 12806 . . . . . 6 ℕ = (ℤ‘1)
64, 5eleqtrdi 2848 . . . . 5 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
7 eluzp1p1 12791 . . . . 5 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
86, 7syl 17 . . . 4 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
9 df-2 12216 . . . . 5 2 = (1 + 1)
109fveq2i 6845 . . . 4 (ℤ‘2) = (ℤ‘(1 + 1))
118, 10eleqtrrdi 2849 . . 3 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘2))
121, 11eqeltrd 2838 . 2 (𝜑𝑁 ∈ (ℤ‘2))
13 eluzelre 12774 . . . . . . . . 9 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℝ)
1412, 13syl 17 . . . . . . . 8 (𝜑𝑁 ∈ ℝ)
1514adantr 481 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ∈ ℝ)
162nnred 12168 . . . . . . . . 9 (𝜑𝐴 ∈ ℝ)
1716resqcld 14030 . . . . . . . 8 (𝜑 → (𝐴↑2) ∈ ℝ)
1817adantr 481 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) ∈ ℝ)
19 prmnn 16550 . . . . . . . . . 10 (𝑞 ∈ ℙ → 𝑞 ∈ ℕ)
2019ad2antrl 726 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ)
2120nnred 12168 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℝ)
2221resqcld 14030 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞↑2) ∈ ℝ)
23 pockthg.3 . . . . . . . . . . 11 (𝜑𝐵 < 𝐴)
243nnred 12168 . . . . . . . . . . . 12 (𝜑𝐵 ∈ ℝ)
252nngt0d 12202 . . . . . . . . . . . 12 (𝜑 → 0 < 𝐴)
26 ltmul2 12006 . . . . . . . . . . . 12 ((𝐵 ∈ ℝ ∧ 𝐴 ∈ ℝ ∧ (𝐴 ∈ ℝ ∧ 0 < 𝐴)) → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2724, 16, 16, 25, 26syl112anc 1374 . . . . . . . . . . 11 (𝜑 → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2823, 27mpbid 231 . . . . . . . . . 10 (𝜑 → (𝐴 · 𝐵) < (𝐴 · 𝐴))
292, 2nnmulcld 12206 . . . . . . . . . . 11 (𝜑 → (𝐴 · 𝐴) ∈ ℕ)
30 nnltp1le 12559 . . . . . . . . . . 11 (((𝐴 · 𝐵) ∈ ℕ ∧ (𝐴 · 𝐴) ∈ ℕ) → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
314, 29, 30syl2anc 584 . . . . . . . . . 10 (𝜑 → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
3228, 31mpbid 231 . . . . . . . . 9 (𝜑 → ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴))
332nncnd 12169 . . . . . . . . . 10 (𝜑𝐴 ∈ ℂ)
3433sqvald 14048 . . . . . . . . 9 (𝜑 → (𝐴↑2) = (𝐴 · 𝐴))
3532, 1, 343brtr4d 5137 . . . . . . . 8 (𝜑𝑁 ≤ (𝐴↑2))
3635adantr 481 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ≤ (𝐴↑2))
37 pockthg.5 . . . . . . . . . . . . 13 (𝜑 → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
3837adantr 481 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
39 prmnn 16550 . . . . . . . . . . . . . . . . . . . 20 (𝑝 ∈ ℙ → 𝑝 ∈ ℕ)
4039ad2antrl 726 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℕ)
4140nncnd 12169 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℂ)
4241exp1d 14046 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) = 𝑝)
43 nnge1 12181 . . . . . . . . . . . . . . . . . . 19 ((𝑝 pCnt 𝐴) ∈ ℕ → 1 ≤ (𝑝 pCnt 𝐴))
4443ad2antll 727 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ≤ (𝑝 pCnt 𝐴))
45 simprl 769 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℙ)
462nnzd 12526 . . . . . . . . . . . . . . . . . . . 20 (𝜑𝐴 ∈ ℤ)
4746ad2antrr 724 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝐴 ∈ ℤ)
48 1nn0 12429 . . . . . . . . . . . . . . . . . . . 20 1 ∈ ℕ0
4948a1i 11 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ∈ ℕ0)
50 pcdvdsb 16741 . . . . . . . . . . . . . . . . . . 19 ((𝑝 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ 1 ∈ ℕ0) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5145, 47, 49, 50syl3anc 1371 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5244, 51mpbid 231 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) ∥ 𝐴)
5342, 52eqbrtrrd 5129 . . . . . . . . . . . . . . . 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 769 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑥 ∈ ℤ)
64 simprrl 779 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → ((𝑥↑(𝑁 − 1)) mod 𝑁) = 1)
65 simprrr 780 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)
6655, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65pockthlem 16777 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
6766rexlimdvaa 3153 . . . . . . . . . . . . . . . . 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 457 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
71 id 22 . . . . . . . . . . . . . . . . . 18 (𝑝 ∈ ℙ → 𝑝 ∈ ℙ)
72 prmuz2 16572 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ ℙ → 𝑞 ∈ (ℤ‘2))
73 uz2m1nn 12848 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ (ℤ‘2) → (𝑞 − 1) ∈ ℕ)
7472, 73syl 17 . . . . . . . . . . . . . . . . . . 19 (𝑞 ∈ ℙ → (𝑞 − 1) ∈ ℕ)
7574ad2antrl 726 . . . . . . . . . . . . . . . . . 18 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℕ)
76 pccl 16721 . . . . . . . . . . . . . . . . . 18 ((𝑝 ∈ ℙ ∧ (𝑞 − 1) ∈ ℕ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7771, 75, 76syl2anr 597 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7877nn0ge0d 12476 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 0 ≤ (𝑝 pCnt (𝑞 − 1)))
79 breq1 5108 . . . . . . . . . . . . . . . 16 ((𝑝 pCnt 𝐴) = 0 → ((𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)) ↔ 0 ≤ (𝑝 pCnt (𝑞 − 1))))
8078, 79syl5ibrcom 246 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8180a1dd 50 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
82 simpr 485 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝑝 ∈ ℙ)
832ad2antrr 724 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝐴 ∈ ℕ)
8482, 83pccld 16722 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt 𝐴) ∈ ℕ0)
85 elnn0 12415 . . . . . . . . . . . . . . 15 ((𝑝 pCnt 𝐴) ∈ ℕ0 ↔ ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8684, 85sylib 217 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8770, 81, 86mpjaod 858 . . . . . . . . . . . . 13 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8887ralimdva 3164 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8938, 88mpd 15 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
9075nnzd 12526 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℤ)
91 pc2dvds 16751 . . . . . . . . . . . 12 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℤ) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9246, 90, 91syl2an2r 683 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9389, 92mpbird 256 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∥ (𝑞 − 1))
94 dvdsle 16192 . . . . . . . . . . 11 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℕ) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9546, 75, 94syl2an2r 683 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9693, 95mpd 15 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ≤ (𝑞 − 1))
972nnnn0d 12473 . . . . . . . . . 10 (𝜑𝐴 ∈ ℕ0)
9820nnnn0d 12473 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ0)
99 nn0ltlem1 12563 . . . . . . . . . 10 ((𝐴 ∈ ℕ0𝑞 ∈ ℕ0) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10097, 98, 99syl2an2r 683 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10196, 100mpbird 256 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 < 𝑞)
10216adantr 481 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∈ ℝ)
10397nn0ge0d 12476 . . . . . . . . . 10 (𝜑 → 0 ≤ 𝐴)
104103adantr 481 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝐴)
10598nn0ge0d 12476 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝑞)
106102, 21, 104, 105lt2sqd 14159 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞 ↔ (𝐴↑2) < (𝑞↑2)))
107101, 106mpbid 231 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) < (𝑞↑2))
10815, 18, 22, 36, 107lelttrd 11313 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 < (𝑞↑2))
10915, 22ltnled 11302 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑁 < (𝑞↑2) ↔ ¬ (𝑞↑2) ≤ 𝑁))
110108, 109mpbid 231 . . . . 5 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ¬ (𝑞↑2) ≤ 𝑁)
111110expr 457 . . . 4 ((𝜑𝑞 ∈ ℙ) → (𝑞𝑁 → ¬ (𝑞↑2) ≤ 𝑁))
112111con2d 134 . . 3 ((𝜑𝑞 ∈ ℙ) → ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
113112ralrimiva 3143 . 2 (𝜑 → ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
114 isprm5 16583 . 2 (𝑁 ∈ ℙ ↔ (𝑁 ∈ (ℤ‘2) ∧ ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁)))
11512, 113, 114sylanbrc 583 1 (𝜑𝑁 ∈ ℙ)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  wo 845  w3a 1087   = wceq 1541  wcel 2106  wral 3064  wrex 3073   class class class wbr 5105  cfv 6496  (class class class)co 7357  cr 11050  0cc0 11051  1c1 11052   + caddc 11054   · cmul 11056   < clt 11189  cle 11190  cmin 11385   / cdiv 11812  cn 12153  2c2 12208  0cn0 12413  cz 12499  cuz 12763   mod cmo 13774  cexp 13967  cdvds 16136   gcd cgcd 16374  cprime 16547   pCnt cpc 16708
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 2707  ax-rep 5242  ax-sep 5256  ax-nul 5263  ax-pow 5320  ax-pr 5384  ax-un 7672  ax-cnex 11107  ax-resscn 11108  ax-1cn 11109  ax-icn 11110  ax-addcl 11111  ax-addrcl 11112  ax-mulcl 11113  ax-mulrcl 11114  ax-mulcom 11115  ax-addass 11116  ax-mulass 11117  ax-distr 11118  ax-i2m1 11119  ax-1ne0 11120  ax-1rid 11121  ax-rnegex 11122  ax-rrecex 11123  ax-cnre 11124  ax-pre-lttri 11125  ax-pre-lttrn 11126  ax-pre-ltadd 11127  ax-pre-mulgt0 11128  ax-pre-sup 11129
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 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3065  df-rex 3074  df-rmo 3353  df-reu 3354  df-rab 3408  df-v 3447  df-sbc 3740  df-csb 3856  df-dif 3913  df-un 3915  df-in 3917  df-ss 3927  df-pss 3929  df-nul 4283  df-if 4487  df-pw 4562  df-sn 4587  df-pr 4589  df-op 4593  df-uni 4866  df-int 4908  df-iun 4956  df-br 5106  df-opab 5168  df-mpt 5189  df-tr 5223  df-id 5531  df-eprel 5537  df-po 5545  df-so 5546  df-fr 5588  df-we 5590  df-xp 5639  df-rel 5640  df-cnv 5641  df-co 5642  df-dm 5643  df-rn 5644  df-res 5645  df-ima 5646  df-pred 6253  df-ord 6320  df-on 6321  df-lim 6322  df-suc 6323  df-iota 6448  df-fun 6498  df-fn 6499  df-f 6500  df-f1 6501  df-fo 6502  df-f1o 6503  df-fv 6504  df-riota 7313  df-ov 7360  df-oprab 7361  df-mpo 7362  df-om 7803  df-1st 7921  df-2nd 7922  df-frecs 8212  df-wrecs 8243  df-recs 8317  df-rdg 8356  df-1o 8412  df-2o 8413  df-oadd 8416  df-er 8648  df-en 8884  df-dom 8885  df-sdom 8886  df-fin 8887  df-sup 9378  df-inf 9379  df-dju 9837  df-card 9875  df-pnf 11191  df-mnf 11192  df-xr 11193  df-ltxr 11194  df-le 11195  df-sub 11387  df-neg 11388  df-div 11813  df-nn 12154  df-2 12216  df-3 12217  df-n0 12414  df-xnn0 12486  df-z 12500  df-uz 12764  df-q 12874  df-rp 12916  df-fz 13425  df-fzo 13568  df-fl 13697  df-mod 13775  df-seq 13907  df-exp 13968  df-hash 14231  df-cj 14984  df-re 14985  df-im 14986  df-sqrt 15120  df-abs 15121  df-dvds 16137  df-gcd 16375  df-prm 16548  df-odz 16637  df-phi 16638  df-pc 16709
This theorem is referenced by:  pockthi  16779  proththd  45796
  Copyright terms: Public domain W3C validator