src/ZF/equalities.thy
author paulson
Wed May 22 18:11:57 2002 +0200 (2002-05-22)
changeset 13172 03a5afa7b888
parent 13169 394a6c649547
child 13174 85d3c0981a16
permissions -rw-r--r--
tidying up
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@13168
     6
Converse, domain, range of a relation or function.
paulson@13168
     7
paulson@13168
     8
And set theory equalities involving Union, Intersection, Inclusion, etc.
paulson@13165
     9
    (Thanks also to Philippe de Groote.)
paulson@13165
    10
*)
paulson@13165
    11
paulson@13168
    12
theory equalities = pair + subset:
paulson@13168
    13
paulson@13168
    14
paulson@13168
    15
(*** converse ***)
paulson@13168
    16
paulson@13168
    17
lemma converse_iff [iff]: "<a,b>: converse(r) <-> <b,a>:r"
paulson@13169
    18
by (unfold converse_def, blast)
paulson@13168
    19
paulson@13168
    20
lemma converseI: "<a,b>:r ==> <b,a>:converse(r)"
paulson@13169
    21
by (unfold converse_def, blast)
paulson@13168
    22
paulson@13168
    23
lemma converseD: "<a,b> : converse(r) ==> <b,a> : r"
paulson@13169
    24
by (unfold converse_def, blast)
paulson@13168
    25
paulson@13168
    26
lemma converseE [elim!]:
paulson@13168
    27
    "[| yx : converse(r);   
paulson@13168
    28
        !!x y. [| yx=<y,x>;  <x,y>:r |] ==> P |]
paulson@13168
    29
     ==> P"
paulson@13169
    30
apply (unfold converse_def, blast) 
paulson@13168
    31
done
paulson@13168
    32
paulson@13168
    33
lemma converse_converse: "r<=Sigma(A,B) ==> converse(converse(r)) = r"
paulson@13169
    34
by blast
paulson@13168
    35
paulson@13168
    36
lemma converse_type: "r<=A*B ==> converse(r)<=B*A"
paulson@13169
    37
by blast
paulson@13168
    38
paulson@13168
    39
lemma converse_prod [simp]: "converse(A*B) = B*A"
paulson@13169
    40
by blast
paulson@13168
    41
paulson@13168
    42
lemma converse_empty [simp]: "converse(0) = 0"
paulson@13169
    43
by blast
paulson@13168
    44
paulson@13168
    45
lemma converse_subset_iff: "A <= Sigma(X,Y) ==> converse(A) <= converse(B) <-> A <= B"
paulson@13169
    46
by blast
paulson@13168
    47
paulson@13168
    48
paulson@13168
    49
(*** domain ***)
paulson@13168
    50
paulson@13168
    51
lemma domain_iff: "a: domain(r) <-> (EX y. <a,y>: r)"
paulson@13169
    52
by (unfold domain_def, blast)
paulson@13168
    53
paulson@13168
    54
lemma domainI [intro]: "<a,b>: r ==> a: domain(r)"
paulson@13169
    55
by (unfold domain_def, blast)
paulson@13168
    56
paulson@13168
    57
lemma domainE [elim!]:
paulson@13168
    58
    "[| a : domain(r);  !!y. <a,y>: r ==> P |] ==> P"
paulson@13169
    59
apply (unfold domain_def, blast)
paulson@13168
    60
done
paulson@13168
    61
paulson@13168
    62
lemma domain_subset: "domain(Sigma(A,B)) <= A"
paulson@13169
    63
by blast
paulson@13168
    64
paulson@13168
    65
(*** range ***)
paulson@13168
    66
paulson@13168
    67
lemma rangeI [intro]: "<a,b>: r ==> b : range(r)"
paulson@13168
    68
apply (unfold range_def)
paulson@13168
    69
apply (erule converseI [THEN domainI])
paulson@13168
    70
done
paulson@13168
    71
paulson@13168
    72
lemma rangeE [elim!]: "[| b : range(r);  !!x. <x,b>: r ==> P |] ==> P"
paulson@13169
    73
by (unfold range_def, blast)
paulson@13168
    74
paulson@13168
    75
lemma range_subset: "range(A*B) <= B"
paulson@13168
    76
apply (unfold range_def)
paulson@13168
    77
apply (subst converse_prod)
paulson@13168
    78
apply (rule domain_subset)
paulson@13168
    79
done
paulson@13168
    80
paulson@13168
    81
paulson@13168
    82
(*** field ***)
paulson@13168
    83
paulson@13168
    84
lemma fieldI1: "<a,b>: r ==> a : field(r)"
paulson@13169
    85
by (unfold field_def, blast)
paulson@13168
    86
paulson@13168
    87
lemma fieldI2: "<a,b>: r ==> b : field(r)"
paulson@13169
    88
by (unfold field_def, blast)
paulson@13168
    89
paulson@13168
    90
lemma fieldCI [intro]: 
paulson@13168
    91
    "(~ <c,a>:r ==> <a,b>: r) ==> a : field(r)"
paulson@13169
    92
apply (unfold field_def, blast)
paulson@13168
    93
done
paulson@13168
    94
paulson@13168
    95
lemma fieldE [elim!]: 
paulson@13168
    96
     "[| a : field(r);   
paulson@13168
    97
         !!x. <a,x>: r ==> P;   
paulson@13168
    98
         !!x. <x,a>: r ==> P        |] ==> P"
paulson@13169
    99
apply (unfold field_def, blast)
paulson@13168
   100
done
paulson@13168
   101
paulson@13168
   102
lemma field_subset: "field(A*B) <= A Un B"
paulson@13169
   103
by blast
paulson@13168
   104
paulson@13168
   105
lemma domain_subset_field: "domain(r) <= field(r)"
paulson@13168
   106
apply (unfold field_def)
paulson@13168
   107
apply (rule Un_upper1)
paulson@13168
   108
done
paulson@13168
   109
paulson@13168
   110
lemma range_subset_field: "range(r) <= field(r)"
paulson@13168
   111
apply (unfold field_def)
paulson@13168
   112
apply (rule Un_upper2)
paulson@13168
   113
done
paulson@13168
   114
paulson@13168
   115
lemma domain_times_range: "r <= Sigma(A,B) ==> r <= domain(r)*range(r)"
paulson@13169
   116
by blast
paulson@13168
   117
paulson@13168
   118
lemma field_times_field: "r <= Sigma(A,B) ==> r <= field(r)*field(r)"
paulson@13169
   119
by blast
paulson@13168
   120
paulson@13168
   121
paulson@13168
   122
(*** Image of a set under a function/relation ***)
paulson@13168
   123
paulson@13168
   124
lemma image_iff: "b : r``A <-> (EX x:A. <x,b>:r)"
paulson@13169
   125
by (unfold image_def, blast)
paulson@13168
   126
paulson@13168
   127
lemma image_singleton_iff: "b : r``{a} <-> <a,b>:r"
paulson@13169
   128
by (rule image_iff [THEN iff_trans], blast)
paulson@13168
   129
paulson@13168
   130
lemma imageI [intro]: "[| <a,b>: r;  a:A |] ==> b : r``A"
paulson@13169
   131
by (unfold image_def, blast)
paulson@13168
   132
paulson@13168
   133
lemma imageE [elim!]: 
paulson@13168
   134
    "[| b: r``A;  !!x.[| <x,b>: r;  x:A |] ==> P |] ==> P"
paulson@13169
   135
apply (unfold image_def, blast)
paulson@13168
   136
done
paulson@13168
   137
paulson@13168
   138
lemma image_subset: "r <= A*B ==> r``C <= B"
paulson@13169
   139
by blast
paulson@13168
   140
paulson@13168
   141
paulson@13168
   142
(*** Inverse image of a set under a function/relation ***)
paulson@13168
   143
paulson@13168
   144
lemma vimage_iff: 
paulson@13168
   145
    "a : r-``B <-> (EX y:B. <a,y>:r)"
paulson@13169
   146
apply (unfold vimage_def image_def converse_def, blast)
paulson@13168
   147
done
paulson@13168
   148
paulson@13168
   149
lemma vimage_singleton_iff: "a : r-``{b} <-> <a,b>:r"
paulson@13169
   150
by (rule vimage_iff [THEN iff_trans], blast)
paulson@13168
   151
paulson@13168
   152
lemma vimageI [intro]: "[| <a,b>: r;  b:B |] ==> a : r-``B"
paulson@13169
   153
by (unfold vimage_def, blast)
paulson@13168
   154
paulson@13168
   155
lemma vimageE [elim!]: 
paulson@13168
   156
    "[| a: r-``B;  !!x.[| <a,x>: r;  x:B |] ==> P |] ==> P"
paulson@13169
   157
apply (unfold vimage_def, blast)
paulson@13168
   158
done
paulson@13168
   159
paulson@13168
   160
lemma vimage_subset: "r <= A*B ==> r-``C <= A"
paulson@13168
   161
apply (unfold vimage_def)
paulson@13168
   162
apply (erule converse_type [THEN image_subset])
paulson@13168
   163
done
paulson@13168
   164
paulson@13168
   165
paulson@13168
   166
(** The Union of a set of relations is a relation -- Lemma for fun_Union **)
paulson@13168
   167
lemma rel_Union: "(ALL x:S. EX A B. x <= A*B) ==>   
paulson@13168
   168
                  Union(S) <= domain(Union(S)) * range(Union(S))"
paulson@13168
   169
by blast
paulson@13168
   170
paulson@13168
   171
(** The Union of 2 relations is a relation (Lemma for fun_Un)  **)
paulson@13168
   172
lemma rel_Un: "[| r <= A*B;  s <= C*D |] ==> (r Un s) <= (A Un C) * (B Un D)"
paulson@13169
   173
by blast
paulson@13168
   174
paulson@13168
   175
lemma domain_Diff_eq: "[| <a,c> : r; c~=b |] ==> domain(r-{<a,b>}) = domain(r)"
paulson@13169
   176
by blast
paulson@13168
   177
paulson@13168
   178
lemma range_Diff_eq: "[| <c,b> : r; c~=a |] ==> range(r-{<a,b>}) = range(r)"
paulson@13169
   179
by blast
paulson@13168
   180
paulson@13168
   181
paulson@13165
   182
paulson@13165
   183
(** Finite Sets **)
paulson@13165
   184
paulson@13165
   185
(* cons_def refers to Upair; reversing the equality LOOPS in rewriting!*)
paulson@13165
   186
lemma cons_eq: "{a} Un B = cons(a,B)"
paulson@13165
   187
by blast
paulson@13165
   188
paulson@13165
   189
lemma cons_commute: "cons(a, cons(b, C)) = cons(b, cons(a, C))"
paulson@13165
   190
by blast
paulson@13165
   191
paulson@13165
   192
lemma cons_absorb: "a: B ==> cons(a,B) = B"
paulson@13165
   193
by blast
paulson@13165
   194
paulson@13165
   195
lemma cons_Diff: "a: B ==> cons(a, B-{a}) = B"
paulson@13165
   196
by blast
paulson@13165
   197
paulson@13165
   198
lemma equal_singleton [rule_format]: "[| a: C;  ALL y:C. y=b |] ==> C = {b}"
paulson@13165
   199
by blast
paulson@13165
   200
paulson@13172
   201
lemma [simp]: "cons(a,cons(a,B)) = cons(a,B)"
paulson@13172
   202
by blast
paulson@13165
   203
paulson@13165
   204
(** Binary Intersection **)
paulson@13165
   205
paulson@13165
   206
(*NOT an equality, but it seems to belong here...*)
paulson@13165
   207
lemma Int_cons: "cons(a,B) Int C <= cons(a, B Int C)"
paulson@13165
   208
by blast
paulson@13165
   209
paulson@13165
   210
lemma Int_absorb [simp]: "A Int A = A"
paulson@13165
   211
by blast
paulson@13165
   212
paulson@13165
   213
lemma Int_left_absorb: "A Int (A Int B) = A Int B"
paulson@13165
   214
by blast
paulson@13165
   215
paulson@13165
   216
lemma Int_commute: "A Int B = B Int A"
paulson@13165
   217
by blast
paulson@13165
   218
paulson@13165
   219
lemma Int_left_commute: "A Int (B Int C) = B Int (A Int C)"
paulson@13165
   220
by blast
paulson@13165
   221
paulson@13165
   222
lemma Int_assoc: "(A Int B) Int C  =  A Int (B Int C)"
paulson@13165
   223
by blast
paulson@13165
   224
paulson@13165
   225
(*Intersection is an AC-operator*)
paulson@13165
   226
lemmas Int_ac= Int_assoc Int_left_absorb Int_commute Int_left_commute
paulson@13165
   227
paulson@13165
   228
lemma Int_Un_distrib: "A Int (B Un C) = (A Int B) Un (A Int C)"
paulson@13165
   229
by blast
paulson@13165
   230
paulson@13165
   231
lemma Int_Un_distrib2: "(B Un C) Int A = (B Int A) Un (C Int A)"
paulson@13165
   232
by blast
paulson@13165
   233
paulson@13165
   234
lemma subset_Int_iff: "A<=B <-> A Int B = A"
paulson@13165
   235
by (blast elim!: equalityE)
paulson@13165
   236
paulson@13165
   237
lemma subset_Int_iff2: "A<=B <-> B Int A = A"
paulson@13165
   238
by (blast elim!: equalityE)
paulson@13165
   239
paulson@13165
   240
lemma Int_Diff_eq: "C<=A ==> (A-B) Int C = C-B"
paulson@13165
   241
by blast
paulson@13165
   242
paulson@13165
   243
(** Binary Union **)
paulson@13165
   244
paulson@13165
   245
lemma Un_cons: "cons(a,B) Un C = cons(a, B Un C)"
paulson@13165
   246
by blast
paulson@13165
   247
paulson@13165
   248
lemma Un_absorb [simp]: "A Un A = A"
paulson@13165
   249
by blast
paulson@13165
   250
paulson@13165
   251
lemma Un_left_absorb: "A Un (A Un B) = A Un B"
paulson@13165
   252
by blast
paulson@13165
   253
paulson@13165
   254
lemma Un_commute: "A Un B = B Un A"
paulson@13165
   255
by blast
paulson@13165
   256
paulson@13165
   257
lemma Un_left_commute: "A Un (B Un C) = B Un (A Un C)"
paulson@13165
   258
by blast
paulson@13165
   259
paulson@13165
   260
lemma Un_assoc: "(A Un B) Un C  =  A Un (B Un C)"
paulson@13165
   261
by blast
paulson@13165
   262
paulson@13165
   263
(*Union is an AC-operator*)
paulson@13165
   264
lemmas Un_ac = Un_assoc Un_left_absorb Un_commute Un_left_commute
paulson@13165
   265
paulson@13165
   266
lemma Un_Int_distrib: "(A Int B) Un C  =  (A Un C) Int (B Un C)"
paulson@13165
   267
by blast
paulson@13165
   268
paulson@13165
   269
lemma subset_Un_iff: "A<=B <-> A Un B = B"
paulson@13165
   270
by (blast elim!: equalityE)
paulson@13165
   271
paulson@13165
   272
lemma subset_Un_iff2: "A<=B <-> B Un A = B"
paulson@13165
   273
by (blast elim!: equalityE)
paulson@13165
   274
paulson@13165
   275
lemma Un_empty [iff]: "(A Un B = 0) <-> (A = 0 & B = 0)"
paulson@13165
   276
by blast
paulson@13165
   277
paulson@13165
   278
lemma Un_eq_Union: "A Un B = Union({A, B})"
paulson@13165
   279
by blast
paulson@13165
   280
paulson@13165
   281
(** Simple properties of Diff -- set difference **)
paulson@13165
   282
paulson@13165
   283
lemma Diff_cancel: "A - A = 0"
paulson@13165
   284
by blast
paulson@13165
   285
paulson@13165
   286
lemma Diff_triv: "A  Int B = 0 ==> A - B = A"
paulson@13165
   287
by blast
paulson@13165
   288
paulson@13165
   289
lemma empty_Diff [simp]: "0 - A = 0"
paulson@13165
   290
by blast
paulson@13165
   291
paulson@13165
   292
lemma Diff_0 [simp]: "A - 0 = A"
paulson@13165
   293
by blast
paulson@13165
   294
paulson@13165
   295
lemma Diff_eq_0_iff: "A - B = 0 <-> A <= B"
paulson@13165
   296
by (blast elim: equalityE)
paulson@13165
   297
paulson@13165
   298
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
paulson@13165
   299
lemma Diff_cons: "A - cons(a,B) = A - B - {a}"
paulson@13165
   300
by blast
paulson@13165
   301
paulson@13165
   302
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
paulson@13165
   303
lemma Diff_cons2: "A - cons(a,B) = A - {a} - B"
paulson@13165
   304
by blast
paulson@13165
   305
paulson@13165
   306
lemma Diff_disjoint: "A Int (B-A) = 0"
paulson@13165
   307
by blast
paulson@13165
   308
paulson@13165
   309
lemma Diff_partition: "A<=B ==> A Un (B-A) = B"
paulson@13165
   310
by blast
paulson@13165
   311
paulson@13165
   312
lemma subset_Un_Diff: "A <= B Un (A - B)"
paulson@13165
   313
by blast
paulson@13165
   314
paulson@13165
   315
lemma double_complement: "[| A<=B; B<=C |] ==> B-(C-A) = A"
paulson@13165
   316
by blast
paulson@13165
   317
paulson@13165
   318
lemma double_complement_Un: "(A Un B) - (B-A) = A"
paulson@13165
   319
by blast
paulson@13165
   320
paulson@13165
   321
lemma Un_Int_crazy: 
paulson@13165
   322
 "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)"
paulson@13165
   323
apply blast
paulson@13165
   324
done
paulson@13165
   325
paulson@13165
   326
lemma Diff_Un: "A - (B Un C) = (A-B) Int (A-C)"
paulson@13165
   327
by blast
paulson@13165
   328
paulson@13165
   329
lemma Diff_Int: "A - (B Int C) = (A-B) Un (A-C)"
paulson@13165
   330
by blast
paulson@13165
   331
paulson@13165
   332
lemma Un_Diff: "(A Un B) - C = (A - C) Un (B - C)"
paulson@13165
   333
by blast
paulson@13165
   334
paulson@13165
   335
lemma Int_Diff: "(A Int B) - C = A Int (B - C)"
paulson@13165
   336
by blast
paulson@13165
   337
paulson@13165
   338
lemma Diff_Int_distrib: "C Int (A-B) = (C Int A) - (C Int B)"
paulson@13165
   339
by blast
paulson@13165
   340
paulson@13165
   341
lemma Diff_Int_distrib2: "(A-B) Int C = (A Int C) - (B Int C)"
paulson@13165
   342
by blast
paulson@13165
   343
paulson@13165
   344
(*Halmos, Naive Set Theory, page 16.*)
paulson@13165
   345
lemma Un_Int_assoc_iff: "(A Int B) Un C = A Int (B Un C)  <->  C<=A"
paulson@13165
   346
by (blast elim!: equalityE)
paulson@13165
   347
paulson@13165
   348
paulson@13165
   349
(** Big Union and Intersection **)
paulson@13165
   350
paulson@13165
   351
lemma Union_cons [simp]: "Union(cons(a,B)) = a Un Union(B)"
paulson@13165
   352
by blast
paulson@13165
   353
paulson@13165
   354
lemma Union_Un_distrib: "Union(A Un B) = Union(A) Un Union(B)"
paulson@13165
   355
by blast
paulson@13165
   356
paulson@13165
   357
lemma Union_Int_subset: "Union(A Int B) <= Union(A) Int Union(B)"
paulson@13165
   358
by blast
paulson@13165
   359
paulson@13165
   360
lemma Union_disjoint: "Union(C) Int A = 0 <-> (ALL B:C. B Int A = 0)"
paulson@13165
   361
by (blast elim!: equalityE)
paulson@13165
   362
paulson@13165
   363
lemma Union_empty_iff: "Union(A) = 0 <-> (ALL B:A. B=0)"
paulson@13165
   364
by blast
paulson@13165
   365
paulson@13165
   366
lemma Inter_0: "Inter(0) = 0"
paulson@13165
   367
by (unfold Inter_def, blast)
paulson@13165
   368
paulson@13165
   369
lemma Inter_Un_subset: "[| z:A; z:B |] ==> Inter(A) Un Inter(B) <= Inter(A Int B)"
paulson@13165
   370
by blast
paulson@13165
   371
paulson@13165
   372
(* A good challenge: Inter is ill-behaved on the empty set *)
paulson@13165
   373
lemma Inter_Un_distrib:
paulson@13165
   374
     "[| a:A;  b:B |] ==> Inter(A Un B) = Inter(A) Int Inter(B)"
paulson@13165
   375
by blast
paulson@13165
   376
paulson@13165
   377
lemma Union_singleton: "Union({b}) = b"
paulson@13165
   378
by blast
paulson@13165
   379
paulson@13165
   380
lemma Inter_singleton: "Inter({b}) = b"
paulson@13165
   381
by blast
paulson@13165
   382
paulson@13165
   383
lemma Inter_cons [simp]:
paulson@13165
   384
     "Inter(cons(a,B)) = (if B=0 then a else a Int Inter(B))"
paulson@13165
   385
by force
paulson@13165
   386
paulson@13165
   387
(** Unions and Intersections of Families **)
paulson@13165
   388
paulson@13165
   389
lemma Union_eq_UN: "Union(A) = (UN x:A. x)"
paulson@13165
   390
by blast
paulson@13165
   391
paulson@13165
   392
lemma Inter_eq_INT: "Inter(A) = (INT x:A. x)"
paulson@13165
   393
by (unfold Inter_def, blast)
paulson@13165
   394
paulson@13165
   395
lemma UN_0 [simp]: "(UN i:0. A(i)) = 0"
paulson@13165
   396
by blast
paulson@13165
   397
paulson@13165
   398
lemma UN_singleton: "(UN x:A. {x}) = A"
paulson@13165
   399
by blast
paulson@13165
   400
paulson@13165
   401
lemma UN_Un: "(UN i: A Un B. C(i)) = (UN i: A. C(i)) Un (UN i:B. C(i))"
paulson@13165
   402
by blast
paulson@13165
   403
paulson@13165
   404
lemma INT_Un: "(INT i:I Un J. A(i)) = (if I=0 then INT j:J. A(j)  
paulson@13165
   405
                              else if J=0 then INT i:I. A(i)  
paulson@13165
   406
                              else ((INT i:I. A(i)) Int  (INT j:J. A(j))))"
paulson@13165
   407
apply auto
paulson@13165
   408
apply (blast intro!: equalityI)
paulson@13165
   409
done
paulson@13165
   410
paulson@13165
   411
lemma UN_UN_flatten: "(UN x : (UN y:A. B(y)). C(x)) = (UN y:A. UN x: B(y). C(x))"
paulson@13165
   412
by blast
paulson@13165
   413
paulson@13165
   414
(*Halmos, Naive Set Theory, page 35.*)
paulson@13165
   415
lemma Int_UN_distrib: "B Int (UN i:I. A(i)) = (UN i:I. B Int A(i))"
paulson@13165
   416
by blast
paulson@13165
   417
paulson@13165
   418
lemma Un_INT_distrib: "i:I ==> B Un (INT i:I. A(i)) = (INT i:I. B Un A(i))"
paulson@13165
   419
by blast
paulson@13165
   420
paulson@13165
   421
lemma Int_UN_distrib2:
paulson@13165
   422
     "(UN i:I. A(i)) Int (UN j:J. B(j)) = (UN i:I. UN j:J. A(i) Int B(j))"
paulson@13165
   423
by blast
paulson@13165
   424
paulson@13165
   425
lemma Un_INT_distrib2: "[| i:I;  j:J |] ==>  
paulson@13165
   426
      (INT i:I. A(i)) Un (INT j:J. B(j)) = (INT i:I. INT j:J. A(i) Un B(j))"
paulson@13165
   427
by blast
paulson@13165
   428
paulson@13165
   429
lemma UN_constant: "a: A ==> (UN y:A. c) = c"
paulson@13165
   430
by blast
paulson@13165
   431
paulson@13165
   432
lemma INT_constant: "a: A ==> (INT y:A. c) = c"
paulson@13165
   433
by blast
paulson@13165
   434
paulson@13165
   435
lemma UN_RepFun [simp]: "(UN y: RepFun(A,f). B(y)) = (UN x:A. B(f(x)))"
paulson@13165
   436
by blast
paulson@13165
   437
paulson@13165
   438
lemma INT_RepFun [simp]: "(INT x:RepFun(A,f). B(x))    = (INT a:A. B(f(a)))"
paulson@13165
   439
by (auto simp add: Inter_def)
paulson@13165
   440
paulson@13165
   441
lemma INT_Union_eq:
paulson@13165
   442
     "0 ~: A ==> (INT x: Union(A). B(x)) = (INT y:A. INT x:y. B(x))"
paulson@13165
   443
apply (simp add: Inter_def)
paulson@13165
   444
apply (subgoal_tac "ALL x:A. x~=0")
paulson@13165
   445
prefer 2 apply blast
paulson@13165
   446
apply force
paulson@13165
   447
done
paulson@13165
   448
paulson@13165
   449
lemma INT_UN_eq: "(ALL x:A. B(x) ~= 0)  
paulson@13165
   450
      ==> (INT z: (UN x:A. B(x)). C(z)) = (INT x:A. INT z: B(x). C(z))"
paulson@13165
   451
apply (subst INT_Union_eq, blast)
paulson@13165
   452
apply (simp add: Inter_def)
paulson@13165
   453
done
paulson@13165
   454
paulson@13165
   455
paulson@13165
   456
(** Devlin, Fundamentals of Contemporary Set Theory, page 12, exercise 5: 
paulson@13165
   457
    Union of a family of unions **)
paulson@13165
   458
paulson@13165
   459
lemma UN_Un_distrib:
paulson@13165
   460
     "(UN i:I. A(i) Un B(i)) = (UN i:I. A(i))  Un  (UN i:I. B(i))"
paulson@13165
   461
by blast
paulson@13165
   462
paulson@13165
   463
lemma INT_Int_distrib:
paulson@13165
   464
     "i:I ==> (INT i:I. A(i) Int B(i)) = (INT i:I. A(i)) Int (INT i:I. B(i))"
paulson@13165
   465
by blast
paulson@13165
   466
paulson@13165
   467
lemma UN_Int_subset:
paulson@13165
   468
     "(UN z:I Int J. A(z)) <= (UN z:I. A(z)) Int (UN z:J. A(z))"
paulson@13165
   469
by blast
paulson@13165
   470
paulson@13165
   471
(** Devlin, page 12, exercise 5: Complements **)
paulson@13165
   472
paulson@13165
   473
lemma Diff_UN: "i:I ==> B - (UN i:I. A(i)) = (INT i:I. B - A(i))"
paulson@13165
   474
by blast
paulson@13165
   475
paulson@13165
   476
lemma Diff_INT: "i:I ==> B - (INT i:I. A(i)) = (UN i:I. B - A(i))"
paulson@13165
   477
by blast
paulson@13165
   478
paulson@13165
   479
(** Unions and Intersections with General Sum **)
paulson@13165
   480
paulson@13165
   481
(*Not suitable for rewriting: LOOPS!*)
paulson@13165
   482
lemma Sigma_cons1: "Sigma(cons(a,B), C) = ({a}*C(a)) Un Sigma(B,C)"
paulson@13165
   483
by blast
paulson@13165
   484
paulson@13165
   485
(*Not suitable for rewriting: LOOPS!*)
paulson@13165
   486
lemma Sigma_cons2: "A * cons(b,B) = A*{b} Un A*B"
paulson@13165
   487
by blast
paulson@13165
   488
paulson@13165
   489
lemma Sigma_succ1: "Sigma(succ(A), B) = ({A}*B(A)) Un Sigma(A,B)"
paulson@13165
   490
by blast
paulson@13165
   491
paulson@13165
   492
lemma Sigma_succ2: "A * succ(B) = A*{B} Un A*B"
paulson@13165
   493
by blast
paulson@13165
   494
paulson@13165
   495
lemma SUM_UN_distrib1:
paulson@13165
   496
     "(SUM x:(UN y:A. C(y)). B(x)) = (UN y:A. SUM x:C(y). B(x))"
paulson@13165
   497
by blast
paulson@13165
   498
paulson@13165
   499
lemma SUM_UN_distrib2:
paulson@13165
   500
     "(SUM i:I. UN j:J. C(i,j)) = (UN j:J. SUM i:I. C(i,j))"
paulson@13165
   501
by blast
paulson@13165
   502
paulson@13165
   503
lemma SUM_Un_distrib1:
paulson@13165
   504
     "(SUM i:I Un J. C(i)) = (SUM i:I. C(i)) Un (SUM j:J. C(j))"
paulson@13165
   505
by blast
paulson@13165
   506
paulson@13165
   507
lemma SUM_Un_distrib2:
paulson@13165
   508
     "(SUM i:I. A(i) Un B(i)) = (SUM i:I. A(i)) Un (SUM i:I. B(i))"
paulson@13165
   509
by blast
paulson@13165
   510
paulson@13165
   511
(*First-order version of the above, for rewriting*)
paulson@13165
   512
lemma prod_Un_distrib2: "I * (A Un B) = I*A Un I*B"
paulson@13165
   513
by (rule SUM_Un_distrib2)
paulson@13165
   514
paulson@13165
   515
lemma SUM_Int_distrib1:
paulson@13165
   516
     "(SUM i:I Int J. C(i)) = (SUM i:I. C(i)) Int (SUM j:J. C(j))"
paulson@13165
   517
by blast
paulson@13165
   518
paulson@13165
   519
lemma SUM_Int_distrib2:
paulson@13165
   520
     "(SUM i:I. A(i) Int B(i)) = (SUM i:I. A(i)) Int (SUM i:I. B(i))"
paulson@13165
   521
by blast
paulson@13165
   522
paulson@13165
   523
(*First-order version of the above, for rewriting*)
paulson@13165
   524
lemma prod_Int_distrib2: "I * (A Int B) = I*A Int I*B"
paulson@13165
   525
by (rule SUM_Int_distrib2)
paulson@13165
   526
paulson@13165
   527
(*Cf Aczel, Non-Well-Founded Sets, page 115*)
paulson@13165
   528
lemma SUM_eq_UN: "(SUM i:I. A(i)) = (UN i:I. {i} * A(i))"
paulson@13165
   529
by blast
paulson@13165
   530
paulson@13165
   531
(** Domain **)
paulson@13165
   532
paulson@13165
   533
lemma domain_of_prod: "b:B ==> domain(A*B) = A"
paulson@13165
   534
by blast
paulson@13165
   535
paulson@13165
   536
lemma domain_0 [simp]: "domain(0) = 0"
paulson@13165
   537
by blast
paulson@13165
   538
paulson@13165
   539
lemma domain_cons [simp]: "domain(cons(<a,b>,r)) = cons(a, domain(r))"
paulson@13165
   540
by blast
paulson@13165
   541
paulson@13165
   542
lemma domain_Un_eq [simp]: "domain(A Un B) = domain(A) Un domain(B)"
paulson@13165
   543
by blast
paulson@13165
   544
paulson@13165
   545
lemma domain_Int_subset: "domain(A Int B) <= domain(A) Int domain(B)"
paulson@13165
   546
by blast
paulson@13165
   547
paulson@13165
   548
lemma domain_Diff_subset: "domain(A) - domain(B) <= domain(A - B)"
paulson@13165
   549
by blast
paulson@13165
   550
paulson@13165
   551
lemma domain_converse [simp]: "domain(converse(r)) = range(r)"
paulson@13165
   552
by blast
clasohm@124
   553
paulson@13165
   554
lemma domain_UN: "domain(UN x:A. B(x)) = (UN x:A. domain(B(x)))"
paulson@13165
   555
by blast
paulson@13165
   556
paulson@13165
   557
lemma domain_Union: "domain(Union(A)) = (UN x:A. domain(x))"
paulson@13165
   558
by blast
paulson@13165
   559
paulson@13165
   560
paulson@13165
   561
(** Range **)
paulson@13165
   562
paulson@13165
   563
lemma range_of_prod: "a:A ==> range(A*B) = B"
paulson@13165
   564
by blast
paulson@13165
   565
paulson@13165
   566
lemma range_0 [simp]: "range(0) = 0"
paulson@13165
   567
by blast
paulson@13165
   568
paulson@13165
   569
lemma range_cons [simp]: "range(cons(<a,b>,r)) = cons(b, range(r))"
paulson@13165
   570
by blast
paulson@13165
   571
paulson@13165
   572
lemma range_Un_eq [simp]: "range(A Un B) = range(A) Un range(B)"
paulson@13165
   573
by blast
paulson@13165
   574
paulson@13165
   575
lemma range_Int_subset: "range(A Int B) <= range(A) Int range(B)"
paulson@13165
   576
by blast
paulson@13165
   577
paulson@13165
   578
lemma range_Diff_subset: "range(A) - range(B) <= range(A - B)"
paulson@13165
   579
by blast
paulson@13165
   580
paulson@13165
   581
lemma range_converse [simp]: "range(converse(r)) = domain(r)"
paulson@13165
   582
by blast
paulson@13165
   583
paulson@13165
   584
paulson@13165
   585
(** Field **)
paulson@13165
   586
paulson@13165
   587
lemma field_of_prod: "field(A*A) = A"
paulson@13165
   588
by blast
paulson@13165
   589
paulson@13165
   590
lemma field_0 [simp]: "field(0) = 0"
paulson@13165
   591
by blast
paulson@13165
   592
paulson@13165
   593
lemma field_cons [simp]: "field(cons(<a,b>,r)) = cons(a, cons(b, field(r)))"
paulson@13165
   594
by blast
paulson@13165
   595
paulson@13165
   596
lemma field_Un_eq [simp]: "field(A Un B) = field(A) Un field(B)"
paulson@13165
   597
by blast
paulson@13165
   598
paulson@13165
   599
lemma field_Int_subset: "field(A Int B) <= field(A) Int field(B)"
paulson@13165
   600
by blast
paulson@13165
   601
paulson@13165
   602
lemma field_Diff_subset: "field(A) - field(B) <= field(A - B)"
paulson@13165
   603
by blast
paulson@13165
   604
paulson@13165
   605
lemma field_converse [simp]: "field(converse(r)) = field(r)"
paulson@13165
   606
by blast
paulson@13165
   607
paulson@13165
   608
paulson@13165
   609
(** Image **)
paulson@13165
   610
paulson@13165
   611
lemma image_0 [simp]: "r``0 = 0"
paulson@13165
   612
by blast
paulson@13165
   613
paulson@13165
   614
lemma image_Un [simp]: "r``(A Un B) = (r``A) Un (r``B)"
paulson@13165
   615
by blast
paulson@13165
   616
paulson@13165
   617
lemma image_Int_subset: "r``(A Int B) <= (r``A) Int (r``B)"
paulson@13165
   618
by blast
paulson@13165
   619
paulson@13165
   620
lemma image_Int_square_subset: "(r Int A*A)``B <= (r``B) Int A"
paulson@13165
   621
by blast
paulson@13165
   622
paulson@13165
   623
lemma image_Int_square: "B<=A ==> (r Int A*A)``B = (r``B) Int A"
paulson@13165
   624
by blast
paulson@13165
   625
paulson@13165
   626
paulson@13165
   627
(*Image laws for special relations*)
paulson@13165
   628
lemma image_0_left [simp]: "0``A = 0"
paulson@13165
   629
by blast
paulson@13165
   630
paulson@13165
   631
lemma image_Un_left: "(r Un s)``A = (r``A) Un (s``A)"
paulson@13165
   632
by blast
paulson@13165
   633
paulson@13165
   634
lemma image_Int_subset_left: "(r Int s)``A <= (r``A) Int (s``A)"
paulson@13165
   635
by blast
paulson@13165
   636
paulson@13165
   637
paulson@13165
   638
(** Inverse Image **)
paulson@13165
   639
paulson@13165
   640
lemma vimage_0 [simp]: "r-``0 = 0"
paulson@13165
   641
by blast
paulson@13165
   642
paulson@13165
   643
lemma vimage_Un [simp]: "r-``(A Un B) = (r-``A) Un (r-``B)"
paulson@13165
   644
by blast
paulson@13165
   645
paulson@13165
   646
lemma vimage_Int_subset: "r-``(A Int B) <= (r-``A) Int (r-``B)"
paulson@13165
   647
by blast
paulson@13165
   648
paulson@13165
   649
(*NOT suitable for rewriting*)
paulson@13165
   650
lemma vimage_eq_UN: "f -``B = (UN y:B. f-``{y})"
paulson@13165
   651
by blast
paulson@13165
   652
paulson@13165
   653
lemma function_vimage_Int:
paulson@13165
   654
     "function(f) ==> f-``(A Int B) = (f-``A)  Int  (f-``B)"
paulson@13165
   655
by (unfold function_def, blast)
paulson@13165
   656
paulson@13165
   657
lemma function_vimage_Diff: "function(f) ==> f-``(A-B) = (f-``A) - (f-``B)"
paulson@13165
   658
by (unfold function_def, blast)
paulson@13165
   659
paulson@13165
   660
lemma function_image_vimage: "function(f) ==> f `` (f-`` A) <= A"
paulson@13165
   661
by (unfold function_def, blast)
paulson@13165
   662
paulson@13165
   663
lemma vimage_Int_square_subset: "(r Int A*A)-``B <= (r-``B) Int A"
paulson@13165
   664
by blast
paulson@13165
   665
paulson@13165
   666
lemma vimage_Int_square: "B<=A ==> (r Int A*A)-``B = (r-``B) Int A"
paulson@13165
   667
by blast
paulson@13165
   668
paulson@13165
   669
paulson@13165
   670
paulson@13165
   671
(*Invese image laws for special relations*)
paulson@13165
   672
lemma vimage_0_left [simp]: "0-``A = 0"
paulson@13165
   673
by blast
paulson@13165
   674
paulson@13165
   675
lemma vimage_Un_left: "(r Un s)-``A = (r-``A) Un (s-``A)"
paulson@13165
   676
by blast
paulson@13165
   677
paulson@13165
   678
lemma vimage_Int_subset_left: "(r Int s)-``A <= (r-``A) Int (s-``A)"
paulson@13165
   679
by blast
paulson@13165
   680
paulson@13165
   681
paulson@13165
   682
(** Converse **)
paulson@13165
   683
paulson@13165
   684
lemma converse_Un [simp]: "converse(A Un B) = converse(A) Un converse(B)"
paulson@13165
   685
by blast
paulson@13165
   686
paulson@13165
   687
lemma converse_Int [simp]: "converse(A Int B) = converse(A) Int converse(B)"
paulson@13165
   688
by blast
paulson@13165
   689
paulson@13165
   690
lemma converse_Diff [simp]: "converse(A - B) = converse(A) - converse(B)"
paulson@13165
   691
by blast
paulson@13165
   692
paulson@13165
   693
lemma converse_UN [simp]: "converse(UN x:A. B(x)) = (UN x:A. converse(B(x)))"
paulson@13165
   694
by blast
paulson@13165
   695
paulson@13165
   696
(*Unfolding Inter avoids using excluded middle on A=0*)
paulson@13165
   697
lemma converse_INT [simp]:
paulson@13165
   698
     "converse(INT x:A. B(x)) = (INT x:A. converse(B(x)))"
paulson@13165
   699
apply (unfold Inter_def, blast)
paulson@13165
   700
done
paulson@13165
   701
paulson@13165
   702
(** Pow **)
paulson@13165
   703
paulson@13165
   704
lemma Pow_0 [simp]: "Pow(0) = {0}"
paulson@13165
   705
by blast
paulson@13165
   706
paulson@13165
   707
lemma Pow_insert: "Pow (cons(a,A)) = Pow(A) Un {cons(a,X) . X: Pow(A)}"
paulson@13165
   708
apply (rule equalityI, safe)
paulson@13165
   709
apply (erule swap)
paulson@13165
   710
apply (rule_tac a = "x-{a}" in RepFun_eqI, auto) 
paulson@13165
   711
done
paulson@13165
   712
paulson@13165
   713
lemma Un_Pow_subset: "Pow(A) Un Pow(B) <= Pow(A Un B)"
paulson@13165
   714
by blast
paulson@13165
   715
paulson@13165
   716
lemma UN_Pow_subset: "(UN x:A. Pow(B(x))) <= Pow(UN x:A. B(x))"
paulson@13165
   717
by blast
paulson@13165
   718
paulson@13165
   719
lemma subset_Pow_Union: "A <= Pow(Union(A))"
paulson@13165
   720
by blast
paulson@13165
   721
paulson@13165
   722
lemma Union_Pow_eq [simp]: "Union(Pow(A)) = A"
paulson@13165
   723
by blast
paulson@13165
   724
paulson@13165
   725
lemma Pow_Int_eq [simp]: "Pow(A Int B) = Pow(A) Int Pow(B)"
paulson@13165
   726
by blast
paulson@13165
   727
paulson@13165
   728
lemma Pow_INT_eq: "x:A ==> Pow(INT x:A. B(x)) = (INT x:A. Pow(B(x)))"
paulson@13165
   729
by blast
paulson@13165
   730
paulson@13165
   731
(** RepFun **)
paulson@13165
   732
paulson@13165
   733
lemma RepFun_eq_0_iff [simp]: "{f(x).x:A}=0 <-> A=0"
paulson@13165
   734
by blast
paulson@13165
   735
paulson@13165
   736
lemma RepFun_constant [simp]: "{c. x:A} = (if A=0 then 0 else {c})"
paulson@13165
   737
apply auto
paulson@13165
   738
apply blast
paulson@13165
   739
done
paulson@13165
   740
paulson@13165
   741
(** Collect **)
paulson@2469
   742
paulson@13165
   743
lemma Collect_Un: "Collect(A Un B, P) = Collect(A,P) Un Collect(B,P)"
paulson@13165
   744
by blast
paulson@13165
   745
paulson@13165
   746
lemma Collect_Int: "Collect(A Int B, P) = Collect(A,P) Int Collect(B,P)"
paulson@13165
   747
by blast
paulson@13165
   748
paulson@13165
   749
lemma Collect_Diff: "Collect(A - B, P) = Collect(A,P) - Collect(B,P)"
paulson@13165
   750
by blast
paulson@13165
   751
paulson@13165
   752
lemma Collect_cons: "{x:cons(a,B). P(x)} =  
paulson@13165
   753
      (if P(a) then cons(a, {x:B. P(x)}) else {x:B. P(x)})"
paulson@13165
   754
by (simp, blast)
paulson@13165
   755
paulson@13165
   756
lemma Int_Collect_self_eq: "A Int Collect(A,P) = Collect(A,P)"
paulson@13165
   757
by blast
paulson@13165
   758
paulson@13165
   759
lemma Collect_Collect_eq [simp]:
paulson@13165
   760
     "Collect(Collect(A,P), Q) = Collect(A, %x. P(x) & Q(x))"
paulson@13165
   761
by blast
paulson@13165
   762
paulson@13165
   763
lemma Collect_Int_Collect_eq:
paulson@13165
   764
     "Collect(A,P) Int Collect(A,Q) = Collect(A, %x. P(x) & Q(x))"
paulson@13165
   765
by blast
paulson@13165
   766
paulson@13165
   767
ML
paulson@13165
   768
{*
paulson@13168
   769
val ZF_cs = claset() delrules [equalityI];
paulson@13168
   770
paulson@13168
   771
val converse_iff = thm "converse_iff";
paulson@13168
   772
val converseI = thm "converseI";
paulson@13168
   773
val converseD = thm "converseD";
paulson@13168
   774
val converseE = thm "converseE";
paulson@13168
   775
val converse_converse = thm "converse_converse";
paulson@13168
   776
val converse_type = thm "converse_type";
paulson@13168
   777
val converse_prod = thm "converse_prod";
paulson@13168
   778
val converse_empty = thm "converse_empty";
paulson@13168
   779
val converse_subset_iff = thm "converse_subset_iff";
paulson@13168
   780
val domain_iff = thm "domain_iff";
paulson@13168
   781
val domainI = thm "domainI";
paulson@13168
   782
val domainE = thm "domainE";
paulson@13168
   783
val domain_subset = thm "domain_subset";
paulson@13168
   784
val rangeI = thm "rangeI";
paulson@13168
   785
val rangeE = thm "rangeE";
paulson@13168
   786
val range_subset = thm "range_subset";
paulson@13168
   787
val fieldI1 = thm "fieldI1";
paulson@13168
   788
val fieldI2 = thm "fieldI2";
paulson@13168
   789
val fieldCI = thm "fieldCI";
paulson@13168
   790
val fieldE = thm "fieldE";
paulson@13168
   791
val field_subset = thm "field_subset";
paulson@13168
   792
val domain_subset_field = thm "domain_subset_field";
paulson@13168
   793
val range_subset_field = thm "range_subset_field";
paulson@13168
   794
val domain_times_range = thm "domain_times_range";
paulson@13168
   795
val field_times_field = thm "field_times_field";
paulson@13168
   796
val image_iff = thm "image_iff";
paulson@13168
   797
val image_singleton_iff = thm "image_singleton_iff";
paulson@13168
   798
val imageI = thm "imageI";
paulson@13168
   799
val imageE = thm "imageE";
paulson@13168
   800
val image_subset = thm "image_subset";
paulson@13168
   801
val vimage_iff = thm "vimage_iff";
paulson@13168
   802
val vimage_singleton_iff = thm "vimage_singleton_iff";
paulson@13168
   803
val vimageI = thm "vimageI";
paulson@13168
   804
val vimageE = thm "vimageE";
paulson@13168
   805
val vimage_subset = thm "vimage_subset";
paulson@13168
   806
val rel_Union = thm "rel_Union";
paulson@13168
   807
val rel_Un = thm "rel_Un";
paulson@13168
   808
val domain_Diff_eq = thm "domain_Diff_eq";
paulson@13168
   809
val range_Diff_eq = thm "range_Diff_eq";
paulson@13165
   810
val cons_eq = thm "cons_eq";
paulson@13165
   811
val cons_commute = thm "cons_commute";
paulson@13165
   812
val cons_absorb = thm "cons_absorb";
paulson@13165
   813
val cons_Diff = thm "cons_Diff";
paulson@13165
   814
val equal_singleton = thm "equal_singleton";
paulson@13165
   815
val Int_cons = thm "Int_cons";
paulson@13165
   816
val Int_absorb = thm "Int_absorb";
paulson@13165
   817
val Int_left_absorb = thm "Int_left_absorb";
paulson@13165
   818
val Int_commute = thm "Int_commute";
paulson@13165
   819
val Int_left_commute = thm "Int_left_commute";
paulson@13165
   820
val Int_assoc = thm "Int_assoc";
paulson@13165
   821
val Int_Un_distrib = thm "Int_Un_distrib";
paulson@13165
   822
val Int_Un_distrib2 = thm "Int_Un_distrib2";
paulson@13165
   823
val subset_Int_iff = thm "subset_Int_iff";
paulson@13165
   824
val subset_Int_iff2 = thm "subset_Int_iff2";
paulson@13165
   825
val Int_Diff_eq = thm "Int_Diff_eq";
paulson@13165
   826
val Un_cons = thm "Un_cons";
paulson@13165
   827
val Un_absorb = thm "Un_absorb";
paulson@13165
   828
val Un_left_absorb = thm "Un_left_absorb";
paulson@13165
   829
val Un_commute = thm "Un_commute";
paulson@13165
   830
val Un_left_commute = thm "Un_left_commute";
paulson@13165
   831
val Un_assoc = thm "Un_assoc";
paulson@13165
   832
val Un_Int_distrib = thm "Un_Int_distrib";
paulson@13165
   833
val subset_Un_iff = thm "subset_Un_iff";
paulson@13165
   834
val subset_Un_iff2 = thm "subset_Un_iff2";
paulson@13165
   835
val Un_empty = thm "Un_empty";
paulson@13165
   836
val Un_eq_Union = thm "Un_eq_Union";
paulson@13165
   837
val Diff_cancel = thm "Diff_cancel";
paulson@13165
   838
val Diff_triv = thm "Diff_triv";
paulson@13165
   839
val empty_Diff = thm "empty_Diff";
paulson@13165
   840
val Diff_0 = thm "Diff_0";
paulson@13165
   841
val Diff_eq_0_iff = thm "Diff_eq_0_iff";
paulson@13165
   842
val Diff_cons = thm "Diff_cons";
paulson@13165
   843
val Diff_cons2 = thm "Diff_cons2";
paulson@13165
   844
val Diff_disjoint = thm "Diff_disjoint";
paulson@13165
   845
val Diff_partition = thm "Diff_partition";
paulson@13165
   846
val subset_Un_Diff = thm "subset_Un_Diff";
paulson@13165
   847
val double_complement = thm "double_complement";
paulson@13165
   848
val double_complement_Un = thm "double_complement_Un";
paulson@13165
   849
val Un_Int_crazy = thm "Un_Int_crazy";
paulson@13165
   850
val Diff_Un = thm "Diff_Un";
paulson@13165
   851
val Diff_Int = thm "Diff_Int";
paulson@13165
   852
val Un_Diff = thm "Un_Diff";
paulson@13165
   853
val Int_Diff = thm "Int_Diff";
paulson@13165
   854
val Diff_Int_distrib = thm "Diff_Int_distrib";
paulson@13165
   855
val Diff_Int_distrib2 = thm "Diff_Int_distrib2";
paulson@13165
   856
val Un_Int_assoc_iff = thm "Un_Int_assoc_iff";
paulson@13165
   857
val Union_cons = thm "Union_cons";
paulson@13165
   858
val Union_Un_distrib = thm "Union_Un_distrib";
paulson@13165
   859
val Union_Int_subset = thm "Union_Int_subset";
paulson@13165
   860
val Union_disjoint = thm "Union_disjoint";
paulson@13165
   861
val Union_empty_iff = thm "Union_empty_iff";
paulson@13165
   862
val Inter_0 = thm "Inter_0";
paulson@13165
   863
val Inter_Un_subset = thm "Inter_Un_subset";
paulson@13165
   864
val Inter_Un_distrib = thm "Inter_Un_distrib";
paulson@13165
   865
val Union_singleton = thm "Union_singleton";
paulson@13165
   866
val Inter_singleton = thm "Inter_singleton";
paulson@13165
   867
val Inter_cons = thm "Inter_cons";
paulson@13165
   868
val Union_eq_UN = thm "Union_eq_UN";
paulson@13165
   869
val Inter_eq_INT = thm "Inter_eq_INT";
paulson@13165
   870
val UN_0 = thm "UN_0";
paulson@13165
   871
val UN_singleton = thm "UN_singleton";
paulson@13165
   872
val UN_Un = thm "UN_Un";
paulson@13165
   873
val INT_Un = thm "INT_Un";
paulson@13165
   874
val UN_UN_flatten = thm "UN_UN_flatten";
paulson@13165
   875
val Int_UN_distrib = thm "Int_UN_distrib";
paulson@13165
   876
val Un_INT_distrib = thm "Un_INT_distrib";
paulson@13165
   877
val Int_UN_distrib2 = thm "Int_UN_distrib2";
paulson@13165
   878
val Un_INT_distrib2 = thm "Un_INT_distrib2";
paulson@13165
   879
val UN_constant = thm "UN_constant";
paulson@13165
   880
val INT_constant = thm "INT_constant";
paulson@13165
   881
val UN_RepFun = thm "UN_RepFun";
paulson@13165
   882
val INT_RepFun = thm "INT_RepFun";
paulson@13165
   883
val INT_Union_eq = thm "INT_Union_eq";
paulson@13165
   884
val INT_UN_eq = thm "INT_UN_eq";
paulson@13165
   885
val UN_Un_distrib = thm "UN_Un_distrib";
paulson@13165
   886
val INT_Int_distrib = thm "INT_Int_distrib";
paulson@13165
   887
val UN_Int_subset = thm "UN_Int_subset";
paulson@13165
   888
val Diff_UN = thm "Diff_UN";
paulson@13165
   889
val Diff_INT = thm "Diff_INT";
paulson@13165
   890
val Sigma_cons1 = thm "Sigma_cons1";
paulson@13165
   891
val Sigma_cons2 = thm "Sigma_cons2";
paulson@13165
   892
val Sigma_succ1 = thm "Sigma_succ1";
paulson@13165
   893
val Sigma_succ2 = thm "Sigma_succ2";
paulson@13165
   894
val SUM_UN_distrib1 = thm "SUM_UN_distrib1";
paulson@13165
   895
val SUM_UN_distrib2 = thm "SUM_UN_distrib2";
paulson@13165
   896
val SUM_Un_distrib1 = thm "SUM_Un_distrib1";
paulson@13165
   897
val SUM_Un_distrib2 = thm "SUM_Un_distrib2";
paulson@13165
   898
val prod_Un_distrib2 = thm "prod_Un_distrib2";
paulson@13165
   899
val SUM_Int_distrib1 = thm "SUM_Int_distrib1";
paulson@13165
   900
val SUM_Int_distrib2 = thm "SUM_Int_distrib2";
paulson@13165
   901
val prod_Int_distrib2 = thm "prod_Int_distrib2";
paulson@13165
   902
val SUM_eq_UN = thm "SUM_eq_UN";
paulson@13165
   903
val domain_of_prod = thm "domain_of_prod";
paulson@13165
   904
val domain_0 = thm "domain_0";
paulson@13165
   905
val domain_cons = thm "domain_cons";
paulson@13165
   906
val domain_Un_eq = thm "domain_Un_eq";
paulson@13165
   907
val domain_Int_subset = thm "domain_Int_subset";
paulson@13165
   908
val domain_Diff_subset = thm "domain_Diff_subset";
paulson@13165
   909
val domain_converse = thm "domain_converse";
paulson@13165
   910
val domain_UN = thm "domain_UN";
paulson@13165
   911
val domain_Union = thm "domain_Union";
paulson@13165
   912
val range_of_prod = thm "range_of_prod";
paulson@13165
   913
val range_0 = thm "range_0";
paulson@13165
   914
val range_cons = thm "range_cons";
paulson@13165
   915
val range_Un_eq = thm "range_Un_eq";
paulson@13165
   916
val range_Int_subset = thm "range_Int_subset";
paulson@13165
   917
val range_Diff_subset = thm "range_Diff_subset";
paulson@13165
   918
val range_converse = thm "range_converse";
paulson@13165
   919
val field_of_prod = thm "field_of_prod";
paulson@13165
   920
val field_0 = thm "field_0";
paulson@13165
   921
val field_cons = thm "field_cons";
paulson@13165
   922
val field_Un_eq = thm "field_Un_eq";
paulson@13165
   923
val field_Int_subset = thm "field_Int_subset";
paulson@13165
   924
val field_Diff_subset = thm "field_Diff_subset";
paulson@13165
   925
val field_converse = thm "field_converse";
paulson@13165
   926
val image_0 = thm "image_0";
paulson@13165
   927
val image_Un = thm "image_Un";
paulson@13165
   928
val image_Int_subset = thm "image_Int_subset";
paulson@13165
   929
val image_Int_square_subset = thm "image_Int_square_subset";
paulson@13165
   930
val image_Int_square = thm "image_Int_square";
paulson@13165
   931
val image_0_left = thm "image_0_left";
paulson@13165
   932
val image_Un_left = thm "image_Un_left";
paulson@13165
   933
val image_Int_subset_left = thm "image_Int_subset_left";
paulson@13165
   934
val vimage_0 = thm "vimage_0";
paulson@13165
   935
val vimage_Un = thm "vimage_Un";
paulson@13165
   936
val vimage_Int_subset = thm "vimage_Int_subset";
paulson@13165
   937
val vimage_eq_UN = thm "vimage_eq_UN";
paulson@13165
   938
val function_vimage_Int = thm "function_vimage_Int";
paulson@13165
   939
val function_vimage_Diff = thm "function_vimage_Diff";
paulson@13165
   940
val function_image_vimage = thm "function_image_vimage";
paulson@13165
   941
val vimage_Int_square_subset = thm "vimage_Int_square_subset";
paulson@13165
   942
val vimage_Int_square = thm "vimage_Int_square";
paulson@13165
   943
val vimage_0_left = thm "vimage_0_left";
paulson@13165
   944
val vimage_Un_left = thm "vimage_Un_left";
paulson@13165
   945
val vimage_Int_subset_left = thm "vimage_Int_subset_left";
paulson@13165
   946
val converse_Un = thm "converse_Un";
paulson@13165
   947
val converse_Int = thm "converse_Int";
paulson@13165
   948
val converse_Diff = thm "converse_Diff";
paulson@13165
   949
val converse_UN = thm "converse_UN";
paulson@13165
   950
val converse_INT = thm "converse_INT";
paulson@13165
   951
val Pow_0 = thm "Pow_0";
paulson@13165
   952
val Pow_insert = thm "Pow_insert";
paulson@13165
   953
val Un_Pow_subset = thm "Un_Pow_subset";
paulson@13165
   954
val UN_Pow_subset = thm "UN_Pow_subset";
paulson@13165
   955
val subset_Pow_Union = thm "subset_Pow_Union";
paulson@13165
   956
val Union_Pow_eq = thm "Union_Pow_eq";
paulson@13165
   957
val Pow_Int_eq = thm "Pow_Int_eq";
paulson@13165
   958
val Pow_INT_eq = thm "Pow_INT_eq";
paulson@13165
   959
val RepFun_eq_0_iff = thm "RepFun_eq_0_iff";
paulson@13165
   960
val RepFun_constant = thm "RepFun_constant";
paulson@13165
   961
val Collect_Un = thm "Collect_Un";
paulson@13165
   962
val Collect_Int = thm "Collect_Int";
paulson@13165
   963
val Collect_Diff = thm "Collect_Diff";
paulson@13165
   964
val Collect_cons = thm "Collect_cons";
paulson@13165
   965
val Int_Collect_self_eq = thm "Int_Collect_self_eq";
paulson@13165
   966
val Collect_Collect_eq = thm "Collect_Collect_eq";
paulson@13165
   967
val Collect_Int_Collect_eq = thm "Collect_Int_Collect_eq";
paulson@13165
   968
paulson@13165
   969
val Int_ac = thms "Int_ac";
paulson@13165
   970
val Un_ac = thms "Un_ac";
paulson@13165
   971
paulson@13165
   972
*}
paulson@13165
   973
paulson@13165
   974
end
paulson@13165
   975