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

Theorem ppiprm 20389
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 11035 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... A
)  e.  Fin )
2 inss1 3389 . . . 4  |-  ( ( 2 ... A )  i^i  Prime )  C_  (
2 ... A )
3 ssfi 7083 . . . 4  |-  ( ( ( 2 ... A
)  e.  Fin  /\  ( ( 2 ... A )  i^i  Prime ) 
C_  ( 2 ... A ) )  -> 
( ( 2 ... A )  i^i  Prime )  e.  Fin )
41, 2, 3sylancl 643 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... A )  i^i  Prime )  e.  Fin )
5 zre 10028 . . . . . . 7  |-  ( A  e.  ZZ  ->  A  e.  RR )
65adantr 451 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  RR )
76ltp1d 9687 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  <  ( A  +  1 ) )
8 peano2z 10060 . . . . . . . 8  |-  ( A  e.  ZZ  ->  ( A  +  1 )  e.  ZZ )
98adantr 451 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ZZ )
109zred 10117 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  RR )
116, 10ltnled 8966 . . . . 5  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  <  ( A  +  1 )  <->  -.  ( A  +  1 )  <_  A )
)
127, 11mpbid 201 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  <_  A
)
132sseli 3176 . . . . 5  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  e.  ( 2 ... A
) )
14 elfzle2 10800 . . . . 5  |-  ( ( A  +  1 )  e.  ( 2 ... A )  ->  ( A  +  1 )  <_  A )
1513, 14syl 15 . . . 4  |-  ( ( A  +  1 )  e.  ( ( 2 ... A )  i^i 
Prime )  ->  ( A  +  1 )  <_  A )
1612, 15nsyl 113 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  -.  ( A  + 
1 )  e.  ( ( 2 ... A
)  i^i  Prime ) )
17 ovex 5883 . . . 4  |-  ( A  +  1 )  e. 
_V
18 hashunsng 11367 . . . 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 642 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
21 ppival2 20366 . . . 4  |-  ( ( A  +  1 )  e.  ZZ  ->  (π `  ( A  +  1 ) )  =  (
# `  ( (
2 ... ( A  + 
1 ) )  i^i 
Prime ) ) )
229, 21syl 15 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
) )
23 2z 10054 . . . . . . . 8  |-  2  e.  ZZ
24 zcn 10029 . . . . . . . . . . . 12  |-  ( A  e.  ZZ  ->  A  e.  CC )
2524adantr 451 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  CC )
26 ax-1cn 8795 . . . . . . . . . . 11  |-  1  e.  CC
27 pncan 9057 . . . . . . . . . . 11  |-  ( ( A  e.  CC  /\  1  e.  CC )  ->  ( ( A  + 
1 )  -  1 )  =  A )
2825, 26, 27sylancl 643 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  =  A )
29 prmuz2 12776 . . . . . . . . . . . 12  |-  ( ( A  +  1 )  e.  Prime  ->  ( A  +  1 )  e.  ( ZZ>= `  2 )
)
3029adantl 452 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  ( ZZ>= ` 
2 ) )
31 uz2m1nn 10292 . . . . . . . . . . 11  |-  ( ( A  +  1 )  e.  ( ZZ>= `  2
)  ->  ( ( A  +  1 )  -  1 )  e.  NN )
3230, 31syl 15 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( A  + 
1 )  -  1 )  e.  NN )
3328, 32eqeltrrd 2358 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  NN )
34 nnuz 10263 . . . . . . . . . 10  |-  NN  =  ( ZZ>= `  1 )
35 2cn 9816 . . . . . . . . . . . 12  |-  2  e.  CC
36 1p1e2 9840 . . . . . . . . . . . 12  |-  ( 1  +  1 )  =  2
3735, 26, 26, 36subaddrii 9135 . . . . . . . . . . 11  |-  ( 2  -  1 )  =  1
3837fveq2i 5528 . . . . . . . . . 10  |-  ( ZZ>= `  ( 2  -  1 ) )  =  (
ZZ>= `  1 )
3934, 38eqtr4i 2306 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  ( 2  -  1 ) )
4033, 39syl6eleq 2373 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )
41 fzsuc2 10842 . . . . . . . 8  |-  ( ( 2  e.  ZZ  /\  A  e.  ( ZZ>= `  ( 2  -  1 ) ) )  -> 
( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4223, 40, 41sylancr 644 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( 2 ... ( A  +  1 ) )  =  ( ( 2 ... A )  u.  { ( A  +  1 ) } ) )
4342ineq1d 3369 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  u.  { ( A  +  1 ) } )  i^i  Prime )
)
44 indir 3417 . . . . . 6  |-  ( ( ( 2 ... A
)  u.  { ( A  +  1 ) } )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  ( { ( A  + 
1 ) }  i^i  Prime
) )
4543, 44syl6eq 2331 . . . . 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
) ) )
46 simpr 447 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( A  +  1 )  e.  Prime )
4746snssd 3760 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  { ( A  + 
1 ) }  C_  Prime )
48 df-ss 3166 . . . . . . 7  |-  ( { ( A  +  1 ) }  C_  Prime  <->  ( { ( A  + 
1 ) }  i^i  Prime
)  =  { ( A  +  1 ) } )
4947, 48sylib 188 . . . . . 6  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( { ( A  +  1 ) }  i^i  Prime )  =  {
( A  +  1 ) } )
5049uneq2d 3329 . . . . 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 ) } ) )
5145, 50eqtrd 2315 . . . 4  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( ( 2 ... ( A  +  1 ) )  i^i  Prime )  =  ( ( ( 2 ... A )  i^i  Prime )  u.  {
( A  +  1 ) } ) )
5251fveq2d 5529 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( # `  (
( 2 ... ( A  +  1 ) )  i^i  Prime )
)  =  ( # `  ( ( ( 2 ... A )  i^i 
Prime )  u.  { ( A  +  1 ) } ) ) )
5322, 52eqtrd 2315 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  ( A  + 
1 ) )  =  ( # `  (
( ( 2 ... A )  i^i  Prime )  u.  { ( A  +  1 ) } ) ) )
54 ppival2 20366 . . . 4  |-  ( A  e.  ZZ  ->  (π `  A )  =  (
# `  ( (
2 ... A )  i^i 
Prime ) ) )
5554adantr 451 . . 3  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  (π `  A )  =  ( # `  (
( 2 ... A
)  i^i  Prime ) ) )
5655oveq1d 5873 . 2  |-  ( ( A  e.  ZZ  /\  ( A  +  1
)  e.  Prime )  ->  ( (π `  A )  +  1 )  =  ( ( # `  (
( 2 ... A
)  i^i  Prime ) )  +  1 ) )
5720, 53, 563eqtr4d 2325 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 358    = wceq 1623    e. wcel 1684   _Vcvv 2788    u. cun 3150    i^i cin 3151    C_ wss 3152   {csn 3640   class class class wbr 4023   ` cfv 5255  (class class class)co 5858   Fincfn 6863   CCcc 8735   RRcr 8736   1c1 8738    + caddc 8740    < clt 8867    <_ cle 8868    - cmin 9037   NNcn 9746   2c2 9795   ZZcz 10024   ZZ>=cuz 10230   ...cfz 10782   #chash 11337   Primecprime 12758  πcppi 20331
This theorem is referenced by:  ppip1le  20399  ppi1i  20406  bposlem5  20527
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-sup 7194  df-card 7572  df-cda 7794  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-nn 9747  df-2 9804  df-n0 9966  df-z 10025  df-uz 10231  df-icc 10663  df-fz 10783  df-fl 10925  df-hash 11338  df-dvds 12532  df-prm 12759  df-ppi 20337
  Copyright terms: Public domain W3C validator