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