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

Theorem pockthg 16101
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 11496 . . . . . 6 (𝜑 → (𝐴 · 𝐵) ∈ ℕ)
5 nnuz 12098 . . . . . 6 ℕ = (ℤ‘1)
64, 5syl6eleq 2876 . . . . 5 (𝜑 → (𝐴 · 𝐵) ∈ (ℤ‘1))
7 eluzp1p1 12087 . . . . 5 ((𝐴 · 𝐵) ∈ (ℤ‘1) → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
86, 7syl 17 . . . 4 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘(1 + 1)))
9 df-2 11506 . . . . 5 2 = (1 + 1)
109fveq2i 6504 . . . 4 (ℤ‘2) = (ℤ‘(1 + 1))
118, 10syl6eleqr 2877 . . 3 (𝜑 → ((𝐴 · 𝐵) + 1) ∈ (ℤ‘2))
121, 11eqeltrd 2866 . 2 (𝜑𝑁 ∈ (ℤ‘2))
13 eluzelre 12072 . . . . . . . . 9 (𝑁 ∈ (ℤ‘2) → 𝑁 ∈ ℝ)
1412, 13syl 17 . . . . . . . 8 (𝜑𝑁 ∈ ℝ)
1514adantr 473 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ∈ ℝ)
162nnred 11458 . . . . . . . . 9 (𝜑𝐴 ∈ ℝ)
1716resqcld 13429 . . . . . . . 8 (𝜑 → (𝐴↑2) ∈ ℝ)
1817adantr 473 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) ∈ ℝ)
19 prmnn 15877 . . . . . . . . . 10 (𝑞 ∈ ℙ → 𝑞 ∈ ℕ)
2019ad2antrl 715 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ)
2120nnred 11458 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℝ)
2221resqcld 13429 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞↑2) ∈ ℝ)
23 pockthg.3 . . . . . . . . . . 11 (𝜑𝐵 < 𝐴)
243nnred 11458 . . . . . . . . . . . 12 (𝜑𝐵 ∈ ℝ)
252nngt0d 11492 . . . . . . . . . . . 12 (𝜑 → 0 < 𝐴)
26 ltmul2 11294 . . . . . . . . . . . 12 ((𝐵 ∈ ℝ ∧ 𝐴 ∈ ℝ ∧ (𝐴 ∈ ℝ ∧ 0 < 𝐴)) → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2724, 16, 16, 25, 26syl112anc 1354 . . . . . . . . . . 11 (𝜑 → (𝐵 < 𝐴 ↔ (𝐴 · 𝐵) < (𝐴 · 𝐴)))
2823, 27mpbid 224 . . . . . . . . . 10 (𝜑 → (𝐴 · 𝐵) < (𝐴 · 𝐴))
292, 2nnmulcld 11496 . . . . . . . . . . 11 (𝜑 → (𝐴 · 𝐴) ∈ ℕ)
30 nnltp1le 11854 . . . . . . . . . . 11 (((𝐴 · 𝐵) ∈ ℕ ∧ (𝐴 · 𝐴) ∈ ℕ) → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
314, 29, 30syl2anc 576 . . . . . . . . . 10 (𝜑 → ((𝐴 · 𝐵) < (𝐴 · 𝐴) ↔ ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴)))
3228, 31mpbid 224 . . . . . . . . 9 (𝜑 → ((𝐴 · 𝐵) + 1) ≤ (𝐴 · 𝐴))
332nncnd 11459 . . . . . . . . . 10 (𝜑𝐴 ∈ ℂ)
3433sqvald 13325 . . . . . . . . 9 (𝜑 → (𝐴↑2) = (𝐴 · 𝐴))
3532, 1, 343brtr4d 4962 . . . . . . . 8 (𝜑𝑁 ≤ (𝐴↑2))
3635adantr 473 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 ≤ (𝐴↑2))
37 pockthg.5 . . . . . . . . . . . . 13 (𝜑 → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
3837adantr 473 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))
39 prmnn 15877 . . . . . . . . . . . . . . . . . . . 20 (𝑝 ∈ ℙ → 𝑝 ∈ ℕ)
4039ad2antrl 715 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℕ)
4140nncnd 11459 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℂ)
4241exp1d 13323 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) = 𝑝)
43 nnge1 11471 . . . . . . . . . . . . . . . . . . 19 ((𝑝 pCnt 𝐴) ∈ ℕ → 1 ≤ (𝑝 pCnt 𝐴))
4443ad2antll 716 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ≤ (𝑝 pCnt 𝐴))
45 simprl 758 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝 ∈ ℙ)
462nnzd 11902 . . . . . . . . . . . . . . . . . . . 20 (𝜑𝐴 ∈ ℤ)
4746ad2antrr 713 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝐴 ∈ ℤ)
48 1nn0 11728 . . . . . . . . . . . . . . . . . . . 20 1 ∈ ℕ0
4948a1i 11 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 1 ∈ ℕ0)
50 pcdvdsb 16064 . . . . . . . . . . . . . . . . . . 19 ((𝑝 ∈ ℙ ∧ 𝐴 ∈ ℤ ∧ 1 ∈ ℕ0) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5145, 47, 49, 50syl3anc 1351 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (1 ≤ (𝑝 pCnt 𝐴) ↔ (𝑝↑1) ∥ 𝐴))
5244, 51mpbid 224 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (𝑝↑1) ∥ 𝐴)
5342, 52eqbrtrrd 4954 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → 𝑝𝐴)
54 simpl1 1171 . . . . . . . . . . . . . . . . . . . 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 1206 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑞 ∈ ℙ)
60 simpl2r 1207 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑞𝑁)
61 simpl3l 1208 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑝 ∈ ℙ)
62 simpl3r 1209 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (𝑝 pCnt 𝐴) ∈ ℕ)
63 simprl 758 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → 𝑥 ∈ ℤ)
64 simprrl 768 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → ((𝑥↑(𝑁 − 1)) mod 𝑁) = 1)
65 simprrr 769 . . . . . . . . . . . . . . . . . . 19 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)
6655, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65pockthlem 16100 . . . . . . . . . . . . . . . . . 18 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) ∧ (𝑥 ∈ ℤ ∧ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1))) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
6766rexlimdvaa 3230 . . . . . . . . . . . . . . . . 17 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁) ∧ (𝑝 ∈ ℙ ∧ (𝑝 pCnt 𝐴) ∈ ℕ)) → (∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
68673expa 1098 . . . . . . . . . . . . . . . 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 449 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
71 id 22 . . . . . . . . . . . . . . . . . 18 (𝑝 ∈ ℙ → 𝑝 ∈ ℙ)
72 prmuz2 15899 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ ℙ → 𝑞 ∈ (ℤ‘2))
73 uz2m1nn 12140 . . . . . . . . . . . . . . . . . . . 20 (𝑞 ∈ (ℤ‘2) → (𝑞 − 1) ∈ ℕ)
7472, 73syl 17 . . . . . . . . . . . . . . . . . . 19 (𝑞 ∈ ℙ → (𝑞 − 1) ∈ ℕ)
7574ad2antrl 715 . . . . . . . . . . . . . . . . . 18 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℕ)
76 pccl 16045 . . . . . . . . . . . . . . . . . 18 ((𝑝 ∈ ℙ ∧ (𝑞 − 1) ∈ ℕ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7771, 75, 76syl2anr 587 . . . . . . . . . . . . . . . . 17 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt (𝑞 − 1)) ∈ ℕ0)
7877nn0ge0d 11773 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 0 ≤ (𝑝 pCnt (𝑞 − 1)))
79 breq1 4933 . . . . . . . . . . . . . . . 16 ((𝑝 pCnt 𝐴) = 0 → ((𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)) ↔ 0 ≤ (𝑝 pCnt (𝑞 − 1))))
8078, 79syl5ibrcom 239 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8180a1dd 50 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) = 0 → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))))
82 simpr 477 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝑝 ∈ ℙ)
832ad2antrr 713 . . . . . . . . . . . . . . . 16 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → 𝐴 ∈ ℕ)
8482, 83pccld 16046 . . . . . . . . . . . . . . 15 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → (𝑝 pCnt 𝐴) ∈ ℕ0)
85 elnn0 11712 . . . . . . . . . . . . . . 15 ((𝑝 pCnt 𝐴) ∈ ℕ0 ↔ ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8684, 85sylib 210 . . . . . . . . . . . . . 14 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝 pCnt 𝐴) ∈ ℕ ∨ (𝑝 pCnt 𝐴) = 0))
8770, 81, 86mpjaod 846 . . . . . . . . . . . . 13 (((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) ∧ 𝑝 ∈ ℙ) → ((𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8887ralimdva 3127 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
8938, 88mpd 15 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1)))
9075nnzd 11902 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑞 − 1) ∈ ℤ)
91 pc2dvds 16074 . . . . . . . . . . . 12 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℤ) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9246, 90, 91syl2an2r 672 . . . . . . . . . . 11 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) ↔ ∀𝑝 ∈ ℙ (𝑝 pCnt 𝐴) ≤ (𝑝 pCnt (𝑞 − 1))))
9389, 92mpbird 249 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∥ (𝑞 − 1))
94 dvdsle 15523 . . . . . . . . . . 11 ((𝐴 ∈ ℤ ∧ (𝑞 − 1) ∈ ℕ) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9546, 75, 94syl2an2r 672 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 ∥ (𝑞 − 1) → 𝐴 ≤ (𝑞 − 1)))
9693, 95mpd 15 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ≤ (𝑞 − 1))
972nnnn0d 11770 . . . . . . . . . 10 (𝜑𝐴 ∈ ℕ0)
9820nnnn0d 11770 . . . . . . . . . 10 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑞 ∈ ℕ0)
99 nn0ltlem1 11858 . . . . . . . . . 10 ((𝐴 ∈ ℕ0𝑞 ∈ ℕ0) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10097, 98, 99syl2an2r 672 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞𝐴 ≤ (𝑞 − 1)))
10196, 100mpbird 249 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 < 𝑞)
10216adantr 473 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝐴 ∈ ℝ)
10397nn0ge0d 11773 . . . . . . . . . 10 (𝜑 → 0 ≤ 𝐴)
104103adantr 473 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝐴)
10598nn0ge0d 11773 . . . . . . . . 9 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 0 ≤ 𝑞)
106102, 21, 104, 105lt2sqd 13437 . . . . . . . 8 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴 < 𝑞 ↔ (𝐴↑2) < (𝑞↑2)))
107101, 106mpbid 224 . . . . . . 7 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝐴↑2) < (𝑞↑2))
10815, 18, 22, 36, 107lelttrd 10600 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → 𝑁 < (𝑞↑2))
10915, 22ltnled 10589 . . . . . 6 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → (𝑁 < (𝑞↑2) ↔ ¬ (𝑞↑2) ≤ 𝑁))
110108, 109mpbid 224 . . . . 5 ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑞𝑁)) → ¬ (𝑞↑2) ≤ 𝑁)
111110expr 449 . . . 4 ((𝜑𝑞 ∈ ℙ) → (𝑞𝑁 → ¬ (𝑞↑2) ≤ 𝑁))
112111con2d 132 . . 3 ((𝜑𝑞 ∈ ℙ) → ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
113112ralrimiva 3132 . 2 (𝜑 → ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁))
114 isprm5 15910 . 2 (𝑁 ∈ ℙ ↔ (𝑁 ∈ (ℤ‘2) ∧ ∀𝑞 ∈ ℙ ((𝑞↑2) ≤ 𝑁 → ¬ 𝑞𝑁)))
11512, 113, 114sylanbrc 575 1 (𝜑𝑁 ∈ ℙ)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 198  wa 387  wo 833  w3a 1068   = wceq 1507  wcel 2050  wral 3088  wrex 3089   class class class wbr 4930  cfv 6190  (class class class)co 6978  cr 10336  0cc0 10337  1c1 10338   + caddc 10340   · cmul 10342   < clt 10476  cle 10477  cmin 10672   / cdiv 11100  cn 11441  2c2 11498  0cn0 11710  cz 11796  cuz 12061   mod cmo 13055  cexp 13247  cdvds 15470   gcd cgcd 15706  cprime 15874   pCnt cpc 16032
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1758  ax-4 1772  ax-5 1869  ax-6 1928  ax-7 1965  ax-8 2052  ax-9 2059  ax-10 2079  ax-11 2093  ax-12 2106  ax-13 2301  ax-ext 2750  ax-rep 5050  ax-sep 5061  ax-nul 5068  ax-pow 5120  ax-pr 5187  ax-un 7281  ax-cnex 10393  ax-resscn 10394  ax-1cn 10395  ax-icn 10396  ax-addcl 10397  ax-addrcl 10398  ax-mulcl 10399  ax-mulrcl 10400  ax-mulcom 10401  ax-addass 10402  ax-mulass 10403  ax-distr 10404  ax-i2m1 10405  ax-1ne0 10406  ax-1rid 10407  ax-rnegex 10408  ax-rrecex 10409  ax-cnre 10410  ax-pre-lttri 10411  ax-pre-lttrn 10412  ax-pre-ltadd 10413  ax-pre-mulgt0 10414  ax-pre-sup 10415
This theorem depends on definitions:  df-bi 199  df-an 388  df-or 834  df-3or 1069  df-3an 1070  df-tru 1510  df-ex 1743  df-nf 1747  df-sb 2016  df-mo 2547  df-eu 2583  df-clab 2759  df-cleq 2771  df-clel 2846  df-nfc 2918  df-ne 2968  df-nel 3074  df-ral 3093  df-rex 3094  df-reu 3095  df-rmo 3096  df-rab 3097  df-v 3417  df-sbc 3684  df-csb 3789  df-dif 3834  df-un 3836  df-in 3838  df-ss 3845  df-pss 3847  df-nul 4181  df-if 4352  df-pw 4425  df-sn 4443  df-pr 4445  df-tp 4447  df-op 4449  df-uni 4714  df-int 4751  df-iun 4795  df-br 4931  df-opab 4993  df-mpt 5010  df-tr 5032  df-id 5313  df-eprel 5318  df-po 5327  df-so 5328  df-fr 5367  df-we 5369  df-xp 5414  df-rel 5415  df-cnv 5416  df-co 5417  df-dm 5418  df-rn 5419  df-res 5420  df-ima 5421  df-pred 5988  df-ord 6034  df-on 6035  df-lim 6036  df-suc 6037  df-iota 6154  df-fun 6192  df-fn 6193  df-f 6194  df-f1 6195  df-fo 6196  df-f1o 6197  df-fv 6198  df-riota 6939  df-ov 6981  df-oprab 6982  df-mpo 6983  df-om 7399  df-1st 7503  df-2nd 7504  df-wrecs 7752  df-recs 7814  df-rdg 7852  df-1o 7907  df-2o 7908  df-oadd 7911  df-er 8091  df-map 8210  df-en 8309  df-dom 8310  df-sdom 8311  df-fin 8312  df-sup 8703  df-inf 8704  df-dju 9126  df-card 9164  df-pnf 10478  df-mnf 10479  df-xr 10480  df-ltxr 10481  df-le 10482  df-sub 10674  df-neg 10675  df-div 11101  df-nn 11442  df-2 11506  df-3 11507  df-n0 11711  df-xnn0 11783  df-z 11797  df-uz 12062  df-q 12166  df-rp 12208  df-fz 12712  df-fzo 12853  df-fl 12980  df-mod 13056  df-seq 13188  df-exp 13248  df-hash 13509  df-cj 14322  df-re 14323  df-im 14324  df-sqrt 14458  df-abs 14459  df-dvds 15471  df-gcd 15707  df-prm 15875  df-odz 15961  df-phi 15962  df-pc 16033
This theorem is referenced by:  pockthi  16102  proththd  43148
  Copyright terms: Public domain W3C validator