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

Theorem ppiprm 22448
Description: The prime-counting 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 11791 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... A
)  e.  Fin )
2 inss1 3567 . . . 4  |-  ( ( 2 ... A )  i^i  Prime )  C_  (
2 ... A )
3 ssfi 7529 . . . 4  |-  ( ( ( 2 ... A
)  e.  Fin  /\  ( ( 2 ... A )  i^i  Prime ) 
C_  ( 2 ... A ) )  -> 
( ( 2 ... A )  i^i  Prime )  e.  Fin )
41, 2, 3sylancl 657 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... A )  i^i  Prime )  e.  Fin )
5 zre 10646 . . . . . . 7  |-  ( A  e.  ZZ  ->  A  e.  RR )
65adantr 462 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  RR )
76ltp1d 10259 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  <  ( A  +  1 ) )
8 peano2z 10682 . . . . . . . 8  |-  ( A  e.  ZZ  ->  ( A  +  1 )  e.  ZZ )
98adantr 462 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ZZ )
109zred 10743 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  RR )
116, 10ltnled 9517 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  <  ( A  +  1 )  <->  -.  ( A  +  1 )  <_  A )
)
127, 11mpbid 210 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  <_  A
)
132sseli 3349 . . . . 5  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  e.  ( 2 ... A
) )
14 elfzle2 11451 . . . . 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 121 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  e.  ( ( 2 ... A
)  i^i  Prime ) )
17 ovex 6115 . . . 4  |-  ( A  +  1 )  e. 
_V
18 hashunsng 12150 . . . 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 656 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
21 ppival2 22425 . . . 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 10674 . . . . . . . 8  |-  2  e.  ZZ
24 zcn 10647 . . . . . . . . . . . 12  |-  ( A  e.  ZZ  ->  A  e.  CC )
2524adantr 462 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  CC )
26 ax-1cn 9336 . . . . . . . . . . 11  |-  1  e.  CC
27 pncan 9612 . . . . . . . . . . 11  |-  ( ( A  e.  CC  /\  1  e.  CC )  ->  ( ( A  + 
1 )  -  1 )  =  A )
2825, 26, 27sylancl 657 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  =  A )
29 prmuz2 13777 . . . . . . . . . . . 12  |-  ( ( A  +  1 )  e.  Prime  ->  ( A  +  1 )  e.  ( ZZ>= `  2 )
)
3029adantl 463 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ( ZZ>= ` 
2 ) )
31 uz2m1nn 10925 . . . . . . . . . . 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 2516 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  NN )
34 nnuz 10892 . . . . . . . . . 10  |-  NN  =  ( ZZ>= `  1 )
35 2m1e1 10432 . . . . . . . . . . 11  |-  ( 2  -  1 )  =  1
3635fveq2i 5691 . . . . . . . . . 10  |-  ( ZZ>= `  ( 2  -  1 ) )  =  (
ZZ>= `  1 )
3734, 36eqtr4i 2464 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  ( 2  -  1 ) )
3833, 37syl6eleq 2531 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )
39 fzsuc2 11510 . . . . . . . 8  |-  ( ( 2  e.  ZZ  /\  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )  -> 
( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4023, 38, 39sylancr 658 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4140ineq1d 3548 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  u.  { ( A  +  1 ) } )  i^i  Prime )
)
42 indir 3595 . . . . . 6  |-  ( ( ( 2 ... A
)  u.  { ( A  +  1 ) } )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) )
4341, 42syl6eq 2489 . . . . 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 458 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  Prime )
4544snssd 4015 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  { ( A  + 
1 ) }  C_  Prime )
46 df-ss 3339 . . . . . . 7  |-  ( { ( A  +  1 ) }  C_  Prime  <->  ( { ( A  + 
1 ) }  i^i  Prime
)  =  { ( A  +  1 ) } )
4745, 46sylib 196 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( { ( A  +  1 ) }  i^i  Prime )  =  {
( A  +  1 ) } )
4847uneq2d 3507 . . . . 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 2473 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  {
( A  +  1 ) } ) )
5049fveq2d 5692 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
)  =  ( # `  ( ( ( 2 ... A )  i^i 
Prime )  u.  { ( A  +  1 ) } ) ) )
5122, 50eqtrd 2473 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) ) )
52 ppival2 22425 . . . 4  |-  ( A  e.  ZZ  ->  (π `  A )  =  (
# `  ( (
2 ... A )  i^i 
Prime ) ) )
5352adantr 462 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  A )  =  ( # `  (
( 2 ... A
)  i^i  Prime ) ) )
5453oveq1d 6105 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( (π `  A )  +  1 )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
5520, 51, 543eqtr4d 2483 1  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( (π `  A )  +  1 ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 369    = wceq 1364    e. wcel 1761   _Vcvv 2970    u. cun 3323    i^i cin 3324    C_ wss 3325   {csn 3874   class class class wbr 4289   ` cfv 5415  (class class class)co 6090   Fincfn 7306   CCcc 9276   RRcr 9277   1c1 9279    + caddc 9281    < clt 9414    <_ cle 9415    - cmin 9591   NNcn 10318   2c2 10367   ZZcz 10642   ZZ>=cuz 10857   ...cfz 11433   #chash 12099   Primecprime 13759  πcppi 22390
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-rep 4400  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-cnex 9334  ax-resscn 9335  ax-1cn 9336  ax-icn 9337  ax-addcl 9338  ax-addrcl 9339  ax-mulcl 9340  ax-mulrcl 9341  ax-mulcom 9342  ax-addass 9343  ax-mulass 9344  ax-distr 9345  ax-i2m1 9346  ax-1ne0 9347  ax-1rid 9348  ax-rnegex 9349  ax-rrecex 9350  ax-cnre 9351  ax-pre-lttri 9352  ax-pre-lttrn 9353  ax-pre-ltadd 9354  ax-pre-mulgt0 9355  ax-pre-sup 9356
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rmo 2721  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-pss 3341  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-tp 3879  df-op 3881  df-uni 4089  df-int 4126  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-tr 4383  df-eprel 4628  df-id 4632  df-po 4637  df-so 4638  df-fr 4675  df-we 4677  df-ord 4718  df-on 4719  df-lim 4720  df-suc 4721  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-riota 6049  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-recs 6828  df-rdg 6862  df-1o 6916  df-2o 6917  df-oadd 6920  df-er 7097  df-en 7307  df-dom 7308  df-sdom 7309  df-fin 7310  df-sup 7687  df-card 8105  df-cda 8333  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-sub 9593  df-neg 9594  df-nn 10319  df-2 10376  df-n0 10576  df-z 10643  df-uz 10858  df-icc 11303  df-fz 11434  df-fl 11638  df-hash 12100  df-dvds 13532  df-prm 13760  df-ppi 22396
This theorem is referenced by:  ppip1le  22458  ppi1i  22465  bposlem5  22586
  Copyright terms: Public domain W3C validator