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

Theorem prmrec 14854
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 2494 . . . . 5  |-  ( m  =  k  ->  (
m  e.  Prime  <->  k  e.  Prime ) )
2 oveq2 6310 . . . . 5  |-  ( m  =  k  ->  (
1  /  m )  =  ( 1  / 
k ) )
31, 2ifbieq1d 3932 . . . 4  |-  ( m  =  k  ->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
43cbvmptv 4513 . . 3  |-  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) )  =  ( k  e.  NN  |->  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
54prmreclem6 14853 . 2  |-  -.  seq 1 (  +  , 
( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  e.  dom  ~~>
6 inss2 3683 . . . . . . . . 9  |-  ( Prime  i^i  ( 1 ... n
) )  C_  (
1 ... n )
76sseli 3460 . . . . . . . . . . 11  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  ->  k  e.  ( 1 ... n
) )
8 elfznn 11829 . . . . . . . . . . 11  |-  ( k  e.  ( 1 ... n )  ->  k  e.  NN )
9 nnrecre 10647 . . . . . . . . . . . 12  |-  ( k  e.  NN  ->  (
1  /  k )  e.  RR )
109recnd 9670 . . . . . . . . . . 11  |-  ( k  e.  NN  ->  (
1  /  k )  e.  CC )
117, 8, 103syl 18 . . . . . . . . . 10  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  ->  (
1  /  k )  e.  CC )
1211rgen 2785 . . . . . . . . 9  |-  A. k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  e.  CC
136, 12pm3.2i 456 . . . . . . . 8  |-  ( ( Prime  i^i  ( 1 ... n ) ) 
C_  ( 1 ... n )  /\  A. k  e.  ( Prime  i^i  ( 1 ... n
) ) ( 1  /  k )  e.  CC )
14 fzfi 12185 . . . . . . . . 9  |-  ( 1 ... n )  e. 
Fin
1514olci 392 . . . . . . . 8  |-  ( ( 1 ... n ) 
C_  ( ZZ>= `  1
)  \/  ( 1 ... n )  e. 
Fin )
16 sumss2 13780 . . . . . . . 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 676 . . . . . . 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 3649 . . . . . . . . . 10  |-  ( k  e.  ( Prime  i^i  ( 1 ... n
) )  <->  ( k  e.  Prime  /\  k  e.  ( 1 ... n
) ) )
1918rbaib 914 . . . . . . . . 9  |-  ( k  e.  ( 1 ... n )  ->  (
k  e.  ( Prime  i^i  ( 1 ... n
) )  <->  k  e.  Prime ) )
2019ifbid 3931 . . . . . . . 8  |-  ( k  e.  ( 1 ... n )  ->  if ( k  e.  ( Prime  i^i  ( 1 ... n ) ) ,  ( 1  / 
k ) ,  0 )  =  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 ) )
2120sumeq2i 13753 . . . . . . 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 2451 . . . . . 6  |-  sum_ k  e.  ( Prime  i^i  (
1 ... n ) ) ( 1  /  k
)  =  sum_ k  e.  ( 1 ... n
) if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )
238adantl 467 . . . . . . . 8  |-  ( ( n  e.  NN  /\  k  e.  ( 1 ... n ) )  ->  k  e.  NN )
24 prmnn 14613 . . . . . . . . . . . 12  |-  ( k  e.  Prime  ->  k  e.  NN )
2524, 10syl 17 . . . . . . . . . . 11  |-  ( k  e.  Prime  ->  ( 1  /  k )  e.  CC )
2625adantl 467 . . . . . . . . . 10  |-  ( ( T.  /\  k  e. 
Prime )  ->  ( 1  /  k )  e.  CC )
27 0cnd 9637 . . . . . . . . . 10  |-  ( ( T.  /\  -.  k  e.  Prime )  ->  0  e.  CC )
2826, 27ifclda 3941 . . . . . . . . 9  |-  ( T. 
->  if ( k  e. 
Prime ,  ( 1  /  k ) ,  0 )  e.  CC )
2928trud 1446 . . . . . . . 8  |-  if ( k  e.  Prime ,  ( 1  /  k ) ,  0 )  e.  CC
304fvmpt2 5970 . . . . . . . 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 666 . . . . . . 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 23 . . . . . . . 8  |-  ( n  e.  NN  ->  n  e.  NN )
33 nnuz 11195 . . . . . . . 8  |-  NN  =  ( ZZ>= `  1 )
3432, 33syl6eleq 2520 . . . . . . 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 13784 . . . . . 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 2475 . . . . 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 4503 . . . 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 10968 . . . . . . 7  |-  1  e.  ZZ
41 seqfn 12225 . . . . . . 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 5686 . . . . . 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 212 . . . . 5  |-  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  Fn  NN
45 dffn5 5923 . . . . 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 211 . . . 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 2461 . . 3  |-  F  =  seq 1 (  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m ) ,  0 ) ) )
4847eleq1i 2499 . 2  |-  ( F  e.  dom  ~~>  <->  seq 1
(  +  ,  ( m  e.  NN  |->  if ( m  e.  Prime ,  ( 1  /  m
) ,  0 ) ) )  e.  dom  ~~>  )
495, 48mtbir 300 1  |-  -.  F  e.  dom  ~~>
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    \/ wo 369    /\ wa 370    = wceq 1437   T. wtru 1438    e. wcel 1868   A.wral 2775    i^i cin 3435    C_ wss 3436   ifcif 3909    |-> cmpt 4479   dom cdm 4850    Fn wfn 5593   ` cfv 5598  (class class class)co 6302   Fincfn 7574   CCcc 9538   0cc0 9540   1c1 9541    + caddc 9543    / cdiv 10270   NNcn 10610   ZZcz 10938   ZZ>=cuz 11160   ...cfz 11785    seqcseq 12213    ~~> cli 13536   sum_csu 13740   Primecprime 14610
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1748  ax-6 1794  ax-7 1839  ax-8 1870  ax-9 1872  ax-10 1887  ax-11 1892  ax-12 1905  ax-13 2053  ax-ext 2400  ax-rep 4533  ax-sep 4543  ax-nul 4552  ax-pow 4599  ax-pr 4657  ax-un 6594  ax-inf2 8149  ax-cnex 9596  ax-resscn 9597  ax-1cn 9598  ax-icn 9599  ax-addcl 9600  ax-addrcl 9601  ax-mulcl 9602  ax-mulrcl 9603  ax-mulcom 9604  ax-addass 9605  ax-mulass 9606  ax-distr 9607  ax-i2m1 9608  ax-1ne0 9609  ax-1rid 9610  ax-rnegex 9611  ax-rrecex 9612  ax-cnre 9613  ax-pre-lttri 9614  ax-pre-lttrn 9615  ax-pre-ltadd 9616  ax-pre-mulgt0 9617  ax-pre-sup 9618
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-fal 1443  df-ex 1660  df-nf 1664  df-sb 1787  df-eu 2269  df-mo 2270  df-clab 2408  df-cleq 2414  df-clel 2417  df-nfc 2572  df-ne 2620  df-nel 2621  df-ral 2780  df-rex 2781  df-reu 2782  df-rmo 2783  df-rab 2784  df-v 3083  df-sbc 3300  df-csb 3396  df-dif 3439  df-un 3441  df-in 3443  df-ss 3450  df-pss 3452  df-nul 3762  df-if 3910  df-pw 3981  df-sn 3997  df-pr 3999  df-tp 4001  df-op 4003  df-uni 4217  df-int 4253  df-iun 4298  df-br 4421  df-opab 4480  df-mpt 4481  df-tr 4516  df-eprel 4761  df-id 4765  df-po 4771  df-so 4772  df-fr 4809  df-se 4810  df-we 4811  df-xp 4856  df-rel 4857  df-cnv 4858  df-co 4859  df-dm 4860  df-rn 4861  df-res 4862  df-ima 4863  df-pred 5396  df-ord 5442  df-on 5443  df-lim 5444  df-suc 5445  df-iota 5562  df-fun 5600  df-fn 5601  df-f 5602  df-f1 5603  df-fo 5604  df-f1o 5605  df-fv 5606  df-isom 5607  df-riota 6264  df-ov 6305  df-oprab 6306  df-mpt2 6307  df-om 6704  df-1st 6804  df-2nd 6805  df-wrecs 7033  df-recs 7095  df-rdg 7133  df-1o 7187  df-2o 7188  df-oadd 7191  df-er 7368  df-map 7479  df-pm 7480  df-en 7575  df-dom 7576  df-sdom 7577  df-fin 7578  df-sup 7959  df-inf 7960  df-oi 8028  df-card 8375  df-cda 8599  df-pnf 9678  df-mnf 9679  df-xr 9680  df-ltxr 9681  df-le 9682  df-sub 9863  df-neg 9864  df-div 10271  df-nn 10611  df-2 10669  df-3 10670  df-n0 10871  df-z 10939  df-uz 11161  df-q 11266  df-rp 11304  df-fz 11786  df-fzo 11917  df-fl 12028  df-mod 12097  df-seq 12214  df-exp 12273  df-hash 12516  df-cj 13151  df-re 13152  df-im 13153  df-sqrt 13287  df-abs 13288  df-clim 13540  df-rlim 13541  df-sum 13741  df-dvds 14294  df-gcd 14457  df-prm 14611  df-pc 14775
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator