Metamath Proof Explorer


Theorem pcprod

Description: The product of the primes taken to their respective powers reconstructs the original number. (Contributed by Mario Carneiro, 12-Mar-2014)

Ref Expression
Hypothesis pcprod.1 F = n if n n n pCnt N 1
Assertion pcprod N seq 1 × F N = N

Proof

Step Hyp Ref Expression
1 pcprod.1 F = n if n n n pCnt N 1
2 pccl n N n pCnt N 0
3 2 ancoms N n n pCnt N 0
4 3 ralrimiva N n n pCnt N 0
5 4 adantl p N n n pCnt N 0
6 simpr p N N
7 simpl p N p
8 oveq1 n = p n pCnt N = p pCnt N
9 1 5 6 7 8 pcmpt p N p pCnt seq 1 × F N = if p N p pCnt N 0
10 iftrue p N if p N p pCnt N 0 = p pCnt N
11 10 adantl p N p N if p N p pCnt N 0 = p pCnt N
12 iffalse ¬ p N if p N p pCnt N 0 = 0
13 12 adantl p N ¬ p N if p N p pCnt N 0 = 0
14 prmz p p
15 dvdsle p N p N p N
16 14 15 sylan p N p N p N
17 16 con3dimp p N ¬ p N ¬ p N
18 pceq0 p N p pCnt N = 0 ¬ p N
19 18 adantr p N ¬ p N p pCnt N = 0 ¬ p N
20 17 19 mpbird p N ¬ p N p pCnt N = 0
21 13 20 eqtr4d p N ¬ p N if p N p pCnt N 0 = p pCnt N
22 11 21 pm2.61dan p N if p N p pCnt N 0 = p pCnt N
23 9 22 eqtrd p N p pCnt seq 1 × F N = p pCnt N
24 23 ancoms N p p pCnt seq 1 × F N = p pCnt N
25 24 ralrimiva N p p pCnt seq 1 × F N = p pCnt N
26 1 4 pcmptcl N F : seq 1 × F :
27 26 simprd N seq 1 × F :
28 ffvelrn seq 1 × F : N seq 1 × F N
29 27 28 mpancom N seq 1 × F N
30 29 nnnn0d N seq 1 × F N 0
31 nnnn0 N N 0
32 pc11 seq 1 × F N 0 N 0 seq 1 × F N = N p p pCnt seq 1 × F N = p pCnt N
33 30 31 32 syl2anc N seq 1 × F N = N p p pCnt seq 1 × F N = p pCnt N
34 25 33 mpbird N seq 1 × F N = N