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