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