Metamath Proof Explorer


Theorem eulerpartlemsv3

Description: Lemma for eulerpart . Value of the sum of a finite partition A (Contributed by Thierry Arnoux, 19-Aug-2018)

Ref Expression
Hypotheses eulerpartlems.r R = f | f -1 Fin
eulerpartlems.s S = f 0 R k f k k
Assertion eulerpartlemsv3 A 0 R S A = k = 1 S A A k k

Proof

Step Hyp Ref Expression
1 eulerpartlems.r R = f | f -1 Fin
2 eulerpartlems.s S = f 0 R k f k k
3 1 2 eulerpartlemsv1 A 0 R S A = k A k k
4 fzssuz 1 S A 1
5 nnuz = 1
6 4 5 sseqtrri 1 S A
7 6 a1i A 0 R 1 S A
8 1 2 eulerpartlemelr A 0 R A : 0 A -1 Fin
9 8 simpld A 0 R A : 0
10 9 adantr A 0 R k 1 S A A : 0
11 7 sselda A 0 R k 1 S A k
12 10 11 ffvelrnd A 0 R k 1 S A A k 0
13 12 nn0cnd A 0 R k 1 S A A k
14 11 nncnd A 0 R k 1 S A k
15 13 14 mulcld A 0 R k 1 S A A k k
16 1 2 eulerpartlems A 0 R t S A + 1 A t = 0
17 16 ralrimiva A 0 R t S A + 1 A t = 0
18 fveqeq2 k = t A k = 0 A t = 0
19 18 cbvralvw k S A + 1 A k = 0 t S A + 1 A t = 0
20 17 19 sylibr A 0 R k S A + 1 A k = 0
21 1 2 eulerpartlemsf S : 0 R 0
22 21 ffvelrni A 0 R S A 0
23 nndiffz1 S A 0 1 S A = S A + 1
24 22 23 syl A 0 R 1 S A = S A + 1
25 24 raleqdv A 0 R k 1 S A A k = 0 k S A + 1 A k = 0
26 20 25 mpbird A 0 R k 1 S A A k = 0
27 26 r19.21bi A 0 R k 1 S A A k = 0
28 27 oveq1d A 0 R k 1 S A A k k = 0 k
29 simpr A 0 R k 1 S A k 1 S A
30 29 eldifad A 0 R k 1 S A k
31 30 nncnd A 0 R k 1 S A k
32 31 mul02d A 0 R k 1 S A 0 k = 0
33 28 32 eqtrd A 0 R k 1 S A A k k = 0
34 5 eqimssi 1
35 34 a1i A 0 R 1
36 7 15 33 35 sumss A 0 R k = 1 S A A k k = k A k k
37 3 36 eqtr4d A 0 R S A = k = 1 S A A k k