Metamath Proof Explorer


Theorem fsumrev2

Description: Reversal of a finite sum. (Contributed by NM, 27-Nov-2005) (Revised by Mario Carneiro, 13-Apr-2016)

Ref Expression
Hypotheses fsumrev2.1 φ j M N A
fsumrev2.2 j = M + N - k A = B
Assertion fsumrev2 φ j = M N A = k = M N B

Proof

Step Hyp Ref Expression
1 fsumrev2.1 φ j M N A
2 fsumrev2.2 j = M + N - k A = B
3 sum0 j A = 0
4 sum0 k B = 0
5 3 4 eqtr4i j A = k B
6 sumeq1 M N = j = M N A = j A
7 sumeq1 M N = k = M N B = k B
8 5 6 7 3eqtr4a M N = j = M N A = k = M N B
9 8 adantl φ M N = j = M N A = k = M N B
10 fzn0 M N N M
11 eluzel2 N M M
12 11 adantl φ N M M
13 eluzelz N M N
14 13 adantl φ N M N
15 12 14 zaddcld φ N M M + N
16 1 adantlr φ N M j M N A
17 15 12 14 16 2 fsumrev φ N M j = M N A = k = M + N - N M + N - M B
18 12 zcnd φ N M M
19 14 zcnd φ N M N
20 18 19 pncand φ N M M + N - N = M
21 18 19 pncan2d φ N M M + N - M = N
22 20 21 oveq12d φ N M M + N - N M + N - M = M N
23 22 sumeq1d φ N M k = M + N - N M + N - M B = k = M N B
24 17 23 eqtrd φ N M j = M N A = k = M N B
25 10 24 sylan2b φ M N j = M N A = k = M N B
26 9 25 pm2.61dane φ j = M N A = k = M N B