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

Theorem prmlem0 14465
Description: Lemma for prmlem1 14467 and prmlem2 14479. (Contributed by Mario Carneiro, 18-Feb-2014.)
Hypotheses
Ref Expression
prmlem0.1  |-  ( ( -.  2  ||  M  /\  x  e.  ( ZZ>=
`  M ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) )
prmlem0.2  |-  ( K  e.  Prime  ->  -.  K  ||  N )
prmlem0.3  |-  ( K  +  2 )  =  M
Assertion
Ref Expression
prmlem0  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) )
Distinct variable group:    x, N
Allowed substitution hints:    K( x)    M( x)

Proof of Theorem prmlem0
StepHypRef Expression
1 eldifi 3631 . . . . 5  |-  ( x  e.  ( Prime  \  {
2 } )  ->  x  e.  Prime )
2 prmlem0.2 . . . . . 6  |-  ( K  e.  Prime  ->  -.  K  ||  N )
3 eleq1 2539 . . . . . . 7  |-  ( x  =  K  ->  (
x  e.  Prime  <->  K  e.  Prime ) )
4 breq1 4456 . . . . . . . 8  |-  ( x  =  K  ->  (
x  ||  N  <->  K  ||  N
) )
54notbid 294 . . . . . . 7  |-  ( x  =  K  ->  ( -.  x  ||  N  <->  -.  K  ||  N ) )
63, 5imbi12d 320 . . . . . 6  |-  ( x  =  K  ->  (
( x  e.  Prime  ->  -.  x  ||  N )  <-> 
( K  e.  Prime  ->  -.  K  ||  N ) ) )
72, 6mpbiri 233 . . . . 5  |-  ( x  =  K  ->  (
x  e.  Prime  ->  -.  x  ||  N ) )
81, 7syl5 32 . . . 4  |-  ( x  =  K  ->  (
x  e.  ( Prime  \  { 2 } )  ->  -.  x  ||  N
) )
98adantrd 468 . . 3  |-  ( x  =  K  ->  (
( x  e.  ( Prime  \  { 2 } )  /\  (
x ^ 2 )  <_  N )  ->  -.  x  ||  N ) )
109a1i 11 . 2  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  =  K  ->  ( (
x  e.  ( Prime  \  { 2 } )  /\  ( x ^
2 )  <_  N
)  ->  -.  x  ||  N ) ) )
11 uzp1 11127 . . 3  |-  ( x  e.  ( ZZ>= `  ( K  +  1 ) )  ->  ( x  =  ( K  + 
1 )  \/  x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) ) ) )
12 eleq1 2539 . . . . . . . 8  |-  ( x  =  ( K  + 
1 )  ->  (
x  e.  ( Prime  \  { 2 } )  <-> 
( K  +  1 )  e.  ( Prime  \  { 2 } ) ) )
1312adantl 466 . . . . . . 7  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  x  =  ( K  +  1 ) )  ->  ( x  e.  ( Prime  \  { 2 } )  <->  ( K  +  1 )  e.  ( Prime  \  { 2 } ) ) )
14 eldifsn 4158 . . . . . . . . 9  |-  ( ( K  +  1 )  e.  ( Prime  \  {
2 } )  <->  ( ( K  +  1 )  e.  Prime  /\  ( K  +  1 )  =/=  2 ) )
15 eluzel2 11099 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ( ZZ>= `  K
)  ->  K  e.  ZZ )
1615adantl 466 . . . . . . . . . . . . . . . 16  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  K  e.  ZZ )
17 simpl 457 . . . . . . . . . . . . . . . 16  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  -.  2  ||  K )
18 1z 10906 . . . . . . . . . . . . . . . . 17  |-  1  e.  ZZ
19 n2dvds1 13910 . . . . . . . . . . . . . . . . 17  |-  -.  2  ||  1
20 opoe 14210 . . . . . . . . . . . . . . . . 17  |-  ( ( ( K  e.  ZZ  /\ 
-.  2  ||  K
)  /\  ( 1  e.  ZZ  /\  -.  2  ||  1 ) )  ->  2  ||  ( K  +  1 ) )
2118, 19, 20mpanr12 685 . . . . . . . . . . . . . . . 16  |-  ( ( K  e.  ZZ  /\  -.  2  ||  K )  ->  2  ||  ( K  +  1 ) )
2216, 17, 21syl2anc 661 . . . . . . . . . . . . . . 15  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  2  ||  ( K  +  1 ) )
2322adantr 465 . . . . . . . . . . . . . 14  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  2  ||  ( K  +  1 ) )
24 2z 10908 . . . . . . . . . . . . . . . 16  |-  2  e.  ZZ
25 uzid 11108 . . . . . . . . . . . . . . . 16  |-  ( 2  e.  ZZ  ->  2  e.  ( ZZ>= `  2 )
)
2624, 25mp1i 12 . . . . . . . . . . . . . . 15  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  2  e.  (
ZZ>= `  2 ) )
27 dvdsprm 14115 . . . . . . . . . . . . . . 15  |-  ( ( 2  e.  ( ZZ>= ` 
2 )  /\  ( K  +  1 )  e.  Prime )  ->  (
2  ||  ( K  +  1 )  <->  2  =  ( K  +  1
) ) )
2826, 27sylan 471 . . . . . . . . . . . . . 14  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  ( 2  ||  ( K  +  1
)  <->  2  =  ( K  +  1 ) ) )
2923, 28mpbid 210 . . . . . . . . . . . . 13  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  2  =  ( K  +  1 ) )
3029eqcomd 2475 . . . . . . . . . . . 12  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  ( K  + 
1 )  =  2 )
3130a1d 25 . . . . . . . . . . 11  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  ( x  ||  N  ->  ( K  + 
1 )  =  2 ) )
3231necon3ad 2677 . . . . . . . . . 10  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  ( K  + 
1 )  e.  Prime )  ->  ( ( K  +  1 )  =/=  2  ->  -.  x  ||  N ) )
3332expimpd 603 . . . . . . . . 9  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( ( K  +  1 )  e.  Prime  /\  ( K  +  1 )  =/=  2 )  ->  -.  x  ||  N ) )
3414, 33syl5bi 217 . . . . . . . 8  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( K  +  1 )  e.  ( Prime  \  { 2 } )  ->  -.  x  ||  N ) )
3534adantr 465 . . . . . . 7  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  x  =  ( K  +  1 ) )  ->  ( ( K  +  1 )  e.  ( Prime  \  {
2 } )  ->  -.  x  ||  N ) )
3613, 35sylbid 215 . . . . . 6  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  x  =  ( K  +  1 ) )  ->  ( x  e.  ( Prime  \  { 2 } )  ->  -.  x  ||  N ) )
3736adantrd 468 . . . . 5  |-  ( ( ( -.  2  ||  K  /\  x  e.  (
ZZ>= `  K ) )  /\  x  =  ( K  +  1 ) )  ->  ( (
x  e.  ( Prime  \  { 2 } )  /\  ( x ^
2 )  <_  N
)  ->  -.  x  ||  N ) )
3837ex 434 . . . 4  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  =  ( K  +  1 )  ->  ( (
x  e.  ( Prime  \  { 2 } )  /\  ( x ^
2 )  <_  N
)  ->  -.  x  ||  N ) ) )
3916zcnd 10979 . . . . . . . . 9  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  K  e.  CC )
40 ax-1cn 9562 . . . . . . . . . 10  |-  1  e.  CC
41 addass 9591 . . . . . . . . . 10  |-  ( ( K  e.  CC  /\  1  e.  CC  /\  1  e.  CC )  ->  (
( K  +  1 )  +  1 )  =  ( K  +  ( 1  +  1 ) ) )
4240, 40, 41mp3an23 1316 . . . . . . . . 9  |-  ( K  e.  CC  ->  (
( K  +  1 )  +  1 )  =  ( K  +  ( 1  +  1 ) ) )
4339, 42syl 16 . . . . . . . 8  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( K  +  1 )  +  1 )  =  ( K  +  ( 1  +  1 ) ) )
44 1p1e2 10661 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
4544oveq2i 6306 . . . . . . . . 9  |-  ( K  +  ( 1  +  1 ) )  =  ( K  +  2 )
46 prmlem0.3 . . . . . . . . 9  |-  ( K  +  2 )  =  M
4745, 46eqtri 2496 . . . . . . . 8  |-  ( K  +  ( 1  +  1 ) )  =  M
4843, 47syl6eq 2524 . . . . . . 7  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( K  +  1 )  +  1 )  =  M )
4948fveq2d 5876 . . . . . 6  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ZZ>= `  (
( K  +  1 )  +  1 ) )  =  ( ZZ>= `  M ) )
5049eleq2d 2537 . . . . 5  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) )  <-> 
x  e.  ( ZZ>= `  M ) ) )
51 dvdsaddr 13900 . . . . . . . . 9  |-  ( ( 2  e.  ZZ  /\  K  e.  ZZ )  ->  ( 2  ||  K  <->  2 
||  ( K  + 
2 ) ) )
5224, 16, 51sylancr 663 . . . . . . . 8  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( 2  ||  K 
<->  2  ||  ( K  +  2 ) ) )
5346breq2i 4461 . . . . . . . 8  |-  ( 2 
||  ( K  + 
2 )  <->  2  ||  M )
5452, 53syl6bb 261 . . . . . . 7  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( 2  ||  K 
<->  2  ||  M ) )
5517, 54mtbid 300 . . . . . 6  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  -.  2  ||  M )
56 prmlem0.1 . . . . . . 7  |-  ( ( -.  2  ||  M  /\  x  e.  ( ZZ>=
`  M ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) )
5756ex 434 . . . . . 6  |-  ( -.  2  ||  M  -> 
( x  e.  (
ZZ>= `  M )  -> 
( ( x  e.  ( Prime  \  { 2 } )  /\  (
x ^ 2 )  <_  N )  ->  -.  x  ||  N ) ) )
5855, 57syl 16 . . . . 5  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  e.  ( ZZ>= `  M )  ->  ( ( x  e.  ( Prime  \  { 2 } )  /\  (
x ^ 2 )  <_  N )  ->  -.  x  ||  N ) ) )
5950, 58sylbid 215 . . . 4  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) ) )
6038, 59jaod 380 . . 3  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( x  =  ( K  + 
1 )  \/  x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) ) )  ->  ( (
x  e.  ( Prime  \  { 2 } )  /\  ( x ^
2 )  <_  N
)  ->  -.  x  ||  N ) ) )
6111, 60syl5 32 . 2  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  e.  ( ZZ>= `  ( K  +  1 ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) ) )
62 uzp1 11127 . . 3  |-  ( x  e.  ( ZZ>= `  K
)  ->  ( x  =  K  \/  x  e.  ( ZZ>= `  ( K  +  1 ) ) ) )
6362adantl 466 . 2  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  =  K  \/  x  e.  ( ZZ>= `  ( K  +  1 ) ) ) )
6410, 61, 63mpjaod 381 1  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( x  e.  ( Prime  \  {
2 } )  /\  ( x ^ 2 )  <_  N )  ->  -.  x  ||  N
) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 368    /\ wa 369    = wceq 1379    e. wcel 1767    =/= wne 2662    \ cdif 3478   {csn 4033   class class class wbr 4453   ` cfv 5594  (class class class)co 6295   CCcc 9502   1c1 9505    + caddc 9507    <_ cle 9641   2c2 10597   ZZcz 10876   ZZ>=cuz 11094   ^cexp 12146    || cdivides 13863   Primecprime 14092
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4574  ax-nul 4582  ax-pow 4631  ax-pr 4692  ax-un 6587  ax-cnex 9560  ax-resscn 9561  ax-1cn 9562  ax-icn 9563  ax-addcl 9564  ax-addrcl 9565  ax-mulcl 9566  ax-mulrcl 9567  ax-mulcom 9568  ax-addass 9569  ax-mulass 9570  ax-distr 9571  ax-i2m1 9572  ax-1ne0 9573  ax-1rid 9574  ax-rnegex 9575  ax-rrecex 9576  ax-cnre 9577  ax-pre-lttri 9578  ax-pre-lttrn 9579  ax-pre-ltadd 9580  ax-pre-mulgt0 9581
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2822  df-rex 2823  df-reu 2824  df-rmo 2825  df-rab 2826  df-v 3120  df-sbc 3337  df-csb 3441  df-dif 3484  df-un 3486  df-in 3488  df-ss 3495  df-pss 3497  df-nul 3791  df-if 3946  df-pw 4018  df-sn 4034  df-pr 4036  df-tp 4038  df-op 4040  df-uni 4252  df-int 4289  df-iun 4333  df-br 4454  df-opab 4512  df-mpt 4513  df-tr 4547  df-eprel 4797  df-id 4801  df-po 4806  df-so 4807  df-fr 4844  df-we 4846  df-ord 4887  df-on 4888  df-lim 4889  df-suc 4890  df-xp 5011  df-rel 5012  df-cnv 5013  df-co 5014  df-dm 5015  df-rn 5016  df-res 5017  df-ima 5018  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6256  df-ov 6298  df-oprab 6299  df-mpt2 6300  df-om 6696  df-recs 7054  df-rdg 7088  df-1o 7142  df-2o 7143  df-oadd 7146  df-er 7323  df-en 7529  df-dom 7530  df-sdom 7531  df-fin 7532  df-pnf 9642  df-mnf 9643  df-xr 9644  df-ltxr 9645  df-le 9646  df-sub 9819  df-neg 9820  df-div 10219  df-nn 10549  df-2 10606  df-n0 10808  df-z 10877  df-uz 11095  df-dvds 13864  df-prm 14093
This theorem is referenced by:  prmlem1a  14466  prmlem2  14479
  Copyright terms: Public domain W3C validator