13223
|
1 |
header {* The Reflection Theorem*}
|
|
2 |
|
|
3 |
theory Reflection = Normal:
|
|
4 |
|
|
5 |
lemma all_iff_not_ex_not: "(\<forall>x. P(x)) <-> (~ (\<exists>x. ~ P(x)))";
|
|
6 |
by blast
|
|
7 |
|
|
8 |
lemma ball_iff_not_bex_not: "(\<forall>x\<in>A. P(x)) <-> (~ (\<exists>x\<in>A. ~ P(x)))";
|
|
9 |
by blast
|
|
10 |
|
|
11 |
text{*From the notes of A. S. Kechris, page 6, and from
|
|
12 |
Andrzej Mostowski, \emph{Constructible Sets with Applications},
|
|
13 |
North-Holland, 1969, page 23.*}
|
|
14 |
|
|
15 |
|
|
16 |
subsection{*Basic Definitions*}
|
|
17 |
|
|
18 |
text{*First part: the cumulative hierarchy defining the class @{text M}.
|
|
19 |
To avoid handling multiple arguments, we assume that @{text "Mset(l)"} is
|
|
20 |
closed under ordered pairing provided @{text l} is limit. Possibly this
|
|
21 |
could be avoided: the induction hypothesis @{term Cl_reflects}
|
|
22 |
(in locale @{text ex_reflection}) could be weakened to
|
|
23 |
@{term "\<forall>y\<in>Mset(a). \<forall>z\<in>Mset(a). P(<y,z>) <-> Q(a,<y,z>)"}, removing most
|
|
24 |
uses of @{term Pair_in_Mset}. But there isn't much point in doing so, since
|
|
25 |
ultimately the @{text ex_reflection} proof is packaged up using the
|
|
26 |
predicate @{text Reflects}.
|
|
27 |
*}
|
|
28 |
locale reflection =
|
|
29 |
fixes Mset and M and Reflects
|
|
30 |
assumes Mset_mono_le : "mono_le_subset(Mset)"
|
|
31 |
and Mset_cont : "cont_Ord(Mset)"
|
|
32 |
and Pair_in_Mset : "[| x \<in> Mset(a); y \<in> Mset(a); Limit(a) |]
|
|
33 |
==> <x,y> \<in> Mset(a)"
|
|
34 |
defines "M(x) == \<exists>a. Ord(a) \<and> x \<in> Mset(a)"
|
|
35 |
and "Reflects(Cl,P,Q) == Closed_Unbounded(Cl) \<and>
|
|
36 |
(\<forall>a. Cl(a) --> (\<forall>x\<in>Mset(a). P(x) <-> Q(a,x)))"
|
|
37 |
fixes F0 --{*ordinal for a specific value @{term y}*}
|
|
38 |
fixes FF --{*sup over the whole level, @{term "y\<in>Mset(a)"}*}
|
|
39 |
fixes ClEx --{*Reflecting ordinals for the formula @{term "\<exists>z. P"}*}
|
|
40 |
defines "F0(P,y) == \<mu>b. (\<exists>z. M(z) \<and> P(<y,z>)) -->
|
|
41 |
(\<exists>z\<in>Mset(b). P(<y,z>))"
|
|
42 |
and "FF(P) == \<lambda>a. \<Union>y\<in>Mset(a). F0(P,y)"
|
|
43 |
and "ClEx(P) == \<lambda>a. Limit(a) \<and> normalize(FF(P),a) = a"
|
|
44 |
|
|
45 |
lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) <= Mset(j)"
|
|
46 |
apply (insert Mset_mono_le)
|
|
47 |
apply (simp add: mono_le_subset_def leI)
|
|
48 |
done
|
|
49 |
|
|
50 |
subsection{*Easy Cases of the Reflection Theorem*}
|
|
51 |
|
|
52 |
theorem (in reflection) Triv_reflection [intro]:
|
|
53 |
"Reflects(Ord, P, \<lambda>a x. P(x))"
|
|
54 |
by (simp add: Reflects_def)
|
|
55 |
|
|
56 |
theorem (in reflection) Not_reflection [intro]:
|
|
57 |
"Reflects(Cl,P,Q) ==> Reflects(Cl, \<lambda>x. ~P(x), \<lambda>a x. ~Q(a,x))"
|
13268
|
58 |
by (simp add: Reflects_def)
|
13223
|
59 |
|
|
60 |
theorem (in reflection) And_reflection [intro]:
|
|
61 |
"[| Reflects(Cl,P,Q); Reflects(C',P',Q') |]
|
|
62 |
==> Reflects(\<lambda>a. Cl(a) \<and> C'(a), \<lambda>x. P(x) \<and> P'(x),
|
|
63 |
\<lambda>a x. Q(a,x) \<and> Q'(a,x))"
|
|
64 |
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
|
|
65 |
|
|
66 |
theorem (in reflection) Or_reflection [intro]:
|
|
67 |
"[| Reflects(Cl,P,Q); Reflects(C',P',Q') |]
|
|
68 |
==> Reflects(\<lambda>a. Cl(a) \<and> C'(a), \<lambda>x. P(x) \<or> P'(x),
|
|
69 |
\<lambda>a x. Q(a,x) \<or> Q'(a,x))"
|
|
70 |
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
|
|
71 |
|
|
72 |
theorem (in reflection) Imp_reflection [intro]:
|
|
73 |
"[| Reflects(Cl,P,Q); Reflects(C',P',Q') |]
|
|
74 |
==> Reflects(\<lambda>a. Cl(a) \<and> C'(a),
|
|
75 |
\<lambda>x. P(x) --> P'(x),
|
|
76 |
\<lambda>a x. Q(a,x) --> Q'(a,x))"
|
|
77 |
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
|
|
78 |
|
|
79 |
theorem (in reflection) Iff_reflection [intro]:
|
|
80 |
"[| Reflects(Cl,P,Q); Reflects(C',P',Q') |]
|
|
81 |
==> Reflects(\<lambda>a. Cl(a) \<and> C'(a),
|
|
82 |
\<lambda>x. P(x) <-> P'(x),
|
|
83 |
\<lambda>a x. Q(a,x) <-> Q'(a,x))"
|
|
84 |
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
|
|
85 |
|
|
86 |
subsection{*Reflection for Existential Quantifiers*}
|
|
87 |
|
|
88 |
lemma (in reflection) F0_works:
|
|
89 |
"[| y\<in>Mset(a); Ord(a); M(z); P(<y,z>) |] ==> \<exists>z\<in>Mset(F0(P,y)). P(<y,z>)"
|
|
90 |
apply (unfold F0_def M_def, clarify)
|
|
91 |
apply (rule LeastI2)
|
|
92 |
apply (blast intro: Mset_mono [THEN subsetD])
|
|
93 |
apply (blast intro: lt_Ord2, blast)
|
|
94 |
done
|
|
95 |
|
|
96 |
lemma (in reflection) Ord_F0 [intro,simp]: "Ord(F0(P,y))"
|
|
97 |
by (simp add: F0_def)
|
|
98 |
|
|
99 |
lemma (in reflection) Ord_FF [intro,simp]: "Ord(FF(P,y))"
|
|
100 |
by (simp add: FF_def)
|
|
101 |
|
|
102 |
lemma (in reflection) cont_Ord_FF: "cont_Ord(FF(P))"
|
|
103 |
apply (insert Mset_cont)
|
|
104 |
apply (simp add: cont_Ord_def FF_def, blast)
|
|
105 |
done
|
|
106 |
|
|
107 |
text{*Recall that @{term F0} depends upon @{term "y\<in>Mset(a)"},
|
|
108 |
while @{term FF} depends only upon @{term a}. *}
|
|
109 |
lemma (in reflection) FF_works:
|
|
110 |
"[| M(z); y\<in>Mset(a); P(<y,z>); Ord(a) |] ==> \<exists>z\<in>Mset(FF(P,a)). P(<y,z>)"
|
|
111 |
apply (simp add: FF_def)
|
|
112 |
apply (simp_all add: cont_Ord_Union [of concl: Mset]
|
|
113 |
Mset_cont Mset_mono_le not_emptyI Ord_F0)
|
|
114 |
apply (blast intro: F0_works)
|
|
115 |
done
|
|
116 |
|
|
117 |
lemma (in reflection) FFN_works:
|
|
118 |
"[| M(z); y\<in>Mset(a); P(<y,z>); Ord(a) |]
|
|
119 |
==> \<exists>z\<in>Mset(normalize(FF(P),a)). P(<y,z>)"
|
|
120 |
apply (drule FF_works [of concl: P], assumption+)
|
|
121 |
apply (blast intro: cont_Ord_FF le_normalize [THEN Mset_mono, THEN subsetD])
|
|
122 |
done
|
|
123 |
|
|
124 |
|
|
125 |
text{*Locale for the induction hypothesis*}
|
|
126 |
|
|
127 |
locale ex_reflection = reflection +
|
|
128 |
fixes P --"the original formula"
|
|
129 |
fixes Q --"the reflected formula"
|
|
130 |
fixes Cl --"the class of reflecting ordinals"
|
|
131 |
assumes Cl_reflects: "[| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x)"
|
|
132 |
|
|
133 |
lemma (in ex_reflection) ClEx_downward:
|
|
134 |
"[| M(z); y\<in>Mset(a); P(<y,z>); Cl(a); ClEx(P,a) |]
|
|
135 |
==> \<exists>z\<in>Mset(a). Q(a,<y,z>)"
|
|
136 |
apply (simp add: ClEx_def, clarify)
|
|
137 |
apply (frule Limit_is_Ord)
|
|
138 |
apply (frule FFN_works [of concl: P], assumption+)
|
|
139 |
apply (drule Cl_reflects, assumption+)
|
|
140 |
apply (auto simp add: Limit_is_Ord Pair_in_Mset)
|
|
141 |
done
|
|
142 |
|
|
143 |
lemma (in ex_reflection) ClEx_upward:
|
|
144 |
"[| z\<in>Mset(a); y\<in>Mset(a); Q(a,<y,z>); Cl(a); ClEx(P,a) |]
|
|
145 |
==> \<exists>z. M(z) \<and> P(<y,z>)"
|
|
146 |
apply (simp add: ClEx_def M_def)
|
|
147 |
apply (blast dest: Cl_reflects
|
|
148 |
intro: Limit_is_Ord Pair_in_Mset)
|
|
149 |
done
|
|
150 |
|
|
151 |
text{*Class @{text ClEx} indeed consists of reflecting ordinals...*}
|
|
152 |
lemma (in ex_reflection) ZF_ClEx_iff:
|
|
153 |
"[| y\<in>Mset(a); Cl(a); ClEx(P,a) |]
|
|
154 |
==> (\<exists>z. M(z) \<and> P(<y,z>)) <-> (\<exists>z\<in>Mset(a). Q(a,<y,z>))"
|
|
155 |
by (blast intro: dest: ClEx_downward ClEx_upward)
|
|
156 |
|
|
157 |
text{*...and it is closed and unbounded*}
|
|
158 |
lemma (in ex_reflection) ZF_Closed_Unbounded_ClEx:
|
|
159 |
"Closed_Unbounded(ClEx(P))"
|
|
160 |
apply (simp add: ClEx_def)
|
|
161 |
apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded
|
|
162 |
Closed_Unbounded_Limit Normal_normalize)
|
|
163 |
done
|
|
164 |
|
|
165 |
text{*The same two theorems, exported to locale @{text reflection}.*}
|
|
166 |
|
|
167 |
text{*Class @{text ClEx} indeed consists of reflecting ordinals...*}
|
|
168 |
lemma (in reflection) ClEx_iff:
|
|
169 |
"[| y\<in>Mset(a); Cl(a); ClEx(P,a);
|
|
170 |
!!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x) |]
|
|
171 |
==> (\<exists>z. M(z) \<and> P(<y,z>)) <-> (\<exists>z\<in>Mset(a). Q(a,<y,z>))"
|
|
172 |
apply (unfold ClEx_def FF_def F0_def M_def)
|
|
173 |
apply (rule Reflection.ZF_ClEx_iff [of Mset Cl],
|
|
174 |
simp_all add: Mset_mono_le Mset_cont Pair_in_Mset)
|
|
175 |
done
|
|
176 |
|
|
177 |
lemma (in reflection) Closed_Unbounded_ClEx:
|
|
178 |
"(!!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x))
|
|
179 |
==> Closed_Unbounded(ClEx(P))"
|
|
180 |
apply (unfold ClEx_def FF_def F0_def M_def)
|
|
181 |
apply (rule Reflection.ZF_Closed_Unbounded_ClEx,
|
|
182 |
simp_all add: Mset_mono_le Mset_cont Pair_in_Mset)
|
|
183 |
done
|
|
184 |
|
13292
|
185 |
subsection{*Packaging the Quantifier Reflection Rules*}
|
|
186 |
|
13223
|
187 |
lemma (in reflection) Ex_reflection_0:
|
|
188 |
"Reflects(Cl,P0,Q0)
|
|
189 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(P0,a),
|
|
190 |
\<lambda>x. \<exists>z. M(z) \<and> P0(<x,z>),
|
|
191 |
\<lambda>a x. \<exists>z\<in>Mset(a). Q0(a,<x,z>))"
|
|
192 |
apply (simp add: Reflects_def)
|
|
193 |
apply (intro conjI Closed_Unbounded_Int)
|
|
194 |
apply blast
|
|
195 |
apply (rule reflection.Closed_Unbounded_ClEx [of Cl P0 Q0], blast, clarify)
|
|
196 |
apply (rule_tac Cl=Cl in ClEx_iff, assumption+, blast)
|
|
197 |
done
|
|
198 |
|
|
199 |
lemma (in reflection) All_reflection_0:
|
|
200 |
"Reflects(Cl,P0,Q0)
|
|
201 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(\<lambda>x.~P0(x), a),
|
|
202 |
\<lambda>x. \<forall>z. M(z) --> P0(<x,z>),
|
|
203 |
\<lambda>a x. \<forall>z\<in>Mset(a). Q0(a,<x,z>))"
|
|
204 |
apply (simp only: all_iff_not_ex_not ball_iff_not_bex_not)
|
|
205 |
apply (rule Not_reflection, drule Not_reflection, simp)
|
|
206 |
apply (erule Ex_reflection_0)
|
|
207 |
done
|
|
208 |
|
|
209 |
theorem (in reflection) Ex_reflection [intro]:
|
|
210 |
"Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
|
|
211 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(\<lambda>x. P(fst(x),snd(x)), a),
|
|
212 |
\<lambda>x. \<exists>z. M(z) \<and> P(x,z),
|
|
213 |
\<lambda>a x. \<exists>z\<in>Mset(a). Q(a,x,z))"
|
|
214 |
by (rule Ex_reflection_0 [of _ " \<lambda>x. P(fst(x),snd(x))"
|
|
215 |
"\<lambda>a x. Q(a,fst(x),snd(x))", simplified])
|
|
216 |
|
|
217 |
theorem (in reflection) All_reflection [intro]:
|
|
218 |
"Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
|
|
219 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(\<lambda>x. ~P(fst(x),snd(x)), a),
|
|
220 |
\<lambda>x. \<forall>z. M(z) --> P(x,z),
|
|
221 |
\<lambda>a x. \<forall>z\<in>Mset(a). Q(a,x,z))"
|
|
222 |
by (rule All_reflection_0 [of _ "\<lambda>x. P(fst(x),snd(x))"
|
|
223 |
"\<lambda>a x. Q(a,fst(x),snd(x))", simplified])
|
|
224 |
|
13292
|
225 |
text{*And again, this time using class-bounded quantifiers*}
|
|
226 |
|
|
227 |
theorem (in reflection) Rex_reflection [intro]:
|
|
228 |
"Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
|
|
229 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(\<lambda>x. P(fst(x),snd(x)), a),
|
|
230 |
\<lambda>x. \<exists>z[M]. P(x,z),
|
|
231 |
\<lambda>a x. \<exists>z\<in>Mset(a). Q(a,x,z))"
|
|
232 |
by (unfold rex_def, blast)
|
|
233 |
|
|
234 |
theorem (in reflection) Rall_reflection [intro]:
|
|
235 |
"Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
|
|
236 |
==> Reflects(\<lambda>a. Cl(a) \<and> ClEx(\<lambda>x. ~P(fst(x),snd(x)), a),
|
|
237 |
\<lambda>x. \<forall>z[M]. P(x,z),
|
|
238 |
\<lambda>a x. \<forall>z\<in>Mset(a). Q(a,x,z))"
|
|
239 |
by (unfold rall_def, blast)
|
|
240 |
|
|
241 |
|
13223
|
242 |
text{*No point considering bounded quantifiers, where reflection is trivial.*}
|
|
243 |
|
|
244 |
|
|
245 |
subsection{*Simple Examples of Reflection*}
|
|
246 |
|
|
247 |
text{*Example 1: reflecting a simple formula. The reflecting class is first
|
|
248 |
given as the variable @{text ?Cl} and later retrieved from the final
|
|
249 |
proof state.*}
|
|
250 |
lemma (in reflection)
|
|
251 |
"Reflects(?Cl,
|
|
252 |
\<lambda>x. \<exists>y. M(y) \<and> x \<in> y,
|
|
253 |
\<lambda>a x. \<exists>y\<in>Mset(a). x \<in> y)"
|
|
254 |
by fast
|
|
255 |
|
|
256 |
text{*Problem here: there needs to be a conjunction (class intersection)
|
|
257 |
in the class of reflecting ordinals. The @{term "Ord(a)"} is redundant,
|
|
258 |
though harmless.*}
|
|
259 |
lemma (in reflection)
|
|
260 |
"Reflects(\<lambda>a. Ord(a) \<and> ClEx(\<lambda>x. fst(x) \<in> snd(x), a),
|
|
261 |
\<lambda>x. \<exists>y. M(y) \<and> x \<in> y,
|
|
262 |
\<lambda>a x. \<exists>y\<in>Mset(a). x \<in> y)"
|
|
263 |
by fast
|
|
264 |
|
|
265 |
|
|
266 |
text{*Example 2*}
|
|
267 |
lemma (in reflection)
|
|
268 |
"Reflects(?Cl,
|
|
269 |
\<lambda>x. \<exists>y. M(y) \<and> (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y),
|
|
270 |
\<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)"
|
|
271 |
by fast
|
|
272 |
|
|
273 |
text{*Example 2'. We give the reflecting class explicitly. *}
|
|
274 |
lemma (in reflection)
|
|
275 |
"Reflects
|
|
276 |
(\<lambda>a. (Ord(a) \<and>
|
|
277 |
ClEx(\<lambda>x. ~ (snd(x) \<subseteq> fst(fst(x)) --> snd(x) \<in> snd(fst(x))), a)) \<and>
|
|
278 |
ClEx(\<lambda>x. \<forall>z. M(z) --> z \<subseteq> fst(x) --> z \<in> snd(x), a),
|
|
279 |
\<lambda>x. \<exists>y. M(y) \<and> (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y),
|
|
280 |
\<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)"
|
|
281 |
by fast
|
|
282 |
|
|
283 |
text{*Example 2''. We expand the subset relation.*}
|
|
284 |
lemma (in reflection)
|
|
285 |
"Reflects(?Cl,
|
|
286 |
\<lambda>x. \<exists>y. M(y) \<and> (\<forall>z. M(z) --> (\<forall>w. M(w) --> w\<in>z --> w\<in>x) --> z\<in>y),
|
|
287 |
\<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). (\<forall>w\<in>Mset(a). w\<in>z --> w\<in>x) --> z\<in>y)"
|
|
288 |
by fast
|
|
289 |
|
|
290 |
text{*Example 2'''. Single-step version, to reveal the reflecting class.*}
|
|
291 |
lemma (in reflection)
|
|
292 |
"Reflects(?Cl,
|
|
293 |
\<lambda>x. \<exists>y. M(y) \<and> (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y),
|
|
294 |
\<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)"
|
|
295 |
apply (rule Ex_reflection)
|
|
296 |
txt{*
|
|
297 |
@{goals[display,indent=0,margin=60]}
|
|
298 |
*}
|
|
299 |
apply (rule All_reflection)
|
|
300 |
txt{*
|
|
301 |
@{goals[display,indent=0,margin=60]}
|
|
302 |
*}
|
|
303 |
apply (rule Triv_reflection)
|
|
304 |
txt{*
|
|
305 |
@{goals[display,indent=0,margin=60]}
|
|
306 |
*}
|
|
307 |
done
|
|
308 |
|
|
309 |
text{*Example 3. Warning: the following examples make sense only
|
|
310 |
if @{term P} is quantifier-free, since it is not being relativized.*}
|
|
311 |
lemma (in reflection)
|
|
312 |
"Reflects(?Cl,
|
|
313 |
\<lambda>x. \<exists>y. M(y) \<and> (\<forall>z. M(z) --> z \<in> y <-> z \<in> x \<and> P(z)),
|
|
314 |
\<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<in> y <-> z \<in> x \<and> P(z))"
|
|
315 |
by fast
|
|
316 |
|
|
317 |
text{*Example 3'*}
|
|
318 |
lemma (in reflection)
|
|
319 |
"Reflects(?Cl,
|
|
320 |
\<lambda>x. \<exists>y. M(y) \<and> y = Collect(x,P),
|
|
321 |
\<lambda>a x. \<exists>y\<in>Mset(a). y = Collect(x,P))";
|
|
322 |
by fast
|
|
323 |
|
|
324 |
text{*Example 3''*}
|
|
325 |
lemma (in reflection)
|
|
326 |
"Reflects(?Cl,
|
|
327 |
\<lambda>x. \<exists>y. M(y) \<and> y = Replace(x,P),
|
|
328 |
\<lambda>a x. \<exists>y\<in>Mset(a). y = Replace(x,P))";
|
|
329 |
by fast
|
|
330 |
|
|
331 |
text{*Example 4: Axiom of Choice. Possibly wrong, since @{text \<Pi>} needs
|
|
332 |
to be relativized.*}
|
|
333 |
lemma (in reflection)
|
|
334 |
"Reflects(?Cl,
|
|
335 |
\<lambda>A. 0\<notin>A --> (\<exists>f. M(f) \<and> f \<in> (\<Pi>X \<in> A. X)),
|
|
336 |
\<lambda>a A. 0\<notin>A --> (\<exists>f\<in>Mset(a). f \<in> (\<Pi>X \<in> A. X)))"
|
|
337 |
by fast
|
|
338 |
|
|
339 |
end
|
|
340 |
|