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

Theorem pczpre 13912
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 10957 . . 3  |-  ( N  e.  ZZ  ->  N  e.  QQ )
2 eqid 2441 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  x } ,  RR ,  <  )
3 eqid 2441 . . . 4  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  y } ,  RR ,  <  )
42, 3pcval 13909 . . 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 652 . 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 755 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  ZZ )
76zcnd 10746 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  e.  CC )
87div1d 10097 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( N  /  1
)  =  N )
98eqcomd 2446 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  N  =  ( N  /  1 ) )
10 prmuz2 13779 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
11 eqid 2441 . . . . . . . 8  |-  1  =  1
12 eqid 2441 . . . . . . . . 9  |-  { n  e.  NN0  |  ( P ^ n )  ||  1 }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
13 eqid 2441 . . . . . . . . 9  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )
1412, 13pcpre1 13907 . . . . . . . 8  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  1  =  1 )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1510, 11, 14sylancl 662 . . . . . . 7  |-  ( P  e.  Prime  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )  =  0 )
1615adantr 465 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  sup ( { n  e. 
NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  )  =  0 )
1716oveq2d 6105 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  1 } ,  RR ,  <  )
)  =  ( S  -  0 ) )
18 eqid 2441 . . . . . . . . . 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 13904 . . . . . . . . 9  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2110, 20sylan 471 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  e.  NN0  /\  ( P ^ S
)  ||  N )
)
2221simpld 459 . . . . . . 7  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  NN0 )
2322nn0cnd 10636 . . . . . 6  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  e.  CC )
2423subid1d 9706 . . . . 5  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( S  -  0 )  =  S )
2517, 24eqtr2d 2474 . . . 4  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  ->  S  =  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) ) )
26 1nn 10331 . . . . 5  |-  1  e.  NN
27 oveq1 6096 . . . . . . . 8  |-  ( x  =  N  ->  (
x  /  y )  =  ( N  / 
y ) )
2827eqeq2d 2452 . . . . . . 7  |-  ( x  =  N  ->  ( N  =  ( x  /  y )  <->  N  =  ( N  /  y
) ) )
29 breq2 4294 . . . . . . . . . . . 12  |-  ( x  =  N  ->  (
( P ^ n
)  ||  x  <->  ( P ^ n )  ||  N ) )
3029rabbidv 2962 . . . . . . . . . . 11  |-  ( x  =  N  ->  { n  e.  NN0  |  ( P ^ n )  ||  x }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  N }
)
3130supeq1d 7694 . . . . . . . . . 10  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  N } ,  RR ,  <  ) )
3231, 19syl6eqr 2491 . . . . . . . . 9  |-  ( x  =  N  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  x } ,  RR ,  <  )  =  S )
3332oveq1d 6104 . . . . . . . 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 2452 . . . . . . 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 710 . . . . . 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 6097 . . . . . . . 8  |-  ( y  =  1  ->  ( N  /  y )  =  ( N  /  1
) )
3736eqeq2d 2452 . . . . . . 7  |-  ( y  =  1  ->  ( N  =  ( N  /  y )  <->  N  =  ( N  /  1
) ) )
38 breq2 4294 . . . . . . . . . . 11  |-  ( y  =  1  ->  (
( P ^ n
)  ||  y  <->  ( P ^ n )  ||  1 ) )
3938rabbidv 2962 . . . . . . . . . 10  |-  ( y  =  1  ->  { n  e.  NN0  |  ( P ^ n )  ||  y }  =  {
n  e.  NN0  | 
( P ^ n
)  ||  1 }
)
4039supeq1d 7694 . . . . . . . . 9  |-  ( y  =  1  ->  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )  =  sup ( { n  e.  NN0  |  ( P ^ n )  ||  1 } ,  RR ,  <  ) )
4140oveq2d 6105 . . . . . . . 8  |-  ( y  =  1  ->  ( S  -  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  y } ,  RR ,  <  )
)  =  ( S  -  sup ( { n  e.  NN0  | 
( P ^ n
)  ||  1 } ,  RR ,  <  )
) )
4241eqeq2d 2452 . . . . . . 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 710 . . . . . 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 3079 . . . . 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 1302 . . . 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 1216 . . 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 9453 . . . . . 6  |-  <  Or  RR
4847supex 7711 . . . . 5  |-  sup ( { n  e.  NN0  |  ( P ^ n
)  ||  N } ,  RR ,  <  )  e.  _V
4919, 48eqeltri 2511 . . . 4  |-  S  e. 
_V
502, 3pceu 13911 . . . . 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 652 . . . 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 2447 . . . . . . 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 703 . . . . . 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 2756 . . . . 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 5405 . . . 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 663 . . 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 210 . 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 2473 1  |-  ( ( P  e.  Prime  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( P  pCnt  N
)  =  S )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1369    e. wcel 1756   E!weu 2253    =/= wne 2604   E.wrex 2714   {crab 2717   _Vcvv 2970   class class class wbr 4290   iotacio 5377   ` cfv 5416  (class class class)co 6089   supcsup 7688   RRcr 9279   0cc0 9280   1c1 9281    < clt 9416    - cmin 9593    / cdiv 9991   NNcn 10320   2c2 10369   NN0cn0 10577   ZZcz 10644   ZZ>=cuz 10859   QQcq 10951   ^cexp 11863    || cdivides 13533   Primecprime 13761    pCnt cpc 13901
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2422  ax-sep 4411  ax-nul 4419  ax-pow 4468  ax-pr 4529  ax-un 6370  ax-cnex 9336  ax-resscn 9337  ax-1cn 9338  ax-icn 9339  ax-addcl 9340  ax-addrcl 9341  ax-mulcl 9342  ax-mulrcl 9343  ax-mulcom 9344  ax-addass 9345  ax-mulass 9346  ax-distr 9347  ax-i2m1 9348  ax-1ne0 9349  ax-1rid 9350  ax-rnegex 9351  ax-rrecex 9352  ax-cnre 9353  ax-pre-lttri 9354  ax-pre-lttrn 9355  ax-pre-ltadd 9356  ax-pre-mulgt0 9357  ax-pre-sup 9358
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  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 3185  df-csb 3287  df-dif 3329  df-un 3331  df-in 3333  df-ss 3340  df-pss 3342  df-nul 3636  df-if 3790  df-pw 3860  df-sn 3876  df-pr 3878  df-tp 3880  df-op 3882  df-uni 4090  df-int 4127  df-iun 4171  df-br 4291  df-opab 4349  df-mpt 4350  df-tr 4384  df-eprel 4630  df-id 4634  df-po 4639  df-so 4640  df-fr 4677  df-we 4679  df-ord 4720  df-on 4721  df-lim 4722  df-suc 4723  df-xp 4844  df-rel 4845  df-cnv 4846  df-co 4847  df-dm 4848  df-rn 4849  df-res 4850  df-ima 4851  df-iota 5379  df-fun 5418  df-fn 5419  df-f 5420  df-f1 5421  df-fo 5422  df-f1o 5423  df-fv 5424  df-riota 6050  df-ov 6092  df-oprab 6093  df-mpt2 6094  df-om 6475  df-1st 6575  df-2nd 6576  df-recs 6830  df-rdg 6864  df-1o 6918  df-2o 6919  df-oadd 6922  df-er 7099  df-en 7309  df-dom 7310  df-sdom 7311  df-fin 7312  df-sup 7689  df-pnf 9418  df-mnf 9419  df-xr 9420  df-ltxr 9421  df-le 9422  df-sub 9595  df-neg 9596  df-div 9992  df-nn 10321  df-2 10378  df-3 10379  df-n0 10578  df-z 10645  df-uz 10860  df-q 10952  df-rp 10990  df-fl 11640  df-mod 11707  df-seq 11805  df-exp 11864  df-cj 12586  df-re 12587  df-im 12588  df-sqr 12722  df-abs 12723  df-dvds 13534  df-gcd 13689  df-prm 13762  df-pc 13902
This theorem is referenced by:  pczcl  13913  pcmul  13916  pcdiv  13917  pc1  13920  pczdvds  13927  pczndvds  13929  pczndvds2  13931  pcneg  13938
  Copyright terms: Public domain W3C validator