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

Theorem prmrec 14094
Description: The sum of the reciprocals of the primes diverges. This is the "second" proof at http://en.wikipedia.org/wiki/Prime_harmonic_series, attributed to Paul Erdős. This is Metamath 100 proof #81. (Contributed by Mario Carneiro, 6-Aug-2014.)
Hypothesis
Ref Expression
prmrec.f  |-  F  =  ( n  e.  NN  |->  sum_ k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k ) )
Assertion
Ref Expression
prmrec  |-  -.  F  e.  dom  ~~>
Distinct variable group:    k, n
Allowed substitution hints:    F( k, n)

Proof of Theorem prmrec
Dummy variable  m is distinct from all other variables.
StepHypRef Expression
1 eleq1 2523 . . . . 5  |-  ( m  =  k  ->  (
m  e.  Prime  <->  k  e.  Prime ) )
2 oveq2 6201 . . . . 5  |-  ( m  =  k  ->  (
1  /  m )  =  ( 1  / 
k ) )
31, 2ifbieq1d 3913 . . . 4  |-  ( m  =  k  ->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
43cbvmptv 4484 . . 3  |-  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) )  =  ( k  e.  NN  |->  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
54prmreclem6 14093 . 2  |-  -.  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  e.  dom  ~~>
6 inss2 3672 . . . . . . . . 9  |-  ( Prime  i^i  ( 1 ... n
) )  C_  (
1 ... n )
76sseli 3453 . . . . . . . . . . 11  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  ->  k  e.  ( 1 ... n
) )
8 elfznn 11588 . . . . . . . . . . 11  |-  ( k  e.  ( 1 ... n )  ->  k  e.  NN )
9 nnrecre 10462 . . . . . . . . . . . 12  |-  ( k  e.  NN  ->  (
1  /  k )  e.  RR )
109recnd 9516 . . . . . . . . . . 11  |-  ( k  e.  NN  ->  (
1  /  k )  e.  CC )
117, 8, 103syl 20 . . . . . . . . . 10  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  ->  (
1  /  k )  e.  CC )
1211rgen 2892 . . . . . . . . 9  |-  A. k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  e.  CC
136, 12pm3.2i 455 . . . . . . . 8  |-  ( ( Prime  i^i  ( 1 ... n ) ) 
C_  ( 1 ... n )  /\  A. k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k )  e.  CC )
14 fzfi 11904 . . . . . . . . 9  |-  ( 1 ... n )  e. 
Fin
1514olci 391 . . . . . . . 8  |-  ( ( 1 ... n ) 
C_  ( ZZ>= `  1
)  \/  ( 1 ... n )  e. 
Fin )
16 sumss2 13314 . . . . . . . 8  |-  ( ( ( ( Prime  i^i  ( 1 ... n
) )  C_  (
1 ... n )  /\  A. k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k )  e.  CC )  /\  (
( 1 ... n
)  C_  ( ZZ>= ` 
1 )  \/  (
1 ... n )  e. 
Fin ) )  ->  sum_ k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k )  = 
sum_ k  e.  ( 1 ... n ) if ( k  e.  ( Prime  i^i  (
1 ... n ) ) ,  ( 1  / 
k ) ,  0 ) )
1713, 15, 16mp2an 672 . . . . . . 7  |-  sum_ k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  =  sum_ k  e.  ( 1 ... n
) if ( k  e.  ( Prime  i^i  ( 1 ... n
) ) ,  ( 1  /  k ) ,  0 )
18 elin 3640 . . . . . . . . . 10  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  <->  ( k  e.  Prime  /\  k  e.  ( 1 ... n
) ) )
1918rbaib 898 . . . . . . . . 9  |-  ( k  e.  ( 1 ... n )  ->  (
k  e.  ( Prime  i^i  ( 1 ... n
) )  <->  k  e.  Prime ) )
2019ifbid 3912 . . . . . . . 8  |-  ( k  e.  ( 1 ... n )  ->  if ( k  e.  ( Prime  i^i  ( 1 ... n ) ) ,  ( 1  / 
k ) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
2120sumeq2i 13287 . . . . . . 7  |-  sum_ k  e.  ( 1 ... n
) if ( k  e.  ( Prime  i^i  ( 1 ... n
) ) ,  ( 1  /  k ) ,  0 )  = 
sum_ k  e.  ( 1 ... n ) if ( k  e. 
Prime ,  ( 1  /  k ) ,  0 )
2217, 21eqtri 2480 . . . . . 6  |-  sum_ k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  =  sum_ k  e.  ( 1 ... n
) if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )
238adantl 466 . . . . . . . 8  |-  ( ( n  e.  NN  /\  k  e.  ( 1 ... n ) )  ->  k  e.  NN )
24 prmnn 13877 . . . . . . . . . . . 12  |-  ( k  e.  Prime  ->  k  e.  NN )
2524, 10syl 16 . . . . . . . . . . 11  |-  ( k  e.  Prime  ->  ( 1  /  k )  e.  CC )
2625adantl 466 . . . . . . . . . 10  |-  ( ( T.  /\  k  e. 
Prime )  ->  ( 1  /  k )  e.  CC )
27 0cnd 9483 . . . . . . . . . 10  |-  ( ( T.  /\  -.  k  e.  Prime )  ->  0  e.  CC )
2826, 27ifclda 3922 . . . . . . . . 9  |-  ( T. 
->  if ( k  e. 
Prime ,  ( 1  /  k ) ,  0 )  e.  CC )
2928trud 1379 . . . . . . . 8  |-  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )  e.  CC
304fvmpt2 5883 . . . . . . . 8  |-  ( ( k  e.  NN  /\  if ( k  e.  Prime ,  ( 1  /  k
) ,  0 )  e.  CC )  -> 
( ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) `  k )  =  if ( k  e.  Prime ,  ( 1  /  k
) ,  0 ) )
3123, 29, 30sylancl 662 . . . . . . 7  |-  ( ( n  e.  NN  /\  k  e.  ( 1 ... n ) )  ->  ( ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) `
 k )  =  if ( k  e. 
Prime ,  ( 1  /  k ) ,  0 ) )
32 id 22 . . . . . . . 8  |-  ( n  e.  NN  ->  n  e.  NN )
33 nnuz 11000 . . . . . . . 8  |-  NN  =  ( ZZ>= `  1 )
3432, 33syl6eleq 2549 . . . . . . 7  |-  ( n  e.  NN  ->  n  e.  ( ZZ>= `  1 )
)
3529a1i 11 . . . . . . 7  |-  ( ( n  e.  NN  /\  k  e.  ( 1 ... n ) )  ->  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )  e.  CC )
3631, 34, 35fsumser 13318 . . . . . 6  |-  ( n  e.  NN  ->  sum_ k  e.  ( 1 ... n
) if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )  =  (  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) ) `
 n ) )
3722, 36syl5eq 2504 . . . . 5  |-  ( n  e.  NN  ->  sum_ k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  =  (  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) ) `  n
) )
3837mpteq2ia 4475 . . . 4  |-  ( n  e.  NN  |->  sum_ k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
) )  =  ( n  e.  NN  |->  (  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) ) `
 n ) )
39 prmrec.f . . . 4  |-  F  =  ( n  e.  NN  |->  sum_ k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k ) )
40 1z 10780 . . . . . . 7  |-  1  e.  ZZ
41 seqfn 11928 . . . . . . 7  |-  ( 1  e.  ZZ  ->  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  ( ZZ>=
`  1 ) )
4240, 41ax-mp 5 . . . . . 6  |-  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  ( ZZ>=
`  1 )
4333fneq2i 5607 . . . . . 6  |-  (  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  NN  <->  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  ( ZZ>=
`  1 ) )
4442, 43mpbir 209 . . . . 5  |-  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  NN
45 dffn5 5839 . . . . 5  |-  (  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  NN  <->  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  =  ( n  e.  NN  |->  (  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) ) `
 n ) ) )
4644, 45mpbi 208 . . . 4  |-  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  =  ( n  e.  NN  |->  (  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) ) `
 n ) )
4738, 39, 463eqtr4i 2490 . . 3  |-  F  =  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) )
4847eleq1i 2528 . 2  |-  ( F  e.  dom  ~~>  <->  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  e.  dom  ~~>  )
495, 48mtbir 299 1  |-  -.  F  e.  dom  ~~>
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    \/ wo 368    /\ wa 369    = wceq 1370   T. wtru 1371    e. wcel 1758   A.wral 2795    i^i cin 3428    C_ wss 3429   ifcif 3892    |-> cmpt 4451   dom cdm 4941    Fn wfn 5514   ` cfv 5519  (class class class)co 6193   Fincfn 7413   CCcc 9384   0cc0 9386   1c1 9387    + caddc 9389    / cdiv 10097   NNcn 10426   ZZcz 10750   ZZ>=cuz 10965   ...cfz 11547    seqcseq 11916    ~~> cli 13073   sum_csu 13274   Primecprime 13874
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4504  ax-sep 4514  ax-nul 4522  ax-pow 4571  ax-pr 4632  ax-un 6475  ax-inf2 7951  ax-cnex 9442  ax-resscn 9443  ax-1cn 9444  ax-icn 9445  ax-addcl 9446  ax-addrcl 9447  ax-mulcl 9448  ax-mulrcl 9449  ax-mulcom 9450  ax-addass 9451  ax-mulass 9452  ax-distr 9453  ax-i2m1 9454  ax-1ne0 9455  ax-1rid 9456  ax-rnegex 9457  ax-rrecex 9458  ax-cnre 9459  ax-pre-lttri 9460  ax-pre-lttrn 9461  ax-pre-ltadd 9462  ax-pre-mulgt0 9463  ax-pre-sup 9464
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-fal 1376  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3073  df-sbc 3288  df-csb 3390  df-dif 3432  df-un 3434  df-in 3436  df-ss 3443  df-pss 3445  df-nul 3739  df-if 3893  df-pw 3963  df-sn 3979  df-pr 3981  df-tp 3983  df-op 3985  df-uni 4193  df-int 4230  df-iun 4274  df-br 4394  df-opab 4452  df-mpt 4453  df-tr 4487  df-eprel 4733  df-id 4737  df-po 4742  df-so 4743  df-fr 4780  df-se 4781  df-we 4782  df-ord 4823  df-on 4824  df-lim 4825  df-suc 4826  df-xp 4947  df-rel 4948  df-cnv 4949  df-co 4950  df-dm 4951  df-rn 4952  df-res 4953  df-ima 4954  df-iota 5482  df-fun 5521  df-fn 5522  df-f 5523  df-f1 5524  df-fo 5525  df-f1o 5526  df-fv 5527  df-isom 5528  df-riota 6154  df-ov 6196  df-oprab 6197  df-mpt2 6198  df-om 6580  df-1st 6680  df-2nd 6681  df-recs 6935  df-rdg 6969  df-1o 7023  df-2o 7024  df-oadd 7027  df-er 7204  df-map 7319  df-pm 7320  df-en 7414  df-dom 7415  df-sdom 7416  df-fin 7417  df-sup 7795  df-oi 7828  df-card 8213  df-cda 8441  df-pnf 9524  df-mnf 9525  df-xr 9526  df-ltxr 9527  df-le 9528  df-sub 9701  df-neg 9702  df-div 10098  df-nn 10427  df-2 10484  df-3 10485  df-n0 10684  df-z 10751  df-uz 10966  df-q 11058  df-rp 11096  df-fz 11548  df-fzo 11659  df-fl 11752  df-mod 11819  df-seq 11917  df-exp 11976  df-hash 12214  df-cj 12699  df-re 12700  df-im 12701  df-sqr 12835  df-abs 12836  df-clim 13077  df-rlim 13078  df-sum 13275  df-dvds 13647  df-gcd 13802  df-prm 13875  df-pc 14015
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator