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

Theorem prmlem0 14145
Description: Lemma for prmlem1 14147 and prmlem2 14159. (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 3490 . . . . 5  |-  ( x  e.  ( Prime  \  {
2 } )  ->  x  e.  Prime )
2 prmlem0.2 . . . . . 6  |-  ( K  e.  Prime  ->  -.  K  ||  N )
3 eleq1 2503 . . . . . . 7  |-  ( x  =  K  ->  (
x  e.  Prime  <->  K  e.  Prime ) )
4 breq1 4307 . . . . . . . 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 10906 . . 3  |-  ( x  e.  ( ZZ>= `  ( K  +  1 ) )  ->  ( x  =  ( K  + 
1 )  \/  x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) ) ) )
12 eleq1 2503 . . . . . . . 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 4012 . . . . . . . . 9  |-  ( ( K  +  1 )  e.  ( Prime  \  {
2 } )  <->  ( ( K  +  1 )  e.  Prime  /\  ( K  +  1 )  =/=  2 ) )
15 eluzel2 10878 . . . . . . . . . . . . . . . . 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 10688 . . . . . . . . . . . . . . . . 17  |-  1  e.  ZZ
19 n2dvds1 13594 . . . . . . . . . . . . . . . . 17  |-  -.  2  ||  1
20 opoe 13890 . . . . . . . . . . . . . . . . 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 10690 . . . . . . . . . . . . . . . 16  |-  2  e.  ZZ
25 uzid 10887 . . . . . . . . . . . . . . . 16  |-  ( 2  e.  ZZ  ->  2  e.  ( ZZ>= `  2 )
)
2624, 25mp1i 12 . . . . . . . . . . . . . . 15  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  2  e.  (
ZZ>= `  2 ) )
27 dvdsprm 13797 . . . . . . . . . . . . . . 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 2448 . . . . . . . . . . . 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 2656 . . . . . . . . . 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 10760 . . . . . . . . 9  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  K  e.  CC )
40 ax-1cn 9352 . . . . . . . . . 10  |-  1  e.  CC
41 addass 9381 . . . . . . . . . 10  |-  ( ( K  e.  CC  /\  1  e.  CC  /\  1  e.  CC )  ->  (
( K  +  1 )  +  1 )  =  ( K  +  ( 1  +  1 ) ) )
4240, 40, 41mp3an23 1306 . . . . . . . . 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 10447 . . . . . . . . . 10  |-  ( 1  +  1 )  =  2
4544oveq2i 6114 . . . . . . . . 9  |-  ( K  +  ( 1  +  1 ) )  =  ( K  +  2 )
46 prmlem0.3 . . . . . . . . 9  |-  ( K  +  2 )  =  M
4745, 46eqtri 2463 . . . . . . . 8  |-  ( K  +  ( 1  +  1 ) )  =  M
4843, 47syl6eq 2491 . . . . . . 7  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ( K  +  1 )  +  1 )  =  M )
4948fveq2d 5707 . . . . . 6  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( ZZ>= `  (
( K  +  1 )  +  1 ) )  =  ( ZZ>= `  M ) )
5049eleq2d 2510 . . . . 5  |-  ( ( -.  2  ||  K  /\  x  e.  ( ZZ>=
`  K ) )  ->  ( x  e.  ( ZZ>= `  ( ( K  +  1 )  +  1 ) )  <-> 
x  e.  ( ZZ>= `  M ) ) )
51 dvdsaddr 13584 . . . . . . . . 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 4312 . . . . . . . 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 10906 . . 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 1369    e. wcel 1756    =/= wne 2618    \ cdif 3337   {csn 3889   class class class wbr 4304   ` cfv 5430  (class class class)co 6103   CCcc 9292   1c1 9295    + caddc 9297    <_ cle 9431   2c2 10383   ZZcz 10658   ZZ>=cuz 10873   ^cexp 11877    || cdivides 13547   Primecprime 13775
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4425  ax-nul 4433  ax-pow 4482  ax-pr 4543  ax-un 6384  ax-cnex 9350  ax-resscn 9351  ax-1cn 9352  ax-icn 9353  ax-addcl 9354  ax-addrcl 9355  ax-mulcl 9356  ax-mulrcl 9357  ax-mulcom 9358  ax-addass 9359  ax-mulass 9360  ax-distr 9361  ax-i2m1 9362  ax-1ne0 9363  ax-1rid 9364  ax-rnegex 9365  ax-rrecex 9366  ax-cnre 9367  ax-pre-lttri 9368  ax-pre-lttrn 9369  ax-pre-ltadd 9370  ax-pre-mulgt0 9371
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2620  df-nel 2621  df-ral 2732  df-rex 2733  df-reu 2734  df-rmo 2735  df-rab 2736  df-v 2986  df-sbc 3199  df-csb 3301  df-dif 3343  df-un 3345  df-in 3347  df-ss 3354  df-pss 3356  df-nul 3650  df-if 3804  df-pw 3874  df-sn 3890  df-pr 3892  df-tp 3894  df-op 3896  df-uni 4104  df-int 4141  df-iun 4185  df-br 4305  df-opab 4363  df-mpt 4364  df-tr 4398  df-eprel 4644  df-id 4648  df-po 4653  df-so 4654  df-fr 4691  df-we 4693  df-ord 4734  df-on 4735  df-lim 4736  df-suc 4737  df-xp 4858  df-rel 4859  df-cnv 4860  df-co 4861  df-dm 4862  df-rn 4863  df-res 4864  df-ima 4865  df-iota 5393  df-fun 5432  df-fn 5433  df-f 5434  df-f1 5435  df-fo 5436  df-f1o 5437  df-fv 5438  df-riota 6064  df-ov 6106  df-oprab 6107  df-mpt2 6108  df-om 6489  df-recs 6844  df-rdg 6878  df-1o 6932  df-2o 6933  df-oadd 6936  df-er 7113  df-en 7323  df-dom 7324  df-sdom 7325  df-fin 7326  df-pnf 9432  df-mnf 9433  df-xr 9434  df-ltxr 9435  df-le 9436  df-sub 9609  df-neg 9610  df-div 10006  df-nn 10335  df-2 10392  df-n0 10592  df-z 10659  df-uz 10874  df-dvds 13548  df-prm 13776
This theorem is referenced by:  prmlem1a  14146  prmlem2  14159
  Copyright terms: Public domain W3C validator