author  wenzelm 
Sat, 16 Feb 2002 20:59:34 +0100  
changeset 12897  f4d10ad0ea7b 
parent 12633  ad9277743664 
child 12937  0c4fd7529467 
permissions  rwrr 
923  1 
(* Title: HOL/Set.thy 
2 
ID: $Id$ 

12257  3 
Author: Tobias Nipkow, Lawrence C Paulson and Markus Wenzel 
12020  4 
License: GPL (GNU GENERAL PUBLIC LICENSE) 
923  5 
*) 
6 

11979  7 
header {* Set theory for higherorder logic *} 
8 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

9 
theory Set = HOL: 
11979  10 

11 
text {* A set in HOL is simply a predicate. *} 

923  12 

2261  13 

11979  14 
subsection {* Basic syntax *} 
2261  15 

3947  16 
global 
17 

11979  18 
typedecl 'a set 
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12257
diff
changeset

19 
arities set :: (type) type 
3820  20 

923  21 
consts 
11979  22 
"{}" :: "'a set" ("{}") 
23 
UNIV :: "'a set" 

24 
insert :: "'a => 'a set => 'a set" 

25 
Collect :: "('a => bool) => 'a set"  "comprehension" 

26 
Int :: "'a set => 'a set => 'a set" (infixl 70) 

27 
Un :: "'a set => 'a set => 'a set" (infixl 65) 

28 
UNION :: "'a set => ('a => 'b set) => 'b set"  "general union" 

29 
INTER :: "'a set => ('a => 'b set) => 'b set"  "general intersection" 

30 
Union :: "'a set set => 'a set"  "union of a set" 

31 
Inter :: "'a set set => 'a set"  "intersection of a set" 

32 
Pow :: "'a set => 'a set set"  "powerset" 

33 
Ball :: "'a set => ('a => bool) => bool"  "bounded universal quantifiers" 

34 
Bex :: "'a set => ('a => bool) => bool"  "bounded existential quantifiers" 

35 
image :: "('a => 'b) => 'a set => 'b set" (infixr "`" 90) 

36 

37 
syntax 

38 
"op :" :: "'a => 'a set => bool" ("op :") 

39 
consts 

40 
"op :" :: "'a => 'a set => bool" ("(_/ : _)" [50, 51] 50)  "membership" 

41 

42 
local 

43 

12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12257
diff
changeset

44 
instance set :: (type) ord .. 
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12257
diff
changeset

45 
instance set :: (type) minus .. 
923  46 

47 

11979  48 
subsection {* Additional concrete syntax *} 
2261  49 

923  50 
syntax 
11979  51 
range :: "('a => 'b) => 'b set"  "of function" 
923  52 

11979  53 
"op ~:" :: "'a => 'a set => bool" ("op ~:")  "nonmembership" 
54 
"op ~:" :: "'a => 'a set => bool" ("(_/ ~: _)" [50, 51] 50) 

7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

55 

11979  56 
"@Finset" :: "args => 'a set" ("{(_)}") 
57 
"@Coll" :: "pttrn => bool => 'a set" ("(1{_./ _})") 

58 
"@SetCompr" :: "'a => idts => bool => 'a set" ("(1{_ /_./ _})") 

923  59 

11979  60 
"@INTER1" :: "pttrns => 'b set => 'b set" ("(3INT _./ _)" 10) 
61 
"@UNION1" :: "pttrns => 'b set => 'b set" ("(3UN _./ _)" 10) 

62 
"@INTER" :: "pttrn => 'a set => 'b set => 'b set" ("(3INT _:_./ _)" 10) 

63 
"@UNION" :: "pttrn => 'a set => 'b set => 'b set" ("(3UN _:_./ _)" 10) 

923  64 

11979  65 
"_Ball" :: "pttrn => 'a set => bool => bool" ("(3ALL _:_./ _)" [0, 0, 10] 10) 
66 
"_Bex" :: "pttrn => 'a set => bool => bool" ("(3EX _:_./ _)" [0, 0, 10] 10) 

923  67 

7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

68 
syntax (HOL) 
11979  69 
"_Ball" :: "pttrn => 'a set => bool => bool" ("(3! _:_./ _)" [0, 0, 10] 10) 
70 
"_Bex" :: "pttrn => 'a set => bool => bool" ("(3? _:_./ _)" [0, 0, 10] 10) 

923  71 

72 
translations 

10832  73 
"range f" == "f`UNIV" 
923  74 
"x ~: y" == "~ (x : y)" 
75 
"{x, xs}" == "insert x {xs}" 

76 
"{x}" == "insert x {}" 

77 
"{x. P}" == "Collect (%x. P)" 

4159
4aff9b7e5597
UNIV now a constant; UNION1, INTER1 now translations and no longer have
paulson
parents:
4151
diff
changeset

78 
"UN x y. B" == "UN x. UN y. B" 
4aff9b7e5597
UNIV now a constant; UNION1, INTER1 now translations and no longer have
paulson
parents:
4151
diff
changeset

79 
"UN x. B" == "UNION UNIV (%x. B)" 
7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

80 
"INT x y. B" == "INT x. INT y. B" 
4159
4aff9b7e5597
UNIV now a constant; UNION1, INTER1 now translations and no longer have
paulson
parents:
4151
diff
changeset

81 
"INT x. B" == "INTER UNIV (%x. B)" 
4aff9b7e5597
UNIV now a constant; UNION1, INTER1 now translations and no longer have
paulson
parents:
4151
diff
changeset

82 
"UN x:A. B" == "UNION A (%x. B)" 
923  83 
"INT x:A. B" == "INTER A (%x. B)" 
7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

84 
"ALL x:A. P" == "Ball A (%x. P)" 
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

85 
"EX x:A. P" == "Bex A (%x. P)" 
923  86 

12633  87 
syntax (output) 
11979  88 
"_setle" :: "'a set => 'a set => bool" ("op <=") 
89 
"_setle" :: "'a set => 'a set => bool" ("(_/ <= _)" [50, 51] 50) 

90 
"_setless" :: "'a set => 'a set => bool" ("op <") 

91 
"_setless" :: "'a set => 'a set => bool" ("(_/ < _)" [50, 51] 50) 

923  92 

12114
a8e860c86252
eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents:
12023
diff
changeset

93 
syntax (xsymbols) 
11979  94 
"_setle" :: "'a set => 'a set => bool" ("op \<subseteq>") 
95 
"_setle" :: "'a set => 'a set => bool" ("(_/ \<subseteq> _)" [50, 51] 50) 

96 
"_setless" :: "'a set => 'a set => bool" ("op \<subset>") 

97 
"_setless" :: "'a set => 'a set => bool" ("(_/ \<subset> _)" [50, 51] 50) 

98 
"op Int" :: "'a set => 'a set => 'a set" (infixl "\<inter>" 70) 

99 
"op Un" :: "'a set => 'a set => 'a set" (infixl "\<union>" 65) 

100 
"op :" :: "'a => 'a set => bool" ("op \<in>") 

101 
"op :" :: "'a => 'a set => bool" ("(_/ \<in> _)" [50, 51] 50) 

102 
"op ~:" :: "'a => 'a set => bool" ("op \<notin>") 

103 
"op ~:" :: "'a => 'a set => bool" ("(_/ \<notin> _)" [50, 51] 50) 

104 
"@UNION1" :: "pttrns => 'b set => 'b set" ("(3\<Union>_./ _)" 10) 

105 
"@INTER1" :: "pttrns => 'b set => 'b set" ("(3\<Inter>_./ _)" 10) 

106 
"@UNION" :: "pttrn => 'a set => 'b set => 'b set" ("(3\<Union>_\<in>_./ _)" 10) 

107 
"@INTER" :: "pttrn => 'a set => 'b set => 'b set" ("(3\<Inter>_\<in>_./ _)" 10) 

108 
Union :: "'a set set => 'a set" ("\<Union>_" [90] 90) 

109 
Inter :: "'a set set => 'a set" ("\<Inter>_" [90] 90) 

110 
"_Ball" :: "pttrn => 'a set => bool => bool" ("(3\<forall>_\<in>_./ _)" [0, 0, 10] 10) 

111 
"_Bex" :: "pttrn => 'a set => bool => bool" ("(3\<exists>_\<in>_./ _)" [0, 0, 10] 10) 

2261  112 

2412  113 
translations 
11979  114 
"op \<subseteq>" => "op <= :: _ set => _ set => bool" 
115 
"op \<subset>" => "op < :: _ set => _ set => bool" 

2261  116 

117 

11979  118 
typed_print_translation {* 
119 
let 

120 
fun le_tr' _ (Type ("fun", (Type ("set", _) :: _))) ts = 

121 
list_comb (Syntax.const "_setle", ts) 

122 
 le_tr' _ _ _ = raise Match; 

123 

124 
fun less_tr' _ (Type ("fun", (Type ("set", _) :: _))) ts = 

125 
list_comb (Syntax.const "_setless", ts) 

126 
 less_tr' _ _ _ = raise Match; 

127 
in [("op <=", le_tr'), ("op <", less_tr')] end 

128 
*} 

2261  129 

11979  130 
text {* 
131 
\medskip Translate between @{text "{e  x1...xn. P}"} and @{text 

132 
"{u. EX x1..xn. u = e & P}"}; @{text "{y. EX x1..xn. y = e & P}"} is 

133 
only translated if @{text "[0..n] subset bvs(e)"}. 

134 
*} 

135 

136 
parse_translation {* 

137 
let 

138 
val ex_tr = snd (mk_binder_tr ("EX ", "Ex")); 

3947  139 

11979  140 
fun nvars (Const ("_idts", _) $ _ $ idts) = nvars idts + 1 
141 
 nvars _ = 1; 

142 

143 
fun setcompr_tr [e, idts, b] = 

144 
let 

145 
val eq = Syntax.const "op =" $ Bound (nvars idts) $ e; 

146 
val P = Syntax.const "op &" $ eq $ b; 

147 
val exP = ex_tr [idts, P]; 

148 
in Syntax.const "Collect" $ Abs ("", dummyT, exP) end; 

149 

150 
in [("@SetCompr", setcompr_tr)] end; 

151 
*} 

923  152 

11979  153 
print_translation {* 
154 
let 

155 
val ex_tr' = snd (mk_binder_tr' ("Ex", "DUMMY")); 

156 

157 
fun setcompr_tr' [Abs (_, _, P)] = 

158 
let 

159 
fun check (Const ("Ex", _) $ Abs (_, _, P), n) = check (P, n + 1) 

160 
 check (Const ("op &", _) $ (Const ("op =", _) $ Bound m $ e) $ P, n) = 

161 
if n > 0 andalso m = n andalso not (loose_bvar1 (P, n)) andalso 

162 
((0 upto (n  1)) subset add_loose_bnos (e, 0, [])) then () 

163 
else raise Match; 

923  164 

11979  165 
fun tr' (_ $ abs) = 
166 
let val _ $ idts $ (_ $ (_ $ _ $ e) $ Q) = ex_tr' [abs] 

167 
in Syntax.const "@SetCompr" $ e $ idts $ Q end; 

168 
in check (P, 0); tr' P end; 

169 
in [("Collect", setcompr_tr')] end; 

170 
*} 

171 

172 

173 
subsection {* Rules and definitions *} 

174 

175 
text {* Isomorphisms between predicates and sets. *} 

923  176 

11979  177 
axioms 
178 
mem_Collect_eq [iff]: "(a : {x. P(x)}) = P(a)" 

179 
Collect_mem_eq [simp]: "{x. x:A} = A" 

180 

181 
defs 

182 
Ball_def: "Ball A P == ALL x. x:A > P(x)" 

183 
Bex_def: "Bex A P == EX x. x:A & P(x)" 

184 

185 
defs (overloaded) 

186 
subset_def: "A <= B == ALL x:A. x:B" 

187 
psubset_def: "A < B == (A::'a set) <= B & ~ A=B" 

188 
Compl_def: " A == {x. ~x:A}" 

12257  189 
set_diff_def: "A  B == {x. x:A & ~x:B}" 
923  190 

191 
defs 

11979  192 
Un_def: "A Un B == {x. x:A  x:B}" 
193 
Int_def: "A Int B == {x. x:A & x:B}" 

194 
INTER_def: "INTER A B == {y. ALL x:A. y: B(x)}" 

195 
UNION_def: "UNION A B == {y. EX x:A. y: B(x)}" 

196 
Inter_def: "Inter S == (INT x:S. x)" 

197 
Union_def: "Union S == (UN x:S. x)" 

198 
Pow_def: "Pow A == {B. B <= A}" 

199 
empty_def: "{} == {x. False}" 

200 
UNIV_def: "UNIV == {x. True}" 

201 
insert_def: "insert a B == {x. x=a} Un B" 

202 
image_def: "f`A == {y. EX x:A. y = f(x)}" 

203 

204 

205 
subsection {* Lemmas and proof tool setup *} 

206 

207 
subsubsection {* Relating predicates and sets *} 

208 

12257  209 
lemma CollectI: "P(a) ==> a : {x. P(x)}" 
11979  210 
by simp 
211 

212 
lemma CollectD: "a : {x. P(x)} ==> P(a)" 

213 
by simp 

214 

12257  215 
lemma set_ext: (assumes prem: "(!!x. (x:A) = (x:B))") "A = B" 
216 
apply (rule prem [THEN ext, THEN arg_cong, THEN box_equals]) 

217 
apply (rule Collect_mem_eq) 

218 
apply (rule Collect_mem_eq) 

219 
done 

11979  220 

221 
lemma Collect_cong: "(!!x. P x = Q x) ==> {x. P(x)} = {x. Q(x)}" 

222 
by simp 

223 

12257  224 
lemmas CollectE = CollectD [elim_format] 
11979  225 

226 

227 
subsubsection {* Bounded quantifiers *} 

228 

229 
lemma ballI [intro!]: "(!!x. x:A ==> P x) ==> ALL x:A. P x" 

230 
by (simp add: Ball_def) 

231 

232 
lemmas strip = impI allI ballI 

233 

234 
lemma bspec [dest?]: "ALL x:A. P x ==> x:A ==> P x" 

235 
by (simp add: Ball_def) 

236 

237 
lemma ballE [elim]: "ALL x:A. P x ==> (P x ==> Q) ==> (x ~: A ==> Q) ==> Q" 

238 
by (unfold Ball_def) blast 

239 

240 
text {* 

241 
\medskip This tactic takes assumptions @{prop "ALL x:A. P x"} and 

242 
@{prop "a:A"}; creates assumption @{prop "P a"}. 

243 
*} 

244 

245 
ML {* 

246 
local val ballE = thm "ballE" 

247 
in fun ball_tac i = etac ballE i THEN contr_tac (i + 1) end; 

248 
*} 

249 

250 
text {* 

251 
Gives better instantiation for bound: 

252 
*} 

253 

254 
ML_setup {* 

255 
claset_ref() := claset() addbefore ("bspec", datac (thm "bspec") 1); 

256 
*} 

257 

258 
lemma bexI [intro]: "P x ==> x:A ==> EX x:A. P x" 

259 
 {* Normally the best argument order: @{prop "P x"} constrains the 

260 
choice of @{prop "x:A"}. *} 

261 
by (unfold Bex_def) blast 

262 

263 
lemma rev_bexI: "x:A ==> P x ==> EX x:A. P x" 

264 
 {* The best argument order when there is only one @{prop "x:A"}. *} 

265 
by (unfold Bex_def) blast 

266 

267 
lemma bexCI: "(ALL x:A. ~P x ==> P a) ==> a:A ==> EX x:A. P x" 

268 
by (unfold Bex_def) blast 

269 

270 
lemma bexE [elim!]: "EX x:A. P x ==> (!!x. x:A ==> P x ==> Q) ==> Q" 

271 
by (unfold Bex_def) blast 

272 

273 
lemma ball_triv [simp]: "(ALL x:A. P) = ((EX x. x:A) > P)" 

274 
 {* Trival rewrite rule. *} 

275 
by (simp add: Ball_def) 

276 

277 
lemma bex_triv [simp]: "(EX x:A. P) = ((EX x. x:A) & P)" 

278 
 {* Dual form for existentials. *} 

279 
by (simp add: Bex_def) 

280 

281 
lemma bex_triv_one_point1 [simp]: "(EX x:A. x = a) = (a:A)" 

282 
by blast 

283 

284 
lemma bex_triv_one_point2 [simp]: "(EX x:A. a = x) = (a:A)" 

285 
by blast 

286 

287 
lemma bex_one_point1 [simp]: "(EX x:A. x = a & P x) = (a:A & P a)" 

288 
by blast 

289 

290 
lemma bex_one_point2 [simp]: "(EX x:A. a = x & P x) = (a:A & P a)" 

291 
by blast 

292 

293 
lemma ball_one_point1 [simp]: "(ALL x:A. x = a > P x) = (a:A > P a)" 

294 
by blast 

295 

296 
lemma ball_one_point2 [simp]: "(ALL x:A. a = x > P x) = (a:A > P a)" 

297 
by blast 

298 

299 
ML_setup {* 

300 
let 

301 
val Ball_def = thm "Ball_def"; 

302 
val Bex_def = thm "Bex_def"; 

303 

304 
val ex_pattern = Thm.read_cterm (Theory.sign_of (the_context ())) 

305 
("EX x:A. P x & Q x", HOLogic.boolT); 

306 

307 
val prove_bex_tac = 

308 
rewrite_goals_tac [Bex_def] THEN Quantifier1.prove_one_point_ex_tac; 

309 
val rearrange_bex = Quantifier1.rearrange_bex prove_bex_tac; 

310 

311 
val all_pattern = Thm.read_cterm (Theory.sign_of (the_context ())) 

312 
("ALL x:A. P x > Q x", HOLogic.boolT); 

313 

314 
val prove_ball_tac = 

315 
rewrite_goals_tac [Ball_def] THEN Quantifier1.prove_one_point_all_tac; 

316 
val rearrange_ball = Quantifier1.rearrange_ball prove_ball_tac; 

317 

318 
val defBEX_regroup = mk_simproc "defined BEX" [ex_pattern] rearrange_bex; 

319 
val defBALL_regroup = mk_simproc "defined BALL" [all_pattern] rearrange_ball; 

320 
in 

321 
Addsimprocs [defBALL_regroup, defBEX_regroup] 

322 
end; 

323 
*} 

324 

325 

326 
subsubsection {* Congruence rules *} 

327 

328 
lemma ball_cong [cong]: 

329 
"A = B ==> (!!x. x:B ==> P x = Q x) ==> 

330 
(ALL x:A. P x) = (ALL x:B. Q x)" 

331 
by (simp add: Ball_def) 

332 

333 
lemma bex_cong [cong]: 

334 
"A = B ==> (!!x. x:B ==> P x = Q x) ==> 

335 
(EX x:A. P x) = (EX x:B. Q x)" 

336 
by (simp add: Bex_def cong: conj_cong) 

1273  337 

7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

338 

11979  339 
subsubsection {* Subsets *} 
340 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

341 
lemma subsetI [intro!]: "(!!x. x:A ==> x:B) ==> A \<subseteq> B" 
11979  342 
by (simp add: subset_def) 
343 

344 
text {* 

345 
\medskip Map the type @{text "'a set => anything"} to just @{typ 

346 
'a}; for overloading constants whose first argument has type @{typ 

347 
"'a set"}. 

348 
*} 

349 

350 
ML {* 

351 
fun overload_1st_set s = Blast.overloaded (s, HOLogic.dest_setT o domain_type); 

352 
*} 

353 

354 
ML " 

355 
(* While (:) is not, its type must be kept 

356 
for overloading of = to work. *) 

357 
Blast.overloaded (\"op :\", domain_type); 

358 

359 
overload_1st_set \"Ball\"; (*need UNION, INTER also?*) 

360 
overload_1st_set \"Bex\"; 

361 

362 
(*Image: retain the type of the set being expressed*) 

363 
Blast.overloaded (\"image\", domain_type); 

364 
" 

365 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

366 
lemma subsetD [elim]: "A \<subseteq> B ==> c \<in> A ==> c \<in> B" 
11979  367 
 {* Rule in Modus Ponens style. *} 
368 
by (unfold subset_def) blast 

369 

370 
declare subsetD [intro?]  FIXME 

371 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

372 
lemma rev_subsetD: "c \<in> A ==> A \<subseteq> B ==> c \<in> B" 
11979  373 
 {* The same, with reversed premises for use with @{text erule}  
374 
cf @{text rev_mp}. *} 

375 
by (rule subsetD) 

376 

377 
declare rev_subsetD [intro?]  FIXME 

378 

379 
text {* 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

380 
\medskip Converts @{prop "A \<subseteq> B"} to @{prop "x \<in> A ==> x \<in> B"}. 
11979  381 
*} 
382 

383 
ML {* 

384 
local val rev_subsetD = thm "rev_subsetD" 

385 
in fun impOfSubs th = th RSN (2, rev_subsetD) end; 

386 
*} 

387 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

388 
lemma subsetCE [elim]: "A \<subseteq> B ==> (c \<notin> A ==> P) ==> (c \<in> B ==> P) ==> P" 
11979  389 
 {* Classical elimination rule. *} 
390 
by (unfold subset_def) blast 

391 

392 
text {* 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

393 
\medskip Takes assumptions @{prop "A \<subseteq> B"}; @{prop "c \<in> A"} and 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

394 
creates the assumption @{prop "c \<in> B"}. 
11979  395 
*} 
396 

397 
ML {* 

398 
local val subsetCE = thm "subsetCE" 

399 
in fun set_mp_tac i = etac subsetCE i THEN mp_tac i end; 

400 
*} 

401 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

402 
lemma contra_subsetD: "A \<subseteq> B ==> c \<notin> B ==> c \<notin> A" 
11979  403 
by blast 
404 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

405 
lemma subset_refl: "A \<subseteq> A" 
11979  406 
by fast 
407 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

408 
lemma subset_trans: "A \<subseteq> B ==> B \<subseteq> C ==> A \<subseteq> C" 
11979  409 
by blast 
923  410 

2261  411 

11979  412 
subsubsection {* Equality *} 
413 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

414 
lemma subset_antisym [intro!]: "A \<subseteq> B ==> B \<subseteq> A ==> A = B" 
11979  415 
 {* Antisymmetry of the subset relation. *} 
12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

416 
by (rules intro: set_ext subsetD) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

417 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

418 
lemmas equalityI [intro!] = subset_antisym 
11979  419 

420 
text {* 

421 
\medskip Equality rules from ZF set theory  are they appropriate 

422 
here? 

423 
*} 

424 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

425 
lemma equalityD1: "A = B ==> A \<subseteq> B" 
11979  426 
by (simp add: subset_refl) 
427 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

428 
lemma equalityD2: "A = B ==> B \<subseteq> A" 
11979  429 
by (simp add: subset_refl) 
430 

431 
text {* 

432 
\medskip Be careful when adding this to the claset as @{text 

433 
subset_empty} is in the simpset: @{prop "A = {}"} goes to @{prop "{} 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

434 
\<subseteq> A"} and @{prop "A \<subseteq> {}"} and then back to @{prop "A = {}"}! 
11979  435 
*} 
436 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

437 
lemma equalityE: "A = B ==> (A \<subseteq> B ==> B \<subseteq> A ==> P) ==> P" 
11979  438 
by (simp add: subset_refl) 
923  439 

11979  440 
lemma equalityCE [elim]: 
12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

441 
"A = B ==> (c \<in> A ==> c \<in> B ==> P) ==> (c \<notin> A ==> c \<notin> B ==> P) ==> P" 
11979  442 
by blast 
443 

444 
text {* 

445 
\medskip Lemma for creating induction formulae  for "pattern 

446 
matching" on @{text p}. To make the induction hypotheses usable, 

447 
apply @{text spec} or @{text bspec} to put universal quantifiers over the free 

448 
variables in @{text p}. 

449 
*} 

450 

451 
lemma setup_induction: "p:A ==> (!!z. z:A ==> p = z > R) ==> R" 

452 
by simp 

923  453 

11979  454 
lemma eqset_imp_iff: "A = B ==> (x : A) = (x : B)" 
455 
by simp 

456 

457 

458 
subsubsection {* The universal set  UNIV *} 

459 

460 
lemma UNIV_I [simp]: "x : UNIV" 

461 
by (simp add: UNIV_def) 

462 

463 
declare UNIV_I [intro]  {* unsafe makes it less likely to cause problems *} 

464 

465 
lemma UNIV_witness [intro?]: "EX x. x : UNIV" 

466 
by simp 

467 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

468 
lemma subset_UNIV: "A \<subseteq> UNIV" 
11979  469 
by (rule subsetI) (rule UNIV_I) 
2388  470 

11979  471 
text {* 
472 
\medskip Etacontracting these two rules (to remove @{text P}) 

473 
causes them to be ignored because of their interaction with 

474 
congruence rules. 

475 
*} 

476 

477 
lemma ball_UNIV [simp]: "Ball UNIV P = All P" 

478 
by (simp add: Ball_def) 

479 

480 
lemma bex_UNIV [simp]: "Bex UNIV P = Ex P" 

481 
by (simp add: Bex_def) 

482 

483 

484 
subsubsection {* The empty set *} 

485 

486 
lemma empty_iff [simp]: "(c : {}) = False" 

487 
by (simp add: empty_def) 

488 

489 
lemma emptyE [elim!]: "a : {} ==> P" 

490 
by simp 

491 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

492 
lemma empty_subsetI [iff]: "{} \<subseteq> A" 
11979  493 
 {* One effect is to delete the ASSUMPTION @{prop "{} <= A"} *} 
494 
by blast 

495 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

496 
lemma equals0I: "(!!y. y \<in> A ==> False) ==> A = {}" 
11979  497 
by blast 
2388  498 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

499 
lemma equals0D: "A = {} ==> a \<notin> A" 
11979  500 
 {* Use for reasoning about disjointness: @{prop "A Int B = {}"} *} 
501 
by blast 

502 

503 
lemma ball_empty [simp]: "Ball {} P = True" 

504 
by (simp add: Ball_def) 

505 

506 
lemma bex_empty [simp]: "Bex {} P = False" 

507 
by (simp add: Bex_def) 

508 

509 
lemma UNIV_not_empty [iff]: "UNIV ~= {}" 

510 
by (blast elim: equalityE) 

511 

512 

12023  513 
subsubsection {* The Powerset operator  Pow *} 
11979  514 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

515 
lemma Pow_iff [iff]: "(A \<in> Pow B) = (A \<subseteq> B)" 
11979  516 
by (simp add: Pow_def) 
517 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

518 
lemma PowI: "A \<subseteq> B ==> A \<in> Pow B" 
11979  519 
by (simp add: Pow_def) 
520 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

521 
lemma PowD: "A \<in> Pow B ==> A \<subseteq> B" 
11979  522 
by (simp add: Pow_def) 
523 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

524 
lemma Pow_bottom: "{} \<in> Pow B" 
11979  525 
by simp 
526 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

527 
lemma Pow_top: "A \<in> Pow A" 
11979  528 
by (simp add: subset_refl) 
2684  529 

2388  530 

11979  531 
subsubsection {* Set complement *} 
532 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

533 
lemma Compl_iff [simp]: "(c \<in> A) = (c \<notin> A)" 
11979  534 
by (unfold Compl_def) blast 
535 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

536 
lemma ComplI [intro!]: "(c \<in> A ==> False) ==> c \<in> A" 
11979  537 
by (unfold Compl_def) blast 
538 

539 
text {* 

540 
\medskip This form, with negated conclusion, works well with the 

541 
Classical prover. Negated assumptions behave like formulae on the 

542 
right side of the notional turnstile ... *} 

543 

544 
lemma ComplD: "c : A ==> c~:A" 

545 
by (unfold Compl_def) blast 

546 

547 
lemmas ComplE [elim!] = ComplD [elim_format] 

548 

549 

550 
subsubsection {* Binary union  Un *} 

923  551 

11979  552 
lemma Un_iff [simp]: "(c : A Un B) = (c:A  c:B)" 
553 
by (unfold Un_def) blast 

554 

555 
lemma UnI1 [elim?]: "c:A ==> c : A Un B" 

556 
by simp 

557 

558 
lemma UnI2 [elim?]: "c:B ==> c : A Un B" 

559 
by simp 

923  560 

11979  561 
text {* 
562 
\medskip Classical introduction rule: no commitment to @{prop A} vs 

563 
@{prop B}. 

564 
*} 

565 

566 
lemma UnCI [intro!]: "(c~:B ==> c:A) ==> c : A Un B" 

567 
by auto 

568 

569 
lemma UnE [elim!]: "c : A Un B ==> (c:A ==> P) ==> (c:B ==> P) ==> P" 

570 
by (unfold Un_def) blast 

571 

572 

12023  573 
subsubsection {* Binary intersection  Int *} 
923  574 

11979  575 
lemma Int_iff [simp]: "(c : A Int B) = (c:A & c:B)" 
576 
by (unfold Int_def) blast 

577 

578 
lemma IntI [intro!]: "c:A ==> c:B ==> c : A Int B" 

579 
by simp 

580 

581 
lemma IntD1: "c : A Int B ==> c:A" 

582 
by simp 

583 

584 
lemma IntD2: "c : A Int B ==> c:B" 

585 
by simp 

586 

587 
lemma IntE [elim!]: "c : A Int B ==> (c:A ==> c:B ==> P) ==> P" 

588 
by simp 

589 

590 

12023  591 
subsubsection {* Set difference *} 
11979  592 

593 
lemma Diff_iff [simp]: "(c : A  B) = (c:A & c~:B)" 

594 
by (unfold set_diff_def) blast 

923  595 

11979  596 
lemma DiffI [intro!]: "c : A ==> c ~: B ==> c : A  B" 
597 
by simp 

598 

599 
lemma DiffD1: "c : A  B ==> c : A" 

600 
by simp 

601 

602 
lemma DiffD2: "c : A  B ==> c : B ==> P" 

603 
by simp 

604 

605 
lemma DiffE [elim!]: "c : A  B ==> (c:A ==> c~:B ==> P) ==> P" 

606 
by simp 

607 

608 

609 
subsubsection {* Augmenting a set  insert *} 

610 

611 
lemma insert_iff [simp]: "(a : insert b A) = (a = b  a:A)" 

612 
by (unfold insert_def) blast 

613 

614 
lemma insertI1: "a : insert a B" 

615 
by simp 

616 

617 
lemma insertI2: "a : B ==> a : insert b B" 

618 
by simp 

923  619 

11979  620 
lemma insertE [elim!]: "a : insert b A ==> (a = b ==> P) ==> (a:A ==> P) ==> P" 
621 
by (unfold insert_def) blast 

622 

623 
lemma insertCI [intro!]: "(a~:B ==> a = b) ==> a: insert b B" 

624 
 {* Classical introduction rule. *} 

625 
by auto 

626 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

627 
lemma subset_insert_iff: "(A \<subseteq> insert x B) = (if x:A then A  {x} \<subseteq> B else A \<subseteq> B)" 
11979  628 
by auto 
629 

630 

631 
subsubsection {* Singletons, using insert *} 

632 

633 
lemma singletonI [intro!]: "a : {a}" 

634 
 {* Redundant? But unlike @{text insertCI}, it proves the subgoal immediately! *} 

635 
by (rule insertI1) 

636 

637 
lemma singletonD: "b : {a} ==> b = a" 

638 
by blast 

639 

640 
lemmas singletonE [elim!] = singletonD [elim_format] 

641 

642 
lemma singleton_iff: "(b : {a}) = (b = a)" 

643 
by blast 

644 

645 
lemma singleton_inject [dest!]: "{a} = {b} ==> a = b" 

646 
by blast 

647 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

648 
lemma singleton_insert_inj_eq [iff]: "({b} = insert a A) = (a = b & A \<subseteq> {b})" 
11979  649 
by blast 
650 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

651 
lemma singleton_insert_inj_eq' [iff]: "(insert a A = {b}) = (a = b & A \<subseteq> {b})" 
11979  652 
by blast 
653 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

654 
lemma subset_singletonD: "A \<subseteq> {x} ==> A = {}  A = {x}" 
11979  655 
by fast 
656 

657 
lemma singleton_conv [simp]: "{x. x = a} = {a}" 

658 
by blast 

659 

660 
lemma singleton_conv2 [simp]: "{x. a = x} = {a}" 

661 
by blast 

923  662 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

663 
lemma diff_single_insert: "A  {x} \<subseteq> B ==> x \<in> A ==> A \<subseteq> insert x B" 
11979  664 
by blast 
665 

666 

667 
subsubsection {* Unions of families *} 

668 

669 
text {* 

670 
@{term [source] "UN x:A. B x"} is @{term "Union (B`A)"}. 

671 
*} 

672 

673 
lemma UN_iff [simp]: "(b: (UN x:A. B x)) = (EX x:A. b: B x)" 

674 
by (unfold UNION_def) blast 

675 

676 
lemma UN_I [intro]: "a:A ==> b: B a ==> b: (UN x:A. B x)" 

677 
 {* The order of the premises presupposes that @{term A} is rigid; 

678 
@{term b} may be flexible. *} 

679 
by auto 

680 

681 
lemma UN_E [elim!]: "b : (UN x:A. B x) ==> (!!x. x:A ==> b: B x ==> R) ==> R" 

682 
by (unfold UNION_def) blast 

923  683 

11979  684 
lemma UN_cong [cong]: 
685 
"A = B ==> (!!x. x:B ==> C x = D x) ==> (UN x:A. C x) = (UN x:B. D x)" 

686 
by (simp add: UNION_def) 

687 

688 

689 
subsubsection {* Intersections of families *} 

690 

691 
text {* @{term [source] "INT x:A. B x"} is @{term "Inter (B`A)"}. *} 

692 

693 
lemma INT_iff [simp]: "(b: (INT x:A. B x)) = (ALL x:A. b: B x)" 

694 
by (unfold INTER_def) blast 

923  695 

11979  696 
lemma INT_I [intro!]: "(!!x. x:A ==> b: B x) ==> b : (INT x:A. B x)" 
697 
by (unfold INTER_def) blast 

698 

699 
lemma INT_D [elim]: "b : (INT x:A. B x) ==> a:A ==> b: B a" 

700 
by auto 

701 

702 
lemma INT_E [elim]: "b : (INT x:A. B x) ==> (b: B a ==> R) ==> (a~:A ==> R) ==> R" 

703 
 {* "Classical" elimination  by the Excluded Middle on @{prop "a:A"}. *} 

704 
by (unfold INTER_def) blast 

705 

706 
lemma INT_cong [cong]: 

707 
"A = B ==> (!!x. x:B ==> C x = D x) ==> (INT x:A. C x) = (INT x:B. D x)" 

708 
by (simp add: INTER_def) 

7238
36e58620ffc8
replaced HOL_quantifiers flag by "HOL" print mode;
wenzelm
parents:
5931
diff
changeset

709 

923  710 

11979  711 
subsubsection {* Union *} 
712 

713 
lemma Union_iff [simp]: "(A : Union C) = (EX X:C. A:X)" 

714 
by (unfold Union_def) blast 

715 

716 
lemma UnionI [intro]: "X:C ==> A:X ==> A : Union C" 

717 
 {* The order of the premises presupposes that @{term C} is rigid; 

718 
@{term A} may be flexible. *} 

719 
by auto 

720 

721 
lemma UnionE [elim!]: "A : Union C ==> (!!X. A:X ==> X:C ==> R) ==> R" 

722 
by (unfold Union_def) blast 

723 

724 

725 
subsubsection {* Inter *} 

726 

727 
lemma Inter_iff [simp]: "(A : Inter C) = (ALL X:C. A:X)" 

728 
by (unfold Inter_def) blast 

729 

730 
lemma InterI [intro!]: "(!!X. X:C ==> A:X) ==> A : Inter C" 

731 
by (simp add: Inter_def) 

732 

733 
text {* 

734 
\medskip A ``destruct'' rule  every @{term X} in @{term C} 

735 
contains @{term A} as an element, but @{prop "A:X"} can hold when 

736 
@{prop "X:C"} does not! This rule is analogous to @{text spec}. 

737 
*} 

738 

739 
lemma InterD [elim]: "A : Inter C ==> X:C ==> A:X" 

740 
by auto 

741 

742 
lemma InterE [elim]: "A : Inter C ==> (X~:C ==> R) ==> (A:X ==> R) ==> R" 

743 
 {* ``Classical'' elimination rule  does not require proving 

744 
@{prop "X:C"}. *} 

745 
by (unfold Inter_def) blast 

746 

747 
text {* 

748 
\medskip Image of a set under a function. Frequently @{term b} does 

749 
not have the syntactic form of @{term "f x"}. 

750 
*} 

751 

752 
lemma image_eqI [simp, intro]: "b = f x ==> x:A ==> b : f`A" 

753 
by (unfold image_def) blast 

754 

755 
lemma imageI: "x : A ==> f x : f ` A" 

756 
by (rule image_eqI) (rule refl) 

757 

758 
lemma rev_image_eqI: "x:A ==> b = f x ==> b : f`A" 

759 
 {* This version's more effective when we already have the 

760 
required @{term x}. *} 

761 
by (unfold image_def) blast 

762 

763 
lemma imageE [elim!]: 

764 
"b : (%x. f x)`A ==> (!!x. b = f x ==> x:A ==> P) ==> P" 

765 
 {* The etaexpansion gives variablename preservation. *} 

766 
by (unfold image_def) blast 

767 

768 
lemma image_Un: "f`(A Un B) = f`A Un f`B" 

769 
by blast 

770 

771 
lemma image_iff: "(z : f`A) = (EX x:A. z = f x)" 

772 
by blast 

773 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

774 
lemma image_subset_iff: "(f`A \<subseteq> B) = (\<forall>x\<in>A. f x \<in> B)" 
11979  775 
 {* This rewrite rule would confuse users if made default. *} 
776 
by blast 

777 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

778 
lemma subset_image_iff: "(B \<subseteq> f`A) = (EX AA. AA \<subseteq> A & B = f`AA)" 
11979  779 
apply safe 
780 
prefer 2 apply fast 

781 
apply (rule_tac x = "{a. a : A & f a : B}" in exI) 

782 
apply fast 

783 
done 

784 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

785 
lemma image_subsetI: "(!!x. x \<in> A ==> f x \<in> B) ==> f`A \<subseteq> B" 
11979  786 
 {* Replaces the three steps @{text subsetI}, @{text imageE}, 
787 
@{text hypsubst}, but breaks too many existing proofs. *} 

788 
by blast 

789 

790 
text {* 

791 
\medskip Range of a function  just a translation for image! 

792 
*} 

793 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

794 
lemma range_eqI: "b = f x ==> b \<in> range f" 
11979  795 
by simp 
796 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

797 
lemma rangeI: "f x \<in> range f" 
11979  798 
by simp 
799 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

800 
lemma rangeE [elim?]: "b \<in> range (\<lambda>x. f x) ==> (!!x. b = f x ==> P) ==> P" 
11979  801 
by blast 
802 

803 

804 
subsubsection {* Set reasoning tools *} 

805 

806 
text {* 

807 
Rewrite rules for boolean casesplitting: faster than @{text 

808 
"split_if [split]"}. 

809 
*} 

810 

811 
lemma split_if_eq1: "((if Q then x else y) = b) = ((Q > x = b) & (~ Q > y = b))" 

812 
by (rule split_if) 

813 

814 
lemma split_if_eq2: "(a = (if Q then x else y)) = ((Q > a = x) & (~ Q > a = y))" 

815 
by (rule split_if) 

816 

817 
text {* 

818 
Split ifs on either side of the membership relation. Not for @{text 

819 
"[simp]"}  can cause goals to blow up! 

820 
*} 

821 

822 
lemma split_if_mem1: "((if Q then x else y) : b) = ((Q > x : b) & (~ Q > y : b))" 

823 
by (rule split_if) 

824 

825 
lemma split_if_mem2: "(a : (if Q then x else y)) = ((Q > a : x) & (~ Q > a : y))" 

826 
by (rule split_if) 

827 

828 
lemmas split_ifs = if_bool_eq_conj split_if_eq1 split_if_eq2 split_if_mem1 split_if_mem2 

829 

830 
lemmas mem_simps = 

831 
insert_iff empty_iff Un_iff Int_iff Compl_iff Diff_iff 

832 
mem_Collect_eq UN_iff Union_iff INT_iff Inter_iff 

833 
 {* Each of these has ALREADY been added @{text "[simp]"} above. *} 

834 

835 
(*Would like to add these, but the existing code only searches for the 

836 
outerlevel constant, which in this case is just "op :"; we instead need 

837 
to use termnets to associate patterns with rules. Also, if a rule fails to 

838 
apply, then the formula should be kept. 

839 
[("uminus", Compl_iff RS iffD1), ("op ", [Diff_iff RS iffD1]), 

840 
("op Int", [IntD1,IntD2]), 

841 
("Collect", [CollectD]), ("Inter", [InterD]), ("INTER", [INT_D])] 

842 
*) 

843 

844 
ML_setup {* 

845 
val mksimps_pairs = [("Ball", [thm "bspec"])] @ mksimps_pairs; 

846 
simpset_ref() := simpset() setmksimps (mksimps mksimps_pairs); 

847 
*} 

848 

849 
declare subset_UNIV [simp] subset_refl [simp] 

850 

851 

852 
subsubsection {* The ``proper subset'' relation *} 

853 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

854 
lemma psubsetI [intro!]: "A \<subseteq> B ==> A \<noteq> B ==> A \<subset> B" 
11979  855 
by (unfold psubset_def) blast 
856 

857 
lemma psubset_insert_iff: 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

858 
"(A \<subset> insert x B) = (if x \<in> B then A \<subset> B else if x \<in> A then A  {x} \<subset> B else A \<subseteq> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

859 
by (auto simp add: psubset_def subset_insert_iff) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

860 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

861 
lemma psubset_eq: "(A \<subset> B) = (A \<subseteq> B & A \<noteq> B)" 
11979  862 
by (simp only: psubset_def) 
863 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

864 
lemma psubset_imp_subset: "A \<subset> B ==> A \<subseteq> B" 
11979  865 
by (simp add: psubset_eq) 
866 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

867 
lemma psubset_subset_trans: "A \<subset> B ==> B \<subseteq> C ==> A \<subset> C" 
11979  868 
by (auto simp add: psubset_eq) 
869 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

870 
lemma subset_psubset_trans: "A \<subseteq> B ==> B \<subset> C ==> A \<subset> C" 
11979  871 
by (auto simp add: psubset_eq) 
872 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

873 
lemma psubset_imp_ex_mem: "A \<subset> B ==> \<exists>b. b \<in> (B  A)" 
11979  874 
by (unfold psubset_def) blast 
875 

876 
lemma atomize_ball: 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

877 
"(!!x. x \<in> A ==> P x) == Trueprop (\<forall>x\<in>A. P x)" 
11979  878 
by (simp only: Ball_def atomize_all atomize_imp) 
879 

880 
declare atomize_ball [symmetric, rulify] 

881 

882 

883 
subsection {* Further settheory lemmas *} 

884 

12897
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

885 
subsubsection {* Derived rules involving subsets. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

886 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

887 
text {* @{text insert}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

888 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

889 
lemma subset_insertI: "B \<subseteq> insert a B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

890 
apply (rule subsetI) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

891 
apply (erule insertI2) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

892 
done 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

893 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

894 
lemma subset_insert: "x \<notin> A ==> (A \<subseteq> insert x B) = (A \<subseteq> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

895 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

896 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

897 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

898 
text {* \medskip Big Union  least upper bound of a set. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

899 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

900 
lemma Union_upper: "B \<in> A ==> B \<subseteq> Union A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

901 
by (rules intro: subsetI UnionI) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

902 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

903 
lemma Union_least: "(!!X. X \<in> A ==> X \<subseteq> C) ==> Union A \<subseteq> C" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

904 
by (rules intro: subsetI elim: UnionE dest: subsetD) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

905 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

906 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

907 
text {* \medskip General union. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

908 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

909 
lemma UN_upper: "a \<in> A ==> B a \<subseteq> (\<Union>x\<in>A. B x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

910 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

911 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

912 
lemma UN_least: "(!!x. x \<in> A ==> B x \<subseteq> C) ==> (\<Union>x\<in>A. B x) \<subseteq> C" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

913 
by (rules intro: subsetI elim: UN_E dest: subsetD) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

914 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

915 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

916 
text {* \medskip Big Intersection  greatest lower bound of a set. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

917 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

918 
lemma Inter_lower: "B \<in> A ==> Inter A \<subseteq> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

919 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

920 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

921 
lemma Inter_greatest: "(!!X. X \<in> A ==> C \<subseteq> X) ==> C \<subseteq> Inter A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

922 
by (rules intro: InterI subsetI dest: subsetD) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

923 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

924 
lemma INT_lower: "a \<in> A ==> (\<Inter>x\<in>A. B x) \<subseteq> B a" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

925 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

926 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

927 
lemma INT_greatest: "(!!x. x \<in> A ==> C \<subseteq> B x) ==> C \<subseteq> (\<Inter>x\<in>A. B x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

928 
by (rules intro: INT_I subsetI dest: subsetD) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

929 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

930 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

931 
text {* \medskip Finite Union  the least upper bound of two sets. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

932 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

933 
lemma Un_upper1: "A \<subseteq> A \<union> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

934 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

935 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

936 
lemma Un_upper2: "B \<subseteq> A \<union> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

937 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

938 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

939 
lemma Un_least: "A \<subseteq> C ==> B \<subseteq> C ==> A \<union> B \<subseteq> C" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

940 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

941 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

942 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

943 
text {* \medskip Finite Intersection  the greatest lower bound of two sets. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

944 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

945 
lemma Int_lower1: "A \<inter> B \<subseteq> A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

946 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

947 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

948 
lemma Int_lower2: "A \<inter> B \<subseteq> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

949 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

950 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

951 
lemma Int_greatest: "C \<subseteq> A ==> C \<subseteq> B ==> C \<subseteq> A \<inter> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

952 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

953 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

954 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

955 
text {* \medskip Set difference. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

956 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

957 
lemma Diff_subset: "A  B \<subseteq> A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

958 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

959 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

960 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

961 
text {* \medskip Monotonicity. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

962 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

963 
lemma mono_Un: "mono f ==> f A \<union> f B \<subseteq> f (A \<union> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

964 
apply (rule Un_least) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

965 
apply (erule Un_upper1 [THEN [2] monoD]) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

966 
apply (erule Un_upper2 [THEN [2] monoD]) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

967 
done 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

968 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

969 
lemma mono_Int: "mono f ==> f (A \<inter> B) \<subseteq> f A \<inter> f B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

970 
apply (rule Int_greatest) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

971 
apply (erule Int_lower1 [THEN [2] monoD]) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

972 
apply (erule Int_lower2 [THEN [2] monoD]) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

973 
done 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

974 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

975 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

976 
subsubsection {* Equalities involving union, intersection, inclusion, etc. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

977 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

978 
text {* @{text "{}"}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

979 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

980 
lemma Collect_const [simp]: "{s. P} = (if P then UNIV else {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

981 
 {* supersedes @{text "Collect_False_empty"} *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

982 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

983 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

984 
lemma subset_empty [simp]: "(A \<subseteq> {}) = (A = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

985 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

986 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

987 
lemma not_psubset_empty [iff]: "\<not> (A < {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

988 
by (unfold psubset_def) blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

989 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

990 
lemma Collect_empty_eq [simp]: "(Collect P = {}) = (\<forall>x. \<not> P x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

991 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

992 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

993 
lemma Collect_neg_eq: "{x. \<not> P x} =  {x. P x}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

994 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

995 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

996 
lemma Collect_disj_eq: "{x. P x  Q x} = {x. P x} \<union> {x. Q x}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

997 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

998 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

999 
lemma Collect_conj_eq: "{x. P x & Q x} = {x. P x} \<inter> {x. Q x}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1000 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1001 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1002 
lemma Collect_all_eq: "{x. \<forall>y. P x y} = (\<Inter>y. {x. P x y})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1003 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1004 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1005 
lemma Collect_ball_eq: "{x. \<forall>y\<in>A. P x y} = (\<Inter>y\<in>A. {x. P x y})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1006 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1007 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1008 
lemma Collect_ex_eq: "{x. \<exists>y. P x y} = (\<Union>y. {x. P x y})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1009 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1010 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1011 
lemma Collect_bex_eq: "{x. \<exists>y\<in>A. P x y} = (\<Union>y\<in>A. {x. P x y})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1012 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1013 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1014 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1015 
text {* \medskip @{text insert}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1016 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1017 
lemma insert_is_Un: "insert a A = {a} Un A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1018 
 {* NOT SUITABLE FOR REWRITING since @{text "{a} == insert a {}"} *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1019 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1020 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1021 
lemma insert_not_empty [simp]: "insert a A \<noteq> {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1022 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1023 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1024 
lemmas empty_not_insert [simp] = insert_not_empty [symmetric, standard] 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1025 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1026 
lemma insert_absorb: "a \<in> A ==> insert a A = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1027 
 {* @{text "[simp]"} causes recursive calls when there are nested inserts *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1028 
 {* with \emph{quadratic} running time *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1029 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1030 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1031 
lemma insert_absorb2 [simp]: "insert x (insert x A) = insert x A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1032 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1033 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1034 
lemma insert_commute: "insert x (insert y A) = insert y (insert x A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1035 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1036 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1037 
lemma insert_subset [simp]: "(insert x A \<subseteq> B) = (x \<in> B & A \<subseteq> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1038 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1039 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1040 
lemma mk_disjoint_insert: "a \<in> A ==> \<exists>B. A = insert a B & a \<notin> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1041 
 {* use new @{text B} rather than @{text "A  {a}"} to avoid infinite unfolding *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1042 
apply (rule_tac x = "A  {a}" in exI) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1043 
apply blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1044 
done 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1045 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1046 
lemma insert_Collect: "insert a (Collect P) = {u. u \<noteq> a > P u}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1047 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1048 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1049 
lemma UN_insert_distrib: "u \<in> A ==> (\<Union>x\<in>A. insert a (B x)) = insert a (\<Union>x\<in>A. B x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1050 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1051 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1052 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1053 
text {* \medskip @{text image}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1054 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1055 
lemma image_empty [simp]: "f`{} = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1056 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1057 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1058 
lemma image_insert [simp]: "f ` insert a B = insert (f a) (f`B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1059 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1060 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1061 
lemma image_constant: "x \<in> A ==> (\<lambda>x. c) ` A = {c}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1062 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1063 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1064 
lemma image_image: "f ` (g ` A) = (\<lambda>x. f (g x)) ` A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1065 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1066 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1067 
lemma insert_image [simp]: "x \<in> A ==> insert (f x) (f`A) = f`A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1068 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1069 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1070 
lemma image_is_empty [iff]: "(f`A = {}) = (A = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1071 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1072 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1073 
lemma image_Collect: "f ` {x. P x} = {f x  x. P x}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1074 
 {* NOT suitable as a default simprule: the RHS isn't simpler than the LHS, *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1075 
 {* with its implicit quantifier and conjunction. Also image enjoys better *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1076 
 {* equational properties than does the RHS. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1077 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1078 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1079 
lemma if_image_distrib [simp]: 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1080 
"(\<lambda>x. if P x then f x else g x) ` S 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1081 
= (f ` (S \<inter> {x. P x})) \<union> (g ` (S \<inter> {x. \<not> P x}))" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1082 
by (auto simp add: image_def) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1083 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1084 
lemma image_cong: "M = N ==> (!!x. x \<in> N ==> f x = g x) ==> f`M = g`N" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1085 
by (simp add: image_def) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1086 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1087 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1088 
text {* \medskip @{text range}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1089 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1090 
lemma full_SetCompr_eq: "{u. \<exists>x. u = f x} = range f" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1091 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1092 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1093 
lemma range_composition [simp]: "range (\<lambda>x. f (g x)) = f`range g" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1094 
apply (subst image_image) 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1095 
apply simp 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1096 
done 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1097 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1098 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1099 
text {* \medskip @{text Int} *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1100 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1101 
lemma Int_absorb [simp]: "A \<inter> A = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1102 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1103 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1104 
lemma Int_left_absorb: "A \<inter> (A \<inter> B) = A \<inter> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1105 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1106 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1107 
lemma Int_commute: "A \<inter> B = B \<inter> A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1108 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1109 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1110 
lemma Int_left_commute: "A \<inter> (B \<inter> C) = B \<inter> (A \<inter> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1111 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1112 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1113 
lemma Int_assoc: "(A \<inter> B) \<inter> C = A \<inter> (B \<inter> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1114 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1115 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1116 
lemmas Int_ac = Int_assoc Int_left_absorb Int_commute Int_left_commute 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1117 
 {* Intersection is an ACoperator *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1118 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1119 
lemma Int_absorb1: "B \<subseteq> A ==> A \<inter> B = B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1120 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1121 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1122 
lemma Int_absorb2: "A \<subseteq> B ==> A \<inter> B = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1123 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1124 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1125 
lemma Int_empty_left [simp]: "{} \<inter> B = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1126 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1127 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1128 
lemma Int_empty_right [simp]: "A \<inter> {} = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1129 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1130 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1131 
lemma disjoint_eq_subset_Compl: "(A \<inter> B = {}) = (A \<subseteq> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1132 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1133 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1134 
lemma disjoint_iff_not_equal: "(A \<inter> B = {}) = (\<forall>x\<in>A. \<forall>y\<in>B. x \<noteq> y)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1135 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1136 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1137 
lemma Int_UNIV_left [simp]: "UNIV \<inter> B = B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1138 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1139 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1140 
lemma Int_UNIV_right [simp]: "A \<inter> UNIV = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1141 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1142 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1143 
lemma Int_eq_Inter: "A \<inter> B = \<Inter>{A, B}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1144 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1145 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1146 
lemma Int_Un_distrib: "A \<inter> (B \<union> C) = (A \<inter> B) \<union> (A \<inter> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1147 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1148 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1149 
lemma Int_Un_distrib2: "(B \<union> C) \<inter> A = (B \<inter> A) \<union> (C \<inter> A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1150 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1151 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1152 
lemma Int_UNIV [simp]: "(A \<inter> B = UNIV) = (A = UNIV & B = UNIV)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1153 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1154 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1155 
lemma Int_subset_iff: "(C \<subseteq> A \<inter> B) = (C \<subseteq> A & C \<subseteq> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1156 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1157 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1158 
lemma Int_Collect: "(x \<in> A \<inter> {x. P x}) = (x \<in> A & P x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1159 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1160 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1161 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1162 
text {* \medskip @{text Un}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1163 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1164 
lemma Un_absorb [simp]: "A \<union> A = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1165 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1166 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1167 
lemma Un_left_absorb: "A \<union> (A \<union> B) = A \<union> B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1168 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1169 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1170 
lemma Un_commute: "A \<union> B = B \<union> A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1171 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1172 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1173 
lemma Un_left_commute: "A \<union> (B \<union> C) = B \<union> (A \<union> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1174 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1175 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1176 
lemma Un_assoc: "(A \<union> B) \<union> C = A \<union> (B \<union> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1177 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1178 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1179 
lemmas Un_ac = Un_assoc Un_left_absorb Un_commute Un_left_commute 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1180 
 {* Union is an ACoperator *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1181 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1182 
lemma Un_absorb1: "A \<subseteq> B ==> A \<union> B = B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1183 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1184 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1185 
lemma Un_absorb2: "B \<subseteq> A ==> A \<union> B = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1186 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1187 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1188 
lemma Un_empty_left [simp]: "{} \<union> B = B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1189 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1190 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1191 
lemma Un_empty_right [simp]: "A \<union> {} = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1192 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1193 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1194 
lemma Un_UNIV_left [simp]: "UNIV \<union> B = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1195 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1196 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1197 
lemma Un_UNIV_right [simp]: "A \<union> UNIV = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1198 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1199 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1200 
lemma Un_eq_Union: "A \<union> B = \<Union>{A, B}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1201 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1202 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1203 
lemma Un_insert_left [simp]: "(insert a B) \<union> C = insert a (B \<union> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1204 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1205 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1206 
lemma Un_insert_right [simp]: "A \<union> (insert a B) = insert a (A \<union> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1207 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1208 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1209 
lemma Int_insert_left: 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1210 
"(insert a B) Int C = (if a \<in> C then insert a (B \<inter> C) else B \<inter> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1211 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1212 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1213 
lemma Int_insert_right: 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1214 
"A \<inter> (insert a B) = (if a \<in> A then insert a (A \<inter> B) else A \<inter> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1215 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1216 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1217 
lemma Un_Int_distrib: "A \<union> (B \<inter> C) = (A \<union> B) \<inter> (A \<union> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1218 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1219 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1220 
lemma Un_Int_distrib2: "(B \<inter> C) \<union> A = (B \<union> A) \<inter> (C \<union> A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1221 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1222 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1223 
lemma Un_Int_crazy: 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1224 
"(A \<inter> B) \<union> (B \<inter> C) \<union> (C \<inter> A) = (A \<union> B) \<inter> (B \<union> C) \<inter> (C \<union> A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1225 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1226 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1227 
lemma subset_Un_eq: "(A \<subseteq> B) = (A \<union> B = B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1228 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1229 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1230 
lemma Un_empty [iff]: "(A \<union> B = {}) = (A = {} & B = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1231 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1232 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1233 
lemma Un_subset_iff: "(A \<union> B \<subseteq> C) = (A \<subseteq> C & B \<subseteq> C)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1234 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1235 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1236 
lemma Un_Diff_Int: "(A  B) \<union> (A \<inter> B) = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1237 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1238 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1239 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1240 
text {* \medskip Set complement *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1241 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1242 
lemma Compl_disjoint [simp]: "A \<inter> A = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1243 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1244 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1245 
lemma Compl_disjoint2 [simp]: "A \<inter> A = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1246 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1247 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1248 
lemma Compl_partition: "A \<union> (A) = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1249 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1250 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1251 
lemma double_complement [simp]: " (A) = (A::'a set)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1252 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1253 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1254 
lemma Compl_Un [simp]: "(A \<union> B) = (A) \<inter> (B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1255 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1256 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1257 
lemma Compl_Int [simp]: "(A \<inter> B) = (A) \<union> (B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1258 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1259 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1260 
lemma Compl_UN [simp]: "(\<Union>x\<in>A. B x) = (\<Inter>x\<in>A. B x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1261 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1262 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1263 
lemma Compl_INT [simp]: "(\<Inter>x\<in>A. B x) = (\<Union>x\<in>A. B x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1264 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1265 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1266 
lemma subset_Compl_self_eq: "(A \<subseteq> A) = (A = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1267 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1268 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1269 
lemma Un_Int_assoc_eq: "((A \<inter> B) \<union> C = A \<inter> (B \<union> C)) = (C \<subseteq> A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1270 
 {* Halmos, Naive Set Theory, page 16. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1271 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1272 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1273 
lemma Compl_UNIV_eq [simp]: "UNIV = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1274 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1275 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1276 
lemma Compl_empty_eq [simp]: "{} = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1277 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1278 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1279 
lemma Compl_subset_Compl_iff [iff]: "(A \<subseteq> B) = (B \<subseteq> A)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1280 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1281 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1282 
lemma Compl_eq_Compl_iff [iff]: "(A = B) = (A = (B::'a set))" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1283 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1284 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1285 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1286 
text {* \medskip @{text Union}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1287 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1288 
lemma Union_empty [simp]: "Union({}) = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1289 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1290 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1291 
lemma Union_UNIV [simp]: "Union UNIV = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1292 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1293 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1294 
lemma Union_insert [simp]: "Union (insert a B) = a \<union> \<Union>B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1295 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1296 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1297 
lemma Union_Un_distrib [simp]: "\<Union>(A Un B) = \<Union>A \<union> \<Union>B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1298 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1299 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1300 
lemma Union_Int_subset: "\<Union>(A \<inter> B) \<subseteq> \<Union>A \<inter> \<Union>B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1301 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1302 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1303 
lemma Union_empty_conv [iff]: "(\<Union>A = {}) = (\<forall>x\<in>A. x = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1304 
by auto 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1305 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1306 
lemma Union_disjoint: "(\<Union>C \<inter> A = {}) = (\<forall>B\<in>C. B \<inter> A = {})" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1307 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1308 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1309 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1310 
text {* \medskip @{text Inter}. *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1311 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1312 
lemma Inter_empty [simp]: "\<Inter>{} = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1313 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1314 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1315 
lemma Inter_UNIV [simp]: "\<Inter>UNIV = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1316 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1317 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1318 
lemma Inter_insert [simp]: "\<Inter>(insert a B) = a \<inter> \<Inter>B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1319 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1320 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1321 
lemma Inter_Un_subset: "\<Inter>A \<union> \<Inter>B \<subseteq> \<Inter>(A \<inter> B)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1322 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1323 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1324 
lemma Inter_Un_distrib: "\<Inter>(A \<union> B) = \<Inter>A \<inter> \<Inter>B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1325 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1326 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1327 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1328 
text {* 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1329 
\medskip @{text UN} and @{text INT}. 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1330 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1331 
Basic identities: *} 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1332 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1333 
lemma UN_empty [simp]: "(\<Union>x\<in>{}. B x) = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1334 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1335 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1336 
lemma UN_empty2 [simp]: "(\<Union>x\<in>A. {}) = {}" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1337 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1338 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1339 
lemma UN_singleton [simp]: "(\<Union>x\<in>A. {x}) = A" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1340 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1341 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1342 
lemma UN_absorb: "k \<in> I ==> A k \<union> (\<Union>i\<in>I. A i) = (\<Union>i\<in>I. A i)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1343 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1344 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1345 
lemma INT_empty [simp]: "(\<Inter>x\<in>{}. B x) = UNIV" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1346 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1347 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1348 
lemma INT_absorb: "k \<in> I ==> A k \<inter> (\<Inter>i\<in>I. A i) = (\<Inter>i\<in>I. A i)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1349 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1350 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1351 
lemma UN_insert [simp]: "(\<Union>x\<in>insert a A. B x) = B a \<union> UNION A B" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1352 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1353 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1354 
lemma UN_Un: "(\<Union>i \<in> A \<union> B. M i) = (\<Union>i\<in>A. M i) \<union> (\<Union>i\<in>B. M i)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1355 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1356 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1357 
lemma UN_UN_flatten: "(\<Union>x \<in> (\<Union>y\<in>A. B y). C x) = (\<Union>y\<in>A. \<Union>x\<in>B y. C x)" 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1358 
by blast 
f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1359 

f4d10ad0ea7b
converted/deleted equalities.ML, mono.ML, subset.ML (see Set.thy);
wenzelm
parents:
12633
diff
changeset

1360 
lemma UN_subset_iff: "((\<Union>i\<in>I. A i) \<subseteq> B) = (\<forall>i\<in>I. A i \<subseteq> B)" 