38 fixes FF --{*sup over the whole level, @{term "y\<in>Mset(a)"}*} |
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"}*} |
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>)) --> |
40 defines "F0(P,y) == \<mu>b. (\<exists>z. M(z) \<and> P(<y,z>)) --> |
41 (\<exists>z\<in>Mset(b). 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)" |
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" |
43 and "ClEx(P,a) == Limit(a) \<and> normalize(FF(P),a) = a" |
44 |
44 |
45 lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) <= Mset(j)" |
45 lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) <= Mset(j)" |
46 apply (insert Mset_mono_le) |
46 apply (insert Mset_mono_le) |
47 apply (simp add: mono_le_subset_def leI) |
47 apply (simp add: mono_le_subset_def leI) |
48 done |
48 done |
|
49 |
|
50 text{*Awkward: we need a version of @{text ClEx_def} as an equality |
|
51 at the level of classes, which do not really exist*} |
|
52 lemma (in reflection) ClEx_eq: |
|
53 "ClEx(P) == \<lambda>a. Limit(a) \<and> normalize(FF(P),a) = a" |
|
54 by (simp add: ClEx_def [symmetric]) |
|
55 |
49 |
56 |
50 subsection{*Easy Cases of the Reflection Theorem*} |
57 subsection{*Easy Cases of the Reflection Theorem*} |
51 |
58 |
52 theorem (in reflection) Triv_reflection [intro]: |
59 theorem (in reflection) Triv_reflection [intro]: |
53 "Reflects(Ord, P, \<lambda>a x. P(x))" |
60 "Reflects(Ord, P, \<lambda>a x. P(x))" |
155 by (blast intro: dest: ClEx_downward ClEx_upward) |
162 by (blast intro: dest: ClEx_downward ClEx_upward) |
156 |
163 |
157 text{*...and it is closed and unbounded*} |
164 text{*...and it is closed and unbounded*} |
158 lemma (in ex_reflection) ZF_Closed_Unbounded_ClEx: |
165 lemma (in ex_reflection) ZF_Closed_Unbounded_ClEx: |
159 "Closed_Unbounded(ClEx(P))" |
166 "Closed_Unbounded(ClEx(P))" |
160 apply (simp add: ClEx_def) |
167 apply (simp add: ClEx_eq) |
161 apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded |
168 apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded |
162 Closed_Unbounded_Limit Normal_normalize) |
169 Closed_Unbounded_Limit Normal_normalize) |
163 done |
170 done |
164 |
171 |
165 text{*The same two theorems, exported to locale @{text reflection}.*} |
172 text{*The same two theorems, exported to locale @{text reflection}.*} |
174 [OF ex_reflection.intro, OF reflection.intro ex_reflection_axioms.intro, |
181 [OF ex_reflection.intro, OF reflection.intro ex_reflection_axioms.intro, |
175 of Mset Cl]) |
182 of Mset Cl]) |
176 apply (simp_all add: Mset_mono_le Mset_cont Pair_in_Mset) |
183 apply (simp_all add: Mset_mono_le Mset_cont Pair_in_Mset) |
177 done |
184 done |
178 |
185 |
|
186 (*Alternative proof, less unfolding: |
|
187 apply (rule Reflection.ZF_ClEx_iff [of Mset _ _ Cl, folded M_def]) |
|
188 apply (fold ClEx_def FF_def F0_def) |
|
189 apply (rule ex_reflection.intro, assumption) |
|
190 apply (simp add: ex_reflection_axioms.intro, assumption+) |
|
191 *) |
|
192 |
179 lemma (in reflection) Closed_Unbounded_ClEx: |
193 lemma (in reflection) Closed_Unbounded_ClEx: |
180 "(!!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x)) |
194 "(!!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x)) |
181 ==> Closed_Unbounded(ClEx(P))" |
195 ==> Closed_Unbounded(ClEx(P))" |
182 apply (unfold ClEx_def FF_def F0_def M_def) |
196 apply (unfold ClEx_eq FF_def F0_def M_def) |
183 apply (rule ex_reflection.ZF_Closed_Unbounded_ClEx |
197 apply (rule Reflection.ZF_Closed_Unbounded_ClEx [of Mset _ _ Cl]) |
184 [OF ex_reflection.intro, OF reflection.intro ex_reflection_axioms.intro]) |
198 apply (rule ex_reflection.intro, assumption) |
185 apply (simp_all add: Mset_mono_le Mset_cont Pair_in_Mset) |
199 apply (blast intro: ex_reflection_axioms.intro) |
186 done |
200 done |
187 |
201 |
188 subsection{*Packaging the Quantifier Reflection Rules*} |
202 subsection{*Packaging the Quantifier Reflection Rules*} |
189 |
203 |
190 lemma (in reflection) Ex_reflection_0: |
204 lemma (in reflection) Ex_reflection_0: |