author | haftmann |
Fri, 17 Jun 2005 16:12:49 +0200 | |
changeset 16417 | 9bc16273c2d4 |
parent 15764 | 250df939a1de |
child 21233 | 5a5c8ea5f66a |
permissions | -rw-r--r-- |
13505 | 1 |
(* Title: ZF/Constructible/L_axioms.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
*) |
|
13429 | 5 |
|
6 |
header {* The ZF Axioms (Except Separation) in L *} |
|
13223 | 7 |
|
16417 | 8 |
theory L_axioms imports Formula Relative Reflection MetaExists begin |
13223 | 9 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
10 |
text {* The class L satisfies the premises of locale @{text M_trivial} *} |
13223 | 11 |
|
12 |
lemma transL: "[| y\<in>x; L(x) |] ==> L(y)" |
|
13429 | 13 |
apply (insert Transset_Lset) |
14 |
apply (simp add: Transset_def L_def, blast) |
|
13223 | 15 |
done |
16 |
||
17 |
lemma nonempty: "L(0)" |
|
13429 | 18 |
apply (simp add: L_def) |
19 |
apply (blast intro: zero_in_Lset) |
|
13223 | 20 |
done |
21 |
||
13563 | 22 |
theorem upair_ax: "upair_ax(L)" |
13223 | 23 |
apply (simp add: upair_ax_def upair_def, clarify) |
13429 | 24 |
apply (rule_tac x="{x,y}" in rexI) |
25 |
apply (simp_all add: doubleton_in_L) |
|
13223 | 26 |
done |
27 |
||
13563 | 28 |
theorem Union_ax: "Union_ax(L)" |
13223 | 29 |
apply (simp add: Union_ax_def big_union_def, clarify) |
13429 | 30 |
apply (rule_tac x="Union(x)" in rexI) |
31 |
apply (simp_all add: Union_in_L, auto) |
|
32 |
apply (blast intro: transL) |
|
13223 | 33 |
done |
34 |
||
13563 | 35 |
theorem power_ax: "power_ax(L)" |
13223 | 36 |
apply (simp add: power_ax_def powerset_def Relative.subset_def, clarify) |
13429 | 37 |
apply (rule_tac x="{y \<in> Pow(x). L(y)}" in rexI) |
13299 | 38 |
apply (simp_all add: LPow_in_L, auto) |
13429 | 39 |
apply (blast intro: transL) |
13223 | 40 |
done |
41 |
||
13563 | 42 |
text{*We don't actually need @{term L} to satisfy the foundation axiom.*} |
43 |
theorem foundation_ax: "foundation_ax(L)" |
|
44 |
apply (simp add: foundation_ax_def) |
|
45 |
apply (rule rallI) |
|
46 |
apply (cut_tac A=x in foundation) |
|
47 |
apply (blast intro: transL) |
|
48 |
done |
|
49 |
||
13506 | 50 |
subsection{*For L to satisfy Replacement *} |
13223 | 51 |
|
52 |
(*Can't move these to Formula unless the definition of univalent is moved |
|
53 |
there too!*) |
|
54 |
||
55 |
lemma LReplace_in_Lset: |
|
13429 | 56 |
"[|X \<in> Lset(i); univalent(L,X,Q); Ord(i)|] |
13223 | 57 |
==> \<exists>j. Ord(j) & Replace(X, %x y. Q(x,y) & L(y)) \<subseteq> Lset(j)" |
13429 | 58 |
apply (rule_tac x="\<Union>y \<in> Replace(X, %x y. Q(x,y) & L(y)). succ(lrank(y))" |
13223 | 59 |
in exI) |
60 |
apply simp |
|
13429 | 61 |
apply clarify |
62 |
apply (rule_tac a=x in UN_I) |
|
63 |
apply (simp_all add: Replace_iff univalent_def) |
|
64 |
apply (blast dest: transL L_I) |
|
13223 | 65 |
done |
66 |
||
13429 | 67 |
lemma LReplace_in_L: |
68 |
"[|L(X); univalent(L,X,Q)|] |
|
13223 | 69 |
==> \<exists>Y. L(Y) & Replace(X, %x y. Q(x,y) & L(y)) \<subseteq> Y" |
13429 | 70 |
apply (drule L_D, clarify) |
13223 | 71 |
apply (drule LReplace_in_Lset, assumption+) |
72 |
apply (blast intro: L_I Lset_in_Lset_succ) |
|
73 |
done |
|
74 |
||
13563 | 75 |
theorem replacement: "replacement(L,P)" |
13223 | 76 |
apply (simp add: replacement_def, clarify) |
13429 | 77 |
apply (frule LReplace_in_L, assumption+, clarify) |
78 |
apply (rule_tac x=Y in rexI) |
|
79 |
apply (simp_all add: Replace_iff univalent_def, blast) |
|
13223 | 80 |
done |
81 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
82 |
subsection{*Instantiating the locale @{text M_trivial}*} |
13363 | 83 |
text{*No instances of Separation yet.*} |
13291 | 84 |
|
85 |
lemma Lset_mono_le: "mono_le_subset(Lset)" |
|
13429 | 86 |
by (simp add: mono_le_subset_def le_imp_subset Lset_mono) |
13291 | 87 |
|
88 |
lemma Lset_cont: "cont_Ord(Lset)" |
|
13429 | 89 |
by (simp add: cont_Ord_def Limit_Lset_eq OUnion_def Limit_is_Ord) |
13291 | 90 |
|
13428 | 91 |
lemmas L_nat = Ord_in_L [OF Ord_nat] |
13291 | 92 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
93 |
theorem M_trivial_L: "PROP M_trivial(L)" |
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
94 |
apply (rule M_trivial.intro) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13566
diff
changeset
|
95 |
apply (erule (1) transL) |
13428 | 96 |
apply (rule upair_ax) |
97 |
apply (rule Union_ax) |
|
98 |
apply (rule power_ax) |
|
99 |
apply (rule replacement) |
|
100 |
apply (rule L_nat) |
|
101 |
done |
|
13291 | 102 |
|
15696 | 103 |
interpretation M_trivial ["L"] by (rule M_trivial_L) |
104 |
||
15764 | 105 |
(* Replaces the following declarations... |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
106 |
lemmas rall_abs = M_trivial.rall_abs [OF M_trivial_L] |
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
107 |
and rex_abs = M_trivial.rex_abs [OF M_trivial_L] |
15764 | 108 |
... |
13429 | 109 |
declare rall_abs [simp] |
110 |
declare rex_abs [simp] |
|
15764 | 111 |
...and dozens of similar ones. |
15696 | 112 |
*) |
13291 | 113 |
|
114 |
subsection{*Instantiation of the locale @{text reflection}*} |
|
115 |
||
116 |
text{*instances of locale constants*} |
|
117 |
constdefs |
|
118 |
L_F0 :: "[i=>o,i] => i" |
|
14171
0cab06e3bbd0
Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents:
13807
diff
changeset
|
119 |
"L_F0(P,y) == \<mu> b. (\<exists>z. L(z) \<and> P(<y,z>)) --> (\<exists>z\<in>Lset(b). P(<y,z>))" |
13291 | 120 |
|
121 |
L_FF :: "[i=>o,i] => i" |
|
122 |
"L_FF(P) == \<lambda>a. \<Union>y\<in>Lset(a). L_F0(P,y)" |
|
123 |
||
124 |
L_ClEx :: "[i=>o,i] => o" |
|
125 |
"L_ClEx(P) == \<lambda>a. Limit(a) \<and> normalize(L_FF(P),a) = a" |
|
126 |
||
127 |
||
13314 | 128 |
text{*We must use the meta-existential quantifier; otherwise the reflection |
13429 | 129 |
terms become enormous!*} |
13314 | 130 |
constdefs |
131 |
L_Reflects :: "[i=>o,[i,i]=>o] => prop" ("(3REFLECTS/ [_,/ _])") |
|
132 |
"REFLECTS[P,Q] == (??Cl. Closed_Unbounded(Cl) & |
|
133 |
(\<forall>a. Cl(a) --> (\<forall>x \<in> Lset(a). P(x) <-> Q(a,x))))" |
|
13291 | 134 |
|
135 |
||
13314 | 136 |
theorem Triv_reflection: |
137 |
"REFLECTS[P, \<lambda>a x. P(x)]" |
|
13429 | 138 |
apply (simp add: L_Reflects_def) |
139 |
apply (rule meta_exI) |
|
140 |
apply (rule Closed_Unbounded_Ord) |
|
13314 | 141 |
done |
142 |
||
143 |
theorem Not_reflection: |
|
144 |
"REFLECTS[P,Q] ==> REFLECTS[\<lambda>x. ~P(x), \<lambda>a x. ~Q(a,x)]" |
|
13429 | 145 |
apply (unfold L_Reflects_def) |
146 |
apply (erule meta_exE) |
|
147 |
apply (rule_tac x=Cl in meta_exI, simp) |
|
13314 | 148 |
done |
149 |
||
150 |
theorem And_reflection: |
|
13429 | 151 |
"[| REFLECTS[P,Q]; REFLECTS[P',Q'] |] |
13314 | 152 |
==> REFLECTS[\<lambda>x. P(x) \<and> P'(x), \<lambda>a x. Q(a,x) \<and> Q'(a,x)]" |
13429 | 153 |
apply (unfold L_Reflects_def) |
154 |
apply (elim meta_exE) |
|
155 |
apply (rule_tac x="\<lambda>a. Cl(a) \<and> Cla(a)" in meta_exI) |
|
156 |
apply (simp add: Closed_Unbounded_Int, blast) |
|
13314 | 157 |
done |
158 |
||
159 |
theorem Or_reflection: |
|
13429 | 160 |
"[| REFLECTS[P,Q]; REFLECTS[P',Q'] |] |
13314 | 161 |
==> REFLECTS[\<lambda>x. P(x) \<or> P'(x), \<lambda>a x. Q(a,x) \<or> Q'(a,x)]" |
13429 | 162 |
apply (unfold L_Reflects_def) |
163 |
apply (elim meta_exE) |
|
164 |
apply (rule_tac x="\<lambda>a. Cl(a) \<and> Cla(a)" in meta_exI) |
|
165 |
apply (simp add: Closed_Unbounded_Int, blast) |
|
13314 | 166 |
done |
167 |
||
168 |
theorem Imp_reflection: |
|
13429 | 169 |
"[| REFLECTS[P,Q]; REFLECTS[P',Q'] |] |
13314 | 170 |
==> REFLECTS[\<lambda>x. P(x) --> P'(x), \<lambda>a x. Q(a,x) --> Q'(a,x)]" |
13429 | 171 |
apply (unfold L_Reflects_def) |
172 |
apply (elim meta_exE) |
|
173 |
apply (rule_tac x="\<lambda>a. Cl(a) \<and> Cla(a)" in meta_exI) |
|
174 |
apply (simp add: Closed_Unbounded_Int, blast) |
|
13314 | 175 |
done |
176 |
||
177 |
theorem Iff_reflection: |
|
13429 | 178 |
"[| REFLECTS[P,Q]; REFLECTS[P',Q'] |] |
13314 | 179 |
==> REFLECTS[\<lambda>x. P(x) <-> P'(x), \<lambda>a x. Q(a,x) <-> Q'(a,x)]" |
13429 | 180 |
apply (unfold L_Reflects_def) |
181 |
apply (elim meta_exE) |
|
182 |
apply (rule_tac x="\<lambda>a. Cl(a) \<and> Cla(a)" in meta_exI) |
|
183 |
apply (simp add: Closed_Unbounded_Int, blast) |
|
13314 | 184 |
done |
185 |
||
186 |
||
13434 | 187 |
lemma reflection_Lset: "reflection(Lset)" |
13651
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
188 |
by (blast intro: reflection.intro Lset_mono_le Lset_cont |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
189 |
Formula.Pair_in_LLimit)+ |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
190 |
|
13434 | 191 |
|
13314 | 192 |
theorem Ex_reflection: |
193 |
"REFLECTS[\<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
|
194 |
==> REFLECTS[\<lambda>x. \<exists>z. L(z) \<and> P(x,z), \<lambda>a x. \<exists>z\<in>Lset(a). Q(a,x,z)]" |
|
13429 | 195 |
apply (unfold L_Reflects_def L_ClEx_def L_FF_def L_F0_def L_def) |
196 |
apply (elim meta_exE) |
|
13314 | 197 |
apply (rule meta_exI) |
13434 | 198 |
apply (erule reflection.Ex_reflection [OF reflection_Lset]) |
13291 | 199 |
done |
200 |
||
13314 | 201 |
theorem All_reflection: |
202 |
"REFLECTS[\<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
|
13429 | 203 |
==> REFLECTS[\<lambda>x. \<forall>z. L(z) --> P(x,z), \<lambda>a x. \<forall>z\<in>Lset(a). Q(a,x,z)]" |
204 |
apply (unfold L_Reflects_def L_ClEx_def L_FF_def L_F0_def L_def) |
|
205 |
apply (elim meta_exE) |
|
13314 | 206 |
apply (rule meta_exI) |
13434 | 207 |
apply (erule reflection.All_reflection [OF reflection_Lset]) |
13291 | 208 |
done |
209 |
||
13314 | 210 |
theorem Rex_reflection: |
211 |
"REFLECTS[ \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
|
212 |
==> REFLECTS[\<lambda>x. \<exists>z[L]. P(x,z), \<lambda>a x. \<exists>z\<in>Lset(a). Q(a,x,z)]" |
|
13429 | 213 |
apply (unfold rex_def) |
13314 | 214 |
apply (intro And_reflection Ex_reflection, assumption) |
215 |
done |
|
13291 | 216 |
|
13314 | 217 |
theorem Rall_reflection: |
218 |
"REFLECTS[\<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
|
13429 | 219 |
==> REFLECTS[\<lambda>x. \<forall>z[L]. P(x,z), \<lambda>a x. \<forall>z\<in>Lset(a). Q(a,x,z)]" |
220 |
apply (unfold rall_def) |
|
13314 | 221 |
apply (intro Imp_reflection All_reflection, assumption) |
222 |
done |
|
223 |
||
13440 | 224 |
text{*This version handles an alternative form of the bounded quantifier |
225 |
in the second argument of @{text REFLECTS}.*} |
|
226 |
theorem Rex_reflection': |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
227 |
"REFLECTS[\<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
228 |
==> REFLECTS[\<lambda>x. \<exists>z[L]. P(x,z), \<lambda>a x. \<exists>z[##Lset(a)]. Q(a,x,z)]" |
13440 | 229 |
apply (unfold setclass_def rex_def) |
230 |
apply (erule Rex_reflection [unfolded rex_def Bex_def]) |
|
231 |
done |
|
232 |
||
233 |
text{*As above.*} |
|
234 |
theorem Rall_reflection': |
|
235 |
"REFLECTS[\<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
236 |
==> REFLECTS[\<lambda>x. \<forall>z[L]. P(x,z), \<lambda>a x. \<forall>z[##Lset(a)]. Q(a,x,z)]" |
13440 | 237 |
apply (unfold setclass_def rall_def) |
238 |
apply (erule Rall_reflection [unfolded rall_def Ball_def]) |
|
239 |
done |
|
240 |
||
13429 | 241 |
lemmas FOL_reflections = |
13314 | 242 |
Triv_reflection Not_reflection And_reflection Or_reflection |
243 |
Imp_reflection Iff_reflection Ex_reflection All_reflection |
|
13440 | 244 |
Rex_reflection Rall_reflection Rex_reflection' Rall_reflection' |
13291 | 245 |
|
246 |
lemma ReflectsD: |
|
13429 | 247 |
"[|REFLECTS[P,Q]; Ord(i)|] |
13291 | 248 |
==> \<exists>j. i<j & (\<forall>x \<in> Lset(j). P(x) <-> Q(j,x))" |
13429 | 249 |
apply (unfold L_Reflects_def Closed_Unbounded_def) |
250 |
apply (elim meta_exE, clarify) |
|
251 |
apply (blast dest!: UnboundedD) |
|
13291 | 252 |
done |
253 |
||
254 |
lemma ReflectsE: |
|
13314 | 255 |
"[| REFLECTS[P,Q]; Ord(i); |
13291 | 256 |
!!j. [|i<j; \<forall>x \<in> Lset(j). P(x) <-> Q(j,x)|] ==> R |] |
257 |
==> R" |
|
15764 | 258 |
by (drule ReflectsD, assumption, blast) |
13291 | 259 |
|
13428 | 260 |
lemma Collect_mem_eq: "{x\<in>A. x\<in>B} = A \<inter> B" |
13291 | 261 |
by blast |
262 |
||
263 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
264 |
subsection{*Internalized Formulas for some Set-Theoretic Concepts*} |
13298 | 265 |
|
13306 | 266 |
subsubsection{*Some numbers to help write de Bruijn indices*} |
267 |
||
268 |
syntax |
|
269 |
"3" :: i ("3") |
|
270 |
"4" :: i ("4") |
|
271 |
"5" :: i ("5") |
|
272 |
"6" :: i ("6") |
|
273 |
"7" :: i ("7") |
|
274 |
"8" :: i ("8") |
|
275 |
"9" :: i ("9") |
|
276 |
||
277 |
translations |
|
278 |
"3" == "succ(2)" |
|
279 |
"4" == "succ(3)" |
|
280 |
"5" == "succ(4)" |
|
281 |
"6" == "succ(5)" |
|
282 |
"7" == "succ(6)" |
|
283 |
"8" == "succ(7)" |
|
284 |
"9" == "succ(8)" |
|
285 |
||
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
286 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
287 |
subsubsection{*The Empty Set, Internalized*} |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
288 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
289 |
constdefs empty_fm :: "i=>i" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
290 |
"empty_fm(x) == Forall(Neg(Member(0,succ(x))))" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
291 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
292 |
lemma empty_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
293 |
"x \<in> nat ==> empty_fm(x) \<in> formula" |
13429 | 294 |
by (simp add: empty_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
295 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
296 |
lemma sats_empty_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
297 |
"[| x \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
298 |
==> sats(A, empty_fm(x), env) <-> empty(##A, nth(x,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
299 |
by (simp add: empty_fm_def empty_def) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
300 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
301 |
lemma empty_iff_sats: |
13429 | 302 |
"[| nth(i,env) = x; nth(j,env) = y; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
303 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
304 |
==> empty(##A, x) <-> sats(A, empty_fm(i), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
305 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
306 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
307 |
theorem empty_reflection: |
13429 | 308 |
"REFLECTS[\<lambda>x. empty(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
309 |
\<lambda>i x. empty(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
310 |
apply (simp only: empty_def) |
13429 | 311 |
apply (intro FOL_reflections) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
312 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
313 |
|
13385
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
314 |
text{*Not used. But maybe useful?*} |
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
315 |
lemma Transset_sats_empty_fm_eq_0: |
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
316 |
"[| n \<in> nat; env \<in> list(A); Transset(A)|] |
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
317 |
==> sats(A, empty_fm(n), env) <-> nth(n,env) = 0" |
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
318 |
apply (simp add: empty_fm_def empty_def Transset_def, auto) |
13429 | 319 |
apply (case_tac "n < length(env)") |
320 |
apply (frule nth_type, assumption+, blast) |
|
321 |
apply (simp_all add: not_lt_iff_le nth_eq_0) |
|
13385
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
322 |
done |
31df66ca0780
Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents:
13363
diff
changeset
|
323 |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
324 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
325 |
subsubsection{*Unordered Pairs, Internalized*} |
13298 | 326 |
|
327 |
constdefs upair_fm :: "[i,i,i]=>i" |
|
13429 | 328 |
"upair_fm(x,y,z) == |
329 |
And(Member(x,z), |
|
13298 | 330 |
And(Member(y,z), |
13429 | 331 |
Forall(Implies(Member(0,succ(z)), |
13298 | 332 |
Or(Equal(0,succ(x)), Equal(0,succ(y)))))))" |
333 |
||
334 |
lemma upair_type [TC]: |
|
335 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> upair_fm(x,y,z) \<in> formula" |
|
13429 | 336 |
by (simp add: upair_fm_def) |
13298 | 337 |
|
338 |
lemma sats_upair_fm [simp]: |
|
339 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 340 |
==> sats(A, upair_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
341 |
upair(##A, nth(x,env), nth(y,env), nth(z,env))" |
13298 | 342 |
by (simp add: upair_fm_def upair_def) |
343 |
||
344 |
lemma upair_iff_sats: |
|
13429 | 345 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13298 | 346 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
347 |
==> upair(##A, x, y, z) <-> sats(A, upair_fm(i,j,k), env)" |
13298 | 348 |
by (simp add: sats_upair_fm) |
349 |
||
350 |
text{*Useful? At least it refers to "real" unordered pairs*} |
|
351 |
lemma sats_upair_fm2 [simp]: |
|
352 |
"[| x \<in> nat; y \<in> nat; z < length(env); env \<in> list(A); Transset(A)|] |
|
13429 | 353 |
==> sats(A, upair_fm(x,y,z), env) <-> |
13298 | 354 |
nth(z,env) = {nth(x,env), nth(y,env)}" |
13429 | 355 |
apply (frule lt_length_in_nat, assumption) |
356 |
apply (simp add: upair_fm_def Transset_def, auto) |
|
357 |
apply (blast intro: nth_type) |
|
13298 | 358 |
done |
359 |
||
13314 | 360 |
theorem upair_reflection: |
13429 | 361 |
"REFLECTS[\<lambda>x. upair(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
362 |
\<lambda>i x. upair(##Lset(i),f(x),g(x),h(x))]" |
13314 | 363 |
apply (simp add: upair_def) |
13429 | 364 |
apply (intro FOL_reflections) |
13314 | 365 |
done |
13306 | 366 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
367 |
subsubsection{*Ordered pairs, Internalized*} |
13298 | 368 |
|
369 |
constdefs pair_fm :: "[i,i,i]=>i" |
|
13429 | 370 |
"pair_fm(x,y,z) == |
13298 | 371 |
Exists(And(upair_fm(succ(x),succ(x),0), |
372 |
Exists(And(upair_fm(succ(succ(x)),succ(succ(y)),0), |
|
373 |
upair_fm(1,0,succ(succ(z)))))))" |
|
374 |
||
375 |
lemma pair_type [TC]: |
|
376 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> pair_fm(x,y,z) \<in> formula" |
|
13429 | 377 |
by (simp add: pair_fm_def) |
13298 | 378 |
|
379 |
lemma sats_pair_fm [simp]: |
|
380 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 381 |
==> sats(A, pair_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
382 |
pair(##A, nth(x,env), nth(y,env), nth(z,env))" |
13298 | 383 |
by (simp add: pair_fm_def pair_def) |
384 |
||
385 |
lemma pair_iff_sats: |
|
13429 | 386 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13298 | 387 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
388 |
==> pair(##A, x, y, z) <-> sats(A, pair_fm(i,j,k), env)" |
13298 | 389 |
by (simp add: sats_pair_fm) |
390 |
||
13314 | 391 |
theorem pair_reflection: |
13429 | 392 |
"REFLECTS[\<lambda>x. pair(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
393 |
\<lambda>i x. pair(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
394 |
apply (simp only: pair_def) |
13429 | 395 |
apply (intro FOL_reflections upair_reflection) |
13314 | 396 |
done |
13306 | 397 |
|
398 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
399 |
subsubsection{*Binary Unions, Internalized*} |
13298 | 400 |
|
13306 | 401 |
constdefs union_fm :: "[i,i,i]=>i" |
13429 | 402 |
"union_fm(x,y,z) == |
13306 | 403 |
Forall(Iff(Member(0,succ(z)), |
404 |
Or(Member(0,succ(x)),Member(0,succ(y)))))" |
|
405 |
||
406 |
lemma union_type [TC]: |
|
407 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> union_fm(x,y,z) \<in> formula" |
|
13429 | 408 |
by (simp add: union_fm_def) |
13306 | 409 |
|
410 |
lemma sats_union_fm [simp]: |
|
411 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 412 |
==> sats(A, union_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
413 |
union(##A, nth(x,env), nth(y,env), nth(z,env))" |
13306 | 414 |
by (simp add: union_fm_def union_def) |
415 |
||
416 |
lemma union_iff_sats: |
|
13429 | 417 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13306 | 418 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
419 |
==> union(##A, x, y, z) <-> sats(A, union_fm(i,j,k), env)" |
13306 | 420 |
by (simp add: sats_union_fm) |
13298 | 421 |
|
13314 | 422 |
theorem union_reflection: |
13429 | 423 |
"REFLECTS[\<lambda>x. union(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
424 |
\<lambda>i x. union(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
425 |
apply (simp only: union_def) |
13429 | 426 |
apply (intro FOL_reflections) |
13314 | 427 |
done |
13306 | 428 |
|
13298 | 429 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
430 |
subsubsection{*Set ``Cons,'' Internalized*} |
13306 | 431 |
|
432 |
constdefs cons_fm :: "[i,i,i]=>i" |
|
13429 | 433 |
"cons_fm(x,y,z) == |
13306 | 434 |
Exists(And(upair_fm(succ(x),succ(x),0), |
435 |
union_fm(0,succ(y),succ(z))))" |
|
13298 | 436 |
|
437 |
||
13306 | 438 |
lemma cons_type [TC]: |
439 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> cons_fm(x,y,z) \<in> formula" |
|
13429 | 440 |
by (simp add: cons_fm_def) |
13306 | 441 |
|
442 |
lemma sats_cons_fm [simp]: |
|
443 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 444 |
==> sats(A, cons_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
445 |
is_cons(##A, nth(x,env), nth(y,env), nth(z,env))" |
13306 | 446 |
by (simp add: cons_fm_def is_cons_def) |
447 |
||
448 |
lemma cons_iff_sats: |
|
13429 | 449 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13306 | 450 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
451 |
==> is_cons(##A, x, y, z) <-> sats(A, cons_fm(i,j,k), env)" |
13306 | 452 |
by simp |
453 |
||
13314 | 454 |
theorem cons_reflection: |
13429 | 455 |
"REFLECTS[\<lambda>x. is_cons(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
456 |
\<lambda>i x. is_cons(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
457 |
apply (simp only: is_cons_def) |
13429 | 458 |
apply (intro FOL_reflections upair_reflection union_reflection) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
459 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
460 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
461 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
462 |
subsubsection{*Successor Function, Internalized*} |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
463 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
464 |
constdefs succ_fm :: "[i,i]=>i" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
465 |
"succ_fm(x,y) == cons_fm(x,x,y)" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
466 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
467 |
lemma succ_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
468 |
"[| x \<in> nat; y \<in> nat |] ==> succ_fm(x,y) \<in> formula" |
13429 | 469 |
by (simp add: succ_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
470 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
471 |
lemma sats_succ_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
472 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
13429 | 473 |
==> sats(A, succ_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
474 |
successor(##A, nth(x,env), nth(y,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
475 |
by (simp add: succ_fm_def successor_def) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
476 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
477 |
lemma successor_iff_sats: |
13429 | 478 |
"[| nth(i,env) = x; nth(j,env) = y; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
479 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
480 |
==> successor(##A, x, y) <-> sats(A, succ_fm(i,j), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
481 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
482 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
483 |
theorem successor_reflection: |
13429 | 484 |
"REFLECTS[\<lambda>x. successor(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
485 |
\<lambda>i x. successor(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
486 |
apply (simp only: successor_def) |
13429 | 487 |
apply (intro cons_reflection) |
13314 | 488 |
done |
13298 | 489 |
|
490 |
||
13363 | 491 |
subsubsection{*The Number 1, Internalized*} |
492 |
||
493 |
(* "number1(M,a) == (\<exists>x[M]. empty(M,x) & successor(M,x,a))" *) |
|
494 |
constdefs number1_fm :: "i=>i" |
|
495 |
"number1_fm(a) == Exists(And(empty_fm(0), succ_fm(0,succ(a))))" |
|
496 |
||
497 |
lemma number1_type [TC]: |
|
498 |
"x \<in> nat ==> number1_fm(x) \<in> formula" |
|
13429 | 499 |
by (simp add: number1_fm_def) |
13363 | 500 |
|
501 |
lemma sats_number1_fm [simp]: |
|
502 |
"[| x \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
503 |
==> sats(A, number1_fm(x), env) <-> number1(##A, nth(x,env))" |
13363 | 504 |
by (simp add: number1_fm_def number1_def) |
505 |
||
506 |
lemma number1_iff_sats: |
|
13429 | 507 |
"[| nth(i,env) = x; nth(j,env) = y; |
13363 | 508 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
509 |
==> number1(##A, x) <-> sats(A, number1_fm(i), env)" |
13363 | 510 |
by simp |
511 |
||
512 |
theorem number1_reflection: |
|
13429 | 513 |
"REFLECTS[\<lambda>x. number1(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
514 |
\<lambda>i x. number1(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
515 |
apply (simp only: number1_def) |
13363 | 516 |
apply (intro FOL_reflections empty_reflection successor_reflection) |
517 |
done |
|
518 |
||
519 |
||
13352 | 520 |
subsubsection{*Big Union, Internalized*} |
13306 | 521 |
|
13352 | 522 |
(* "big_union(M,A,z) == \<forall>x[M]. x \<in> z <-> (\<exists>y[M]. y\<in>A & x \<in> y)" *) |
523 |
constdefs big_union_fm :: "[i,i]=>i" |
|
13429 | 524 |
"big_union_fm(A,z) == |
13352 | 525 |
Forall(Iff(Member(0,succ(z)), |
526 |
Exists(And(Member(0,succ(succ(A))), Member(1,0)))))" |
|
13298 | 527 |
|
13352 | 528 |
lemma big_union_type [TC]: |
529 |
"[| x \<in> nat; y \<in> nat |] ==> big_union_fm(x,y) \<in> formula" |
|
13429 | 530 |
by (simp add: big_union_fm_def) |
13306 | 531 |
|
13352 | 532 |
lemma sats_big_union_fm [simp]: |
533 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
|
13429 | 534 |
==> sats(A, big_union_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
535 |
big_union(##A, nth(x,env), nth(y,env))" |
13352 | 536 |
by (simp add: big_union_fm_def big_union_def) |
13306 | 537 |
|
13352 | 538 |
lemma big_union_iff_sats: |
13429 | 539 |
"[| nth(i,env) = x; nth(j,env) = y; |
13352 | 540 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
541 |
==> big_union(##A, x, y) <-> sats(A, big_union_fm(i,j), env)" |
13306 | 542 |
by simp |
543 |
||
13352 | 544 |
theorem big_union_reflection: |
13429 | 545 |
"REFLECTS[\<lambda>x. big_union(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
546 |
\<lambda>i x. big_union(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
547 |
apply (simp only: big_union_def) |
13429 | 548 |
apply (intro FOL_reflections) |
13314 | 549 |
done |
13298 | 550 |
|
551 |
||
13306 | 552 |
subsubsection{*Variants of Satisfaction Definitions for Ordinals, etc.*} |
553 |
||
13651
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
554 |
text{*The @{text sats} theorems below are standard versions of the ones proved |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
555 |
in theory @{text Formula}. They relate elements of type @{term formula} to |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
556 |
relativized concepts such as @{term subset} or @{term ordinal} rather than to |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
557 |
real concepts such as @{term Ord}. Now that we have instantiated the locale |
ac80e101306a
Cosmetic changes suggested by writing the paper. Deleted some
paulson
parents:
13634
diff
changeset
|
558 |
@{text M_trivial}, we no longer require the earlier versions.*} |
13306 | 559 |
|
560 |
lemma sats_subset_fm': |
|
561 |
"[|x \<in> nat; y \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
562 |
==> sats(A, subset_fm(x,y), env) <-> subset(##A, nth(x,env), nth(y,env))" |
13429 | 563 |
by (simp add: subset_fm_def Relative.subset_def) |
13298 | 564 |
|
13314 | 565 |
theorem subset_reflection: |
13429 | 566 |
"REFLECTS[\<lambda>x. subset(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
567 |
\<lambda>i x. subset(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
568 |
apply (simp only: Relative.subset_def) |
13429 | 569 |
apply (intro FOL_reflections) |
13314 | 570 |
done |
13306 | 571 |
|
572 |
lemma sats_transset_fm': |
|
573 |
"[|x \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
574 |
==> sats(A, transset_fm(x), env) <-> transitive_set(##A, nth(x,env))" |
13429 | 575 |
by (simp add: sats_subset_fm' transset_fm_def transitive_set_def) |
13298 | 576 |
|
13314 | 577 |
theorem transitive_set_reflection: |
578 |
"REFLECTS[\<lambda>x. transitive_set(L,f(x)), |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
579 |
\<lambda>i x. transitive_set(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
580 |
apply (simp only: transitive_set_def) |
13429 | 581 |
apply (intro FOL_reflections subset_reflection) |
13314 | 582 |
done |
13306 | 583 |
|
584 |
lemma sats_ordinal_fm': |
|
585 |
"[|x \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
586 |
==> sats(A, ordinal_fm(x), env) <-> ordinal(##A,nth(x,env))" |
13306 | 587 |
by (simp add: sats_transset_fm' ordinal_fm_def ordinal_def) |
588 |
||
589 |
lemma ordinal_iff_sats: |
|
590 |
"[| nth(i,env) = x; i \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
591 |
==> ordinal(##A, x) <-> sats(A, ordinal_fm(i), env)" |
13306 | 592 |
by (simp add: sats_ordinal_fm') |
593 |
||
13314 | 594 |
theorem ordinal_reflection: |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
595 |
"REFLECTS[\<lambda>x. ordinal(L,f(x)), \<lambda>i x. ordinal(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
596 |
apply (simp only: ordinal_def) |
13429 | 597 |
apply (intro FOL_reflections transitive_set_reflection) |
13314 | 598 |
done |
13298 | 599 |
|
600 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
601 |
subsubsection{*Membership Relation, Internalized*} |
13298 | 602 |
|
13306 | 603 |
constdefs Memrel_fm :: "[i,i]=>i" |
13429 | 604 |
"Memrel_fm(A,r) == |
13306 | 605 |
Forall(Iff(Member(0,succ(r)), |
606 |
Exists(And(Member(0,succ(succ(A))), |
|
607 |
Exists(And(Member(0,succ(succ(succ(A)))), |
|
608 |
And(Member(1,0), |
|
609 |
pair_fm(1,0,2))))))))" |
|
610 |
||
611 |
lemma Memrel_type [TC]: |
|
612 |
"[| x \<in> nat; y \<in> nat |] ==> Memrel_fm(x,y) \<in> formula" |
|
13429 | 613 |
by (simp add: Memrel_fm_def) |
13298 | 614 |
|
13306 | 615 |
lemma sats_Memrel_fm [simp]: |
616 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
|
13429 | 617 |
==> sats(A, Memrel_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
618 |
membership(##A, nth(x,env), nth(y,env))" |
13306 | 619 |
by (simp add: Memrel_fm_def membership_def) |
13298 | 620 |
|
13306 | 621 |
lemma Memrel_iff_sats: |
13429 | 622 |
"[| nth(i,env) = x; nth(j,env) = y; |
13306 | 623 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
624 |
==> membership(##A, x, y) <-> sats(A, Memrel_fm(i,j), env)" |
13306 | 625 |
by simp |
13304 | 626 |
|
13314 | 627 |
theorem membership_reflection: |
13429 | 628 |
"REFLECTS[\<lambda>x. membership(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
629 |
\<lambda>i x. membership(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
630 |
apply (simp only: membership_def) |
13429 | 631 |
apply (intro FOL_reflections pair_reflection) |
13314 | 632 |
done |
13304 | 633 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
634 |
subsubsection{*Predecessor Set, Internalized*} |
13304 | 635 |
|
13306 | 636 |
constdefs pred_set_fm :: "[i,i,i,i]=>i" |
13429 | 637 |
"pred_set_fm(A,x,r,B) == |
13306 | 638 |
Forall(Iff(Member(0,succ(B)), |
639 |
Exists(And(Member(0,succ(succ(r))), |
|
640 |
And(Member(1,succ(succ(A))), |
|
641 |
pair_fm(1,succ(succ(x)),0))))))" |
|
642 |
||
643 |
||
644 |
lemma pred_set_type [TC]: |
|
13429 | 645 |
"[| A \<in> nat; x \<in> nat; r \<in> nat; B \<in> nat |] |
13306 | 646 |
==> pred_set_fm(A,x,r,B) \<in> formula" |
13429 | 647 |
by (simp add: pred_set_fm_def) |
13304 | 648 |
|
13306 | 649 |
lemma sats_pred_set_fm [simp]: |
650 |
"[| U \<in> nat; x \<in> nat; r \<in> nat; B \<in> nat; env \<in> list(A)|] |
|
13429 | 651 |
==> sats(A, pred_set_fm(U,x,r,B), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
652 |
pred_set(##A, nth(U,env), nth(x,env), nth(r,env), nth(B,env))" |
13306 | 653 |
by (simp add: pred_set_fm_def pred_set_def) |
654 |
||
655 |
lemma pred_set_iff_sats: |
|
13429 | 656 |
"[| nth(i,env) = U; nth(j,env) = x; nth(k,env) = r; nth(l,env) = B; |
13306 | 657 |
i \<in> nat; j \<in> nat; k \<in> nat; l \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
658 |
==> pred_set(##A,U,x,r,B) <-> sats(A, pred_set_fm(i,j,k,l), env)" |
13306 | 659 |
by (simp add: sats_pred_set_fm) |
660 |
||
13314 | 661 |
theorem pred_set_reflection: |
13429 | 662 |
"REFLECTS[\<lambda>x. pred_set(L,f(x),g(x),h(x),b(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
663 |
\<lambda>i x. pred_set(##Lset(i),f(x),g(x),h(x),b(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
664 |
apply (simp only: pred_set_def) |
13429 | 665 |
apply (intro FOL_reflections pair_reflection) |
13314 | 666 |
done |
13304 | 667 |
|
668 |
||
13298 | 669 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
670 |
subsubsection{*Domain of a Relation, Internalized*} |
13306 | 671 |
|
13429 | 672 |
(* "is_domain(M,r,z) == |
673 |
\<forall>x[M]. (x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. pair(M,x,y,w))))" *) |
|
13306 | 674 |
constdefs domain_fm :: "[i,i]=>i" |
13429 | 675 |
"domain_fm(r,z) == |
13306 | 676 |
Forall(Iff(Member(0,succ(z)), |
677 |
Exists(And(Member(0,succ(succ(r))), |
|
678 |
Exists(pair_fm(2,0,1))))))" |
|
679 |
||
680 |
lemma domain_type [TC]: |
|
681 |
"[| x \<in> nat; y \<in> nat |] ==> domain_fm(x,y) \<in> formula" |
|
13429 | 682 |
by (simp add: domain_fm_def) |
13306 | 683 |
|
684 |
lemma sats_domain_fm [simp]: |
|
685 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
|
13429 | 686 |
==> sats(A, domain_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
687 |
is_domain(##A, nth(x,env), nth(y,env))" |
13306 | 688 |
by (simp add: domain_fm_def is_domain_def) |
689 |
||
690 |
lemma domain_iff_sats: |
|
13429 | 691 |
"[| nth(i,env) = x; nth(j,env) = y; |
13306 | 692 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
693 |
==> is_domain(##A, x, y) <-> sats(A, domain_fm(i,j), env)" |
13306 | 694 |
by simp |
695 |
||
13314 | 696 |
theorem domain_reflection: |
13429 | 697 |
"REFLECTS[\<lambda>x. is_domain(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
698 |
\<lambda>i x. is_domain(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
699 |
apply (simp only: is_domain_def) |
13429 | 700 |
apply (intro FOL_reflections pair_reflection) |
13314 | 701 |
done |
13306 | 702 |
|
703 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
704 |
subsubsection{*Range of a Relation, Internalized*} |
13306 | 705 |
|
13429 | 706 |
(* "is_range(M,r,z) == |
707 |
\<forall>y[M]. (y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. pair(M,x,y,w))))" *) |
|
13306 | 708 |
constdefs range_fm :: "[i,i]=>i" |
13429 | 709 |
"range_fm(r,z) == |
13306 | 710 |
Forall(Iff(Member(0,succ(z)), |
711 |
Exists(And(Member(0,succ(succ(r))), |
|
712 |
Exists(pair_fm(0,2,1))))))" |
|
713 |
||
714 |
lemma range_type [TC]: |
|
715 |
"[| x \<in> nat; y \<in> nat |] ==> range_fm(x,y) \<in> formula" |
|
13429 | 716 |
by (simp add: range_fm_def) |
13306 | 717 |
|
718 |
lemma sats_range_fm [simp]: |
|
719 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
|
13429 | 720 |
==> sats(A, range_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
721 |
is_range(##A, nth(x,env), nth(y,env))" |
13306 | 722 |
by (simp add: range_fm_def is_range_def) |
723 |
||
724 |
lemma range_iff_sats: |
|
13429 | 725 |
"[| nth(i,env) = x; nth(j,env) = y; |
13306 | 726 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
727 |
==> is_range(##A, x, y) <-> sats(A, range_fm(i,j), env)" |
13306 | 728 |
by simp |
729 |
||
13314 | 730 |
theorem range_reflection: |
13429 | 731 |
"REFLECTS[\<lambda>x. is_range(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
732 |
\<lambda>i x. is_range(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
733 |
apply (simp only: is_range_def) |
13429 | 734 |
apply (intro FOL_reflections pair_reflection) |
13314 | 735 |
done |
13306 | 736 |
|
13429 | 737 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
738 |
subsubsection{*Field of a Relation, Internalized*} |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
739 |
|
13429 | 740 |
(* "is_field(M,r,z) == |
741 |
\<exists>dr[M]. is_domain(M,r,dr) & |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
742 |
(\<exists>rr[M]. is_range(M,r,rr) & union(M,dr,rr,z))" *) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
743 |
constdefs field_fm :: "[i,i]=>i" |
13429 | 744 |
"field_fm(r,z) == |
745 |
Exists(And(domain_fm(succ(r),0), |
|
746 |
Exists(And(range_fm(succ(succ(r)),0), |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
747 |
union_fm(1,0,succ(succ(z)))))))" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
748 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
749 |
lemma field_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
750 |
"[| x \<in> nat; y \<in> nat |] ==> field_fm(x,y) \<in> formula" |
13429 | 751 |
by (simp add: field_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
752 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
753 |
lemma sats_field_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
754 |
"[| x \<in> nat; y \<in> nat; env \<in> list(A)|] |
13429 | 755 |
==> sats(A, field_fm(x,y), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
756 |
is_field(##A, nth(x,env), nth(y,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
757 |
by (simp add: field_fm_def is_field_def) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
758 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
759 |
lemma field_iff_sats: |
13429 | 760 |
"[| nth(i,env) = x; nth(j,env) = y; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
761 |
i \<in> nat; j \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
762 |
==> is_field(##A, x, y) <-> sats(A, field_fm(i,j), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
763 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
764 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
765 |
theorem field_reflection: |
13429 | 766 |
"REFLECTS[\<lambda>x. is_field(L,f(x),g(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
767 |
\<lambda>i x. is_field(##Lset(i),f(x),g(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
768 |
apply (simp only: is_field_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
769 |
apply (intro FOL_reflections domain_reflection range_reflection |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
770 |
union_reflection) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
771 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
772 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
773 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
774 |
subsubsection{*Image under a Relation, Internalized*} |
13306 | 775 |
|
13429 | 776 |
(* "image(M,r,A,z) == |
13306 | 777 |
\<forall>y[M]. (y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. x\<in>A & pair(M,x,y,w))))" *) |
778 |
constdefs image_fm :: "[i,i,i]=>i" |
|
13429 | 779 |
"image_fm(r,A,z) == |
13306 | 780 |
Forall(Iff(Member(0,succ(z)), |
781 |
Exists(And(Member(0,succ(succ(r))), |
|
782 |
Exists(And(Member(0,succ(succ(succ(A)))), |
|
13429 | 783 |
pair_fm(0,2,1)))))))" |
13306 | 784 |
|
785 |
lemma image_type [TC]: |
|
786 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> image_fm(x,y,z) \<in> formula" |
|
13429 | 787 |
by (simp add: image_fm_def) |
13306 | 788 |
|
789 |
lemma sats_image_fm [simp]: |
|
790 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 791 |
==> sats(A, image_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
792 |
image(##A, nth(x,env), nth(y,env), nth(z,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
793 |
by (simp add: image_fm_def Relative.image_def) |
13306 | 794 |
|
795 |
lemma image_iff_sats: |
|
13429 | 796 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13306 | 797 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
798 |
==> image(##A, x, y, z) <-> sats(A, image_fm(i,j,k), env)" |
13306 | 799 |
by (simp add: sats_image_fm) |
800 |
||
13314 | 801 |
theorem image_reflection: |
13429 | 802 |
"REFLECTS[\<lambda>x. image(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
803 |
\<lambda>i x. image(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
804 |
apply (simp only: Relative.image_def) |
13429 | 805 |
apply (intro FOL_reflections pair_reflection) |
13314 | 806 |
done |
13306 | 807 |
|
808 |
||
13348 | 809 |
subsubsection{*Pre-Image under a Relation, Internalized*} |
810 |
||
13429 | 811 |
(* "pre_image(M,r,A,z) == |
812 |
\<forall>x[M]. x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. y\<in>A & pair(M,x,y,w)))" *) |
|
13348 | 813 |
constdefs pre_image_fm :: "[i,i,i]=>i" |
13429 | 814 |
"pre_image_fm(r,A,z) == |
13348 | 815 |
Forall(Iff(Member(0,succ(z)), |
816 |
Exists(And(Member(0,succ(succ(r))), |
|
817 |
Exists(And(Member(0,succ(succ(succ(A)))), |
|
13429 | 818 |
pair_fm(2,0,1)))))))" |
13348 | 819 |
|
820 |
lemma pre_image_type [TC]: |
|
821 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> pre_image_fm(x,y,z) \<in> formula" |
|
13429 | 822 |
by (simp add: pre_image_fm_def) |
13348 | 823 |
|
824 |
lemma sats_pre_image_fm [simp]: |
|
825 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 826 |
==> sats(A, pre_image_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
827 |
pre_image(##A, nth(x,env), nth(y,env), nth(z,env))" |
13348 | 828 |
by (simp add: pre_image_fm_def Relative.pre_image_def) |
829 |
||
830 |
lemma pre_image_iff_sats: |
|
13429 | 831 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13348 | 832 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
833 |
==> pre_image(##A, x, y, z) <-> sats(A, pre_image_fm(i,j,k), env)" |
13348 | 834 |
by (simp add: sats_pre_image_fm) |
835 |
||
836 |
theorem pre_image_reflection: |
|
13429 | 837 |
"REFLECTS[\<lambda>x. pre_image(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
838 |
\<lambda>i x. pre_image(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
839 |
apply (simp only: Relative.pre_image_def) |
13429 | 840 |
apply (intro FOL_reflections pair_reflection) |
13348 | 841 |
done |
842 |
||
843 |
||
13352 | 844 |
subsubsection{*Function Application, Internalized*} |
845 |
||
13429 | 846 |
(* "fun_apply(M,f,x,y) == |
847 |
(\<exists>xs[M]. \<exists>fxs[M]. |
|
13352 | 848 |
upair(M,x,x,xs) & image(M,f,xs,fxs) & big_union(M,fxs,y))" *) |
849 |
constdefs fun_apply_fm :: "[i,i,i]=>i" |
|
13429 | 850 |
"fun_apply_fm(f,x,y) == |
13352 | 851 |
Exists(Exists(And(upair_fm(succ(succ(x)), succ(succ(x)), 1), |
13429 | 852 |
And(image_fm(succ(succ(f)), 1, 0), |
13352 | 853 |
big_union_fm(0,succ(succ(y)))))))" |
854 |
||
855 |
lemma fun_apply_type [TC]: |
|
856 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> fun_apply_fm(x,y,z) \<in> formula" |
|
13429 | 857 |
by (simp add: fun_apply_fm_def) |
13352 | 858 |
|
859 |
lemma sats_fun_apply_fm [simp]: |
|
860 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 861 |
==> sats(A, fun_apply_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
862 |
fun_apply(##A, nth(x,env), nth(y,env), nth(z,env))" |
13352 | 863 |
by (simp add: fun_apply_fm_def fun_apply_def) |
864 |
||
865 |
lemma fun_apply_iff_sats: |
|
13429 | 866 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13352 | 867 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
868 |
==> fun_apply(##A, x, y, z) <-> sats(A, fun_apply_fm(i,j,k), env)" |
13352 | 869 |
by simp |
870 |
||
871 |
theorem fun_apply_reflection: |
|
13429 | 872 |
"REFLECTS[\<lambda>x. fun_apply(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
873 |
\<lambda>i x. fun_apply(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
874 |
apply (simp only: fun_apply_def) |
13352 | 875 |
apply (intro FOL_reflections upair_reflection image_reflection |
13429 | 876 |
big_union_reflection) |
13352 | 877 |
done |
878 |
||
879 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
880 |
subsubsection{*The Concept of Relation, Internalized*} |
13306 | 881 |
|
13429 | 882 |
(* "is_relation(M,r) == |
13306 | 883 |
(\<forall>z[M]. z\<in>r --> (\<exists>x[M]. \<exists>y[M]. pair(M,x,y,z)))" *) |
884 |
constdefs relation_fm :: "i=>i" |
|
13429 | 885 |
"relation_fm(r) == |
13306 | 886 |
Forall(Implies(Member(0,succ(r)), Exists(Exists(pair_fm(1,0,2)))))" |
887 |
||
888 |
lemma relation_type [TC]: |
|
889 |
"[| x \<in> nat |] ==> relation_fm(x) \<in> formula" |
|
13429 | 890 |
by (simp add: relation_fm_def) |
13306 | 891 |
|
892 |
lemma sats_relation_fm [simp]: |
|
893 |
"[| x \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
894 |
==> sats(A, relation_fm(x), env) <-> is_relation(##A, nth(x,env))" |
13306 | 895 |
by (simp add: relation_fm_def is_relation_def) |
896 |
||
897 |
lemma relation_iff_sats: |
|
13429 | 898 |
"[| nth(i,env) = x; nth(j,env) = y; |
13306 | 899 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
900 |
==> is_relation(##A, x) <-> sats(A, relation_fm(i), env)" |
13306 | 901 |
by simp |
902 |
||
13314 | 903 |
theorem is_relation_reflection: |
13429 | 904 |
"REFLECTS[\<lambda>x. is_relation(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
905 |
\<lambda>i x. is_relation(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
906 |
apply (simp only: is_relation_def) |
13429 | 907 |
apply (intro FOL_reflections pair_reflection) |
13314 | 908 |
done |
13306 | 909 |
|
910 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
911 |
subsubsection{*The Concept of Function, Internalized*} |
13306 | 912 |
|
13429 | 913 |
(* "is_function(M,r) == |
914 |
\<forall>x[M]. \<forall>y[M]. \<forall>y'[M]. \<forall>p[M]. \<forall>p'[M]. |
|
13306 | 915 |
pair(M,x,y,p) --> pair(M,x,y',p') --> p\<in>r --> p'\<in>r --> y=y'" *) |
916 |
constdefs function_fm :: "i=>i" |
|
13429 | 917 |
"function_fm(r) == |
13306 | 918 |
Forall(Forall(Forall(Forall(Forall( |
919 |
Implies(pair_fm(4,3,1), |
|
920 |
Implies(pair_fm(4,2,0), |
|
921 |
Implies(Member(1,r#+5), |
|
922 |
Implies(Member(0,r#+5), Equal(3,2))))))))))" |
|
923 |
||
924 |
lemma function_type [TC]: |
|
925 |
"[| x \<in> nat |] ==> function_fm(x) \<in> formula" |
|
13429 | 926 |
by (simp add: function_fm_def) |
13306 | 927 |
|
928 |
lemma sats_function_fm [simp]: |
|
929 |
"[| x \<in> nat; env \<in> list(A)|] |
|
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
930 |
==> sats(A, function_fm(x), env) <-> is_function(##A, nth(x,env))" |
13306 | 931 |
by (simp add: function_fm_def is_function_def) |
932 |
||
13505 | 933 |
lemma is_function_iff_sats: |
13429 | 934 |
"[| nth(i,env) = x; nth(j,env) = y; |
13306 | 935 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
936 |
==> is_function(##A, x) <-> sats(A, function_fm(i), env)" |
13306 | 937 |
by simp |
938 |
||
13314 | 939 |
theorem is_function_reflection: |
13429 | 940 |
"REFLECTS[\<lambda>x. is_function(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
941 |
\<lambda>i x. is_function(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
942 |
apply (simp only: is_function_def) |
13429 | 943 |
apply (intro FOL_reflections pair_reflection) |
13314 | 944 |
done |
13298 | 945 |
|
946 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
947 |
subsubsection{*Typed Functions, Internalized*} |
13309 | 948 |
|
13429 | 949 |
(* "typed_function(M,A,B,r) == |
13309 | 950 |
is_function(M,r) & is_relation(M,r) & is_domain(M,r,A) & |
951 |
(\<forall>u[M]. u\<in>r --> (\<forall>x[M]. \<forall>y[M]. pair(M,x,y,u) --> y\<in>B))" *) |
|
952 |
||
953 |
constdefs typed_function_fm :: "[i,i,i]=>i" |
|
13429 | 954 |
"typed_function_fm(A,B,r) == |
13309 | 955 |
And(function_fm(r), |
956 |
And(relation_fm(r), |
|
957 |
And(domain_fm(r,A), |
|
958 |
Forall(Implies(Member(0,succ(r)), |
|
959 |
Forall(Forall(Implies(pair_fm(1,0,2),Member(0,B#+3)))))))))" |
|
960 |
||
961 |
lemma typed_function_type [TC]: |
|
962 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> typed_function_fm(x,y,z) \<in> formula" |
|
13429 | 963 |
by (simp add: typed_function_fm_def) |
13309 | 964 |
|
965 |
lemma sats_typed_function_fm [simp]: |
|
966 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 967 |
==> sats(A, typed_function_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
968 |
typed_function(##A, nth(x,env), nth(y,env), nth(z,env))" |
13309 | 969 |
by (simp add: typed_function_fm_def typed_function_def) |
970 |
||
971 |
lemma typed_function_iff_sats: |
|
13429 | 972 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13309 | 973 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
974 |
==> typed_function(##A, x, y, z) <-> sats(A, typed_function_fm(i,j,k), env)" |
13309 | 975 |
by simp |
976 |
||
13429 | 977 |
lemmas function_reflections = |
13363 | 978 |
empty_reflection number1_reflection |
13429 | 979 |
upair_reflection pair_reflection union_reflection |
980 |
big_union_reflection cons_reflection successor_reflection |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
981 |
fun_apply_reflection subset_reflection |
13429 | 982 |
transitive_set_reflection membership_reflection |
983 |
pred_set_reflection domain_reflection range_reflection field_reflection |
|
13348 | 984 |
image_reflection pre_image_reflection |
13429 | 985 |
is_relation_reflection is_function_reflection |
13309 | 986 |
|
13429 | 987 |
lemmas function_iff_sats = |
988 |
empty_iff_sats number1_iff_sats |
|
989 |
upair_iff_sats pair_iff_sats union_iff_sats |
|
13505 | 990 |
big_union_iff_sats cons_iff_sats successor_iff_sats |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
991 |
fun_apply_iff_sats Memrel_iff_sats |
13429 | 992 |
pred_set_iff_sats domain_iff_sats range_iff_sats field_iff_sats |
993 |
image_iff_sats pre_image_iff_sats |
|
13505 | 994 |
relation_iff_sats is_function_iff_sats |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
995 |
|
13309 | 996 |
|
13314 | 997 |
theorem typed_function_reflection: |
13429 | 998 |
"REFLECTS[\<lambda>x. typed_function(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
999 |
\<lambda>i x. typed_function(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1000 |
apply (simp only: typed_function_def) |
13429 | 1001 |
apply (intro FOL_reflections function_reflections) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1002 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1003 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1004 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1005 |
subsubsection{*Composition of Relations, Internalized*} |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1006 |
|
13429 | 1007 |
(* "composition(M,r,s,t) == |
1008 |
\<forall>p[M]. p \<in> t <-> |
|
1009 |
(\<exists>x[M]. \<exists>y[M]. \<exists>z[M]. \<exists>xy[M]. \<exists>yz[M]. |
|
1010 |
pair(M,x,z,p) & pair(M,x,y,xy) & pair(M,y,z,yz) & |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1011 |
xy \<in> s & yz \<in> r)" *) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1012 |
constdefs composition_fm :: "[i,i,i]=>i" |
13429 | 1013 |
"composition_fm(r,s,t) == |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1014 |
Forall(Iff(Member(0,succ(t)), |
13429 | 1015 |
Exists(Exists(Exists(Exists(Exists( |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1016 |
And(pair_fm(4,2,5), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1017 |
And(pair_fm(4,3,1), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1018 |
And(pair_fm(3,2,0), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1019 |
And(Member(1,s#+6), Member(0,r#+6))))))))))))" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1020 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1021 |
lemma composition_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1022 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> composition_fm(x,y,z) \<in> formula" |
13429 | 1023 |
by (simp add: composition_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1024 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1025 |
lemma sats_composition_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1026 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
13429 | 1027 |
==> sats(A, composition_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1028 |
composition(##A, nth(x,env), nth(y,env), nth(z,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1029 |
by (simp add: composition_fm_def composition_def) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1030 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1031 |
lemma composition_iff_sats: |
13429 | 1032 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1033 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1034 |
==> composition(##A, x, y, z) <-> sats(A, composition_fm(i,j,k), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1035 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1036 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1037 |
theorem composition_reflection: |
13429 | 1038 |
"REFLECTS[\<lambda>x. composition(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1039 |
\<lambda>i x. composition(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1040 |
apply (simp only: composition_def) |
13429 | 1041 |
apply (intro FOL_reflections pair_reflection) |
13314 | 1042 |
done |
1043 |
||
13309 | 1044 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1045 |
subsubsection{*Injections, Internalized*} |
13309 | 1046 |
|
13429 | 1047 |
(* "injection(M,A,B,f) == |
1048 |
typed_function(M,A,B,f) & |
|
1049 |
(\<forall>x[M]. \<forall>x'[M]. \<forall>y[M]. \<forall>p[M]. \<forall>p'[M]. |
|
13309 | 1050 |
pair(M,x,y,p) --> pair(M,x',y,p') --> p\<in>f --> p'\<in>f --> x=x')" *) |
1051 |
constdefs injection_fm :: "[i,i,i]=>i" |
|
13429 | 1052 |
"injection_fm(A,B,f) == |
13309 | 1053 |
And(typed_function_fm(A,B,f), |
1054 |
Forall(Forall(Forall(Forall(Forall( |
|
1055 |
Implies(pair_fm(4,2,1), |
|
1056 |
Implies(pair_fm(3,2,0), |
|
1057 |
Implies(Member(1,f#+5), |
|
1058 |
Implies(Member(0,f#+5), Equal(4,3)))))))))))" |
|
1059 |
||
1060 |
||
1061 |
lemma injection_type [TC]: |
|
1062 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> injection_fm(x,y,z) \<in> formula" |
|
13429 | 1063 |
by (simp add: injection_fm_def) |
13309 | 1064 |
|
1065 |
lemma sats_injection_fm [simp]: |
|
1066 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 1067 |
==> sats(A, injection_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1068 |
injection(##A, nth(x,env), nth(y,env), nth(z,env))" |
13309 | 1069 |
by (simp add: injection_fm_def injection_def) |
1070 |
||
1071 |
lemma injection_iff_sats: |
|
13429 | 1072 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13309 | 1073 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1074 |
==> injection(##A, x, y, z) <-> sats(A, injection_fm(i,j,k), env)" |
13309 | 1075 |
by simp |
1076 |
||
13314 | 1077 |
theorem injection_reflection: |
13429 | 1078 |
"REFLECTS[\<lambda>x. injection(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1079 |
\<lambda>i x. injection(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1080 |
apply (simp only: injection_def) |
13429 | 1081 |
apply (intro FOL_reflections function_reflections typed_function_reflection) |
13314 | 1082 |
done |
13309 | 1083 |
|
1084 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1085 |
subsubsection{*Surjections, Internalized*} |
13309 | 1086 |
|
1087 |
(* surjection :: "[i=>o,i,i,i] => o" |
|
13429 | 1088 |
"surjection(M,A,B,f) == |
13309 | 1089 |
typed_function(M,A,B,f) & |
1090 |
(\<forall>y[M]. y\<in>B --> (\<exists>x[M]. x\<in>A & fun_apply(M,f,x,y)))" *) |
|
1091 |
constdefs surjection_fm :: "[i,i,i]=>i" |
|
13429 | 1092 |
"surjection_fm(A,B,f) == |
13309 | 1093 |
And(typed_function_fm(A,B,f), |
1094 |
Forall(Implies(Member(0,succ(B)), |
|
1095 |
Exists(And(Member(0,succ(succ(A))), |
|
1096 |
fun_apply_fm(succ(succ(f)),0,1))))))" |
|
1097 |
||
1098 |
lemma surjection_type [TC]: |
|
1099 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> surjection_fm(x,y,z) \<in> formula" |
|
13429 | 1100 |
by (simp add: surjection_fm_def) |
13309 | 1101 |
|
1102 |
lemma sats_surjection_fm [simp]: |
|
1103 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 1104 |
==> sats(A, surjection_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1105 |
surjection(##A, nth(x,env), nth(y,env), nth(z,env))" |
13309 | 1106 |
by (simp add: surjection_fm_def surjection_def) |
1107 |
||
1108 |
lemma surjection_iff_sats: |
|
13429 | 1109 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13309 | 1110 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1111 |
==> surjection(##A, x, y, z) <-> sats(A, surjection_fm(i,j,k), env)" |
13309 | 1112 |
by simp |
1113 |
||
13314 | 1114 |
theorem surjection_reflection: |
13429 | 1115 |
"REFLECTS[\<lambda>x. surjection(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1116 |
\<lambda>i x. surjection(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1117 |
apply (simp only: surjection_def) |
13429 | 1118 |
apply (intro FOL_reflections function_reflections typed_function_reflection) |
13314 | 1119 |
done |
13309 | 1120 |
|
1121 |
||
1122 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1123 |
subsubsection{*Bijections, Internalized*} |
13309 | 1124 |
|
1125 |
(* bijection :: "[i=>o,i,i,i] => o" |
|
1126 |
"bijection(M,A,B,f) == injection(M,A,B,f) & surjection(M,A,B,f)" *) |
|
1127 |
constdefs bijection_fm :: "[i,i,i]=>i" |
|
1128 |
"bijection_fm(A,B,f) == And(injection_fm(A,B,f), surjection_fm(A,B,f))" |
|
1129 |
||
1130 |
lemma bijection_type [TC]: |
|
1131 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> bijection_fm(x,y,z) \<in> formula" |
|
13429 | 1132 |
by (simp add: bijection_fm_def) |
13309 | 1133 |
|
1134 |
lemma sats_bijection_fm [simp]: |
|
1135 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 1136 |
==> sats(A, bijection_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1137 |
bijection(##A, nth(x,env), nth(y,env), nth(z,env))" |
13309 | 1138 |
by (simp add: bijection_fm_def bijection_def) |
1139 |
||
1140 |
lemma bijection_iff_sats: |
|
13429 | 1141 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13309 | 1142 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1143 |
==> bijection(##A, x, y, z) <-> sats(A, bijection_fm(i,j,k), env)" |
13309 | 1144 |
by simp |
1145 |
||
13314 | 1146 |
theorem bijection_reflection: |
13429 | 1147 |
"REFLECTS[\<lambda>x. bijection(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1148 |
\<lambda>i x. bijection(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1149 |
apply (simp only: bijection_def) |
13429 | 1150 |
apply (intro And_reflection injection_reflection surjection_reflection) |
13314 | 1151 |
done |
13309 | 1152 |
|
1153 |
||
13348 | 1154 |
subsubsection{*Restriction of a Relation, Internalized*} |
1155 |
||
1156 |
||
13429 | 1157 |
(* "restriction(M,r,A,z) == |
1158 |
\<forall>x[M]. x \<in> z <-> (x \<in> r & (\<exists>u[M]. u\<in>A & (\<exists>v[M]. pair(M,u,v,x))))" *) |
|
13348 | 1159 |
constdefs restriction_fm :: "[i,i,i]=>i" |
13429 | 1160 |
"restriction_fm(r,A,z) == |
13348 | 1161 |
Forall(Iff(Member(0,succ(z)), |
1162 |
And(Member(0,succ(r)), |
|
1163 |
Exists(And(Member(0,succ(succ(A))), |
|
1164 |
Exists(pair_fm(1,0,2)))))))" |
|
1165 |
||
1166 |
lemma restriction_type [TC]: |
|
1167 |
"[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> restriction_fm(x,y,z) \<in> formula" |
|
13429 | 1168 |
by (simp add: restriction_fm_def) |
13348 | 1169 |
|
1170 |
lemma sats_restriction_fm [simp]: |
|
1171 |
"[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|] |
|
13429 | 1172 |
==> sats(A, restriction_fm(x,y,z), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1173 |
restriction(##A, nth(x,env), nth(y,env), nth(z,env))" |
13348 | 1174 |
by (simp add: restriction_fm_def restriction_def) |
1175 |
||
1176 |
lemma restriction_iff_sats: |
|
13429 | 1177 |
"[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; |
13348 | 1178 |
i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1179 |
==> restriction(##A, x, y, z) <-> sats(A, restriction_fm(i,j,k), env)" |
13348 | 1180 |
by simp |
1181 |
||
1182 |
theorem restriction_reflection: |
|
13429 | 1183 |
"REFLECTS[\<lambda>x. restriction(L,f(x),g(x),h(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1184 |
\<lambda>i x. restriction(##Lset(i),f(x),g(x),h(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1185 |
apply (simp only: restriction_def) |
13429 | 1186 |
apply (intro FOL_reflections pair_reflection) |
13348 | 1187 |
done |
1188 |
||
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1189 |
subsubsection{*Order-Isomorphisms, Internalized*} |
13309 | 1190 |
|
1191 |
(* order_isomorphism :: "[i=>o,i,i,i,i,i] => o" |
|
13429 | 1192 |
"order_isomorphism(M,A,r,B,s,f) == |
1193 |
bijection(M,A,B,f) & |
|
13309 | 1194 |
(\<forall>x[M]. x\<in>A --> (\<forall>y[M]. y\<in>A --> |
1195 |
(\<forall>p[M]. \<forall>fx[M]. \<forall>fy[M]. \<forall>q[M]. |
|
13429 | 1196 |
pair(M,x,y,p) --> fun_apply(M,f,x,fx) --> fun_apply(M,f,y,fy) --> |
13309 | 1197 |
pair(M,fx,fy,q) --> (p\<in>r <-> q\<in>s))))" |
1198 |
*) |
|
1199 |
||
1200 |
constdefs order_isomorphism_fm :: "[i,i,i,i,i]=>i" |
|
13429 | 1201 |
"order_isomorphism_fm(A,r,B,s,f) == |
1202 |
And(bijection_fm(A,B,f), |
|
13309 | 1203 |
Forall(Implies(Member(0,succ(A)), |
1204 |
Forall(Implies(Member(0,succ(succ(A))), |
|
1205 |
Forall(Forall(Forall(Forall( |
|
1206 |
Implies(pair_fm(5,4,3), |
|
1207 |
Implies(fun_apply_fm(f#+6,5,2), |
|
1208 |
Implies(fun_apply_fm(f#+6,4,1), |
|
13429 | 1209 |
Implies(pair_fm(2,1,0), |
13309 | 1210 |
Iff(Member(3,r#+6), Member(0,s#+6)))))))))))))))" |
1211 |
||
1212 |
lemma order_isomorphism_type [TC]: |
|
13429 | 1213 |
"[| A \<in> nat; r \<in> nat; B \<in> nat; s \<in> nat; f \<in> nat |] |
13309 | 1214 |
==> order_isomorphism_fm(A,r,B,s,f) \<in> formula" |
13429 | 1215 |
by (simp add: order_isomorphism_fm_def) |
13309 | 1216 |
|
1217 |
lemma sats_order_isomorphism_fm [simp]: |
|
1218 |
"[| U \<in> nat; r \<in> nat; B \<in> nat; s \<in> nat; f \<in> nat; env \<in> list(A)|] |
|
13429 | 1219 |
==> sats(A, order_isomorphism_fm(U,r,B,s,f), env) <-> |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1220 |
order_isomorphism(##A, nth(U,env), nth(r,env), nth(B,env), |
13309 | 1221 |
nth(s,env), nth(f,env))" |
1222 |
by (simp add: order_isomorphism_fm_def order_isomorphism_def) |
|
1223 |
||
1224 |
lemma order_isomorphism_iff_sats: |
|
13429 | 1225 |
"[| nth(i,env) = U; nth(j,env) = r; nth(k,env) = B; nth(j',env) = s; |
1226 |
nth(k',env) = f; |
|
13309 | 1227 |
i \<in> nat; j \<in> nat; k \<in> nat; j' \<in> nat; k' \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1228 |
==> order_isomorphism(##A,U,r,B,s,f) <-> |
13429 | 1229 |
sats(A, order_isomorphism_fm(i,j,k,j',k'), env)" |
13309 | 1230 |
by simp |
1231 |
||
13314 | 1232 |
theorem order_isomorphism_reflection: |
13429 | 1233 |
"REFLECTS[\<lambda>x. order_isomorphism(L,f(x),g(x),h(x),g'(x),h'(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1234 |
\<lambda>i x. order_isomorphism(##Lset(i),f(x),g(x),h(x),g'(x),h'(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1235 |
apply (simp only: order_isomorphism_def) |
13429 | 1236 |
apply (intro FOL_reflections function_reflections bijection_reflection) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1237 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1238 |
|
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
1239 |
subsubsection{*Limit Ordinals, Internalized*} |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1240 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1241 |
text{*A limit ordinal is a non-empty, successor-closed ordinal*} |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1242 |
|
13429 | 1243 |
(* "limit_ordinal(M,a) == |
1244 |
ordinal(M,a) & ~ empty(M,a) & |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1245 |
(\<forall>x[M]. x\<in>a --> (\<exists>y[M]. y\<in>a & successor(M,x,y)))" *) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1246 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1247 |
constdefs limit_ordinal_fm :: "i=>i" |
13429 | 1248 |
"limit_ordinal_fm(x) == |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1249 |
And(ordinal_fm(x), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1250 |
And(Neg(empty_fm(x)), |
13429 | 1251 |
Forall(Implies(Member(0,succ(x)), |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1252 |
Exists(And(Member(0,succ(succ(x))), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1253 |
succ_fm(1,0)))))))" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1254 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1255 |
lemma limit_ordinal_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1256 |
"x \<in> nat ==> limit_ordinal_fm(x) \<in> formula" |
13429 | 1257 |
by (simp add: limit_ordinal_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1258 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1259 |
lemma sats_limit_ordinal_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1260 |
"[| x \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1261 |
==> sats(A, limit_ordinal_fm(x), env) <-> limit_ordinal(##A, nth(x,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1262 |
by (simp add: limit_ordinal_fm_def limit_ordinal_def sats_ordinal_fm') |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1263 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1264 |
lemma limit_ordinal_iff_sats: |
13429 | 1265 |
"[| nth(i,env) = x; nth(j,env) = y; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1266 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1267 |
==> limit_ordinal(##A, x) <-> sats(A, limit_ordinal_fm(i), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1268 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1269 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1270 |
theorem limit_ordinal_reflection: |
13429 | 1271 |
"REFLECTS[\<lambda>x. limit_ordinal(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1272 |
\<lambda>i x. limit_ordinal(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1273 |
apply (simp only: limit_ordinal_def) |
13429 | 1274 |
apply (intro FOL_reflections ordinal_reflection |
1275 |
empty_reflection successor_reflection) |
|
13314 | 1276 |
done |
13309 | 1277 |
|
13493
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1278 |
subsubsection{*Finite Ordinals: The Predicate ``Is A Natural Number''*} |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1279 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1280 |
(* "finite_ordinal(M,a) == |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1281 |
ordinal(M,a) & ~ limit_ordinal(M,a) & |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1282 |
(\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x))" *) |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1283 |
constdefs finite_ordinal_fm :: "i=>i" |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1284 |
"finite_ordinal_fm(x) == |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1285 |
And(ordinal_fm(x), |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1286 |
And(Neg(limit_ordinal_fm(x)), |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1287 |
Forall(Implies(Member(0,succ(x)), |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1288 |
Neg(limit_ordinal_fm(0))))))" |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1289 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1290 |
lemma finite_ordinal_type [TC]: |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1291 |
"x \<in> nat ==> finite_ordinal_fm(x) \<in> formula" |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1292 |
by (simp add: finite_ordinal_fm_def) |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1293 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1294 |
lemma sats_finite_ordinal_fm [simp]: |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1295 |
"[| x \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1296 |
==> sats(A, finite_ordinal_fm(x), env) <-> finite_ordinal(##A, nth(x,env))" |
13493
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1297 |
by (simp add: finite_ordinal_fm_def sats_ordinal_fm' finite_ordinal_def) |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1298 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1299 |
lemma finite_ordinal_iff_sats: |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1300 |
"[| nth(i,env) = x; nth(j,env) = y; |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1301 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1302 |
==> finite_ordinal(##A, x) <-> sats(A, finite_ordinal_fm(i), env)" |
13493
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1303 |
by simp |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1304 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1305 |
theorem finite_ordinal_reflection: |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1306 |
"REFLECTS[\<lambda>x. finite_ordinal(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1307 |
\<lambda>i x. finite_ordinal(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1308 |
apply (simp only: finite_ordinal_def) |
13493
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1309 |
apply (intro FOL_reflections ordinal_reflection limit_ordinal_reflection) |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1310 |
done |
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1311 |
|
5aa68c051725
Lots of new results concerning recursive datatypes, towards absoluteness of
paulson
parents:
13440
diff
changeset
|
1312 |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1313 |
subsubsection{*Omega: The Set of Natural Numbers*} |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1314 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1315 |
(* omega(M,a) == limit_ordinal(M,a) & (\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x)) *) |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1316 |
constdefs omega_fm :: "i=>i" |
13429 | 1317 |
"omega_fm(x) == |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1318 |
And(limit_ordinal_fm(x), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1319 |
Forall(Implies(Member(0,succ(x)), |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1320 |
Neg(limit_ordinal_fm(0)))))" |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1321 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1322 |
lemma omega_type [TC]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1323 |
"x \<in> nat ==> omega_fm(x) \<in> formula" |
13429 | 1324 |
by (simp add: omega_fm_def) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1325 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1326 |
lemma sats_omega_fm [simp]: |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1327 |
"[| x \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1328 |
==> sats(A, omega_fm(x), env) <-> omega(##A, nth(x,env))" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1329 |
by (simp add: omega_fm_def omega_def) |
13316 | 1330 |
|
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1331 |
lemma omega_iff_sats: |
13429 | 1332 |
"[| nth(i,env) = x; nth(j,env) = y; |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1333 |
i \<in> nat; env \<in> list(A)|] |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1334 |
==> omega(##A, x) <-> sats(A, omega_fm(i), env)" |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1335 |
by simp |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1336 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1337 |
theorem omega_reflection: |
13429 | 1338 |
"REFLECTS[\<lambda>x. omega(L,f(x)), |
13807
a28a8fbc76d4
changed ** to ## to avoid conflict with new comment syntax
paulson
parents:
13655
diff
changeset
|
1339 |
\<lambda>i x. omega(##Lset(i),f(x))]" |
13655
95b95cdb4704
Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents:
13651
diff
changeset
|
1340 |
apply (simp only: omega_def) |
13429 | 1341 |
apply (intro FOL_reflections limit_ordinal_reflection) |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1342 |
done |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1343 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1344 |
|
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1345 |
lemmas fun_plus_reflections = |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1346 |
typed_function_reflection composition_reflection |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1347 |
injection_reflection surjection_reflection |
13348 | 1348 |
bijection_reflection restriction_reflection |
13496
6f0c57def6d5
In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents:
13493
diff
changeset
|
1349 |
order_isomorphism_reflection finite_ordinal_reflection |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1350 |
ordinal_reflection limit_ordinal_reflection omega_reflection |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1351 |
|
13429 | 1352 |
lemmas fun_plus_iff_sats = |
1353 |
typed_function_iff_sats composition_iff_sats |
|
1354 |
injection_iff_sats surjection_iff_sats |
|
1355 |
bijection_iff_sats restriction_iff_sats |
|
13496
6f0c57def6d5
In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents:
13493
diff
changeset
|
1356 |
order_isomorphism_iff_sats finite_ordinal_iff_sats |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13316
diff
changeset
|
1357 |
ordinal_iff_sats limit_ordinal_iff_sats omega_iff_sats |
13316 | 1358 |
|
13223 | 1359 |
end |