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