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