Metamath Proof Explorer


Theorem fsum2dsub

Description: Lemma for breprexp - Re-index a double sum, using difference of the initial indices. (Contributed by Thierry Arnoux, 7-Dec-2021)

Ref Expression
Hypotheses fzsum2sub.m φ M 0
fzsum2sub.n φ N 0
fzsum2sub.1 i = k j A = B
fzsum2sub.2 φ i j j 1 N A
fzsum2sub.3 φ j 1 N k M + j + 1 M + N B = 0
fzsum2sub.4 φ j 1 N k 0 ..^ j B = 0
Assertion fsum2dsub φ i = 0 M j = 1 N A = k = 0 M + N j = 1 N B

Proof

Step Hyp Ref Expression
1 fzsum2sub.m φ M 0
2 fzsum2sub.n φ N 0
3 fzsum2sub.1 i = k j A = B
4 fzsum2sub.2 φ i j j 1 N A
5 fzsum2sub.3 φ j 1 N k M + j + 1 M + N B = 0
6 fzsum2sub.4 φ j 1 N k 0 ..^ j B = 0
7 simpr φ j 1 N j 1 N
8 7 elfzelzd φ j 1 N j
9 0zd φ j 1 N 0
10 1 nn0zd φ M
11 10 adantr φ j 1 N M
12 simpll φ j 1 N i 0 M φ
13 fz1ssnn 1 N
14 nnssnn0 0
15 13 14 sstri 1 N 0
16 15 7 sselid φ j 1 N j 0
17 nn0uz 0 = 0
18 16 17 eleqtrdi φ j 1 N j 0
19 neg0 0 = 0
20 uzneg j 0 0 j
21 19 20 eqeltrrid j 0 0 j
22 fzss1 0 j 0 M j M
23 18 21 22 3syl φ j 1 N 0 M j M
24 fzssuz j M j
25 23 24 sstrdi φ j 1 N 0 M j
26 25 sselda φ j 1 N i 0 M i j
27 7 adantr φ j 1 N i 0 M j 1 N
28 12 26 27 4 syl3anc φ j 1 N i 0 M A
29 8 9 11 28 3 fsumshft φ j 1 N i = 0 M A = k = 0 + j M + j B
30 1 adantr φ j 1 N M 0
31 13 7 sselid φ j 1 N j
32 31 nnnn0d φ j 1 N j 0
33 30 32 nn0addcld φ j 1 N M + j 0
34 33 nn0red φ j 1 N M + j
35 34 ltp1d φ j 1 N M + j < M + j + 1
36 fzdisj M + j < M + j + 1 j M + j M + j + 1 M + N =
37 35 36 syl φ j 1 N j M + j M + j + 1 M + N =
38 2 nn0zd φ N
39 10 38 zaddcld φ M + N
40 39 adantr φ j 1 N M + N
41 33 nn0zd φ j 1 N M + j
42 31 nnred φ j 1 N j
43 nn0addge2 j M 0 j M + j
44 42 30 43 syl2anc φ j 1 N j M + j
45 2 nn0red φ N
46 45 adantr φ j 1 N N
47 30 nn0red φ j 1 N M
48 elfzle2 j 1 N j N
49 48 adantl φ j 1 N j N
50 42 46 47 49 leadd2dd φ j 1 N M + j M + N
51 8 40 41 44 50 elfzd φ j 1 N M + j j M + N
52 fzsplit M + j j M + N j M + N = j M + j M + j + 1 M + N
53 51 52 syl φ j 1 N j M + N = j M + j M + j + 1 M + N
54 fzfid φ j 1 N j M + N Fin
55 simpll φ j 1 N k j M + N φ
56 7 adantr φ j 1 N k j M + N j 1 N
57 15 56 sselid φ j 1 N k j M + N j 0
58 fz2ssnn0 j 0 j M + N 0
59 57 58 syl φ j 1 N k j M + N j M + N 0
60 simpr φ j 1 N k j M + N k j M + N
61 59 60 sseldd φ j 1 N k j M + N k 0
62 3 eleq1d i = k j A B
63 simpll φ i j j 1 N φ
64 simplr φ i j j 1 N i j
65 simpr φ i j j 1 N j 1 N
66 63 64 65 4 syl3anc φ i j j 1 N A
67 66 an32s φ j 1 N i j A
68 67 ralrimiva φ j 1 N i j A
69 68 adantr φ j 1 N k 0 i j A
70 nnsscn
71 13 70 sstri 1 N
72 simplr φ j 1 N k 0 j 1 N
73 71 72 sselid φ j 1 N k 0 j
74 simpr φ j 1 N k 0 k 0
75 74 nn0cnd φ j 1 N k 0 k
76 73 75 negsubdi2d φ j 1 N k 0 j k = k j
77 72 elfzelzd φ j 1 N k 0 j
78 eluzmn j k 0 j j k
79 77 74 78 syl2anc φ j 1 N k 0 j j k
80 uzneg j j k j k j
81 79 80 syl φ j 1 N k 0 j k j
82 76 81 eqeltrrd φ j 1 N k 0 k j j
83 62 69 82 rspcdva φ j 1 N k 0 B
84 55 56 61 83 syl21anc φ j 1 N k j M + N B
85 37 53 54 84 fsumsplit φ j 1 N k = j M + N B = k = j M + j B + k = M + j + 1 M + N B
86 8 zcnd φ j 1 N j
87 86 addid2d φ j 1 N 0 + j = j
88 87 oveq1d φ j 1 N 0 + j M + j = j M + j
89 88 eqcomd φ j 1 N j M + j = 0 + j M + j
90 89 sumeq1d φ j 1 N k = j M + j B = k = 0 + j M + j B
91 5 sumeq2dv φ j 1 N k = M + j + 1 M + N B = k = M + j + 1 M + N 0
92 fzfi M + j + 1 M + N Fin
93 sumz M + j + 1 M + N 0 M + j + 1 M + N Fin k = M + j + 1 M + N 0 = 0
94 93 olcs M + j + 1 M + N Fin k = M + j + 1 M + N 0 = 0
95 92 94 ax-mp k = M + j + 1 M + N 0 = 0
96 91 95 eqtrdi φ j 1 N k = M + j + 1 M + N B = 0
97 90 96 oveq12d φ j 1 N k = j M + j B + k = M + j + 1 M + N B = k = 0 + j M + j B + 0
98 fzfid φ j 1 N 0 + j M + j Fin
99 simpll φ j 1 N k 0 + j M + j φ
100 7 adantr φ j 1 N k 0 + j M + j j 1 N
101 elfzuz3 j 1 N N j
102 101 adantl φ j 1 N N j
103 eluzadd N j M N + M j + M
104 102 11 103 syl2anc φ j 1 N N + M j + M
105 2 nn0cnd φ N
106 105 adantr φ j 1 N N
107 zsscn
108 107 11 sselid φ j 1 N M
109 106 108 addcomd φ j 1 N N + M = M + N
110 86 108 addcomd φ j 1 N j + M = M + j
111 110 fveq2d φ j 1 N j + M = M + j
112 104 109 111 3eltr3d φ j 1 N M + N M + j
113 112 adantr φ j 1 N k 0 + j M + j M + N M + j
114 fzss2 M + N M + j j M + j j M + N
115 113 114 syl φ j 1 N k 0 + j M + j j M + j j M + N
116 simpr φ j 1 N k 0 + j M + j k 0 + j M + j
117 88 adantr φ j 1 N k 0 + j M + j 0 + j M + j = j M + j
118 116 117 eleqtrd φ j 1 N k 0 + j M + j k j M + j
119 115 118 sseldd φ j 1 N k 0 + j M + j k j M + N
120 99 100 119 61 syl21anc φ j 1 N k 0 + j M + j k 0
121 99 100 120 83 syl21anc φ j 1 N k 0 + j M + j B
122 98 121 fsumcl φ j 1 N k = 0 + j M + j B
123 122 addid1d φ j 1 N k = 0 + j M + j B + 0 = k = 0 + j M + j B
124 85 97 123 3eqtrrd φ j 1 N k = 0 + j M + j B = k = j M + N B
125 fzval3 M + N j M + N = j ..^ M + N + 1
126 40 125 syl φ j 1 N j M + N = j ..^ M + N + 1
127 126 ineq2d φ j 1 N 0 ..^ j j M + N = 0 ..^ j j ..^ M + N + 1
128 fzodisj 0 ..^ j j ..^ M + N + 1 =
129 127 128 eqtrdi φ j 1 N 0 ..^ j j M + N =
130 40 peano2zd φ j 1 N M + N + 1
131 32 nn0ge0d φ j 1 N 0 j
132 130 zred φ j 1 N M + N + 1
133 40 zred φ j 1 N M + N
134 nn0addge2 N M 0 N M + N
135 45 1 134 syl2anc φ N M + N
136 135 adantr φ j 1 N N M + N
137 133 lep1d φ j 1 N M + N M + N + 1
138 46 133 132 136 137 letrd φ j 1 N N M + N + 1
139 42 46 132 49 138 letrd φ j 1 N j M + N + 1
140 9 130 8 131 139 elfzd φ j 1 N j 0 M + N + 1
141 fzosplit j 0 M + N + 1 0 ..^ M + N + 1 = 0 ..^ j j ..^ M + N + 1
142 140 141 syl φ j 1 N 0 ..^ M + N + 1 = 0 ..^ j j ..^ M + N + 1
143 fzval3 M + N 0 M + N = 0 ..^ M + N + 1
144 40 143 syl φ j 1 N 0 M + N = 0 ..^ M + N + 1
145 126 uneq2d φ j 1 N 0 ..^ j j M + N = 0 ..^ j j ..^ M + N + 1
146 142 144 145 3eqtr4d φ j 1 N 0 M + N = 0 ..^ j j M + N
147 fzfid φ 0 M + N Fin
148 147 adantr φ j 1 N 0 M + N Fin
149 simpl φ k 0 M + N j 1 N φ
150 7 adantrl φ k 0 M + N j 1 N j 1 N
151 fz0ssnn0 0 M + N 0
152 simprl φ k 0 M + N j 1 N k 0 M + N
153 151 152 sselid φ k 0 M + N j 1 N k 0
154 149 150 153 83 syl21anc φ k 0 M + N j 1 N B
155 154 anass1rs φ j 1 N k 0 M + N B
156 129 146 148 155 fsumsplit φ j 1 N k = 0 M + N B = k 0 ..^ j B + k = j M + N B
157 6 sumeq2dv φ j 1 N k 0 ..^ j B = k 0 ..^ j 0
158 fzofi 0 ..^ j Fin
159 sumz 0 ..^ j 0 0 ..^ j Fin k 0 ..^ j 0 = 0
160 159 olcs 0 ..^ j Fin k 0 ..^ j 0 = 0
161 158 160 ax-mp k 0 ..^ j 0 = 0
162 157 161 eqtrdi φ j 1 N k 0 ..^ j B = 0
163 162 oveq1d φ j 1 N k 0 ..^ j B + k = j M + N B = 0 + k = j M + N B
164 54 84 fsumcl φ j 1 N k = j M + N B
165 164 addid2d φ j 1 N 0 + k = j M + N B = k = j M + N B
166 156 163 165 3eqtrrd φ j 1 N k = j M + N B = k = 0 M + N B
167 124 166 eqtrd φ j 1 N k = 0 + j M + j B = k = 0 M + N B
168 29 167 eqtrd φ j 1 N i = 0 M A = k = 0 M + N B
169 168 sumeq2dv φ j = 1 N i = 0 M A = j = 1 N k = 0 M + N B
170 fzfid φ 0 M Fin
171 fzfid φ 1 N Fin
172 28 anasss φ j 1 N i 0 M A
173 172 ancom2s φ i 0 M j 1 N A
174 170 171 173 fsumcom φ i = 0 M j = 1 N A = j = 1 N i = 0 M A
175 147 171 154 fsumcom φ k = 0 M + N j = 1 N B = j = 1 N k = 0 M + N B
176 169 174 175 3eqtr4d φ i = 0 M j = 1 N A = k = 0 M + N j = 1 N B