304 |
304 |
305 goalw ZF.thy [function_def] |
305 goalw ZF.thy [function_def] |
306 "!!S. [| ALL x:S. function(x); \ |
306 "!!S. [| ALL x:S. function(x); \ |
307 \ ALL x:S. ALL y:S. x<=y | y<=x |] ==> \ |
307 \ ALL x:S. ALL y:S. x<=y | y<=x |] ==> \ |
308 \ function(Union(S))"; |
308 \ function(Union(S))"; |
309 by (blast_tac (!claset addSDs [bspec RS bspec]) 1); |
309 by (fast_tac (ZF_cs addSDs [bspec RS bspec]) 1); |
|
310 (*by (Blast_tac 1); takes too long...*) |
310 qed "function_Union"; |
311 qed "function_Union"; |
311 |
312 |
312 goalw ZF.thy [Pi_def] |
313 goalw ZF.thy [Pi_def] |
313 "!!S. [| ALL f:S. EX C D. f:C->D; \ |
314 "!!S. [| ALL f:S. EX C D. f:C->D; \ |
314 \ ALL f:S. ALL y:S. f<=y | y<=f |] ==> \ |
315 \ ALL f:S. ALL y:S. f<=y | y<=f |] ==> \ |
321 |
322 |
322 val Un_rls = [Un_subset_iff, domain_Un_eq, SUM_Un_distrib1, prod_Un_distrib2, |
323 val Un_rls = [Un_subset_iff, domain_Un_eq, SUM_Un_distrib1, prod_Un_distrib2, |
323 Un_upper1 RSN (2, subset_trans), |
324 Un_upper1 RSN (2, subset_trans), |
324 Un_upper2 RSN (2, subset_trans)]; |
325 Un_upper2 RSN (2, subset_trans)]; |
325 |
326 |
326 goal ZF.thy |
327 goal ZF.thy "!!f. [| f: A->B; g: C->D; A Int C = 0 |] \ |
327 "!!f. [| f: A->B; g: C->D; A Int C = 0 |] ==> \ |
328 \ ==> (f Un g) : (A Un C) -> (B Un D)"; |
328 \ (f Un g) : (A Un C) -> (B Un D)"; |
|
329 (*Prove the product and domain subgoals using distributive laws*) |
329 (*Prove the product and domain subgoals using distributive laws*) |
330 by (asm_full_simp_tac (!simpset addsimps [Pi_iff,extension]@Un_rls) 1); |
330 by (asm_full_simp_tac (!simpset addsimps [Pi_iff,extension]@Un_rls) 1); |
331 by (rewtac function_def); |
331 by (rewtac function_def); |
332 by (Blast_tac 1); |
332 by (Blast.depth_tac (!claset) 11 1); (*11 secs*) |
333 qed "fun_disjoint_Un"; |
333 qed "fun_disjoint_Un"; |
334 |
334 |
335 goal ZF.thy |
335 goal ZF.thy |
336 "!!f g a. [| a:A; f: A->B; g: C->D; A Int C = 0 |] ==> \ |
336 "!!f g a. [| a:A; f: A->B; g: C->D; A Int C = 0 |] ==> \ |
337 \ (f Un g)`a = f`a"; |
337 \ (f Un g)`a = f`a"; |