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

Theorem ppinprm 24016
Description: The prime-counting function π at a non-prime. (Contributed by Mario Carneiro, 19-Sep-2014.)
Assertion
Ref Expression
ppinprm  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  (π `  A ) )

Proof of Theorem ppinprm
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 inss2 3621 . . . . . . . . . . 11  |-  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  C_  Prime
2 simprr 764 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime ) )
31, 2sseldi 3400 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  Prime )
4 simprl 762 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  -.  ( A  +  1
)  e.  Prime )
5 nelne2 2693 . . . . . . . . . 10  |-  ( ( x  e.  Prime  /\  -.  ( A  +  1
)  e.  Prime )  ->  x  =/=  ( A  +  1 ) )
63, 4, 5syl2anc 665 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  =/=  ( A  +  1 ) )
7 elsn 3950 . . . . . . . . . 10  |-  ( x  e.  { ( A  +  1 ) }  <-> 
x  =  ( A  +  1 ) )
87necon3bbii 2643 . . . . . . . . 9  |-  ( -.  x  e.  { ( A  +  1 ) }  <->  x  =/=  ( A  +  1 ) )
96, 8sylibr 215 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  -.  x  e.  { ( A  +  1 ) } )
10 inss1 3620 . . . . . . . . . . . 12  |-  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  C_  (
2 ... ( A  + 
1 ) )
1110, 2sseldi 3400 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  ( 2 ... ( A  +  1 ) ) )
12 2z 10915 . . . . . . . . . . . 12  |-  2  e.  ZZ
13 zcn 10888 . . . . . . . . . . . . . . . 16  |-  ( A  e.  ZZ  ->  A  e.  CC )
1413adantr 466 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  A  e.  CC )
15 ax-1cn 9543 . . . . . . . . . . . . . . 15  |-  1  e.  CC
16 pncan 9827 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  CC  /\  1  e.  CC )  ->  ( ( A  + 
1 )  -  1 )  =  A )
1714, 15, 16sylancl 666 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  (
( A  +  1 )  -  1 )  =  A )
18 elfzuz2 11750 . . . . . . . . . . . . . . 15  |-  ( x  e.  ( 2 ... ( A  +  1 ) )  ->  ( A  +  1 )  e.  ( ZZ>= `  2
) )
19 uz2m1nn 11179 . . . . . . . . . . . . . . 15  |-  ( ( A  +  1 )  e.  ( ZZ>= `  2
)  ->  ( ( A  +  1 )  -  1 )  e.  NN )
2011, 18, 193syl 18 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  (
( A  +  1 )  -  1 )  e.  NN )
2117, 20eqeltrrd 2502 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  A  e.  NN )
22 nnuz 11140 . . . . . . . . . . . . . 14  |-  NN  =  ( ZZ>= `  1 )
23 2m1e1 10670 . . . . . . . . . . . . . . 15  |-  ( 2  -  1 )  =  1
2423fveq2i 5823 . . . . . . . . . . . . . 14  |-  ( ZZ>= `  ( 2  -  1 ) )  =  (
ZZ>= `  1 )
2522, 24eqtr4i 2448 . . . . . . . . . . . . 13  |-  NN  =  ( ZZ>= `  ( 2  -  1 ) )
2621, 25syl6eleq 2511 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )
27 fzsuc2 11799 . . . . . . . . . . . 12  |-  ( ( 2  e.  ZZ  /\  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )  -> 
( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
2812, 26, 27sylancr 667 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  (
2 ... ( A  + 
1 ) )  =  ( ( 2 ... A )  u.  {
( A  +  1 ) } ) )
2911, 28eleqtrd 2503 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  ( ( 2 ... A )  u.  {
( A  +  1 ) } ) )
30 elun 3544 . . . . . . . . . 10  |-  ( x  e.  ( ( 2 ... A )  u. 
{ ( A  + 
1 ) } )  <-> 
( x  e.  ( 2 ... A )  \/  x  e.  {
( A  +  1 ) } ) )
3129, 30sylib 199 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  (
x  e.  ( 2 ... A )  \/  x  e.  { ( A  +  1 ) } ) )
3231ord 378 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  ( -.  x  e.  (
2 ... A )  ->  x  e.  { ( A  +  1 ) } ) )
339, 32mt3d 128 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  ( 2 ... A
) )
3433, 3elind 3588 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( -.  ( A  +  1 )  e. 
Prime  /\  x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )
) )  ->  x  e.  ( ( 2 ... A )  i^i  Prime ) )
3534expr 618 . . . . 5  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( x  e.  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  ->  x  e.  ( ( 2 ... A )  i^i  Prime ) ) )
3635ssrdv 3408 . . . 4  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime ) 
C_  ( ( 2 ... A )  i^i 
Prime ) )
37 uzid 11119 . . . . . 6  |-  ( A  e.  ZZ  ->  A  e.  ( ZZ>= `  A )
)
3837adantr 466 . . . . 5  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  A  e.  ( ZZ>= `  A ) )
39 peano2uz 11158 . . . . 5  |-  ( A  e.  ( ZZ>= `  A
)  ->  ( A  +  1 )  e.  ( ZZ>= `  A )
)
40 fzss2 11784 . . . . 5  |-  ( ( A  +  1 )  e.  ( ZZ>= `  A
)  ->  ( 2 ... A )  C_  ( 2 ... ( A  +  1 ) ) )
41 ssrin 3625 . . . . 5  |-  ( ( 2 ... A ) 
C_  ( 2 ... ( A  +  1 ) )  ->  (
( 2 ... A
)  i^i  Prime )  C_  ( ( 2 ... ( A  +  1 ) )  i^i  Prime ) )
4238, 39, 40, 414syl 19 . . . 4  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( ( 2 ... A )  i^i  Prime ) 
C_  ( ( 2 ... ( A  + 
1 ) )  i^i 
Prime ) )
4336, 42eqssd 3419 . . 3  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( 2 ... A )  i^i 
Prime ) )
4443fveq2d 5824 . 2  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
)  =  ( # `  ( ( 2 ... A )  i^i  Prime ) ) )
45 peano2z 10924 . . . 4  |-  ( A  e.  ZZ  ->  ( A  +  1 )  e.  ZZ )
4645adantr 466 . . 3  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  ( A  +  1 )  e.  ZZ )
47 ppival2 23992 . . 3  |-  ( ( A  +  1 )  e.  ZZ  ->  (π `  ( A  +  1 ) )  =  (
# `  ( (
2 ... ( A  + 
1 ) )  i^i 
Prime ) ) )
4846, 47syl 17 . 2  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
) )
49 ppival2 23992 . . 3  |-  ( A  e.  ZZ  ->  (π `  A )  =  (
# `  ( (
2 ... A )  i^i 
Prime ) ) )
5049adantr 466 . 2  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  (π `  A )  =  ( # `  (
( 2 ... A
)  i^i  Prime ) ) )
5144, 48, 503eqtr4d 2467 1  |-  ( ( A  e.  ZZ  /\  -.  ( A  +  1 )  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  (π `  A ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 369    /\ wa 370    = wceq 1437    e. wcel 1872    =/= wne 2594    u. cun 3372    i^i cin 3373    C_ wss 3374   {csn 3936   ` cfv 5539  (class class class)co 6244   CCcc 9483   1c1 9486    + caddc 9488    - cmin 9806   NNcn 10555   2c2 10605   ZZcz 10883   ZZ>=cuz 11105   ...cfz 11730   #chash 12460   Primecprime 14560  πcppi 23957
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1663  ax-4 1676  ax-5 1752  ax-6 1798  ax-7 1843  ax-8 1874  ax-9 1876  ax-10 1891  ax-11 1896  ax-12 1909  ax-13 2058  ax-ext 2403  ax-sep 4484  ax-nul 4493  ax-pow 4540  ax-pr 4598  ax-un 6536  ax-cnex 9541  ax-resscn 9542  ax-1cn 9543  ax-icn 9544  ax-addcl 9545  ax-addrcl 9546  ax-mulcl 9547  ax-mulrcl 9548  ax-mulcom 9549  ax-addass 9550  ax-mulass 9551  ax-distr 9552  ax-i2m1 9553  ax-1ne0 9554  ax-1rid 9555  ax-rnegex 9556  ax-rrecex 9557  ax-cnre 9558  ax-pre-lttri 9559  ax-pre-lttrn 9560  ax-pre-ltadd 9561  ax-pre-mulgt0 9562  ax-pre-sup 9563
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1658  df-nf 1662  df-sb 1791  df-eu 2275  df-mo 2276  df-clab 2410  df-cleq 2416  df-clel 2419  df-nfc 2553  df-ne 2596  df-nel 2597  df-ral 2714  df-rex 2715  df-reu 2716  df-rmo 2717  df-rab 2718  df-v 3019  df-sbc 3238  df-csb 3334  df-dif 3377  df-un 3379  df-in 3381  df-ss 3388  df-pss 3390  df-nul 3700  df-if 3850  df-pw 3921  df-sn 3937  df-pr 3939  df-tp 3941  df-op 3943  df-uni 4158  df-int 4194  df-iun 4239  df-br 4362  df-opab 4421  df-mpt 4422  df-tr 4457  df-eprel 4702  df-id 4706  df-po 4712  df-so 4713  df-fr 4750  df-we 4752  df-xp 4797  df-rel 4798  df-cnv 4799  df-co 4800  df-dm 4801  df-rn 4802  df-res 4803  df-ima 4804  df-pred 5337  df-ord 5383  df-on 5384  df-lim 5385  df-suc 5386  df-iota 5503  df-fun 5541  df-fn 5542  df-f 5543  df-f1 5544  df-fo 5545  df-f1o 5546  df-fv 5547  df-riota 6206  df-ov 6247  df-oprab 6248  df-mpt2 6249  df-om 6646  df-1st 6746  df-2nd 6747  df-wrecs 6978  df-recs 7040  df-rdg 7078  df-1o 7132  df-2o 7133  df-oadd 7136  df-er 7313  df-en 7520  df-dom 7521  df-sdom 7522  df-fin 7523  df-sup 7904  df-inf 7905  df-pnf 9623  df-mnf 9624  df-xr 9625  df-ltxr 9626  df-le 9627  df-sub 9808  df-neg 9809  df-nn 10556  df-2 10614  df-n0 10816  df-z 10884  df-uz 11106  df-icc 11588  df-fz 11731  df-fl 11973  df-dvds 14244  df-prm 14561  df-ppi 23963
This theorem is referenced by:  ppip1le  24025  ppi2i  24033  bposlem5  24153
  Copyright terms: Public domain W3C validator