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

Theorem prmrec 13975
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 2498 . . . . 5  |-  ( m  =  k  ->  (
m  e.  Prime  <->  k  e.  Prime ) )
2 oveq2 6094 . . . . 5  |-  ( m  =  k  ->  (
1  /  m )  =  ( 1  / 
k ) )
31, 2ifbieq1d 3807 . . . 4  |-  ( m  =  k  ->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
43cbvmptv 4378 . . 3  |-  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) )  =  ( k  e.  NN  |->  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
54prmreclem6 13974 . 2  |-  -.  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  e.  dom  ~~>
6 inss2 3566 . . . . . . . . 9  |-  ( Prime  i^i  ( 1 ... n
) )  C_  (
1 ... n )
76sseli 3347 . . . . . . . . . . 11  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  ->  k  e.  ( 1 ... n
) )
8 elfznn 11470 . . . . . . . . . . 11  |-  ( k  e.  ( 1 ... n )  ->  k  e.  NN )
9 nnrecre 10350 . . . . . . . . . . . 12  |-  ( k  e.  NN  ->  (
1  /  k )  e.  RR )
109recnd 9404 . . . . . . . . . . 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 2776 . . . . . . . . 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 11786 . . . . . . . . 9  |-  ( 1 ... n )  e. 
Fin
1514olci 391 . . . . . . . 8  |-  ( ( 1 ... n ) 
C_  ( ZZ>= `  1
)  \/  ( 1 ... n )  e. 
Fin )
16 sumss2 13195 . . . . . . . 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 3534 . . . . . . . . . 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 3806 . . . . . . . 8  |-  ( k  e.  ( 1 ... n )  ->  if ( k  e.  ( Prime  i^i  ( 1 ... n ) ) ,  ( 1  / 
k ) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
2120sumeq2i 13168 . . . . . . 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 2458 . . . . . 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 13758 . . . . . . . . . . . 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 9371 . . . . . . . . . 10  |-  ( ( T.  /\  -.  k  e.  Prime )  ->  0  e.  CC )
2826, 27ifclda 3816 . . . . . . . . 9  |-  ( T. 
->  if ( k  e. 
Prime ,  ( 1  /  k ) ,  0 )  e.  CC )
2928trud 1378 . . . . . . . 8  |-  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )  e.  CC
304fvmpt2 5776 . . . . . . . 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 10888 . . . . . . . 8  |-  NN  =  ( ZZ>= `  1 )
3432, 33syl6eleq 2528 . . . . . . 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 13199 . . . . . 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 2482 . . . . 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 4369 . . . 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 10668 . . . . . . 7  |-  1  e.  ZZ
41 seqfn 11810 . . . . . . 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 5501 . . . . . 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 5732 . . . . 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 2468 . . 3  |-  F  =  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) )
4847eleq1i 2501 . 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 1369   T. wtru 1370    e. wcel 1756   A.wral 2710    i^i cin 3322    C_ wss 3323   ifcif 3786    e. cmpt 4345   dom cdm 4835    Fn wfn 5408   ` cfv 5413  (class class class)co 6086   Fincfn 7302   CCcc 9272   0cc0 9274   1c1 9275    + caddc 9277    / cdiv 9985   NNcn 10314   ZZcz 10638   ZZ>=cuz 10853   ...cfz 11429    seqcseq 11798    ~~> cli 12954   sum_csu 13155   Primecprime 13755
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 2419  ax-rep 4398  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-inf2 7839  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351  ax-pre-sup 9352
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-fal 1375  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rmo 2718  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-se 4675  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-isom 5422  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-2o 6913  df-oadd 6916  df-er 7093  df-map 7208  df-pm 7209  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-sup 7683  df-oi 7716  df-card 8101  df-cda 8329  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-div 9986  df-nn 10315  df-2 10372  df-3 10373  df-n0 10572  df-z 10639  df-uz 10854  df-q 10946  df-rp 10984  df-fz 11430  df-fzo 11541  df-fl 11634  df-mod 11701  df-seq 11799  df-exp 11858  df-hash 12096  df-cj 12580  df-re 12581  df-im 12582  df-sqr 12716  df-abs 12717  df-clim 12958  df-rlim 12959  df-sum 13156  df-dvds 13528  df-gcd 13683  df-prm 13756  df-pc 13896
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator