17 North-Holland, 1969, page 23.\<close> |
17 North-Holland, 1969, page 23.\<close> |
18 |
18 |
19 |
19 |
20 subsection\<open>Basic Definitions\<close> |
20 subsection\<open>Basic Definitions\<close> |
21 |
21 |
22 text\<open>First part: the cumulative hierarchy defining the class @{text M}. |
22 text\<open>First part: the cumulative hierarchy defining the class \<open>M\<close>. |
23 To avoid handling multiple arguments, we assume that @{text "Mset(l)"} is |
23 To avoid handling multiple arguments, we assume that \<open>Mset(l)\<close> is |
24 closed under ordered pairing provided @{text l} is limit. Possibly this |
24 closed under ordered pairing provided \<open>l\<close> is limit. Possibly this |
25 could be avoided: the induction hypothesis @{term Cl_reflects} |
25 could be avoided: the induction hypothesis @{term Cl_reflects} |
26 (in locale @{text ex_reflection}) could be weakened to |
26 (in locale \<open>ex_reflection\<close>) could be weakened to |
27 @{term "\<forall>y\<in>Mset(a). \<forall>z\<in>Mset(a). P(<y,z>) \<longleftrightarrow> Q(a,<y,z>)"}, removing most |
27 @{term "\<forall>y\<in>Mset(a). \<forall>z\<in>Mset(a). P(<y,z>) \<longleftrightarrow> Q(a,<y,z>)"}, removing most |
28 uses of @{term Pair_in_Mset}. But there isn't much point in doing so, since |
28 uses of @{term Pair_in_Mset}. But there isn't much point in doing so, since |
29 ultimately the @{text ex_reflection} proof is packaged up using the |
29 ultimately the \<open>ex_reflection\<close> proof is packaged up using the |
30 predicate @{text Reflects}. |
30 predicate \<open>Reflects\<close>. |
31 \<close> |
31 \<close> |
32 locale reflection = |
32 locale reflection = |
33 fixes Mset and M and Reflects |
33 fixes Mset and M and Reflects |
34 assumes Mset_mono_le : "mono_le_subset(Mset)" |
34 assumes Mset_mono_le : "mono_le_subset(Mset)" |
35 and Mset_cont : "cont_Ord(Mset)" |
35 and Mset_cont : "cont_Ord(Mset)" |
36 and Pair_in_Mset : "[| x \<in> Mset(a); y \<in> Mset(a); Limit(a) |] |
36 and Pair_in_Mset : "[| x \<in> Mset(a); y \<in> Mset(a); Limit(a) |] |
37 ==> <x,y> \<in> Mset(a)" |
37 ==> <x,y> \<in> Mset(a)" |
38 defines "M(x) == \<exists>a. Ord(a) & x \<in> Mset(a)" |
38 defines "M(x) == \<exists>a. Ord(a) & x \<in> Mset(a)" |
39 and "Reflects(Cl,P,Q) == Closed_Unbounded(Cl) & |
39 and "Reflects(Cl,P,Q) == Closed_Unbounded(Cl) & |
40 (\<forall>a. Cl(a) \<longrightarrow> (\<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x)))" |
40 (\<forall>a. Cl(a) \<longrightarrow> (\<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x)))" |
41 fixes F0 --\<open>ordinal for a specific value @{term y}\<close> |
41 fixes F0 \<comment>\<open>ordinal for a specific value @{term y}\<close> |
42 fixes FF --\<open>sup over the whole level, @{term "y\<in>Mset(a)"}\<close> |
42 fixes FF \<comment>\<open>sup over the whole level, @{term "y\<in>Mset(a)"}\<close> |
43 fixes ClEx --\<open>Reflecting ordinals for the formula @{term "\<exists>z. P"}\<close> |
43 fixes ClEx \<comment>\<open>Reflecting ordinals for the formula @{term "\<exists>z. P"}\<close> |
44 defines "F0(P,y) == \<mu> b. (\<exists>z. M(z) & P(<y,z>)) \<longrightarrow> |
44 defines "F0(P,y) == \<mu> b. (\<exists>z. M(z) & P(<y,z>)) \<longrightarrow> |
45 (\<exists>z\<in>Mset(b). P(<y,z>))" |
45 (\<exists>z\<in>Mset(b). P(<y,z>))" |
46 and "FF(P) == \<lambda>a. \<Union>y\<in>Mset(a). F0(P,y)" |
46 and "FF(P) == \<lambda>a. \<Union>y\<in>Mset(a). F0(P,y)" |
47 and "ClEx(P,a) == Limit(a) & normalize(FF(P),a) = a" |
47 and "ClEx(P,a) == Limit(a) & normalize(FF(P),a) = a" |
48 |
48 |
49 lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) \<subseteq> Mset(j)" |
49 lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) \<subseteq> Mset(j)" |
50 apply (insert Mset_mono_le) |
50 apply (insert Mset_mono_le) |
51 apply (simp add: mono_le_subset_def leI) |
51 apply (simp add: mono_le_subset_def leI) |
52 done |
52 done |
53 |
53 |
54 text\<open>Awkward: we need a version of @{text ClEx_def} as an equality |
54 text\<open>Awkward: we need a version of \<open>ClEx_def\<close> as an equality |
55 at the level of classes, which do not really exist\<close> |
55 at the level of classes, which do not really exist\<close> |
56 lemma (in reflection) ClEx_eq: |
56 lemma (in reflection) ClEx_eq: |
57 "ClEx(P) == \<lambda>a. Limit(a) & normalize(FF(P),a) = a" |
57 "ClEx(P) == \<lambda>a. Limit(a) & normalize(FF(P),a) = a" |
58 by (simp add: ClEx_def [symmetric]) |
58 by (simp add: ClEx_def [symmetric]) |
59 |
59 |
134 |
134 |
135 |
135 |
136 text\<open>Locale for the induction hypothesis\<close> |
136 text\<open>Locale for the induction hypothesis\<close> |
137 |
137 |
138 locale ex_reflection = reflection + |
138 locale ex_reflection = reflection + |
139 fixes P --"the original formula" |
139 fixes P \<comment>"the original formula" |
140 fixes Q --"the reflected formula" |
140 fixes Q \<comment>"the reflected formula" |
141 fixes Cl --"the class of reflecting ordinals" |
141 fixes Cl \<comment>"the class of reflecting ordinals" |
142 assumes Cl_reflects: "[| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x)" |
142 assumes Cl_reflects: "[| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x)" |
143 |
143 |
144 lemma (in ex_reflection) ClEx_downward: |
144 lemma (in ex_reflection) ClEx_downward: |
145 "[| M(z); y\<in>Mset(a); P(<y,z>); Cl(a); ClEx(P,a) |] |
145 "[| M(z); y\<in>Mset(a); P(<y,z>); Cl(a); ClEx(P,a) |] |
146 ==> \<exists>z\<in>Mset(a). Q(a,<y,z>)" |
146 ==> \<exists>z\<in>Mset(a). Q(a,<y,z>)" |
157 apply (simp add: ClEx_def M_def) |
157 apply (simp add: ClEx_def M_def) |
158 apply (blast dest: Cl_reflects |
158 apply (blast dest: Cl_reflects |
159 intro: Limit_is_Ord Pair_in_Mset) |
159 intro: Limit_is_Ord Pair_in_Mset) |
160 done |
160 done |
161 |
161 |
162 text\<open>Class @{text ClEx} indeed consists of reflecting ordinals...\<close> |
162 text\<open>Class \<open>ClEx\<close> indeed consists of reflecting ordinals...\<close> |
163 lemma (in ex_reflection) ZF_ClEx_iff: |
163 lemma (in ex_reflection) ZF_ClEx_iff: |
164 "[| y\<in>Mset(a); Cl(a); ClEx(P,a) |] |
164 "[| y\<in>Mset(a); Cl(a); ClEx(P,a) |] |
165 ==> (\<exists>z. M(z) & P(<y,z>)) \<longleftrightarrow> (\<exists>z\<in>Mset(a). Q(a,<y,z>))" |
165 ==> (\<exists>z. M(z) & P(<y,z>)) \<longleftrightarrow> (\<exists>z\<in>Mset(a). Q(a,<y,z>))" |
166 by (blast intro: dest: ClEx_downward ClEx_upward) |
166 by (blast intro: dest: ClEx_downward ClEx_upward) |
167 |
167 |
171 apply (simp add: ClEx_eq) |
171 apply (simp add: ClEx_eq) |
172 apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded |
172 apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded |
173 Closed_Unbounded_Limit Normal_normalize) |
173 Closed_Unbounded_Limit Normal_normalize) |
174 done |
174 done |
175 |
175 |
176 text\<open>The same two theorems, exported to locale @{text reflection}.\<close> |
176 text\<open>The same two theorems, exported to locale \<open>reflection\<close>.\<close> |
177 |
177 |
178 text\<open>Class @{text ClEx} indeed consists of reflecting ordinals...\<close> |
178 text\<open>Class \<open>ClEx\<close> indeed consists of reflecting ordinals...\<close> |
179 lemma (in reflection) ClEx_iff: |
179 lemma (in reflection) ClEx_iff: |
180 "[| y\<in>Mset(a); Cl(a); ClEx(P,a); |
180 "[| y\<in>Mset(a); Cl(a); ClEx(P,a); |
181 !!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x) |] |
181 !!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) \<longleftrightarrow> Q(a,x) |] |
182 ==> (\<exists>z. M(z) & P(<y,z>)) \<longleftrightarrow> (\<exists>z\<in>Mset(a). Q(a,<y,z>))" |
182 ==> (\<exists>z. M(z) & P(<y,z>)) \<longleftrightarrow> (\<exists>z\<in>Mset(a). Q(a,<y,z>))" |
183 apply (unfold ClEx_def FF_def F0_def M_def) |
183 apply (unfold ClEx_def FF_def F0_def M_def) |
347 "Reflects(?Cl, |
347 "Reflects(?Cl, |
348 \<lambda>x. \<exists>y. M(y) & y = Replace(x,P), |
348 \<lambda>x. \<exists>y. M(y) & y = Replace(x,P), |
349 \<lambda>a x. \<exists>y\<in>Mset(a). y = Replace(x,P))" |
349 \<lambda>a x. \<exists>y\<in>Mset(a). y = Replace(x,P))" |
350 by fast |
350 by fast |
351 |
351 |
352 text\<open>Example 4: Axiom of Choice. Possibly wrong, since @{text \<Pi>} needs |
352 text\<open>Example 4: Axiom of Choice. Possibly wrong, since \<open>\<Pi>\<close> needs |
353 to be relativized.\<close> |
353 to be relativized.\<close> |
354 schematic_goal (in reflection) |
354 schematic_goal (in reflection) |
355 "Reflects(?Cl, |
355 "Reflects(?Cl, |
356 \<lambda>A. 0\<notin>A \<longrightarrow> (\<exists>f. M(f) & f \<in> (\<Pi> X \<in> A. X)), |
356 \<lambda>A. 0\<notin>A \<longrightarrow> (\<exists>f. M(f) & f \<in> (\<Pi> X \<in> A. X)), |
357 \<lambda>a A. 0\<notin>A \<longrightarrow> (\<exists>f\<in>Mset(a). f \<in> (\<Pi> X \<in> A. X)))" |
357 \<lambda>a A. 0\<notin>A \<longrightarrow> (\<exists>f\<in>Mset(a). f \<in> (\<Pi> X \<in> A. X)))" |