Metamath Proof Explorer


Theorem 0sgm

Description: The value of the sum-of-divisors function, usually denoted σ0(n). (Contributed by Mario Carneiro, 21-Jun-2015)

Ref Expression
Assertion 0sgm A 0 σ A = p | p A

Proof

Step Hyp Ref Expression
1 0z 0
2 sgmval2 0 A 0 σ A = k p | p A k 0
3 1 2 mpan A 0 σ A = k p | p A k 0
4 elrabi k p | p A k
5 4 nncnd k p | p A k
6 5 exp0d k p | p A k 0 = 1
7 6 sumeq2i k p | p A k 0 = k p | p A 1
8 fzfid A 1 A Fin
9 dvdsssfz1 A p | p A 1 A
10 8 9 ssfid A p | p A Fin
11 ax-1cn 1
12 fsumconst p | p A Fin 1 k p | p A 1 = p | p A 1
13 10 11 12 sylancl A k p | p A 1 = p | p A 1
14 7 13 syl5eq A k p | p A k 0 = p | p A 1
15 hashcl p | p A Fin p | p A 0
16 10 15 syl A p | p A 0
17 16 nn0cnd A p | p A
18 17 mulid1d A p | p A 1 = p | p A
19 3 14 18 3eqtrd A 0 σ A = p | p A