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

Theorem pockthg 14929
Description: The generalized Pocklington's theorem. If  N  -  1  =  A  x.  B where  B  <  A, then  N is prime if and only if for every prime factor  p of  A, there is an  x such that  x ^ ( N  -  1 )  =  1 (  mod 
N ) and  gcd  ( x ^ ( ( N  -  1 )  /  p )  -  1 ,  N )  =  1. (Contributed by Mario Carneiro, 2-Mar-2014.)
Hypotheses
Ref Expression
pockthg.1  |-  ( ph  ->  A  e.  NN )
pockthg.2  |-  ( ph  ->  B  e.  NN )
pockthg.3  |-  ( ph  ->  B  <  A )
pockthg.4  |-  ( ph  ->  N  =  ( ( A  x.  B )  +  1 ) )
pockthg.5  |-  ( ph  ->  A. p  e.  Prime  ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )
Assertion
Ref Expression
pockthg  |-  ( ph  ->  N  e.  Prime )
Distinct variable groups:    x, p, N    A, p, x    ph, p, x
Allowed substitution hints:    B( x, p)

Proof of Theorem pockthg
Dummy variable  q is distinct from all other variables.
StepHypRef Expression
1 pockthg.4 . . 3  |-  ( ph  ->  N  =  ( ( A  x.  B )  +  1 ) )
2 pockthg.1 . . . . . . 7  |-  ( ph  ->  A  e.  NN )
3 pockthg.2 . . . . . . 7  |-  ( ph  ->  B  e.  NN )
42, 3nnmulcld 10679 . . . . . 6  |-  ( ph  ->  ( A  x.  B
)  e.  NN )
5 nnuz 11218 . . . . . 6  |-  NN  =  ( ZZ>= `  1 )
64, 5syl6eleq 2559 . . . . 5  |-  ( ph  ->  ( A  x.  B
)  e.  ( ZZ>= ` 
1 ) )
7 eluzp1p1 11208 . . . . 5  |-  ( ( A  x.  B )  e.  ( ZZ>= `  1
)  ->  ( ( A  x.  B )  +  1 )  e.  ( ZZ>= `  ( 1  +  1 ) ) )
86, 7syl 17 . . . 4  |-  ( ph  ->  ( ( A  x.  B )  +  1 )  e.  ( ZZ>= `  ( 1  +  1 ) ) )
9 df-2 10690 . . . . 5  |-  2  =  ( 1  +  1 )
109fveq2i 5882 . . . 4  |-  ( ZZ>= ` 
2 )  =  (
ZZ>= `  ( 1  +  1 ) )
118, 10syl6eleqr 2560 . . 3  |-  ( ph  ->  ( ( A  x.  B )  +  1 )  e.  ( ZZ>= ` 
2 ) )
121, 11eqeltrd 2549 . 2  |-  ( ph  ->  N  e.  ( ZZ>= ` 
2 ) )
13 eluzelre 11193 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  2
)  ->  N  e.  RR )
1412, 13syl 17 . . . . . . . 8  |-  ( ph  ->  N  e.  RR )
1514adantr 472 . . . . . . 7  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  N  e.  RR )
162nnred 10646 . . . . . . . . 9  |-  ( ph  ->  A  e.  RR )
1716resqcld 12480 . . . . . . . 8  |-  ( ph  ->  ( A ^ 2 )  e.  RR )
1817adantr 472 . . . . . . 7  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A ^ 2 )  e.  RR )
19 prmnn 14704 . . . . . . . . . 10  |-  ( q  e.  Prime  ->  q  e.  NN )
2019ad2antrl 742 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
q  e.  NN )
2120nnred 10646 . . . . . . . 8  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
q  e.  RR )
2221resqcld 12480 . . . . . . 7  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( q ^ 2 )  e.  RR )
23 pockthg.3 . . . . . . . . . . 11  |-  ( ph  ->  B  <  A )
243nnred 10646 . . . . . . . . . . . 12  |-  ( ph  ->  B  e.  RR )
252nngt0d 10675 . . . . . . . . . . . 12  |-  ( ph  ->  0  <  A )
26 ltmul2 10478 . . . . . . . . . . . 12  |-  ( ( B  e.  RR  /\  A  e.  RR  /\  ( A  e.  RR  /\  0  <  A ) )  -> 
( B  <  A  <->  ( A  x.  B )  <  ( A  x.  A ) ) )
2724, 16, 16, 25, 26syl112anc 1296 . . . . . . . . . . 11  |-  ( ph  ->  ( B  <  A  <->  ( A  x.  B )  <  ( A  x.  A ) ) )
2823, 27mpbid 215 . . . . . . . . . 10  |-  ( ph  ->  ( A  x.  B
)  <  ( A  x.  A ) )
292, 2nnmulcld 10679 . . . . . . . . . . 11  |-  ( ph  ->  ( A  x.  A
)  e.  NN )
30 nnltp1le 11016 . . . . . . . . . . 11  |-  ( ( ( A  x.  B
)  e.  NN  /\  ( A  x.  A
)  e.  NN )  ->  ( ( A  x.  B )  < 
( A  x.  A
)  <->  ( ( A  x.  B )  +  1 )  <_  ( A  x.  A )
) )
314, 29, 30syl2anc 673 . . . . . . . . . 10  |-  ( ph  ->  ( ( A  x.  B )  <  ( A  x.  A )  <->  ( ( A  x.  B
)  +  1 )  <_  ( A  x.  A ) ) )
3228, 31mpbid 215 . . . . . . . . 9  |-  ( ph  ->  ( ( A  x.  B )  +  1 )  <_  ( A  x.  A ) )
332nncnd 10647 . . . . . . . . . 10  |-  ( ph  ->  A  e.  CC )
3433sqvald 12451 . . . . . . . . 9  |-  ( ph  ->  ( A ^ 2 )  =  ( A  x.  A ) )
3532, 1, 343brtr4d 4426 . . . . . . . 8  |-  ( ph  ->  N  <_  ( A ^ 2 ) )
3635adantr 472 . . . . . . 7  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  N  <_  ( A ^
2 ) )
37 pockthg.5 . . . . . . . . . . . . 13  |-  ( ph  ->  A. p  e.  Prime  ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )
3837adantr 472 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A. p  e.  Prime  ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )
39 prmnn 14704 . . . . . . . . . . . . . . . . . . . 20  |-  ( p  e.  Prime  ->  p  e.  NN )
4039ad2antrl 742 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  p  e.  NN )
4140nncnd 10647 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  p  e.  CC )
4241exp1d 12449 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  ( p ^ 1 )  =  p )
43 nnge1 10657 . . . . . . . . . . . . . . . . . . 19  |-  ( ( p  pCnt  A )  e.  NN  ->  1  <_  ( p  pCnt  A )
)
4443ad2antll 743 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  1  <_  ( p  pCnt  A )
)
45 simprl 772 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  p  e.  Prime )
462nnzd 11062 . . . . . . . . . . . . . . . . . . . 20  |-  ( ph  ->  A  e.  ZZ )
4746ad2antrr 740 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  A  e.  ZZ )
48 1nn0 10909 . . . . . . . . . . . . . . . . . . . 20  |-  1  e.  NN0
4948a1i 11 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  1  e.  NN0 )
50 pcdvdsb 14897 . . . . . . . . . . . . . . . . . . 19  |-  ( ( p  e.  Prime  /\  A  e.  ZZ  /\  1  e. 
NN0 )  ->  (
1  <_  ( p  pCnt  A )  <->  ( p ^ 1 )  ||  A ) )
5145, 47, 49, 50syl3anc 1292 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  ( 1  <_  ( p  pCnt  A )  <->  ( p ^
1 )  ||  A
) )
5244, 51mpbid 215 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  ( p ^ 1 )  ||  A )
5342, 52eqbrtrrd 4418 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  p  ||  A
)
54 simpl1 1033 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  ph )
5554, 2syl 17 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  A  e.  NN )
5654, 3syl 17 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  B  e.  NN )
5754, 23syl 17 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  B  <  A )
5854, 1syl 17 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  N  =  ( ( A  x.  B )  +  1 ) )
59 simpl2l 1083 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
q  e.  Prime )
60 simpl2r 1084 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
q  ||  N )
61 simpl3l 1085 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  p  e.  Prime )
62 simpl3r 1086 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
( p  pCnt  A
)  e.  NN )
63 simprl 772 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  ->  x  e.  ZZ )
64 simprrl 782 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
( ( x ^
( N  -  1 ) )  mod  N
)  =  1 )
65 simprrr 783 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
( ( ( x ^ ( ( N  -  1 )  /  p ) )  - 
1 )  gcd  N
)  =  1 )
6655, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65pockthlem 14928 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  /\  ( x  e.  ZZ  /\  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) ) )  -> 
( p  pCnt  A
)  <_  ( p  pCnt  ( q  -  1 ) ) )
6766rexlimdvaa 2872 . . . . . . . . . . . . . . . . 17  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N )  /\  (
p  e.  Prime  /\  (
p  pCnt  A )  e.  NN ) )  -> 
( E. x  e.  ZZ  ( ( ( x ^ ( N  -  1 ) )  mod  N )  =  1  /\  ( ( ( x ^ (
( N  -  1 )  /  p ) )  -  1 )  gcd  N )  =  1 )  ->  (
p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) )
68673expa 1231 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  ( E. x  e.  ZZ  (
( ( x ^
( N  -  1 ) )  mod  N
)  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  - 
1 )  gcd  N
)  =  1 )  ->  ( p  pCnt  A )  <_  ( p  pCnt  ( q  -  1 ) ) ) )
6953, 68embantd 55 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  ( p  e.  Prime  /\  ( p  pCnt  A
)  e.  NN ) )  ->  ( (
p  ||  A  ->  E. x  e.  ZZ  (
( ( x ^
( N  -  1 ) )  mod  N
)  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  - 
1 )  gcd  N
)  =  1 ) )  ->  ( p  pCnt  A )  <_  (
p  pCnt  ( q  -  1 ) ) ) )
7069expr 626 . . . . . . . . . . . . . 14  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( ( p  pCnt  A )  e.  NN  ->  ( ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) )  ->  (
p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) ) )
71 id 22 . . . . . . . . . . . . . . . . . 18  |-  ( p  e.  Prime  ->  p  e. 
Prime )
72 prmuz2 14721 . . . . . . . . . . . . . . . . . . . 20  |-  ( q  e.  Prime  ->  q  e.  ( ZZ>= `  2 )
)
73 uz2m1nn 11256 . . . . . . . . . . . . . . . . . . . 20  |-  ( q  e.  ( ZZ>= `  2
)  ->  ( q  -  1 )  e.  NN )
7472, 73syl 17 . . . . . . . . . . . . . . . . . . 19  |-  ( q  e.  Prime  ->  ( q  -  1 )  e.  NN )
7574ad2antrl 742 . . . . . . . . . . . . . . . . . 18  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( q  -  1 )  e.  NN )
76 pccl 14878 . . . . . . . . . . . . . . . . . 18  |-  ( ( p  e.  Prime  /\  (
q  -  1 )  e.  NN )  -> 
( p  pCnt  (
q  -  1 ) )  e.  NN0 )
7771, 75, 76syl2anr 486 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( p  pCnt  (
q  -  1 ) )  e.  NN0 )
7877nn0ge0d 10952 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
0  <_  ( p  pCnt  ( q  -  1 ) ) )
79 breq1 4398 . . . . . . . . . . . . . . . 16  |-  ( ( p  pCnt  A )  =  0  ->  (
( p  pCnt  A
)  <_  ( p  pCnt  ( q  -  1 ) )  <->  0  <_  ( p  pCnt  ( q  -  1 ) ) ) )
8078, 79syl5ibrcom 230 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( ( p  pCnt  A )  =  0  -> 
( p  pCnt  A
)  <_  ( p  pCnt  ( q  -  1 ) ) ) )
8180a1dd 46 . . . . . . . . . . . . . 14  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( ( p  pCnt  A )  =  0  -> 
( ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) )  ->  (
p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) ) )
82 simpr 468 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  ->  p  e.  Prime )
832ad2antrr 740 . . . . . . . . . . . . . . . 16  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  ->  A  e.  NN )
8482, 83pccld 14879 . . . . . . . . . . . . . . 15  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( p  pCnt  A
)  e.  NN0 )
85 elnn0 10895 . . . . . . . . . . . . . . 15  |-  ( ( p  pCnt  A )  e.  NN0  <->  ( ( p 
pCnt  A )  e.  NN  \/  ( p  pCnt  A
)  =  0 ) )
8684, 85sylib 201 . . . . . . . . . . . . . 14  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( ( p  pCnt  A )  e.  NN  \/  ( p  pCnt  A )  =  0 ) )
8770, 81, 86mpjaod 388 . . . . . . . . . . . . 13  |-  ( ( ( ph  /\  (
q  e.  Prime  /\  q  ||  N ) )  /\  p  e.  Prime )  -> 
( ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) )  ->  (
p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) )
8887ralimdva 2805 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A. p  e. 
Prime  ( p  ||  A  ->  E. x  e.  ZZ  ( ( ( x ^ ( N  - 
1 ) )  mod 
N )  =  1  /\  ( ( ( x ^ ( ( N  -  1 )  /  p ) )  -  1 )  gcd 
N )  =  1 ) )  ->  A. p  e.  Prime  ( p  pCnt  A )  <_  ( p  pCnt  ( q  -  1 ) ) ) )
8938, 88mpd 15 . . . . . . . . . . 11  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A. p  e.  Prime  ( p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) )
9046adantr 472 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  e.  ZZ )
9175nnzd 11062 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( q  -  1 )  e.  ZZ )
92 pc2dvds 14907 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( q  -  1 )  e.  ZZ )  ->  ( A  ||  ( q  -  1 )  <->  A. p  e.  Prime  ( p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) )
9390, 91, 92syl2anc 673 . . . . . . . . . . 11  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A  ||  (
q  -  1 )  <->  A. p  e.  Prime  ( p  pCnt  A )  <_  ( p  pCnt  (
q  -  1 ) ) ) )
9489, 93mpbird 240 . . . . . . . . . 10  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  ||  ( q  - 
1 ) )
95 dvdsle 14427 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( q  -  1 )  e.  NN )  ->  ( A  ||  ( q  -  1 )  ->  A  <_  ( q  -  1 ) ) )
9690, 75, 95syl2anc 673 . . . . . . . . . 10  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A  ||  (
q  -  1 )  ->  A  <_  (
q  -  1 ) ) )
9794, 96mpd 15 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  <_  ( q  - 
1 ) )
982nnnn0d 10949 . . . . . . . . . . 11  |-  ( ph  ->  A  e.  NN0 )
9998adantr 472 . . . . . . . . . 10  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  e.  NN0 )
10020nnnn0d 10949 . . . . . . . . . 10  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
q  e.  NN0 )
101 nn0ltlem1 11020 . . . . . . . . . 10  |-  ( ( A  e.  NN0  /\  q  e.  NN0 )  -> 
( A  <  q  <->  A  <_  ( q  - 
1 ) ) )
10299, 100, 101syl2anc 673 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A  <  q  <->  A  <_  ( q  - 
1 ) ) )
10397, 102mpbird 240 . . . . . . . 8  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  <  q )
10416adantr 472 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  A  e.  RR )
10598nn0ge0d 10952 . . . . . . . . . 10  |-  ( ph  ->  0  <_  A )
106105adantr 472 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
0  <_  A )
107100nn0ge0d 10952 . . . . . . . . 9  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
0  <_  q )
108104, 21, 106, 107lt2sqd 12488 . . . . . . . 8  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A  <  q  <->  ( A ^ 2 )  <  ( q ^
2 ) ) )
109103, 108mpbid 215 . . . . . . 7  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( A ^ 2 )  <  ( q ^ 2 ) )
11015, 18, 22, 36, 109lelttrd 9810 . . . . . 6  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  N  <  ( q ^
2 ) )
11115, 22ltnled 9799 . . . . . 6  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  -> 
( N  <  (
q ^ 2 )  <->  -.  ( q ^ 2 )  <_  N )
)
112110, 111mpbid 215 . . . . 5  |-  ( (
ph  /\  ( q  e.  Prime  /\  q  ||  N ) )  ->  -.  ( q ^ 2 )  <_  N )
113112expr 626 . . . 4  |-  ( (
ph  /\  q  e.  Prime )  ->  ( q  ||  N  ->  -.  (
q ^ 2 )  <_  N ) )
114113con2d 119 . . 3  |-  ( (
ph  /\  q  e.  Prime )  ->  ( (
q ^ 2 )  <_  N  ->  -.  q  ||  N ) )
115114ralrimiva 2809 . 2  |-  ( ph  ->  A. q  e.  Prime  ( ( q ^ 2 )  <_  N  ->  -.  q  ||  N ) )
116 isprm5 14730 . 2  |-  ( N  e.  Prime  <->  ( N  e.  ( ZZ>= `  2 )  /\  A. q  e.  Prime  ( ( q ^ 2 )  <_  N  ->  -.  q  ||  N ) ) )
11712, 115, 116sylanbrc 677 1  |-  ( ph  ->  N  e.  Prime )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 189    \/ wo 375    /\ wa 376    /\ w3a 1007    = wceq 1452    e. wcel 1904   A.wral 2756   E.wrex 2757   class class class wbr 4395   ` cfv 5589  (class class class)co 6308   RRcr 9556   0cc0 9557   1c1 9558    + caddc 9560    x. cmul 9562    < clt 9693    <_ cle 9694    - cmin 9880    / cdiv 10291   NNcn 10631   2c2 10681   NN0cn0 10893   ZZcz 10961   ZZ>=cuz 11182    mod cmo 12129   ^cexp 12310    || cdvds 14382    gcd cgcd 14547   Primecprime 14701    pCnt cpc 14865
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634  ax-pre-sup 9635
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-2o 7201  df-oadd 7204  df-er 7381  df-map 7492  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-sup 7974  df-inf 7975  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-div 10292  df-nn 10632  df-2 10690  df-3 10691  df-n0 10894  df-z 10962  df-uz 11183  df-q 11288  df-rp 11326  df-fz 11811  df-fzo 11943  df-fl 12061  df-mod 12130  df-seq 12252  df-exp 12311  df-hash 12554  df-cj 13239  df-re 13240  df-im 13241  df-sqrt 13375  df-abs 13376  df-dvds 14383  df-gcd 14548  df-prm 14702  df-odz 14791  df-phi 14793  df-pc 14866
This theorem is referenced by:  pockthi  14930  proththd  39059
  Copyright terms: Public domain W3C validator