Metamath Proof Explorer


Theorem sticksstones10

Description: Establish mapping between strictly monotone functions and functions that sum to a fixed non-negative integer. (Contributed by metakunt, 6-Oct-2024)

Ref Expression
Hypotheses sticksstones10.1 φ N 0
sticksstones10.2 φ K
sticksstones10.3 G = b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
sticksstones10.4 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
sticksstones10.5 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
Assertion sticksstones10 φ G : B A

Proof

Step Hyp Ref Expression
1 sticksstones10.1 φ N 0
2 sticksstones10.2 φ K
3 sticksstones10.3 G = b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
4 sticksstones10.4 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
5 sticksstones10.5 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
6 2 nnne0d φ K 0
7 6 adantr φ b B K 0
8 7 neneqd φ b B ¬ K = 0
9 8 iffalsed φ b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
10 9 eqcomd φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 = if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
11 eleq1 N + K - b K = if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 N + K - b K 0 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 0
12 eleq1 if k = 1 b 1 1 b k - b k 1 - 1 = if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 if k = 1 b 1 1 b k - b k 1 - 1 0 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 0
13 1 nn0zd φ N
14 13 adantr φ b B N
15 2 nnzd φ K
16 15 adantr φ b B K
17 14 16 zaddcld φ b B N + K
18 5 eleq2i b B b f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
19 vex b V
20 feq1 f = b f : 1 K 1 N + K b : 1 K 1 N + K
21 fveq1 f = b f x = b x
22 fveq1 f = b f y = b y
23 21 22 breq12d f = b f x < f y b x < b y
24 23 imbi2d f = b x < y f x < f y x < y b x < b y
25 24 2ralbidv f = b x 1 K y 1 K x < y f x < f y x 1 K y 1 K x < y b x < b y
26 20 25 anbi12d f = b f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y b : 1 K 1 N + K x 1 K y 1 K x < y b x < b y
27 19 26 elab b f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y b : 1 K 1 N + K x 1 K y 1 K x < y b x < b y
28 18 27 bitri b B b : 1 K 1 N + K x 1 K y 1 K x < y b x < b y
29 28 biimpi b B b : 1 K 1 N + K x 1 K y 1 K x < y b x < b y
30 29 adantl φ b B b : 1 K 1 N + K x 1 K y 1 K x < y b x < b y
31 30 simpld φ b B b : 1 K 1 N + K
32 1zzd φ b B 1
33 2 nnge1d φ 1 K
34 33 adantr φ b B 1 K
35 16 zred φ b B K
36 35 leidd φ b B K K
37 32 16 16 34 36 elfzd φ b B K 1 K
38 31 37 ffvelrnd φ b B b K 1 N + K
39 elfznn b K 1 N + K b K
40 38 39 syl φ b B b K
41 40 nnzd φ b B b K
42 17 41 zsubcld φ b B N + K - b K
43 40 nnred φ b B b K
44 43 recnd φ b B b K
45 44 addid1d φ b B b K + 0 = b K
46 elfzle2 b K 1 N + K b K N + K
47 38 46 syl φ b B b K N + K
48 45 47 eqbrtrd φ b B b K + 0 N + K
49 0red φ b B 0
50 17 zred φ b B N + K
51 43 49 50 leaddsub2d φ b B b K + 0 N + K 0 N + K - b K
52 48 51 mpbid φ b B 0 N + K - b K
53 42 52 jca φ b B N + K - b K 0 N + K - b K
54 elnn0z N + K - b K 0 N + K - b K 0 N + K - b K
55 53 54 sylibr φ b B N + K - b K 0
56 55 adantr φ b B k 1 K + 1 N + K - b K 0
57 56 3impa φ b B k 1 K + 1 N + K - b K 0
58 57 adantr φ b B k 1 K + 1 k = K + 1 N + K - b K 0
59 eleq1 b 1 1 = if k = 1 b 1 1 b k - b k 1 - 1 b 1 1 0 if k = 1 b 1 1 b k - b k 1 - 1 0
60 eleq1 b k - b k 1 - 1 = if k = 1 b 1 1 b k - b k 1 - 1 b k - b k 1 - 1 0 if k = 1 b 1 1 b k - b k 1 - 1 0
61 1red φ b B 1
62 61 leidd φ b B 1 1
63 32 16 32 62 34 elfzd φ b B 1 1 K
64 31 63 ffvelrnd φ b B b 1 1 N + K
65 elfznn b 1 1 N + K b 1
66 65 nnzd b 1 1 N + K b 1
67 64 66 syl φ b B b 1
68 67 32 zsubcld φ b B b 1 1
69 1cnd φ b B 1
70 69 addid1d φ b B 1 + 0 = 1
71 elfzle1 b 1 1 N + K 1 b 1
72 64 71 syl φ b B 1 b 1
73 70 72 eqbrtrd φ b B 1 + 0 b 1
74 67 zred φ b B b 1
75 61 49 74 leaddsub2d φ b B 1 + 0 b 1 0 b 1 1
76 73 75 mpbid φ b B 0 b 1 1
77 68 76 jca φ b B b 1 1 0 b 1 1
78 elnn0z b 1 1 0 b 1 1 0 b 1 1
79 77 78 sylibr φ b B b 1 1 0
80 79 adantr φ b B k 1 K + 1 b 1 1 0
81 80 3impa φ b B k 1 K + 1 b 1 1 0
82 81 adantr φ b B k 1 K + 1 ¬ k = K + 1 b 1 1 0
83 82 adantr φ b B k 1 K + 1 ¬ k = K + 1 k = 1 b 1 1 0
84 31 3adant3 φ b B k 1 K + 1 b : 1 K 1 N + K
85 84 adantr φ b B k 1 K + 1 ¬ k = K + 1 b : 1 K 1 N + K
86 1zzd φ b B k 1 K + 1 ¬ k = K + 1 1
87 16 3adant3 φ b B k 1 K + 1 K
88 87 adantr φ b B k 1 K + 1 ¬ k = K + 1 K
89 simp3 φ b B k 1 K + 1 k 1 K + 1
90 elfznn k 1 K + 1 k
91 89 90 syl φ b B k 1 K + 1 k
92 91 adantr φ b B k 1 K + 1 ¬ k = K + 1 k
93 92 nnzd φ b B k 1 K + 1 ¬ k = K + 1 k
94 92 nnge1d φ b B k 1 K + 1 ¬ k = K + 1 1 k
95 elfzle2 k 1 K + 1 k K + 1
96 89 95 syl φ b B k 1 K + 1 k K + 1
97 96 adantr φ b B k 1 K + 1 ¬ k = K + 1 k K + 1
98 neqne ¬ k = K + 1 k K + 1
99 98 adantl φ b B k 1 K + 1 ¬ k = K + 1 k K + 1
100 99 necomd φ b B k 1 K + 1 ¬ k = K + 1 K + 1 k
101 97 100 jca φ b B k 1 K + 1 ¬ k = K + 1 k K + 1 K + 1 k
102 92 nnred φ b B k 1 K + 1 ¬ k = K + 1 k
103 88 zred φ b B k 1 K + 1 ¬ k = K + 1 K
104 1red φ b B k 1 K + 1 ¬ k = K + 1 1
105 103 104 readdcld φ b B k 1 K + 1 ¬ k = K + 1 K + 1
106 102 105 ltlend φ b B k 1 K + 1 ¬ k = K + 1 k < K + 1 k K + 1 K + 1 k
107 101 106 mpbird φ b B k 1 K + 1 ¬ k = K + 1 k < K + 1
108 91 nnzd φ b B k 1 K + 1 k
109 zleltp1 k K k K k < K + 1
110 108 87 109 syl2anc φ b B k 1 K + 1 k K k < K + 1
111 110 adantr φ b B k 1 K + 1 ¬ k = K + 1 k K k < K + 1
112 107 111 mpbird φ b B k 1 K + 1 ¬ k = K + 1 k K
113 86 88 93 94 112 elfzd φ b B k 1 K + 1 ¬ k = K + 1 k 1 K
114 85 113 ffvelrnd φ b B k 1 K + 1 ¬ k = K + 1 b k 1 N + K
115 elfznn b k 1 N + K b k
116 114 115 syl φ b B k 1 K + 1 ¬ k = K + 1 b k
117 116 nnzd φ b B k 1 K + 1 ¬ k = K + 1 b k
118 117 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k
119 85 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b : 1 K 1 N + K
120 1zzd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1
121 88 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 K
122 93 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k
123 122 120 zsubcld φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1
124 94 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k
125 neqne ¬ k = 1 k 1
126 125 adantl φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1
127 124 126 jca φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k k 1
128 104 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1
129 102 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k
130 128 129 ltlend φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 < k 1 k k 1
131 127 130 mpbird φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 < k
132 120 122 zltlem1d φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 < k 1 k 1
133 131 132 mpbid φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k 1
134 91 nnred φ b B k 1 K + 1 k
135 61 3adant3 φ b B k 1 K + 1 1
136 35 3adant3 φ b B k 1 K + 1 K
137 lesubadd k 1 K k 1 K k K + 1
138 134 135 136 137 syl3anc φ b B k 1 K + 1 k 1 K k K + 1
139 96 138 mpbird φ b B k 1 K + 1 k 1 K
140 139 adantr φ b B k 1 K + 1 ¬ k = K + 1 k 1 K
141 140 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 K
142 120 121 123 133 141 elfzd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 1 K
143 119 142 ffvelrnd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1 1 N + K
144 elfznn b k 1 1 N + K b k 1
145 143 144 syl φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1
146 145 nnzd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1
147 118 146 zsubcld φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k b k 1
148 147 120 zsubcld φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k - b k 1 - 1
149 0p1e1 0 + 1 = 1
150 149 a1i φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0 + 1 = 1
151 1cnd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1
152 151 subidd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 1 = 0
153 146 zred φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1
154 153 recnd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1
155 154 addid1d φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1 + 0 = b k 1
156 129 ltm1d φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 < k
157 113 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 K
158 142 157 jca φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 1 K k 1 K
159 30 simprd φ b B x 1 K y 1 K x < y b x < b y
160 159 3adant3 φ b B k 1 K + 1 x 1 K y 1 K x < y b x < b y
161 160 adantr φ b B k 1 K + 1 ¬ k = K + 1 x 1 K y 1 K x < y b x < b y
162 161 adantr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 x 1 K y 1 K x < y b x < b y
163 breq1 x = k 1 x < y k 1 < y
164 fveq2 x = k 1 b x = b k 1
165 164 breq1d x = k 1 b x < b y b k 1 < b y
166 163 165 imbi12d x = k 1 x < y b x < b y k 1 < y b k 1 < b y
167 breq2 y = k k 1 < y k 1 < k
168 fveq2 y = k b y = b k
169 168 breq2d y = k b k 1 < b y b k 1 < b k
170 167 169 imbi12d y = k k 1 < y b k 1 < b y k 1 < k b k 1 < b k
171 166 170 rspc2va k 1 1 K k 1 K x 1 K y 1 K x < y b x < b y k 1 < k b k 1 < b k
172 158 162 171 syl2anc φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 < k b k 1 < b k
173 156 172 mpd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1 < b k
174 155 173 eqbrtrd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1 + 0 < b k
175 0red φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0
176 118 zred φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k
177 153 175 176 ltaddsub2d φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k 1 + 0 < b k 0 < b k b k 1
178 174 177 mpbid φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0 < b k b k 1
179 152 178 eqbrtrd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 1 < b k b k 1
180 zlem1lt 1 b k b k 1 1 b k b k 1 1 1 < b k b k 1
181 120 147 180 syl2anc φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 b k b k 1 1 1 < b k b k 1
182 179 181 mpbird φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 b k b k 1
183 150 182 eqbrtrd φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0 + 1 b k b k 1
184 147 zred φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k b k 1
185 leaddsub 0 1 b k b k 1 0 + 1 b k b k 1 0 b k - b k 1 - 1
186 175 128 184 185 syl3anc φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0 + 1 b k b k 1 0 b k - b k 1 - 1
187 183 186 mpbid φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 0 b k - b k 1 - 1
188 148 187 jca φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k - b k 1 - 1 0 b k - b k 1 - 1
189 elnn0z b k - b k 1 - 1 0 b k - b k 1 - 1 0 b k - b k 1 - 1
190 188 189 sylibr φ b B k 1 K + 1 ¬ k = K + 1 ¬ k = 1 b k - b k 1 - 1 0
191 59 60 83 190 ifbothda φ b B k 1 K + 1 ¬ k = K + 1 if k = 1 b 1 1 b k - b k 1 - 1 0
192 11 12 58 191 ifbothda φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 0
193 192 3expa φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 0
194 193 fmpttd φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 : 1 K + 1 0
195 eqidd φ b B i 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
196 simpr φ b B i 1 K + 1 k = i k = i
197 196 eqeq1d φ b B i 1 K + 1 k = i k = K + 1 i = K + 1
198 196 eqeq1d φ b B i 1 K + 1 k = i k = 1 i = 1
199 196 fveq2d φ b B i 1 K + 1 k = i b k = b i
200 196 fvoveq1d φ b B i 1 K + 1 k = i b k 1 = b i 1
201 199 200 oveq12d φ b B i 1 K + 1 k = i b k b k 1 = b i b i 1
202 201 oveq1d φ b B i 1 K + 1 k = i b k - b k 1 - 1 = b i - b i 1 - 1
203 198 202 ifbieq2d φ b B i 1 K + 1 k = i if k = 1 b 1 1 b k - b k 1 - 1 = if i = 1 b 1 1 b i - b i 1 - 1
204 197 203 ifbieq2d φ b B i 1 K + 1 k = i if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 = if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
205 simpr φ b B i 1 K + 1 i 1 K + 1
206 ovexd φ b B i 1 K + 1 N + K - b K V
207 ovexd φ b B i 1 K + 1 b 1 1 V
208 ovexd φ b B i 1 K + 1 b i - b i 1 - 1 V
209 207 208 ifcld φ b B i 1 K + 1 if i = 1 b 1 1 b i - b i 1 - 1 V
210 206 209 ifcld φ b B i 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 V
211 195 204 205 210 fvmptd φ b B i 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
212 211 sumeq2dv φ b B i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = i = 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
213 2 adantr φ b B K
214 nnuz = 1
215 213 214 eleqtrdi φ b B K 1
216 eleq1 N + K - b K = if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 N + K - b K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
217 eleq1 if i = 1 b 1 1 b i - b i 1 - 1 = if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 if i = 1 b 1 1 b i - b i 1 - 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
218 14 3adant3 φ b B i 1 K + 1 N
219 218 adantr φ b B i 1 K + 1 i = K + 1 N
220 16 3adant3 φ b B i 1 K + 1 K
221 220 adantr φ b B i 1 K + 1 i = K + 1 K
222 219 221 zaddcld φ b B i 1 K + 1 i = K + 1 N + K
223 40 3adant3 φ b B i 1 K + 1 b K
224 223 adantr φ b B i 1 K + 1 i = K + 1 b K
225 224 nnzd φ b B i 1 K + 1 i = K + 1 b K
226 222 225 zsubcld φ b B i 1 K + 1 i = K + 1 N + K - b K
227 eleq1 b 1 1 = if i = 1 b 1 1 b i - b i 1 - 1 b 1 1 if i = 1 b 1 1 b i - b i 1 - 1
228 eleq1 b i - b i 1 - 1 = if i = 1 b 1 1 b i - b i 1 - 1 b i - b i 1 - 1 if i = 1 b 1 1 b i - b i 1 - 1
229 67 3adant3 φ b B i 1 K + 1 b 1
230 229 adantr φ b B i 1 K + 1 ¬ i = K + 1 b 1
231 230 adantr φ b B i 1 K + 1 ¬ i = K + 1 i = 1 b 1
232 1zzd φ b B i 1 K + 1 ¬ i = K + 1 i = 1 1
233 231 232 zsubcld φ b B i 1 K + 1 ¬ i = K + 1 i = 1 b 1 1
234 31 3adant3 φ b B i 1 K + 1 b : 1 K 1 N + K
235 234 adantr φ b B i 1 K + 1 ¬ i = K + 1 b : 1 K 1 N + K
236 235 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b : 1 K 1 N + K
237 1zzd φ b B i 1 K + 1 ¬ i = K + 1 1
238 220 adantr φ b B i 1 K + 1 ¬ i = K + 1 K
239 elfznn i 1 K + 1 i
240 239 adantl φ b B i 1 K + 1 i
241 240 3impa φ b B i 1 K + 1 i
242 241 nnzd φ b B i 1 K + 1 i
243 242 adantr φ b B i 1 K + 1 ¬ i = K + 1 i
244 241 nnge1d φ b B i 1 K + 1 1 i
245 244 adantr φ b B i 1 K + 1 ¬ i = K + 1 1 i
246 simp3 φ b B i 1 K + 1 i 1 K + 1
247 elfzle2 i 1 K + 1 i K + 1
248 246 247 syl φ b B i 1 K + 1 i K + 1
249 248 adantr φ b B i 1 K + 1 ¬ i = K + 1 i K + 1
250 neqne ¬ i = K + 1 i K + 1
251 250 adantl φ b B i 1 K + 1 ¬ i = K + 1 i K + 1
252 251 necomd φ b B i 1 K + 1 ¬ i = K + 1 K + 1 i
253 249 252 jca φ b B i 1 K + 1 ¬ i = K + 1 i K + 1 K + 1 i
254 243 zred φ b B i 1 K + 1 ¬ i = K + 1 i
255 238 zred φ b B i 1 K + 1 ¬ i = K + 1 K
256 1red φ b B i 1 K + 1 ¬ i = K + 1 1
257 255 256 readdcld φ b B i 1 K + 1 ¬ i = K + 1 K + 1
258 254 257 ltlend φ b B i 1 K + 1 ¬ i = K + 1 i < K + 1 i K + 1 K + 1 i
259 253 258 mpbird φ b B i 1 K + 1 ¬ i = K + 1 i < K + 1
260 zleltp1 i K i K i < K + 1
261 243 238 260 syl2anc φ b B i 1 K + 1 ¬ i = K + 1 i K i < K + 1
262 259 261 mpbird φ b B i 1 K + 1 ¬ i = K + 1 i K
263 237 238 243 245 262 elfzd φ b B i 1 K + 1 ¬ i = K + 1 i 1 K
264 263 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1 K
265 236 264 ffvelrnd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i 1 N + K
266 elfznn b i 1 N + K b i
267 265 266 syl φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i
268 267 nnzd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i
269 1zzd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1
270 238 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 K
271 243 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i
272 271 269 zsubcld φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1
273 245 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 i
274 neqne ¬ i = 1 i 1
275 274 adantl φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1
276 273 275 jca φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 i i 1
277 1red φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1
278 271 zred φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i
279 277 278 ltlend φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 < i 1 i i 1
280 276 279 mpbird φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 < i
281 zltp1le 1 i 1 < i 1 + 1 i
282 269 271 281 syl2anc φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 < i 1 + 1 i
283 280 282 mpbid φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 + 1 i
284 leaddsub 1 1 i 1 + 1 i 1 i 1
285 277 277 278 284 syl3anc φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 + 1 i 1 i 1
286 283 285 mpbid φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 1 i 1
287 249 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i K + 1
288 255 adantr φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 K
289 lesubadd i 1 K i 1 K i K + 1
290 278 277 288 289 syl3anc φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1 K i K + 1
291 287 290 mpbird φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1 K
292 269 270 272 286 291 elfzd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 i 1 1 K
293 236 292 ffvelrnd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i 1 1 N + K
294 elfznn b i 1 1 N + K b i 1
295 293 294 syl φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i 1
296 295 nnzd φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i 1
297 268 296 zsubcld φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i b i 1
298 297 269 zsubcld φ b B i 1 K + 1 ¬ i = K + 1 ¬ i = 1 b i - b i 1 - 1
299 227 228 233 298 ifbothda φ b B i 1 K + 1 ¬ i = K + 1 if i = 1 b 1 1 b i - b i 1 - 1
300 216 217 226 299 ifbothda φ b B i 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
301 300 3expa φ b B i 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
302 301 zcnd φ b B i 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1
303 eqeq1 i = K + 1 i = K + 1 K + 1 = K + 1
304 eqeq1 i = K + 1 i = 1 K + 1 = 1
305 fveq2 i = K + 1 b i = b K + 1
306 fvoveq1 i = K + 1 b i 1 = b K + 1 - 1
307 305 306 oveq12d i = K + 1 b i b i 1 = b K + 1 b K + 1 - 1
308 307 oveq1d i = K + 1 b i - b i 1 - 1 = b K + 1 - b K + 1 - 1 - 1
309 304 308 ifbieq2d i = K + 1 if i = 1 b 1 1 b i - b i 1 - 1 = if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1
310 303 309 ifbieq2d i = K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 = if K + 1 = K + 1 N + K - b K if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1
311 215 302 310 fsump1 φ b B i = 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 = i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + if K + 1 = K + 1 N + K - b K if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1
312 eqidd φ b B K + 1 = K + 1
313 312 iftrued φ b B if K + 1 = K + 1 N + K - b K if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1 = N + K - b K
314 313 oveq2d φ b B i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + if K + 1 = K + 1 N + K - b K if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1 = i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K
315 elfznn i 1 K i
316 315 adantl φ b B i 1 K i
317 316 nnred φ b B i 1 K i
318 35 adantr φ b B i 1 K K
319 1red φ b B i 1 K 1
320 318 319 readdcld φ b B i 1 K K + 1
321 elfzle2 i 1 K i K
322 321 adantl φ b B i 1 K i K
323 318 ltp1d φ b B i 1 K K < K + 1
324 317 318 320 322 323 lelttrd φ b B i 1 K i < K + 1
325 317 324 ltned φ b B i 1 K i K + 1
326 325 neneqd φ b B i 1 K ¬ i = K + 1
327 326 iffalsed φ b B i 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 = if i = 1 b 1 1 b i - b i 1 - 1
328 327 sumeq2dv φ b B i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 = i = 1 K if i = 1 b 1 1 b i - b i 1 - 1
329 328 oveq1d φ b B i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K = i = 1 K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K
330 eqeq1 b 1 1 = if i = 1 b 1 1 b i - b i 1 - 1 b 1 1 = if i = 1 b 1 b i b i 1 1 if i = 1 b 1 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1
331 eqeq1 b i - b i 1 - 1 = if i = 1 b 1 1 b i - b i 1 - 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1 if i = 1 b 1 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1
332 eqidd φ b B i 1 K i = 1 b 1 1 = b 1 1
333 simpr φ b B i 1 K i = 1 i = 1
334 333 iftrued φ b B i 1 K i = 1 if i = 1 b 1 b i b i 1 = b 1
335 334 eqcomd φ b B i 1 K i = 1 b 1 = if i = 1 b 1 b i b i 1
336 335 oveq1d φ b B i 1 K i = 1 b 1 1 = if i = 1 b 1 b i b i 1 1
337 332 336 eqtrd φ b B i 1 K i = 1 b 1 1 = if i = 1 b 1 b i b i 1 1
338 eqidd φ b B i 1 K ¬ i = 1 b i - b i 1 - 1 = b i - b i 1 - 1
339 simpr φ b B i 1 K ¬ i = 1 ¬ i = 1
340 339 iffalsed φ b B i 1 K ¬ i = 1 if i = 1 b 1 b i b i 1 = b i b i 1
341 340 oveq1d φ b B i 1 K ¬ i = 1 if i = 1 b 1 b i b i 1 1 = b i - b i 1 - 1
342 341 eqcomd φ b B i 1 K ¬ i = 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1
343 338 342 eqtrd φ b B i 1 K ¬ i = 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1
344 330 331 337 343 ifbothda φ b B i 1 K if i = 1 b 1 1 b i - b i 1 - 1 = if i = 1 b 1 b i b i 1 1
345 344 sumeq2dv φ b B i = 1 K if i = 1 b 1 1 b i - b i 1 - 1 = i = 1 K if i = 1 b 1 b i b i 1 1
346 345 oveq1d φ b B i = 1 K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K = i = 1 K if i = 1 b 1 b i b i 1 1 + N + K - b K
347 fzfid φ b B 1 K Fin
348 eleq1 b 1 = if i = 1 b 1 b i b i 1 b 1 if i = 1 b 1 b i b i 1
349 eleq1 b i b i 1 = if i = 1 b 1 b i b i 1 b i b i 1 if i = 1 b 1 b i b i 1
350 67 ad2antrr φ b B i 1 K i = 1 b 1
351 31 adantr φ b B i 1 K b : 1 K 1 N + K
352 simpr φ b B i 1 K i 1 K
353 351 352 ffvelrnd φ b B i 1 K b i 1 N + K
354 266 nnzd b i 1 N + K b i
355 353 354 syl φ b B i 1 K b i
356 355 adantr φ b B i 1 K ¬ i = 1 b i
357 351 adantr φ b B i 1 K ¬ i = 1 b : 1 K 1 N + K
358 1zzd φ b B i 1 K ¬ i = 1 1
359 16 ad2antrr φ b B i 1 K ¬ i = 1 K
360 316 nnzd φ b B i 1 K i
361 360 adantr φ b B i 1 K ¬ i = 1 i
362 361 358 zsubcld φ b B i 1 K ¬ i = 1 i 1
363 316 nnge1d φ b B i 1 K 1 i
364 363 adantr φ b B i 1 K ¬ i = 1 1 i
365 339 274 syl φ b B i 1 K ¬ i = 1 i 1
366 364 365 jca φ b B i 1 K ¬ i = 1 1 i i 1
367 319 adantr φ b B i 1 K ¬ i = 1 1
368 317 adantr φ b B i 1 K ¬ i = 1 i
369 367 368 ltlend φ b B i 1 K ¬ i = 1 1 < i 1 i i 1
370 366 369 mpbird φ b B i 1 K ¬ i = 1 1 < i
371 zltlem1 1 i 1 < i 1 i 1
372 358 361 371 syl2anc φ b B i 1 K ¬ i = 1 1 < i 1 i 1
373 370 372 mpbid φ b B i 1 K ¬ i = 1 1 i 1
374 317 319 resubcld φ b B i 1 K i 1
375 317 lem1d φ b B i 1 K i 1 i
376 374 317 318 375 322 letrd φ b B i 1 K i 1 K
377 376 adantr φ b B i 1 K ¬ i = 1 i 1 K
378 358 359 362 373 377 elfzd φ b B i 1 K ¬ i = 1 i 1 1 K
379 357 378 ffvelrnd φ b B i 1 K ¬ i = 1 b i 1 1 N + K
380 379 294 syl φ b B i 1 K ¬ i = 1 b i 1
381 380 nnzd φ b B i 1 K ¬ i = 1 b i 1
382 356 381 zsubcld φ b B i 1 K ¬ i = 1 b i b i 1
383 348 349 350 382 ifbothda φ b B i 1 K if i = 1 b 1 b i b i 1
384 383 zcnd φ b B i 1 K if i = 1 b 1 b i b i 1
385 69 adantr φ b B i 1 K 1
386 347 384 385 fsumsub φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = i = 1 K if i = 1 b 1 b i b i 1 i = 1 K 1
387 id i = 1 i = 1
388 387 iftrued i = 1 if i = 1 b 1 b i b i 1 = b 1
389 215 384 388 fsum1p φ b B i = 1 K if i = 1 b 1 b i b i 1 = b 1 + i = 1 + 1 K if i = 1 b 1 b i b i 1
390 61 adantr φ b B i 1 + 1 K 1
391 elfzle1 i 1 + 1 K 1 + 1 i
392 391 adantl φ b B i 1 + 1 K 1 + 1 i
393 32 adantr φ b B i 1 + 1 K 1
394 elfzelz i 1 + 1 K i
395 394 adantl φ b B i 1 + 1 K i
396 393 395 281 syl2anc φ b B i 1 + 1 K 1 < i 1 + 1 i
397 392 396 mpbird φ b B i 1 + 1 K 1 < i
398 390 397 ltned φ b B i 1 + 1 K 1 i
399 398 necomd φ b B i 1 + 1 K i 1
400 399 neneqd φ b B i 1 + 1 K ¬ i = 1
401 400 iffalsed φ b B i 1 + 1 K if i = 1 b 1 b i b i 1 = b i b i 1
402 401 sumeq2dv φ b B i = 1 + 1 K if i = 1 b 1 b i b i 1 = i = 1 + 1 K b i b i 1
403 402 oveq2d φ b B b 1 + i = 1 + 1 K if i = 1 b 1 b i b i 1 = b 1 + i = 1 + 1 K b i b i 1
404 35 recnd φ b B K
405 404 69 npcand φ b B K - 1 + 1 = K
406 405 eqcomd φ b B K = K - 1 + 1
407 406 oveq2d φ b B 1 + 1 K = 1 + 1 K - 1 + 1
408 407 sumeq1d φ b B i = 1 + 1 K b i b i 1 = i = 1 + 1 K - 1 + 1 b i b i 1
409 408 oveq2d φ b B b 1 + i = 1 + 1 K b i b i 1 = b 1 + i = 1 + 1 K - 1 + 1 b i b i 1
410 elfzelz i 1 + 1 K - 1 + 1 i
411 410 adantl φ b B i 1 + 1 K - 1 + 1 i
412 411 zcnd φ b B i 1 + 1 K - 1 + 1 i
413 1cnd φ b B i 1 + 1 K - 1 + 1 1
414 412 413 npcand φ b B i 1 + 1 K - 1 + 1 i - 1 + 1 = i
415 414 eqcomd φ b B i 1 + 1 K - 1 + 1 i = i - 1 + 1
416 415 fveq2d φ b B i 1 + 1 K - 1 + 1 b i = b i - 1 + 1
417 eqidd φ b B i 1 + 1 K - 1 + 1 b i 1 = b i 1
418 416 417 oveq12d φ b B i 1 + 1 K - 1 + 1 b i b i 1 = b i - 1 + 1 b i 1
419 418 sumeq2dv φ b B i = 1 + 1 K - 1 + 1 b i b i 1 = i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1
420 419 oveq2d φ b B b 1 + i = 1 + 1 K - 1 + 1 b i b i 1 = b 1 + i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1
421 16 32 zsubcld φ b B K 1
422 31 adantr φ b B s 1 K 1 b : 1 K 1 N + K
423 1zzd φ b B s 1 K 1 1
424 16 adantr φ b B s 1 K 1 K
425 elfznn s 1 K 1 s
426 425 adantl φ b B s 1 K 1 s
427 426 nnzd φ b B s 1 K 1 s
428 427 peano2zd φ b B s 1 K 1 s + 1
429 1red φ b B s 1 K 1 1
430 426 nnred φ b B s 1 K 1 s
431 430 429 readdcld φ b B s 1 K 1 s + 1
432 426 nnge1d φ b B s 1 K 1 1 s
433 430 lep1d φ b B s 1 K 1 s s + 1
434 429 430 431 432 433 letrd φ b B s 1 K 1 1 s + 1
435 elfzle2 s 1 K 1 s K 1
436 435 adantl φ b B s 1 K 1 s K 1
437 35 adantr φ b B s 1 K 1 K
438 leaddsub s 1 K s + 1 K s K 1
439 430 429 437 438 syl3anc φ b B s 1 K 1 s + 1 K s K 1
440 436 439 mpbird φ b B s 1 K 1 s + 1 K
441 423 424 428 434 440 elfzd φ b B s 1 K 1 s + 1 1 K
442 422 441 ffvelrnd φ b B s 1 K 1 b s + 1 1 N + K
443 elfznn b s + 1 1 N + K b s + 1
444 442 443 syl φ b B s 1 K 1 b s + 1
445 444 nnzd φ b B s 1 K 1 b s + 1
446 437 429 resubcld φ b B s 1 K 1 K 1
447 437 lem1d φ b B s 1 K 1 K 1 K
448 430 446 437 436 447 letrd φ b B s 1 K 1 s K
449 423 424 427 432 448 elfzd φ b B s 1 K 1 s 1 K
450 422 449 ffvelrnd φ b B s 1 K 1 b s 1 N + K
451 elfznn b s 1 N + K b s
452 451 nnzd b s 1 N + K b s
453 450 452 syl φ b B s 1 K 1 b s
454 445 453 zsubcld φ b B s 1 K 1 b s + 1 b s
455 454 zcnd φ b B s 1 K 1 b s + 1 b s
456 fvoveq1 s = i 1 b s + 1 = b i - 1 + 1
457 fveq2 s = i 1 b s = b i 1
458 456 457 oveq12d s = i 1 b s + 1 b s = b i - 1 + 1 b i 1
459 32 32 421 455 458 fsumshft φ b B s = 1 K 1 b s + 1 b s = i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1
460 459 oveq2d φ b B b 1 + s = 1 K 1 b s + 1 b s = b 1 + i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1
461 460 eqcomd φ b B b 1 + i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1 = b 1 + s = 1 K 1 b s + 1 b s
462 fvoveq1 s = i b s + 1 = b i + 1
463 fveq2 s = i b s = b i
464 462 463 oveq12d s = i b s + 1 b s = b i + 1 b i
465 nfcv _ i 1 K 1
466 nfcv _ s 1 K 1
467 nfcv _ i b s + 1 b s
468 nfcv _ s b i + 1 b i
469 464 465 466 467 468 cbvsum s = 1 K 1 b s + 1 b s = i = 1 K 1 b i + 1 b i
470 469 a1i φ b B s = 1 K 1 b s + 1 b s = i = 1 K 1 b i + 1 b i
471 470 oveq2d φ b B b 1 + s = 1 K 1 b s + 1 b s = b 1 + i = 1 K 1 b i + 1 b i
472 fveq2 w = i b w = b i
473 fveq2 w = i + 1 b w = b i + 1
474 fveq2 w = 1 b w = b 1
475 fveq2 w = K - 1 + 1 b w = b K - 1 + 1
476 405 215 eqeltrd φ b B K - 1 + 1 1
477 31 adantr φ b B w 1 K - 1 + 1 b : 1 K 1 N + K
478 1zzd φ b B w 1 K - 1 + 1 1
479 16 adantr φ b B w 1 K - 1 + 1 K
480 elfzelz w 1 K - 1 + 1 w
481 480 adantl φ b B w 1 K - 1 + 1 w
482 elfzle1 w 1 K - 1 + 1 1 w
483 482 adantl φ b B w 1 K - 1 + 1 1 w
484 elfzle2 w 1 K - 1 + 1 w K - 1 + 1
485 484 adantl φ b B w 1 K - 1 + 1 w K - 1 + 1
486 405 adantr φ b B w 1 K - 1 + 1 K - 1 + 1 = K
487 485 486 breqtrd φ b B w 1 K - 1 + 1 w K
488 478 479 481 483 487 elfzd φ b B w 1 K - 1 + 1 w 1 K
489 477 488 ffvelrnd φ b B w 1 K - 1 + 1 b w 1 N + K
490 elfznn b w 1 N + K b w
491 490 nncnd b w 1 N + K b w
492 489 491 syl φ b B w 1 K - 1 + 1 b w
493 472 473 474 475 421 476 492 telfsum2 φ b B i = 1 K 1 b i + 1 b i = b K - 1 + 1 b 1
494 493 oveq2d φ b B b 1 + i = 1 K 1 b i + 1 b i = b 1 + b K - 1 + 1 - b 1
495 74 recnd φ b B b 1
496 40 nncnd φ b B b K
497 405 fveq2d φ b B b K - 1 + 1 = b K
498 497 eleq1d φ b B b K - 1 + 1 b K
499 496 498 mpbird φ b B b K - 1 + 1
500 495 499 pncan3d φ b B b 1 + b K - 1 + 1 - b 1 = b K - 1 + 1
501 500 497 eqtrd φ b B b 1 + b K - 1 + 1 - b 1 = b K
502 494 501 eqtrd φ b B b 1 + i = 1 K 1 b i + 1 b i = b K
503 471 502 eqtrd φ b B b 1 + s = 1 K 1 b s + 1 b s = b K
504 461 503 eqtrd φ b B b 1 + i = 1 + 1 K - 1 + 1 b i - 1 + 1 b i 1 = b K
505 420 504 eqtrd φ b B b 1 + i = 1 + 1 K - 1 + 1 b i b i 1 = b K
506 409 505 eqtrd φ b B b 1 + i = 1 + 1 K b i b i 1 = b K
507 403 506 eqtrd φ b B b 1 + i = 1 + 1 K if i = 1 b 1 b i b i 1 = b K
508 389 507 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 = b K
509 fsumconst 1 K Fin 1 i = 1 K 1 = 1 K 1
510 347 69 509 syl2anc φ b B i = 1 K 1 = 1 K 1
511 213 nnnn0d φ b B K 0
512 hashfz1 K 0 1 K = K
513 511 512 syl φ b B 1 K = K
514 513 oveq1d φ b B 1 K 1 = K 1
515 404 mulid1d φ b B K 1 = K
516 514 515 eqtrd φ b B 1 K 1 = K
517 510 516 eqtrd φ b B i = 1 K 1 = K
518 508 517 oveq12d φ b B i = 1 K if i = 1 b 1 b i b i 1 i = 1 K 1 = b K K
519 386 518 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = b K K
520 44 addid2d φ b B 0 + b K = b K
521 520 eqcomd φ b B b K = 0 + b K
522 521 oveq1d φ b B b K K = 0 + b K - K
523 519 522 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = 0 + b K - K
524 0cnd φ b B 0
525 524 404 44 subsub3d φ b B 0 K b K = 0 + b K - K
526 525 eqcomd φ b B 0 + b K - K = 0 K b K
527 523 526 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = 0 K b K
528 14 zcnd φ b B N
529 528 subidd φ b B N N = 0
530 529 eqcomd φ b B 0 = N N
531 530 oveq1d φ b B 0 K b K = N - N - K b K
532 527 531 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = N - N - K b K
533 404 44 subcld φ b B K b K
534 528 528 533 subsub4d φ b B N - N - K b K = N N + K - b K
535 532 534 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = N N + K - b K
536 528 404 44 addsubassd φ b B N + K - b K = N + K - b K
537 536 eqcomd φ b B N + K - b K = N + K - b K
538 537 oveq2d φ b B N N + K - b K = N N + K - b K
539 535 538 eqtrd φ b B i = 1 K if i = 1 b 1 b i b i 1 1 = N N + K - b K
540 1zzd φ b B i 1 K 1
541 383 540 zsubcld φ b B i 1 K if i = 1 b 1 b i b i 1 1
542 347 541 fsumzcl φ b B i = 1 K if i = 1 b 1 b i b i 1 1
543 542 zcnd φ b B i = 1 K if i = 1 b 1 b i b i 1 1
544 55 nn0cnd φ b B N + K - b K
545 543 544 528 addlsub φ b B i = 1 K if i = 1 b 1 b i b i 1 1 + N + K - b K = N i = 1 K if i = 1 b 1 b i b i 1 1 = N N + K - b K
546 539 545 mpbird φ b B i = 1 K if i = 1 b 1 b i b i 1 1 + N + K - b K = N
547 346 546 eqtrd φ b B i = 1 K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K = N
548 329 547 eqtrd φ b B i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + N + K - b K = N
549 314 548 eqtrd φ b B i = 1 K if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 + if K + 1 = K + 1 N + K - b K if K + 1 = 1 b 1 1 b K + 1 - b K + 1 - 1 - 1 = N
550 311 549 eqtrd φ b B i = 1 K + 1 if i = K + 1 N + K - b K if i = 1 b 1 1 b i - b i 1 - 1 = N
551 212 550 eqtrd φ b B i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = N
552 194 551 jca φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 : 1 K + 1 0 i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = N
553 ovex 1 K + 1 V
554 553 mptex k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 V
555 feq1 g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 g : 1 K + 1 0 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 : 1 K + 1 0
556 simpl g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i 1 K + 1 g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1
557 556 fveq1d g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i 1 K + 1 g i = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i
558 557 sumeq2dv g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = 1 K + 1 g i = i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i
559 558 eqeq1d g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = 1 K + 1 g i = N i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = N
560 555 559 anbi12d g = k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 g : 1 K + 1 0 i = 1 K + 1 g i = N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 : 1 K + 1 0 i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = N
561 554 560 elab k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 g | g : 1 K + 1 0 i = 1 K + 1 g i = N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 : 1 K + 1 0 i = 1 K + 1 k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 i = N
562 552 561 sylibr φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 g | g : 1 K + 1 0 i = 1 K + 1 g i = N
563 4 a1i φ b B A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
564 562 563 eleqtrrd φ b B k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 A
565 10 564 eqeltrrd φ b B if K = 0 1 N k 1 K + 1 if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 A
566 565 3 fmptd φ G : B A