src/ZF/OrdQuant.thy
 changeset 12620 4e6626725e21 parent 12552 d2d2ab3f1f37 child 12667 7e6eaaa125f2
```     1.1 --- a/src/ZF/OrdQuant.thy	Wed Jan 02 21:54:45 2002 +0100
1.2 +++ b/src/ZF/OrdQuant.thy	Thu Jan 03 17:01:59 2002 +0100
1.3 @@ -5,20 +5,25 @@
1.4  Quantifiers and union operator for ordinals.
1.5  *)
1.6
1.7 -OrdQuant = Ordinal +
1.8 +theory OrdQuant = Ordinal:
1.9
1.10 -consts
1.11 +constdefs
1.12
1.13    (* Ordinal Quantifiers *)
1.14 -  oall, oex   :: [i, i => o] => o
1.15 +  oall :: "[i, i => o] => o"
1.16 +    "oall(A, P) == ALL x. x<A --> P(x)"
1.17 +
1.18 +  oex :: "[i, i => o] => o"
1.19 +    "oex(A, P)  == EX x. x<A & P(x)"
1.20
1.21    (* Ordinal Union *)
1.22 -  OUnion      :: [i, i => i] => i
1.23 +  OUnion :: "[i, i => i] => i"
1.24 +    "OUnion(i,B) == {z: UN x:i. B(x). Ord(i)}"
1.25
1.26  syntax
1.27 -  "@oall"     :: [idt, i, o] => o        ("(3ALL _<_./ _)" 10)
1.28 -  "@oex"      :: [idt, i, o] => o        ("(3EX _<_./ _)" 10)
1.29 -  "@OUNION"   :: [idt, i, i] => i        ("(3UN _<_./ _)" 10)
1.30 +  "@oall"     :: "[idt, i, o] => o"        ("(3ALL _<_./ _)" 10)
1.31 +  "@oex"      :: "[idt, i, o] => o"        ("(3EX _<_./ _)" 10)
1.32 +  "@OUNION"   :: "[idt, i, i] => i"        ("(3UN _<_./ _)" 10)
1.33
1.34  translations
1.35    "ALL x<a. P"  == "oall(a, %x. P)"
1.36 @@ -26,16 +31,110 @@
1.37    "UN x<a. B"   == "OUnion(a, %x. B)"
1.38
1.39  syntax (xsymbols)
1.40 -  "@oall"     :: [idt, i, o] => o        ("(3\\<forall>_<_./ _)" 10)
1.41 -  "@oex"      :: [idt, i, o] => o        ("(3\\<exists>_<_./ _)" 10)
1.42 -  "@OUNION"   :: [idt, i, i] => i        ("(3\\<Union>_<_./ _)" 10)
1.43 +  "@oall"     :: "[idt, i, o] => o"        ("(3\<forall>_<_./ _)" 10)
1.44 +  "@oex"      :: "[idt, i, o] => o"        ("(3\<exists>_<_./ _)" 10)
1.45 +  "@OUNION"   :: "[idt, i, i] => i"        ("(3\<Union>_<_./ _)" 10)
1.46 +
1.47 +
1.48 +declare Ord_Un [intro,simp]
1.49 +declare Ord_UN [intro,simp]
1.50 +declare Ord_Union [intro,simp]
1.51 +
1.52 +(** These mostly belong to theory Ordinal **)
1.53 +
1.54 +lemma Union_upper_le:
1.55 +     "\<lbrakk>j: J;  i\<le>j;  Ord(\<Union>(J))\<rbrakk> \<Longrightarrow> i \<le> \<Union>J"
1.56 +apply (subst Union_eq_UN)
1.57 +apply (rule UN_upper_le)
1.58 +apply auto
1.59 +done
1.60 +
1.61 +lemma increasing_LimitI: "\<lbrakk>0<l; \<forall>x\<in>l. \<exists>y\<in>l. x<y\<rbrakk> \<Longrightarrow> Limit(l)"
1.62 +apply (simp add: Limit_def lt_Ord2)
1.63 +apply clarify
1.64 +apply (drule_tac i=y in ltD)
1.65 +apply (blast intro: lt_trans1 succ_leI ltI lt_Ord2)
1.66 +done
1.67 +
1.68 +lemma UN_upper_lt:
1.69 +     "\<lbrakk>a\<in> A;  i < b(a);  Ord(\<Union>x\<in>A. b(x))\<rbrakk> \<Longrightarrow> i < (\<Union>x\<in>A. b(x))"
1.70 +by (unfold lt_def, blast)
1.71 +
1.72 +lemma lt_imp_0_lt: "j<i \<Longrightarrow> 0<i"
1.73 +by (blast intro: lt_trans1 Ord_0_le [OF lt_Ord])
1.74 +
1.75 +lemma Ord_set_cases:
1.76 +   "\<forall>i\<in>I. Ord(i) \<Longrightarrow> I=0 \<or> \<Union>(I) \<in> I \<or> (\<Union>(I) \<notin> I \<and> Limit(\<Union>(I)))"
1.77 +apply (clarify elim!: not_emptyE)
1.78 +apply (cases "\<Union>(I)" rule: Ord_cases)
1.79 +   apply (blast intro: Ord_Union)
1.80 +  apply (blast intro: subst_elem)
1.81 + apply auto
1.82 +apply (clarify elim!: equalityE succ_subsetE)
1.84 +apply (subgoal_tac "B = succ(j)", blast )
1.85 +apply (rule le_anti_sym)
1.86 + apply (simp add: le_subset_iff)
1.88 +done
1.89 +
1.90 +lemma Ord_Union_eq_succD: "[|\<forall>x\<in>X. Ord(x);  \<Union>X = succ(j)|] ==> succ(j) \<in> X"
1.91 +by (drule Ord_set_cases, auto)
1.92 +
1.94 +lemma Ord_Union_succ_eq: "Ord(i) \<Longrightarrow> \<Union>(succ(i)) = i"
1.95 +by (blast intro: Ord_trans)
1.96
1.97 -defs
1.98 -
1.99 -  (* Ordinal Quantifiers *)
1.100 -  oall_def      "oall(A, P) == ALL x. x<A --> P(x)"
1.101 -  oex_def       "oex(A, P) == EX x. x<A & P(x)"
1.102 +lemma lt_Union_iff: "\<forall>i\<in>A. Ord(i) \<Longrightarrow> (j < \<Union>(A)) <-> (\<exists>i\<in>A. j<i)"
1.103 +by (auto simp: lt_def Ord_Union)
1.104 +
1.105 +lemma Un_upper1_lt: "[|k < i; Ord(j)|] ==> k < i Un j"
1.107 +
1.108 +lemma Un_upper2_lt: "[|k < j; Ord(i)|] ==> k < i Un j"
1.110 +
1.111 +lemma Ord_OUN [intro,simp]:
1.112 +     "\<lbrakk>!!x. x<A \<Longrightarrow> Ord(B(x))\<rbrakk> \<Longrightarrow> Ord(\<Union>x<A. B(x))"
1.113 +by (simp add: OUnion_def ltI Ord_UN)
1.114 +
1.115 +lemma OUN_upper_lt:
1.116 +     "\<lbrakk>a<A;  i < b(a);  Ord(\<Union>x<A. b(x))\<rbrakk> \<Longrightarrow> i < (\<Union>x<A. b(x))"
1.117 +by (unfold OUnion_def lt_def, blast )
1.118 +
1.119 +lemma OUN_upper_le:
1.120 +     "\<lbrakk>a<A;  i\<le>b(a);  Ord(\<Union>x<A. b(x))\<rbrakk> \<Longrightarrow> i \<le> (\<Union>x<A. b(x))"
1.121 +apply (unfold OUnion_def)
1.122 +apply auto
1.123 +apply (rule UN_upper_le )
1.124 +apply (auto simp add: lt_def)
1.125 +done
1.126
1.127 -  OUnion_def     "OUnion(i,B) == {z: UN x:i. B(x). Ord(i)}"
1.128 -
1.129 +lemma Limit_OUN_eq: "Limit(i) ==> (UN x<i. x) = i"
1.130 +by (simp add: OUnion_def Limit_Union_eq Limit_is_Ord)
1.131 +
1.132 +(* No < version; consider (UN i:nat.i)=nat *)
1.133 +lemma OUN_least:
1.134 +     "(!!x. x<A ==> B(x) \<subseteq> C) ==> (UN x<A. B(x)) \<subseteq> C"
1.135 +by (simp add: OUnion_def UN_least ltI)
1.136 +
1.137 +(* No < version; consider (UN i:nat.i)=nat *)
1.138 +lemma OUN_least_le:
1.139 +     "[| Ord(i);  !!x. x<A ==> b(x) \<le> i |] ==> (UN x<A. b(x)) \<le> i"
1.140 +by (simp add: OUnion_def UN_least_le ltI Ord_0_le)
1.141 +
1.142 +lemma le_implies_OUN_le_OUN:
1.143 +     "[| !!x. x<A ==> c(x) \<le> d(x) |] ==> (UN x<A. c(x)) \<le> (UN x<A. d(x))"
1.144 +by (blast intro: OUN_least_le OUN_upper_le le_Ord2 Ord_OUN)
1.145 +
1.146 +lemma OUN_UN_eq:
1.147 +     "(!!x. x:A ==> Ord(B(x)))
1.148 +      ==> (UN z < (UN x:A. B(x)). C(z)) = (UN  x:A. UN z < B(x). C(z))"