src/ZF/Constructible/Wellorderings.thy
 author ballarin Thu Dec 11 18:30:26 2008 +0100 (2008-12-11) changeset 29223 e09c53289830 parent 21404 eb85850d3eb7 child 32960 69916a850301 permissions -rw-r--r--
Conversion of HOL-Main and ZF to new locales.
```     1 (*  Title:      ZF/Constructible/Wellorderings.thy
```
```     2     ID:         \$Id\$
```
```     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
```
```     4 *)
```
```     5
```
```     6 header {*Relativized Wellorderings*}
```
```     7
```
```     8 theory Wellorderings imports Relative begin
```
```     9
```
```    10 text{*We define functions analogous to @{term ordermap} @{term ordertype}
```
```    11       but without using recursion.  Instead, there is a direct appeal
```
```    12       to Replacement.  This will be the basis for a version relativized
```
```    13       to some class @{text M}.  The main result is Theorem I 7.6 in Kunen,
```
```    14       page 17.*}
```
```    15
```
```    16
```
```    17 subsection{*Wellorderings*}
```
```    18
```
```    19 definition
```
```    20   irreflexive :: "[i=>o,i,i]=>o" where
```
```    21     "irreflexive(M,A,r) == \<forall>x[M]. x\<in>A --> <x,x> \<notin> r"
```
```    22
```
```    23 definition
```
```    24   transitive_rel :: "[i=>o,i,i]=>o" where
```
```    25     "transitive_rel(M,A,r) ==
```
```    26 	\<forall>x[M]. x\<in>A --> (\<forall>y[M]. y\<in>A --> (\<forall>z[M]. z\<in>A -->
```
```    27                           <x,y>\<in>r --> <y,z>\<in>r --> <x,z>\<in>r))"
```
```    28
```
```    29 definition
```
```    30   linear_rel :: "[i=>o,i,i]=>o" where
```
```    31     "linear_rel(M,A,r) ==
```
```    32 	\<forall>x[M]. x\<in>A --> (\<forall>y[M]. y\<in>A --> <x,y>\<in>r | x=y | <y,x>\<in>r)"
```
```    33
```
```    34 definition
```
```    35   wellfounded :: "[i=>o,i]=>o" where
```
```    36     --{*EVERY non-empty set has an @{text r}-minimal element*}
```
```    37     "wellfounded(M,r) ==
```
```    38 	\<forall>x[M]. x\<noteq>0 --> (\<exists>y[M]. y\<in>x & ~(\<exists>z[M]. z\<in>x & <z,y> \<in> r))"
```
```    39 definition
```
```    40   wellfounded_on :: "[i=>o,i,i]=>o" where
```
```    41     --{*every non-empty SUBSET OF @{text A} has an @{text r}-minimal element*}
```
```    42     "wellfounded_on(M,A,r) ==
```
```    43 	\<forall>x[M]. x\<noteq>0 --> x\<subseteq>A --> (\<exists>y[M]. y\<in>x & ~(\<exists>z[M]. z\<in>x & <z,y> \<in> r))"
```
```    44
```
```    45 definition
```
```    46   wellordered :: "[i=>o,i,i]=>o" where
```
```    47     --{*linear and wellfounded on @{text A}*}
```
```    48     "wellordered(M,A,r) ==
```
```    49 	transitive_rel(M,A,r) & linear_rel(M,A,r) & wellfounded_on(M,A,r)"
```
```    50
```
```    51
```
```    52 subsubsection {*Trivial absoluteness proofs*}
```
```    53
```
```    54 lemma (in M_basic) irreflexive_abs [simp]:
```
```    55      "M(A) ==> irreflexive(M,A,r) <-> irrefl(A,r)"
```
```    56 by (simp add: irreflexive_def irrefl_def)
```
```    57
```
```    58 lemma (in M_basic) transitive_rel_abs [simp]:
```
```    59      "M(A) ==> transitive_rel(M,A,r) <-> trans[A](r)"
```
```    60 by (simp add: transitive_rel_def trans_on_def)
```
```    61
```
```    62 lemma (in M_basic) linear_rel_abs [simp]:
```
```    63      "M(A) ==> linear_rel(M,A,r) <-> linear(A,r)"
```
```    64 by (simp add: linear_rel_def linear_def)
```
```    65
```
```    66 lemma (in M_basic) wellordered_is_trans_on:
```
```    67     "[| wellordered(M,A,r); M(A) |] ==> trans[A](r)"
```
```    68 by (auto simp add: wellordered_def)
```
```    69
```
```    70 lemma (in M_basic) wellordered_is_linear:
```
```    71     "[| wellordered(M,A,r); M(A) |] ==> linear(A,r)"
```
```    72 by (auto simp add: wellordered_def)
```
```    73
```
```    74 lemma (in M_basic) wellordered_is_wellfounded_on:
```
```    75     "[| wellordered(M,A,r); M(A) |] ==> wellfounded_on(M,A,r)"
```
```    76 by (auto simp add: wellordered_def)
```
```    77
```
```    78 lemma (in M_basic) wellfounded_imp_wellfounded_on:
```
```    79     "[| wellfounded(M,r); M(A) |] ==> wellfounded_on(M,A,r)"
```
```    80 by (auto simp add: wellfounded_def wellfounded_on_def)
```
```    81
```
```    82 lemma (in M_basic) wellfounded_on_subset_A:
```
```    83      "[| wellfounded_on(M,A,r);  B<=A |] ==> wellfounded_on(M,B,r)"
```
```    84 by (simp add: wellfounded_on_def, blast)
```
```    85
```
```    86
```
```    87 subsubsection {*Well-founded relations*}
```
```    88
```
```    89 lemma  (in M_basic) wellfounded_on_iff_wellfounded:
```
```    90      "wellfounded_on(M,A,r) <-> wellfounded(M, r \<inter> A*A)"
```
```    91 apply (simp add: wellfounded_on_def wellfounded_def, safe)
```
```    92  apply force
```
```    93 apply (drule_tac x=x in rspec, assumption, blast)
```
```    94 done
```
```    95
```
```    96 lemma (in M_basic) wellfounded_on_imp_wellfounded:
```
```    97      "[|wellfounded_on(M,A,r); r \<subseteq> A*A|] ==> wellfounded(M,r)"
```
```    98 by (simp add: wellfounded_on_iff_wellfounded subset_Int_iff)
```
```    99
```
```   100 lemma (in M_basic) wellfounded_on_field_imp_wellfounded:
```
```   101      "wellfounded_on(M, field(r), r) ==> wellfounded(M,r)"
```
```   102 by (simp add: wellfounded_def wellfounded_on_iff_wellfounded, fast)
```
```   103
```
```   104 lemma (in M_basic) wellfounded_iff_wellfounded_on_field:
```
```   105      "M(r) ==> wellfounded(M,r) <-> wellfounded_on(M, field(r), r)"
```
```   106 by (blast intro: wellfounded_imp_wellfounded_on
```
```   107                  wellfounded_on_field_imp_wellfounded)
```
```   108
```
```   109 (*Consider the least z in domain(r) such that P(z) does not hold...*)
```
```   110 lemma (in M_basic) wellfounded_induct:
```
```   111      "[| wellfounded(M,r); M(a); M(r); separation(M, \<lambda>x. ~P(x));
```
```   112          \<forall>x. M(x) & (\<forall>y. <y,x> \<in> r --> P(y)) --> P(x) |]
```
```   113       ==> P(a)";
```
```   114 apply (simp (no_asm_use) add: wellfounded_def)
```
```   115 apply (drule_tac x="{z \<in> domain(r). ~P(z)}" in rspec)
```
```   116 apply (blast dest: transM)+
```
```   117 done
```
```   118
```
```   119 lemma (in M_basic) wellfounded_on_induct:
```
```   120      "[| a\<in>A;  wellfounded_on(M,A,r);  M(A);
```
```   121        separation(M, \<lambda>x. x\<in>A --> ~P(x));
```
```   122        \<forall>x\<in>A. M(x) & (\<forall>y\<in>A. <y,x> \<in> r --> P(y)) --> P(x) |]
```
```   123       ==> P(a)";
```
```   124 apply (simp (no_asm_use) add: wellfounded_on_def)
```
```   125 apply (drule_tac x="{z\<in>A. z\<in>A --> ~P(z)}" in rspec)
```
```   126 apply (blast intro: transM)+
```
```   127 done
```
```   128
```
```   129
```
```   130 subsubsection {*Kunen's lemma IV 3.14, page 123*}
```
```   131
```
```   132 lemma (in M_basic) linear_imp_relativized:
```
```   133      "linear(A,r) ==> linear_rel(M,A,r)"
```
```   134 by (simp add: linear_def linear_rel_def)
```
```   135
```
```   136 lemma (in M_basic) trans_on_imp_relativized:
```
```   137      "trans[A](r) ==> transitive_rel(M,A,r)"
```
```   138 by (unfold transitive_rel_def trans_on_def, blast)
```
```   139
```
```   140 lemma (in M_basic) wf_on_imp_relativized:
```
```   141      "wf[A](r) ==> wellfounded_on(M,A,r)"
```
```   142 apply (simp add: wellfounded_on_def wf_def wf_on_def, clarify)
```
```   143 apply (drule_tac x=x in spec, blast)
```
```   144 done
```
```   145
```
```   146 lemma (in M_basic) wf_imp_relativized:
```
```   147      "wf(r) ==> wellfounded(M,r)"
```
```   148 apply (simp add: wellfounded_def wf_def, clarify)
```
```   149 apply (drule_tac x=x in spec, blast)
```
```   150 done
```
```   151
```
```   152 lemma (in M_basic) well_ord_imp_relativized:
```
```   153      "well_ord(A,r) ==> wellordered(M,A,r)"
```
```   154 by (simp add: wellordered_def well_ord_def tot_ord_def part_ord_def
```
```   155        linear_imp_relativized trans_on_imp_relativized wf_on_imp_relativized)
```
```   156
```
```   157
```
```   158 subsection{* Relativized versions of order-isomorphisms and order types *}
```
```   159
```
```   160 lemma (in M_basic) order_isomorphism_abs [simp]:
```
```   161      "[| M(A); M(B); M(f) |]
```
```   162       ==> order_isomorphism(M,A,r,B,s,f) <-> f \<in> ord_iso(A,r,B,s)"
```
```   163 by (simp add: apply_closed order_isomorphism_def ord_iso_def)
```
```   164
```
```   165 lemma (in M_basic) pred_set_abs [simp]:
```
```   166      "[| M(r); M(B) |] ==> pred_set(M,A,x,r,B) <-> B = Order.pred(A,x,r)"
```
```   167 apply (simp add: pred_set_def Order.pred_def)
```
```   168 apply (blast dest: transM)
```
```   169 done
```
```   170
```
```   171 lemma (in M_basic) pred_closed [intro,simp]:
```
```   172      "[| M(A); M(r); M(x) |] ==> M(Order.pred(A,x,r))"
```
```   173 apply (simp add: Order.pred_def)
```
```   174 apply (insert pred_separation [of r x], simp)
```
```   175 done
```
```   176
```
```   177 lemma (in M_basic) membership_abs [simp]:
```
```   178      "[| M(r); M(A) |] ==> membership(M,A,r) <-> r = Memrel(A)"
```
```   179 apply (simp add: membership_def Memrel_def, safe)
```
```   180   apply (rule equalityI)
```
```   181    apply clarify
```
```   182    apply (frule transM, assumption)
```
```   183    apply blast
```
```   184   apply clarify
```
```   185   apply (subgoal_tac "M(<xb,ya>)", blast)
```
```   186   apply (blast dest: transM)
```
```   187  apply auto
```
```   188 done
```
```   189
```
```   190 lemma (in M_basic) M_Memrel_iff:
```
```   191      "M(A) ==>
```
```   192       Memrel(A) = {z \<in> A*A. \<exists>x[M]. \<exists>y[M]. z = \<langle>x,y\<rangle> & x \<in> y}"
```
```   193 apply (simp add: Memrel_def)
```
```   194 apply (blast dest: transM)
```
```   195 done
```
```   196
```
```   197 lemma (in M_basic) Memrel_closed [intro,simp]:
```
```   198      "M(A) ==> M(Memrel(A))"
```
```   199 apply (simp add: M_Memrel_iff)
```
```   200 apply (insert Memrel_separation, simp)
```
```   201 done
```
```   202
```
```   203
```
```   204 subsection {* Main results of Kunen, Chapter 1 section 6 *}
```
```   205
```
```   206 text{*Subset properties-- proved outside the locale*}
```
```   207
```
```   208 lemma linear_rel_subset:
```
```   209     "[| linear_rel(M,A,r);  B<=A |] ==> linear_rel(M,B,r)"
```
```   210 by (unfold linear_rel_def, blast)
```
```   211
```
```   212 lemma transitive_rel_subset:
```
```   213     "[| transitive_rel(M,A,r);  B<=A |] ==> transitive_rel(M,B,r)"
```
```   214 by (unfold transitive_rel_def, blast)
```
```   215
```
```   216 lemma wellfounded_on_subset:
```
```   217     "[| wellfounded_on(M,A,r);  B<=A |] ==> wellfounded_on(M,B,r)"
```
```   218 by (unfold wellfounded_on_def subset_def, blast)
```
```   219
```
```   220 lemma wellordered_subset:
```
```   221     "[| wellordered(M,A,r);  B<=A |] ==> wellordered(M,B,r)"
```
```   222 apply (unfold wellordered_def)
```
```   223 apply (blast intro: linear_rel_subset transitive_rel_subset
```
```   224 		    wellfounded_on_subset)
```
```   225 done
```
```   226
```
```   227 lemma (in M_basic) wellfounded_on_asym:
```
```   228      "[| wellfounded_on(M,A,r);  <a,x>\<in>r;  a\<in>A; x\<in>A;  M(A) |] ==> <x,a>\<notin>r"
```
```   229 apply (simp add: wellfounded_on_def)
```
```   230 apply (drule_tac x="{x,a}" in rspec)
```
```   231 apply (blast dest: transM)+
```
```   232 done
```
```   233
```
```   234 lemma (in M_basic) wellordered_asym:
```
```   235      "[| wellordered(M,A,r);  <a,x>\<in>r;  a\<in>A; x\<in>A;  M(A) |] ==> <x,a>\<notin>r"
```
```   236 by (simp add: wellordered_def, blast dest: wellfounded_on_asym)
```
```   237
```
```   238 end
```