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

Theorem pczpre 12916
Description: Connect the prime count pre-function to the actual prime count function, when restricted to the integers. (Contributed by Mario Carneiro, 23-Feb-2014.) (Proof shortened by Mario Carneiro, 24-Dec-2016.)
Hypothesis
Ref Expression
pczpre.1  |-  S  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  N } ,  RR ,  <  )
Assertion
Ref Expression
pczpre  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  S )
Distinct variable groups:    n, N    P, n
Allowed substitution hint:    S( n)

Proof of Theorem pczpre
Dummy variables  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 zq 10338 . . 3  |-  ( N  e.  ZZ  ->  N  e.  QQ )
2 eqid 2296 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )
3 eqid 2296 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  )
42, 3pcval 12913 . . 3  |-  ( ( P  e.  Prime  /\  ( N  e.  QQ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) ) )
51, 4sylanr1 633 . 2  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) ) )
6 simprl 732 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  ZZ )
76zcnd 10134 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  CC )
87div1d 9544 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( N  /  1
)  =  N )
98eqcomd 2301 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  =  ( N  /  1 ) )
10 prmuz2 12792 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
11 eqid 2296 . . . . . . . 8  |-  1  =  1
12 eqid 2296 . . . . . . . . 9  |-  { n  e.  NN0  |  ( P ^ n )  ||  1 }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
13 eqid 2296 . . . . . . . . 9  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )
1412, 13pcpre1 12911 . . . . . . . 8  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  1  =  1 )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1510, 11, 14sylancl 643 . . . . . . 7  |-  ( P  e.  Prime  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  0 )
1615adantr 451 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1716oveq2d 5890 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )
)  =  ( S  -  0 ) )
18 eqid 2296 . . . . . . . . . 10  |-  { n  e.  NN0  |  ( P ^ n )  ||  N }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  N }
19 pczpre.1 . . . . . . . . . 10  |-  S  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  N } ,  RR ,  <  )
2018, 19pcprecl 12908 . . . . . . . . 9  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2110, 20sylan 457 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2221simpld 445 . . . . . . 7  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  NN0 )
2322nn0cnd 10036 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  CC )
2423subid1d 9162 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  0 )  =  S )
2517, 24eqtr2d 2329 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) )
26 1nn 9773 . . . . 5  |-  1  e.  NN
27 oveq1 5881 . . . . . . . 8  |-  ( x  =  N  ->  (
x  /  y )  =  ( N  / 
y ) )
2827eqeq2d 2307 . . . . . . 7  |-  ( x  =  N  ->  ( N  =  ( x  /  y )  <->  N  =  ( N  /  y
) ) )
29 breq2 4043 . . . . . . . . . . . 12  |-  ( x  =  N  ->  (
( P ^ n
)  ||  x  <->  ( P ^ n )  ||  N ) )
3029rabbidv 2793 . . . . . . . . . . 11  |-  ( x  =  N  ->  { n  e.  NN0  |  ( P ^ n )  ||  x }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  N }
)
3130supeq1d 7215 . . . . . . . . . 10  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  N } ,  RR ,  <  ) )
3231, 19syl6eqr 2346 . . . . . . . . 9  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  S )
3332oveq1d 5889 . . . . . . . 8  |-  ( x  =  N  ->  ( sup ( { n  e. 
NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
)  =  ( S  -  sup ( { n  e.  NN0  | 
( P ^ n
)  ||  y } ,  RR ,  <  )
) )
3433eqeq2d 2307 . . . . . . 7  |-  ( x  =  N  ->  ( S  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) )  <->  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )
3528, 34anbi12d 691 . . . . . 6  |-  ( x  =  N  ->  (
( N  =  ( x  /  y )  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) )  <->  ( N  =  ( N  / 
y )  /\  S  =  ( S  -  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) ) )
36 oveq2 5882 . . . . . . . 8  |-  ( y  =  1  ->  ( N  /  y )  =  ( N  /  1
) )
3736eqeq2d 2307 . . . . . . 7  |-  ( y  =  1  ->  ( N  =  ( N  /  y )  <->  N  =  ( N  /  1
) ) )
38 breq2 4043 . . . . . . . . . . 11  |-  ( y  =  1  ->  (
( P ^ n
)  ||  y  <->  ( P ^ n )  ||  1 ) )
3938rabbidv 2793 . . . . . . . . . 10  |-  ( y  =  1  ->  { n  e.  NN0  |  ( P ^ n )  ||  y }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
)
4039supeq1d 7215 . . . . . . . . 9  |-  ( y  =  1  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) )
4140oveq2d 5890 . . . . . . . 8  |-  ( y  =  1  ->  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
)  =  ( S  -  sup ( { n  e.  NN0  | 
( P ^ n
)  ||  1 } ,  RR ,  <  )
) )
4241eqeq2d 2307 . . . . . . 7  |-  ( y  =  1  ->  ( S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) )  <->  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )
) ) )
4337, 42anbi12d 691 . . . . . 6  |-  ( y  =  1  ->  (
( N  =  ( N  /  y )  /\  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) )  <->  ( N  =  ( N  / 
1 )  /\  S  =  ( S  -  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) ) ) )
4435, 43rspc2ev 2905 . . . . 5  |-  ( ( N  e.  ZZ  /\  1  e.  NN  /\  ( N  =  ( N  /  1 )  /\  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) ) )  ->  E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) )
4526, 44mp3an2 1265 . . . 4  |-  ( ( N  e.  ZZ  /\  ( N  =  ( N  /  1 )  /\  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) ) )  ->  E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) )
466, 9, 25, 45syl12anc 1180 . . 3  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) )
47 ltso 8919 . . . . . 6  |-  <  Or  RR
4847supex 7230 . . . . 5  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  N } ,  RR ,  <  )  e.  _V
4919, 48eqeltri 2366 . . . 4  |-  S  e. 
_V
502, 3pceu 12915 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  QQ  /\  N  =/=  0 ) )  ->  E! z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )
511, 50sylanr1 633 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  E! z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )
52 eqeq1 2302 . . . . . . 7  |-  ( z  =  S  ->  (
z  =  ( sup ( { n  e. 
NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
)  <->  S  =  ( sup ( { n  e. 
NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )
5352anbi2d 684 . . . . . 6  |-  ( z  =  S  ->  (
( N  =  ( x  /  y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) )  <->  ( N  =  ( x  / 
y )  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) ) )
54532rexbidv 2599 . . . . 5  |-  ( z  =  S  ->  ( E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) )  <->  E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) ) )
5554iota2 5261 . . . 4  |-  ( ( S  e.  _V  /\  E! z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )  -> 
( E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) )  <->  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) )  =  S ) )
5649, 51, 55sylancr 644 . . 3  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  S  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) )  <->  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  ) ) ) )  =  S ) )
5746, 56mpbid 201 . 2  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( iota z E. x  e.  ZZ  E. y  e.  NN  ( N  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
) ) )  =  S )
585, 57eqtrd 2328 1  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  S )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1632    e. wcel 1696   E!weu 2156    =/= wne 2459   E.wrex 2557   {crab 2560   _Vcvv 2801   class class class wbr 4039   iotacio 5233   ` cfv 5271  (class class class)co 5874   supcsup 7209   RRcr 8752   0cc0 8753   1c1 8754    < clt 8883    - cmin 9053    / cdiv 9439   NNcn 9762   2c2 9811   NN0cn0 9981   ZZcz 10040   ZZ>=cuz 10246   QQcq 10332   ^cexp 11120    || cdivides 12547   Primecprime 12774    pCnt cpc 12905
This theorem is referenced by:  pczcl  12917  pcmul  12920  pcdiv  12921  pc1  12924  pczdvds  12931  pczndvds  12933  pczndvds2  12935  pcneg  12942
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831
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 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-int 3879  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-riota 6320  df-recs 6404  df-rdg 6439  df-1o 6495  df-2o 6496  df-oadd 6499  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-sup 7210  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-n0 9982  df-z 10041  df-uz 10247  df-q 10333  df-rp 10371  df-fl 10941  df-mod 10990  df-seq 11063  df-exp 11121  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-dvds 12548  df-gcd 12702  df-prm 12775  df-pc 12906
  Copyright terms: Public domain W3C validator