src/ZF/Constructible/Wellorderings.thy
author wenzelm
Thu Jul 23 14:25:05 2015 +0200 (2015-07-23)
changeset 60770 240563fbf41d
parent 58871 c399ae4b836f
child 61798 27f3c10b0b50
permissions -rw-r--r--
isabelle update_cartouches;
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
wenzelm@60770
     5
section \<open>Relativized Wellorderings\<close>
paulson@13223
     6
haftmann@16417
     7
theory Wellorderings imports Relative begin
paulson@13223
     8
wenzelm@60770
     9
text\<open>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,
wenzelm@60770
    13
      page 17.\<close>
paulson@13223
    14
paulson@13223
    15
wenzelm@60770
    16
subsection\<open>Wellorderings\<close>
paulson@13223
    17
wenzelm@21233
    18
definition
wenzelm@21404
    19
  irreflexive :: "[i=>o,i,i]=>o" where
paulson@46823
    20
    "irreflexive(M,A,r) == \<forall>x[M]. x\<in>A \<longrightarrow> <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) == 
paulson@46823
    25
        \<forall>x[M]. x\<in>A \<longrightarrow> (\<forall>y[M]. y\<in>A \<longrightarrow> (\<forall>z[M]. z\<in>A \<longrightarrow> 
paulson@46823
    26
                          <x,y>\<in>r \<longrightarrow> <y,z>\<in>r \<longrightarrow> <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) == 
paulson@46823
    31
        \<forall>x[M]. x\<in>A \<longrightarrow> (\<forall>y[M]. y\<in>A \<longrightarrow> <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
wenzelm@60770
    35
    --\<open>EVERY non-empty set has an @{text r}-minimal element\<close>
paulson@13223
    36
    "wellfounded(M,r) == 
paulson@46823
    37
        \<forall>x[M]. x\<noteq>0 \<longrightarrow> (\<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
wenzelm@60770
    40
    --\<open>every non-empty SUBSET OF @{text A} has an @{text r}-minimal element\<close>
paulson@13223
    41
    "wellfounded_on(M,A,r) == 
paulson@46823
    42
        \<forall>x[M]. x\<noteq>0 \<longrightarrow> x\<subseteq>A \<longrightarrow> (\<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
wenzelm@60770
    46
    --\<open>linear and wellfounded on @{text A}\<close>
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
wenzelm@60770
    51
subsubsection \<open>Trivial absoluteness proofs\<close>
paulson@13223
    52
paulson@13564
    53
lemma (in M_basic) irreflexive_abs [simp]: 
paulson@46823
    54
     "M(A) ==> irreflexive(M,A,r) \<longleftrightarrow> 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@46823
    58
     "M(A) ==> transitive_rel(M,A,r) \<longleftrightarrow> 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@46823
    62
     "M(A) ==> linear_rel(M,A,r) \<longleftrightarrow> 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
wenzelm@60770
    86
subsubsection \<open>Well-founded relations\<close>
paulson@13223
    87
paulson@13564
    88
lemma  (in M_basic) wellfounded_on_iff_wellfounded:
paulson@46823
    89
     "wellfounded_on(M,A,r) \<longleftrightarrow> 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@46823
   104
     "M(r) ==> wellfounded(M,r) \<longleftrightarrow> 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@46823
   111
         \<forall>x. M(x) & (\<forall>y. <y,x> \<in> r \<longrightarrow> P(y)) \<longrightarrow> P(x) |]
paulson@47072
   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@46823
   120
       separation(M, \<lambda>x. x\<in>A \<longrightarrow> ~P(x));  
paulson@46823
   121
       \<forall>x\<in>A. M(x) & (\<forall>y\<in>A. <y,x> \<in> r \<longrightarrow> P(y)) \<longrightarrow> P(x) |]
paulson@47072
   122
      ==> P(a)"
paulson@13223
   123
apply (simp (no_asm_use) add: wellfounded_on_def)
paulson@46823
   124
apply (drule_tac x="{z\<in>A. z\<in>A \<longrightarrow> ~P(z)}" in rspec)
paulson@13299
   125
apply (blast intro: transM)+
paulson@13223
   126
done
paulson@13223
   127
paulson@13223
   128
wenzelm@60770
   129
subsubsection \<open>Kunen's lemma IV 3.14, page 123\<close>
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
wenzelm@60770
   156
text\<open>The property being well founded (and hence of being well ordered) is not absolute: 
paulson@47072
   157
the set that doesn't contain a minimal element may not exist in the class M. 
wenzelm@60770
   158
However, every set that is well founded in a transitive model M is well founded (page 124).\<close>
paulson@13223
   159
wenzelm@60770
   160
subsection\<open>Relativized versions of order-isomorphisms and order types\<close>
paulson@13223
   161
paulson@13564
   162
lemma (in M_basic) order_isomorphism_abs [simp]: 
paulson@13223
   163
     "[| M(A); M(B); M(f) |] 
paulson@46823
   164
      ==> order_isomorphism(M,A,r,B,s,f) \<longleftrightarrow> f \<in> ord_iso(A,r,B,s)"
paulson@13352
   165
by (simp add: apply_closed order_isomorphism_def ord_iso_def)
paulson@13223
   166
paulson@13564
   167
lemma (in M_basic) pred_set_abs [simp]: 
paulson@46823
   168
     "[| M(r); M(B) |] ==> pred_set(M,A,x,r,B) \<longleftrightarrow> B = Order.pred(A,x,r)"
paulson@13223
   169
apply (simp add: pred_set_def Order.pred_def)
paulson@13223
   170
apply (blast dest: transM) 
paulson@13223
   171
done
paulson@13223
   172
paulson@13564
   173
lemma (in M_basic) pred_closed [intro,simp]: 
paulson@13223
   174
     "[| M(A); M(r); M(x) |] ==> M(Order.pred(A,x,r))"
paulson@13223
   175
apply (simp add: Order.pred_def) 
paulson@13245
   176
apply (insert pred_separation [of r x], simp) 
paulson@13223
   177
done
paulson@13223
   178
paulson@13564
   179
lemma (in M_basic) membership_abs [simp]: 
paulson@46823
   180
     "[| M(r); M(A) |] ==> membership(M,A,r) \<longleftrightarrow> r = Memrel(A)"
paulson@13223
   181
apply (simp add: membership_def Memrel_def, safe)
paulson@13223
   182
  apply (rule equalityI) 
paulson@13223
   183
   apply clarify 
paulson@13223
   184
   apply (frule transM, assumption)
paulson@13223
   185
   apply blast
paulson@13223
   186
  apply clarify 
paulson@13223
   187
  apply (subgoal_tac "M(<xb,ya>)", blast) 
paulson@13223
   188
  apply (blast dest: transM) 
paulson@13223
   189
 apply auto 
paulson@13223
   190
done
paulson@13223
   191
paulson@13564
   192
lemma (in M_basic) M_Memrel_iff:
paulson@13223
   193
     "M(A) ==> 
paulson@13298
   194
      Memrel(A) = {z \<in> A*A. \<exists>x[M]. \<exists>y[M]. z = \<langle>x,y\<rangle> & x \<in> y}"
paulson@13223
   195
apply (simp add: Memrel_def) 
paulson@13223
   196
apply (blast dest: transM)
paulson@13223
   197
done 
paulson@13223
   198
paulson@13564
   199
lemma (in M_basic) Memrel_closed [intro,simp]: 
paulson@13223
   200
     "M(A) ==> M(Memrel(A))"
paulson@13223
   201
apply (simp add: M_Memrel_iff) 
paulson@13245
   202
apply (insert Memrel_separation, simp)
paulson@13223
   203
done
paulson@13223
   204
paulson@13223
   205
wenzelm@60770
   206
subsection \<open>Main results of Kunen, Chapter 1 section 6\<close>
paulson@13223
   207
wenzelm@60770
   208
text\<open>Subset properties-- proved outside the locale\<close>
paulson@13223
   209
paulson@13223
   210
lemma linear_rel_subset: 
paulson@13223
   211
    "[| linear_rel(M,A,r);  B<=A |] ==> linear_rel(M,B,r)"
paulson@13223
   212
by (unfold linear_rel_def, blast)
paulson@13223
   213
paulson@13223
   214
lemma transitive_rel_subset: 
paulson@13223
   215
    "[| transitive_rel(M,A,r);  B<=A |] ==> transitive_rel(M,B,r)"
paulson@13223
   216
by (unfold transitive_rel_def, blast)
paulson@13223
   217
paulson@13223
   218
lemma wellfounded_on_subset: 
paulson@13223
   219
    "[| wellfounded_on(M,A,r);  B<=A |] ==> wellfounded_on(M,B,r)"
paulson@13223
   220
by (unfold wellfounded_on_def subset_def, blast)
paulson@13223
   221
paulson@13223
   222
lemma wellordered_subset: 
paulson@13223
   223
    "[| wellordered(M,A,r);  B<=A |] ==> wellordered(M,B,r)"
paulson@13223
   224
apply (unfold wellordered_def)
paulson@13223
   225
apply (blast intro: linear_rel_subset transitive_rel_subset 
wenzelm@32960
   226
                    wellfounded_on_subset)
paulson@13223
   227
done
paulson@13223
   228
paulson@13564
   229
lemma (in M_basic) wellfounded_on_asym:
paulson@13223
   230
     "[| wellfounded_on(M,A,r);  <a,x>\<in>r;  a\<in>A; x\<in>A;  M(A) |] ==> <x,a>\<notin>r"
paulson@13223
   231
apply (simp add: wellfounded_on_def) 
paulson@13299
   232
apply (drule_tac x="{x,a}" in rspec) 
paulson@13299
   233
apply (blast dest: transM)+
paulson@13223
   234
done
paulson@13223
   235
paulson@13564
   236
lemma (in M_basic) wellordered_asym:
paulson@13223
   237
     "[| wellordered(M,A,r);  <a,x>\<in>r;  a\<in>A; x\<in>A;  M(A) |] ==> <x,a>\<notin>r"
paulson@13223
   238
by (simp add: wellordered_def, blast dest: wellfounded_on_asym)
paulson@13223
   239
paulson@13223
   240
end