author  paulson 
Tue, 06 Mar 2012 17:01:37 +0000  
changeset 46823  57bf0cecb366 
parent 32960  69916a850301 
child 47072  777549486d44 
permissions  rwrr 
13505  1 
(* Title: ZF/Constructible/Wellorderings.thy 
2 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory 

3 
*) 

4 

13223  5 
header {*Relativized Wellorderings*} 
6 

16417  7 
theory Wellorderings imports Relative begin 
13223  8 

9 
text{*We define functions analogous to @{term ordermap} @{term ordertype} 

10 
but without using recursion. Instead, there is a direct appeal 

11 
to Replacement. This will be the basis for a version relativized 

12 
to some class @{text M}. The main result is Theorem I 7.6 in Kunen, 

13 
page 17.*} 

14 

15 

16 
subsection{*Wellorderings*} 

17 

21233  18 
definition 
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

19 
irreflexive :: "[i=>o,i,i]=>o" where 
46823  20 
"irreflexive(M,A,r) == \<forall>x[M]. x\<in>A \<longrightarrow> <x,x> \<notin> r" 
13223  21 

21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

22 
definition 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

23 
transitive_rel :: "[i=>o,i,i]=>o" where 
13223  24 
"transitive_rel(M,A,r) == 
46823  25 
\<forall>x[M]. x\<in>A \<longrightarrow> (\<forall>y[M]. y\<in>A \<longrightarrow> (\<forall>z[M]. z\<in>A \<longrightarrow> 
26 
<x,y>\<in>r \<longrightarrow> <y,z>\<in>r \<longrightarrow> <x,z>\<in>r))" 

13223  27 

21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

28 
definition 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

29 
linear_rel :: "[i=>o,i,i]=>o" where 
13223  30 
"linear_rel(M,A,r) == 
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)" 
13223  32 

21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

33 
definition 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

34 
wellfounded :: "[i=>o,i]=>o" where 
13223  35 
{*EVERY nonempty set has an @{text r}minimal element*} 
36 
"wellfounded(M,r) == 

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))" 
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

38 
definition 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

39 
wellfounded_on :: "[i=>o,i,i]=>o" where 
13223  40 
{*every nonempty SUBSET OF @{text A} has an @{text r}minimal element*} 
41 
"wellfounded_on(M,A,r) == 

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))" 
13223  43 

21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

44 
definition 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21233
diff
changeset

45 
wellordered :: "[i=>o,i,i]=>o" where 
13513  46 
{*linear and wellfounded on @{text A}*} 
13223  47 
"wellordered(M,A,r) == 
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tabwidth;
wenzelm
parents:
21404
diff
changeset

48 
transitive_rel(M,A,r) & linear_rel(M,A,r) & wellfounded_on(M,A,r)" 
13223  49 

50 

51 
subsubsection {*Trivial absoluteness proofs*} 

52 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

53 
lemma (in M_basic) irreflexive_abs [simp]: 
46823  54 
"M(A) ==> irreflexive(M,A,r) \<longleftrightarrow> irrefl(A,r)" 
13223  55 
by (simp add: irreflexive_def irrefl_def) 
56 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

57 
lemma (in M_basic) transitive_rel_abs [simp]: 
46823  58 
"M(A) ==> transitive_rel(M,A,r) \<longleftrightarrow> trans[A](r)" 
13223  59 
by (simp add: transitive_rel_def trans_on_def) 
60 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

61 
lemma (in M_basic) linear_rel_abs [simp]: 
46823  62 
"M(A) ==> linear_rel(M,A,r) \<longleftrightarrow> linear(A,r)" 
13223  63 
by (simp add: linear_rel_def linear_def) 
64 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

65 
lemma (in M_basic) wellordered_is_trans_on: 
13223  66 
"[ wellordered(M,A,r); M(A) ] ==> trans[A](r)" 
13505  67 
by (auto simp add: wellordered_def) 
13223  68 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

69 
lemma (in M_basic) wellordered_is_linear: 
13223  70 
"[ wellordered(M,A,r); M(A) ] ==> linear(A,r)" 
13505  71 
by (auto simp add: wellordered_def) 
13223  72 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

73 
lemma (in M_basic) wellordered_is_wellfounded_on: 
13223  74 
"[ wellordered(M,A,r); M(A) ] ==> wellfounded_on(M,A,r)" 
13505  75 
by (auto simp add: wellordered_def) 
13223  76 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

77 
lemma (in M_basic) wellfounded_imp_wellfounded_on: 
13223  78 
"[ wellfounded(M,r); M(A) ] ==> wellfounded_on(M,A,r)" 
79 
by (auto simp add: wellfounded_def wellfounded_on_def) 

80 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

81 
lemma (in M_basic) wellfounded_on_subset_A: 
13269  82 
"[ wellfounded_on(M,A,r); B<=A ] ==> wellfounded_on(M,B,r)" 
83 
by (simp add: wellfounded_on_def, blast) 

84 

13223  85 

86 
subsubsection {*Wellfounded relations*} 

87 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

88 
lemma (in M_basic) wellfounded_on_iff_wellfounded: 
46823  89 
"wellfounded_on(M,A,r) \<longleftrightarrow> wellfounded(M, r \<inter> A*A)" 
13223  90 
apply (simp add: wellfounded_on_def wellfounded_def, safe) 
13780  91 
apply force 
13299  92 
apply (drule_tac x=x in rspec, assumption, blast) 
13223  93 
done 
94 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

95 
lemma (in M_basic) wellfounded_on_imp_wellfounded: 
13247  96 
"[wellfounded_on(M,A,r); r \<subseteq> A*A] ==> wellfounded(M,r)" 
97 
by (simp add: wellfounded_on_iff_wellfounded subset_Int_iff) 

98 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

99 
lemma (in M_basic) wellfounded_on_field_imp_wellfounded: 
13269  100 
"wellfounded_on(M, field(r), r) ==> wellfounded(M,r)" 
101 
by (simp add: wellfounded_def wellfounded_on_iff_wellfounded, fast) 

102 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

103 
lemma (in M_basic) wellfounded_iff_wellfounded_on_field: 
46823  104 
"M(r) ==> wellfounded(M,r) \<longleftrightarrow> wellfounded_on(M, field(r), r)" 
13269  105 
by (blast intro: wellfounded_imp_wellfounded_on 
106 
wellfounded_on_field_imp_wellfounded) 

107 

13251
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

108 
(*Consider the least z in domain(r) such that P(z) does not hold...*) 
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

109 
lemma (in M_basic) wellfounded_induct: 
13251
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

110 
"[ wellfounded(M,r); M(a); M(r); separation(M, \<lambda>x. ~P(x)); 
46823  111 
\<forall>x. M(x) & (\<forall>y. <y,x> \<in> r \<longrightarrow> P(y)) \<longrightarrow> P(x) ] 
13251
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

112 
==> P(a)"; 
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

113 
apply (simp (no_asm_use) add: wellfounded_def) 
13299  114 
apply (drule_tac x="{z \<in> domain(r). ~P(z)}" in rspec) 
115 
apply (blast dest: transM)+ 

13251
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

116 
done 
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

117 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

118 
lemma (in M_basic) wellfounded_on_induct: 
13223  119 
"[ a\<in>A; wellfounded_on(M,A,r); M(A); 
46823  120 
separation(M, \<lambda>x. x\<in>A \<longrightarrow> ~P(x)); 
121 
\<forall>x\<in>A. M(x) & (\<forall>y\<in>A. <y,x> \<in> r \<longrightarrow> P(y)) \<longrightarrow> P(x) ] 

13223  122 
==> P(a)"; 
123 
apply (simp (no_asm_use) add: wellfounded_on_def) 

46823  124 
apply (drule_tac x="{z\<in>A. z\<in>A \<longrightarrow> ~P(z)}" in rspec) 
13299  125 
apply (blast intro: transM)+ 
13223  126 
done 
127 

128 

129 
subsubsection {*Kunen's lemma IV 3.14, page 123*} 

130 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

131 
lemma (in M_basic) linear_imp_relativized: 
13223  132 
"linear(A,r) ==> linear_rel(M,A,r)" 
133 
by (simp add: linear_def linear_rel_def) 

134 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

135 
lemma (in M_basic) trans_on_imp_relativized: 
13223  136 
"trans[A](r) ==> transitive_rel(M,A,r)" 
137 
by (unfold transitive_rel_def trans_on_def, blast) 

138 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

139 
lemma (in M_basic) wf_on_imp_relativized: 
13223  140 
"wf[A](r) ==> wellfounded_on(M,A,r)" 
141 
apply (simp add: wellfounded_on_def wf_def wf_on_def, clarify) 

13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13306
diff
changeset

142 
apply (drule_tac x=x in spec, blast) 
13223  143 
done 
144 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

145 
lemma (in M_basic) wf_imp_relativized: 
13223  146 
"wf(r) ==> wellfounded(M,r)" 
147 
apply (simp add: wellfounded_def wf_def, clarify) 

13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13306
diff
changeset

148 
apply (drule_tac x=x in spec, blast) 
13223  149 
done 
150 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

151 
lemma (in M_basic) well_ord_imp_relativized: 
13223  152 
"well_ord(A,r) ==> wellordered(M,A,r)" 
153 
by (simp add: wellordered_def well_ord_def tot_ord_def part_ord_def 

154 
linear_imp_relativized trans_on_imp_relativized wf_on_imp_relativized) 

155 

156 

157 
subsection{* Relativized versions of orderisomorphisms and order types *} 

158 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

159 
lemma (in M_basic) order_isomorphism_abs [simp]: 
13223  160 
"[ M(A); M(B); M(f) ] 
46823  161 
==> order_isomorphism(M,A,r,B,s,f) \<longleftrightarrow> f \<in> ord_iso(A,r,B,s)" 
13352  162 
by (simp add: apply_closed order_isomorphism_def ord_iso_def) 
13223  163 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

164 
lemma (in M_basic) pred_set_abs [simp]: 
46823  165 
"[ M(r); M(B) ] ==> pred_set(M,A,x,r,B) \<longleftrightarrow> B = Order.pred(A,x,r)" 
13223  166 
apply (simp add: pred_set_def Order.pred_def) 
167 
apply (blast dest: transM) 

168 
done 

169 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

170 
lemma (in M_basic) pred_closed [intro,simp]: 
13223  171 
"[ M(A); M(r); M(x) ] ==> M(Order.pred(A,x,r))" 
172 
apply (simp add: Order.pred_def) 

13245  173 
apply (insert pred_separation [of r x], simp) 
13223  174 
done 
175 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

176 
lemma (in M_basic) membership_abs [simp]: 
46823  177 
"[ M(r); M(A) ] ==> membership(M,A,r) \<longleftrightarrow> r = Memrel(A)" 
13223  178 
apply (simp add: membership_def Memrel_def, safe) 
179 
apply (rule equalityI) 

180 
apply clarify 

181 
apply (frule transM, assumption) 

182 
apply blast 

183 
apply clarify 

184 
apply (subgoal_tac "M(<xb,ya>)", blast) 

185 
apply (blast dest: transM) 

186 
apply auto 

187 
done 

188 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

189 
lemma (in M_basic) M_Memrel_iff: 
13223  190 
"M(A) ==> 
13298  191 
Memrel(A) = {z \<in> A*A. \<exists>x[M]. \<exists>y[M]. z = \<langle>x,y\<rangle> & x \<in> y}" 
13223  192 
apply (simp add: Memrel_def) 
193 
apply (blast dest: transM) 

194 
done 

195 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

196 
lemma (in M_basic) Memrel_closed [intro,simp]: 
13223  197 
"M(A) ==> M(Memrel(A))" 
198 
apply (simp add: M_Memrel_iff) 

13245  199 
apply (insert Memrel_separation, simp) 
13223  200 
done 
201 

202 

203 
subsection {* Main results of Kunen, Chapter 1 section 6 *} 

204 

205 
text{*Subset properties proved outside the locale*} 

206 

207 
lemma linear_rel_subset: 

208 
"[ linear_rel(M,A,r); B<=A ] ==> linear_rel(M,B,r)" 

209 
by (unfold linear_rel_def, blast) 

210 

211 
lemma transitive_rel_subset: 

212 
"[ transitive_rel(M,A,r); B<=A ] ==> transitive_rel(M,B,r)" 

213 
by (unfold transitive_rel_def, blast) 

214 

215 
lemma wellfounded_on_subset: 

216 
"[ wellfounded_on(M,A,r); B<=A ] ==> wellfounded_on(M,B,r)" 

217 
by (unfold wellfounded_on_def subset_def, blast) 

218 

219 
lemma wellordered_subset: 

220 
"[ wellordered(M,A,r); B<=A ] ==> wellordered(M,B,r)" 

221 
apply (unfold wellordered_def) 

222 
apply (blast intro: linear_rel_subset transitive_rel_subset 

32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tabwidth;
wenzelm
parents:
21404
diff
changeset

223 
wellfounded_on_subset) 
13223  224 
done 
225 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

226 
lemma (in M_basic) wellfounded_on_asym: 
13223  227 
"[ wellfounded_on(M,A,r); <a,x>\<in>r; a\<in>A; x\<in>A; M(A) ] ==> <x,a>\<notin>r" 
228 
apply (simp add: wellfounded_on_def) 

13299  229 
apply (drule_tac x="{x,a}" in rspec) 
230 
apply (blast dest: transM)+ 

13223  231 
done 
232 

13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13513
diff
changeset

233 
lemma (in M_basic) wellordered_asym: 
13223  234 
"[ wellordered(M,A,r); <a,x>\<in>r; a\<in>A; x\<in>A; M(A) ] ==> <x,a>\<notin>r" 
235 
by (simp add: wellordered_def, blast dest: wellfounded_on_asym) 

236 

237 
end 