author  haftmann 
Fri, 17 Jun 2005 16:12:49 +0200  
changeset 16417  9bc16273c2d4 
parent 13780  af7b79271364 
child 21233  5a5c8ea5f66a 
permissions  rwrr 
13505  1 
(* Title: ZF/Constructible/Wellorderings.thy 
2 
ID: $Id$ 

3 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory 

4 
*) 

5 

13223  6 
header {*Relativized Wellorderings*} 
7 

16417  8 
theory Wellorderings imports Relative begin 
13223  9 

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

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

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

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

14 
page 17.*} 

15 

16 

17 
subsection{*Wellorderings*} 

18 

19 
constdefs 

20 
irreflexive :: "[i=>o,i,i]=>o" 

13299  21 
"irreflexive(M,A,r) == \<forall>x[M]. x\<in>A > <x,x> \<notin> r" 
13223  22 

23 
transitive_rel :: "[i=>o,i,i]=>o" 

24 
"transitive_rel(M,A,r) == 

13299  25 
\<forall>x[M]. x\<in>A > (\<forall>y[M]. y\<in>A > (\<forall>z[M]. z\<in>A > 
13223  26 
<x,y>\<in>r > <y,z>\<in>r > <x,z>\<in>r))" 
27 

28 
linear_rel :: "[i=>o,i,i]=>o" 

29 
"linear_rel(M,A,r) == 

13299  30 
\<forall>x[M]. x\<in>A > (\<forall>y[M]. y\<in>A > <x,y>\<in>r  x=y  <y,x>\<in>r)" 
13223  31 

32 
wellfounded :: "[i=>o,i]=>o" 

33 
{*EVERY nonempty set has an @{text r}minimal element*} 

34 
"wellfounded(M,r) == 

13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset

35 
\<forall>x[M]. x\<noteq>0 > (\<exists>y[M]. y\<in>x & ~(\<exists>z[M]. z\<in>x & <z,y> \<in> r))" 
13223  36 
wellfounded_on :: "[i=>o,i,i]=>o" 
37 
{*every nonempty SUBSET OF @{text A} has an @{text r}minimal element*} 

38 
"wellfounded_on(M,A,r) == 

13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset

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

41 
wellordered :: "[i=>o,i,i]=>o" 

13513  42 
{*linear and wellfounded on @{text A}*} 
13223  43 
"wellordered(M,A,r) == 
44 
transitive_rel(M,A,r) & linear_rel(M,A,r) & wellfounded_on(M,A,r)" 

45 

46 

47 
subsubsection {*Trivial absoluteness proofs*} 

48 

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

49 
lemma (in M_basic) irreflexive_abs [simp]: 
13223  50 
"M(A) ==> irreflexive(M,A,r) <> irrefl(A,r)" 
51 
by (simp add: irreflexive_def irrefl_def) 

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) transitive_rel_abs [simp]: 
13223  54 
"M(A) ==> transitive_rel(M,A,r) <> trans[A](r)" 
55 
by (simp add: transitive_rel_def trans_on_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) linear_rel_abs [simp]: 
13223  58 
"M(A) ==> linear_rel(M,A,r) <> linear(A,r)" 
59 
by (simp add: linear_rel_def linear_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) wellordered_is_trans_on: 
13223  62 
"[ wellordered(M,A,r); M(A) ] ==> trans[A](r)" 
13505  63 
by (auto simp add: wellordered_def) 
13223  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_linear: 
13223  66 
"[ wellordered(M,A,r); M(A) ] ==> linear(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_wellfounded_on: 
13223  70 
"[ wellordered(M,A,r); M(A) ] ==> wellfounded_on(M,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) wellfounded_imp_wellfounded_on: 
13223  74 
"[ wellfounded(M,r); M(A) ] ==> wellfounded_on(M,A,r)" 
75 
by (auto simp add: wellfounded_def wellfounded_on_def) 

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_on_subset_A: 
13269  78 
"[ wellfounded_on(M,A,r); B<=A ] ==> wellfounded_on(M,B,r)" 
79 
by (simp add: wellfounded_on_def, blast) 

80 

13223  81 

82 
subsubsection {*Wellfounded relations*} 

83 

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

84 
lemma (in M_basic) wellfounded_on_iff_wellfounded: 
13223  85 
"wellfounded_on(M,A,r) <> wellfounded(M, r \<inter> A*A)" 
86 
apply (simp add: wellfounded_on_def wellfounded_def, safe) 

13780  87 
apply force 
13299  88 
apply (drule_tac x=x in rspec, assumption, blast) 
13223  89 
done 
90 

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

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

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_field_imp_wellfounded: 
13269  96 
"wellfounded_on(M, field(r), r) ==> wellfounded(M,r)" 
97 
by (simp add: wellfounded_def wellfounded_on_iff_wellfounded, fast) 

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_iff_wellfounded_on_field: 
13269  100 
"M(r) ==> wellfounded(M,r) <> wellfounded_on(M, field(r), r)" 
101 
by (blast intro: wellfounded_imp_wellfounded_on 

102 
wellfounded_on_field_imp_wellfounded) 

103 

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

104 
(*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

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

106 
"[ wellfounded(M,r); M(a); M(r); separation(M, \<lambda>x. ~P(x)); 
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

107 
\<forall>x. M(x) & (\<forall>y. <y,x> \<in> r > P(y)) > P(x) ] 
74cb2af8811e
new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents:
13247
diff
changeset

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

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

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

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

113 

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

114 
lemma (in M_basic) wellfounded_on_induct: 
13223  115 
"[ a\<in>A; wellfounded_on(M,A,r); M(A); 
116 
separation(M, \<lambda>x. x\<in>A > ~P(x)); 

117 
\<forall>x\<in>A. M(x) & (\<forall>y\<in>A. <y,x> \<in> r > P(y)) > P(x) ] 

118 
==> P(a)"; 

119 
apply (simp (no_asm_use) add: wellfounded_on_def) 

13299  120 
apply (drule_tac x="{z\<in>A. z\<in>A > ~P(z)}" in rspec) 
121 
apply (blast intro: transM)+ 

13223  122 
done 
123 

124 

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

126 

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

127 
lemma (in M_basic) linear_imp_relativized: 
13223  128 
"linear(A,r) ==> linear_rel(M,A,r)" 
129 
by (simp add: linear_def linear_rel_def) 

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) trans_on_imp_relativized: 
13223  132 
"trans[A](r) ==> transitive_rel(M,A,r)" 
133 
by (unfold transitive_rel_def trans_on_def, blast) 

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) wf_on_imp_relativized: 
13223  136 
"wf[A](r) ==> wellfounded_on(M,A,r)" 
137 
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

138 
apply (drule_tac x=x in spec, blast) 
13223  139 
done 
140 

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

141 
lemma (in M_basic) wf_imp_relativized: 
13223  142 
"wf(r) ==> wellfounded(M,r)" 
143 
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

144 
apply (drule_tac x=x in spec, blast) 
13223  145 
done 
146 

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

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

150 
linear_imp_relativized trans_on_imp_relativized wf_on_imp_relativized) 

151 

152 

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

154 

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

155 
lemma (in M_basic) order_isomorphism_abs [simp]: 
13223  156 
"[ M(A); M(B); M(f) ] 
157 
==> order_isomorphism(M,A,r,B,s,f) <> f \<in> ord_iso(A,r,B,s)" 

13352  158 
by (simp add: apply_closed order_isomorphism_def ord_iso_def) 
13223  159 

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

160 
lemma (in M_basic) pred_set_abs [simp]: 
13223  161 
"[ M(r); M(B) ] ==> pred_set(M,A,x,r,B) <> B = Order.pred(A,x,r)" 
162 
apply (simp add: pred_set_def Order.pred_def) 

163 
apply (blast dest: transM) 

164 
done 

165 

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

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

13245  169 
apply (insert pred_separation [of r x], simp) 
13223  170 
done 
171 

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

172 
lemma (in M_basic) membership_abs [simp]: 
13223  173 
"[ M(r); M(A) ] ==> membership(M,A,r) <> r = Memrel(A)" 
174 
apply (simp add: membership_def Memrel_def, safe) 

175 
apply (rule equalityI) 

176 
apply clarify 

177 
apply (frule transM, assumption) 

178 
apply blast 

179 
apply clarify 

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

181 
apply (blast dest: transM) 

182 
apply auto 

183 
done 

184 

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

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

190 
done 

191 

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

192 
lemma (in M_basic) Memrel_closed [intro,simp]: 
13223  193 
"M(A) ==> M(Memrel(A))" 
194 
apply (simp add: M_Memrel_iff) 

13245  195 
apply (insert Memrel_separation, simp) 
13223  196 
done 
197 

198 

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

200 

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

202 

203 
lemma linear_rel_subset: 

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

205 
by (unfold linear_rel_def, blast) 

206 

207 
lemma transitive_rel_subset: 

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

209 
by (unfold transitive_rel_def, blast) 

210 

211 
lemma wellfounded_on_subset: 

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

213 
by (unfold wellfounded_on_def subset_def, blast) 

214 

215 
lemma wellordered_subset: 

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

217 
apply (unfold wellordered_def) 

218 
apply (blast intro: linear_rel_subset transitive_rel_subset 

219 
wellfounded_on_subset) 

220 
done 

221 

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

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

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

13223  227 
done 
228 

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

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

232 

233 
end 