Metamath Proof Explorer


Theorem fsumparts

Description: Summation by parts. (Contributed by Mario Carneiro, 13-Apr-2016)

Ref Expression
Hypotheses fsumparts.b k = j A = B V = W
fsumparts.c k = j + 1 A = C V = X
fsumparts.d k = M A = D V = Y
fsumparts.e k = N A = E V = Z
fsumparts.1 φ N M
fsumparts.2 φ k M N A
fsumparts.3 φ k M N V
Assertion fsumparts φ j M ..^ N B X W = E Z - D Y - j M ..^ N C B X

Proof

Step Hyp Ref Expression
1 fsumparts.b k = j A = B V = W
2 fsumparts.c k = j + 1 A = C V = X
3 fsumparts.d k = M A = D V = Y
4 fsumparts.e k = N A = E V = Z
5 fsumparts.1 φ N M
6 fsumparts.2 φ k M N A
7 fsumparts.3 φ k M N V
8 sum0 j B X W = 0
9 0m0e0 0 0 = 0
10 8 9 eqtr4i j B X W = 0 0
11 simpr φ N = M N = M
12 11 oveq2d φ N = M M ..^ N = M ..^ M
13 fzo0 M ..^ M =
14 12 13 eqtrdi φ N = M M ..^ N =
15 14 sumeq1d φ N = M j M ..^ N B X W = j B X W
16 eluzfz1 N M M M N
17 5 16 syl φ M M N
18 eqtr3 k = M N = M k = N
19 oveq12 A = E V = Z A V = E Z
20 18 4 19 3syl k = M N = M A V = E Z
21 oveq12 A = D V = Y A V = D Y
22 3 21 syl k = M A V = D Y
23 22 adantr k = M N = M A V = D Y
24 20 23 eqeq12d k = M N = M A V = A V E Z = D Y
25 24 pm5.74da k = M N = M A V = A V N = M E Z = D Y
26 eqidd N = M A V = A V
27 25 26 vtoclg M M N N = M E Z = D Y
28 27 imp M M N N = M E Z = D Y
29 17 28 sylan φ N = M E Z = D Y
30 29 oveq1d φ N = M E Z D Y = D Y D Y
31 3 simpld k = M A = D
32 31 eleq1d k = M A D
33 6 ralrimiva φ k M N A
34 32 33 17 rspcdva φ D
35 3 simprd k = M V = Y
36 35 eleq1d k = M V Y
37 7 ralrimiva φ k M N V
38 36 37 17 rspcdva φ Y
39 34 38 mulcld φ D Y
40 39 subidd φ D Y D Y = 0
41 40 adantr φ N = M D Y D Y = 0
42 30 41 eqtrd φ N = M E Z D Y = 0
43 14 sumeq1d φ N = M j M ..^ N C B X = j C B X
44 sum0 j C B X = 0
45 43 44 eqtrdi φ N = M j M ..^ N C B X = 0
46 42 45 oveq12d φ N = M E Z - D Y - j M ..^ N C B X = 0 0
47 10 15 46 3eqtr4a φ N = M j M ..^ N B X W = E Z - D Y - j M ..^ N C B X
48 fzofi M + 1 ..^ N Fin
49 48 a1i φ N M + 1 M + 1 ..^ N Fin
50 eluzel2 N M M
51 5 50 syl φ M
52 51 adantr φ N M + 1 M
53 uzid M M M
54 peano2uz M M M + 1 M
55 fzoss1 M + 1 M M + 1 ..^ N M ..^ N
56 52 53 54 55 4syl φ N M + 1 M + 1 ..^ N M ..^ N
57 56 sselda φ N M + 1 k M + 1 ..^ N k M ..^ N
58 elfzofz k M ..^ N k M N
59 6 7 mulcld φ k M N A V
60 58 59 sylan2 φ k M ..^ N A V
61 60 adantlr φ N M + 1 k M ..^ N A V
62 57 61 syldan φ N M + 1 k M + 1 ..^ N A V
63 49 62 fsumcl φ N M + 1 k M + 1 ..^ N A V
64 4 simpld k = N A = E
65 64 eleq1d k = N A E
66 eluzfz2 N M N M N
67 5 66 syl φ N M N
68 65 33 67 rspcdva φ E
69 4 simprd k = N V = Z
70 69 eleq1d k = N V Z
71 70 37 67 rspcdva φ Z
72 68 71 mulcld φ E Z
73 72 adantr φ N M + 1 E Z
74 simpr φ N M + 1 N M + 1
75 fzp1ss M M + 1 N M N
76 52 75 syl φ N M + 1 M + 1 N M N
77 76 sselda φ N M + 1 k M + 1 N k M N
78 59 adantlr φ N M + 1 k M N A V
79 77 78 syldan φ N M + 1 k M + 1 N A V
80 4 19 syl k = N A V = E Z
81 74 79 80 fsumm1 φ N M + 1 k = M + 1 N A V = k = M + 1 N 1 A V + E Z
82 eluzelz N M N
83 5 82 syl φ N
84 83 adantr φ N M + 1 N
85 fzoval N M ..^ N = M N 1
86 84 85 syl φ N M + 1 M ..^ N = M N 1
87 52 zcnd φ N M + 1 M
88 ax-1cn 1
89 pncan M 1 M + 1 - 1 = M
90 87 88 89 sylancl φ N M + 1 M + 1 - 1 = M
91 90 oveq1d φ N M + 1 M + 1 - 1 N 1 = M N 1
92 86 91 eqtr4d φ N M + 1 M ..^ N = M + 1 - 1 N 1
93 92 sumeq1d φ N M + 1 j M ..^ N C X = j = M + 1 - 1 N 1 C X
94 1zzd φ N M + 1 1
95 52 peano2zd φ N M + 1 M + 1
96 oveq12 A = C V = X A V = C X
97 2 96 syl k = j + 1 A V = C X
98 94 95 84 79 97 fsumshftm φ N M + 1 k = M + 1 N A V = j = M + 1 - 1 N 1 C X
99 93 98 eqtr4d φ N M + 1 j M ..^ N C X = k = M + 1 N A V
100 fzoval N M + 1 ..^ N = M + 1 N 1
101 84 100 syl φ N M + 1 M + 1 ..^ N = M + 1 N 1
102 101 sumeq1d φ N M + 1 k M + 1 ..^ N A V = k = M + 1 N 1 A V
103 102 oveq1d φ N M + 1 k M + 1 ..^ N A V + E Z = k = M + 1 N 1 A V + E Z
104 81 99 103 3eqtr4d φ N M + 1 j M ..^ N C X = k M + 1 ..^ N A V + E Z
105 63 73 104 comraddd φ N M + 1 j M ..^ N C X = E Z + k M + 1 ..^ N A V
106 105 oveq1d φ N M + 1 j M ..^ N C X j M ..^ N B X = E Z + k M + 1 ..^ N A V - j M ..^ N B X
107 fzofzp1 j M ..^ N j + 1 M N
108 2 simpld k = j + 1 A = C
109 108 eleq1d k = j + 1 A C
110 109 rspccva k M N A j + 1 M N C
111 33 107 110 syl2an φ j M ..^ N C
112 elfzofz j M ..^ N j M N
113 1 simpld k = j A = B
114 113 eleq1d k = j A B
115 114 rspccva k M N A j M N B
116 33 112 115 syl2an φ j M ..^ N B
117 2 simprd k = j + 1 V = X
118 117 eleq1d k = j + 1 V X
119 118 rspccva k M N V j + 1 M N X
120 37 107 119 syl2an φ j M ..^ N X
121 111 116 120 subdird φ j M ..^ N C B X = C X B X
122 121 sumeq2dv φ j M ..^ N C B X = j M ..^ N C X B X
123 fzofi M ..^ N Fin
124 123 a1i φ M ..^ N Fin
125 111 120 mulcld φ j M ..^ N C X
126 116 120 mulcld φ j M ..^ N B X
127 124 125 126 fsumsub φ j M ..^ N C X B X = j M ..^ N C X j M ..^ N B X
128 122 127 eqtrd φ j M ..^ N C B X = j M ..^ N C X j M ..^ N B X
129 128 adantr φ N M + 1 j M ..^ N C B X = j M ..^ N C X j M ..^ N B X
130 124 126 fsumcl φ j M ..^ N B X
131 130 adantr φ N M + 1 j M ..^ N B X
132 73 131 63 subsub3d φ N M + 1 E Z j M ..^ N B X k M + 1 ..^ N A V = E Z + k M + 1 ..^ N A V - j M ..^ N B X
133 106 129 132 3eqtr4d φ N M + 1 j M ..^ N C B X = E Z j M ..^ N B X k M + 1 ..^ N A V
134 133 oveq2d φ N M + 1 E Z - D Y - j M ..^ N C B X = E Z - D Y - E Z j M ..^ N B X k M + 1 ..^ N A V
135 39 adantr φ N M + 1 D Y
136 131 63 subcld φ N M + 1 j M ..^ N B X k M + 1 ..^ N A V
137 73 135 136 nnncan1d φ N M + 1 E Z - D Y - E Z j M ..^ N B X k M + 1 ..^ N A V = j M ..^ N B X - k M + 1 ..^ N A V - D Y
138 63 135 addcomd φ N M + 1 k M + 1 ..^ N A V + D Y = D Y + k M + 1 ..^ N A V
139 eluzp1m1 M N M + 1 N 1 M
140 51 139 sylan φ N M + 1 N 1 M
141 86 eleq2d φ N M + 1 k M ..^ N k M N 1
142 141 biimpar φ N M + 1 k M N 1 k M ..^ N
143 142 61 syldan φ N M + 1 k M N 1 A V
144 140 143 22 fsum1p φ N M + 1 k = M N 1 A V = D Y + k = M + 1 N 1 A V
145 86 sumeq1d φ N M + 1 k M ..^ N A V = k = M N 1 A V
146 102 oveq2d φ N M + 1 D Y + k M + 1 ..^ N A V = D Y + k = M + 1 N 1 A V
147 144 145 146 3eqtr4d φ N M + 1 k M ..^ N A V = D Y + k M + 1 ..^ N A V
148 138 147 eqtr4d φ N M + 1 k M + 1 ..^ N A V + D Y = k M ..^ N A V
149 oveq12 A = B V = W A V = B W
150 1 149 syl k = j A V = B W
151 150 cbvsumv k M ..^ N A V = j M ..^ N B W
152 148 151 eqtrdi φ N M + 1 k M + 1 ..^ N A V + D Y = j M ..^ N B W
153 152 oveq2d φ N M + 1 j M ..^ N B X k M + 1 ..^ N A V + D Y = j M ..^ N B X j M ..^ N B W
154 131 63 135 subsub4d φ N M + 1 j M ..^ N B X - k M + 1 ..^ N A V - D Y = j M ..^ N B X k M + 1 ..^ N A V + D Y
155 1 simprd k = j V = W
156 155 eleq1d k = j V W
157 156 rspccva k M N V j M N W
158 37 112 157 syl2an φ j M ..^ N W
159 116 120 158 subdid φ j M ..^ N B X W = B X B W
160 159 sumeq2dv φ j M ..^ N B X W = j M ..^ N B X B W
161 116 158 mulcld φ j M ..^ N B W
162 124 126 161 fsumsub φ j M ..^ N B X B W = j M ..^ N B X j M ..^ N B W
163 160 162 eqtrd φ j M ..^ N B X W = j M ..^ N B X j M ..^ N B W
164 163 adantr φ N M + 1 j M ..^ N B X W = j M ..^ N B X j M ..^ N B W
165 153 154 164 3eqtr4d φ N M + 1 j M ..^ N B X - k M + 1 ..^ N A V - D Y = j M ..^ N B X W
166 134 137 165 3eqtrrd φ N M + 1 j M ..^ N B X W = E Z - D Y - j M ..^ N C B X
167 uzp1 N M N = M N M + 1
168 5 167 syl φ N = M N M + 1
169 47 166 168 mpjaodan φ j M ..^ N B X W = E Z - D Y - j M ..^ N C B X