Metamath Proof Explorer


Theorem sticksstones12

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

Ref Expression
Hypotheses sticksstones12.1 φ N 0
sticksstones12.2 φ K
sticksstones12.3 F = a A j 1 K j + l = 1 j a l
sticksstones12.4 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
sticksstones12.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
sticksstones12.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
Assertion sticksstones12 φ F : A 1-1 onto B

Proof

Step Hyp Ref Expression
1 sticksstones12.1 φ N 0
2 sticksstones12.2 φ K
3 sticksstones12.3 F = a A j 1 K j + l = 1 j a l
4 sticksstones12.4 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
5 sticksstones12.5 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
6 sticksstones12.6 B = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
7 2 nnnn0d φ K 0
8 1 7 3 5 6 sticksstones8 φ F : A B
9 1 2 4 5 6 sticksstones10 φ G : B A
10 4 a1i φ 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
11 0red φ 0
12 2 nngt0d φ 0 < K
13 11 12 ltned φ 0 K
14 13 necomd φ K 0
15 14 neneqd φ ¬ K = 0
16 15 iffalsed φ 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
17 16 adantr φ 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
18 17 mpteq2dva φ 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 = 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
19 10 18 eqtrd φ G = 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
20 19 adantr φ c A G = 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
21 fveq1 b = F c b K = F c K
22 21 oveq2d b = F c N + K - b K = N + K - F c K
23 fveq1 b = F c b 1 = F c 1
24 23 oveq1d b = F c b 1 1 = F c 1 1
25 fveq1 b = F c b k = F c k
26 fveq1 b = F c b k 1 = F c k 1
27 25 26 oveq12d b = F c b k b k 1 = F c k F c k 1
28 27 oveq1d b = F c b k - b k 1 - 1 = F c k - F c k 1 - 1
29 24 28 ifeq12d b = F c if k = 1 b 1 1 b k - b k 1 - 1 = if k = 1 F c 1 1 F c k - F c k 1 - 1
30 22 29 ifeq12d b = F c if k = K + 1 N + K - b K if k = 1 b 1 1 b k - b k 1 - 1 = if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1
31 30 adantr b = F c 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 = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1
32 31 mpteq2dva b = F c 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 - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1
33 32 adantl φ c A b = F c 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 - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1
34 8 ffvelrnda φ c A F c B
35 fzfid φ c A 1 K + 1 Fin
36 35 mptexd φ c A k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1 V
37 20 33 34 36 fvmptd φ c A G F c = k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1
38 3 a1i φ c A F = a A j 1 K j + l = 1 j a l
39 simpllr φ c A a = c j 1 K l 1 j a = c
40 39 fveq1d φ c A a = c j 1 K l 1 j a l = c l
41 40 sumeq2dv φ c A a = c j 1 K l = 1 j a l = l = 1 j c l
42 41 oveq2d φ c A a = c j 1 K j + l = 1 j a l = j + l = 1 j c l
43 42 mpteq2dva φ c A a = c j 1 K j + l = 1 j a l = j 1 K j + l = 1 j c l
44 simpr φ c A c A
45 fzfid φ c A 1 K Fin
46 45 mptexd φ c A j 1 K j + l = 1 j c l V
47 38 43 44 46 fvmptd φ c A F c = j 1 K j + l = 1 j c l
48 simpr φ c A j = K j = K
49 48 oveq2d φ c A j = K 1 j = 1 K
50 49 sumeq1d φ c A j = K l = 1 j c l = l = 1 K c l
51 48 50 oveq12d φ c A j = K j + l = 1 j c l = K + l = 1 K c l
52 1zzd φ 1
53 7 nn0zd φ K
54 2 nnge1d φ 1 K
55 2 nnred φ K
56 55 leidd φ K K
57 52 53 53 54 56 elfzd φ K 1 K
58 57 adantr φ c A K 1 K
59 ovexd φ c A K + l = 1 K c l V
60 47 51 58 59 fvmptd φ c A F c K = K + l = 1 K c l
61 60 oveq2d φ c A N + K - F c K = N + K - K + l = 1 K c l
62 1 nn0cnd φ N
63 62 adantr φ c A N
64 55 recnd φ K
65 64 adantr φ c A K
66 63 65 addcomd φ c A N + K = K + N
67 66 oveq1d φ c A N + K - K + l = 1 K c l = K + N - K + l = 1 K c l
68 1zzd φ c A l 1 K 1
69 53 ad2antrr φ c A l 1 K K
70 69 peano2zd φ c A l 1 K K + 1
71 elfzelz l 1 K l
72 71 adantl φ c A l 1 K l
73 elfzle1 l 1 K 1 l
74 73 adantl φ c A l 1 K 1 l
75 72 zred φ c A l 1 K l
76 55 ad2antrr φ c A l 1 K K
77 70 zred φ c A l 1 K K + 1
78 elfzle2 l 1 K l K
79 78 adantl φ c A l 1 K l K
80 76 lep1d φ c A l 1 K K K + 1
81 75 76 77 79 80 letrd φ c A l 1 K l K + 1
82 68 70 72 74 81 elfzd φ c A l 1 K l 1 K + 1
83 5 eleq2i c A c g | g : 1 K + 1 0 i = 1 K + 1 g i = N
84 83 biimpi c A c g | g : 1 K + 1 0 i = 1 K + 1 g i = N
85 84 adantl φ c A c g | g : 1 K + 1 0 i = 1 K + 1 g i = N
86 vex c V
87 feq1 g = c g : 1 K + 1 0 c : 1 K + 1 0
88 simpl g = c i 1 K + 1 g = c
89 88 fveq1d g = c i 1 K + 1 g i = c i
90 89 sumeq2dv g = c i = 1 K + 1 g i = i = 1 K + 1 c i
91 90 eqeq1d g = c i = 1 K + 1 g i = N i = 1 K + 1 c i = N
92 87 91 anbi12d g = c g : 1 K + 1 0 i = 1 K + 1 g i = N c : 1 K + 1 0 i = 1 K + 1 c i = N
93 86 92 elab c g | g : 1 K + 1 0 i = 1 K + 1 g i = N c : 1 K + 1 0 i = 1 K + 1 c i = N
94 93 a1i φ c A c g | g : 1 K + 1 0 i = 1 K + 1 g i = N c : 1 K + 1 0 i = 1 K + 1 c i = N
95 94 biimpd φ c A c g | g : 1 K + 1 0 i = 1 K + 1 g i = N c : 1 K + 1 0 i = 1 K + 1 c i = N
96 85 95 mpd φ c A c : 1 K + 1 0 i = 1 K + 1 c i = N
97 96 simpld φ c A c : 1 K + 1 0
98 97 adantr φ c A l 1 K c : 1 K + 1 0
99 98 ffvelrnda φ c A l 1 K l 1 K + 1 c l 0
100 82 99 mpdan φ c A l 1 K c l 0
101 45 100 fsumnn0cl φ c A l = 1 K c l 0
102 101 nn0cnd φ c A l = 1 K c l
103 65 63 102 pnpcand φ c A K + N - K + l = 1 K c l = N l = 1 K c l
104 eqid 1 = 1
105 1p0e1 1 + 0 = 1
106 104 105 eqtr4i 1 = 1 + 0
107 106 a1i φ 1 = 1 + 0
108 1red φ 1
109 0le1 0 1
110 109 a1i φ 0 1
111 108 11 55 108 54 110 le2addd φ 1 + 0 K + 1
112 107 111 eqbrtrd φ 1 K + 1
113 53 peano2zd φ K + 1
114 eluz 1 K + 1 K + 1 1 1 K + 1
115 52 113 114 syl2anc φ K + 1 1 1 K + 1
116 112 115 mpbird φ K + 1 1
117 116 adantr φ c A K + 1 1
118 97 ffvelrnda φ c A l 1 K + 1 c l 0
119 118 nn0cnd φ c A l 1 K + 1 c l
120 fveq2 l = K + 1 c l = c K + 1
121 117 119 120 fsumm1 φ c A l = 1 K + 1 c l = l = 1 K + 1 - 1 c l + c K + 1
122 1cnd φ c A 1
123 65 122 pncand φ c A K + 1 - 1 = K
124 123 oveq2d φ c A 1 K + 1 - 1 = 1 K
125 124 sumeq1d φ c A l = 1 K + 1 - 1 c l = l = 1 K c l
126 125 oveq1d φ c A l = 1 K + 1 - 1 c l + c K + 1 = l = 1 K c l + c K + 1
127 121 126 eqtrd φ c A l = 1 K + 1 c l = l = 1 K c l + c K + 1
128 127 eqcomd φ c A l = 1 K c l + c K + 1 = l = 1 K + 1 c l
129 fveq2 l = i c l = c i
130 nfcv _ i 1 K + 1
131 nfcv _ l 1 K + 1
132 nfcv _ i c l
133 nfcv _ l c i
134 129 130 131 132 133 cbvsum l = 1 K + 1 c l = i = 1 K + 1 c i
135 134 a1i φ c A l = 1 K + 1 c l = i = 1 K + 1 c i
136 96 simprd φ c A i = 1 K + 1 c i = N
137 135 136 eqtrd φ c A l = 1 K + 1 c l = N
138 128 137 eqtrd φ c A l = 1 K c l + c K + 1 = N
139 1zzd φ c A 1
140 53 adantr φ c A K
141 140 peano2zd φ c A K + 1
142 1e0p1 1 = 0 + 1
143 142 a1i φ c A 1 = 0 + 1
144 0red φ c A 0
145 55 adantr φ c A K
146 1red φ c A 1
147 11 55 12 ltled φ 0 K
148 147 adantr φ c A 0 K
149 144 145 146 148 leadd1dd φ c A 0 + 1 K + 1
150 143 149 eqbrtrd φ c A 1 K + 1
151 55 55 108 56 leadd1dd φ K + 1 K + 1
152 151 adantr φ c A K + 1 K + 1
153 139 141 141 150 152 elfzd φ c A K + 1 1 K + 1
154 97 153 ffvelrnd φ c A c K + 1 0
155 154 nn0cnd φ c A c K + 1
156 63 102 155 subaddd φ c A N l = 1 K c l = c K + 1 l = 1 K c l + c K + 1 = N
157 138 156 mpbird φ c A N l = 1 K c l = c K + 1
158 103 157 eqtrd φ c A K + N - K + l = 1 K c l = c K + 1
159 67 158 eqtrd φ c A N + K - K + l = 1 K c l = c K + 1
160 61 159 eqtrd φ c A N + K - F c K = c K + 1
161 160 3adant3 φ c A k 1 K + 1 N + K - F c K = c K + 1
162 161 adantr φ c A k 1 K + 1 k = K + 1 N + K - F c K = c K + 1
163 simpr φ c A k 1 K + 1 k = K + 1 k = K + 1
164 163 fveq2d φ c A k 1 K + 1 k = K + 1 c k = c K + 1
165 164 eqcomd φ c A k 1 K + 1 k = K + 1 c K + 1 = c k
166 162 165 eqtrd φ c A k 1 K + 1 k = K + 1 N + K - F c K = c k
167 47 fveq1d φ c A F c 1 = j 1 K j + l = 1 j c l 1
168 167 oveq1d φ c A F c 1 1 = j 1 K j + l = 1 j c l 1 1
169 eqidd φ c A j 1 K j + l = 1 j c l = j 1 K j + l = 1 j c l
170 simpr φ c A j = 1 j = 1
171 170 oveq2d φ c A j = 1 1 j = 1 1
172 171 sumeq1d φ c A j = 1 l = 1 j c l = l = 1 1 c l
173 170 172 oveq12d φ c A j = 1 j + l = 1 j c l = 1 + l = 1 1 c l
174 146 leidd φ c A 1 1
175 54 adantr φ c A 1 K
176 139 140 139 174 175 elfzd φ c A 1 1 K
177 ovexd φ c A 1 + l = 1 1 c l V
178 169 173 176 177 fvmptd φ c A j 1 K j + l = 1 j c l 1 = 1 + l = 1 1 c l
179 178 oveq1d φ c A j 1 K j + l = 1 j c l 1 1 = 1 + l = 1 1 c l - 1
180 fzfid φ c A 1 1 Fin
181 1zzd φ c A l 1 1 1
182 140 adantr φ c A l 1 1 K
183 182 peano2zd φ c A l 1 1 K + 1
184 elfzelz l 1 1 l
185 184 adantl φ c A l 1 1 l
186 elfzle1 l 1 1 1 l
187 186 adantl φ c A l 1 1 1 l
188 185 zred φ c A l 1 1 l
189 0red φ c A l 1 1 0
190 1red φ c A l 1 1 1
191 189 190 readdcld φ c A l 1 1 0 + 1
192 183 zred φ c A l 1 1 K + 1
193 elfzle2 l 1 1 l 1
194 193 adantl φ c A l 1 1 l 1
195 142 a1i φ c A l 1 1 1 = 0 + 1
196 194 195 breqtrd φ c A l 1 1 l 0 + 1
197 149 adantr φ c A l 1 1 0 + 1 K + 1
198 188 191 192 196 197 letrd φ c A l 1 1 l K + 1
199 181 183 185 187 198 elfzd φ c A l 1 1 l 1 K + 1
200 118 adantlr φ c A l 1 1 l 1 K + 1 c l 0
201 199 200 mpdan φ c A l 1 1 c l 0
202 180 201 fsumnn0cl φ c A l = 1 1 c l 0
203 202 nn0cnd φ c A l = 1 1 c l
204 122 203 pncan2d φ c A 1 + l = 1 1 c l - 1 = l = 1 1 c l
205 139 141 139 174 150 elfzd φ c A 1 1 K + 1
206 97 205 ffvelrnd φ c A c 1 0
207 206 nn0cnd φ c A c 1
208 fveq2 l = 1 c l = c 1
209 208 fsum1 1 c 1 l = 1 1 c l = c 1
210 139 207 209 syl2anc φ c A l = 1 1 c l = c 1
211 204 210 eqtrd φ c A 1 + l = 1 1 c l - 1 = c 1
212 179 211 eqtrd φ c A j 1 K j + l = 1 j c l 1 1 = c 1
213 168 212 eqtrd φ c A F c 1 1 = c 1
214 213 3adant3 φ c A k 1 K + 1 F c 1 1 = c 1
215 214 adantr φ c A k 1 K + 1 ¬ k = K + 1 F c 1 1 = c 1
216 215 adantr φ c A k 1 K + 1 ¬ k = K + 1 k = 1 F c 1 1 = c 1
217 simpr φ c A k 1 K + 1 ¬ k = K + 1 k = 1 k = 1
218 217 fveq2d φ c A k 1 K + 1 ¬ k = K + 1 k = 1 c k = c 1
219 218 eqcomd φ c A k 1 K + 1 ¬ k = K + 1 k = 1 c 1 = c k
220 216 219 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 k = 1 F c 1 1 = c k
221 3 a1i φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F = a A j 1 K j + l = 1 j a l
222 simpllr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 a = c j 1 K l 1 j a = c
223 222 fveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 a = c j 1 K l 1 j a l = c l
224 223 sumeq2dv φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 a = c j 1 K l = 1 j a l = l = 1 j c l
225 224 oveq2d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 a = c j 1 K j + l = 1 j a l = j + l = 1 j c l
226 225 mpteq2dva φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 a = c j 1 K j + l = 1 j a l = j 1 K j + l = 1 j c l
227 simpll2 φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 c A
228 fzfid φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 K Fin
229 228 mptexd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l V
230 221 226 227 229 fvmptd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c = j 1 K j + l = 1 j c l
231 230 fveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c k = j 1 K j + l = 1 j c l k
232 230 fveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c k 1 = j 1 K j + l = 1 j c l k 1
233 231 232 oveq12d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c k F c k 1 = j 1 K j + l = 1 j c l k j 1 K j + l = 1 j c l k 1
234 233 oveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c k - F c k 1 - 1 = j 1 K j + l = 1 j c l k - j 1 K j + l = 1 j c l k 1 - 1
235 eqidd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l = j 1 K j + l = 1 j c l
236 simpr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k j = k
237 236 oveq2d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k 1 j = 1 k
238 237 sumeq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k l = 1 j c l = l = 1 k c l
239 236 238 oveq12d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k j + l = 1 j c l = k + l = 1 k c l
240 1zzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1
241 140 3adant3 φ c A k 1 K + 1 K
242 241 adantr φ c A k 1 K + 1 ¬ k = K + 1 K
243 242 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 K
244 elfznn k 1 K + 1 k
245 244 3ad2ant3 φ c A k 1 K + 1 k
246 245 nnzd φ c A k 1 K + 1 k
247 246 adantr φ c A k 1 K + 1 ¬ k = K + 1 k
248 247 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k
249 245 nnge1d φ c A k 1 K + 1 1 k
250 249 adantr φ c A k 1 K + 1 ¬ k = K + 1 1 k
251 250 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k
252 simpl3 φ c A k 1 K + 1 ¬ k = K + 1 k 1 K + 1
253 1zzd φ c A k 1 K + 1 ¬ k = K + 1 1
254 242 peano2zd φ c A k 1 K + 1 ¬ k = K + 1 K + 1
255 elfz k 1 K + 1 k 1 K + 1 1 k k K + 1
256 247 253 254 255 syl3anc φ c A k 1 K + 1 ¬ k = K + 1 k 1 K + 1 1 k k K + 1
257 256 biimpd φ c A k 1 K + 1 ¬ k = K + 1 k 1 K + 1 1 k k K + 1
258 252 257 mpd φ c A k 1 K + 1 ¬ k = K + 1 1 k k K + 1
259 258 simprd φ c A k 1 K + 1 ¬ k = K + 1 k K + 1
260 neqne ¬ k = K + 1 k K + 1
261 260 adantl φ c A k 1 K + 1 ¬ k = K + 1 k K + 1
262 261 necomd φ c A k 1 K + 1 ¬ k = K + 1 K + 1 k
263 259 262 jca φ c A k 1 K + 1 ¬ k = K + 1 k K + 1 K + 1 k
264 247 zred φ c A k 1 K + 1 ¬ k = K + 1 k
265 254 zred φ c A k 1 K + 1 ¬ k = K + 1 K + 1
266 264 265 ltlend φ c A k 1 K + 1 ¬ k = K + 1 k < K + 1 k K + 1 K + 1 k
267 263 266 mpbird φ c A k 1 K + 1 ¬ k = K + 1 k < K + 1
268 zleltp1 k K k K k < K + 1
269 247 242 268 syl2anc φ c A k 1 K + 1 ¬ k = K + 1 k K k < K + 1
270 267 269 mpbird φ c A k 1 K + 1 ¬ k = K + 1 k K
271 270 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k K
272 240 243 248 251 271 elfzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 K
273 ovexd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k + l = 1 k c l V
274 235 239 272 273 fvmptd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l k = k + l = 1 k c l
275 simpr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k 1 j = k 1
276 275 oveq2d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k 1 1 j = 1 k 1
277 276 sumeq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k 1 l = 1 j c l = l = 1 k 1 c l
278 275 277 oveq12d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j = k 1 j + l = 1 j c l = k - 1 + l = 1 k 1 c l
279 1zzd φ k 1 K + 1 ¬ k = 1 1
280 53 ad2antrr φ k 1 K + 1 ¬ k = 1 K
281 280 3impa φ k 1 K + 1 ¬ k = 1 K
282 244 nnzd k 1 K + 1 k
283 282 adantl φ k 1 K + 1 k
284 283 adantr φ k 1 K + 1 ¬ k = 1 k
285 284 3impa φ k 1 K + 1 ¬ k = 1 k
286 285 279 zsubcld φ k 1 K + 1 ¬ k = 1 k 1
287 neqne ¬ k = 1 k 1
288 287 3ad2ant3 φ k 1 K + 1 ¬ k = 1 k 1
289 108 3ad2ant1 φ k 1 K + 1 ¬ k = 1 1
290 285 zred φ k 1 K + 1 ¬ k = 1 k
291 simp2 φ k 1 K + 1 ¬ k = 1 k 1 K + 1
292 elfzle1 k 1 K + 1 1 k
293 291 292 syl φ k 1 K + 1 ¬ k = 1 1 k
294 289 290 293 leltned φ k 1 K + 1 ¬ k = 1 1 < k k 1
295 288 294 mpbird φ k 1 K + 1 ¬ k = 1 1 < k
296 279 285 zltp1led φ k 1 K + 1 ¬ k = 1 1 < k 1 + 1 k
297 295 296 mpbid φ k 1 K + 1 ¬ k = 1 1 + 1 k
298 leaddsub 1 1 k 1 + 1 k 1 k 1
299 289 289 290 298 syl3anc φ k 1 K + 1 ¬ k = 1 1 + 1 k 1 k 1
300 297 299 mpbid φ k 1 K + 1 ¬ k = 1 1 k 1
301 286 zred φ k 1 K + 1 ¬ k = 1 k 1
302 55 3ad2ant1 φ k 1 K + 1 ¬ k = 1 K
303 1red φ k 1 K + 1 ¬ k = 1 1
304 302 303 readdcld φ k 1 K + 1 ¬ k = 1 K + 1
305 304 303 resubcld φ k 1 K + 1 ¬ k = 1 K + 1 - 1
306 elfzle2 k 1 K + 1 k K + 1
307 306 3ad2ant2 φ k 1 K + 1 ¬ k = 1 k K + 1
308 290 304 303 307 lesub1dd φ k 1 K + 1 ¬ k = 1 k 1 K + 1 - 1
309 64 3ad2ant1 φ k 1 K + 1 ¬ k = 1 K
310 1cnd φ k 1 K + 1 ¬ k = 1 1
311 309 310 pncand φ k 1 K + 1 ¬ k = 1 K + 1 - 1 = K
312 56 3ad2ant1 φ k 1 K + 1 ¬ k = 1 K K
313 311 312 eqbrtrd φ k 1 K + 1 ¬ k = 1 K + 1 - 1 K
314 301 305 302 308 313 letrd φ k 1 K + 1 ¬ k = 1 k 1 K
315 279 281 286 300 314 elfzd φ k 1 K + 1 ¬ k = 1 k 1 1 K
316 315 3expa φ k 1 K + 1 ¬ k = 1 k 1 1 K
317 316 3adantl2 φ c A k 1 K + 1 ¬ k = 1 k 1 1 K
318 317 adantlr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1 1 K
319 ovexd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k - 1 + l = 1 k 1 c l V
320 235 278 318 319 fvmptd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l k 1 = k - 1 + l = 1 k 1 c l
321 274 320 oveq12d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l k j 1 K j + l = 1 j c l k 1 = k + l = 1 k c l - k - 1 + l = 1 k 1 c l
322 321 oveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l k - j 1 K j + l = 1 j c l k 1 - 1 = k + l = 1 k c l - k - 1 + l = 1 k 1 c l - 1
323 248 zcnd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k
324 fzfid φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k Fin
325 1zzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1
326 243 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k K
327 326 peano2zd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k K + 1
328 elfznn l 1 k l
329 328 adantl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l
330 329 nnzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l
331 329 nnge1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l
332 329 nnred φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l
333 264 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k k
334 265 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k K + 1
335 elfzle2 l 1 k l k
336 335 adantl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l k
337 259 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k k K + 1
338 332 333 334 336 337 letrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l K + 1
339 325 327 330 331 338 elfzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l 1 K + 1
340 97 3adant3 φ c A k 1 K + 1 c : 1 K + 1 0
341 340 adantr φ c A k 1 K + 1 ¬ k = K + 1 c : 1 K + 1 0
342 341 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 c : 1 K + 1 0
343 342 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k c : 1 K + 1 0
344 343 ffvelrnda φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k l 1 K + 1 c l 0
345 339 344 mpdan φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k c l 0
346 324 345 fsumnn0cl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l 0
347 346 nn0cnd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l
348 1cnd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1
349 323 348 subcld φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1
350 fzfid φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 k 1 Fin
351 1zzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 1
352 243 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 K
353 352 peano2zd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 K + 1
354 elfznn l 1 k 1 l
355 354 adantl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l
356 355 nnzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l
357 355 nnge1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 1 l
358 355 nnred φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l
359 264 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 k
360 1red φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 1
361 359 360 resubcld φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 k 1
362 265 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 K + 1
363 elfzle2 l 1 k 1 l k 1
364 363 adantl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l k 1
365 359 lem1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 k 1 k
366 259 ad2antrr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 k K + 1
367 361 359 362 365 366 letrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 k 1 K + 1
368 358 361 362 364 367 letrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l K + 1
369 351 353 356 357 368 elfzd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l 1 K + 1
370 342 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 c : 1 K + 1 0
371 370 ffvelrnda φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 l 1 K + 1 c l 0
372 369 371 mpdan φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k 1 c l 0
373 350 372 fsumnn0cl φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k 1 c l 0
374 373 nn0cnd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k 1 c l
375 323 347 349 374 addsub4d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k + l = 1 k c l - k - 1 + l = 1 k 1 c l = k k 1 + l = 1 k c l - l = 1 k 1 c l
376 375 oveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k + l = 1 k c l - k - 1 + l = 1 k 1 c l - 1 = k k 1 + l = 1 k c l l = 1 k 1 c l - 1
377 323 348 nncand φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k k 1 = 1
378 377 oveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k k 1 + l = 1 k c l - l = 1 k 1 c l = 1 + l = 1 k c l - l = 1 k 1 c l
379 378 oveq1d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k k 1 + l = 1 k c l l = 1 k 1 c l - 1 = 1 + l = 1 k c l l = 1 k 1 c l - 1
380 347 374 subcld φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l l = 1 k 1 c l
381 348 380 pncan2d φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 + l = 1 k c l l = 1 k 1 c l - 1 = l = 1 k c l l = 1 k 1 c l
382 139 3adant3 φ c A k 1 K + 1 1
383 382 246 249 3jca φ c A k 1 K + 1 1 k 1 k
384 eluz2 k 1 1 k 1 k
385 383 384 sylibr φ c A k 1 K + 1 k 1
386 385 adantr φ c A k 1 K + 1 ¬ k = K + 1 k 1
387 386 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k 1
388 345 nn0cnd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l 1 k c l
389 fveq2 l = k c l = c k
390 387 388 389 fsumm1 φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l = l = 1 k 1 c l + c k
391 390 eqcomd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k 1 c l + c k = l = 1 k c l
392 simp3 φ c A k 1 K + 1 k 1 K + 1
393 340 392 ffvelrnd φ c A k 1 K + 1 c k 0
394 393 nn0cnd φ c A k 1 K + 1 c k
395 394 adantr φ c A k 1 K + 1 ¬ k = K + 1 c k
396 395 adantr φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 c k
397 347 374 396 subaddd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l l = 1 k 1 c l = c k l = 1 k 1 c l + c k = l = 1 k c l
398 391 397 mpbird φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 l = 1 k c l l = 1 k 1 c l = c k
399 381 398 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 1 + l = 1 k c l l = 1 k 1 c l - 1 = c k
400 379 399 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k k 1 + l = 1 k c l l = 1 k 1 c l - 1 = c k
401 376 400 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 k + l = 1 k c l - k - 1 + l = 1 k 1 c l - 1 = c k
402 322 401 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 j 1 K j + l = 1 j c l k - j 1 K j + l = 1 j c l k 1 - 1 = c k
403 234 402 eqtrd φ c A k 1 K + 1 ¬ k = K + 1 ¬ k = 1 F c k - F c k 1 - 1 = c k
404 220 403 ifeqda φ c A k 1 K + 1 ¬ k = K + 1 if k = 1 F c 1 1 F c k - F c k 1 - 1 = c k
405 166 404 ifeqda φ c A k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1 = c k
406 405 3expa φ c A k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1 = c k
407 406 mpteq2dva φ c A k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1 = k 1 K + 1 c k
408 97 ffnd φ c A c Fn 1 K + 1
409 dffn5 c Fn 1 K + 1 c = k 1 K + 1 c k
410 409 biimpi c Fn 1 K + 1 c = k 1 K + 1 c k
411 408 410 syl φ c A c = k 1 K + 1 c k
412 411 eqcomd φ c A k 1 K + 1 c k = c
413 407 412 eqtrd φ c A k 1 K + 1 if k = K + 1 N + K - F c K if k = 1 F c 1 1 F c k - F c k 1 - 1 = c
414 37 413 eqtrd φ c A G F c = c
415 414 ralrimiva φ c A G F c = c
416 1 2 3 4 5 6 sticksstones12a φ d B F G d = d
417 8 9 415 416 2fvidf1od φ F : A 1-1 onto B