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

Theorem pczpre 13150
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 10514 . . 3  |-  ( N  e.  ZZ  ->  N  e.  QQ )
2 eqid 2389 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )
3 eqid 2389 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  )
42, 3pcval 13147 . . 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 634 . 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 733 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  ZZ )
76zcnd 10310 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  CC )
87div1d 9716 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( N  /  1
)  =  N )
98eqcomd 2394 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  =  ( N  /  1 ) )
10 prmuz2 13026 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
11 eqid 2389 . . . . . . . 8  |-  1  =  1
12 eqid 2389 . . . . . . . . 9  |-  { n  e.  NN0  |  ( P ^ n )  ||  1 }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
13 eqid 2389 . . . . . . . . 9  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )
1412, 13pcpre1 13145 . . . . . . . 8  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  1  =  1 )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1510, 11, 14sylancl 644 . . . . . . 7  |-  ( P  e.  Prime  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  0 )
1615adantr 452 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1716oveq2d 6038 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )
)  =  ( S  -  0 ) )
18 eqid 2389 . . . . . . . . . 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 13142 . . . . . . . . 9  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2110, 20sylan 458 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2221simpld 446 . . . . . . 7  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  NN0 )
2322nn0cnd 10210 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  CC )
2423subid1d 9334 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  0 )  =  S )
2517, 24eqtr2d 2422 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) )
26 1nn 9945 . . . . 5  |-  1  e.  NN
27 oveq1 6029 . . . . . . . 8  |-  ( x  =  N  ->  (
x  /  y )  =  ( N  / 
y ) )
2827eqeq2d 2400 . . . . . . 7  |-  ( x  =  N  ->  ( N  =  ( x  /  y )  <->  N  =  ( N  /  y
) ) )
29 breq2 4159 . . . . . . . . . . . 12  |-  ( x  =  N  ->  (
( P ^ n
)  ||  x  <->  ( P ^ n )  ||  N ) )
3029rabbidv 2893 . . . . . . . . . . 11  |-  ( x  =  N  ->  { n  e.  NN0  |  ( P ^ n )  ||  x }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  N }
)
3130supeq1d 7388 . . . . . . . . . 10  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  N } ,  RR ,  <  ) )
3231, 19syl6eqr 2439 . . . . . . . . 9  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  S )
3332oveq1d 6037 . . . . . . . 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 2400 . . . . . . 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 692 . . . . . 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 6030 . . . . . . . 8  |-  ( y  =  1  ->  ( N  /  y )  =  ( N  /  1
) )
3736eqeq2d 2400 . . . . . . 7  |-  ( y  =  1  ->  ( N  =  ( N  /  y )  <->  N  =  ( N  /  1
) ) )
38 breq2 4159 . . . . . . . . . . 11  |-  ( y  =  1  ->  (
( P ^ n
)  ||  y  <->  ( P ^ n )  ||  1 ) )
3938rabbidv 2893 . . . . . . . . . 10  |-  ( y  =  1  ->  { n  e.  NN0  |  ( P ^ n )  ||  y }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
)
4039supeq1d 7388 . . . . . . . . 9  |-  ( y  =  1  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) )
4140oveq2d 6038 . . . . . . . 8  |-  ( y  =  1  ->  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
)  =  ( S  -  sup ( { n  e.  NN0  | 
( P ^ n
)  ||  1 } ,  RR ,  <  )
) )
4241eqeq2d 2400 . . . . . . 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 692 . . . . . 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 3005 . . . . 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 1267 . . . 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 1182 . . 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 9091 . . . . . 6  |-  <  Or  RR
4847supex 7403 . . . . 5  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  N } ,  RR ,  <  )  e.  _V
4919, 48eqeltri 2459 . . . 4  |-  S  e. 
_V
502, 3pceu 13149 . . . . 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 634 . . . 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 2395 . . . . . . 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 685 . . . . . 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 2694 . . . . 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 5386 . . . 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 645 . . 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 202 . 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 2421 1  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  S )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1717   E!weu 2240    =/= wne 2552   E.wrex 2652   {crab 2655   _Vcvv 2901   class class class wbr 4155   iotacio 5358   ` cfv 5396  (class class class)co 6022   supcsup 7382   RRcr 8924   0cc0 8925   1c1 8926    < clt 9055    - cmin 9225    / cdiv 9611   NNcn 9934   2c2 9983   NN0cn0 10155   ZZcz 10216   ZZ>=cuz 10422   QQcq 10508   ^cexp 11311    || cdivides 12781   Primecprime 13008    pCnt cpc 13139
This theorem is referenced by:  pczcl  13151  pcmul  13154  pcdiv  13155  pc1  13158  pczdvds  13165  pczndvds  13167  pczndvds2  13169  pcneg  13176
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 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2370  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643  ax-cnex 8981  ax-resscn 8982  ax-1cn 8983  ax-icn 8984  ax-addcl 8985  ax-addrcl 8986  ax-mulcl 8987  ax-mulrcl 8988  ax-mulcom 8989  ax-addass 8990  ax-mulass 8991  ax-distr 8992  ax-i2m1 8993  ax-1ne0 8994  ax-1rid 8995  ax-rnegex 8996  ax-rrecex 8997  ax-cnre 8998  ax-pre-lttri 8999  ax-pre-lttrn 9000  ax-pre-ltadd 9001  ax-pre-mulgt0 9002  ax-pre-sup 9003
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 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-nel 2555  df-ral 2656  df-rex 2657  df-reu 2658  df-rmo 2659  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-pss 3281  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-tp 3767  df-op 3768  df-uni 3960  df-int 3995  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-tr 4246  df-eprel 4437  df-id 4441  df-po 4446  df-so 4447  df-fr 4484  df-we 4486  df-ord 4527  df-on 4528  df-lim 4529  df-suc 4530  df-om 4788  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-1st 6290  df-2nd 6291  df-riota 6487  df-recs 6571  df-rdg 6606  df-1o 6662  df-2o 6663  df-oadd 6666  df-er 6843  df-en 7048  df-dom 7049  df-sdom 7050  df-fin 7051  df-sup 7383  df-pnf 9057  df-mnf 9058  df-xr 9059  df-ltxr 9060  df-le 9061  df-sub 9227  df-neg 9228  df-div 9612  df-nn 9935  df-2 9992  df-3 9993  df-n0 10156  df-z 10217  df-uz 10423  df-q 10509  df-rp 10547  df-fl 11131  df-mod 11180  df-seq 11253  df-exp 11312  df-cj 11833  df-re 11834  df-im 11835  df-sqr 11969  df-abs 11970  df-dvds 12782  df-gcd 12936  df-prm 13009  df-pc 13140
  Copyright terms: Public domain W3C validator