178 \ ==> F : increasing (%s. (f s) + (g s :: ('a::order) multiset))"; |
178 \ ==> F : increasing (%s. (f s) + (g s :: ('a::order) multiset))"; |
179 by Auto_tac; |
179 by Auto_tac; |
180 by (dres_inst_tac [("x","f xa")] spec 1); |
180 by (dres_inst_tac [("x","f xa")] spec 1); |
181 by (dres_inst_tac [("x","g xa")] spec 1); |
181 by (dres_inst_tac [("x","g xa")] spec 1); |
182 by (ball_tac 1); |
182 by (ball_tac 1); |
183 by (blast_tac (claset() addIs [union_le_mono, order_trans]) 1); |
183 by (blast_tac (claset() addIs [thm "union_le_mono", order_trans]) 1); |
184 qed "increasing_union"; |
184 qed "increasing_union"; |
185 |
185 |
186 Goalw [Increasing_def, Stable_def, Constrains_def, stable_def, constrains_def] |
186 Goalw [Increasing_def, Stable_def, Constrains_def, stable_def, constrains_def] |
187 "[| F : Increasing f; F: Increasing g |] \ |
187 "[| F : Increasing f; F: Increasing g |] \ |
188 \ ==> F : Increasing (%s. (f s) + (g s :: ('a::order) multiset))"; |
188 \ ==> F : Increasing (%s. (f s) + (g s :: ('a::order) multiset))"; |
189 by Auto_tac; |
189 by Auto_tac; |
190 by (dres_inst_tac [("x","f xa")] spec 1); |
190 by (dres_inst_tac [("x","f xa")] spec 1); |
191 by (dres_inst_tac [("x","g xa")] spec 1); |
191 by (dres_inst_tac [("x","g xa")] spec 1); |
192 by (ball_tac 1); |
192 by (ball_tac 1); |
193 by (blast_tac (claset() addIs [union_le_mono, order_trans]) 1); |
193 by (blast_tac (claset() addIs [thm "union_le_mono", order_trans]) 1); |
194 qed "Increasing_union"; |
194 qed "Increasing_union"; |
195 |
195 |
196 Goal "[| F : Always {s. f' s <= f s}; F : Always {s. g' s <= g s} |] \ |
196 Goal "[| F : Always {s. f' s <= f s}; F : Always {s. g' s <= g s} |] \ |
197 \ ==> F : Always {s. f' s + g' s <= f s + (g s :: ('a::order) multiset)}"; |
197 \ ==> F : Always {s. f' s + g' s <= f s + (g s :: ('a::order) multiset)}"; |
198 by (asm_full_simp_tac (simpset() addsimps [Always_eq_includes_reachable]) 1); |
198 by (asm_full_simp_tac (simpset() addsimps [Always_eq_includes_reachable]) 1); |
199 by (blast_tac (claset() addIs [union_le_mono]) 1); |
199 by (blast_tac (claset() addIs [thm "union_le_mono"]) 1); |
200 qed "Always_union"; |
200 qed "Always_union"; |
201 |
201 |
202 (*Except the last line, IDENTICAL to the proof script for Follows_Un_lemma*) |
202 (*Except the last line, IDENTICAL to the proof script for Follows_Un_lemma*) |
203 Goal "[| F : Increasing f; F : Increasing g; \ |
203 Goal "[| F : Increasing f; F : Increasing g; \ |
204 \ F : Increasing g'; F : Always {s. f' s <= f s};\ |
204 \ F : Increasing g'; F : Always {s. f' s <= f s};\ |
212 by (rtac PSP_Stable 1); |
212 by (rtac PSP_Stable 1); |
213 by (eres_inst_tac [("x", "f s")] spec 1); |
213 by (eres_inst_tac [("x", "f s")] spec 1); |
214 by (etac Stable_Int 1); |
214 by (etac Stable_Int 1); |
215 by (assume_tac 1); |
215 by (assume_tac 1); |
216 by (Blast_tac 1); |
216 by (Blast_tac 1); |
217 by (blast_tac (claset() addIs [union_le_mono, order_trans]) 1); |
217 by (blast_tac (claset() addIs [thm "union_le_mono", order_trans]) 1); |
218 qed "Follows_union_lemma"; |
218 qed "Follows_union_lemma"; |
219 |
219 |
220 (*The !! is there to influence to effect of permutative rewriting at the end*) |
220 (*The !! is there to influence to effect of permutative rewriting at the end*) |
221 Goalw [Follows_def] |
221 Goalw [Follows_def] |
222 "!!g g' ::'b => ('a::order) multiset. \ |
222 "!!g g' ::'b => ('a::order) multiset. \ |
225 by (asm_full_simp_tac (simpset() addsimps [Increasing_union, Always_union]) 1); |
225 by (asm_full_simp_tac (simpset() addsimps [Increasing_union, Always_union]) 1); |
226 by Auto_tac; |
226 by Auto_tac; |
227 by (rtac LeadsTo_Trans 1); |
227 by (rtac LeadsTo_Trans 1); |
228 by (blast_tac (claset() addIs [Follows_union_lemma]) 1); |
228 by (blast_tac (claset() addIs [Follows_union_lemma]) 1); |
229 (*now exchange union's arguments*) |
229 (*now exchange union's arguments*) |
230 by (simp_tac (simpset() addsimps [union_commute]) 1); |
230 by (simp_tac (simpset() addsimps [thm "union_commute"]) 1); |
231 by (blast_tac (claset() addIs [Follows_union_lemma]) 1); |
231 by (blast_tac (claset() addIs [Follows_union_lemma]) 1); |
232 qed "Follows_union"; |
232 qed "Follows_union"; |
233 |
233 |
234 Goal "!!f ::['c,'b] => ('a::order) multiset. \ |
234 Goal "!!f ::['c,'b] => ('a::order) multiset. \ |
235 \ [| ALL i: I. F : f' i Fols f i; finite I |] \ |
235 \ [| ALL i: I. F : f' i Fols f i; finite I |] \ |