equal
deleted
inserted
replaced
103 by (Blast_tac 1); |
103 by (Blast_tac 1); |
104 qed "insert_image"; |
104 qed "insert_image"; |
105 Addsimps [insert_image]; |
105 Addsimps [insert_image]; |
106 |
106 |
107 goal thy "(f``A = {}) = (A = {})"; |
107 goal thy "(f``A = {}) = (A = {})"; |
108 by (blast_tac (claset() addSEs [equalityE]) 1); |
108 by (blast_tac (claset() addSEs [equalityCE]) 1); |
109 qed "image_is_empty"; |
109 qed "image_is_empty"; |
110 AddIffs [image_is_empty]; |
110 AddIffs [image_is_empty]; |
111 |
111 |
112 goalw thy [image_def] |
112 goalw thy [image_def] |
113 "(%x. if P x then f x else g x) `` S \ |
113 "(%x. if P x then f x else g x) `` S \ |
147 by (Blast_tac 1); |
147 by (Blast_tac 1); |
148 qed "Int_empty_right"; |
148 qed "Int_empty_right"; |
149 Addsimps[Int_empty_right]; |
149 Addsimps[Int_empty_right]; |
150 |
150 |
151 goal thy "(A Int B = {}) = (A <= Compl B)"; |
151 goal thy "(A Int B = {}) = (A <= Compl B)"; |
152 by (blast_tac (claset() addSEs [equalityE]) 1); |
152 by (blast_tac (claset() addSEs [equalityCE]) 1); |
153 qed "disjoint_eq_subset_Compl"; |
153 qed "disjoint_eq_subset_Compl"; |
154 |
154 |
155 goal thy "UNIV Int B = B"; |
155 goal thy "UNIV Int B = B"; |
156 by (Blast_tac 1); |
156 by (Blast_tac 1); |
157 qed "Int_UNIV_left"; |
157 qed "Int_UNIV_left"; |
169 goal thy "(B Un C) Int A = (B Int A) Un (C Int A)"; |
169 goal thy "(B Un C) Int A = (B Int A) Un (C Int A)"; |
170 by (Blast_tac 1); |
170 by (Blast_tac 1); |
171 qed "Int_Un_distrib2"; |
171 qed "Int_Un_distrib2"; |
172 |
172 |
173 goal thy "(A<=B) = (A Int B = A)"; |
173 goal thy "(A<=B) = (A Int B = A)"; |
174 by (blast_tac (claset() addSEs [equalityE]) 1); |
174 by (blast_tac (claset() addSEs [equalityCE]) 1); |
175 qed "subset_Int_eq"; |
175 qed "subset_Int_eq"; |
176 |
176 |
177 goal thy "(A Int B = UNIV) = (A = UNIV & B = UNIV)"; |
177 goal thy "(A Int B = UNIV) = (A = UNIV & B = UNIV)"; |
178 by (blast_tac (claset() addEs [equalityCE]) 1); |
178 by (blast_tac (claset() addEs [equalityCE]) 1); |
179 qed "Int_UNIV"; |
179 qed "Int_UNIV"; |
231 by (Blast_tac 1); |
231 by (Blast_tac 1); |
232 qed "Un_insert_right"; |
232 qed "Un_insert_right"; |
233 Addsimps[Un_insert_right]; |
233 Addsimps[Un_insert_right]; |
234 |
234 |
235 goal thy "(insert a B) Int C = (if a:C then insert a (B Int C) \ |
235 goal thy "(insert a B) Int C = (if a:C then insert a (B Int C) \ |
236 \ else B Int C)"; |
236 \ else B Int C)"; |
237 by (simp_tac (simpset() addsplits [expand_if]) 1); |
237 by (simp_tac (simpset() addsplits [expand_if]) 1); |
238 by (Blast_tac 1); |
238 by (Blast_tac 1); |
239 qed "Int_insert_left"; |
239 qed "Int_insert_left"; |
240 |
240 |
241 goal thy "A Int (insert a B) = (if a:A then insert a (A Int B) \ |
241 goal thy "A Int (insert a B) = (if a:A then insert a (A Int B) \ |
242 \ else A Int B)"; |
242 \ else A Int B)"; |
243 by (simp_tac (simpset() addsplits [expand_if]) 1); |
243 by (simp_tac (simpset() addsplits [expand_if]) 1); |
244 by (Blast_tac 1); |
244 by (Blast_tac 1); |
245 qed "Int_insert_right"; |
245 qed "Int_insert_right"; |
246 |
246 |
247 goal thy "(A Int B) Un C = (A Un C) Int (B Un C)"; |
247 goal thy "(A Int B) Un C = (A Un C) Int (B Un C)"; |
252 "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)"; |
252 "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)"; |
253 by (Blast_tac 1); |
253 by (Blast_tac 1); |
254 qed "Un_Int_crazy"; |
254 qed "Un_Int_crazy"; |
255 |
255 |
256 goal thy "(A<=B) = (A Un B = B)"; |
256 goal thy "(A<=B) = (A Un B = B)"; |
257 by (blast_tac (claset() addSEs [equalityE]) 1); |
257 by (blast_tac (claset() addSEs [equalityCE]) 1); |
258 qed "subset_Un_eq"; |
258 qed "subset_Un_eq"; |
259 |
259 |
260 goal thy "(A <= insert b C) = (A <= C | b:A & A-{b} <= C)"; |
260 goal thy "(A <= insert b C) = (A <= C | b:A & A-{b} <= C)"; |
261 by (Blast_tac 1); |
261 by (Blast_tac 1); |
262 qed "subset_insert_iff"; |
262 qed "subset_insert_iff"; |
299 qed "Compl_INT"; |
299 qed "Compl_INT"; |
300 |
300 |
301 (*Halmos, Naive Set Theory, page 16.*) |
301 (*Halmos, Naive Set Theory, page 16.*) |
302 |
302 |
303 goal thy "((A Int B) Un C = A Int (B Un C)) = (C<=A)"; |
303 goal thy "((A Int B) Un C = A Int (B Un C)) = (C<=A)"; |
304 by (blast_tac (claset() addSEs [equalityE]) 1); |
304 by (blast_tac (claset() addSEs [equalityCE]) 1); |
305 qed "Un_Int_assoc_eq"; |
305 qed "Un_Int_assoc_eq"; |
306 |
306 |
307 |
307 |
308 section "Union"; |
308 section "Union"; |
309 |
309 |
330 goal thy "Union(A Int B) <= Union(A) Int Union(B)"; |
330 goal thy "Union(A Int B) <= Union(A) Int Union(B)"; |
331 by (Blast_tac 1); |
331 by (Blast_tac 1); |
332 qed "Union_Int_subset"; |
332 qed "Union_Int_subset"; |
333 |
333 |
334 goal thy "(Union M = {}) = (! A : M. A = {})"; |
334 goal thy "(Union M = {}) = (! A : M. A = {})"; |
335 by (blast_tac (claset() addEs [equalityE]) 1); |
335 by (blast_tac (claset() addEs [equalityCE]) 1); |
336 qed"Union_empty_conv"; |
336 qed "Union_empty_conv"; |
337 AddIffs [Union_empty_conv]; |
337 AddIffs [Union_empty_conv]; |
338 |
338 |
339 goal thy "(Union(C) Int A = {}) = (! B:C. B Int A = {})"; |
339 goal thy "(Union(C) Int A = {}) = (! B:C. B Int A = {})"; |
340 by (blast_tac (claset() addSEs [equalityE]) 1); |
340 by (blast_tac (claset() addSEs [equalityCE]) 1); |
341 qed "Union_disjoint"; |
341 qed "Union_disjoint"; |
342 |
342 |
343 section "Inter"; |
343 section "Inter"; |
344 |
344 |
345 goal thy "Inter({}) = UNIV"; |
345 goal thy "Inter({}) = UNIV"; |
442 |
442 |
443 goal thy "A Int Union(B) = (UN C:B. A Int C)"; |
443 goal thy "A Int Union(B) = (UN C:B. A Int C)"; |
444 by (Blast_tac 1); |
444 by (Blast_tac 1); |
445 qed "Int_Union"; |
445 qed "Int_Union"; |
446 |
446 |
447 (* Devlin, Setdamentals of Contemporary Set Theory, page 12, exercise 5: |
447 (* Devlin, Fundamentals of Contemporary Set Theory, page 12, exercise 5: |
448 Union of a family of unions **) |
448 Union of a family of unions **) |
449 goal thy "(UN x:C. A(x) Un B(x)) = Union(A``C) Un Union(B``C)"; |
449 goal thy "(UN x:C. A(x) Un B(x)) = Union(A``C) Un Union(B``C)"; |
450 by (Blast_tac 1); |
450 by (Blast_tac 1); |
451 qed "Un_Union_image"; |
451 qed "Un_Union_image"; |
452 |
452 |