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

Theorem ppiprm 20965
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 11343 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... A
)  e.  Fin )
2 inss1 3546 . . . 4  |-  ( ( 2 ... A )  i^i  Prime )  C_  (
2 ... A )
3 ssfi 7358 . . . 4  |-  ( ( ( 2 ... A
)  e.  Fin  /\  ( ( 2 ... A )  i^i  Prime ) 
C_  ( 2 ... A ) )  -> 
( ( 2 ... A )  i^i  Prime )  e.  Fin )
41, 2, 3sylancl 645 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... A )  i^i  Prime )  e.  Fin )
5 zre 10317 . . . . . . 7  |-  ( A  e.  ZZ  ->  A  e.  RR )
65adantr 453 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  RR )
76ltp1d 9972 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  <  ( A  +  1 ) )
8 peano2z 10349 . . . . . . . 8  |-  ( A  e.  ZZ  ->  ( A  +  1 )  e.  ZZ )
98adantr 453 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ZZ )
109zred 10406 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  RR )
116, 10ltnled 9251 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  <  ( A  +  1 )  <->  -.  ( A  +  1 )  <_  A )
)
127, 11mpbid 203 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  <_  A
)
132sseli 3330 . . . . 5  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  e.  ( 2 ... A
) )
14 elfzle2 11092 . . . . 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 116 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  e.  ( ( 2 ... A
)  i^i  Prime ) )
17 ovex 6135 . . . 4  |-  ( A  +  1 )  e. 
_V
18 hashunsng 11696 . . . 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 5 . . 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 644 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
21 ppival2 20942 . . . 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 10343 . . . . . . . 8  |-  2  e.  ZZ
24 zcn 10318 . . . . . . . . . . . 12  |-  ( A  e.  ZZ  ->  A  e.  CC )
2524adantr 453 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  CC )
26 ax-1cn 9079 . . . . . . . . . . 11  |-  1  e.  CC
27 pncan 9342 . . . . . . . . . . 11  |-  ( ( A  e.  CC  /\  1  e.  CC )  ->  ( ( A  + 
1 )  -  1 )  =  A )
2825, 26, 27sylancl 645 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  =  A )
29 prmuz2 13128 . . . . . . . . . . . 12  |-  ( ( A  +  1 )  e.  Prime  ->  ( A  +  1 )  e.  ( ZZ>= `  2 )
)
3029adantl 454 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ( ZZ>= ` 
2 ) )
31 uz2m1nn 10581 . . . . . . . . . . 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 2517 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  NN )
34 nnuz 10552 . . . . . . . . . 10  |-  NN  =  ( ZZ>= `  1 )
35 2m1e1 10126 . . . . . . . . . . 11  |-  ( 2  -  1 )  =  1
3635fveq2i 5760 . . . . . . . . . 10  |-  ( ZZ>= `  ( 2  -  1 ) )  =  (
ZZ>= `  1 )
3734, 36eqtr4i 2465 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  ( 2  -  1 ) )
3833, 37syl6eleq 2532 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )
39 fzsuc2 11135 . . . . . . . 8  |-  ( ( 2  e.  ZZ  /\  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )  -> 
( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4023, 38, 39sylancr 646 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4140ineq1d 3527 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  u.  { ( A  +  1 ) } )  i^i  Prime )
)
42 indir 3574 . . . . . 6  |-  ( ( ( 2 ... A
)  u.  { ( A  +  1 ) } )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) )
4341, 42syl6eq 2490 . . . . 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 449 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  Prime )
4544snssd 3967 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  { ( A  + 
1 ) }  C_  Prime )
46 df-ss 3320 . . . . . . 7  |-  ( { ( A  +  1 ) }  C_  Prime  <->  ( { ( A  + 
1 ) }  i^i  Prime
)  =  { ( A  +  1 ) } )
4745, 46sylib 190 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( { ( A  +  1 ) }  i^i  Prime )  =  {
( A  +  1 ) } )
4847uneq2d 3487 . . . . 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 2474 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  {
( A  +  1 ) } ) )
5049fveq2d 5761 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
)  =  ( # `  ( ( ( 2 ... A )  i^i 
Prime )  u.  { ( A  +  1 ) } ) ) )
5122, 50eqtrd 2474 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) ) )
52 ppival2 20942 . . . 4  |-  ( A  e.  ZZ  ->  (π `  A )  =  (
# `  ( (
2 ... A )  i^i 
Prime ) ) )
5352adantr 453 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  A )  =  ( # `  (
( 2 ... A
)  i^i  Prime ) ) )
5453oveq1d 6125 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( (π `  A )  +  1 )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
5520, 51, 543eqtr4d 2484 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 360    = wceq 1653    e. wcel 1727   _Vcvv 2962    u. cun 3304    i^i cin 3305    C_ wss 3306   {csn 3838   class class class wbr 4237   ` cfv 5483  (class class class)co 6110   Fincfn 7138   CCcc 9019   RRcr 9020   1c1 9022    + caddc 9024    < clt 9151    <_ cle 9152    - cmin 9322   NNcn 10031   2c2 10080   ZZcz 10313   ZZ>=cuz 10519   ...cfz 11074   #chash 11649   Primecprime 13110  πcppi 20907
This theorem is referenced by:  ppip1le  20975  ppi1i  20982  bposlem5  21103
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1668  ax-8 1689  ax-13 1729  ax-14 1731  ax-6 1746  ax-7 1751  ax-11 1763  ax-12 1953  ax-ext 2423  ax-rep 4345  ax-sep 4355  ax-nul 4363  ax-pow 4406  ax-pr 4432  ax-un 4730  ax-cnex 9077  ax-resscn 9078  ax-1cn 9079  ax-icn 9080  ax-addcl 9081  ax-addrcl 9082  ax-mulcl 9083  ax-mulrcl 9084  ax-mulcom 9085  ax-addass 9086  ax-mulass 9087  ax-distr 9088  ax-i2m1 9089  ax-1ne0 9090  ax-1rid 9091  ax-rnegex 9092  ax-rrecex 9093  ax-cnre 9094  ax-pre-lttri 9095  ax-pre-lttrn 9096  ax-pre-ltadd 9097  ax-pre-mulgt0 9098  ax-pre-sup 9099
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2291  df-mo 2292  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-nel 2608  df-ral 2716  df-rex 2717  df-reu 2718  df-rmo 2719  df-rab 2720  df-v 2964  df-sbc 3168  df-csb 3268  df-dif 3309  df-un 3311  df-in 3313  df-ss 3320  df-pss 3322  df-nul 3614  df-if 3764  df-pw 3825  df-sn 3844  df-pr 3845  df-tp 3846  df-op 3847  df-uni 4040  df-int 4075  df-iun 4119  df-br 4238  df-opab 4292  df-mpt 4293  df-tr 4328  df-eprel 4523  df-id 4527  df-po 4532  df-so 4533  df-fr 4570  df-we 4572  df-ord 4613  df-on 4614  df-lim 4615  df-suc 4616  df-om 4875  df-xp 4913  df-rel 4914  df-cnv 4915  df-co 4916  df-dm 4917  df-rn 4918  df-res 4919  df-ima 4920  df-iota 5447  df-fun 5485  df-fn 5486  df-f 5487  df-f1 5488  df-fo 5489  df-f1o 5490  df-fv 5491  df-ov 6113  df-oprab 6114  df-mpt2 6115  df-1st 6378  df-2nd 6379  df-riota 6578  df-recs 6662  df-rdg 6697  df-1o 6753  df-2o 6754  df-oadd 6757  df-er 6934  df-en 7139  df-dom 7140  df-sdom 7141  df-fin 7142  df-sup 7475  df-card 7857  df-cda 8079  df-pnf 9153  df-mnf 9154  df-xr 9155  df-ltxr 9156  df-le 9157  df-sub 9324  df-neg 9325  df-nn 10032  df-2 10089  df-n0 10253  df-z 10314  df-uz 10520  df-icc 10954  df-fz 11075  df-fl 11233  df-hash 11650  df-dvds 12884  df-prm 13111  df-ppi 20913
  Copyright terms: Public domain W3C validator