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

Theorem pcprod 13184
Description: The product of the primes taken to their respective powers reconstructs the original number. (Contributed by Mario Carneiro, 12-Mar-2014.)
Hypothesis
Ref Expression
pcprod.1  |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( n ^ (
n  pCnt  N )
) ,  1 ) )
Assertion
Ref Expression
pcprod  |-  ( N  e.  NN  ->  (  seq  1 (  x.  ,  F ) `  N
)  =  N )
Distinct variable group:    n, N
Allowed substitution hint:    F( n)

Proof of Theorem pcprod
Dummy variable  p is distinct from all other variables.
StepHypRef Expression
1 pcprod.1 . . . . . 6  |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( n ^ (
n  pCnt  N )
) ,  1 ) )
2 pccl 13143 . . . . . . . . 9  |-  ( ( n  e.  Prime  /\  N  e.  NN )  ->  (
n  pCnt  N )  e.  NN0 )
32ancoms 440 . . . . . . . 8  |-  ( ( N  e.  NN  /\  n  e.  Prime )  -> 
( n  pCnt  N
)  e.  NN0 )
43ralrimiva 2725 . . . . . . 7  |-  ( N  e.  NN  ->  A. n  e.  Prime  ( n  pCnt  N )  e.  NN0 )
54adantl 453 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  A. n  e.  Prime  ( n  pCnt  N )  e.  NN0 )
6 simpr 448 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  N  e.  NN )
7 simpl 444 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  p  e.  Prime )
8 oveq1 6020 . . . . . 6  |-  ( n  =  p  ->  (
n  pCnt  N )  =  ( p  pCnt  N ) )
91, 5, 6, 7, 8pcmpt 13181 . . . . 5  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  pCnt  (  seq  1 (  x.  ,  F ) `  N
) )  =  if ( p  <_  N ,  ( p  pCnt  N ) ,  0 ) )
10 iftrue 3681 . . . . . . 7  |-  ( p  <_  N  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
1110adantl 453 . . . . . 6  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  p  <_  N
)  ->  if (
p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
12 iffalse 3682 . . . . . . . 8  |-  ( -.  p  <_  N  ->  if ( p  <_  N ,  ( p  pCnt  N ) ,  0 )  =  0 )
1312adantl 453 . . . . . . 7  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  0 )
14 prmz 13003 . . . . . . . . . 10  |-  ( p  e.  Prime  ->  p  e.  ZZ )
15 dvdsle 12815 . . . . . . . . . 10  |-  ( ( p  e.  ZZ  /\  N  e.  NN )  ->  ( p  ||  N  ->  p  <_  N )
)
1614, 15sylan 458 . . . . . . . . 9  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  ||  N  ->  p  <_  N ) )
1716con3and 429 . . . . . . . 8  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  -.  p  ||  N )
18 pceq0 13164 . . . . . . . . 9  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
( p  pCnt  N
)  =  0  <->  -.  p  ||  N ) )
1918adantr 452 . . . . . . . 8  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  (
( p  pCnt  N
)  =  0  <->  -.  p  ||  N ) )
2017, 19mpbird 224 . . . . . . 7  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  (
p  pCnt  N )  =  0 )
2113, 20eqtr4d 2415 . . . . . 6  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
2211, 21pm2.61dan 767 . . . . 5  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
239, 22eqtrd 2412 . . . 4  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  pCnt  (  seq  1 (  x.  ,  F ) `  N
) )  =  ( p  pCnt  N )
)
2423ancoms 440 . . 3  |-  ( ( N  e.  NN  /\  p  e.  Prime )  -> 
( p  pCnt  (  seq  1 (  x.  ,  F ) `  N
) )  =  ( p  pCnt  N )
)
2524ralrimiva 2725 . 2  |-  ( N  e.  NN  ->  A. p  e.  Prime  ( p  pCnt  (  seq  1 (  x.  ,  F ) `  N ) )  =  ( p  pCnt  N
) )
261, 4pcmptcl 13180 . . . . . 6  |-  ( N  e.  NN  ->  ( F : NN --> NN  /\  seq  1 (  x.  ,  F ) : NN --> NN ) )
2726simprd 450 . . . . 5  |-  ( N  e.  NN  ->  seq  1 (  x.  ,  F ) : NN --> NN )
28 ffvelrn 5800 . . . . 5  |-  ( (  seq  1 (  x.  ,  F ) : NN --> NN  /\  N  e.  NN )  ->  (  seq  1 (  x.  ,  F ) `  N
)  e.  NN )
2927, 28mpancom 651 . . . 4  |-  ( N  e.  NN  ->  (  seq  1 (  x.  ,  F ) `  N
)  e.  NN )
3029nnnn0d 10199 . . 3  |-  ( N  e.  NN  ->  (  seq  1 (  x.  ,  F ) `  N
)  e.  NN0 )
31 nnnn0 10153 . . 3  |-  ( N  e.  NN  ->  N  e.  NN0 )
32 pc11 13173 . . 3  |-  ( ( (  seq  1 (  x.  ,  F ) `
 N )  e. 
NN0  /\  N  e.  NN0 )  ->  ( (  seq  1 (  x.  ,  F ) `  N
)  =  N  <->  A. p  e.  Prime  ( p  pCnt  (  seq  1 (  x.  ,  F ) `  N ) )  =  ( p  pCnt  N
) ) )
3330, 31, 32syl2anc 643 . 2  |-  ( N  e.  NN  ->  (
(  seq  1 (  x.  ,  F ) `
 N )  =  N  <->  A. p  e.  Prime  ( p  pCnt  (  seq  1 (  x.  ,  F ) `  N
) )  =  ( p  pCnt  N )
) )
3425, 33mpbird 224 1  |-  ( N  e.  NN  ->  (  seq  1 (  x.  ,  F ) `  N
)  =  N )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1717   A.wral 2642   ifcif 3675   class class class wbr 4146    e. cmpt 4200   -->wf 5383   ` cfv 5387  (class class class)co 6013   0cc0 8916   1c1 8917    x. cmul 8921    <_ cle 9047   NNcn 9925   NN0cn0 10146   ZZcz 10207    seq cseq 11243   ^cexp 11302    || cdivides 12772   Primecprime 12999    pCnt cpc 13130
This theorem is referenced by:  pclogsum  20859
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 2361  ax-sep 4264  ax-nul 4272  ax-pow 4311  ax-pr 4337  ax-un 4634  ax-cnex 8972  ax-resscn 8973  ax-1cn 8974  ax-icn 8975  ax-addcl 8976  ax-addrcl 8977  ax-mulcl 8978  ax-mulrcl 8979  ax-mulcom 8980  ax-addass 8981  ax-mulass 8982  ax-distr 8983  ax-i2m1 8984  ax-1ne0 8985  ax-1rid 8986  ax-rnegex 8987  ax-rrecex 8988  ax-cnre 8989  ax-pre-lttri 8990  ax-pre-lttrn 8991  ax-pre-ltadd 8992  ax-pre-mulgt0 8993  ax-pre-sup 8994
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 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-nel 2546  df-ral 2647  df-rex 2648  df-reu 2649  df-rmo 2650  df-rab 2651  df-v 2894  df-sbc 3098  df-csb 3188  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-pss 3272  df-nul 3565  df-if 3676  df-pw 3737  df-sn 3756  df-pr 3757  df-tp 3758  df-op 3759  df-uni 3951  df-int 3986  df-iun 4030  df-br 4147  df-opab 4201  df-mpt 4202  df-tr 4237  df-eprel 4428  df-id 4432  df-po 4437  df-so 4438  df-fr 4475  df-we 4477  df-ord 4518  df-on 4519  df-lim 4520  df-suc 4521  df-om 4779  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-rn 4822  df-res 4823  df-ima 4824  df-iota 5351  df-fun 5389  df-fn 5390  df-f 5391  df-f1 5392  df-fo 5393  df-f1o 5394  df-fv 5395  df-ov 6016  df-oprab 6017  df-mpt2 6018  df-1st 6281  df-2nd 6282  df-riota 6478  df-recs 6562  df-rdg 6597  df-1o 6653  df-2o 6654  df-oadd 6657  df-er 6834  df-en 7039  df-dom 7040  df-sdom 7041  df-fin 7042  df-sup 7374  df-pnf 9048  df-mnf 9049  df-xr 9050  df-ltxr 9051  df-le 9052  df-sub 9218  df-neg 9219  df-div 9603  df-nn 9926  df-2 9983  df-3 9984  df-n0 10147  df-z 10208  df-uz 10414  df-q 10500  df-rp 10538  df-fz 10969  df-fl 11122  df-mod 11171  df-seq 11244  df-exp 11303  df-cj 11824  df-re 11825  df-im 11826  df-sqr 11960  df-abs 11961  df-dvds 12773  df-gcd 12927  df-prm 13000  df-pc 13131
  Copyright terms: Public domain W3C validator