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

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

Proof of Theorem ppiprm
StepHypRef Expression
1 fzfid 11275 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... A
)  e.  Fin )
2 inss1 3529 . . . 4  |-  ( ( 2 ... A )  i^i  Prime )  C_  (
2 ... A )
3 ssfi 7296 . . . 4  |-  ( ( ( 2 ... A
)  e.  Fin  /\  ( ( 2 ... A )  i^i  Prime ) 
C_  ( 2 ... A ) )  -> 
( ( 2 ... A )  i^i  Prime )  e.  Fin )
41, 2, 3sylancl 644 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... A )  i^i  Prime )  e.  Fin )
5 zre 10250 . . . . . . 7  |-  ( A  e.  ZZ  ->  A  e.  RR )
65adantr 452 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  RR )
76ltp1d 9905 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  <  ( A  +  1 ) )
8 peano2z 10282 . . . . . . . 8  |-  ( A  e.  ZZ  ->  ( A  +  1 )  e.  ZZ )
98adantr 452 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ZZ )
109zred 10339 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  RR )
116, 10ltnled 9184 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  <  ( A  +  1 )  <->  -.  ( A  +  1 )  <_  A )
)
127, 11mpbid 202 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  <_  A
)
132sseli 3312 . . . . 5  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  e.  ( 2 ... A
) )
14 elfzle2 11025 . . . . 5  |-  ( ( A  +  1 )  e.  ( 2 ... A )  ->  ( A  +  1 )  <_  A )
1513, 14syl 16 . . . 4  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  <_  A )
1612, 15nsyl 115 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  e.  ( ( 2 ... A
)  i^i  Prime ) )
17 ovex 6073 . . . 4  |-  ( A  +  1 )  e. 
_V
18 hashunsng 11628 . . . 4  |-  ( ( A  +  1 )  e.  _V  ->  (
( ( ( 2 ... A )  i^i 
Prime )  e.  Fin  /\ 
-.  ( A  + 
1 )  e.  ( ( 2 ... A
)  i^i  Prime ) )  ->  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) ) )
1917, 18ax-mp 8 . . 3  |-  ( ( ( ( 2 ... A )  i^i  Prime )  e.  Fin  /\  -.  ( A  +  1
)  e.  ( ( 2 ... A )  i^i  Prime ) )  -> 
( # `  ( ( ( 2 ... A
)  i^i  Prime )  u. 
{ ( A  + 
1 ) } ) )  =  ( (
# `  ( (
2 ... A )  i^i 
Prime ) )  +  1 ) )
204, 16, 19syl2anc 643 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
21 ppival2 20872 . . . 4  |-  ( ( A  +  1 )  e.  ZZ  ->  (π `  ( A  +  1 ) )  =  (
# `  ( (
2 ... ( A  + 
1 ) )  i^i 
Prime ) ) )
229, 21syl 16 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
) )
23 2z 10276 . . . . . . . 8  |-  2  e.  ZZ
24 zcn 10251 . . . . . . . . . . . 12  |-  ( A  e.  ZZ  ->  A  e.  CC )
2524adantr 452 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  CC )
26 ax-1cn 9012 . . . . . . . . . . 11  |-  1  e.  CC
27 pncan 9275 . . . . . . . . . . 11  |-  ( ( A  e.  CC  /\  1  e.  CC )  ->  ( ( A  + 
1 )  -  1 )  =  A )
2825, 26, 27sylancl 644 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  =  A )
29 prmuz2 13060 . . . . . . . . . . . 12  |-  ( ( A  +  1 )  e.  Prime  ->  ( A  +  1 )  e.  ( ZZ>= `  2 )
)
3029adantl 453 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ( ZZ>= ` 
2 ) )
31 uz2m1nn 10514 . . . . . . . . . . 11  |-  ( ( A  +  1 )  e.  ( ZZ>= `  2
)  ->  ( ( A  +  1 )  -  1 )  e.  NN )
3230, 31syl 16 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  e.  NN )
3328, 32eqeltrrd 2487 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  NN )
34 nnuz 10485 . . . . . . . . . 10  |-  NN  =  ( ZZ>= `  1 )
35 2m1e1 10059 . . . . . . . . . . 11  |-  ( 2  -  1 )  =  1
3635fveq2i 5698 . . . . . . . . . 10  |-  ( ZZ>= `  ( 2  -  1 ) )  =  (
ZZ>= `  1 )
3734, 36eqtr4i 2435 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  ( 2  -  1 ) )
3833, 37syl6eleq 2502 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )
39 fzsuc2 11068 . . . . . . . 8  |-  ( ( 2  e.  ZZ  /\  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )  -> 
( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4023, 38, 39sylancr 645 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4140ineq1d 3509 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  u.  { ( A  +  1 ) } )  i^i  Prime )
)
42 indir 3557 . . . . . 6  |-  ( ( ( 2 ... A
)  u.  { ( A  +  1 ) } )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) )
4341, 42syl6eq 2460 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) ) )
44 simpr 448 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  Prime )
4544snssd 3911 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  { ( A  + 
1 ) }  C_  Prime )
46 df-ss 3302 . . . . . . 7  |-  ( { ( A  +  1 ) }  C_  Prime  <->  ( { ( A  + 
1 ) }  i^i  Prime
)  =  { ( A  +  1 ) } )
4745, 46sylib 189 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( { ( A  +  1 ) }  i^i  Prime )  =  {
( A  +  1 ) } )
4847uneq2d 3469 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( ( 2 ... A )  i^i 
Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )
4943, 48eqtrd 2444 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  {
( A  +  1 ) } ) )
5049fveq2d 5699 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
)  =  ( # `  ( ( ( 2 ... A )  i^i 
Prime )  u.  { ( A  +  1 ) } ) ) )
5122, 50eqtrd 2444 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) ) )
52 ppival2 20872 . . . 4  |-  ( A  e.  ZZ  ->  (π `  A )  =  (
# `  ( (
2 ... A )  i^i 
Prime ) ) )
5352adantr 452 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  A )  =  ( # `  (
( 2 ... A
)  i^i  Prime ) ) )
5453oveq1d 6063 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( (π `  A )  +  1 )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
5520, 51, 543eqtr4d 2454 1  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( (π `  A )  +  1 ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1721   _Vcvv 2924    u. cun 3286    i^i cin 3287    C_ wss 3288   {csn 3782   class class class wbr 4180   ` cfv 5421  (class class class)co 6048   Fincfn 7076   CCcc 8952   RRcr 8953   1c1 8955    + caddc 8957    < clt 9084    <_ cle 9085    - cmin 9255   NNcn 9964   2c2 10013   ZZcz 10246   ZZ>=cuz 10452   ...cfz 11007   #chash 11581   Primecprime 13042  πcppi 20837
This theorem is referenced by:  ppip1le  20905  ppi1i  20912  bposlem5  21033
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2393  ax-rep 4288  ax-sep 4298  ax-nul 4306  ax-pow 4345  ax-pr 4371  ax-un 4668  ax-cnex 9010  ax-resscn 9011  ax-1cn 9012  ax-icn 9013  ax-addcl 9014  ax-addrcl 9015  ax-mulcl 9016  ax-mulrcl 9017  ax-mulcom 9018  ax-addass 9019  ax-mulass 9020  ax-distr 9021  ax-i2m1 9022  ax-1ne0 9023  ax-1rid 9024  ax-rnegex 9025  ax-rrecex 9026  ax-cnre 9027  ax-pre-lttri 9028  ax-pre-lttrn 9029  ax-pre-ltadd 9030  ax-pre-mulgt0 9031  ax-pre-sup 9032
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2266  df-mo 2267  df-clab 2399  df-cleq 2405  df-clel 2408  df-nfc 2537  df-ne 2577  df-nel 2578  df-ral 2679  df-rex 2680  df-reu 2681  df-rmo 2682  df-rab 2683  df-v 2926  df-sbc 3130  df-csb 3220  df-dif 3291  df-un 3293  df-in 3295  df-ss 3302  df-pss 3304  df-nul 3597  df-if 3708  df-pw 3769  df-sn 3788  df-pr 3789  df-tp 3790  df-op 3791  df-uni 3984  df-int 4019  df-iun 4063  df-br 4181  df-opab 4235  df-mpt 4236  df-tr 4271  df-eprel 4462  df-id 4466  df-po 4471  df-so 4472  df-fr 4509  df-we 4511  df-ord 4552  df-on 4553  df-lim 4554  df-suc 4555  df-om 4813  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5385  df-fun 5423  df-fn 5424  df-f 5425  df-f1 5426  df-fo 5427  df-f1o 5428  df-fv 5429  df-ov 6051  df-oprab 6052  df-mpt2 6053  df-1st 6316  df-2nd 6317  df-riota 6516  df-recs 6600  df-rdg 6635  df-1o 6691  df-2o 6692  df-oadd 6695  df-er 6872  df-en 7077  df-dom 7078  df-sdom 7079  df-fin 7080  df-sup 7412  df-card 7790  df-cda 8012  df-pnf 9086  df-mnf 9087  df-xr 9088  df-ltxr 9089  df-le 9090  df-sub 9257  df-neg 9258  df-nn 9965  df-2 10022  df-n0 10186  df-z 10247  df-uz 10453  df-icc 10887  df-fz 11008  df-fl 11165  df-hash 11582  df-dvds 12816  df-prm 13043  df-ppi 20843
  Copyright terms: Public domain W3C validator