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