Metamath Proof Explorer


Theorem sgmppw

Description: The value of the divisor function at a prime power. (Contributed by Mario Carneiro, 17-May-2016)

Ref Expression
Assertion sgmppw A P N 0 A σ P N = k = 0 N P A k

Proof

Step Hyp Ref Expression
1 simp1 A P N 0 A
2 simp2 A P N 0 P
3 prmnn P P
4 2 3 syl A P N 0 P
5 simp3 A P N 0 N 0
6 4 5 nnexpcld A P N 0 P N
7 sgmval A P N A σ P N = n x | x P N n A
8 1 6 7 syl2anc A P N 0 A σ P N = n x | x P N n A
9 oveq1 n = P k n A = P k A
10 fzfid A P N 0 0 N Fin
11 eqid i 0 N P i = i 0 N P i
12 11 dvdsppwf1o P N 0 i 0 N P i : 0 N 1-1 onto x | x P N
13 2 5 12 syl2anc A P N 0 i 0 N P i : 0 N 1-1 onto x | x P N
14 oveq2 i = k P i = P k
15 ovex P k V
16 14 11 15 fvmpt k 0 N i 0 N P i k = P k
17 16 adantl A P N 0 k 0 N i 0 N P i k = P k
18 elrabi n x | x P N n
19 18 nncnd n x | x P N n
20 cxpcl n A n A
21 19 1 20 syl2anr A P N 0 n x | x P N n A
22 9 10 13 17 21 fsumf1o A P N 0 n x | x P N n A = k = 0 N P k A
23 elfznn0 k 0 N k 0
24 23 adantl A P N 0 k 0 N k 0
25 24 nn0cnd A P N 0 k 0 N k
26 1 adantr A P N 0 k 0 N A
27 25 26 mulcomd A P N 0 k 0 N k A = A k
28 27 oveq2d A P N 0 k 0 N P k A = P A k
29 4 adantr A P N 0 k 0 N P
30 29 nnrpd A P N 0 k 0 N P +
31 24 nn0red A P N 0 k 0 N k
32 30 31 26 cxpmuld A P N 0 k 0 N P k A = P k A
33 29 nncnd A P N 0 k 0 N P
34 cxpexp P k 0 P k = P k
35 33 24 34 syl2anc A P N 0 k 0 N P k = P k
36 35 oveq1d A P N 0 k 0 N P k A = P k A
37 32 36 eqtrd A P N 0 k 0 N P k A = P k A
38 33 26 24 cxpmul2d A P N 0 k 0 N P A k = P A k
39 28 37 38 3eqtr3d A P N 0 k 0 N P k A = P A k
40 39 sumeq2dv A P N 0 k = 0 N P k A = k = 0 N P A k
41 8 22 40 3eqtrd A P N 0 A σ P N = k = 0 N P A k