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

Theorem pcprod 14059
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 14018 . . . . . . . . 9  |-  ( ( n  e.  Prime  /\  N  e.  NN )  ->  (
n  pCnt  N )  e.  NN0 )
32ancoms 453 . . . . . . . 8  |-  ( ( N  e.  NN  /\  n  e.  Prime )  -> 
( n  pCnt  N
)  e.  NN0 )
43ralrimiva 2822 . . . . . . 7  |-  ( N  e.  NN  ->  A. n  e.  Prime  ( n  pCnt  N )  e.  NN0 )
54adantl 466 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  A. n  e.  Prime  ( n  pCnt  N )  e.  NN0 )
6 simpr 461 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  N  e.  NN )
7 simpl 457 . . . . . 6  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  p  e.  Prime )
8 oveq1 6197 . . . . . 6  |-  ( n  =  p  ->  (
n  pCnt  N )  =  ( p  pCnt  N ) )
91, 5, 6, 7, 8pcmpt 14056 . . . . 5  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  pCnt  (  seq 1 (  x.  ,  F ) `  N
) )  =  if ( p  <_  N ,  ( p  pCnt  N ) ,  0 ) )
10 iftrue 3895 . . . . . . 7  |-  ( p  <_  N  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
1110adantl 466 . . . . . 6  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  p  <_  N
)  ->  if (
p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
12 iffalse 3897 . . . . . . . 8  |-  ( -.  p  <_  N  ->  if ( p  <_  N ,  ( p  pCnt  N ) ,  0 )  =  0 )
1312adantl 466 . . . . . . 7  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  0 )
14 prmz 13869 . . . . . . . . . 10  |-  ( p  e.  Prime  ->  p  e.  ZZ )
15 dvdsle 13680 . . . . . . . . . 10  |-  ( ( p  e.  ZZ  /\  N  e.  NN )  ->  ( p  ||  N  ->  p  <_  N )
)
1614, 15sylan 471 . . . . . . . . 9  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  ||  N  ->  p  <_  N ) )
1716con3dimp 441 . . . . . . . 8  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  -.  p  ||  N )
18 pceq0 14039 . . . . . . . . 9  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
( p  pCnt  N
)  =  0  <->  -.  p  ||  N ) )
1918adantr 465 . . . . . . . 8  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  (
( p  pCnt  N
)  =  0  <->  -.  p  ||  N ) )
2017, 19mpbird 232 . . . . . . 7  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  (
p  pCnt  N )  =  0 )
2113, 20eqtr4d 2495 . . . . . 6  |-  ( ( ( p  e.  Prime  /\  N  e.  NN )  /\  -.  p  <_  N )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
2211, 21pm2.61dan 789 . . . . 5  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  if ( p  <_  N , 
( p  pCnt  N
) ,  0 )  =  ( p  pCnt  N ) )
239, 22eqtrd 2492 . . . 4  |-  ( ( p  e.  Prime  /\  N  e.  NN )  ->  (
p  pCnt  (  seq 1 (  x.  ,  F ) `  N
) )  =  ( p  pCnt  N )
)
2423ancoms 453 . . 3  |-  ( ( N  e.  NN  /\  p  e.  Prime )  -> 
( p  pCnt  (  seq 1 (  x.  ,  F ) `  N
) )  =  ( p  pCnt  N )
)
2524ralrimiva 2822 . 2  |-  ( N  e.  NN  ->  A. p  e.  Prime  ( p  pCnt  (  seq 1 (  x.  ,  F ) `  N ) )  =  ( p  pCnt  N
) )
261, 4pcmptcl 14055 . . . . . 6  |-  ( N  e.  NN  ->  ( F : NN --> NN  /\  seq 1 (  x.  ,  F ) : NN --> NN ) )
2726simprd 463 . . . . 5  |-  ( N  e.  NN  ->  seq 1 (  x.  ,  F ) : NN --> NN )
28 ffvelrn 5940 . . . . 5  |-  ( (  seq 1 (  x.  ,  F ) : NN --> NN  /\  N  e.  NN )  ->  (  seq 1 (  x.  ,  F ) `  N
)  e.  NN )
2927, 28mpancom 669 . . . 4  |-  ( N  e.  NN  ->  (  seq 1 (  x.  ,  F ) `  N
)  e.  NN )
3029nnnn0d 10737 . . 3  |-  ( N  e.  NN  ->  (  seq 1 (  x.  ,  F ) `  N
)  e.  NN0 )
31 nnnn0 10687 . . 3  |-  ( N  e.  NN  ->  N  e.  NN0 )
32 pc11 14048 . . 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 661 . 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 232 1  |-  ( N  e.  NN  ->  (  seq 1 (  x.  ,  F ) `  N
)  =  N )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1370    e. wcel 1758   A.wral 2795   ifcif 3889   class class class wbr 4390    |-> cmpt 4448   -->wf 5512   ` cfv 5516  (class class class)co 6190   0cc0 9383   1c1 9384    x. cmul 9388    <_ cle 9520   NNcn 10423   NN0cn0 10680   ZZcz 10747    seqcseq 11907   ^cexp 11966    || cdivides 13637   Primecprime 13865    pCnt cpc 14005
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-sep 4511  ax-nul 4519  ax-pow 4568  ax-pr 4629  ax-un 6472  ax-cnex 9439  ax-resscn 9440  ax-1cn 9441  ax-icn 9442  ax-addcl 9443  ax-addrcl 9444  ax-mulcl 9445  ax-mulrcl 9446  ax-mulcom 9447  ax-addass 9448  ax-mulass 9449  ax-distr 9450  ax-i2m1 9451  ax-1ne0 9452  ax-1rid 9453  ax-rnegex 9454  ax-rrecex 9455  ax-cnre 9456  ax-pre-lttri 9457  ax-pre-lttrn 9458  ax-pre-ltadd 9459  ax-pre-mulgt0 9460  ax-pre-sup 9461
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 3070  df-sbc 3285  df-csb 3387  df-dif 3429  df-un 3431  df-in 3433  df-ss 3440  df-pss 3442  df-nul 3736  df-if 3890  df-pw 3960  df-sn 3976  df-pr 3978  df-tp 3980  df-op 3982  df-uni 4190  df-int 4227  df-iun 4271  df-br 4391  df-opab 4449  df-mpt 4450  df-tr 4484  df-eprel 4730  df-id 4734  df-po 4739  df-so 4740  df-fr 4777  df-we 4779  df-ord 4820  df-on 4821  df-lim 4822  df-suc 4823  df-xp 4944  df-rel 4945  df-cnv 4946  df-co 4947  df-dm 4948  df-rn 4949  df-res 4950  df-ima 4951  df-iota 5479  df-fun 5518  df-fn 5519  df-f 5520  df-f1 5521  df-fo 5522  df-f1o 5523  df-fv 5524  df-riota 6151  df-ov 6193  df-oprab 6194  df-mpt2 6195  df-om 6577  df-1st 6677  df-2nd 6678  df-recs 6932  df-rdg 6966  df-1o 7020  df-2o 7021  df-oadd 7024  df-er 7201  df-en 7411  df-dom 7412  df-sdom 7413  df-fin 7414  df-sup 7792  df-pnf 9521  df-mnf 9522  df-xr 9523  df-ltxr 9524  df-le 9525  df-sub 9698  df-neg 9699  df-div 10095  df-nn 10424  df-2 10481  df-3 10482  df-n0 10681  df-z 10748  df-uz 10963  df-q 11055  df-rp 11093  df-fz 11539  df-fl 11743  df-mod 11810  df-seq 11908  df-exp 11967  df-cj 12690  df-re 12691  df-im 12692  df-sqr 12826  df-abs 12827  df-dvds 13638  df-gcd 13793  df-prm 13866  df-pc 14006
This theorem is referenced by:  pclogsum  22670
  Copyright terms: Public domain W3C validator