src/HOL/MetisExamples/set.thy
author boehmes
Sat Oct 03 12:05:40 2009 +0200 (2009-10-03)
changeset 32864 a226f29d4bdc
parent 32685 29e4e567b5f4
permissions -rw-r--r--
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
eliminated unused provers,
turned references into configuration values
paulson@23449
     1
(*  Title:      HOL/MetisExamples/set.thy
paulson@23449
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@23449
     3
paulson@23449
     4
Testing the metis method
paulson@23449
     5
*)
paulson@23449
     6
paulson@23449
     7
theory set imports Main
paulson@23449
     8
paulson@23449
     9
begin
paulson@23449
    10
paulson@23449
    11
lemma "EX x X. ALL y. EX z Z. (~P(y,y) | P(x,x) | ~S(z,x)) &
paulson@23449
    12
               (S(x,y) | ~S(y,z) | Q(Z,Z))  &
paulson@24742
    13
               (Q(X,y) | ~Q(y,Z) | S(X,X))" 
paulson@23519
    14
by metis
paulson@23519
    15
(*??But metis can't prove the single-step version...*)
paulson@23449
    16
paulson@23519
    17
paulson@23449
    18
paulson@23449
    19
lemma "P(n::nat) ==> ~P(0) ==> n ~= 0"
paulson@23449
    20
by metis
paulson@23449
    21
paulson@26333
    22
declare [[sledgehammer_modulus = 1]]
paulson@23449
    23
wenzelm@28486
    24
paulson@23449
    25
(*multiple versions of this example*)
paulson@23449
    26
lemma (*equal_union: *)
paulson@23449
    27
   "(X = Y \<union> Z) =
paulson@23449
    28
    (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
paulson@23449
    29
proof (neg_clausify)
paulson@23449
    30
fix x
paulson@23449
    31
assume 0: "Y \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
    32
assume 1: "Z \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
    33
assume 2: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Y \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
    34
assume 3: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Z \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
    35
assume 4: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> \<not> X \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@24937
    36
assume 5: "\<And>V. ((\<not> Y \<subseteq> V \<or> \<not> Z \<subseteq> V) \<or> X \<subseteq> V) \<or> X = Y \<union> Z"
paulson@23449
    37
have 6: "sup Y Z = X \<or> Y \<subseteq> X"
haftmann@32685
    38
  by (metis 0)
paulson@23449
    39
have 7: "sup Y Z = X \<or> Z \<subseteq> X"
haftmann@32685
    40
  by (metis 1)
paulson@23449
    41
have 8: "\<And>X3. sup Y Z = X \<or> X \<subseteq> X3 \<or> \<not> Y \<subseteq> X3 \<or> \<not> Z \<subseteq> X3"
haftmann@32685
    42
  by (metis 5)
paulson@23449
    43
have 9: "Y \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
    44
  by (metis 2)
paulson@23449
    45
have 10: "Z \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
    46
  by (metis 3)
paulson@23449
    47
have 11: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
    48
  by (metis 4)
paulson@23449
    49
have 12: "Z \<subseteq> X"
haftmann@32685
    50
  by (metis Un_upper2 7)
paulson@23449
    51
have 13: "\<And>X3. sup Y Z = X \<or> X \<subseteq> sup X3 Z \<or> \<not> Y \<subseteq> sup X3 Z"
haftmann@32685
    52
  by (metis 8 Un_upper2)
paulson@23449
    53
have 14: "Y \<subseteq> X"
haftmann@32685
    54
  by (metis Un_upper1 6)
paulson@23449
    55
have 15: "Z \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X"
paulson@23449
    56
  by (metis 10 12)
paulson@23449
    57
have 16: "Y \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X"
paulson@23449
    58
  by (metis 9 12)
paulson@23449
    59
have 17: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x \<or> \<not> Y \<subseteq> X"
paulson@23449
    60
  by (metis 11 12)
paulson@23449
    61
have 18: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x"
paulson@23449
    62
  by (metis 17 14)
paulson@23449
    63
have 19: "Z \<subseteq> x \<or> sup Y Z \<noteq> X"
paulson@23449
    64
  by (metis 15 14)
paulson@23449
    65
have 20: "Y \<subseteq> x \<or> sup Y Z \<noteq> X"
paulson@23449
    66
  by (metis 16 14)
paulson@23449
    67
have 21: "sup Y Z = X \<or> X \<subseteq> sup Y Z"
haftmann@32685
    68
  by (metis 13 Un_upper1)
paulson@23449
    69
have 22: "sup Y Z = X \<or> \<not> sup Y Z \<subseteq> X"
paulson@23449
    70
  by (metis equalityI 21)
paulson@23449
    71
have 23: "sup Y Z = X \<or> \<not> Z \<subseteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
    72
  by (metis 22 Un_least)
paulson@23449
    73
have 24: "sup Y Z = X \<or> \<not> Y \<subseteq> X"
paulson@23449
    74
  by (metis 23 12)
paulson@23449
    75
have 25: "sup Y Z = X"
paulson@23449
    76
  by (metis 24 14)
paulson@23449
    77
have 26: "\<And>X3. X \<subseteq> X3 \<or> \<not> Z \<subseteq> X3 \<or> \<not> Y \<subseteq> X3"
haftmann@32685
    78
  by (metis Un_least 25)
paulson@23449
    79
have 27: "Y \<subseteq> x"
paulson@23449
    80
  by (metis 20 25)
paulson@23449
    81
have 28: "Z \<subseteq> x"
paulson@23449
    82
  by (metis 19 25)
paulson@23449
    83
have 29: "\<not> X \<subseteq> x"
paulson@23449
    84
  by (metis 18 25)
paulson@23449
    85
have 30: "X \<subseteq> x \<or> \<not> Y \<subseteq> x"
paulson@23449
    86
  by (metis 26 28)
paulson@23449
    87
have 31: "X \<subseteq> x"
paulson@23449
    88
  by (metis 30 27)
paulson@23449
    89
show "False"
paulson@23449
    90
  by (metis 31 29)
paulson@23449
    91
qed
paulson@23449
    92
paulson@26333
    93
declare [[sledgehammer_modulus = 2]]
paulson@23449
    94
paulson@23449
    95
lemma (*equal_union: *)
paulson@23449
    96
   "(X = Y \<union> Z) =
paulson@23449
    97
    (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
paulson@23449
    98
proof (neg_clausify)
paulson@23449
    99
fix x
paulson@23449
   100
assume 0: "Y \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   101
assume 1: "Z \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   102
assume 2: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Y \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   103
assume 3: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Z \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   104
assume 4: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> \<not> X \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@24937
   105
assume 5: "\<And>V. ((\<not> Y \<subseteq> V \<or> \<not> Z \<subseteq> V) \<or> X \<subseteq> V) \<or> X = Y \<union> Z"
paulson@23449
   106
have 6: "sup Y Z = X \<or> Y \<subseteq> X"
haftmann@32685
   107
  by (metis 0)
paulson@23449
   108
have 7: "Y \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
   109
  by (metis 2)
paulson@23449
   110
have 8: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
   111
  by (metis 4)
paulson@23449
   112
have 9: "\<And>X3. sup Y Z = X \<or> X \<subseteq> sup X3 Z \<or> \<not> Y \<subseteq> sup X3 Z"
haftmann@32685
   113
  by (metis 5 Un_upper2)
paulson@23449
   114
have 10: "Z \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
   115
  by (metis 3 Un_upper2)
paulson@23449
   116
have 11: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x \<or> \<not> Y \<subseteq> X"
haftmann@32685
   117
  by (metis 8 Un_upper2)
paulson@23449
   118
have 12: "Z \<subseteq> x \<or> sup Y Z \<noteq> X"
haftmann@32685
   119
  by (metis 10 Un_upper1)
paulson@23449
   120
have 13: "sup Y Z = X \<or> X \<subseteq> sup Y Z"
haftmann@32685
   121
  by (metis 9 Un_upper1)
paulson@23449
   122
have 14: "sup Y Z = X \<or> \<not> Z \<subseteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
   123
  by (metis equalityI 13 Un_least)
paulson@23449
   124
have 15: "sup Y Z = X"
haftmann@32685
   125
  by (metis 14 1 6)
paulson@23449
   126
have 16: "Y \<subseteq> x"
haftmann@32685
   127
  by (metis 7 Un_upper2 Un_upper1 15)
paulson@23449
   128
have 17: "\<not> X \<subseteq> x"
haftmann@32685
   129
  by (metis 11 Un_upper1 15)
paulson@23449
   130
have 18: "X \<subseteq> x"
haftmann@32685
   131
  by (metis Un_least 15 12 15 16)
paulson@23449
   132
show "False"
paulson@23449
   133
  by (metis 18 17)
paulson@23449
   134
qed
paulson@23449
   135
paulson@26333
   136
declare [[sledgehammer_modulus = 3]]
paulson@23449
   137
paulson@23449
   138
lemma (*equal_union: *)
paulson@23449
   139
   "(X = Y \<union> Z) =
paulson@23449
   140
    (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
paulson@23449
   141
proof (neg_clausify)
paulson@23449
   142
fix x
paulson@23449
   143
assume 0: "Y \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   144
assume 1: "Z \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   145
assume 2: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Y \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   146
assume 3: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Z \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   147
assume 4: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> \<not> X \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@24937
   148
assume 5: "\<And>V. ((\<not> Y \<subseteq> V \<or> \<not> Z \<subseteq> V) \<or> X \<subseteq> V) \<or> X = Y \<union> Z"
paulson@23449
   149
have 6: "Z \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
   150
  by (metis 3)
paulson@23449
   151
have 7: "\<And>X3. sup Y Z = X \<or> X \<subseteq> sup X3 Z \<or> \<not> Y \<subseteq> sup X3 Z"
haftmann@32685
   152
  by (metis 5 Un_upper2)
paulson@23449
   153
have 8: "Y \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
   154
  by (metis 2 Un_upper2)
paulson@23449
   155
have 9: "Z \<subseteq> x \<or> sup Y Z \<noteq> X"
haftmann@32685
   156
  by (metis 6 Un_upper2 Un_upper1)
paulson@23449
   157
have 10: "sup Y Z = X \<or> \<not> sup Y Z \<subseteq> X"
haftmann@32685
   158
  by (metis equalityI 7 Un_upper1)
paulson@23449
   159
have 11: "sup Y Z = X"
haftmann@32685
   160
  by (metis 10 Un_least 1 0)
paulson@23449
   161
have 12: "Z \<subseteq> x"
paulson@23449
   162
  by (metis 9 11)
paulson@23449
   163
have 13: "X \<subseteq> x"
haftmann@32685
   164
  by (metis Un_least 11 12 8 Un_upper1 11)
paulson@23449
   165
show "False"
haftmann@32685
   166
  by (metis 13 4 Un_upper2 Un_upper1 11)
paulson@23449
   167
qed
paulson@23449
   168
paulson@23449
   169
(*Example included in TPHOLs paper*)
paulson@23449
   170
paulson@26333
   171
declare [[sledgehammer_modulus = 4]]
paulson@23449
   172
paulson@23449
   173
lemma (*equal_union: *)
paulson@23449
   174
   "(X = Y \<union> Z) =
paulson@23449
   175
    (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
paulson@23449
   176
proof (neg_clausify)
paulson@23449
   177
fix x
paulson@23449
   178
assume 0: "Y \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   179
assume 1: "Z \<subseteq> X \<or> X = Y \<union> Z"
paulson@23449
   180
assume 2: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Y \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   181
assume 3: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> Z \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@23449
   182
assume 4: "(\<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X \<or> \<not> X \<subseteq> x) \<or> X \<noteq> Y \<union> Z"
paulson@24937
   183
assume 5: "\<And>V. ((\<not> Y \<subseteq> V \<or> \<not> Z \<subseteq> V) \<or> X \<subseteq> V) \<or> X = Y \<union> Z"
paulson@23449
   184
have 6: "sup Y Z \<noteq> X \<or> \<not> X \<subseteq> x \<or> \<not> Y \<subseteq> X \<or> \<not> Z \<subseteq> X"
haftmann@32685
   185
  by (metis 4)
paulson@23449
   186
have 7: "Z \<subseteq> x \<or> sup Y Z \<noteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
   187
  by (metis 3 Un_upper2)
paulson@23449
   188
have 8: "Z \<subseteq> x \<or> sup Y Z \<noteq> X"
haftmann@32685
   189
  by (metis 7 Un_upper1)
paulson@23449
   190
have 9: "sup Y Z = X \<or> \<not> Z \<subseteq> X \<or> \<not> Y \<subseteq> X"
haftmann@32685
   191
  by (metis equalityI 5 Un_upper2 Un_upper1 Un_least)
paulson@23449
   192
have 10: "Y \<subseteq> x"
haftmann@32685
   193
  by (metis 2 Un_upper2 1 Un_upper1 0 9 Un_upper2 1 Un_upper1 0)
paulson@23449
   194
have 11: "X \<subseteq> x"
haftmann@32685
   195
  by (metis Un_least 9 Un_upper2 1 Un_upper1 0 8 9 Un_upper2 1 Un_upper1 0 10)
paulson@23449
   196
show "False"
haftmann@32685
   197
  by (metis 11 6 Un_upper2 1 Un_upper1 0 9 Un_upper2 1 Un_upper1 0)
paulson@23449
   198
qed 
paulson@23449
   199
boehmes@32864
   200
declare [[ atp_problem_prefix = "set__equal_union" ]]
paulson@23449
   201
lemma (*equal_union: *)
paulson@23449
   202
   "(X = Y \<union> Z) =
paulson@23449
   203
    (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" 
paulson@23449
   204
(*One shot proof: hand-reduced. Metis can't do the full proof any more.*)
paulson@23449
   205
by (metis Un_least Un_upper1 Un_upper2 set_eq_subset)
paulson@23449
   206
paulson@23449
   207
boehmes@32864
   208
declare [[ atp_problem_prefix = "set__equal_inter" ]]
paulson@23449
   209
lemma "(X = Y \<inter> Z) =
paulson@23449
   210
    (X \<subseteq> Y \<and> X \<subseteq> Z \<and> (\<forall>V. V \<subseteq> Y \<and> V \<subseteq> Z \<longrightarrow> V \<subseteq> X))"
paulson@23449
   211
by (metis Int_greatest Int_lower1 Int_lower2 set_eq_subset)
paulson@23449
   212
boehmes@32864
   213
declare [[ atp_problem_prefix = "set__fixedpoint" ]]
paulson@23449
   214
lemma fixedpoint:
paulson@23449
   215
    "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
paulson@23449
   216
by metis
paulson@23449
   217
wenzelm@26312
   218
lemma (*fixedpoint:*)
paulson@23449
   219
    "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
paulson@23449
   220
proof (neg_clausify)
paulson@23449
   221
fix x xa
paulson@23449
   222
assume 0: "f (g x) = x"
paulson@24937
   223
assume 1: "\<And>y. y = x \<or> f (g y) \<noteq> y"
paulson@24937
   224
assume 2: "\<And>x. g (f (xa x)) = xa x \<or> g (f x) \<noteq> x"
paulson@24937
   225
assume 3: "\<And>x. g (f x) \<noteq> x \<or> xa x \<noteq> x"
paulson@23449
   226
have 4: "\<And>X1. g (f X1) \<noteq> X1 \<or> g x \<noteq> X1"
paulson@23519
   227
  by (metis 3 1 2)
paulson@23449
   228
show "False"
paulson@23449
   229
  by (metis 4 0)
paulson@23449
   230
qed
paulson@23449
   231
boehmes@32864
   232
declare [[ atp_problem_prefix = "set__singleton_example" ]]
paulson@23449
   233
lemma (*singleton_example_2:*)
paulson@23449
   234
     "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
paulson@23449
   235
by (metis Set.subsetI Union_upper insertCI set_eq_subset)
paulson@23449
   236
  --{*found by SPASS*}
paulson@23449
   237
paulson@23449
   238
lemma (*singleton_example_2:*)
paulson@23449
   239
     "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
haftmann@32685
   240
by (metis Set.subsetI Union_upper insert_iff set_eq_subset)
paulson@23449
   241
paulson@23449
   242
lemma singleton_example_2:
paulson@23449
   243
     "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
paulson@23449
   244
proof (neg_clausify)
paulson@24937
   245
assume 0: "\<And>x. \<not> S \<subseteq> {x}"
paulson@24937
   246
assume 1: "\<And>x. x \<notin> S \<or> \<Union>S \<subseteq> x"
paulson@23449
   247
have 2: "\<And>X3. X3 = \<Union>S \<or> \<not> X3 \<subseteq> \<Union>S \<or> X3 \<notin> S"
paulson@24855
   248
  by (metis set_eq_subset 1)
paulson@23449
   249
have 3: "\<And>X3. S \<subseteq> insert (\<Union>S) X3"
paulson@24855
   250
  by (metis insert_iff Set.subsetI Union_upper 2 Set.subsetI)
paulson@23449
   251
show "False"
paulson@24855
   252
  by (metis 3 0)
paulson@23449
   253
qed
paulson@23449
   254
paulson@23449
   255
paulson@23449
   256
paulson@23449
   257
text {*
paulson@23449
   258
  From W. W. Bledsoe and Guohui Feng, SET-VAR. JAR 11 (3), 1993, pages
paulson@23449
   259
  293-314.
paulson@23449
   260
*}
paulson@23449
   261
boehmes@32864
   262
declare [[ atp_problem_prefix = "set__Bledsoe_Fung" ]]
paulson@23449
   263
(*Notes: 1, the numbering doesn't completely agree with the paper. 
paulson@23449
   264
2, we must rename set variables to avoid type clashes.*)
paulson@23449
   265
lemma "\<exists>B. (\<forall>x \<in> B. x \<le> (0::int))"
paulson@23449
   266
      "D \<in> F \<Longrightarrow> \<exists>G. \<forall>A \<in> G. \<exists>B \<in> F. A \<subseteq> B"
paulson@23449
   267
      "P a \<Longrightarrow> \<exists>A. (\<forall>x \<in> A. P x) \<and> (\<exists>y. y \<in> A)"
paulson@23449
   268
      "a < b \<and> b < (c::int) \<Longrightarrow> \<exists>B. a \<notin> B \<and> b \<in> B \<and> c \<notin> B"
paulson@23449
   269
      "P (f b) \<Longrightarrow> \<exists>s A. (\<forall>x \<in> A. P x) \<and> f s \<in> A"
paulson@23449
   270
      "P (f b) \<Longrightarrow> \<exists>s A. (\<forall>x \<in> A. P x) \<and> f s \<in> A"
paulson@23449
   271
      "\<exists>A. a \<notin> A"
paulson@23449
   272
      "(\<forall>C. (0, 0) \<in> C \<and> (\<forall>x y. (x, y) \<in> C \<longrightarrow> (Suc x, Suc y) \<in> C) \<longrightarrow> (n, m) \<in> C) \<and> Q n \<longrightarrow> Q m" 
paulson@24855
   273
apply (metis atMost_iff)
paulson@23449
   274
apply (metis emptyE)
paulson@23449
   275
apply (metis insert_iff singletonE)
paulson@23449
   276
apply (metis insertCI singletonE zless_le)
haftmann@32519
   277
apply (metis Collect_def Collect_mem_eq)
haftmann@32519
   278
apply (metis Collect_def Collect_mem_eq)
paulson@23449
   279
apply (metis DiffE)
paulson@24855
   280
apply (metis pair_in_Id_conv) 
paulson@23449
   281
done
paulson@23449
   282
paulson@23449
   283
end