src/ZF/equalities.thy
author paulson
Sun Jul 14 15:14:43 2002 +0200 (2002-07-14)
changeset 13356 c9cfe1638bf2
parent 13259 01fa0c8dbc92
child 13357 6f54e992777e
permissions -rw-r--r--
improved presentation markup
paulson@13165
     1
(*  Title:      ZF/equalities
paulson@13165
     2
    ID:         $Id$
paulson@13165
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@13165
     4
    Copyright   1992  University of Cambridge
paulson@13165
     5
paulson@13165
     6
*)
paulson@13165
     7
paulson@13356
     8
header{*Basic Equalities and Inclusions*}
paulson@13356
     9
paulson@13259
    10
theory equalities = pair:
paulson@13168
    11
paulson@13356
    12
text{*These cover union, intersection, converse, domain, range, etc.  Philippe
paulson@13356
    13
de Groote proved many of the inclusions.*}
paulson@13356
    14
paulson@13174
    15
(*FIXME: move to ZF.thy or even to FOL.thy??*)
paulson@13174
    16
lemma [simp]: "((P-->Q) <-> (P-->R)) <-> (P --> (Q<->R))"
paulson@13174
    17
by blast
paulson@13174
    18
paulson@13174
    19
(*FIXME: move to ZF.thy or even to FOL.thy??*)
paulson@13174
    20
lemma not_disj_iff_imp: "~P | Q <-> (P-->Q)"
paulson@13174
    21
by blast
paulson@13174
    22
paulson@13174
    23
(*FIXME: move to upair once it's Isar format*)
paulson@13174
    24
lemma the_eq_trivial [simp]: "(THE x. x = a) = a"
paulson@13174
    25
by blast
paulson@13174
    26
paulson@13259
    27
(** Monotonicity of implications -- some could go to FOL **)
paulson@13259
    28
paulson@13259
    29
lemma in_mono: "A<=B ==> x:A --> x:B"
paulson@13259
    30
by blast
paulson@13259
    31
paulson@13259
    32
lemma conj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1&P2) --> (Q1&Q2)"
paulson@13259
    33
by fast (*or (IntPr.fast_tac 1)*)
paulson@13259
    34
paulson@13259
    35
lemma disj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1|P2) --> (Q1|Q2)"
paulson@13259
    36
by fast (*or (IntPr.fast_tac 1)*)
paulson@13259
    37
paulson@13259
    38
lemma imp_mono: "[| Q1-->P1; P2-->Q2 |] ==> (P1-->P2)-->(Q1-->Q2)"
paulson@13259
    39
by fast (*or (IntPr.fast_tac 1)*)
paulson@13259
    40
paulson@13259
    41
lemma imp_refl: "P-->P"
paulson@13259
    42
by (rule impI, assumption)
paulson@13259
    43
paulson@13259
    44
(*The quantifier monotonicity rules are also intuitionistically valid*)
paulson@13259
    45
lemma ex_mono:
paulson@13259
    46
    "[| !!x. P(x) --> Q(x) |] ==> (EX x. P(x)) --> (EX x. Q(x))"
paulson@13259
    47
by blast
paulson@13259
    48
paulson@13259
    49
lemma all_mono:
paulson@13259
    50
    "[| !!x. P(x) --> Q(x) |] ==> (ALL x. P(x)) --> (ALL x. Q(x))"
paulson@13259
    51
by blast
paulson@13259
    52
paulson@13259
    53
paulson@13174
    54
lemma the_eq_0 [simp]: "(THE x. False) = 0"
paulson@13174
    55
by (blast intro: the_0)
paulson@13168
    56
paulson@13356
    57
subsection{*Bounded Quantifiers*}
paulson@13356
    58
text {* \medskip 
paulson@13178
    59
paulson@13178
    60
  The following are not added to the default simpset because
paulson@13356
    61
  (a) they duplicate the body and (b) there are no similar rules for @{text Int}.*}
paulson@13178
    62
paulson@13178
    63
lemma ball_Un: "(\<forall>x \<in> A\<union>B. P(x)) <-> (\<forall>x \<in> A. P(x)) & (\<forall>x \<in> B. P(x))";
paulson@13178
    64
  by blast
paulson@13178
    65
paulson@13178
    66
lemma bex_Un: "(\<exists>x \<in> A\<union>B. P(x)) <-> (\<exists>x \<in> A. P(x)) | (\<exists>x \<in> B. P(x))";
paulson@13178
    67
  by blast
paulson@13178
    68
paulson@13178
    69
lemma ball_UN: "(\<forall>z \<in> (UN x:A. B(x)). P(z)) <-> (\<forall>x\<in>A. \<forall>z \<in> B(x). P(z))"
paulson@13178
    70
  by blast
paulson@13178
    71
paulson@13178
    72
lemma bex_UN: "(\<exists>z \<in> (UN x:A. B(x)). P(z)) <-> (\<exists>x\<in>A. \<exists>z\<in>B(x). P(z))"
paulson@13178
    73
  by blast
paulson@13178
    74
paulson@13356
    75
subsection{*Converse of a Relation*}
paulson@13168
    76
paulson@13168
    77
lemma converse_iff [iff]: "<a,b>: converse(r) <-> <b,a>:r"
paulson@13169
    78
by (unfold converse_def, blast)
paulson@13168
    79
paulson@13168
    80
lemma converseI: "<a,b>:r ==> <b,a>:converse(r)"
paulson@13169
    81
by (unfold converse_def, blast)
paulson@13168
    82
paulson@13168
    83
lemma converseD: "<a,b> : converse(r) ==> <b,a> : r"
paulson@13169
    84
by (unfold converse_def, blast)
paulson@13168
    85
paulson@13168
    86
lemma converseE [elim!]:
paulson@13168
    87
    "[| yx : converse(r);   
paulson@13168
    88
        !!x y. [| yx=<y,x>;  <x,y>:r |] ==> P |]
paulson@13168
    89
     ==> P"
paulson@13174
    90
by (unfold converse_def, blast) 
paulson@13168
    91
paulson@13168
    92
lemma converse_converse: "r<=Sigma(A,B) ==> converse(converse(r)) = r"
paulson@13169
    93
by blast
paulson@13168
    94
paulson@13168
    95
lemma converse_type: "r<=A*B ==> converse(r)<=B*A"
paulson@13169
    96
by blast
paulson@13168
    97
paulson@13168
    98
lemma converse_prod [simp]: "converse(A*B) = B*A"
paulson@13169
    99
by blast
paulson@13168
   100
paulson@13168
   101
lemma converse_empty [simp]: "converse(0) = 0"
paulson@13169
   102
by blast
paulson@13168
   103
paulson@13174
   104
lemma converse_subset_iff:
paulson@13174
   105
     "A <= Sigma(X,Y) ==> converse(A) <= converse(B) <-> A <= B"
paulson@13169
   106
by blast
paulson@13168
   107
paulson@13168
   108
paulson@13356
   109
subsection{*Finite Set Constructions Using @{term cons}*}
paulson@13168
   110
paulson@13259
   111
lemma cons_subsetI: "[| a:C; B<=C |] ==> cons(a,B) <= C"
paulson@13169
   112
by blast
paulson@13168
   113
paulson@13259
   114
lemma subset_consI: "B <= cons(a,B)"
paulson@13169
   115
by blast
paulson@13168
   116
paulson@13259
   117
lemma cons_subset_iff [iff]: "cons(a,B)<=C <-> a:C & B<=C"
paulson@13169
   118
by blast
paulson@13168
   119
paulson@13259
   120
(*A safe special case of subset elimination, adding no new variables 
paulson@13259
   121
  [| cons(a,B) <= C; [| a : C; B <= C |] ==> R |] ==> R *)
paulson@13259
   122
lemmas cons_subsetE = cons_subset_iff [THEN iffD1, THEN conjE, standard]
paulson@13168
   123
paulson@13259
   124
lemma subset_empty_iff: "A<=0 <-> A=0"
paulson@13168
   125
by blast
paulson@13168
   126
paulson@13259
   127
lemma subset_cons_iff: "C<=cons(a,B) <-> C<=B | (a:C & C-{a} <= B)"
paulson@13169
   128
by blast
paulson@13168
   129
paulson@13165
   130
(* cons_def refers to Upair; reversing the equality LOOPS in rewriting!*)
paulson@13165
   131
lemma cons_eq: "{a} Un B = cons(a,B)"
paulson@13165
   132
by blast
paulson@13165
   133
paulson@13165
   134
lemma cons_commute: "cons(a, cons(b, C)) = cons(b, cons(a, C))"
paulson@13165
   135
by blast
paulson@13165
   136
paulson@13165
   137
lemma cons_absorb: "a: B ==> cons(a,B) = B"
paulson@13165
   138
by blast
paulson@13165
   139
paulson@13165
   140
lemma cons_Diff: "a: B ==> cons(a, B-{a}) = B"
paulson@13165
   141
by blast
paulson@13165
   142
paulson@13165
   143
lemma equal_singleton [rule_format]: "[| a: C;  ALL y:C. y=b |] ==> C = {b}"
paulson@13165
   144
by blast
paulson@13165
   145
paulson@13172
   146
lemma [simp]: "cons(a,cons(a,B)) = cons(a,B)"
paulson@13172
   147
by blast
paulson@13165
   148
paulson@13259
   149
(** singletons **)
paulson@13259
   150
paulson@13259
   151
lemma singleton_subsetI: "a:C ==> {a} <= C"
paulson@13259
   152
by blast
paulson@13259
   153
paulson@13259
   154
lemma singleton_subsetD: "{a} <= C  ==>  a:C"
paulson@13259
   155
by blast
paulson@13259
   156
paulson@13259
   157
paulson@13356
   158
(** succ **)
paulson@13259
   159
paulson@13259
   160
lemma subset_succI: "i <= succ(i)"
paulson@13259
   161
by blast
paulson@13259
   162
paulson@13259
   163
(*But if j is an ordinal or is transitive, then i:j implies i<=j! 
paulson@13259
   164
  See ordinal/Ord_succ_subsetI*)
paulson@13259
   165
lemma succ_subsetI: "[| i:j;  i<=j |] ==> succ(i)<=j"
paulson@13259
   166
by (unfold succ_def, blast)
paulson@13165
   167
paulson@13259
   168
lemma succ_subsetE:
paulson@13259
   169
    "[| succ(i) <= j;  [| i:j;  i<=j |] ==> P |] ==> P"
paulson@13356
   170
by (unfold succ_def, blast) 
paulson@13259
   171
paulson@13259
   172
lemma succ_subset_iff: "succ(a) <= B <-> (a <= B & a : B)"
paulson@13259
   173
by (unfold succ_def, blast)
paulson@13259
   174
paulson@13259
   175
paulson@13356
   176
subsection{*Binary Intersection*}
paulson@13259
   177
paulson@13259
   178
(** Intersection is the greatest lower bound of two sets **)
paulson@13259
   179
paulson@13259
   180
lemma Int_subset_iff: "C <= A Int B <-> C <= A & C <= B"
paulson@13259
   181
by blast
paulson@13259
   182
paulson@13259
   183
lemma Int_lower1: "A Int B <= A"
paulson@13259
   184
by blast
paulson@13259
   185
paulson@13259
   186
lemma Int_lower2: "A Int B <= B"
paulson@13259
   187
by blast
paulson@13259
   188
paulson@13259
   189
lemma Int_greatest: "[| C<=A;  C<=B |] ==> C <= A Int B"
paulson@13259
   190
by blast
paulson@13259
   191
paulson@13165
   192
lemma Int_cons: "cons(a,B) Int C <= cons(a, B Int C)"
paulson@13165
   193
by blast
paulson@13165
   194
paulson@13165
   195
lemma Int_absorb [simp]: "A Int A = A"
paulson@13165
   196
by blast
paulson@13165
   197
paulson@13165
   198
lemma Int_left_absorb: "A Int (A Int B) = A Int B"
paulson@13165
   199
by blast
paulson@13165
   200
paulson@13165
   201
lemma Int_commute: "A Int B = B Int A"
paulson@13165
   202
by blast
paulson@13165
   203
paulson@13165
   204
lemma Int_left_commute: "A Int (B Int C) = B Int (A Int C)"
paulson@13165
   205
by blast
paulson@13165
   206
paulson@13165
   207
lemma Int_assoc: "(A Int B) Int C  =  A Int (B Int C)"
paulson@13165
   208
by blast
paulson@13165
   209
paulson@13165
   210
(*Intersection is an AC-operator*)
paulson@13165
   211
lemmas Int_ac= Int_assoc Int_left_absorb Int_commute Int_left_commute
paulson@13165
   212
paulson@13165
   213
lemma Int_Un_distrib: "A Int (B Un C) = (A Int B) Un (A Int C)"
paulson@13165
   214
by blast
paulson@13165
   215
paulson@13165
   216
lemma Int_Un_distrib2: "(B Un C) Int A = (B Int A) Un (C Int A)"
paulson@13165
   217
by blast
paulson@13165
   218
paulson@13165
   219
lemma subset_Int_iff: "A<=B <-> A Int B = A"
paulson@13165
   220
by (blast elim!: equalityE)
paulson@13165
   221
paulson@13165
   222
lemma subset_Int_iff2: "A<=B <-> B Int A = A"
paulson@13165
   223
by (blast elim!: equalityE)
paulson@13165
   224
paulson@13165
   225
lemma Int_Diff_eq: "C<=A ==> (A-B) Int C = C-B"
paulson@13165
   226
by blast
paulson@13165
   227
paulson@13356
   228
subsection{*Binary Union*}
paulson@13259
   229
paulson@13259
   230
(** Union is the least upper bound of two sets *)
paulson@13259
   231
paulson@13259
   232
lemma Un_subset_iff: "A Un B <= C <-> A <= C & B <= C"
paulson@13259
   233
by blast
paulson@13259
   234
paulson@13259
   235
lemma Un_upper1: "A <= A Un B"
paulson@13259
   236
by blast
paulson@13259
   237
paulson@13259
   238
lemma Un_upper2: "B <= A Un B"
paulson@13259
   239
by blast
paulson@13259
   240
paulson@13259
   241
lemma Un_least: "[| A<=C;  B<=C |] ==> A Un B <= C"
paulson@13259
   242
by blast
paulson@13165
   243
paulson@13165
   244
lemma Un_cons: "cons(a,B) Un C = cons(a, B Un C)"
paulson@13165
   245
by blast
paulson@13165
   246
paulson@13165
   247
lemma Un_absorb [simp]: "A Un A = A"
paulson@13165
   248
by blast
paulson@13165
   249
paulson@13165
   250
lemma Un_left_absorb: "A Un (A Un B) = A Un B"
paulson@13165
   251
by blast
paulson@13165
   252
paulson@13165
   253
lemma Un_commute: "A Un B = B Un A"
paulson@13165
   254
by blast
paulson@13165
   255
paulson@13165
   256
lemma Un_left_commute: "A Un (B Un C) = B Un (A Un C)"
paulson@13165
   257
by blast
paulson@13165
   258
paulson@13165
   259
lemma Un_assoc: "(A Un B) Un C  =  A Un (B Un C)"
paulson@13165
   260
by blast
paulson@13165
   261
paulson@13165
   262
(*Union is an AC-operator*)
paulson@13165
   263
lemmas Un_ac = Un_assoc Un_left_absorb Un_commute Un_left_commute
paulson@13165
   264
paulson@13165
   265
lemma Un_Int_distrib: "(A Int B) Un C  =  (A Un C) Int (B Un C)"
paulson@13165
   266
by blast
paulson@13165
   267
paulson@13165
   268
lemma subset_Un_iff: "A<=B <-> A Un B = B"
paulson@13165
   269
by (blast elim!: equalityE)
paulson@13165
   270
paulson@13165
   271
lemma subset_Un_iff2: "A<=B <-> B Un A = B"
paulson@13165
   272
by (blast elim!: equalityE)
paulson@13165
   273
paulson@13165
   274
lemma Un_empty [iff]: "(A Un B = 0) <-> (A = 0 & B = 0)"
paulson@13165
   275
by blast
paulson@13165
   276
paulson@13165
   277
lemma Un_eq_Union: "A Un B = Union({A, B})"
paulson@13165
   278
by blast
paulson@13165
   279
paulson@13356
   280
subsection{*Set Difference*}
paulson@13259
   281
paulson@13259
   282
lemma Diff_subset: "A-B <= A"
paulson@13259
   283
by blast
paulson@13259
   284
paulson@13259
   285
lemma Diff_contains: "[| C<=A;  C Int B = 0 |] ==> C <= A-B"
paulson@13259
   286
by blast
paulson@13259
   287
paulson@13259
   288
lemma subset_Diff_cons_iff: "B <= A - cons(c,C)  <->  B<=A-C & c ~: B"
paulson@13259
   289
by blast
paulson@13165
   290
paulson@13165
   291
lemma Diff_cancel: "A - A = 0"
paulson@13165
   292
by blast
paulson@13165
   293
paulson@13165
   294
lemma Diff_triv: "A  Int B = 0 ==> A - B = A"
paulson@13165
   295
by blast
paulson@13165
   296
paulson@13165
   297
lemma empty_Diff [simp]: "0 - A = 0"
paulson@13165
   298
by blast
paulson@13165
   299
paulson@13165
   300
lemma Diff_0 [simp]: "A - 0 = A"
paulson@13165
   301
by blast
paulson@13165
   302
paulson@13165
   303
lemma Diff_eq_0_iff: "A - B = 0 <-> A <= B"
paulson@13165
   304
by (blast elim: equalityE)
paulson@13165
   305
paulson@13165
   306
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
paulson@13165
   307
lemma Diff_cons: "A - cons(a,B) = A - B - {a}"
paulson@13165
   308
by blast
paulson@13165
   309
paulson@13165
   310
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
paulson@13165
   311
lemma Diff_cons2: "A - cons(a,B) = A - {a} - B"
paulson@13165
   312
by blast
paulson@13165
   313
paulson@13165
   314
lemma Diff_disjoint: "A Int (B-A) = 0"
paulson@13165
   315
by blast
paulson@13165
   316
paulson@13165
   317
lemma Diff_partition: "A<=B ==> A Un (B-A) = B"
paulson@13165
   318
by blast
paulson@13165
   319
paulson@13165
   320
lemma subset_Un_Diff: "A <= B Un (A - B)"
paulson@13165
   321
by blast
paulson@13165
   322
paulson@13165
   323
lemma double_complement: "[| A<=B; B<=C |] ==> B-(C-A) = A"
paulson@13165
   324
by blast
paulson@13165
   325
paulson@13165
   326
lemma double_complement_Un: "(A Un B) - (B-A) = A"
paulson@13165
   327
by blast
paulson@13165
   328
paulson@13165
   329
lemma Un_Int_crazy: 
paulson@13165
   330
 "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)"
paulson@13165
   331
apply blast
paulson@13165
   332
done
paulson@13165
   333
paulson@13165
   334
lemma Diff_Un: "A - (B Un C) = (A-B) Int (A-C)"
paulson@13165
   335
by blast
paulson@13165
   336
paulson@13165
   337
lemma Diff_Int: "A - (B Int C) = (A-B) Un (A-C)"
paulson@13165
   338
by blast
paulson@13165
   339
paulson@13165
   340
lemma Un_Diff: "(A Un B) - C = (A - C) Un (B - C)"
paulson@13165
   341
by blast
paulson@13165
   342
paulson@13165
   343
lemma Int_Diff: "(A Int B) - C = A Int (B - C)"
paulson@13165
   344
by blast
paulson@13165
   345
paulson@13165
   346
lemma Diff_Int_distrib: "C Int (A-B) = (C Int A) - (C Int B)"
paulson@13165
   347
by blast
paulson@13165
   348
paulson@13165
   349
lemma Diff_Int_distrib2: "(A-B) Int C = (A Int C) - (B Int C)"
paulson@13165
   350
by blast
paulson@13165
   351
paulson@13165
   352
(*Halmos, Naive Set Theory, page 16.*)
paulson@13165
   353
lemma Un_Int_assoc_iff: "(A Int B) Un C = A Int (B Un C)  <->  C<=A"
paulson@13165
   354
by (blast elim!: equalityE)
paulson@13165
   355
paulson@13165
   356
paulson@13356
   357
subsection{*Big Union and Intersection*}
paulson@13259
   358
paulson@13259
   359
(** Big Union is the least upper bound of a set  **)
paulson@13259
   360
paulson@13259
   361
lemma Union_subset_iff: "Union(A) <= C <-> (ALL x:A. x <= C)"
paulson@13259
   362
by blast
paulson@13259
   363
paulson@13259
   364
lemma Union_upper: "B:A ==> B <= Union(A)"
paulson@13259
   365
by blast
paulson@13259
   366
paulson@13259
   367
lemma Union_least: "[| !!x. x:A ==> x<=C |] ==> Union(A) <= C"
paulson@13259
   368
by blast
paulson@13165
   369
paulson@13165
   370
lemma Union_cons [simp]: "Union(cons(a,B)) = a Un Union(B)"
paulson@13165
   371
by blast
paulson@13165
   372
paulson@13165
   373
lemma Union_Un_distrib: "Union(A Un B) = Union(A) Un Union(B)"
paulson@13165
   374
by blast
paulson@13165
   375
paulson@13165
   376
lemma Union_Int_subset: "Union(A Int B) <= Union(A) Int Union(B)"
paulson@13165
   377
by blast
paulson@13165
   378
paulson@13165
   379
lemma Union_disjoint: "Union(C) Int A = 0 <-> (ALL B:C. B Int A = 0)"
paulson@13165
   380
by (blast elim!: equalityE)
paulson@13165
   381
paulson@13165
   382
lemma Union_empty_iff: "Union(A) = 0 <-> (ALL B:A. B=0)"
paulson@13165
   383
by blast
paulson@13165
   384
paulson@13259
   385
(** Big Intersection is the greatest lower bound of a nonempty set **)
paulson@13259
   386
paulson@13259
   387
lemma Inter_subset_iff: "a: A  ==>  C <= Inter(A) <-> (ALL x:A. C <= x)"
paulson@13259
   388
by blast
paulson@13259
   389
paulson@13259
   390
lemma Inter_lower: "B:A ==> Inter(A) <= B"
paulson@13259
   391
by blast
paulson@13259
   392
paulson@13259
   393
lemma Inter_greatest: "[| a:A;  !!x. x:A ==> C<=x |] ==> C <= Inter(A)"
paulson@13259
   394
by blast
paulson@13259
   395
paulson@13259
   396
(** Intersection of a family of sets  **)
paulson@13259
   397
paulson@13259
   398
lemma INT_lower: "x:A ==> (INT x:A. B(x)) <= B(x)"
paulson@13259
   399
by blast
paulson@13259
   400
paulson@13259
   401
lemma INT_greatest: 
paulson@13259
   402
    "[| a:A;  !!x. x:A ==> C<=B(x) |] ==> C <= (INT x:A. B(x))"
paulson@13259
   403
by blast 
paulson@13259
   404
paulson@13165
   405
lemma Inter_0: "Inter(0) = 0"
paulson@13165
   406
by (unfold Inter_def, blast)
paulson@13165
   407
paulson@13259
   408
lemma Inter_Un_subset:
paulson@13259
   409
     "[| z:A; z:B |] ==> Inter(A) Un Inter(B) <= Inter(A Int B)"
paulson@13165
   410
by blast
paulson@13165
   411
paulson@13165
   412
(* A good challenge: Inter is ill-behaved on the empty set *)
paulson@13165
   413
lemma Inter_Un_distrib:
paulson@13165
   414
     "[| a:A;  b:B |] ==> Inter(A Un B) = Inter(A) Int Inter(B)"
paulson@13165
   415
by blast
paulson@13165
   416
paulson@13165
   417
lemma Union_singleton: "Union({b}) = b"
paulson@13165
   418
by blast
paulson@13165
   419
paulson@13165
   420
lemma Inter_singleton: "Inter({b}) = b"
paulson@13165
   421
by blast
paulson@13165
   422
paulson@13165
   423
lemma Inter_cons [simp]:
paulson@13165
   424
     "Inter(cons(a,B)) = (if B=0 then a else a Int Inter(B))"
paulson@13165
   425
by force
paulson@13165
   426
paulson@13356
   427
subsection{*Unions and Intersections of Families*}
paulson@13259
   428
paulson@13259
   429
lemma subset_UN_iff_eq: "A <= (UN i:I. B(i)) <-> A = (UN i:I. A Int B(i))"
paulson@13259
   430
by (blast elim!: equalityE)
paulson@13259
   431
paulson@13259
   432
lemma UN_subset_iff: "(UN x:A. B(x)) <= C <-> (ALL x:A. B(x) <= C)"
paulson@13259
   433
by blast
paulson@13259
   434
paulson@13259
   435
lemma UN_upper: "x:A ==> B(x) <= (UN x:A. B(x))"
paulson@13259
   436
by (erule RepFunI [THEN Union_upper])
paulson@13259
   437
paulson@13259
   438
lemma UN_least: "[| !!x. x:A ==> B(x)<=C |] ==> (UN x:A. B(x)) <= C"
paulson@13259
   439
by blast
paulson@13165
   440
paulson@13165
   441
lemma Union_eq_UN: "Union(A) = (UN x:A. x)"
paulson@13165
   442
by blast
paulson@13165
   443
paulson@13165
   444
lemma Inter_eq_INT: "Inter(A) = (INT x:A. x)"
paulson@13165
   445
by (unfold Inter_def, blast)
paulson@13165
   446
paulson@13165
   447
lemma UN_0 [simp]: "(UN i:0. A(i)) = 0"
paulson@13165
   448
by blast
paulson@13165
   449
paulson@13165
   450
lemma UN_singleton: "(UN x:A. {x}) = A"
paulson@13165
   451
by blast
paulson@13165
   452
paulson@13165
   453
lemma UN_Un: "(UN i: A Un B. C(i)) = (UN i: A. C(i)) Un (UN i:B. C(i))"
paulson@13165
   454
by blast
paulson@13165
   455
paulson@13165
   456
lemma INT_Un: "(INT i:I Un J. A(i)) = (if I=0 then INT j:J. A(j)  
paulson@13165
   457
                              else if J=0 then INT i:I. A(i)  
paulson@13165
   458
                              else ((INT i:I. A(i)) Int  (INT j:J. A(j))))"
paulson@13259
   459
apply simp
paulson@13165
   460
apply (blast intro!: equalityI)
paulson@13165
   461
done
paulson@13165
   462
paulson@13165
   463
lemma UN_UN_flatten: "(UN x : (UN y:A. B(y)). C(x)) = (UN y:A. UN x: B(y). C(x))"
paulson@13165
   464
by blast
paulson@13165
   465
paulson@13165
   466
(*Halmos, Naive Set Theory, page 35.*)
paulson@13165
   467
lemma Int_UN_distrib: "B Int (UN i:I. A(i)) = (UN i:I. B Int A(i))"
paulson@13165
   468
by blast
paulson@13165
   469
paulson@13165
   470
lemma Un_INT_distrib: "i:I ==> B Un (INT i:I. A(i)) = (INT i:I. B Un A(i))"
paulson@13165
   471
by blast
paulson@13165
   472
paulson@13165
   473
lemma Int_UN_distrib2:
paulson@13165
   474
     "(UN i:I. A(i)) Int (UN j:J. B(j)) = (UN i:I. UN j:J. A(i) Int B(j))"
paulson@13165
   475
by blast
paulson@13165
   476
paulson@13165
   477
lemma Un_INT_distrib2: "[| i:I;  j:J |] ==>  
paulson@13165
   478
      (INT i:I. A(i)) Un (INT j:J. B(j)) = (INT i:I. INT j:J. A(i) Un B(j))"
paulson@13165
   479
by blast
paulson@13165
   480
paulson@13165
   481
lemma UN_constant: "a: A ==> (UN y:A. c) = c"
paulson@13165
   482
by blast
paulson@13165
   483
paulson@13165
   484
lemma INT_constant: "a: A ==> (INT y:A. c) = c"
paulson@13165
   485
by blast
paulson@13165
   486
paulson@13165
   487
lemma UN_RepFun [simp]: "(UN y: RepFun(A,f). B(y)) = (UN x:A. B(f(x)))"
paulson@13165
   488
by blast
paulson@13165
   489
paulson@13165
   490
lemma INT_RepFun [simp]: "(INT x:RepFun(A,f). B(x))    = (INT a:A. B(f(a)))"
paulson@13165
   491
by (auto simp add: Inter_def)
paulson@13165
   492
paulson@13165
   493
lemma INT_Union_eq:
paulson@13165
   494
     "0 ~: A ==> (INT x: Union(A). B(x)) = (INT y:A. INT x:y. B(x))"
paulson@13165
   495
apply (simp add: Inter_def)
paulson@13165
   496
apply (subgoal_tac "ALL x:A. x~=0")
paulson@13165
   497
prefer 2 apply blast
paulson@13165
   498
apply force
paulson@13165
   499
done
paulson@13165
   500
paulson@13165
   501
lemma INT_UN_eq: "(ALL x:A. B(x) ~= 0)  
paulson@13165
   502
      ==> (INT z: (UN x:A. B(x)). C(z)) = (INT x:A. INT z: B(x). C(z))"
paulson@13165
   503
apply (subst INT_Union_eq, blast)
paulson@13165
   504
apply (simp add: Inter_def)
paulson@13165
   505
done
paulson@13165
   506
paulson@13165
   507
paulson@13165
   508
(** Devlin, Fundamentals of Contemporary Set Theory, page 12, exercise 5: 
paulson@13165
   509
    Union of a family of unions **)
paulson@13165
   510
paulson@13165
   511
lemma UN_Un_distrib:
paulson@13165
   512
     "(UN i:I. A(i) Un B(i)) = (UN i:I. A(i))  Un  (UN i:I. B(i))"
paulson@13165
   513
by blast
paulson@13165
   514
paulson@13165
   515
lemma INT_Int_distrib:
paulson@13165
   516
     "i:I ==> (INT i:I. A(i) Int B(i)) = (INT i:I. A(i)) Int (INT i:I. B(i))"
paulson@13165
   517
by blast
paulson@13165
   518
paulson@13165
   519
lemma UN_Int_subset:
paulson@13165
   520
     "(UN z:I Int J. A(z)) <= (UN z:I. A(z)) Int (UN z:J. A(z))"
paulson@13165
   521
by blast
paulson@13165
   522
paulson@13165
   523
(** Devlin, page 12, exercise 5: Complements **)
paulson@13165
   524
paulson@13165
   525
lemma Diff_UN: "i:I ==> B - (UN i:I. A(i)) = (INT i:I. B - A(i))"
paulson@13165
   526
by blast
paulson@13165
   527
paulson@13165
   528
lemma Diff_INT: "i:I ==> B - (INT i:I. A(i)) = (UN i:I. B - A(i))"
paulson@13165
   529
by blast
paulson@13165
   530
paulson@13165
   531
(** Unions and Intersections with General Sum **)
paulson@13165
   532
paulson@13165
   533
(*Not suitable for rewriting: LOOPS!*)
paulson@13165
   534
lemma Sigma_cons1: "Sigma(cons(a,B), C) = ({a}*C(a)) Un Sigma(B,C)"
paulson@13165
   535
by blast
paulson@13165
   536
paulson@13165
   537
(*Not suitable for rewriting: LOOPS!*)
paulson@13165
   538
lemma Sigma_cons2: "A * cons(b,B) = A*{b} Un A*B"
paulson@13165
   539
by blast
paulson@13165
   540
paulson@13165
   541
lemma Sigma_succ1: "Sigma(succ(A), B) = ({A}*B(A)) Un Sigma(A,B)"
paulson@13165
   542
by blast
paulson@13165
   543
paulson@13165
   544
lemma Sigma_succ2: "A * succ(B) = A*{B} Un A*B"
paulson@13165
   545
by blast
paulson@13165
   546
paulson@13165
   547
lemma SUM_UN_distrib1:
paulson@13165
   548
     "(SUM x:(UN y:A. C(y)). B(x)) = (UN y:A. SUM x:C(y). B(x))"
paulson@13165
   549
by blast
paulson@13165
   550
paulson@13165
   551
lemma SUM_UN_distrib2:
paulson@13165
   552
     "(SUM i:I. UN j:J. C(i,j)) = (UN j:J. SUM i:I. C(i,j))"
paulson@13165
   553
by blast
paulson@13165
   554
paulson@13165
   555
lemma SUM_Un_distrib1:
paulson@13165
   556
     "(SUM i:I Un J. C(i)) = (SUM i:I. C(i)) Un (SUM j:J. C(j))"
paulson@13165
   557
by blast
paulson@13165
   558
paulson@13165
   559
lemma SUM_Un_distrib2:
paulson@13165
   560
     "(SUM i:I. A(i) Un B(i)) = (SUM i:I. A(i)) Un (SUM i:I. B(i))"
paulson@13165
   561
by blast
paulson@13165
   562
paulson@13165
   563
(*First-order version of the above, for rewriting*)
paulson@13165
   564
lemma prod_Un_distrib2: "I * (A Un B) = I*A Un I*B"
paulson@13165
   565
by (rule SUM_Un_distrib2)
paulson@13165
   566
paulson@13165
   567
lemma SUM_Int_distrib1:
paulson@13165
   568
     "(SUM i:I Int J. C(i)) = (SUM i:I. C(i)) Int (SUM j:J. C(j))"
paulson@13165
   569
by blast
paulson@13165
   570
paulson@13165
   571
lemma SUM_Int_distrib2:
paulson@13165
   572
     "(SUM i:I. A(i) Int B(i)) = (SUM i:I. A(i)) Int (SUM i:I. B(i))"
paulson@13165
   573
by blast
paulson@13165
   574
paulson@13165
   575
(*First-order version of the above, for rewriting*)
paulson@13165
   576
lemma prod_Int_distrib2: "I * (A Int B) = I*A Int I*B"
paulson@13165
   577
by (rule SUM_Int_distrib2)
paulson@13165
   578
paulson@13165
   579
(*Cf Aczel, Non-Well-Founded Sets, page 115*)
paulson@13165
   580
lemma SUM_eq_UN: "(SUM i:I. A(i)) = (UN i:I. {i} * A(i))"
paulson@13165
   581
by blast
paulson@13165
   582
paulson@13165
   583
(** Domain **)
paulson@13165
   584
paulson@13259
   585
lemma domain_iff: "a: domain(r) <-> (EX y. <a,y>: r)"
paulson@13259
   586
by (unfold domain_def, blast)
paulson@13259
   587
paulson@13259
   588
lemma domainI [intro]: "<a,b>: r ==> a: domain(r)"
paulson@13259
   589
by (unfold domain_def, blast)
paulson@13259
   590
paulson@13259
   591
lemma domainE [elim!]:
paulson@13259
   592
    "[| a : domain(r);  !!y. <a,y>: r ==> P |] ==> P"
paulson@13259
   593
by (unfold domain_def, blast)
paulson@13259
   594
paulson@13259
   595
lemma domain_subset: "domain(Sigma(A,B)) <= A"
paulson@13259
   596
by blast
paulson@13259
   597
paulson@13165
   598
lemma domain_of_prod: "b:B ==> domain(A*B) = A"
paulson@13165
   599
by blast
paulson@13165
   600
paulson@13165
   601
lemma domain_0 [simp]: "domain(0) = 0"
paulson@13165
   602
by blast
paulson@13165
   603
paulson@13165
   604
lemma domain_cons [simp]: "domain(cons(<a,b>,r)) = cons(a, domain(r))"
paulson@13165
   605
by blast
paulson@13165
   606
paulson@13165
   607
lemma domain_Un_eq [simp]: "domain(A Un B) = domain(A) Un domain(B)"
paulson@13165
   608
by blast
paulson@13165
   609
paulson@13165
   610
lemma domain_Int_subset: "domain(A Int B) <= domain(A) Int domain(B)"
paulson@13165
   611
by blast
paulson@13165
   612
paulson@13165
   613
lemma domain_Diff_subset: "domain(A) - domain(B) <= domain(A - B)"
paulson@13165
   614
by blast
paulson@13165
   615
paulson@13165
   616
lemma domain_UN: "domain(UN x:A. B(x)) = (UN x:A. domain(B(x)))"
paulson@13165
   617
by blast
paulson@13165
   618
paulson@13165
   619
lemma domain_Union: "domain(Union(A)) = (UN x:A. domain(x))"
paulson@13165
   620
by blast
paulson@13165
   621
paulson@13165
   622
paulson@13165
   623
(** Range **)
paulson@13165
   624
paulson@13259
   625
lemma rangeI [intro]: "<a,b>: r ==> b : range(r)"
paulson@13259
   626
apply (unfold range_def)
paulson@13259
   627
apply (erule converseI [THEN domainI])
paulson@13259
   628
done
paulson@13259
   629
paulson@13259
   630
lemma rangeE [elim!]: "[| b : range(r);  !!x. <x,b>: r ==> P |] ==> P"
paulson@13259
   631
by (unfold range_def, blast)
paulson@13259
   632
paulson@13259
   633
lemma range_subset: "range(A*B) <= B"
paulson@13259
   634
apply (unfold range_def)
paulson@13259
   635
apply (subst converse_prod)
paulson@13259
   636
apply (rule domain_subset)
paulson@13259
   637
done
paulson@13259
   638
paulson@13165
   639
lemma range_of_prod: "a:A ==> range(A*B) = B"
paulson@13165
   640
by blast
paulson@13165
   641
paulson@13165
   642
lemma range_0 [simp]: "range(0) = 0"
paulson@13165
   643
by blast
paulson@13165
   644
paulson@13165
   645
lemma range_cons [simp]: "range(cons(<a,b>,r)) = cons(b, range(r))"
paulson@13165
   646
by blast
paulson@13165
   647
paulson@13165
   648
lemma range_Un_eq [simp]: "range(A Un B) = range(A) Un range(B)"
paulson@13165
   649
by blast
paulson@13165
   650
paulson@13165
   651
lemma range_Int_subset: "range(A Int B) <= range(A) Int range(B)"
paulson@13165
   652
by blast
paulson@13165
   653
paulson@13165
   654
lemma range_Diff_subset: "range(A) - range(B) <= range(A - B)"
paulson@13165
   655
by blast
paulson@13165
   656
paulson@13259
   657
lemma domain_converse [simp]: "domain(converse(r)) = range(r)"
paulson@13259
   658
by blast
paulson@13259
   659
paulson@13165
   660
lemma range_converse [simp]: "range(converse(r)) = domain(r)"
paulson@13165
   661
by blast
paulson@13165
   662
paulson@13165
   663
paulson@13165
   664
(** Field **)
paulson@13165
   665
paulson@13259
   666
lemma fieldI1: "<a,b>: r ==> a : field(r)"
paulson@13259
   667
by (unfold field_def, blast)
paulson@13259
   668
paulson@13259
   669
lemma fieldI2: "<a,b>: r ==> b : field(r)"
paulson@13259
   670
by (unfold field_def, blast)
paulson@13259
   671
paulson@13259
   672
lemma fieldCI [intro]: 
paulson@13259
   673
    "(~ <c,a>:r ==> <a,b>: r) ==> a : field(r)"
paulson@13259
   674
apply (unfold field_def, blast)
paulson@13259
   675
done
paulson@13259
   676
paulson@13259
   677
lemma fieldE [elim!]: 
paulson@13259
   678
     "[| a : field(r);   
paulson@13259
   679
         !!x. <a,x>: r ==> P;   
paulson@13259
   680
         !!x. <x,a>: r ==> P        |] ==> P"
paulson@13259
   681
by (unfold field_def, blast)
paulson@13259
   682
paulson@13259
   683
lemma field_subset: "field(A*B) <= A Un B"
paulson@13259
   684
by blast
paulson@13259
   685
paulson@13259
   686
lemma domain_subset_field: "domain(r) <= field(r)"
paulson@13259
   687
apply (unfold field_def)
paulson@13259
   688
apply (rule Un_upper1)
paulson@13259
   689
done
paulson@13259
   690
paulson@13259
   691
lemma range_subset_field: "range(r) <= field(r)"
paulson@13259
   692
apply (unfold field_def)
paulson@13259
   693
apply (rule Un_upper2)
paulson@13259
   694
done
paulson@13259
   695
paulson@13259
   696
lemma domain_times_range: "r <= Sigma(A,B) ==> r <= domain(r)*range(r)"
paulson@13259
   697
by blast
paulson@13259
   698
paulson@13259
   699
lemma field_times_field: "r <= Sigma(A,B) ==> r <= field(r)*field(r)"
paulson@13259
   700
by blast
paulson@13259
   701
paulson@13259
   702
lemma relation_field_times_field: "relation(r) ==> r <= field(r)*field(r)"
paulson@13259
   703
by (simp add: relation_def, blast) 
paulson@13259
   704
paulson@13165
   705
lemma field_of_prod: "field(A*A) = A"
paulson@13165
   706
by blast
paulson@13165
   707
paulson@13165
   708
lemma field_0 [simp]: "field(0) = 0"
paulson@13165
   709
by blast
paulson@13165
   710
paulson@13165
   711
lemma field_cons [simp]: "field(cons(<a,b>,r)) = cons(a, cons(b, field(r)))"
paulson@13165
   712
by blast
paulson@13165
   713
paulson@13165
   714
lemma field_Un_eq [simp]: "field(A Un B) = field(A) Un field(B)"
paulson@13165
   715
by blast
paulson@13165
   716
paulson@13165
   717
lemma field_Int_subset: "field(A Int B) <= field(A) Int field(B)"
paulson@13165
   718
by blast
paulson@13165
   719
paulson@13165
   720
lemma field_Diff_subset: "field(A) - field(B) <= field(A - B)"
paulson@13165
   721
by blast
paulson@13165
   722
paulson@13165
   723
lemma field_converse [simp]: "field(converse(r)) = field(r)"
paulson@13165
   724
by blast
paulson@13165
   725
paulson@13259
   726
(** The Union of a set of relations is a relation -- Lemma for fun_Union **)
paulson@13259
   727
lemma rel_Union: "(ALL x:S. EX A B. x <= A*B) ==>   
paulson@13259
   728
                  Union(S) <= domain(Union(S)) * range(Union(S))"
paulson@13259
   729
by blast
paulson@13165
   730
paulson@13259
   731
(** The Union of 2 relations is a relation (Lemma for fun_Un)  **)
paulson@13259
   732
lemma rel_Un: "[| r <= A*B;  s <= C*D |] ==> (r Un s) <= (A Un C) * (B Un D)"
paulson@13259
   733
by blast
paulson@13259
   734
paulson@13259
   735
lemma domain_Diff_eq: "[| <a,c> : r; c~=b |] ==> domain(r-{<a,b>}) = domain(r)"
paulson@13259
   736
by blast
paulson@13259
   737
paulson@13259
   738
lemma range_Diff_eq: "[| <c,b> : r; c~=a |] ==> range(r-{<a,b>}) = range(r)"
paulson@13259
   739
by blast
paulson@13259
   740
paulson@13259
   741
paulson@13356
   742
subsection{*Image of a Set under a Function or Relation*}
paulson@13259
   743
paulson@13259
   744
lemma image_iff: "b : r``A <-> (EX x:A. <x,b>:r)"
paulson@13259
   745
by (unfold image_def, blast)
paulson@13259
   746
paulson@13259
   747
lemma image_singleton_iff: "b : r``{a} <-> <a,b>:r"
paulson@13259
   748
by (rule image_iff [THEN iff_trans], blast)
paulson@13259
   749
paulson@13259
   750
lemma imageI [intro]: "[| <a,b>: r;  a:A |] ==> b : r``A"
paulson@13259
   751
by (unfold image_def, blast)
paulson@13259
   752
paulson@13259
   753
lemma imageE [elim!]: 
paulson@13259
   754
    "[| b: r``A;  !!x.[| <x,b>: r;  x:A |] ==> P |] ==> P"
paulson@13259
   755
by (unfold image_def, blast)
paulson@13259
   756
paulson@13259
   757
lemma image_subset: "r <= A*B ==> r``C <= B"
paulson@13259
   758
by blast
paulson@13165
   759
paulson@13165
   760
lemma image_0 [simp]: "r``0 = 0"
paulson@13165
   761
by blast
paulson@13165
   762
paulson@13165
   763
lemma image_Un [simp]: "r``(A Un B) = (r``A) Un (r``B)"
paulson@13165
   764
by blast
paulson@13165
   765
paulson@13165
   766
lemma image_Int_subset: "r``(A Int B) <= (r``A) Int (r``B)"
paulson@13165
   767
by blast
paulson@13165
   768
paulson@13165
   769
lemma image_Int_square_subset: "(r Int A*A)``B <= (r``B) Int A"
paulson@13165
   770
by blast
paulson@13165
   771
paulson@13165
   772
lemma image_Int_square: "B<=A ==> (r Int A*A)``B = (r``B) Int A"
paulson@13165
   773
by blast
paulson@13165
   774
paulson@13165
   775
paulson@13165
   776
(*Image laws for special relations*)
paulson@13165
   777
lemma image_0_left [simp]: "0``A = 0"
paulson@13165
   778
by blast
paulson@13165
   779
paulson@13165
   780
lemma image_Un_left: "(r Un s)``A = (r``A) Un (s``A)"
paulson@13165
   781
by blast
paulson@13165
   782
paulson@13165
   783
lemma image_Int_subset_left: "(r Int s)``A <= (r``A) Int (s``A)"
paulson@13165
   784
by blast
paulson@13165
   785
paulson@13165
   786
paulson@13356
   787
subsection{*Inverse Image of a Set under a Function or Relation*}
paulson@13259
   788
paulson@13259
   789
lemma vimage_iff: 
paulson@13259
   790
    "a : r-``B <-> (EX y:B. <a,y>:r)"
paulson@13259
   791
by (unfold vimage_def image_def converse_def, blast)
paulson@13259
   792
paulson@13259
   793
lemma vimage_singleton_iff: "a : r-``{b} <-> <a,b>:r"
paulson@13259
   794
by (rule vimage_iff [THEN iff_trans], blast)
paulson@13259
   795
paulson@13259
   796
lemma vimageI [intro]: "[| <a,b>: r;  b:B |] ==> a : r-``B"
paulson@13259
   797
by (unfold vimage_def, blast)
paulson@13259
   798
paulson@13259
   799
lemma vimageE [elim!]: 
paulson@13259
   800
    "[| a: r-``B;  !!x.[| <a,x>: r;  x:B |] ==> P |] ==> P"
paulson@13259
   801
apply (unfold vimage_def, blast)
paulson@13259
   802
done
paulson@13259
   803
paulson@13259
   804
lemma vimage_subset: "r <= A*B ==> r-``C <= A"
paulson@13259
   805
apply (unfold vimage_def)
paulson@13259
   806
apply (erule converse_type [THEN image_subset])
paulson@13259
   807
done
paulson@13165
   808
paulson@13165
   809
lemma vimage_0 [simp]: "r-``0 = 0"
paulson@13165
   810
by blast
paulson@13165
   811
paulson@13165
   812
lemma vimage_Un [simp]: "r-``(A Un B) = (r-``A) Un (r-``B)"
paulson@13165
   813
by blast
paulson@13165
   814
paulson@13165
   815
lemma vimage_Int_subset: "r-``(A Int B) <= (r-``A) Int (r-``B)"
paulson@13165
   816
by blast
paulson@13165
   817
paulson@13165
   818
(*NOT suitable for rewriting*)
paulson@13165
   819
lemma vimage_eq_UN: "f -``B = (UN y:B. f-``{y})"
paulson@13165
   820
by blast
paulson@13165
   821
paulson@13165
   822
lemma function_vimage_Int:
paulson@13165
   823
     "function(f) ==> f-``(A Int B) = (f-``A)  Int  (f-``B)"
paulson@13165
   824
by (unfold function_def, blast)
paulson@13165
   825
paulson@13165
   826
lemma function_vimage_Diff: "function(f) ==> f-``(A-B) = (f-``A) - (f-``B)"
paulson@13165
   827
by (unfold function_def, blast)
paulson@13165
   828
paulson@13165
   829
lemma function_image_vimage: "function(f) ==> f `` (f-`` A) <= A"
paulson@13165
   830
by (unfold function_def, blast)
paulson@13165
   831
paulson@13165
   832
lemma vimage_Int_square_subset: "(r Int A*A)-``B <= (r-``B) Int A"
paulson@13165
   833
by blast
paulson@13165
   834
paulson@13165
   835
lemma vimage_Int_square: "B<=A ==> (r Int A*A)-``B = (r-``B) Int A"
paulson@13165
   836
by blast
paulson@13165
   837
paulson@13165
   838
paulson@13165
   839
paulson@13165
   840
(*Invese image laws for special relations*)
paulson@13165
   841
lemma vimage_0_left [simp]: "0-``A = 0"
paulson@13165
   842
by blast
paulson@13165
   843
paulson@13165
   844
lemma vimage_Un_left: "(r Un s)-``A = (r-``A) Un (s-``A)"
paulson@13165
   845
by blast
paulson@13165
   846
paulson@13165
   847
lemma vimage_Int_subset_left: "(r Int s)-``A <= (r-``A) Int (s-``A)"
paulson@13165
   848
by blast
paulson@13165
   849
paulson@13165
   850
paulson@13165
   851
(** Converse **)
paulson@13165
   852
paulson@13165
   853
lemma converse_Un [simp]: "converse(A Un B) = converse(A) Un converse(B)"
paulson@13165
   854
by blast
paulson@13165
   855
paulson@13165
   856
lemma converse_Int [simp]: "converse(A Int B) = converse(A) Int converse(B)"
paulson@13165
   857
by blast
paulson@13165
   858
paulson@13165
   859
lemma converse_Diff [simp]: "converse(A - B) = converse(A) - converse(B)"
paulson@13165
   860
by blast
paulson@13165
   861
paulson@13165
   862
lemma converse_UN [simp]: "converse(UN x:A. B(x)) = (UN x:A. converse(B(x)))"
paulson@13165
   863
by blast
paulson@13165
   864
paulson@13165
   865
(*Unfolding Inter avoids using excluded middle on A=0*)
paulson@13165
   866
lemma converse_INT [simp]:
paulson@13165
   867
     "converse(INT x:A. B(x)) = (INT x:A. converse(B(x)))"
paulson@13165
   868
apply (unfold Inter_def, blast)
paulson@13165
   869
done
paulson@13165
   870
paulson@13356
   871
paulson@13356
   872
subsection{*Powerset Operator*}
paulson@13165
   873
paulson@13165
   874
lemma Pow_0 [simp]: "Pow(0) = {0}"
paulson@13165
   875
by blast
paulson@13165
   876
paulson@13165
   877
lemma Pow_insert: "Pow (cons(a,A)) = Pow(A) Un {cons(a,X) . X: Pow(A)}"
paulson@13165
   878
apply (rule equalityI, safe)
paulson@13165
   879
apply (erule swap)
paulson@13165
   880
apply (rule_tac a = "x-{a}" in RepFun_eqI, auto) 
paulson@13165
   881
done
paulson@13165
   882
paulson@13165
   883
lemma Un_Pow_subset: "Pow(A) Un Pow(B) <= Pow(A Un B)"
paulson@13165
   884
by blast
paulson@13165
   885
paulson@13165
   886
lemma UN_Pow_subset: "(UN x:A. Pow(B(x))) <= Pow(UN x:A. B(x))"
paulson@13165
   887
by blast
paulson@13165
   888
paulson@13165
   889
lemma subset_Pow_Union: "A <= Pow(Union(A))"
paulson@13165
   890
by blast
paulson@13165
   891
paulson@13165
   892
lemma Union_Pow_eq [simp]: "Union(Pow(A)) = A"
paulson@13165
   893
by blast
paulson@13165
   894
paulson@13165
   895
lemma Pow_Int_eq [simp]: "Pow(A Int B) = Pow(A) Int Pow(B)"
paulson@13165
   896
by blast
paulson@13165
   897
paulson@13165
   898
lemma Pow_INT_eq: "x:A ==> Pow(INT x:A. B(x)) = (INT x:A. Pow(B(x)))"
paulson@13165
   899
by blast
paulson@13165
   900
paulson@13356
   901
paulson@13356
   902
subsection{*RepFun*}
paulson@13259
   903
paulson@13259
   904
lemma RepFun_subset: "[| !!x. x:A ==> f(x): B |] ==> {f(x). x:A} <= B"
paulson@13259
   905
by blast
paulson@13165
   906
paulson@13165
   907
lemma RepFun_eq_0_iff [simp]: "{f(x).x:A}=0 <-> A=0"
paulson@13165
   908
by blast
paulson@13165
   909
paulson@13165
   910
lemma RepFun_constant [simp]: "{c. x:A} = (if A=0 then 0 else {c})"
paulson@13165
   911
apply auto
paulson@13165
   912
apply blast
paulson@13165
   913
done
paulson@13165
   914
paulson@13356
   915
subsection{*Collect*}
paulson@13259
   916
paulson@13259
   917
lemma Collect_subset: "Collect(A,P) <= A"
paulson@13259
   918
by blast
paulson@2469
   919
paulson@13165
   920
lemma Collect_Un: "Collect(A Un B, P) = Collect(A,P) Un Collect(B,P)"
paulson@13165
   921
by blast
paulson@13165
   922
paulson@13165
   923
lemma Collect_Int: "Collect(A Int B, P) = Collect(A,P) Int Collect(B,P)"
paulson@13165
   924
by blast
paulson@13165
   925
paulson@13165
   926
lemma Collect_Diff: "Collect(A - B, P) = Collect(A,P) - Collect(B,P)"
paulson@13165
   927
by blast
paulson@13165
   928
paulson@13165
   929
lemma Collect_cons: "{x:cons(a,B). P(x)} =  
paulson@13165
   930
      (if P(a) then cons(a, {x:B. P(x)}) else {x:B. P(x)})"
paulson@13165
   931
by (simp, blast)
paulson@13165
   932
paulson@13165
   933
lemma Int_Collect_self_eq: "A Int Collect(A,P) = Collect(A,P)"
paulson@13165
   934
by blast
paulson@13165
   935
paulson@13165
   936
lemma Collect_Collect_eq [simp]:
paulson@13165
   937
     "Collect(Collect(A,P), Q) = Collect(A, %x. P(x) & Q(x))"
paulson@13165
   938
by blast
paulson@13165
   939
paulson@13165
   940
lemma Collect_Int_Collect_eq:
paulson@13165
   941
     "Collect(A,P) Int Collect(A,Q) = Collect(A, %x. P(x) & Q(x))"
paulson@13165
   942
by blast
paulson@13165
   943
paulson@13203
   944
lemma Collect_Union_eq [simp]:
paulson@13203
   945
     "Collect(\<Union>x\<in>A. B(x), P) = (\<Union>x\<in>A. Collect(B(x), P))"
paulson@13203
   946
by blast
paulson@13203
   947
paulson@13259
   948
lemmas subset_SIs = subset_refl cons_subsetI subset_consI 
paulson@13259
   949
                    Union_least UN_least Un_least 
paulson@13259
   950
                    Inter_greatest Int_greatest RepFun_subset
paulson@13259
   951
                    Un_upper1 Un_upper2 Int_lower1 Int_lower2
paulson@13259
   952
paulson@13259
   953
(*First, ML bindings from the old file subset.ML*)
paulson@13259
   954
ML
paulson@13259
   955
{*
paulson@13259
   956
val cons_subsetI = thm "cons_subsetI";
paulson@13259
   957
val subset_consI = thm "subset_consI";
paulson@13259
   958
val cons_subset_iff = thm "cons_subset_iff";
paulson@13259
   959
val cons_subsetE = thm "cons_subsetE";
paulson@13259
   960
val subset_empty_iff = thm "subset_empty_iff";
paulson@13259
   961
val subset_cons_iff = thm "subset_cons_iff";
paulson@13259
   962
val subset_succI = thm "subset_succI";
paulson@13259
   963
val succ_subsetI = thm "succ_subsetI";
paulson@13259
   964
val succ_subsetE = thm "succ_subsetE";
paulson@13259
   965
val succ_subset_iff = thm "succ_subset_iff";
paulson@13259
   966
val singleton_subsetI = thm "singleton_subsetI";
paulson@13259
   967
val singleton_subsetD = thm "singleton_subsetD";
paulson@13259
   968
val Union_subset_iff = thm "Union_subset_iff";
paulson@13259
   969
val Union_upper = thm "Union_upper";
paulson@13259
   970
val Union_least = thm "Union_least";
paulson@13259
   971
val subset_UN_iff_eq = thm "subset_UN_iff_eq";
paulson@13259
   972
val UN_subset_iff = thm "UN_subset_iff";
paulson@13259
   973
val UN_upper = thm "UN_upper";
paulson@13259
   974
val UN_least = thm "UN_least";
paulson@13259
   975
val Inter_subset_iff = thm "Inter_subset_iff";
paulson@13259
   976
val Inter_lower = thm "Inter_lower";
paulson@13259
   977
val Inter_greatest = thm "Inter_greatest";
paulson@13259
   978
val INT_lower = thm "INT_lower";
paulson@13259
   979
val INT_greatest = thm "INT_greatest";
paulson@13259
   980
val Un_subset_iff = thm "Un_subset_iff";
paulson@13259
   981
val Un_upper1 = thm "Un_upper1";
paulson@13259
   982
val Un_upper2 = thm "Un_upper2";
paulson@13259
   983
val Un_least = thm "Un_least";
paulson@13259
   984
val Int_subset_iff = thm "Int_subset_iff";
paulson@13259
   985
val Int_lower1 = thm "Int_lower1";
paulson@13259
   986
val Int_lower2 = thm "Int_lower2";
paulson@13259
   987
val Int_greatest = thm "Int_greatest";
paulson@13259
   988
val Diff_subset = thm "Diff_subset";
paulson@13259
   989
val Diff_contains = thm "Diff_contains";
paulson@13259
   990
val subset_Diff_cons_iff = thm "subset_Diff_cons_iff";
paulson@13259
   991
val Collect_subset = thm "Collect_subset";
paulson@13259
   992
val RepFun_subset = thm "RepFun_subset";
paulson@13259
   993
paulson@13259
   994
val subset_SIs = thms "subset_SIs";
paulson@13259
   995
paulson@13259
   996
val subset_cs = claset() 
paulson@13259
   997
    delrules [subsetI, subsetCE]
paulson@13259
   998
    addSIs subset_SIs
paulson@13259
   999
    addIs  [Union_upper, Inter_lower]
paulson@13259
  1000
    addSEs [cons_subsetE];
paulson@13259
  1001
*}
paulson@13259
  1002
(*subset_cs is a claset for subset reasoning*)
paulson@13259
  1003
paulson@13165
  1004
ML
paulson@13165
  1005
{*
paulson@13168
  1006
val ZF_cs = claset() delrules [equalityI];
paulson@13168
  1007
paulson@13259
  1008
val in_mono = thm "in_mono";
paulson@13259
  1009
val conj_mono = thm "conj_mono";
paulson@13259
  1010
val disj_mono = thm "disj_mono";
paulson@13259
  1011
val imp_mono = thm "imp_mono";
paulson@13259
  1012
val imp_refl = thm "imp_refl";
paulson@13259
  1013
val ex_mono = thm "ex_mono";
paulson@13259
  1014
val all_mono = thm "all_mono";
paulson@13259
  1015
paulson@13168
  1016
val converse_iff = thm "converse_iff";
paulson@13168
  1017
val converseI = thm "converseI";
paulson@13168
  1018
val converseD = thm "converseD";
paulson@13168
  1019
val converseE = thm "converseE";
paulson@13168
  1020
val converse_converse = thm "converse_converse";
paulson@13168
  1021
val converse_type = thm "converse_type";
paulson@13168
  1022
val converse_prod = thm "converse_prod";
paulson@13168
  1023
val converse_empty = thm "converse_empty";
paulson@13168
  1024
val converse_subset_iff = thm "converse_subset_iff";
paulson@13168
  1025
val domain_iff = thm "domain_iff";
paulson@13168
  1026
val domainI = thm "domainI";
paulson@13168
  1027
val domainE = thm "domainE";
paulson@13168
  1028
val domain_subset = thm "domain_subset";
paulson@13168
  1029
val rangeI = thm "rangeI";
paulson@13168
  1030
val rangeE = thm "rangeE";
paulson@13168
  1031
val range_subset = thm "range_subset";
paulson@13168
  1032
val fieldI1 = thm "fieldI1";
paulson@13168
  1033
val fieldI2 = thm "fieldI2";
paulson@13168
  1034
val fieldCI = thm "fieldCI";
paulson@13168
  1035
val fieldE = thm "fieldE";
paulson@13168
  1036
val field_subset = thm "field_subset";
paulson@13168
  1037
val domain_subset_field = thm "domain_subset_field";
paulson@13168
  1038
val range_subset_field = thm "range_subset_field";
paulson@13168
  1039
val domain_times_range = thm "domain_times_range";
paulson@13168
  1040
val field_times_field = thm "field_times_field";
paulson@13168
  1041
val image_iff = thm "image_iff";
paulson@13168
  1042
val image_singleton_iff = thm "image_singleton_iff";
paulson@13168
  1043
val imageI = thm "imageI";
paulson@13168
  1044
val imageE = thm "imageE";
paulson@13168
  1045
val image_subset = thm "image_subset";
paulson@13168
  1046
val vimage_iff = thm "vimage_iff";
paulson@13168
  1047
val vimage_singleton_iff = thm "vimage_singleton_iff";
paulson@13168
  1048
val vimageI = thm "vimageI";
paulson@13168
  1049
val vimageE = thm "vimageE";
paulson@13168
  1050
val vimage_subset = thm "vimage_subset";
paulson@13168
  1051
val rel_Union = thm "rel_Union";
paulson@13168
  1052
val rel_Un = thm "rel_Un";
paulson@13168
  1053
val domain_Diff_eq = thm "domain_Diff_eq";
paulson@13168
  1054
val range_Diff_eq = thm "range_Diff_eq";
paulson@13165
  1055
val cons_eq = thm "cons_eq";
paulson@13165
  1056
val cons_commute = thm "cons_commute";
paulson@13165
  1057
val cons_absorb = thm "cons_absorb";
paulson@13165
  1058
val cons_Diff = thm "cons_Diff";
paulson@13165
  1059
val equal_singleton = thm "equal_singleton";
paulson@13165
  1060
val Int_cons = thm "Int_cons";
paulson@13165
  1061
val Int_absorb = thm "Int_absorb";
paulson@13165
  1062
val Int_left_absorb = thm "Int_left_absorb";
paulson@13165
  1063
val Int_commute = thm "Int_commute";
paulson@13165
  1064
val Int_left_commute = thm "Int_left_commute";
paulson@13165
  1065
val Int_assoc = thm "Int_assoc";
paulson@13165
  1066
val Int_Un_distrib = thm "Int_Un_distrib";
paulson@13165
  1067
val Int_Un_distrib2 = thm "Int_Un_distrib2";
paulson@13165
  1068
val subset_Int_iff = thm "subset_Int_iff";
paulson@13165
  1069
val subset_Int_iff2 = thm "subset_Int_iff2";
paulson@13165
  1070
val Int_Diff_eq = thm "Int_Diff_eq";
paulson@13165
  1071
val Un_cons = thm "Un_cons";
paulson@13165
  1072
val Un_absorb = thm "Un_absorb";
paulson@13165
  1073
val Un_left_absorb = thm "Un_left_absorb";
paulson@13165
  1074
val Un_commute = thm "Un_commute";
paulson@13165
  1075
val Un_left_commute = thm "Un_left_commute";
paulson@13165
  1076
val Un_assoc = thm "Un_assoc";
paulson@13165
  1077
val Un_Int_distrib = thm "Un_Int_distrib";
paulson@13165
  1078
val subset_Un_iff = thm "subset_Un_iff";
paulson@13165
  1079
val subset_Un_iff2 = thm "subset_Un_iff2";
paulson@13165
  1080
val Un_empty = thm "Un_empty";
paulson@13165
  1081
val Un_eq_Union = thm "Un_eq_Union";
paulson@13165
  1082
val Diff_cancel = thm "Diff_cancel";
paulson@13165
  1083
val Diff_triv = thm "Diff_triv";
paulson@13165
  1084
val empty_Diff = thm "empty_Diff";
paulson@13165
  1085
val Diff_0 = thm "Diff_0";
paulson@13165
  1086
val Diff_eq_0_iff = thm "Diff_eq_0_iff";
paulson@13165
  1087
val Diff_cons = thm "Diff_cons";
paulson@13165
  1088
val Diff_cons2 = thm "Diff_cons2";
paulson@13165
  1089
val Diff_disjoint = thm "Diff_disjoint";
paulson@13165
  1090
val Diff_partition = thm "Diff_partition";
paulson@13165
  1091
val subset_Un_Diff = thm "subset_Un_Diff";
paulson@13165
  1092
val double_complement = thm "double_complement";
paulson@13165
  1093
val double_complement_Un = thm "double_complement_Un";
paulson@13165
  1094
val Un_Int_crazy = thm "Un_Int_crazy";
paulson@13165
  1095
val Diff_Un = thm "Diff_Un";
paulson@13165
  1096
val Diff_Int = thm "Diff_Int";
paulson@13165
  1097
val Un_Diff = thm "Un_Diff";
paulson@13165
  1098
val Int_Diff = thm "Int_Diff";
paulson@13165
  1099
val Diff_Int_distrib = thm "Diff_Int_distrib";
paulson@13165
  1100
val Diff_Int_distrib2 = thm "Diff_Int_distrib2";
paulson@13165
  1101
val Un_Int_assoc_iff = thm "Un_Int_assoc_iff";
paulson@13165
  1102
val Union_cons = thm "Union_cons";
paulson@13165
  1103
val Union_Un_distrib = thm "Union_Un_distrib";
paulson@13165
  1104
val Union_Int_subset = thm "Union_Int_subset";
paulson@13165
  1105
val Union_disjoint = thm "Union_disjoint";
paulson@13165
  1106
val Union_empty_iff = thm "Union_empty_iff";
paulson@13165
  1107
val Inter_0 = thm "Inter_0";
paulson@13165
  1108
val Inter_Un_subset = thm "Inter_Un_subset";
paulson@13165
  1109
val Inter_Un_distrib = thm "Inter_Un_distrib";
paulson@13165
  1110
val Union_singleton = thm "Union_singleton";
paulson@13165
  1111
val Inter_singleton = thm "Inter_singleton";
paulson@13165
  1112
val Inter_cons = thm "Inter_cons";
paulson@13165
  1113
val Union_eq_UN = thm "Union_eq_UN";
paulson@13165
  1114
val Inter_eq_INT = thm "Inter_eq_INT";
paulson@13165
  1115
val UN_0 = thm "UN_0";
paulson@13165
  1116
val UN_singleton = thm "UN_singleton";
paulson@13165
  1117
val UN_Un = thm "UN_Un";
paulson@13165
  1118
val INT_Un = thm "INT_Un";
paulson@13165
  1119
val UN_UN_flatten = thm "UN_UN_flatten";
paulson@13165
  1120
val Int_UN_distrib = thm "Int_UN_distrib";
paulson@13165
  1121
val Un_INT_distrib = thm "Un_INT_distrib";
paulson@13165
  1122
val Int_UN_distrib2 = thm "Int_UN_distrib2";
paulson@13165
  1123
val Un_INT_distrib2 = thm "Un_INT_distrib2";
paulson@13165
  1124
val UN_constant = thm "UN_constant";
paulson@13165
  1125
val INT_constant = thm "INT_constant";
paulson@13165
  1126
val UN_RepFun = thm "UN_RepFun";
paulson@13165
  1127
val INT_RepFun = thm "INT_RepFun";
paulson@13165
  1128
val INT_Union_eq = thm "INT_Union_eq";
paulson@13165
  1129
val INT_UN_eq = thm "INT_UN_eq";
paulson@13165
  1130
val UN_Un_distrib = thm "UN_Un_distrib";
paulson@13165
  1131
val INT_Int_distrib = thm "INT_Int_distrib";
paulson@13165
  1132
val UN_Int_subset = thm "UN_Int_subset";
paulson@13165
  1133
val Diff_UN = thm "Diff_UN";
paulson@13165
  1134
val Diff_INT = thm "Diff_INT";
paulson@13165
  1135
val Sigma_cons1 = thm "Sigma_cons1";
paulson@13165
  1136
val Sigma_cons2 = thm "Sigma_cons2";
paulson@13165
  1137
val Sigma_succ1 = thm "Sigma_succ1";
paulson@13165
  1138
val Sigma_succ2 = thm "Sigma_succ2";
paulson@13165
  1139
val SUM_UN_distrib1 = thm "SUM_UN_distrib1";
paulson@13165
  1140
val SUM_UN_distrib2 = thm "SUM_UN_distrib2";
paulson@13165
  1141
val SUM_Un_distrib1 = thm "SUM_Un_distrib1";
paulson@13165
  1142
val SUM_Un_distrib2 = thm "SUM_Un_distrib2";
paulson@13165
  1143
val prod_Un_distrib2 = thm "prod_Un_distrib2";
paulson@13165
  1144
val SUM_Int_distrib1 = thm "SUM_Int_distrib1";
paulson@13165
  1145
val SUM_Int_distrib2 = thm "SUM_Int_distrib2";
paulson@13165
  1146
val prod_Int_distrib2 = thm "prod_Int_distrib2";
paulson@13165
  1147
val SUM_eq_UN = thm "SUM_eq_UN";
paulson@13165
  1148
val domain_of_prod = thm "domain_of_prod";
paulson@13165
  1149
val domain_0 = thm "domain_0";
paulson@13165
  1150
val domain_cons = thm "domain_cons";
paulson@13165
  1151
val domain_Un_eq = thm "domain_Un_eq";
paulson@13165
  1152
val domain_Int_subset = thm "domain_Int_subset";
paulson@13165
  1153
val domain_Diff_subset = thm "domain_Diff_subset";
paulson@13165
  1154
val domain_converse = thm "domain_converse";
paulson@13165
  1155
val domain_UN = thm "domain_UN";
paulson@13165
  1156
val domain_Union = thm "domain_Union";
paulson@13165
  1157
val range_of_prod = thm "range_of_prod";
paulson@13165
  1158
val range_0 = thm "range_0";
paulson@13165
  1159
val range_cons = thm "range_cons";
paulson@13165
  1160
val range_Un_eq = thm "range_Un_eq";
paulson@13165
  1161
val range_Int_subset = thm "range_Int_subset";
paulson@13165
  1162
val range_Diff_subset = thm "range_Diff_subset";
paulson@13165
  1163
val range_converse = thm "range_converse";
paulson@13165
  1164
val field_of_prod = thm "field_of_prod";
paulson@13165
  1165
val field_0 = thm "field_0";
paulson@13165
  1166
val field_cons = thm "field_cons";
paulson@13165
  1167
val field_Un_eq = thm "field_Un_eq";
paulson@13165
  1168
val field_Int_subset = thm "field_Int_subset";
paulson@13165
  1169
val field_Diff_subset = thm "field_Diff_subset";
paulson@13165
  1170
val field_converse = thm "field_converse";
paulson@13165
  1171
val image_0 = thm "image_0";
paulson@13165
  1172
val image_Un = thm "image_Un";
paulson@13165
  1173
val image_Int_subset = thm "image_Int_subset";
paulson@13165
  1174
val image_Int_square_subset = thm "image_Int_square_subset";
paulson@13165
  1175
val image_Int_square = thm "image_Int_square";
paulson@13165
  1176
val image_0_left = thm "image_0_left";
paulson@13165
  1177
val image_Un_left = thm "image_Un_left";
paulson@13165
  1178
val image_Int_subset_left = thm "image_Int_subset_left";
paulson@13165
  1179
val vimage_0 = thm "vimage_0";
paulson@13165
  1180
val vimage_Un = thm "vimage_Un";
paulson@13165
  1181
val vimage_Int_subset = thm "vimage_Int_subset";
paulson@13165
  1182
val vimage_eq_UN = thm "vimage_eq_UN";
paulson@13165
  1183
val function_vimage_Int = thm "function_vimage_Int";
paulson@13165
  1184
val function_vimage_Diff = thm "function_vimage_Diff";
paulson@13165
  1185
val function_image_vimage = thm "function_image_vimage";
paulson@13165
  1186
val vimage_Int_square_subset = thm "vimage_Int_square_subset";
paulson@13165
  1187
val vimage_Int_square = thm "vimage_Int_square";
paulson@13165
  1188
val vimage_0_left = thm "vimage_0_left";
paulson@13165
  1189
val vimage_Un_left = thm "vimage_Un_left";
paulson@13165
  1190
val vimage_Int_subset_left = thm "vimage_Int_subset_left";
paulson@13165
  1191
val converse_Un = thm "converse_Un";
paulson@13165
  1192
val converse_Int = thm "converse_Int";
paulson@13165
  1193
val converse_Diff = thm "converse_Diff";
paulson@13165
  1194
val converse_UN = thm "converse_UN";
paulson@13165
  1195
val converse_INT = thm "converse_INT";
paulson@13165
  1196
val Pow_0 = thm "Pow_0";
paulson@13165
  1197
val Pow_insert = thm "Pow_insert";
paulson@13165
  1198
val Un_Pow_subset = thm "Un_Pow_subset";
paulson@13165
  1199
val UN_Pow_subset = thm "UN_Pow_subset";
paulson@13165
  1200
val subset_Pow_Union = thm "subset_Pow_Union";
paulson@13165
  1201
val Union_Pow_eq = thm "Union_Pow_eq";
paulson@13165
  1202
val Pow_Int_eq = thm "Pow_Int_eq";
paulson@13165
  1203
val Pow_INT_eq = thm "Pow_INT_eq";
paulson@13165
  1204
val RepFun_eq_0_iff = thm "RepFun_eq_0_iff";
paulson@13165
  1205
val RepFun_constant = thm "RepFun_constant";
paulson@13165
  1206
val Collect_Un = thm "Collect_Un";
paulson@13165
  1207
val Collect_Int = thm "Collect_Int";
paulson@13165
  1208
val Collect_Diff = thm "Collect_Diff";
paulson@13165
  1209
val Collect_cons = thm "Collect_cons";
paulson@13165
  1210
val Int_Collect_self_eq = thm "Int_Collect_self_eq";
paulson@13165
  1211
val Collect_Collect_eq = thm "Collect_Collect_eq";
paulson@13165
  1212
val Collect_Int_Collect_eq = thm "Collect_Int_Collect_eq";
paulson@13165
  1213
paulson@13165
  1214
val Int_ac = thms "Int_ac";
paulson@13165
  1215
val Un_ac = thms "Un_ac";
paulson@13165
  1216
paulson@13165
  1217
*}
paulson@13165
  1218
paulson@13165
  1219
end
paulson@13165
  1220