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