src/ZF/OrdQuant.thy
author paulson
Thu Jul 04 16:59:54 2002 +0200 (2002-07-04)
changeset 13298 b4f370679c65
parent 13289 53e201efdaa2
child 13302 98ce70e7d1f7
permissions -rw-r--r--
Constructible: some separation axioms
paulson@2469
     1
(*  Title:      ZF/AC/OrdQuant.thy
paulson@2469
     2
    ID:         $Id$
paulson@2469
     3
    Authors:    Krzysztof Grabczewski and L C Paulson
paulson@2469
     4
*)
paulson@2469
     5
paulson@13253
     6
header {*Special quantifiers*}
paulson@13253
     7
paulson@12620
     8
theory OrdQuant = Ordinal:
paulson@2469
     9
paulson@13253
    10
subsection {*Quantifiers and union operator for ordinals*}
paulson@13253
    11
paulson@12620
    12
constdefs
paulson@13298
    13
paulson@2469
    14
  (* Ordinal Quantifiers *)
paulson@12620
    15
  oall :: "[i, i => o] => o"
paulson@12620
    16
    "oall(A, P) == ALL x. x<A --> P(x)"
paulson@13298
    17
paulson@12620
    18
  oex :: "[i, i => o] => o"
paulson@12620
    19
    "oex(A, P)  == EX x. x<A & P(x)"
paulson@2469
    20
paulson@2469
    21
  (* Ordinal Union *)
paulson@12620
    22
  OUnion :: "[i, i => i] => i"
paulson@12620
    23
    "OUnion(i,B) == {z: UN x:i. B(x). Ord(i)}"
paulson@13298
    24
paulson@2469
    25
syntax
paulson@12620
    26
  "@oall"     :: "[idt, i, o] => o"        ("(3ALL _<_./ _)" 10)
paulson@12620
    27
  "@oex"      :: "[idt, i, o] => o"        ("(3EX _<_./ _)" 10)
paulson@12620
    28
  "@OUNION"   :: "[idt, i, i] => i"        ("(3UN _<_./ _)" 10)
paulson@2469
    29
paulson@2469
    30
translations
paulson@2469
    31
  "ALL x<a. P"  == "oall(a, %x. P)"
paulson@2469
    32
  "EX x<a. P"   == "oex(a, %x. P)"
paulson@2469
    33
  "UN x<a. B"   == "OUnion(a, %x. B)"
paulson@2469
    34
wenzelm@12114
    35
syntax (xsymbols)
paulson@12620
    36
  "@oall"     :: "[idt, i, o] => o"        ("(3\<forall>_<_./ _)" 10)
paulson@12620
    37
  "@oex"      :: "[idt, i, o] => o"        ("(3\<exists>_<_./ _)" 10)
paulson@12620
    38
  "@OUNION"   :: "[idt, i, i] => i"        ("(3\<Union>_<_./ _)" 10)
paulson@12620
    39
paulson@12620
    40
paulson@12825
    41
(** simplification of the new quantifiers **)
paulson@12825
    42
paulson@12825
    43
paulson@13169
    44
(*MOST IMPORTANT that this is added to the simpset BEFORE Ord_atomize
paulson@13298
    45
  is proved.  Ord_atomize would convert this rule to
paulson@12825
    46
    x < 0 ==> P(x) == True, which causes dire effects!*)
paulson@12825
    47
lemma [simp]: "(ALL x<0. P(x))"
paulson@13298
    48
by (simp add: oall_def)
paulson@12825
    49
paulson@12825
    50
lemma [simp]: "~(EX x<0. P(x))"
paulson@13298
    51
by (simp add: oex_def)
paulson@12825
    52
paulson@12825
    53
lemma [simp]: "(ALL x<succ(i). P(x)) <-> (Ord(i) --> P(i) & (ALL x<i. P(x)))"
paulson@13298
    54
apply (simp add: oall_def le_iff)
paulson@13298
    55
apply (blast intro: lt_Ord2)
paulson@12825
    56
done
paulson@12825
    57
paulson@12825
    58
lemma [simp]: "(EX x<succ(i). P(x)) <-> (Ord(i) & (P(i) | (EX x<i. P(x))))"
paulson@13298
    59
apply (simp add: oex_def le_iff)
paulson@13298
    60
apply (blast intro: lt_Ord2)
paulson@12825
    61
done
paulson@12825
    62
paulson@13244
    63
(** Union over ordinals **)
paulson@13118
    64
paulson@12620
    65
lemma Ord_OUN [intro,simp]:
paulson@13162
    66
     "[| !!x. x<A ==> Ord(B(x)) |] ==> Ord(\<Union>x<A. B(x))"
paulson@13298
    67
by (simp add: OUnion_def ltI Ord_UN)
paulson@12620
    68
paulson@12620
    69
lemma OUN_upper_lt:
paulson@13162
    70
     "[| a<A;  i < b(a);  Ord(\<Union>x<A. b(x)) |] ==> i < (\<Union>x<A. b(x))"
paulson@12620
    71
by (unfold OUnion_def lt_def, blast )
paulson@12620
    72
paulson@12620
    73
lemma OUN_upper_le:
paulson@13162
    74
     "[| a<A;  i\<le>b(a);  Ord(\<Union>x<A. b(x)) |] ==> i \<le> (\<Union>x<A. b(x))"
paulson@12820
    75
apply (unfold OUnion_def, auto)
paulson@12620
    76
apply (rule UN_upper_le )
paulson@13298
    77
apply (auto simp add: lt_def)
paulson@12620
    78
done
paulson@2469
    79
paulson@12620
    80
lemma Limit_OUN_eq: "Limit(i) ==> (UN x<i. x) = i"
paulson@12620
    81
by (simp add: OUnion_def Limit_Union_eq Limit_is_Ord)
paulson@12620
    82
paulson@12620
    83
(* No < version; consider (UN i:nat.i)=nat *)
paulson@12620
    84
lemma OUN_least:
paulson@12620
    85
     "(!!x. x<A ==> B(x) \<subseteq> C) ==> (UN x<A. B(x)) \<subseteq> C"
paulson@12620
    86
by (simp add: OUnion_def UN_least ltI)
paulson@12620
    87
paulson@12620
    88
(* No < version; consider (UN i:nat.i)=nat *)
paulson@12620
    89
lemma OUN_least_le:
paulson@12620
    90
     "[| Ord(i);  !!x. x<A ==> b(x) \<le> i |] ==> (UN x<A. b(x)) \<le> i"
paulson@12620
    91
by (simp add: OUnion_def UN_least_le ltI Ord_0_le)
paulson@12620
    92
paulson@12620
    93
lemma le_implies_OUN_le_OUN:
paulson@12620
    94
     "[| !!x. x<A ==> c(x) \<le> d(x) |] ==> (UN x<A. c(x)) \<le> (UN x<A. d(x))"
paulson@12620
    95
by (blast intro: OUN_least_le OUN_upper_le le_Ord2 Ord_OUN)
paulson@12620
    96
paulson@12620
    97
lemma OUN_UN_eq:
paulson@12620
    98
     "(!!x. x:A ==> Ord(B(x)))
paulson@12620
    99
      ==> (UN z < (UN x:A. B(x)). C(z)) = (UN  x:A. UN z < B(x). C(z))"
paulson@13298
   100
by (simp add: OUnion_def)
paulson@12620
   101
paulson@12620
   102
lemma OUN_Union_eq:
paulson@12620
   103
     "(!!x. x:X ==> Ord(x))
paulson@12620
   104
      ==> (UN z < Union(X). C(z)) = (UN x:X. UN z < x. C(z))"
paulson@13298
   105
by (simp add: OUnion_def)
paulson@12620
   106
paulson@12763
   107
(*So that rule_format will get rid of ALL x<A...*)
paulson@12763
   108
lemma atomize_oall [symmetric, rulify]:
paulson@12763
   109
     "(!!x. x<A ==> P(x)) == Trueprop (ALL x<A. P(x))"
paulson@12763
   110
by (simp add: oall_def atomize_all atomize_imp)
paulson@12763
   111
paulson@13169
   112
(*** universal quantifier for ordinals ***)
paulson@13169
   113
paulson@13169
   114
lemma oallI [intro!]:
paulson@13169
   115
    "[| !!x. x<A ==> P(x) |] ==> ALL x<A. P(x)"
paulson@13298
   116
by (simp add: oall_def)
paulson@13169
   117
paulson@13169
   118
lemma ospec: "[| ALL x<A. P(x);  x<A |] ==> P(x)"
paulson@13298
   119
by (simp add: oall_def)
paulson@13169
   120
paulson@13169
   121
lemma oallE:
paulson@13169
   122
    "[| ALL x<A. P(x);  P(x) ==> Q;  ~x<A ==> Q |] ==> Q"
paulson@13298
   123
by (simp add: oall_def, blast)
paulson@13169
   124
paulson@13169
   125
lemma rev_oallE [elim]:
paulson@13169
   126
    "[| ALL x<A. P(x);  ~x<A ==> Q;  P(x) ==> Q |] ==> Q"
paulson@13298
   127
by (simp add: oall_def, blast)
paulson@13169
   128
paulson@13169
   129
paulson@13169
   130
(*Trival rewrite rule;   (ALL x<a.P)<->P holds only if a is not 0!*)
paulson@13169
   131
lemma oall_simp [simp]: "(ALL x<a. True) <-> True"
paulson@13170
   132
by blast
paulson@13169
   133
paulson@13169
   134
(*Congruence rule for rewriting*)
paulson@13169
   135
lemma oall_cong [cong]:
paulson@13298
   136
    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) |]
paulson@13289
   137
     ==> oall(a, %x. P(x)) <-> oall(a', %x. P'(x))"
paulson@13169
   138
by (simp add: oall_def)
paulson@13169
   139
paulson@13169
   140
paulson@13169
   141
(*** existential quantifier for ordinals ***)
paulson@13169
   142
paulson@13169
   143
lemma oexI [intro]:
paulson@13169
   144
    "[| P(x);  x<A |] ==> EX x<A. P(x)"
paulson@13298
   145
apply (simp add: oex_def, blast)
paulson@13169
   146
done
paulson@13169
   147
paulson@13169
   148
(*Not of the general form for such rules; ~EX has become ALL~ *)
paulson@13169
   149
lemma oexCI:
paulson@13169
   150
   "[| ALL x<A. ~P(x) ==> P(a);  a<A |] ==> EX x<A. P(x)"
paulson@13298
   151
apply (simp add: oex_def, blast)
paulson@13169
   152
done
paulson@13169
   153
paulson@13169
   154
lemma oexE [elim!]:
paulson@13169
   155
    "[| EX x<A. P(x);  !!x. [| x<A; P(x) |] ==> Q |] ==> Q"
paulson@13298
   156
apply (simp add: oex_def, blast)
paulson@13169
   157
done
paulson@13169
   158
paulson@13169
   159
lemma oex_cong [cong]:
paulson@13298
   160
    "[| a=a';  !!x. x<a' ==> P(x) <-> P'(x) |]
paulson@13289
   161
     ==> oex(a, %x. P(x)) <-> oex(a', %x. P'(x))"
paulson@13169
   162
apply (simp add: oex_def cong add: conj_cong)
paulson@13169
   163
done
paulson@13169
   164
paulson@13169
   165
paulson@13169
   166
(*** Rules for Ordinal-Indexed Unions ***)
paulson@13169
   167
paulson@13169
   168
lemma OUN_I [intro]: "[| a<i;  b: B(a) |] ==> b: (UN z<i. B(z))"
paulson@13170
   169
by (unfold OUnion_def lt_def, blast)
paulson@13169
   170
paulson@13169
   171
lemma OUN_E [elim!]:
paulson@13169
   172
    "[| b : (UN z<i. B(z));  !!a.[| b: B(a);  a<i |] ==> R |] ==> R"
paulson@13170
   173
apply (unfold OUnion_def lt_def, blast)
paulson@13169
   174
done
paulson@13169
   175
paulson@13169
   176
lemma OUN_iff: "b : (UN x<i. B(x)) <-> (EX x<i. b : B(x))"
paulson@13170
   177
by (unfold OUnion_def oex_def lt_def, blast)
paulson@13169
   178
paulson@13169
   179
lemma OUN_cong [cong]:
paulson@13169
   180
    "[| i=j;  !!x. x<j ==> C(x)=D(x) |] ==> (UN x<i. C(x)) = (UN x<j. D(x))"
paulson@13169
   181
by (simp add: OUnion_def lt_def OUN_iff)
paulson@13169
   182
paulson@13298
   183
lemma lt_induct:
paulson@13169
   184
    "[| i<k;  !!x.[| x<k;  ALL y<x. P(y) |] ==> P(x) |]  ==>  P(i)"
paulson@13169
   185
apply (simp add: lt_def oall_def)
paulson@13298
   186
apply (erule conjE)
paulson@13298
   187
apply (erule Ord_induct, assumption, blast)
paulson@13169
   188
done
paulson@13169
   189
paulson@13253
   190
paulson@13253
   191
subsection {*Quantification over a class*}
paulson@13253
   192
paulson@13253
   193
constdefs
paulson@13253
   194
  "rall"     :: "[i=>o, i=>o] => o"
paulson@13253
   195
    "rall(M, P) == ALL x. M(x) --> P(x)"
paulson@13253
   196
paulson@13253
   197
  "rex"      :: "[i=>o, i=>o] => o"
paulson@13253
   198
    "rex(M, P) == EX x. M(x) & P(x)"
paulson@13253
   199
paulson@13253
   200
syntax
paulson@13253
   201
  "@rall"     :: "[pttrn, i=>o, o] => o"        ("(3ALL _[_]./ _)" 10)
paulson@13253
   202
  "@rex"      :: "[pttrn, i=>o, o] => o"        ("(3EX _[_]./ _)" 10)
paulson@13253
   203
paulson@13253
   204
syntax (xsymbols)
paulson@13253
   205
  "@rall"     :: "[pttrn, i=>o, o] => o"        ("(3\<forall>_[_]./ _)" 10)
paulson@13253
   206
  "@rex"      :: "[pttrn, i=>o, o] => o"        ("(3\<exists>_[_]./ _)" 10)
paulson@13253
   207
paulson@13253
   208
translations
paulson@13253
   209
  "ALL x[M]. P"  == "rall(M, %x. P)"
paulson@13253
   210
  "EX x[M]. P"   == "rex(M, %x. P)"
paulson@13253
   211
paulson@13298
   212
paulson@13298
   213
subsubsection{*Relativized universal quantifier*}
paulson@13253
   214
paulson@13253
   215
lemma rallI [intro!]: "[| !!x. M(x) ==> P(x) |] ==> ALL x[M]. P(x)"
paulson@13253
   216
by (simp add: rall_def)
paulson@13253
   217
paulson@13253
   218
lemma rspec: "[| ALL x[M]. P(x); M(x) |] ==> P(x)"
paulson@13253
   219
by (simp add: rall_def)
paulson@13253
   220
paulson@13253
   221
(*Instantiates x first: better for automatic theorem proving?*)
paulson@13298
   222
lemma rev_rallE [elim]:
paulson@13253
   223
    "[| ALL x[M]. P(x);  ~ M(x) ==> Q;  P(x) ==> Q |] ==> Q"
paulson@13298
   224
by (simp add: rall_def, blast)
paulson@13253
   225
paulson@13253
   226
lemma rallE: "[| ALL x[M]. P(x);  P(x) ==> Q;  ~ M(x) ==> Q |] ==> Q"
paulson@13253
   227
by blast
paulson@13253
   228
paulson@13253
   229
(*Trival rewrite rule;   (ALL x[M].P)<->P holds only if A is nonempty!*)
paulson@13253
   230
lemma rall_triv [simp]: "(ALL x[M]. P) <-> ((EX x. M(x)) --> P)"
paulson@13253
   231
by (simp add: rall_def)
paulson@13253
   232
paulson@13253
   233
(*Congruence rule for rewriting*)
paulson@13253
   234
lemma rall_cong [cong]:
paulson@13298
   235
    "(!!x. M(x) ==> P(x) <-> P'(x))
paulson@13289
   236
     ==> rall(M, %x. P(x)) <-> rall(M, %x. P'(x))"
paulson@13253
   237
by (simp add: rall_def)
paulson@13253
   238
paulson@13298
   239
paulson@13298
   240
subsubsection{*Relativized existential quantifier*}
paulson@13253
   241
paulson@13253
   242
lemma rexI [intro]: "[| P(x); M(x) |] ==> EX x[M]. P(x)"
paulson@13253
   243
by (simp add: rex_def, blast)
paulson@13253
   244
paulson@13253
   245
(*The best argument order when there is only one M(x)*)
paulson@13253
   246
lemma rev_rexI: "[| M(x);  P(x) |] ==> EX x[M]. P(x)"
paulson@13253
   247
by blast
paulson@13253
   248
paulson@13253
   249
(*Not of the general form for such rules; ~EX has become ALL~ *)
paulson@13253
   250
lemma rexCI: "[| ALL x[M]. ~P(x) ==> P(a); M(a) |] ==> EX x[M]. P(x)"
paulson@13253
   251
by blast
paulson@13253
   252
paulson@13253
   253
lemma rexE [elim!]: "[| EX x[M]. P(x);  !!x. [| M(x); P(x) |] ==> Q |] ==> Q"
paulson@13253
   254
by (simp add: rex_def, blast)
paulson@13253
   255
paulson@13253
   256
(*We do not even have (EX x[M]. True) <-> True unless A is nonempty!!*)
paulson@13253
   257
lemma rex_triv [simp]: "(EX x[M]. P) <-> ((EX x. M(x)) & P)"
paulson@13253
   258
by (simp add: rex_def)
paulson@13253
   259
paulson@13253
   260
lemma rex_cong [cong]:
paulson@13298
   261
    "(!!x. M(x) ==> P(x) <-> P'(x))
paulson@13289
   262
     ==> rex(M, %x. P(x)) <-> rex(M, %x. P'(x))"
paulson@13253
   263
by (simp add: rex_def cong: conj_cong)
paulson@13253
   264
paulson@13289
   265
lemma rall_is_ball [simp]: "(\<forall>x[%z. z\<in>A]. P(x)) <-> (\<forall>x\<in>A. P(x))"
paulson@13289
   266
by blast
paulson@13289
   267
paulson@13289
   268
lemma rex_is_bex [simp]: "(\<exists>x[%z. z\<in>A]. P(x)) <-> (\<exists>x\<in>A. P(x))"
paulson@13289
   269
by blast
paulson@13289
   270
paulson@13253
   271
lemma atomize_rall: "(!!x. M(x) ==> P(x)) == Trueprop (ALL x[M]. P(x))";
paulson@13253
   272
by (simp add: rall_def atomize_all atomize_imp)
paulson@13253
   273
paulson@13253
   274
declare atomize_rall [symmetric, rulify]
paulson@13253
   275
paulson@13253
   276
lemma rall_simps1:
paulson@13253
   277
     "(ALL x[M]. P(x) & Q)   <-> (ALL x[M]. P(x)) & ((ALL x[M]. False) | Q)"
paulson@13253
   278
     "(ALL x[M]. P(x) | Q)   <-> ((ALL x[M]. P(x)) | Q)"
paulson@13253
   279
     "(ALL x[M]. P(x) --> Q) <-> ((EX x[M]. P(x)) --> Q)"
paulson@13298
   280
     "(~(ALL x[M]. P(x))) <-> (EX x[M]. ~P(x))"
paulson@13253
   281
by blast+
paulson@13253
   282
paulson@13253
   283
lemma rall_simps2:
paulson@13253
   284
     "(ALL x[M]. P & Q(x))   <-> ((ALL x[M]. False) | P) & (ALL x[M]. Q(x))"
paulson@13253
   285
     "(ALL x[M]. P | Q(x))   <-> (P | (ALL x[M]. Q(x)))"
paulson@13253
   286
     "(ALL x[M]. P --> Q(x)) <-> (P --> (ALL x[M]. Q(x)))"
paulson@13253
   287
by blast+
paulson@13253
   288
paulson@13289
   289
lemmas rall_simps [simp] = rall_simps1 rall_simps2
paulson@13253
   290
paulson@13253
   291
lemma rall_conj_distrib:
paulson@13253
   292
    "(ALL x[M]. P(x) & Q(x)) <-> ((ALL x[M]. P(x)) & (ALL x[M]. Q(x)))"
paulson@13253
   293
by blast
paulson@13253
   294
paulson@13253
   295
lemma rex_simps1:
paulson@13253
   296
     "(EX x[M]. P(x) & Q) <-> ((EX x[M]. P(x)) & Q)"
paulson@13253
   297
     "(EX x[M]. P(x) | Q) <-> (EX x[M]. P(x)) | ((EX x[M]. True) & Q)"
paulson@13253
   298
     "(EX x[M]. P(x) --> Q) <-> ((ALL x[M]. P(x)) --> ((EX x[M]. True) & Q))"
paulson@13253
   299
     "(~(EX x[M]. P(x))) <-> (ALL x[M]. ~P(x))"
paulson@13253
   300
by blast+
paulson@13253
   301
paulson@13253
   302
lemma rex_simps2:
paulson@13253
   303
     "(EX x[M]. P & Q(x)) <-> (P & (EX x[M]. Q(x)))"
paulson@13253
   304
     "(EX x[M]. P | Q(x)) <-> ((EX x[M]. True) & P) | (EX x[M]. Q(x))"
paulson@13253
   305
     "(EX x[M]. P --> Q(x)) <-> (((ALL x[M]. False) | P) --> (EX x[M]. Q(x)))"
paulson@13253
   306
by blast+
paulson@13253
   307
paulson@13289
   308
lemmas rex_simps [simp] = rex_simps1 rex_simps2
paulson@13253
   309
paulson@13253
   310
lemma rex_disj_distrib:
paulson@13253
   311
    "(EX x[M]. P(x) | Q(x)) <-> ((EX x[M]. P(x)) | (EX x[M]. Q(x)))"
paulson@13253
   312
by blast
paulson@13253
   313
paulson@13253
   314
paulson@13298
   315
subsubsection{*One-point rule for bounded quantifiers*}
paulson@13253
   316
paulson@13253
   317
lemma rex_triv_one_point1 [simp]: "(EX x[M]. x=a) <-> ( M(a))"
paulson@13253
   318
by blast
paulson@13253
   319
paulson@13253
   320
lemma rex_triv_one_point2 [simp]: "(EX x[M]. a=x) <-> ( M(a))"
paulson@13253
   321
by blast
paulson@13253
   322
paulson@13253
   323
lemma rex_one_point1 [simp]: "(EX x[M]. x=a & P(x)) <-> ( M(a) & P(a))"
paulson@13253
   324
by blast
paulson@13253
   325
paulson@13253
   326
lemma rex_one_point2 [simp]: "(EX x[M]. a=x & P(x)) <-> ( M(a) & P(a))"
paulson@13253
   327
by blast
paulson@13253
   328
paulson@13253
   329
lemma rall_one_point1 [simp]: "(ALL x[M]. x=a --> P(x)) <-> ( M(a) --> P(a))"
paulson@13253
   330
by blast
paulson@13253
   331
paulson@13253
   332
lemma rall_one_point2 [simp]: "(ALL x[M]. a=x --> P(x)) <-> ( M(a) --> P(a))"
paulson@13253
   333
by blast
paulson@13253
   334
paulson@13253
   335
paulson@13298
   336
subsubsection{*Sets as Classes*}
paulson@13298
   337
paulson@13298
   338
constdefs setclass :: "[i,i] => o"       ("**_")
paulson@13298
   339
   "setclass(A,x) == x : A"
paulson@13298
   340
paulson@13298
   341
declare setclass_def [simp]
paulson@13298
   342
paulson@13298
   343
lemma rall_setclass_is_ball [simp]: "(\<forall>x[**A]. P(x)) <-> (\<forall>x\<in>A. P(x))"
paulson@13298
   344
by auto
paulson@13298
   345
paulson@13298
   346
lemma rex_setclass_is_bex [simp]: "(\<exists>x[**A]. P(x)) <-> (\<exists>x\<in>A. P(x))"
paulson@13298
   347
by auto
paulson@13298
   348
paulson@13298
   349
paulson@13169
   350
ML
paulson@13169
   351
{*
paulson@13169
   352
val oall_def = thm "oall_def"
paulson@13169
   353
val oex_def = thm "oex_def"
paulson@13169
   354
val OUnion_def = thm "OUnion_def"
paulson@13169
   355
paulson@13169
   356
val oallI = thm "oallI";
paulson@13169
   357
val ospec = thm "ospec";
paulson@13169
   358
val oallE = thm "oallE";
paulson@13169
   359
val rev_oallE = thm "rev_oallE";
paulson@13169
   360
val oall_simp = thm "oall_simp";
paulson@13169
   361
val oall_cong = thm "oall_cong";
paulson@13169
   362
val oexI = thm "oexI";
paulson@13169
   363
val oexCI = thm "oexCI";
paulson@13169
   364
val oexE = thm "oexE";
paulson@13169
   365
val oex_cong = thm "oex_cong";
paulson@13169
   366
val OUN_I = thm "OUN_I";
paulson@13169
   367
val OUN_E = thm "OUN_E";
paulson@13169
   368
val OUN_iff = thm "OUN_iff";
paulson@13169
   369
val OUN_cong = thm "OUN_cong";
paulson@13169
   370
val lt_induct = thm "lt_induct";
paulson@13169
   371
paulson@13253
   372
val rall_def = thm "rall_def"
paulson@13253
   373
val rex_def = thm "rex_def"
paulson@13253
   374
paulson@13253
   375
val rallI = thm "rallI";
paulson@13253
   376
val rspec = thm "rspec";
paulson@13253
   377
val rallE = thm "rallE";
paulson@13253
   378
val rev_oallE = thm "rev_oallE";
paulson@13253
   379
val rall_cong = thm "rall_cong";
paulson@13253
   380
val rexI = thm "rexI";
paulson@13253
   381
val rexCI = thm "rexCI";
paulson@13253
   382
val rexE = thm "rexE";
paulson@13253
   383
val rex_cong = thm "rex_cong";
paulson@13253
   384
paulson@13169
   385
val Ord_atomize =
paulson@13253
   386
    atomize ([("OrdQuant.oall", [ospec]),("OrdQuant.rall", [rspec])]@
paulson@13298
   387
                 ZF_conn_pairs,
paulson@13253
   388
             ZF_mem_pairs);
paulson@13169
   389
simpset_ref() := simpset() setmksimps (map mk_eq o Ord_atomize o gen_all);
paulson@13169
   390
*}
paulson@13169
   391
paulson@13253
   392
text{*Setting up the one-point-rule simproc*}
paulson@13253
   393
ML
paulson@13253
   394
{*
paulson@13253
   395
paulson@13253
   396
let
paulson@13253
   397
val ex_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
paulson@13253
   398
                                ("EX x[M]. P(x) & Q(x)", FOLogic.oT)
paulson@13253
   399
paulson@13253
   400
val prove_rex_tac = rewtac rex_def THEN
paulson@13253
   401
                    Quantifier1.prove_one_point_ex_tac;
paulson@13253
   402
paulson@13253
   403
val rearrange_bex = Quantifier1.rearrange_bex prove_rex_tac;
paulson@13253
   404
paulson@13253
   405
val all_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
paulson@13253
   406
                                 ("ALL x[M]. P(x) --> Q(x)", FOLogic.oT)
paulson@13253
   407
paulson@13298
   408
val prove_rall_tac = rewtac rall_def THEN
paulson@13253
   409
                     Quantifier1.prove_one_point_all_tac;
paulson@13253
   410
paulson@13253
   411
val rearrange_ball = Quantifier1.rearrange_ball prove_rall_tac;
paulson@13253
   412
paulson@13253
   413
val defREX_regroup = mk_simproc "defined REX" [ex_pattern] rearrange_bex;
paulson@13253
   414
val defRALL_regroup = mk_simproc "defined RALL" [all_pattern] rearrange_ball;
paulson@13253
   415
in
paulson@13253
   416
paulson@13253
   417
Addsimprocs [defRALL_regroup,defREX_regroup]
paulson@13253
   418
paulson@13253
   419
end;
paulson@13253
   420
*}
paulson@13253
   421
paulson@2469
   422
end